Commit graph

61 commits

Author SHA1 Message Date
Meet Patel 2348c67d55 Issue: WCSWREL-353 Remove 1 second scan result check
[Issue]
Driver gives previous scan results if scan command is entered in less
than 1 sec.

[Fix]
Fix: Remove 1 second scan result check in driver. We will allow back
to back scan request from user.

[Test]
Overnight stress back to back scan test passed

Signed-off-by: Meet Patel <meet.patel@nxp.com>
2022-06-28 16:56:18 +08:00
Meet Patel 90574c5a0c Issue: WCSWREL-352 Fix for driver kernel panic with use after free print
[Description]
Accessing "pmbuf" after mlan_send_packet results in kernel panic with
"use after free" print.

[Fix]
Moved the link layer statistics related code which accesses "pmbuf" to
the front of mlan_send_packet function.

Signed-off-by: Meet Patel <meet.patel@nxp.com>
2022-06-24 09:57:09 +08:00
Zhipeng Wang 3a50175cae MA-20371 Fix build errors of wifi driver after merge AOSP kernel
After merge AOSP kernel added these two patches:
BACKPORT: FROMGIT: wifi: cfg80211: do some rework towards MLO link APIs
BACKPORT: FROMLIST: cfg80211: Indicate MLO connection info in connect and roam callbacks

The patches has been merged into an upstream maintainer
tree, but has not yet been merged into Linux mainline.
More importantly, the patches changed the structure,
resulting in build errors.

Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
2022-06-20 17:56:44 +08:00
Sherry Sun 2365e637ab mxm_wifiex: update to mxm5x17322.p3 release
Driver Bug Fixes:
-----------------
1. Added GPL/NXP dual license header
2. WCSWREL-242: Fixed system rebooted issue after connecting wifi and running bt A2DP stress
3. WCSWREL-310: merge the L5.17 build errors and warnings related to netif_rx
4. WCSWREL-317: merge the build error and warning fix related to eth_hw_addr_set
5. WSW-19664: Fixed VtsHalWifiV1_0TargetTest failure

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-06-08 18:57:53 +08:00
Haoran.Wang ea800459ae MA-20217-2 Fix dfs_state_t build warning
Fixed below build warning:
vendor/nxp-opensource/nxp-mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c:5104:25:
error: implicit conversion from enumeration type 'enum nl80211_dfs_state' to different enumeration type 'dfs_state_t' (aka
'enum _dfs_state_t') [-Werror,-Wenum-conversion] sband->channels[i].dfs_state;

Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2022-04-27 10:13:40 +08:00
Sherry Sun ae28818963 mxm_wifiex: fix the net_device::dev_addr build warning
When build the mxm17322 wifi release based on the latest kernel(L5.17),
will observe the following build warning.

Need to use eth_hw_addr_set function instead of writing the address
directly to net_device::dev_addr. Make sure we don't cast off const
qualifier from dev->dev_addr.

