Commit graph

30 commits

Author SHA1 Message Date
yang.tian
42c915813e MA-19405 Build nxp mxmwifi driver with debug APIs disabled for GKI
Add build config item to control if debug APIs in mxmwifi driver
is enabled or not.
Default disable Debug APIs as GKI build disallow drivers read
and write to the filesystem directly.

Change-Id: I9f111e5a435ea95409a00bf344d62b3450e48895
Signed-off-by: yang.tian <yang.tian@nxp.com>
2021-09-02 18:09:41 +08:00
faqiang.zhu
e82d96cb65 MA-19378 stop building when fail to execute target mxmwifi recipe
Previously, the $(MAKE) command in the recipe of target mxmwifi is
passed to shell with the cp command together, if the $(MAKE) command
fails but the cp command succeed, the building process won't stop.

In this patch, pass the $(MAKE) and cp commands individually to shell,
then any failure will cause the build process to stop.

Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Change-Id: Id22642018e20620cd021cdd9fc79a2f60202e9da
2021-08-31 21:19:24 +08:00
Sherry Sun
592bc0fa92 mxm_wifiex: update to mxm5x17266 release
changes:
1. WCSWREL-126: Fixed PCIE9098 suspend fail on imx8mq.
2. WCSWREL-87: Hostsleep fails as DUT doesnot wake up on traffic/pattern.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by:  Tian Yang <yang.tian@nxp.com>
2021-07-21 15:13:03 +08:00
Sherry Sun
0266eab577 mwifiex: drop the using of HOTPLUG to fix the build errors on Linux5.13
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by:  Tian Yang <yang.tian@nxp.com>
2021-07-21 15:12:46 +08:00
Sherry Sun
b28f182943 mxm_wifiex: update to mxm5x17247.p5 release
changes:
1. Fixed Mu-MIMO not working issue.
2. Added a workaround for suspend-resume failure to block suspend when
   WLAN is in connected state.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
2021-07-21 15:12:21 +08:00
yang.tian
467f24a974 Add Android.mk for mlanutl build
Add Android.mk for mlanutl binary build in
Android image build.

Signed-off-by: yang.tian <yang.tian@nxp.com>
2021-06-09 15:03:00 +08:00
Sherry Sun
61f21f1a18 mxm_wifiex: update to mxm5x17247.p1 release
changes:
1. Fixed compilation errors for 5.12 kernel.
2. Fixed an issue with suspend/resume for PCIE9098 with 5.10.9 kernel.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
2021-05-10 15:37:29 +08:00
Sherry Sun
6746a7a3d5 mxm_wifiex: update to mxm5x17247 release
changes:
1. WCSWREL-87 Added hssetpara command in mlanutl to set hostwake
   conditions.
2. WCSWREL-87 Added pcie hostsleep wakeup support.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
2021-05-10 15:37:29 +08:00
Sherry Sun
2b267bfa71 fix build error on L5.12
meet below build error log:
/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_pcie.c: In function ‘woal_request_pmqos_busfreq_high’:
/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:143:31: error: ‘woal_pcie_pm_qos_req’ undeclared (first use in this function)
  143 |  cpu_latency_qos_add_request(&woal_pcie_pm_qos_req, 0);
      |                               ^~~~~~~~~~~~~~~~~~~~
/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:143:31: note: each undeclared identifier is reported only once for each function it appears in
/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_pcie.c: In function ‘woal_release_pmqos_busfreq_high’:
/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:171:34: error: ‘woal_pcie_pm_qos_req’ undeclared (first use in this function)
  171 |  cpu_latency_qos_remove_request(&woal_pcie_pm_qos_req);
      |                                  ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
2021-04-26 14:11:45 +08:00
Sherry Sun
5e1d300484 mxm_wifiex: update to mxm5x17241 release
changes:
1. Added support for PCIE-UART W9098 SoC
2. Added support for SDIO-UART W8997 SoC
3. Added a new RF Test Mode command
4. Added txratecfg and 11axcfg related commands to mlanutl light to
   support pre-cert testing
5. Added cpu_latency_qos_add/remove_request calls for L5.10 for better
   CPU performance during throughput tests
