Kernel compile mwifiex version for iMX8

Setup:
Colibri iMX8QXP 2GB WB IT V1.0D
Iris carrier board V1.1B
Linux BSP 5.4

We compiled the kernel for iMX8 a few months ago and ended up with kernel version 5.4.129 and the mwifiex version was 16.68.1.p195 which works fine in AP mode, allows mulitple clients to connect.
We compiled the kernel on a new machine to add other modules and ended up with kernel version 5.4.193 and the mwifiex version is 16.68.10.p159 but this version doesn’t work properly, it only allows 1 client to connect, there is a massive post about it on the NXP git forum about that version of mwifiex.

How do we compile the kernel and get back to 16.68.1.p195 for mwifiex which works great? Where do I need to look or which file do I modify to get the right version?

Thanks.
Rob.

I compiled with my original kernel files that produced mwifiexap 16.68.1.p195 but now once compiled I get the other version that doesn’t allow 2 clients to connect!
Anyone have any ideas?
Looks like an issue with the Toradex recipes but I can’t find where the source is specified for mwifiexap

Here is the dmesg output:

[ 8.281703] mwifiex_pcie 0000:01:00.0: WLAN FW is active
[ 8.329121] mwifiex_pcie 0000:01:00.0: Unknown api_id: 3
[ 8.337114] mwifiex_pcie 0000:01:00.0: Unknown api_id: 4
[ 8.345121] mwifiex_pcie 0000:01:00.0: Unknown GET_HW_SPEC TLV type: 0x217
[ 8.362867] Micrel KSZ8041 5b040000.ethernet-1:02: attached PHY driver [Micrel KSZ8041] (mii_bus:phy_addr=5b040000.ethernet-1:02, irq=POLL)
[ 8.416997] mwifiex_pcie 0000:01:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.10.p159)
[ 8.432162] mwifiex_pcie 0000:01:00.0: driver_version = mwifiex 1.0 (16.68.10.p159)
[ 131.584630] IPv6: ADDRCONF(NETDEV_CHANGE): uap0: link becomes ready
[ 195.137600] mwifiex_pcie 0000:01:00.0: CMD_RESP: cmd 0x5e error, result=0x1
[ 195.144882] mwifiex_pcie 0000:01:00.0: crypto keys added
[ 201.717168] mwifiex_pcie 0000:01:00.0: CMD_RESP: cmd 0x5e error, result=0x1
[ 201.724227] mwifiex_pcie 0000:01:00.0: crypto keys added
[ 203.113024] mwifiex_pcie 0000:01:00.0: CMD_RESP: cmd 0x5e error, result=0x1
[ 203.120141] mwifiex_pcie 0000:01:00.0: crypto keys added
[ 288.874827] mwifiex_pcie 0000:01:00.0: CMD_RESP: cmd 0x5e error, result=0x1
[ 288.881883] mwifiex_pcie 0000:01:00.0: crypto keys added
[ 295.875101] mwifiex_pcie 0000:01:00.0: CMD_RESP: cmd 0x5e error, result=0x1
[ 295.882339] mwifiex_pcie 0000:01:00.0: crypto keys added
[ 296.870105] mwifiex_pcie 0000:01:00.0: CMD_RESP: cmd 0xb5 error, result=0x1
[ 298.635751] mwifiex_pcie 0000:01:00.0: CMD_RESP: cmd 0x5e error, result=0x1
[ 298.642850] mwifiex_pcie 0000:01:00.0: crypto keys added

Solved my issue, it’s actually related to the kernel version. If you compile kernel 5.4.0 you get a different version of the mwifiex and multiple clients can connect to the Wifi Access point, if you compile anything higher then you get a different version and the wifi doesn’t work properly in Access point mode.

root@colibri-imx8x-07252556:~# uname -a
Linux colibri-imx8x-07252556 5.4.129-5.4.0-devel+git.cb88cc157bfb #1 SMP PREEMPT Wed Sep 29 18:17:21 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Output from dmesg:
[ 8.278836] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 8.364250] cfg80211: Loaded X.509 cert ‘sforshee: 00b28ddf47aef9cea7’
[ 8.476303] mwifiex_pcie 0000:01:00.0: enabling device (0000 → 0002)
[ 8.593903] mwifiex_pcie: PCI memory map Virt0: 0000000090c0e542 PCI memory map Virt2: 00000000be53d40a
[ 8.748236] mcp251x spi0.0: MCP251x didn’t enter in conf mode after reset
[ 8.784428] mcp251x spi0.0: Probe failed, err=16
[ 8.832116] mcp251x: probe of spi0.0 failed with error -16
[ 9.534875] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 9.780802] mwifiex_pcie 0000:01:00.0: info: FW download over, size 634228 bytes
[ 10.244966] fec 5b040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 10.252840] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 10.544225] mwifiex_pcie 0000:01:00.0: WLAN FW is active
[ 10.592677] mwifiex_pcie 0000:01:00.0: Unknown api_id: 3
[ 10.598058] mwifiex_pcie 0000:01:00.0: Unknown api_id: 4
[ 10.603498] mwifiex_pcie 0000:01:00.0: Unknown GET_HW_SPEC TLV type: 0x217
[ 10.648088] mwifiex_pcie 0000:01:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.1.p195)
[ 10.662702] mwifiex_pcie 0000:01:00.0: driver_version = mwifiex 1.0 (16.68.1.p195)

See the different version!

Can someone from Toradex confirm this and fix this issue on the latest kernels or we are stuck using 5.4.0 forever.