/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c: In function ‘woal_cfg80211_add_mon_if’:
/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c:1485:44: warning: passing argument 2 of ‘moal_memcpy_ext’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1485 |         moal_memcpy_ext(priv->phandle, ndev->dev_addr, ndev->perm_addr,
      |                                        ~~~~^~~~~~~~~~
In file included from /home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:119,
                 from /home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.h:26,
                 from /home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c:23:
/home/sherry/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.h:82:48: note: expected ‘t_void *’ {aka ‘void *’} but argument is of type ‘const unsigned char *’
   82 | t_void *moal_memcpy_ext(t_void *pmoal, t_void *pdest, const t_void *psrc,
      |                                        ~~~~~~~~^~~~~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-04-24 21:44:04 +08:00
Sherry Sun aba7f13f6b mxm_wifiex: Makefile is needed for mapp/mlanconfig
mxm17322 deleted the mapp/mlanconfig/Makefile, it may cause the build
error when run the "$(MAKE) -C mapp/mlanconfig $@ INSTALLDIR=$(BINDIR)"
command in topmost Makefile.
So add the mapp/mlanconfig/Makefile back here.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-04-24 21:43:55 +08:00
Sherry Sun e057e875ba mxm_wifiex: update to mxm5x17322 release
New Additions/Removals/Improvements:
------------------------------------
1. WSW-18868: Improve FW download time after suspend/resume cycle
2. WSFD-484: WIFI 6E support
3. WSW-17954: Enable turbo mode command for mlanutl
4. WSW-19363: Add debug prints to WLAN driver regarding WPA_supplicant
5. WSW-19307: Support robust btc related commands [0x00e0] in mlanutl
6. WSW-16429: Disabling of WEP/TKIP on all V16 devices
7. Use CFG80211_VERSION_CODE to control cfg80211 related code
8. Enabled these new commands for mlanutl: min_ba_threshold, stop_su and ed_mac_ctrl_v3
9. WSFD-386: FW and VHAL Implementation for WOWLAN by adding code for MDNS wakeup

Driver Bug Fixes:
-----------------
1. WSW-18708: Setting domain info fails for W8801 Murata M.2 Module (2DS)
2. WSW-18541: Debug logs not seen if drvdbg is part of wifi_mod_para.conf
3. WSW-19136: Command 0x107 timeout is seen radomly during connect-disconnect test
4. WSW-18865: VHT80 TCP-tx throughput only run about 170Mbps, both STA and MMH mode
5. WSW-17923: 4K Video Stoppage Issue, Wi-Fi throughput drops to lower than 20Mbps without recovery
6. WSW-17925: NO_IR flags are not cleared for ch 12,13 and 14 if country is changed to JP in runtime
7. WCSWREL-251: There is "mlan0: Failed to initialize driver interface" during stress load/unload testing
8. WSW-18431: UAP beacon (in 1x1 mode) not reporting correct values for tx_highest_rate and rx_highest_rate in VhtCap IE
9. WSW-18116: TCP Keep alive packets are not seen after starting cloud keep alive
10. WSW-18690: STAUT is advertising support of MCS-0 to 9 only in HE-IE in Probe Request
11. WCSWREL-266: Fix L5.16 build errors and warnings

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-04-24 21:43:35 +08:00
Sherry Sun b227e66e06 mxm_wifiex: fix the PDE_DATA build errors on L5.16 kernel
L5.16 kernel patch commit a1c11021f19cb0a80f removed the PDE_DATA() and
replace it with pde_data(), so need to change accordingly, otherwise
will have the driver build errors.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2022-04-24 21:41:37 +08:00
Sherry Sun 4f17224637 mxm_wifiex: Use netif_rx() in L5.17 kernel
Since kernel commit baebdf48c3600 ("net: dev: Makes sure netif_rx() can
be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2022-04-24 21:41:33 +08:00
Sherry Sun 3fdde50dcc mxm_wifiex: fix the net_device::dev_addr build warnings on L5.16
Use eth_hw_addr_set function instead of writing the address directly to
net_device::dev_addr. Make sure we don't cast off const qualifier from
dev->dev_addr. Otherwise will have the build warnings when build the
driver based on L5.16 kernel.

Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2022-04-24 21:40:14 +08:00
Jindong Yue 58e49e28b1 MA-20217 Remove redefinition of typedef mlan_adapter and pmlan_adapter
Fix below build warnings:
nxp-mwifiex/mxm_wifiex/wlan_src/mlan/mlan_main.h:2794:3: warning: redefinition of typedef 'mlan_adapter' is a C11 feature [-Wtypedef-redefinition]
} mlan_adapter, *pmlan_adapter;
  ^
nxp-mwifiex/mxm_wifiex/wlan_src/mlan/mlan_main.h:2249:30: note: previous definition is here
typedef struct _mlan_adapter mlan_adapter, *pmlan_adapter;
                             ^
nxp-mwifiex/mxm_wifiex/wlan_src/mlan/mlan_main.h:2794:18: warning: redefinition of typedef 'pmlan_adapter' is a C11 feature [-Wtypedef-redefinition]
} mlan_adapter, *pmlan_adapter;
                 ^
nxp-mwifiex/mxm_wifiex/wlan_src/mlan/mlan_main.h:2249:45: note: previous definition is here
typedef struct _mlan_adapter mlan_adapter, *pmlan_adapter;

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
2022-04-22 15:59:58 +08:00
faqiang.zhu a8ad85af5b MA-19378-1 force to update the shell env script
There is a recipe with its target being a shell script. This shell
script is redirected with export shell env commands and is executed when
build the module.

It is possible that the shell scripts already exists but commands
redirected to it need to be changed. To eliminate build errors, force to
update this shell env script by make it a phony target.

Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Change-Id: I700a8025d0ca78bbaf00eb9206ff3a6cccbf9a33
2022-02-21 14:05:37 +08:00
yang.tian 597e74d594 Fix build issue on Android build system
Remove build flags which are not compaltable
with android build system.

Signed-off-by: yang.tian <yang.tian@nxp.com>
2022-02-16 14:01:29 +08:00
Sherry Sun b5d77e961f mxm_wifiex: fix the 17299.p1 wifi driver build warning
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2022-02-16 10:17:00 +08:00
Sherry Sun 59094f8640 mxm_wifiex: update to mxm5x17299.p1 release
changes:
    1. WSW-18043: Include txpwrlimit_cfg_iw416 files on MM driver
    2. WSW-18325: Rename ed_mac_ctrl conf files from V3 to V2
    3. WSW-16931: Observing timeout on STAUT with UL OFDMA BSR scenario
    4. WCSWREL-227: Fixed the issue of CtsWifiTestCases case android.net.wifi.cts.WifiManagerTest#testTrafficStateCallback
    5. WSW-17727: Fixed the issue of STA Connection failed with dmcs enable and host_mlme=1
    6. WSW-17450: Fixed the issue of android.net.wifi.cts.WifiManagerTest failure
    7. WSW-17491: Fixed the issue of android.cts.statsdatom.wifi.WifiStatsTests failure
    8. WSW-18006: Set CAC period of 600 sec for weather channel for ETSI region
    9. WSW-17906: Fixed the issue of APUT not advertise the support of MCS32
    10. WSW-17575: Fixed the issue of Host cannot wake-up by ping during Hostsleep
    11. WSW-17904: Fixed the issue of STAUT advertising VHT Tx/Rx MCS as 1SS when associating with 1SS AP
    12. WSW-17427: Fixed the issue of uAPUTL failing to start BSS and returns "Core Dumped" error message
    13. WSW-15856: Hotspot is turning off automatically after few minutes ~10mins with one client connected
    14. WCSWREL-211: System reboot when switch wifi hotspot security mode from WPA2 to none

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2022-02-16 10:17:00 +08:00
Sherry Sun 28787bd8f9 mxm_wifiex: update the ed_mac and tx power conf file
Added missing ed_mac conf file for 8978 and also removed ed_mac conf
file of 9177 and 909x which is not a supported SoC on IMX under
MassMarket.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2022-02-16 10:17:00 +08:00
Sherry Sun 1ad6227f5d mxm_wifiex: update to mxm5x17293 release
changes:
    1. WCSWREL-199: Fixed the build error on kernel higher than L5.12
    2. WSW-16639: Improve the throughput by avoiding skb copy in amsdu deaggreation
    3. WSW-15903: By default enabled pmqos=1 module param on IMX8 only and disable this for other platforms like X86
    4. WSFD-411: Generate fw_dump files in HAL layer instead of driver
    5. WSW-17154: Fixed the issue of driver crash seen with AGO+AGO restart stress test
    6. WSFD-416: Added WPA3 R3 support using embedded supplicant
    7. WSW-16171: Fixed the issue of DUT failed to roam to other AP2, when low RSSI hits on connected AP1
    8. WSW-17323: Fixed the issue of not activating Channel 13 using DE or JP country codes
    9. WSW-16630: APUT is not switching back from 20/40MHz to 20MHz channel bandwidth in the presence of 20MHz testbed AP
    10. WCECCB-37: Added support for UNII-4 / upper 5 GHz channels
    11. WSW-17368: Fixed the issue of System shutdown after switching AC power to battery
    12. WSW-17447: Added RTT support enablement for Android
    13. WSW-17453: Fixed the issue of 0x107 Command timeout for scan(iwlist)
    14. WSW-17019: Fixed the issue of Wifi hang with timeout cmd id 0x20 due to interference from another device doing DPD
    15. WSW-14: Added Support for IMX Linux Kernel 5.15.0
    16. WSW-17450: Disable host based Link layer stats so that fw based stats will be used

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2022-02-16 10:16:42 +08:00
yang.tian 60e93a5ec9 mxm_wifiex: update to mxm5x17283.p21 release
changes:
1. WCSWREL-211 Fixed System reboot when switch wifi
hotspot security mode from WPA2 to none
2. Fix compilation error for 5.15 kernel

Change-Id: I2080dd5421c0a9bb084565699800c96c160537ac
Signed-off-by: yang.tian <yang.tian@nxp.com>
2021-12-17 17:19:10 +08:00
Jindong Yue 8d12052fe9 MA-18757 Fix build issue when build mxmwifi from other folder
When we build mxmwifi from other folders, like AOSP kernel
build repo to collect symbols used by imx drivers,
it will meet below build error:
  make -C common M=/home/ssd-2/jindong/android/gki-imx ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules
  make[1]: *** common: No such file or directory.  Stop.

Use KERNEL_SRC to hold kernel directory, which can be passed
from AOSP kernel build repo.

Add a new target modules_install.

Change-Id: I344b0984317ae477b6961ab05eb73bf0a6c97e50
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
2021-12-10 15:12:42 +08:00
Sherry Sun 75a3d35433 mxm_wifiex: update to mxm5x17283.p2 release
changes:
1. Enabled pmqos by default for IMX platforms
2. WCSWREL-186: Merged a fix to avoid mlanutl tool to fail on kernel higher than L5.15
3. Fixed kernel crash dump warning message when invoking pm_qos_add_request
   or pm_qos_remove_request APIs in case of dual MAC SoC like Skyhawk

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2021-11-19 09:53:14 +08:00
Sherry Sun b3e54a562a mxm_wifiex: fix the build error on kernel higher than L5.12
The parameters in cfg80211_unregister_netdevice function is wrong, will
cause the build error on kernel higher than L5.12.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2021-10-14 10:50:38 +08:00
Sherry Sun 0b4b008840 mxm_wifiex: fix the wrong ndo_siocdevprivate function for woal_uap_netdev_ops
ndo_siocdevprivate should use woal_uap_do_ioctl instead of woal_do_ioctl
in woal_uap_netdev_ops struct.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2021-10-14 10:50:38 +08:00
Sherry Sun 13b6fdb0b4 mxm_wifiex: update to mxm5x17283 release
changes:
1. WCSWREL-191: Fixed the error when loading module param from user config for SD8801
2. WCSWREL-186: Fixed the issue of mlanutl failing on kernel higher than L5.15
3. Fixed low throughput issue for WPA3 SAE
4. Added driver change for WLAN throughput improvement on 8997 SoC
5. Updated README to recommend not to use WEP/TKIP for all chipsets
6. WCSWREL-180: Fix P2P test fail on kernel higher than L5.12
7. WCSWREL-156: kernel_write/kernel_read not allowed by drivers for L5.10 kernel GKI buildou
8. Alternative for pm_qos_add_request/pm_qos_remove_request

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2021-10-14 10:50:37 +08:00
yang.tian ca6dc88279 Revert "MA-19405 Build nxp mxmwifi driver with debug APIs disabled for GKI"
This reverts commit 42c915813e.
2021-10-14 10:50:27 +08:00
Sherry Sun 67cfa05402 mxm_wifiex: fix mlanutl fail on L5.15
When use mlanutl on L5.15, will meet below error logs:
root@imx8mqevk:/usr/share/nxp_wireless# ./mlanutl mlan0 hssetpara 2 0xff 0xc8 3 400
mlanutl: Operation not supported
mlanutl: hssetpara fail

This is due to the net common api change the ndo_do_ioctl behavior, it
splits out all the users of SIOCDEVPRIVATE ioctls into a separate
ndo_siocdevprivate callback. All the ioctl functions through
SIOCDEVPRIVATE in mlanutl.c will fail if not follow this upstream api
change. So here change to use new ndo_siocdevprivate instead of
ndo_do_ioctl on L5.15.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2021-10-14 09:54:18 +08:00
Sherry Sun ed444e7643 mxm_wifiex: update to mxm5x17266.p4 release
No driver change, only fw changes in this release.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2021-10-14 09:54:18 +08:00
Sherry Sun 9bca1fe910 mxm_wifiex: update to mxm5x17266.p3 release
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2021-10-14 09:54:18 +08:00
Sherry Sun b879ca79c3 mxm_wifiex: update to mxm5x17266.p2 release
changes:
1. Remove unsupported commands and info from README_MLAN.
2. Improved the 8997 SDIO TCP Tx throughput.
3. 0x10c Command Timeout during p2p_connect

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2021-10-14 09:54:17 +08:00
Sherry Sun 86bce10ecf mxm_wifiex: fix P2P test fail on kernel higher than L5.12
P2P test will fail(deadlock) on kernel higher than L5.12,
error log like below:
root@imx8mmevk:~# wpa_cli -i p2p0 p2p_group_add freq=2412
[   47.284346] Add virtual interface p2p-p2p0-0
'P2P_GROUP_ADD freq=2412' command timed out.

This is because the upgarded kernel change the netdevs
registration/unregistration semantics, new kernel require the drivers
to call cfg80211_(un)register_netdevice() when this is happening due to
a cfg80211 request.

For more details, please refer to the upstream patch:
https://lore.kernel.org/linux-wireless/20210122161942.cf2f4b65e4e9.Ida8234e50da13eb675b557bac52a713ad4eddf71@changeid/

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2021-10-14 09:54:17 +08:00
Sherry Sun 6ac7352a0d mwifiex: fix the suspend issue when run suspend test with the 17266 wifi release
For the wifi release 17266, we found SDIO8987 and PCIE8997 both may meet
below error logs when run suspend stress test.
"HS not actived, suspend fail!"

For pcie8997 on imx8mp, this may cause system hang. For sdio8987 and
pcie8997 on other platforms, this may cause suspend fail sometimes.
This patch is a workaround for this issue. WCS team still debugging this
issue.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
2021-10-14 09:54:17 +08:00
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