Commit graph

104 commits

Author SHA1 Message Date
Sherry Sun
5ad19e194f mxm_wifiex: update to mxm6x18505.p4 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p142.3
PCIE-UART W8997 Firmware version 16.92.21.p137.4
SDIO-UART W8997 Firmware version 16.92.21.p137.4
SDIO-UART IW416 Firmware version 16.92.21.p142.3
SDIO_UART IW610 Firmware version 18.99.5.p39
SDIO_UART IW612 Firmware version 18.99.3.p21.10
SDIO-UART W8801 Firmware version 14.92.36.p195
SDIO-UART W9098 Firmware version 17.92.1.p149.53
PCIE-UART W9098 Firmware version 17.92.1.p149.53

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-11-12 11:21:25 +08:00
Sherry Sun
e4ffd91b62 mxm_wifiex: fix build warnings on L6.12 kernel next tree
When build wifi driver based on L6.12 kernel next tree, will observe the
following build errors. This is caused by the upstream patches
62c16f219a73 ("wifi: cfg80211: move DFS related members to links[] in
wireless_dev") and 81f67d60ebf2 ("wifi: cfg80211: handle DFS per link").
Need to change corresponding API here to avoid the build break.

/mwifiex/mlinux/moal_sta_cfg80211.c:435:34: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_chan_def *, u32,  int)’ {aka ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_chan_def *, unsigned int,  int)’} from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_chan_def *, u32)’ {aka ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_chan_def *, unsigned int)’} [-Werror=incompatible-pointer-types]
  435 |         .start_radar_detection = woal_cfg80211_start_radar_detection,
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mwifiex/mlinux/moal_sta_cfg80211.c:435:34: note: (near initialization for ‘woal_cfg80211_ops.start_radar_detection’)
/mwifiex/mlinux/moal_cfg80211.c: In function ‘woal_cancel_cac’:
/mwifiex/mlinux/moal_cfg80211.c:1096:17: error: too few arguments to function ‘cfg80211_cac_event’
 1096 |                 cfg80211_cac_event(priv->netdev, &priv->phandle->dfs_channel,
      |                 ^~~~~~~~~~~~~~~~~~
In file included from /mwifiex/mlinux/moal_main.h:136,
                 from /mwifiex/mlinux/moal_cfg80211.h:26,
                 from /mwifiex/mlinux/moal_cfg80211.c:23:
./include/net/cfg80211.h:8750:6: note: declared here
 8750 | void cfg80211_cac_event(struct net_device *netdev,
      |      ^~~~~~~~~~~~~~~~~~
/mwifiex/mlinux/moal_shim.c:3701:60: error: ‘struct wireless_dev’ has no member named ‘cac_start_time’
 3701 |                                                 (priv->wdev->cac_start_time +
      |                                                            ^~
/mwifiex/mlinux/moal_shim.c:3704:66: error: ‘struct wireless_dev’ has no member named ‘cac_time_ms’
 3704 |                                                                  ->cac_time_ms));
      |                                                                  ^~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-10-23 15:50:16 +08:00
Luke Wang
f45013f26a mxm_wifiex: fix build error for udelay
When build on 32-bit platform, error log shows:
ERROR: modpost: "__bad_udelay" [mwifiex/moal.ko] undefined!

32-bit platform udelay has 2000us limition. Split it as workaround.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-10-23 15:48:35 +08:00
Luke Wang
fd7dd188a1 mxm_wifiex: fix build error for 64-bit division
When build on 32-bit platform, error log shows:
ERROR: modpost: "__aeabi_uldivmod" [mwifiex/mlan.ko] undefined!
ERROR: modpost: "__aeabi_ldivmod" [mwifiex/mlan.ko] undefined!

32-bit platform need to use do_div() to support 64-bit division.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-10-23 15:48:35 +08:00
Luke Wang
ac1604083f mxm_wifiex: update to mxm6x18505.p1 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p142
PCIE-UART W8997 Firmware version 16.92.21.p137.3
SDIO-UART W8997 Firmware version 16.92.21.p137.3
SDIO-UART IW416 Firmware version 16.92.21.p142
SDIO_UART IW610 Firmware version 18.99.5.p35
SDIO_UART IW612 Firmware version 18.99.3.p21.4
SDIO-UART W8801 Firmware version 14.92.36.p194
SDIO-UART W9098 Firmware version 17.92.1.p149.50
PCIE-UART W9098 Firmware version 17.92.1.p149.50

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-10-23 15:48:35 +08:00
Luke Wang
e5c9a169d7 mxm_wifiex: update to mxm6x17437.p30 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p137.2
PCIE-UART W8997 Firmware version 16.92.21.p137.2
SDIO-UART W8997 Firmware version 16.92.21.p137.2
SDIO-UART IW416 Firmware version 16.92.21.p137.2
SDIO_UART IW612 Firmware version 18.99.3.p15.8
SDIO-UART W8801 Firmware version 14.92.36.p192
SDIO-UART W9098 Firmware version 17.92.1.p149.155
PCIE-UART W9098 Firmware version 17.92.1.p149.155

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-09-04 14:59:52 +08:00
Luke Wang
de2411c71c avoid WiFi cannot connect to AP after suspend resume
WCSWREL-621:
woal_sdio_suspend() may be called before complete cfg80211_disconnect(),
which causes WiFi cannot connect to AP after suspend resume.
Add delay to wait kernel complete cfg80211_disconnect() as a workaround.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-08-05 15:26:29 +08:00
Luke Wang
5fe38ed6c6 mxm_wifiex: update to mxm6x17437.p24 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p137
PCIE-UART W8997 Firmware version 16.92.21.p137.1
SDIO-UART W8997 Firmware version 16.92.21.p137.1
SDIO-UART IW416 Firmware version 16.92.21.p137
SDIO_UART IW612 Firmware version 18.99.3.p15
SDIO-UART W8801 Firmware version 14.92.36.p192
SDIO-UART W9098 Firmware version 17.92.1.p149.44
PCIE-UART W9098 Firmware version 17.92.1.p149.44

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-08-05 15:26:12 +08:00
Sherry Sun
88372772ba fix build warnings on L6.9 kernel tree
When build wifi driver based on L6.9 kernel next tree, will observe the
following three different type build warnings. Need to add the code
changes here to avoid the build warnings.

/mwifiex/mlan/mlan_11h.c:1676:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
 1676 | t_u8 static wlan_11h_check_dfs_channel(mlan_adapter *pmadapter)
      | ^~~~
  CC [M]  /mwifiex/mlan/mlan_uap_cmdevent.o
/mwifiex/mlan/mlan_11h.c:1712:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
 1712 | mlan_status static wlan_11h_disable_dfs(mlan_private *priv, t_void *pioctl_buf)
      | ^~~~~~~~~~~

/mwifiex/mlinux/moal_eth_ioctl.c: In function ‘parse_arguments’:
/mwifiex/mlinux/moal_eth_ioctl.c:159:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
  159 |                                         ;
      |                                         ^

/mwifiex/mlinux/moal_eth_ioctl.c: In function ‘woal_priv_hssetpara.isra’:
/mwifiex/mlinux/moal_eth_ioctl.c:5159:17: warning: ‘snprintf’ argument 6 may overlap destination object ‘respbuf’ [-Wrestrict]
 5159 |                 snprintf(respbuf, CMD_BUF_LEN, "%s%s%s", CMD_NXP,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5160 |                          PRIV_CMD_HSCFG,
      |                          ~~~~~~~~~~~~~~~
 5161 |                          respbuf + (strlen(CMD_NXP) +
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5162 |                                     strlen(PRIV_CMD_HSSETPARA)));
      |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mwifiex/mlinux/moal_eth_ioctl.c:5131:58: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
 5131 | static int woal_priv_hssetpara(moal_private *priv, t_u8 *respbuf,
      |                                                    ~~~~~~^~~~~~~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-06-03 12:40:39 +08:00
Sherry Sun
49fa879fe0 mxm_wifiex: update to mxm6x17437.p21 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p119.3
PCIE-UART W8997 Firmware version 16.92.21.p119.3
SDIO-UART W8997 Firmware version 16.92.21.p119.3
SDIO-UART IW416 Firmware version 16.92.21.p119.11
SDIO_UART IW612 Firmware version 18.99.3.p10.1
SDIO-UART W8801 Firmware version 14.92.36.p192
SDIO-UART W9098 Firmware version 17.92.1.p149.43
PCIE-UART W9098 Firmware version 17.92.1.p149.43

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-05-28 10:42:32 +08:00
Sherry Sun
1a4d2405e4 README: Add MXM Wi-Fi Driver in README file
Add MXM Wi-Fi Driver in README file to distingush with the upstream
mwifiex driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-03-20 23:21:58 +08:00
Luke Wang
24f51c2635 Update Makefile and README file
Update copyright date and correct path description due to folder layout
changes.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-05-08 17:53:43 +08:00
Luke Wang
37bd130583 Update README file
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-05-08 14:31:28 +08:00
Sherry Sun
33ae3cbc47 mxm_wifiex: fix woal_process_event_tx_status() and woal_uap_wacp_mode() build warnings
When build wifi driver based on L6.9 kernel next tree, will observe the
following build warnings. Need to add static to avoid the build
warnings.

/mwifiex/mlinux/moal_shim.c:2768:8: warning: no previous prototype for ‘woal_process_event_tx_status’ [-Wmissing-prototypes]
 2768 | t_void woal_process_event_tx_status(moal_private *priv,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mwifiex/mlinux/moal_uap.c:2560:5: warning: no previous prototype for ‘woal_uap_wacp_mode’ [-Wmissing-prototypes]
 2560 | int woal_uap_wacp_mode(struct net_device *dev, struct ifreq *req)
      |     ^~~~~~~~~~~~~~~~~~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-05-08 14:27:30 +08:00
Sherry Sun
acf8d2a710 Change the folder layout to make it more clear
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-05-08 14:21:28 +08:00
Luke Wang
949ea3ecca mxm_wifiex: update to mxm6x17437.p18 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p119.3
PCIE-UART W8997 Firmware version 16.92.21.p119.3
SDIO-UART W8997 Firmware version 16.92.21.p119.3
SDIO-UART IW416 Firmware version 16.92.21.p119.9
SDIO_UART IW612 Firmware version 18.99.3.p5.1
SDIO-UART W8801 Firmware version 14.92.36.p192
SDIO-UART W9098 Firmware version 17.92.1.p149.40
PCIE-UART W9098 Firmware version 17.92.1.p149.40

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
2024-05-08 14:21:20 +08:00
Sherry Sun
53bd8fd892 mxm_wifiex: fix L6.9 kernel next tree build errors
When building the wifi driver based on L6.9 kernel next tree, will
observe the following build errors.
These errors are caused by kernel patch 490a79faf95e("net: introduce
include/net/rps.h"), which moves RPS related structures and helpers from
include/linux/netdevice.h and include/net/sock.h to a new include file.
So needs to make corresponding changes in wifi driver to avoid the
build break.

/mxm_wifiex/wlan_src/mlinux/moal_main.c: In function 'woal_set_rps_map':
/mxm_wifiex/wlan_src/mlinux/moal_main.c:3744:43: error: implicit declaration of function 'RPS_MAP_SIZE'; did you mean 'XPS_MAP_SIZE'? [-Werror=implicit-function-declaration]
3744 |         map = kzalloc(max_t(unsigned int, RPS_MAP_SIZE(cpumask_weight(mask)),
......
/mxm_wifiex/wlan_src/mlinux/moal_main.c:3773:36: error: 'rps_needed' undeclared (first use in this function)
3773 |                 static_branch_inc(&rps_needed);

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-04-09 17:14:51 +08:00
Sherry Sun
cd09e87fb9 mxm_wifiex: fix L6.8 kernel next tree build errors -- cfg80211_ch_switch_notify
When building the wifi driver based on L6.8 kernel next tree, will
observe the following build errors.
These errors are caused by kernel patch b82730bf57b5("wifi:
cfg80211/mac80211: move puncturing into chandef"), which moves
puncturing into chandef and deletes the fourth parameter punct_bitmap of
function cfg80211_ch_switch_notify(), here change the code accordingly
to avoid the build break.

/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.c: In function ‘moal_recv_event’:
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.c:3911:25: error: too many arguments to function ‘cfg80211_ch_switch_notify’
 3911 |                         cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:130,
                 from /mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.c:28:
./include/net/cfg80211.h:8759:6: note: declared here
 8759 | void cfg80211_ch_switch_notify(struct net_device *dev,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c: In function ‘woal_cfg80211_notify_channel’:
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c:5175:17: error: too many arguments to function ‘cfg80211_ch_switch_notify’
 5175 |                 cfg80211_ch_switch_notify(priv->netdev, &chandef, 0, 0);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
...

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-03-01 14:29:19 +08:00
Sherry Sun
a84df58315 mxm_wifiex: fix wlan_cmd_mfg_otp_rw() build warnings
When build wifi driver based on L6.7 kernel next tree, will observe the
following build warning. Need to add static to avoid the build warning.

/mwifiex/mxm_wifiex/wlan_src/mlan/mlan_sta_cmd.c:523:13: warning: no previous prototype for ‘wlan_cmd_mfg_otp_rw’ [-Wmissing-prototypes]
  523 | mlan_status wlan_cmd_mfg_otp_rw(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
      |             ^~~~~~~~~~~~~~~~~~~
  CC [M]  /mwifiex/mxm_wifiex/wlan_src/mlinux/moal_eth_ioctl.o

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-01-18 17:37:49 +08:00
Sherry Sun
08c1478cb7 mxm_wifiex: update to mxm6x17437.p3 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p119.2
PCIE-UART W8997 Firmware version 16.92.21.p119.2
SDIO-UART W8997 Firmware version 16.92.21.p119.2
SDIO-UART IW416 Firmware version 16.92.21.p119.2
SDIO_UART IW612 Firmware version 18.99.2.p66.17
SDIO-UART W8801 Firmware version 14.92.36.p188
SDIO-UART W9098 Firmware version 17.92.1.p149.131
PCIE-UART W9098 Firmware version 17.92.1.p149.131

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2024-01-17 16:46:44 +08:00
Sherry Sun
0eeb07cb70 mxm_wifiex: update to mxm6x17437 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p119
PCIE-UART W8997 Firmware version 16.92.21.p119
SDIO-UART W8997 Firmware version 16.92.21.p119
SDIO-UART IW416 Firmware version 16.92.21.p119
SDIO_UART IW612 Firmware version 18.99.2.p66.12
SDIO-UART W8801 Firmware version 14.92.36.p188
SDIO-UART W9098 Firmware version 17.92.1.p149.128
PCIE-UART W9098 Firmware version 17.92.1.p149.128

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-12-12 11:26:12 +08:00
Sherry Sun
c3a62accda mxm_wifiex: fix L6.7 kernel next tree build warnings
When build wifi driver based on L6.7 kernel next tree, will observe the
following build warnings. Part of the root cause is some functions are
only called locally and should always have been static, otherwise will
trigger the no previous prototype warnings. Part of the root cause is
some global functions are not included before the definition, so add
them in the corresponding header files, which can make sure it been
called by others files correctly, otherwise also will trigger the no
previous prototype warnings.

  CC [M]  /mwifiex/mxm_wifiex/wlan_src/mlan/mlan_txrx.o
/mwifiex/mxm_wifiex/wlan_src/mlan/mlan_txrx.c:111:6: warning: no previous prototype for ‘wlan_drv_mcast_cycle_delay_calulation’ [-Wmissing-prototypes]
  111 | void wlan_drv_mcast_cycle_delay_calulation(pmlan_adapter pmadapter,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /mwifiex/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.o
/mwifiex/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.c:258:8: warning: no previous prototype for ‘wlan_flush_ext_cmd_pending_queue’ [-Wmissing-prototypes]
  258 | t_void wlan_flush_ext_cmd_pending_queue(pmlan_adapter pmadapter)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......

For the following defined but not used warning, remove the useless
woal_cancel_chanrpt_event() function.
  CC [M]  /mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.o
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c:2639:13: warning: ‘woal_cancel_chanrpt_event’ defined but not used [-Wunused-function]
 2639 | static void woal_cancel_chanrpt_event(moal_private *priv)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-12-10 14:42:38 +08:00
Sherry Sun
84aa9543bb mxm_wifiex: fix L6.7 kernel next tree build errors -- woal_cfg80211_set_beacon
When build wifi driver based on L6.7 kernel next tree, will observe the
following build errors.
These errors caused by kernel patch 66f85d57b710("wifi: cfg80211: modify
prototype for change_beacon") and bb55441c57cc(wifi: cfg80211: split
struct cfg80211_ap_settings), they modify the prototype for
change_beacon() in struct cfg80211_op to accept cfg80211_ap_update
instead of cfg80211_beacon_data so that it can process data in addition
to beacons.

CC [M]  /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.o
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:381:26: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_ap_update *)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_beacon_data *)’ [-Werror=incompatible-pointer-types]
  381 |         .change_beacon = woal_cfg80211_set_beacon,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:381:26: note: (near initialization for ‘woal_cfg80211_ops.change_beacon’)

Also fix the build error caused by kernel patch 8e4687f6061e(wifi:
mac80211: rename struct cfg80211_rx_assoc_resp to
cfg80211_rx_assoc_resp_data), it renames the struct
cfg80211_rx_assoc_resp to cfg80211_rx_assoc_resp_data to avoid name
conflict with a function named cfg80211_rx_assoc_resp(). So we need to
make the corresponding changes in wifi driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-12-10 14:42:38 +08:00
Sherry Sun
952d10f334 mxm_wifiex: update to mxm6x17423.p6 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p99.2
PCIE-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART IW416 Firmware version 16.92.21.p84.128
SDIO_UART IW612 Firmware version 18.99.2.p66.10
SDIO-UART W8801 Firmware version 14.92.36.p186
SDIO-UART W9098 Firmware version 17.92.1.p136.132
PCIE-UART W9098 Firmware version 17.92.1.p136.132

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-11-13 19:13:53 +08:00
Sherry Sun
983c0739ec mxm_wifiex: update to mxm6x17423.p1 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p99.2
PCIE-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART IW416 Firmware version 16.92.21.p84.128
SDIO_UART IW612 Firmware version 18.99.2.p66
SDIO-UART W8801 Firmware version 14.92.36.p186
SDIO-UART W9098 Firmware version 17.92.1.p136.131
PCIE-UART W9098 Firmware version 17.92.1.p136.131

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-10-07 11:16:22 +08:00
Sherry Sun
defde68632 mxm_wifiex: fix L6.1.55 kernel build break
When build wifi driver based on L6.1.55 kernel, will observe the
following build error.

| mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:10345:36: error: 'REGULATORY_IGNORE_STALE_KICKOFF' undeclared (first use in this function)
| 10345 |         wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF;
|       |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This error caused by kernel patch e8c2af660ba0("wifi: cfg80211: fix
regulatory disconnect with OCB/NAN") remove the
REGULATORY_IGNORE_STALE_KICKOFF flag.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-10-02 12:38:24 +08:00
Sherry Sun
0f0c33998c mxm_wifiex: fix L6.6 kernel next tree build errors
When build wifi driver based on L6.6 kernel next tree, will observe the
following build errors.
These errors caused by kernel patch 076fc8775daf("wifi: cfg80211: remove
wdev mutex"), it removes mtx from struct wireless_dev and uses wiphy
mutex instead.

CC [M]  /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.o
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.c: In function ‘woal_evt_work_queue’:
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.c:11361:47: error: ‘struct wireless_dev’ has no member named ‘mtx’
11361 |                         mutex_lock(&priv->wdev->mtx);
      |                                               ^~
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.c:11364:49: error: ‘struct wireless_dev’ has no member named ‘mtx’
11364 |                         mutex_unlock(&priv->wdev->mtx);
      |                                                 ^~
make[3]: *** [scripts/Makefile.build:243: /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.o] Error 1
make[2]: *** [/work/linux-upstream-next/Makefile:1913: /work/mwifiex/mxm_wifiex/wlan_src] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/work/linux-upstream-next'
make: *** [Makefile:598: default] Error 2

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-09-13 19:03:38 +08:00
Sherry Sun
26246bf60a mxm_wifiex: update to mxm6x17408.p2 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p99.2
PCIE-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART IW416 Firmware version 16.92.21.p84.3
SDIO_UART IW612 Firmware version 18.99.2.p19.15
SDIO-UART W8801 Firmware version 14.92.36.p182
SDIO-UART W9098 Firmware version 17.92.1.p136.131
PCIE-UART W9098 Firmware version 17.92.1.p136.131

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-08-26 15:35:06 +08:00
Sherry Sun
297d1ac172 mxm_wifiex: fix next-20230804 Linux Factory rebase build errors
When build wifi driver based on next-20230804 Linux code, will observe
the following build errors.

mlinux/moal_shim.c: In function ‘moal_recv_event’:
mlinux/moal_shim.c:3475:25: error: too few arguments to function ‘cfg80211_ch_switch_notify’
mlinux/moal_main.c: In function ‘woal_set_rps_map’:
mlinux/moal_main.c:3657:29: error: invalid use of undefined type ‘struct netdev_rx_queue’
 3657 |         if (!queue || !queue->dev) {
      |                             ^~
In file included from ./include/linux/rculist.h:11,
                 from ./include/linux/pid.h:5,
                 from ./include/linux/sched.h:14,
                 from ./arch/arm64/include/asm/compat.h:28,
                 from ./arch/arm64/include/asm/stat.h:13,
                 from ./include/linux/stat.h:6,
                 from ./include/linux/module.h:13,
                 from mlinux/moal_main.h:38,
                 from mlinux/moal_main.c:29:
mlinux/moal_main.c:3701:22: error: invalid use of undefined type ‘struct netdev_rx_queue’
 3701 |                 queue->rps_map, mutex_is_locked(&local_rps_map_mutex));
      |                      ^~
./include/linux/rcupdate.h:447:19: note: in definition of macro ‘__rcu_dereference_protected’
  447 |         ((typeof(*p) __force __kernel *)(p)); \
......

This is caused by kernel patch 49e47a5b6145("net: move struct
netdev_rx_queue out of netdevice.h"), now netdev_rx_queue has been
removed to a new header.

Note: The patch was introduced in L6.5 kernel next tree, but kernel
linus tree hasn't added, so maybe you need to keep this patch until
kernel linus tree add this patch and change the kerenl version
accordingly.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-08-24 14:39:16 +08:00
Sherry Sun
bcbbab1f66 mxm_wifiex: fix L6.5 kernel build errors
When build wifi driver based on L6.5 kernel, will observe the following
build errors.

/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:355:22: error:
initialization of ‘int (*)(struct wiphy *, struct net_device *,
const u8 *, int,  u8,  u8,  u16,  u32,  bool,  const u8 *, size_t)’ {aka
‘int (*)(struct wiphy *, struct net_device *, const unsigned char *,
int,  unsigned char,  unsigned char,  short unsigned int,  unsigned int,
_Bool,  const unsigned char *, long unsigned int)’} from incompatible
pointer type ‘int (*)(struct wiphy *, struct net_device *, const u8 *,
u8,  u8,  u16,  u32,  bool,  const u8 *, size_t)’ {aka ‘int (*)(struct
wiphy *, struct net_device *, const unsigned char *, unsigned char,
unsigned char,  short unsigned int,  unsigned int,  _Bool,  const
unsigned char *, long unsigned int)’} [-Werror=incompatible-pointer-types]
  355 |         .tdls_mgmt = woal_cfg80211_tdls_mgmt,
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:355:22: note: (near initialization for ‘woal_cfg80211_ops.tdls_mgmt’)
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c: In function ‘woal_register_cfg80211’:
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:10173:36: error: ‘REGULATORY_IGNORE_STALE_KICKOFF’ undeclared (first use in this function)
10173 |         wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF;
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:10173:36: note:
each undeclared identifier is reported only once for each function it
appears in cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.o] Error 1

These errors caused by kernel patch c6112046b1a9("wifi: cfg80211: make
TDLS management link-aware"), now tdls_mgmt() callback adds one link_id
function parameter.
And kernel patch e8c2af660ba0("wifi: cfg80211: fix regulatory disconnect
with OCB/NAN") remove the REGULATORY_IGNORE_STALE_KICKOFF flag.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-07-19 10:40:53 +08:00
Sherry Sun
19732f578f mxm_wifiex: update to mxm6x17408 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p99
PCIE-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART IW416 Firmware version 16.92.21.p84.3
SDIO_UART IW612 Firmware version 18.99.2.p19.6
SDIO-UART W8801 Firmware version 14.92.36.p182
SDIO-UART W9098 Firmware version 17.92.1.p136.128
PCIE-UART W9098 Firmware version 17.92.1.p136.129

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-07-15 14:41:14 +08:00
Sherry Sun
f1382ccbd3 mxm_wifiex: remove MODULE_DEVICE_TABLE to avoid wifi driver auto load
Load wifi driver need to use specific load parameters for differnet wifi
chips, so avoid wifi driver auto load, user can load the wifi driver
along with the specific load parameters.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-06-01 16:07:43 +08:00
Sherry Sun
e0bf3a1310 mxm_wifiex: update to mxm5x17391.p3 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p76.5
PCIE-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART W8997 Firmware version 16.92.21.p84.4
SDIO-UART IW416 Firmware version 16.92.21.p84.3
SDIO_UART IW612 Firmware version 18.99.1.p154.40
SDIO-UART W8801 Firmware version 14.92.36.p181
SDIO-UART W9098 Firmware version 17.92.1.p136.24
PCIE-UART W9098 Firmware version 17.92.1.p136.24

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-05-25 21:42:02 +08:00
Sherry Sun
a206d37a93 mxm_wifiex: fix mxm5x17391 release build error and warnings
Rename README_MLAN to README in Makefile, otherwise it will build break
becasue cannot find README_MLAN any more.

Also, fix the following build warnings on ARM32 and ARM64 platforms.
In file included from ./include/linux/kernel.h:29,
                 from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:37,
                 from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.h:26,
                 from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.c:23:
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.c: In function ‘woal_cfg80211_subcmd_rtt_range_request’:
./include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Wformat=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:429:25: note: in definition of macro ‘printk_index_wrap’
  429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:3167:25: note: in expansion of macro ‘printk’
 3167 |                         printk(KERN_ERR msg);                                  \
      |                         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro ‘KERN_SOH’
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:3167:32: note: in expansion of macro ‘KERN_ERR’
 3167 |                         printk(KERN_ERR msg);                                  \
      |                                ^~~~~~~~
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:3186:31: note: in expansion of macro ‘PRINTM_MERROR’
 3186 | #define PRINTM(level, msg...) PRINTM_##level(level, msg)
      |                               ^~~~~~~
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211_util.c:4351:17: note: in expansion of macro ‘PRINTM’
 4351 |                 PRINTM(MERROR, "%s: invalid %d(total) != %d(num) * %lu(each)\n",
      |                 ^~~~~~

/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_init.c: In function ‘parse_line_read_card_info’:
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_init.c:556:37: warning: the comparison will always evaluate as ‘true’ for the pointer operand in ‘p + 1’ must not be NULL [-Waddress]
  556 |         if ((p != NULL) && ((p + 1) != NULL)) {
      |                                     ^~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-04-19 14:56:22 +08:00
Sherry Sun
6bc61f660b mxm_wifiex: update to mxm5x17391 release
Corresponding firmware version:
SDIO-UART W8987 Firmware version 16.92.21.p76.5
PCIE-UART W8997 Firmware version 16.92.21.p84
SDIO-UART W8997 Firmware version 16.92.21.p84
SDIO-UART IW416 Firmware version 16.92.21.p84.1
SDIO_UART IW612 Firmware version 18.99.1.p154.40
SDIO-UART W8801 Firmware version 14.92.36.p180
SDIO-UART W9098 Firmware version 17.92.1.p136.24
PCIE-UART W9098 Firmware version 17.92.1.p136.24

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-04-18 12:54:05 +08:00
Sherry Sun
5ddbfb8039 mxm_wifiex: fix next-20230224 Linux Factory rebase build errors
When build wifi driver based on next-20230224 Linux code, will observe
the following build errors.

/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.c: In function ‘moal_recv_event’:
/work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.c:3475:25: error: too few arguments to function ‘cfg80211_ch_switch_notify’
 3475 |                         cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_main.h:123,
                 from /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.c:28:
./include/net/cfg80211.h:8375:6: note: declared here
 8375 | void cfg80211_ch_switch_notify(struct net_device *dev,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:252: /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_shim.o] Error 1
make[1]: *** [Makefile:2028: /work/mwifiex/mxm_wifiex/wlan_src] Error 2
make[1]: Leaving directory '/work/linux-nxp-rebase'

This is caused by kernel patch b345f0637c00("wifi: cfg80211: include
puncturing bitmap in channel switch events"), now
cfg80211_ch_switch_notify() needs four parameters.

Note: The patch was introduced in L6.2 kernel next tree, but in L6.3
kernel linus tree, so maybe you need to change the kernel version to
L6.3 after we rebase the linux-nxp-rebase to L6.3.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-03-10 11:38:03 +08:00
Sherry Sun
f965f1f2cf mxm_wifiex: fix next-20230119 Linux Factory rebase build errors
When build wifi driver based on next-20230119 Linux code, will observe
the following build errors.
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_eth_ioctl.c: In function ‘woal_priv_get_ap’:
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_eth_ioctl.c:5968:39: error: invalid application of ‘sizeof’ to incomplete type ‘char[]’
 5968 |                                 sizeof(mwr->u.ap_addr.sa_data));
      |                                       ^
make[2]: *** [scripts/Makefile.build:252: /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_eth_ioctl.o] Error 1
make[1]: *** [Makefile:2027: /work/mwifiex/mxm_wifiex/wlan_src] Error 2
make[1]: Leaving directory '/work/linux-nxp-rebase'

This is caused by kernel patch b5f0de6df6dc("net: dev: Convert sa_data
to flexible array in struct sockaddr"), now anything using
sizeof(sa->sa_data) must switch to sizeof(sa->sa_data_min).

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-02-09 12:34:24 +08:00
Sherry Sun
98e5b28b1a mxm_wifiex: move SCR.txt to root folder and rename LICENSE file
SCR.txt and LICENSE files should be in root folder, also need to rename
the gpl-2.0.txt file to work better with GitHub.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-02-01 17:42:00 +08:00
Sherry Sun
371f75d252 mxm_wifiex: update to mxm5x17368.p2 release
Driver Bug Fixes:
-----------------
1. WSW-23826: DUT is not waking up on Boadcast Event
2. WSW-22873: Random Kernel crash is seen in STAUT RSNE bounds verification using WPA2-Enterprise test
3. WCSWREL-400: Fixed kernel panic during FW reload
4. WSFD-599: Support trigger frame generating in RF test mode
5. WSW-23330: Auto Go can't bring up after auto Fw reload
6. WSW-23920: DUT fails to send NA packet in response NS packet during ipv6 NSoffload when host sleep is enabled
7. WSW-23938: Wi-Fi stuck after cmd53 read error=-84
8. WSW-22765: Fixed the issue of WPA2-Enterprise STA test fails
9. WSW-24932: Random Wifi hang Issue with error wakeup card timeout is observed during coex scenario

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2023-01-31 11:02:59 +08:00
Sherry Sun
9bbd4d8c52 mxm_wifiex: update to mxm5x17368 release
Driver Bug Fixes:
-----------------
1. WCSWREL-357: WiFi crash when enable Android Global CFI configuration
2. WSW-23818: DUT setup DFS channel failed
3. WSW-20079: Tx RvR and TP Improvement
4. WSW-23330: Fix P2P-GO start failure post auto recovery
5. WSW-22914: Fixed WiFiHAL can't print hotfix release version

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-12-20 15:45:49 +08:00
Sherry Sun
d819b6d266 mxm_wifiex: update to mxm5x17366.p5 release
Driver Bug Fixes:
-----------------
1. WCSWREL-386: wifi cannot re-connect to AP automatically after resume back

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-11-14 09:08:04 +08:00
Sherry Sun
4eb4876654 mxm_wifiex: fix the 17366.p3 version wifi driver build errors on L6.x kernel
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-11-11 16:00:18 +08:00
Sherry Sun
2a2b814866 mxm_wifiex: update to mxm5x17366.p3 release
Driver Bug Fixes:
-----------------
1. WSW-22601: kernel warning are seen on STAUT when Channel switch command is executed on Ex-AP
2. WSW-22845: hotspot start fail in function test from Android GUI
3. WSW-22456: APUT is not sending ECSA Action frames when channel_switch command is executed with ECSA Action frame enabled
4. WCSWREL-372: Kernel difference between Linux 5.15 and Android 13 cause Wi-Fi driver compilation failure
5. WSW-17873: Remove big endian flag from makefile
6. WSW-22457: APUT is not switching to new channel when channel_switch command is executed in 2.4 GHz
7. WSW-22313: 0xa9 cmd timeout on fw reload
8. WCSWREL-375: merge the fix patch for the build errors with the API changes on next-20220912 kernel tag
9. WSW-22361: Change the state of Timer function in mxmdriver
10. WSW-22207: Kernel Panic when run timeout IR stress on iMX8 Platform
11. WSFD-559: Support Wi-fi Auto Recovery in Linux driver

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-11-11 15:57:21 +08:00
Sherry Sun
f0c4bdf134 mxm_wifiex: enable IW612 in mwifiex wifi driver
Enable IW612 device in mwifiex wifi driver instead the standalone IW612
wifi driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-11-04 18:58:07 +08:00
Sherry Sun
72ddfc7550 mxm_wifiex: use get_random_u32() when possible
The prandom_u32() function has been a deprecated inline wrapper around
get_random_u32() for several releases now, and compiles down to the
exact same code. Replace the deprecated wrapper with a direct call to
the real function.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-10-27 12:40:18 +08:00
Sherry Sun
5a38226a47 mxm_wifiex: update to mxm5x17362 release
Driver Bug Fixes:
-----------------
1. WSW-19892: Driver compilation errors on older kernel version
2. WSW-19638: Enable RF Test Mode support for 9098 PCIE and SDIO
3. WCSWREL-370: oob irq request fail on i.MX93 9x9 qsb board
4. WSW-21756: WLAN Driver hang observed during WiFi connect/disconnect
5. WCSWREL-362: merge the L6.0.0 build errors fix patches
6. WSW-22054: STA CSA event is not propagated to cfg80211
7. WSW-21873: STA does not send probes after switching from DFS channel
8. WSW-21530: UDP Tx not able to send ARP when high bandwidth is used
9. WSW-21541: WFA Pre-Cert Channel switch test is failing
10. WSW-21072: AP stops sending CTS-to-Self in mcast Tx after issue mc_aggr_cfg

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-10-10 15:32:56 +08:00
Sherry Sun
65ddf89682 mxm_wifiex: fix the build errors with the API changes on next-20220930 kernel tag
b48b89f9c189 ("net: drop the weight argument from netif_napi_add") patch
in upstream kernel change the netif_napi_add API, so corresponding
functions used in wifi driver also need to be changed to avoid build
break. Now this API change is based on the next-20220930 kernel tag.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-10-10 15:25:57 +08:00
Sherry Sun
d88bd98445 mxm_wifiex: fix the build errors with the API changes on next-20220912 kernel tag
Kernel cfg80211 add link_id parameter to various key operations for
MLO, for more details, please check the following link:
https://lore.kernel.org/all/20220730052643.1959111-4-quic_vjakkam@quicinc.com/

As these API changes on next-20220912 kernel tag, corresponding
functions also need to be changed to avoid build break.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-09-26 12:03:35 +08:00
Sherry Sun
fb098b07fc mxm_wifiex: fix oob irq request fail on i.MX93 9x9 qsb board
i.MX93 9x9 qsb board connect the out-of-band WoWLAN irq pin(M.2 pin21
SDIO_WAKE) to I2C IO expander pcal6524 instead of i.MX GPIO, pcal6524
IRQ handlers need to be threaded, and the IRQ trigger type depends on
the devicetree setting. Also the IRQF_ONESHOT flag need to be set for
threaded IRQ.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
2022-09-14 18:26:15 +08:00
Sherry Sun
a036032a76 mxm_wifiex: update to mxm5x17344.p3 release
Driver Bug Fixes:
-----------------
1. LF-6972: Updated the License to GPL-2.0
2. Incremented the driver version

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
2022-08-31 13:08:31 +08:00