Hi,
How kernel-module-nxp89xx's debug output to be disabled?
I would like to my image for i.MX8M Plus based on NXP BSP(Linux 5.15.32_2.0.0).
When I use Wi-Fi, the following command is needed to load Wi-Fi driver(moal.ko, mlan.ko).
modprobe moal mod_para=nxp/wifi_mod_para.conf
However, moal and mlan keep giving debug output after modprobe command like that.
[ 35.991569] wlan: wfd0 START SCAN
[ 40.337134] wlan: SCAN COMPLETED: scanned AP count=41
[ 40.345986] wlan: sched scan start
So, I tried to patch Makefile to changing DEBUG LEVEL.
But compile error occured.
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_shim.c: In function 'moal_get_hw_spec_complete':
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_shim.c:875:15: warning: unused variable 'drv_mode' [-Wunused-variable]
875 | t_u32 drv_mode = handle->params.drv_mode;
| ^~~~~~~~
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_shim.c: In function 'moal_recv_event':
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_shim.c:2854:21: error: 'drvdbg' undeclared (first use in this function); did you mean 'dev_dbg'?
2854 | if (drvdbg & MFW_D)
| ^~~~~~
| dev_dbg
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_shim.c:2854:21: note: each undeclared identifier is reported only once for each function it appears in
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_shim.c:2854:30: error: 'MFW_D' undeclared (first use in this function)
2854 | if (drvdbg & MFW_D)
| ^~~~~
CC [M] /home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.o
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_main.c: In function 'woal_tx_timeout':
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_main.c:6180:21: error: 'drvdbg' undeclared (first use in this function); did you mean 'dev_dbg'?
6180 | if (drvdbg & MFW_D)
| ^~~~~~
| dev_dbg
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_main.c:6180:21: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work-shared/imx8mp-lpddr4-evk/kernel-source/scripts/Makefile.build:277: /home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_shim.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/home/feadmin/work/imx-yocto-bsp/build-xwayland-kirkstone/tmp/work/imx8mp_lpddr4_evk-poky-linux/kernel-module-nxp89xx/1.0-r0/git/mxm_wifiex/wlan_src/mlinux/moal_main.c:6180:30: error: 'MFW_D' undeclared (first use in this function)
6180 | if (drvdbg & MFW_D)
| ^~~~~
How to solve it?
Patch file, bb file and build logs are attached.
Best Regard.
Tanoue.
The CONFIG_DEBUG max value that makefile support is 2. Please modify this value in your patch.
ifeq ($(CONFIG_DEBUG),1)
ccflags-y += -DDEBUG_LEVEL1
endif
ifeq ($(CONFIG_DEBUG),2)
ccflags-y += -DDEBUG_LEVEL1
ccflags-y += -DDEBUG_LEVEL2
DBG= -dbg
endif
Hi, @Zhiming_Liu .
Thank you for reply.
I already knew CONFIG_DEBUG's max value is 2.
What I am referring to is that CONFIG_DEBUG supports n(none) according to comments in Makefile, but the source code does not.
Comments is here
# Debug Option# DEBUG LEVEL n/1/2:# n: NO DEBUG# 1: Only PRINTM(MMSG,...), PRINTM(MFATAL,...), ...# 2: All PRINTM()CONFIG_DEBUG=1