6. Added fixes for MBO Pre-Cert failure
7. Fixed Copyright header start date, end date

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
2021-04-26 14:11:28 +08:00
Sherry Sun
3bf38111b9 mwifiex: fix build error on Linux5.12
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
2021-04-26 13:32:24 +08:00
longli
cbc3b6bfd7 Issue: WCSWREL-119 Fix RCU warning when call ieee80211_bss_get_ie
[Description]
[  179.414989] =============================
[  179.419033] WARNING: suspicious RCU usage
[  179.428095] 5.11.0-rc1-next-20210104-04456-g31eb08622591 #1 Tainted: G           O
[  179.438042] -----------------------------
[  179.443768] net/wireless/util.c:911 suspicious rcu_dereference_check() usage!
[  179.453802]
[  179.453802] other info that might help us debug this:
[  179.453802]
[  179.463924]
[  179.463924] rcu_scheduler_active = 2, debug_locks = 1
[  179.472528] 3 locks held by wpa_supplicant/586:
[  179.477109]  #0: c18c5058 (cb_lock){++++}-{3:3}, at: genl_rcv+0x14/0x34
[  179.486226]  #1: c18be65c (rtnl_mutex){+.+.}-{3:3}, at: nl80211_pre_doit+0x104/0x1e8
[  179.496033]  #2: c8382da0 (&wdev->mtx){+.+.}-{3:3}, at: nl80211_connect+0x580/0x7ac
[  179.505687]
[  179.505687] stack backtrace:
[  179.511970] CPU: 0 PID: 586 Comm: wpa_supplicant Tainted: G           O      5.11.0-rc1-next-20210104-04456-g31eb08622591 #1
[  179.523233] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[  179.529093] [<c0111814>] (unwind_backtrace) from [<c010bd5c>] (show_stack+0x10/0x14)
[  179.536883] [<c010bd5c>] (show_stack) from [<c0eeae24>] (dump_stack+0xcc/0xf4)
[  179.544142] [<c0eeae24>] (dump_stack) from [<c0ded2b4>] (ieee80211_bss_get_elem+0x84/0x98)
[  179.552443] [<c0ded2b4>] (ieee80211_bss_get_elem) from [<bf0e11bc>] (woal_cfg80211_assoc+0x50c/0x98c [moal])
[  179.562737] [<bf0e11bc>] (woal_cfg80211_assoc [moal]) from [<bf0e4e2c>] (woal_cfg80211_connect+0x174/0x584 [moal])
[  179.573748] [<bf0e4e2c>] (woal_cfg80211_connect [moal]) from [<c0e30450>] (cfg80211_connect+0x1d8/0x7fc)
[  179.583590] [<c0e30450>] (cfg80211_connect) from [<c0e02aac>] (nl80211_connect+0x59c/0x7ac)
[  179.591985] [<c0e02aac>] (nl80211_connect) from [<c0c21860>] (genl_rcv_msg+0x174/0x35c)
[  179.600029] [<c0c21860>] (genl_rcv_msg) from [<c0c20960>] (netlink_rcv_skb+0xbc/0x11c)
[  179.607975] [<c0c20960>] (netlink_rcv_skb) from [<c0c20fec>] (genl_rcv+0x20/0x34)
[  179.615486] [<c0c20fec>] (genl_rcv) from [<c0c20004>] (netlink_unicast+0x1ac/0x2e0)
[  179.623173] [<c0c20004>] (netlink_unicast) from [<c0c2030c>] (netlink_sendmsg+0x1d4/0x408)
[  179.631465] [<c0c2030c>] (netlink_sendmsg) from [<c0b9d080>] (____sys_sendmsg+0x1c4/0x274)
[  179.639764] [<c0b9d080>] (____sys_sendmsg) from [<c0b9ee08>] (___sys_sendmsg+0xa4/0xd8)
[  179.647803] [<c0b9ee08>] (___sys_sendmsg) from [<c0b9efe0>] (sys_sendmsg+0x50/0x94)
[  179.655491] [<c0b9efe0>] (sys_sendmsg) from [<c0100080>] (ret_fast_syscall+0x0/0x2c)
[  179.663265] Exception stack(0xc839bfa8 to 0xc839bff0)
[  179.668342] bfa0:                   01352b30 01351da0 00000005 bec05770 00000000 00000000
[  179.676545] bfc0: 01352b30 01351da0 b6f49550 00000128 bec05770 bec057e8 00000001 00000004
[  179.684744] bfe0: 00000128 bec05720 b6c24bbf b6ba4616
[  179.718172] wlan: Connected to bssid c0:XX:XX:XX:3e:85 successfully

