How to compile code for 88W8977 (PAN9026 module) to work with i.MX8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to compile code for 88W8977 (PAN9026 module) to work with i.MX8

249 Views
sebonghm
Contributor II

Hi,

I've managed to finally get a source for compiling drivers

(https://community.nxp.com/t5/Wireless-Connectivity/How-and-where-to-download-wifi-bluetooth-driver-f...)

I have also followed instructions of how to make the driver from post:

https://community.nxp.com/t5/i-MX-Processors/PAN9026/td-p/1319127

 

The package given by vendor:

SD-WLAN-SD-BT-8977-U16-MMC-W16.68.102.p9-16.26.102.p9-CS4X16710_V2-MGPL.zip

 

On compile, I had multiple errors, with the chief blocker seeming to come from "wlan_src/mlinux/moal_main.c:4519:57: error: 'struct wireless_dev' has no member named 'current_bss'"

Please advise if there is a required version of kernel to get the driver compiled and or a different version of the driver.

 

The compile details

make
make -C /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work/imx8mp_lpddr4_evk-poky-linux/linux-imx/6.1.y+gitAUTOINC+770c5fe2c1-r0/build M=/home/seb/PAN9026_driver/wlan_src modules
make[1]: Entering directory '/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work/imx8mp_lpddr4_evk-poky-linux/linux-imx/6.1.y+gitAUTOINC+770c5fe2c1-r0/build'
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_shim.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_init.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_txrx.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_cmdevt.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_misc.o
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_misc.c: In function 'wlan_delay_func':
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_misc.c:1160:31: warning: this statement may fall through [-Wimplicit-fallthrough=]
1160 | delay *= 1000;
| ~~~~~~^~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_misc.c:1162:17: note: here
1162 | case USEC:
| ^~~~
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_cfp.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_module.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_wmm.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_diag.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_sdio.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_11n_aggr.o
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11n_aggr.c: In function 'wlan_11n_deaggregate_pkt':
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11n_aggr.c:354:49: warning: this statement may fall through [-Wimplicit-fallthrough=]
354 | daggr_mbuf->status_code = MLAN_ERROR_PKT_INVALID;
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11n_aggr.c:356:17: note: here
356 | case MLAN_STATUS_SUCCESS:
| ^~~~
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_11n_rxreorder.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_11n.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_11d.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.o
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c: In function 'wlan_11h_radar_detected_handling':
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3417:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3417 | pstate_rdh->stage = RDH_STOP_TRAFFIC;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3420:9: note: here
3420 | case RDH_STOP_TRAFFIC:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3431:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3431 | pstate_rdh->stage = RDH_GET_INFO_CHANNEL;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3434:9: note: here
3434 | case RDH_GET_INFO_CHANNEL:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3547:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3547 | pstate_rdh->stage = RDH_GET_INFO_BEACON_DTIM;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3550:9: note: here
3550 | case RDH_GET_INFO_BEACON_DTIM:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3620:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3620 | pstate_rdh->stage = RDH_SET_CUSTOM_IE;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3623:9: note: here
3623 | case RDH_SET_CUSTOM_IE:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3670:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3670 | pstate_rdh->stage = RDH_REM_CUSTOM_IE;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3673:9: note: here
3673 | case RDH_REM_CUSTOM_IE:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3735:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3735 | pstate_rdh->stage = RDH_STOP_INTFS;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3738:9: note: here
3738 | case RDH_STOP_INTFS:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3781:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
3781 | if (pmadapter->dfs_test_params.no_channel_change_on_radar) {
| ^
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3794:9: note: here
3794 | case RDH_SET_NEW_CHANNEL:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3838:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3838 | pstate_rdh->stage = RDH_RESTART_INTFS;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3841:9: note: here
3841 | case RDH_RESTART_INTFS:
| ^~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3930:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
3930 | pstate_rdh->stage = RDH_RESTART_TRAFFIC;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/seb/PAN9026_driver/wlan_src/mlan/mlan_11h.c:3933:9: note: here
3933 | case RDH_RESTART_TRAFFIC:
| ^~~~
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_meas.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_scan.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_sta_ioctl.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_sta_rx.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_sta_tx.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_sta_event.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_sta_cmd.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_sta_cmdresp.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_join.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_uap_ioctl.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_uap_cmdevent.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlan/mlan_uap_txrx.o
LD [M] /home/seb/PAN9026_driver/wlan_src/mlan.o
CC [M] /home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.o
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c: In function 'woal_process_init_cfg':
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c:2092:79: warning: passing argument 1 of 'memcpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2092 | memcpy(handle->priv[i]->netdev->
| ~~~~~~~~~~~~~~~~~~~~~~~^~
2093 | dev_addr,
| ~~~~~~~~
In file included from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/string.h:20,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/bitmap.h:11,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/cpumask.h:12,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/smp.h:13,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/arch/arm64/include/asm/arch_timer.h:18,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/arch/arm64/include/asm/timex.h:8,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/timex.h:67,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/time32.h:13,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/time.h:60,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/arch/arm64/include/asm/stat.h:12,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/stat.h:6,
from /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/module.h:13,
from /home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.h:38,
from /home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c:29:
/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/arch/arm64/include/asm/string.h:35:21: note: expected 'void *' but argument is of type 'const unsigned char *'
35 | extern void *memcpy(void *, const void *, __kernel_size_t);
| ^~~~~~
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c: In function 'woal_close':
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c:4519:57: error: 'struct wireless_dev' has no member named 'current_bss'
4519 | if (IS_STA_CFG80211(cfg80211_wext) && priv->wdev->current_bss) {
| ^~
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c: In function 'woal_set_mac_address':
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c:4620:19: warning: passing argument 1 of 'memcpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
4620 | memcpy(dev->dev_addr, priv->current_addr, ETH_ALEN);
| ~~~^~~~~~~~~~
/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/arch/arm64/include/asm/string.h:35:21: note: expected 'void *' but argument is of type 'const unsigned char *'
35 | extern void *memcpy(void *, const void *, __kernel_size_t);
| ^~~~~~
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c: In function 'woal_init_priv':
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c:5939:28: warning: passing argument 1 of 'memcpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
5939 | memcpy(priv->netdev->dev_addr, priv->current_addr, ETH_ALEN);
| ~~~~~~~~~~~~^~~~~~~~~~
/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/arch/arm64/include/asm/string.h:35:21: note: expected 'void *' but argument is of type 'const unsigned char *'
35 | extern void *memcpy(void *, const void *, __kernel_size_t);
| ^~~~~~
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c: In function 'woal_send_disconnect_to_system':
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c:6823:45: error: 'struct wireless_dev' has no member named 'current_bss'
6823 | priv->wdev && priv->wdev->current_bss) {
| ^~
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c: In function 'woal_add_card':
/home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.c:8755:17: error: too many arguments to function 'netif_napi_add'
8755 | netif_napi_add(&handle->napi_dev, &handle->napi_rx,
| ^~~~~~~~~~~~~~
In file included from /home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.h:84:
/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/include/linux/netdevice.h:2575:1: note: declared here
2575 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
| ^~~~~~~~~~~~~~
make[2]: *** [/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/scripts/Makefile.build:250: /home/seb/PAN9026_driver/wlan_src/mlinux/moal_main.o] Error 1
make[1]: *** [/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/Makefile:2014: /home/seb/PAN9026_driver/wlan_src] Error 2
make[1]: Leaving directory '/media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work/imx8mp_lpddr4_evk-poky-linux/linux-imx/6.1.y+gitAUTOINC+770c5fe2c1-r0/build'
make: *** [Makefile:447: default] Error 2

0 Kudos
5 Replies

212 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @sebonghm 

From your attached driver version's Readme, I found this driver code supports Linux kernel from 2.6.32 to 5.15.5.

But from your given logs, I think you are using Linux kernel 6.1.y. Am I right?

=====

make
make -C /media/seb/2a164241-f27f-4bad-857d-17f1b5d77a44/imx-yocto-bsp/build/tmp/work/imx8mp_lpddr4_evk-poky-linux/linux-imx/6.1.y+gitAUTOINC+770c5fe2c1-r0/build M=/home/seb/PAN9026_driver/wlan_src modules

====

So the Linux kernel version is out of the Wi-Fi driver support limit.

Please change the Linux kernel version to this limit:  Kernel 2.6.32 to 5.15.5.

I am so sorry about the inconvenience.

 

Best regards,

Christine.

Tags (1)
0 Kudos

198 Views
sebonghm
Contributor II

Hi Christine,

I am trying to get this module to work with the i.MX8 eval board and the default yoctobuild for the i.mx8 is at kernel version 6.1. Is there a version of the driver that is updated to support kernel 6.1? Otherwise is there plans for the update?

Thanks

Regards

Sebastian

0 Kudos

190 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @sebonghm 

I am sorry for the inconvenience.

This is the latest release on our website because 88W8977 is an old Wi-Fi chipset, the release and maintain is not sufficient as the newer products.

You can download our I.MX8 prebuilt image through below link:

https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/embedded-linux-for...

Choose the Linux kernel version you prefer, and choose the correct product which is in your hand.

Please do not hesitate to reply me if you have any other queries.

 

Best regards,

Christine.

Tags (1)
0 Kudos

146 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @sebonghm 

Anything else I can do for you on this case?

 

Best regards,

Christine.

Tags (1)
0 Kudos

131 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @sebonghm 

Anything else I can do for you on this case?

 

Best regards,

Christine.

Tags (1)
0 Kudos