Hello,
With the latest versions of the kernel branches 6.1.y (>= 6.1.80) and 5.10.y (>= 5.1.211), the mwifiex driver no longer compiles. This is caused by a change in the socckaddr structure declared in include/linux/socket.h.
I found some explanations here and sort of understand why they have changed this but I would like to know how to compile the mwifiex driver with these versions of the kernel. Does NXP plan on updating the driver sources to support these versions ?
Thanks for you help
Hello Weidong,
Thanks for your answer.
The latest kernel version (6.1.80 or higher, 5.10.211 or higher). In these versions the structure sockaddr was change from
struct sockaddr { sa_family_t sa_family; /* address family, AF_xxx */ char sa_data[14]; /* 14 bytes of protocol address */ };
to
struct sockaddr { sa_family_t sa_family; /* address family, AF_xxx */ union { char sa_data_min[14]; /* Minimum 14 bytes of protocol address */ DECLARE_FLEX_ARRAY(char, sa_data); }; };
This change is handled for version 6.2.y and above, whereas for branches 6.1.y and 5.10.y it is not handled.
Can you check with your teams if you plan on correcting this issue ?
Thanks for your help.
Dear @maxime_torrelli ,
Sorry! I have a little confusion with your questions. Could you tell me these information?
>>6.1.80 or higher, 5.10.211 or higher
Do you mean that building mxm driver for the kernel failed?
if yes, please tell me mxm driver version!
>>About your application
(1) which version of linux kernel & wifi driver are you using?
(2) Which NXP wifi chip are you using?
(3) which hardware platform are you using?
Thanks!
Regards,
weidong
The latest sources from https://github.com/nxp-imx/mwifiex (branch If-6.6.3_1.0.0) does not compile with kernel versions 6.1.80 (or higher) or 5.10.211 (or higher). The sources compile for kernel 6.2.0 or 6.1.79 (for example).
We are using the official linux kernel, branch 6.1.y and 5.10.y. The wifi driver is the mwifiex from the github link above.
The wifi chip is the AW-CM276MA.
Our platform is a custom board based on an iMX6DL.
Dear @maxime_torrelli ,
Sorry for my delay reply!
Internal team provided a patch for the issue. See attachment, please!
Thanks!
Regards,
weidong
Dear @maxime_torrelli ,
See my test result, please!
The issue I encountered is different from yours.
Thanks!
Regards,
weidong
Dear @maxime_torrelli ,
Sorry! one more question:
Do you use the command to get the 6.1.y source code?
# git clone https://github.com/nxp-imx/linux-imx -b lf-6.1.y
Thanks!
Regards,
weidong
Dear @maxime_torrelli ,
Could you please provide compilation logs?
Let us check compilation errors.
Thanks!
Regards,
weidong
Dear @maxime_torrelli ,
The latest driver version is :
The driver code supports Linux kernel from 2.6.32 to 6.6.2.
you have 2 ways to get the driver:
1. From nxp website
it is secure file, NDA is required. After NDA is done, you can log in nxp website, and press my nxp account, then select Secure Files, like below
then follow the guidance to apply for access rights.
2. Getting it from github
-- driver
#git clone https://github.com/nxp-imx/mwifiex.git
#cd mwifiex
#git tag
#git checkout lf-6.6.3_1.0.0
-- firmware & wifi_mod_para.conf
https://github.com/nxp-imx/imx-firmware/tree/lf-6.6.3_1.0.0/nxp
Select firmware for the WiFi chip you are using, the copy firmware & wifi_mod_para.conf to /lib/firmware/nxp directory.
Try it, please!
Thanks!
Regards,
weidong