[Analysis]
RCU warning is happened at rcu_dereference -> rcu_dereference_check, rcu_read_lock_held() is a condition check in it.
When rcu_read_lock_held() return false, warning will be printed.

[Fix]
When call ieee80211_bss_get_ie(), the code and related ie need be wrapped around by rcu_read_lock()/rcu_read_unlock().

Signed-off-by: longli <li.long@nxp.com>
Reviewed-by: Sherry Sun <sherry.sun@nxp.com>
2021-04-26 13:31:53 +08:00
Meet Patel
840341b39d Fix Copyright header start date
Signed-off-by: Meet Patel <meet.patel@nxp.com>
2021-03-04 10:15:10 +08:00
yang.tian
0d82d39f24 MA-18600 Wifi: Wifi direct is not working
"mgmt_subtype_mask" is not updated with the supplicant provided
mask in the "mgmt_frame_register" handler.
cfg80211 handler "mgmt_frame_register" is updated from the kernel
version 5.8 onwards. mgmt_subtype_mask is not updated in the 5.8
specific path.

Updating mgmt_subtype_mask with required mask from supplicant
in the 5.8 kernel specific hanlder path.
Test: Wifi Direct work as GO or GC.

Change-Id: I457e1b44ec0b9f3481b5ccc81ccaa6a9e67b741b
Signed-off-by: yang.tian <yang.tian@nxp.com>
2021-02-01 13:14:48 +08:00
yang.tian
5426fc45f2 MA-18646 Build nxp mxmwifi driver out of kernel tree
Add mxmwifi.mk to build nxp wifi driver out of kernel
tree with clang.

Remove GCC ccflag options to build wifi driver.

Change-Id: Ie9a2550a2a626daa069e7edb305080c91ef71bfa
Signed-off-by: yang.tian <yang.tian@nxp.com>
2021-01-28 18:15:53 +08:00
Sherry Sun
8eea83e2ae mwifiex: 8997: deprecate the mwifiex_8997 driver
The mwifiex_8997 driver was used for 8997 c-driver on L5.4 Q1/Q2/Q3.
From L5.4 Q4 and L5.10, we start to use one driver -- mxm_wifiex for
8987 and 8997 wifi chip, so deprecate the mwifiex_8997 driver for L5.10.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2021-01-26 15:36:05 +08:00
Sherry Sun
070397228c mxm_wifiex: update to mxm5x16214 release(Support LF 5.10)
changes:
1. Added support for IMX Linux Kernel version 5.10
2. LF 5.10 need to be build out of tree

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
2020-12-10 17:02:22 +08:00
Sherry Sun
077332c2d2 mxm_wifiex: mapp: update to mxm5x16215 release
changes:
1. Removed unnecessary .conf files from config folder

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2020-12-05 16:28:29 +08:00
Fugang Duan
78b86e78be mxm_wifiex: mapp: update to mxm5x16210 release
Update mlanutl tool to mxm5x16210 release.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-11-17 14:05:20 +08:00
Fugang Duan
e8ce4698de mxm_wifiex: mapp: update to mxm5x16203 release
Update mlanutl tool to mxm5x16203 release.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-11-04 16:19:31 +08:00
Fugang Duan
e26a6cc8bb mxm_wifiex: mapp: fix build error by GCC10.2
Use GCC10.2, there has build error as below log:
mlan2040misc.o:(.bss+0x0): multiple definition of `leg_ap_chan_list'; mlan2040coex.o:(.bss+0x0): first defined here
mlan2040misc.o:(.bss+0x64): multiple definition of `num_leg_ap_chan'; mlan2040coex.o:(.bss+0x64): first defined here

