mwifiex compilation with latest kernel 6.1.y

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

mwifiex compilation with latest kernel 6.1.y

268 Views
maxime_torrelli
Contributor II

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

0 Kudos
9 Replies

234 Views
maxime_torrelli
Contributor II

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.

0 Kudos

230 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

 

 

0 Kudos

226 Views
maxime_torrelli
Contributor II

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.

 

0 Kudos

61 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @maxime_torrelli ,

 

Sorry for my delay reply!

Internal team provided a patch for the issue. See attachment, please!

 

Thanks!

Regards,

weidong

0 Kudos

111 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @maxime_torrelli ,

 

See my test result, please!

The issue I encountered is different from yours.

 

Thanks!

Regards,

weidong

0 Kudos

217 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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

0 Kudos

134 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @maxime_torrelli ,

 

Could you please provide compilation logs? 

Let us check compilation errors.

 

Thanks!

Regards,

weidong

0 Kudos

222 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @maxime_torrelli ,

 

OK, thanks! Clear.

Let me confirm it with internal team.

 

Regards,

weidong

0 Kudos

241 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @maxime_torrelli ,

 

The latest driver version is : 

Generic_PCIE-WLAN-UART-BT-9098-LNX_6_6_3-IMX8-17.92.1.p149.131-17.92.1.p149.131-MM6X17437.P3-GPL

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

https://www.nxp.com/products/wireless-connectivity/wi-fi-plus-bluetooth-plus-802-15-4/2-4-5-ghz-dual...

weidong_sun_0-1714448094056.png

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

weidong_sun_1-1714450838629.png

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

 

 

 

0 Kudos