Fix the build error.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-09-17 13:57:43 +08:00
Fugang Duan
8ac985b47a 8997: mapp: fix build error by GCC10.2
Use GCC10.2, there has build error as below log:
mlan2040misc.o:(.bss+0x0): multiple definition of `leg_ap_chan_list'; mlan2040coex.o:(.bss+0x0): first defined here
mlan2040misc.o:(.bss+0x64): multiple definition of `num_leg_ap_chan'; mlan2040coex.o:(.bss+0x64): first defined here

Fix the build error.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-09-17 13:21:55 +08:00
Fugang Duan
f18705756b mxm_wifiex: update nxp mxm_wifiex sdk to 186.p4
changes:
1. Added get_txpwrlimit cmd to mlanutl
2. Added source code of mlanutl for supported commands
3. Removed unnecessary .conf files from bin_wlan/config folder

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-09-11 14:42:57 +08:00
Fugang Duan
5fc6a71423 mxm_wifiex: update nxp mxm_wifiex sdk
The MxM wifi driver is merged from below repo and applied some
patches for block and build issues.
ssh://git@bitbucket.sw.nxp.com/wcswrel/
rel-nxp-wifi-fp92-bt-fp85-linux-android-mxm4x17169-mgpl.git

The commit is to update the license to GPL v2.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-26 10:53:08 +08:00
Fugang Duan
33d9f8e4f3 mxm_wifiex: add nxp mxm_wifiex sdk
Add initial MxM (multi-chip-multi-interface) wifi driver.
The driver target is to support 88w8987/88w8997/88w9098,
currently it only supports 88w8987.

The MxM wifi driver is merged from below repo and applied some
patches for block and build issues.
ssh://git@bitbucket.sw.nxp.com/wcswrel/
rel-nxp-wifi-fp92-bt-fp85-linux-android-mxm4x17169-gpl.git

The sdk only includes application, the driver already is
merged into linux kernel.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-04-20 00:54:27 +08:00
Fugang Duan
a33aa6ef80 mwifiex: mlinux: moal_pcie: add pm_qos support
Enable pm_qos to avoid system enter idle:
- to avoid suspend failed on i.MX8MP platform
- to get high performance for pcie wlan

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-03-02 17:30:04 +08:00
Fugang Duan
82481e5f16 Makefile: use global toolchain --sysroot
use global toolchina $CC that may have --sysroot variable.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-02-11 11:26:00 +08:00
Fugang Duan
a248256620 mwifiex: 8997: fix the build warning
Fix below build warning:
mlnux/moal_cfg80211.h:464:29: warning: large integer implicitly truncated to unsigned type [-Woverflow]
 #define REGULATORY_CFG_LEN  (NL80211_MAX_SUPP_REG_RULES << 1)
                             ^
mlinux/moal_sta_cfg80211.c:7711:42: note: in expansion of macro ‘REGULATORY_CFG_LEN’
  misc->param.custom_reg_domain.cfg_len = REGULATORY_CFG_LEN;

mlinux/moal_eth_ioctl.c: In function ‘woal_priv_set_get_scancfg’:
mlinux/moal_eth_ioctl.c:4144:2: warning: ISO C90 forbids variable length array ‘data’ [-Wvla]
  int data[arg_len];
  ^
  CC [M]  mlinux/moal_priv.o
mlinux/moal_priv.c: In function ‘woal_set_get_scan_cfg’:
mlinux/moal_priv.c:4818:2: warning: ISO C90 forbids variable length array ‘data’ [-Wvla]
  int data[arg_len], copy_len;
  ^

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-01-13 11:20:27 +08:00
Fugang Duan
280b53192f mwifiex: 8997: mlinux: port the driver to support L5.4
Port the driver to support L5.4 kernel.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-01-13 10:35:51 +08:00
Fugang Duan
bd8827d169 mwifiex: 8997: add W16.68.10.p16 release sdk
The sdk release is from NXP offial web:
https://www.nxp.com/products/wireless/wi-fi-plus-bluetooth/
88w8997-wi-fi-dual-band-with-bluetooth-5-for-a-v-streaming-and-digital-tv:88W8997?tab=Design_Tools_Tab

The release file is:
PCIE-WLAN-UART-BT-8997-U16-X86-W16.68.10.p16-16.26.10.p16-C4X16640_V4-MGPL

The sdk version is: W16.68.10.p16

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-01-13 10:35:39 +08:00