[openwrt/openwrt] mwlwifi: update to version 10.4.11-20250206

LEDE Commits lede-commits at lists.infradead.org
Wed Feb 19 00:55:32 PST 2025


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/edfe58981193a424dfb2e636d7b97a88fff06743

commit edfe58981193a424dfb2e636d7b97a88fff06743
Author: Michael Trinidad <trinidude4 at hotmail.com>
AuthorDate: Sun Feb 16 18:44:03 2025 -0500

    mwlwifi: update to version 10.4.11-20250206
    
    The fixes are only for the WRT1900X and WRT1200AC.
    
    It contains:
    
    Deletes the driver's ability to modify the debit table.
    Remove skb_get(done_skb) in txdone
    Reworking ISR
    clean code
    Napi replaces tasklet
    Add rx_decrypt feature
    
    Signed-off-by: Michael Trinidad <trinidude4 at hotmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17997
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/kernel/mwlwifi/Makefile                    |  8 +--
 ...dump-memcpy-in-mwl_fwcmd_get_fw_core_dump.patch |  2 +-
 ...y-use-PTR_ERR-in-pcie_bf_mimo_ctrl_decode.patch |  2 +-
 .../003-Use-zu-and-zd-for-ssize_t-and-size_t.patch |  2 +-
 ...fix-PCIe-DT-node-null-pointer-dereference.patch | 31 --------
 .../mwlwifi/patches/020-mac80211_update.patch      | 82 +++++++++++-----------
 6 files changed, 48 insertions(+), 79 deletions(-)

diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index 3f2d5e0949..07c3acc5f9 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwlwifi
-PKG_RELEASE=2
+PKG_RELEASE=1
 
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-04-19
-PKG_SOURCE_VERSION:=a737d348ef4fe00434b2bc44b2b6a68ea833d95b
-PKG_MIRROR_HASH:=d55f69c2fa48d02ba535b72b108fc77f5f13a52b29130a631489a053f1670d2c
+PKG_SOURCE_DATE:=2025-02-06
+PKG_SOURCE_VERSION:=db97edf20fadea2617805006f5230665fadc6a8c
+PKG_MIRROR_HASH:=b5464cf6d57d87f6ce5f13bd2320c7e7e671a3152a74f4ef004382f898b89ecf
 
 PKG_MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
 PKG_BUILD_PARALLEL:=1
diff --git a/package/kernel/mwlwifi/patches/001-Simplify-coredump-memcpy-in-mwl_fwcmd_get_fw_core_dump.patch b/package/kernel/mwlwifi/patches/001-Simplify-coredump-memcpy-in-mwl_fwcmd_get_fw_core_dump.patch
index 4b0feeb17e..20e1cce382 100644
--- a/package/kernel/mwlwifi/patches/001-Simplify-coredump-memcpy-in-mwl_fwcmd_get_fw_core_dump.patch
+++ b/package/kernel/mwlwifi/patches/001-Simplify-coredump-memcpy-in-mwl_fwcmd_get_fw_core_dump.patch
@@ -20,7 +20,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/hif/fwcmd.c
 +++ b/hif/fwcmd.c
-@@ -3622,11 +3622,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ie
+@@ -3624,11 +3624,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ie
  	core_dump->context = pcmd->cmd_data.coredump.context;
  	core_dump->size_kb = pcmd->cmd_data.coredump.size_kb;
  	core_dump->flags = pcmd->cmd_data.coredump.flags;
diff --git a/package/kernel/mwlwifi/patches/002-Correctly-use-PTR_ERR-in-pcie_bf_mimo_ctrl_decode.patch b/package/kernel/mwlwifi/patches/002-Correctly-use-PTR_ERR-in-pcie_bf_mimo_ctrl_decode.patch
index f204e9fe73..f6c398cf66 100644
--- a/package/kernel/mwlwifi/patches/002-Correctly-use-PTR_ERR-in-pcie_bf_mimo_ctrl_decode.patch
+++ b/package/kernel/mwlwifi/patches/002-Correctly-use-PTR_ERR-in-pcie_bf_mimo_ctrl_decode.patch
@@ -19,7 +19,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/hif/pcie/pcie.c
 +++ b/hif/pcie/pcie.c
-@@ -1466,8 +1466,8 @@ static void pcie_bf_mimo_ctrl_decode(str
+@@ -1449,8 +1449,8 @@ static void pcie_bf_mimo_ctrl_decode(str
  			       &fp_data->f_pos);
  		filp_close(fp_data, current->files);
  	} else {
diff --git a/package/kernel/mwlwifi/patches/003-Use-zu-and-zd-for-ssize_t-and-size_t.patch b/package/kernel/mwlwifi/patches/003-Use-zu-and-zd-for-ssize_t-and-size_t.patch
index d615e13380..816fb222c0 100644
--- a/package/kernel/mwlwifi/patches/003-Use-zu-and-zd-for-ssize_t-and-size_t.patch
+++ b/package/kernel/mwlwifi/patches/003-Use-zu-and-zd-for-ssize_t-and-size_t.patch
@@ -14,7 +14,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/debugfs.c
 +++ b/debugfs.c
-@@ -1342,7 +1342,7 @@ done:
+@@ -1394,7 +1394,7 @@ done:
  				 priv->reg_value);
  	else
  		len += scnprintf(p + len, size - len,
diff --git a/package/kernel/mwlwifi/patches/010-mwlwifi-fix-PCIe-DT-node-null-pointer-dereference.patch b/package/kernel/mwlwifi/patches/010-mwlwifi-fix-PCIe-DT-node-null-pointer-dereference.patch
deleted file mode 100644
index f37d2f8171..0000000000
--- a/package/kernel/mwlwifi/patches/010-mwlwifi-fix-PCIe-DT-node-null-pointer-dereference.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 8e809b241695252e397bf0d7fc5f36e115c38831 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robert.marko at sartura.hr>
-Date: Fri, 5 Mar 2021 11:47:59 +0100
-Subject: [PATCH] mwlwifi: fix PCIe DT node null pointer dereference
-
-pci_bus_to_OF_node() used to get the PCI bus DT node
-returns node if found or NULL if none is found.
-
-Since the return of pci_bus_to_OF_node() is not checked in
-the DT node name print it will cause a null pointer
-dereference and crash the kernel.
-
-So first check whether the node is not NULL and then print.
-
-Signed-off-by: Robert Marko <robert.marko at sartura.hr>
----
- hif/pcie/pcie.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/hif/pcie/pcie.c
-+++ b/hif/pcie/pcie.c
-@@ -685,7 +685,8 @@ static struct device_node *pcie_get_devi
- 	struct device_node *dev_node;
- 
- 	dev_node = pci_bus_to_OF_node(pcie_priv->pdev->bus);
--	wiphy_info(priv->hw->wiphy, "device node: %s\n", dev_node->full_name);
-+	if (dev_node)
-+		wiphy_info(priv->hw->wiphy, "device node: %s\n", dev_node->full_name);
- 
- 	return dev_node;
- }
diff --git a/package/kernel/mwlwifi/patches/020-mac80211_update.patch b/package/kernel/mwlwifi/patches/020-mac80211_update.patch
index 1c5d581939..1d4afabb51 100644
--- a/package/kernel/mwlwifi/patches/020-mac80211_update.patch
+++ b/package/kernel/mwlwifi/patches/020-mac80211_update.patch
@@ -13,7 +13,7 @@
  
 --- a/debugfs.c
 +++ b/debugfs.c
-@@ -498,9 +498,9 @@ static ssize_t mwl_debugfs_vif_read(stru
+@@ -550,9 +550,9 @@ static ssize_t mwl_debugfs_vif_read(stru
  		switch (vif->type) {
  		case NL80211_IFTYPE_AP:
  			len += scnprintf(p + len, size - len, "type: ap\n");
@@ -26,7 +26,7 @@
  			len += scnprintf(p + len, size - len,
  					 "ssid: %s\n", ssid);
  			len += scnprintf(p + len, size - len,
-@@ -522,8 +522,8 @@ static ssize_t mwl_debugfs_vif_read(stru
+@@ -574,8 +574,8 @@ static ssize_t mwl_debugfs_vif_read(stru
  					 "type: unknown\n");
  			break;
  		}
@@ -37,7 +37,7 @@
  			len += scnprintf(p + len, size - len,
  					 "channel: %d: width: %d\n",
  					 chan_def->chan->hw_value,
-@@ -596,18 +596,18 @@ static ssize_t mwl_debugfs_sta_read(stru
+@@ -648,18 +648,18 @@ static ssize_t mwl_debugfs_sta_read(stru
  			sta_info->wds ? "true" : "false",
  			sta_info->ba_hist.enable ? "enable" : "disable",
  			sta_info->is_amsdu_allowed ? sta_info->amsdu_ctrl.cap : 0 ,
@@ -68,7 +68,7 @@
  			sta->tdls,
  			sta->tdls_initiator,
  			sta->wme,
-@@ -1158,7 +1158,7 @@ static ssize_t mwl_debugfs_dfs_radar_wri
+@@ -1210,7 +1210,7 @@ static ssize_t mwl_debugfs_dfs_radar_wri
  	struct mwl_priv *priv = (struct mwl_priv *)file->private_data;
  
  	wiphy_info(priv->hw->wiphy, "simulate radar detected\n");
@@ -127,7 +127,7 @@
  			a_band = true;
  		else
  			return -EINVAL;
-@@ -2090,7 +2094,7 @@ int mwl_fwcmd_set_beacon(struct ieee8021
+@@ -2092,7 +2096,7 @@ int mwl_fwcmd_set_beacon(struct ieee8021
  	if (mwl_fwcmd_set_wsc_ie(hw, b_inf->ie_wsc_len, b_inf->ie_wsc_ptr))
  		goto err;
  
@@ -136,7 +136,7 @@
  		goto err;
  
  	if (b_inf->cap_info & WLAN_CAPABILITY_SPECTRUM_MGMT)
-@@ -2152,38 +2156,38 @@ int mwl_fwcmd_set_new_stn_add(struct iee
+@@ -2154,38 +2158,38 @@ int mwl_fwcmd_set_new_stn_add(struct iee
  	ether_addr_copy(pcmd->mac_addr, sta->addr);
  
  	if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
@@ -189,7 +189,7 @@
  	}
  
  	pcmd->is_qos_sta = sta->wme;
-@@ -2239,38 +2243,38 @@ int mwl_fwcmd_set_new_stn_add_sc4(struct
+@@ -2241,38 +2245,38 @@ int mwl_fwcmd_set_new_stn_add_sc4(struct
  	ether_addr_copy(pcmd->mac_addr, sta->addr);
  
  	if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
@@ -242,7 +242,7 @@
  	}
  
  	pcmd->is_qos_sta = sta->wme;
-@@ -2787,9 +2791,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
+@@ -2789,9 +2793,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
  	pcmd->ba_info.create_params.flags = cpu_to_le32(ba_flags);
  	pcmd->ba_info.create_params.queue_id = stream->idx;
  	pcmd->ba_info.create_params.param_info =
@@ -254,7 +254,7 @@
  		 IEEE80211_HT_AMPDU_PARM_DENSITY);
  	if (direction == BA_FLAG_DIRECTION_UP) {
  		pcmd->ba_info.create_params.reset_seq_no = 0;
-@@ -2799,9 +2803,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
+@@ -2801,9 +2805,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
  		pcmd->ba_info.create_params.current_seq = cpu_to_le16(0);
  	}
  	if (priv->chip_type == MWL8964 &&
@@ -268,16 +268,16 @@
  	}
 --- a/hif/pcie/8864/tx.c
 +++ b/hif/pcie/8864/tx.c
-@@ -490,7 +490,7 @@ static void pcie_non_pfu_tx_done(struct
- 				} else
- 					memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
- 				skb_pull(done_skb, sizeof(*dma_data) - hdrlen);
--				ieee80211_tx_status(priv->hw, done_skb);
-+				ieee80211_tx_status_skb(priv->hw, done_skb);
- 				dev_kfree_skb_any(done_skb);
- 				done_skb = NULL;
- 			}
-@@ -743,7 +743,7 @@ void pcie_8864_tx_xmit(struct ieee80211_
+@@ -478,7 +478,7 @@ static void pcie_non_pfu_tx_done(struct
+ 			} else
+ 				memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
+ 			skb_pull(done_skb, sizeof(*dma_data) - hdrlen);
+-			ieee80211_tx_status(priv->hw, done_skb);
++			ieee80211_tx_status_skb(priv->hw, done_skb);
+ next:
+ 			tx_hndl = tx_hndl->pnext;
+ 			tx_desc = tx_hndl->pdesc;
+@@ -730,7 +730,7 @@ void pcie_8864_tx_xmit(struct ieee80211_
  	index = SYSADPT_TX_WMM_QUEUES - index - 1;
  	txpriority = index;
  
@@ -286,7 +286,7 @@
  	  !(xmitcontrol & EAGLE_TXD_XMITCTRL_USE_MC_RATE) &&
  	    ieee80211_is_data_qos(wh->frame_control)) {
  		tid = qos & 0xf;
-@@ -925,4 +925,4 @@ void pcie_8864_tx_del_sta_amsdu_pkts(str
+@@ -912,4 +912,4 @@ void pcie_8864_tx_del_sta_amsdu_pkts(str
  		}
  	}
  	spin_unlock_bh(&sta_info->amsdu_lock);
@@ -313,7 +313,7 @@
  
  bypass_ack:
  		if (++tx_done_tail >= MAX_TX_RING_DONE_SIZE)
-@@ -596,13 +596,13 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
+@@ -593,13 +593,13 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
  			ack_skb = skb_copy(skb, GFP_ATOMIC);
  			ack_info = IEEE80211_SKB_CB(ack_skb);
  			pcie_tx_prepare_info(priv, 0, ack_info);
@@ -340,16 +340,16 @@
  		   pcie_priv->txbd_ring_size);
  
  	for (num = 0; num < PCIE_MAX_TXRX_BD; num++) {
-@@ -444,7 +444,7 @@ static void pcie_pfu_tx_done(struct mwl_
- 				} else
- 					memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
- 				skb_pull(done_skb, sizeof(*pfu_dma) - hdrlen);
--				ieee80211_tx_status(priv->hw, done_skb);
-+				ieee80211_tx_status_skb(priv->hw, done_skb);
- 			}
+@@ -431,7 +431,7 @@ static void pcie_pfu_tx_done(struct mwl_
+ 			} else
+ 				memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
+ 			skb_pull(done_skb, sizeof(*pfu_dma) - hdrlen);
+-			ieee80211_tx_status(priv->hw, done_skb);
++			ieee80211_tx_status_skb(priv->hw, done_skb);
  		}
  next:
-@@ -694,7 +694,7 @@ void pcie_8997_tx_xmit(struct ieee80211_
+ 		memset(data_buf, 0, sizeof(*data_buf));
+@@ -682,7 +682,7 @@ void pcie_8997_tx_xmit(struct ieee80211_
  	index = SYSADPT_TX_WMM_QUEUES - index - 1;
  	txpriority = index;
  
@@ -358,7 +358,7 @@
  	  !(xmitcontrol & EAGLE_TXD_XMITCTRL_USE_MC_RATE) &&
  	    ieee80211_is_data_qos(wh->frame_control)) {
  		tid = qos & 0xf;
-@@ -875,4 +875,4 @@ void pcie_8997_tx_del_sta_amsdu_pkts(str
+@@ -863,4 +863,4 @@ void pcie_8997_tx_del_sta_amsdu_pkts(str
  		}
  	}
  	spin_unlock_bh(&sta_info->amsdu_lock);
@@ -376,7 +376,7 @@
  {
  	mwl_fwcmd_radio_disable(hw);
  
-@@ -368,15 +368,15 @@ static void mwl_mac80211_bss_info_change
+@@ -390,15 +390,15 @@ static void mwl_mac80211_bss_info_change
  		}
  	}
  
@@ -395,7 +395,7 @@
  {
  	struct mwl_priv *priv = hw->priv;
  	struct mwl_vif *mwl_vif;
-@@ -426,8 +426,8 @@ static void mwl_mac80211_bss_info_change
+@@ -448,8 +448,8 @@ static void mwl_mac80211_bss_info_change
  	if (changed & (BSS_CHANGED_BEACON_INT | BSS_CHANGED_BEACON)) {
  		struct sk_buff *skb;
  
@@ -406,7 +406,7 @@
  		    (!info->hidden_ssid)) {
  			if (mwl_vif->broadcast_ssid != true) {
  				mwl_fwcmd_broadcast_ssid_enable(hw, vif, true);
-@@ -441,7 +441,7 @@ static void mwl_mac80211_bss_info_change
+@@ -463,7 +463,7 @@ static void mwl_mac80211_bss_info_change
  		}
  
  		if (!mwl_vif->set_beacon) {
@@ -415,7 +415,7 @@
  
  			if (skb) {
  				mwl_fwcmd_set_beacon(hw, vif, skb->data, skb->len);
-@@ -458,7 +458,7 @@ static void mwl_mac80211_bss_info_change
+@@ -480,7 +480,7 @@ static void mwl_mac80211_bss_info_change
  static void mwl_mac80211_bss_info_changed(struct ieee80211_hw *hw,
  					  struct ieee80211_vif *vif,
  					  struct ieee80211_bss_conf *info,
@@ -424,7 +424,7 @@
  {
  	switch (vif->type) {
  	case NL80211_IFTYPE_AP:
-@@ -583,10 +583,10 @@ static int mwl_mac80211_sta_add(struct i
+@@ -605,10 +605,10 @@ static int mwl_mac80211_sta_add(struct i
  	if (vif->type == NL80211_IFTYPE_MESH_POINT)
  		sta_info->is_mesh_node = true;
  
@@ -437,7 +437,7 @@
  			sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_8K;
  			sta_info->amsdu_ctrl.amsdu_allow_size = SYSADPT_AMSDU_8K_MAX_SIZE;
  		}
-@@ -670,7 +670,7 @@ static int mwl_mac80211_sta_remove(struc
+@@ -692,7 +692,7 @@ static int mwl_mac80211_sta_remove(struc
  
  static int mwl_mac80211_conf_tx(struct ieee80211_hw *hw,
  				struct ieee80211_vif *vif,
@@ -446,7 +446,7 @@
  				const struct ieee80211_tx_queue_params *params)
  {
  	struct mwl_priv *priv = hw->priv;
-@@ -934,4 +934,9 @@ const struct ieee80211_ops mwl_mac80211_
+@@ -956,4 +956,9 @@ const struct ieee80211_ops mwl_mac80211_
  	.pre_channel_switch = mwl_mac80211_chnl_switch,
  	.sw_scan_start      = mwl_mac80211_sw_scan_start,
  	.sw_scan_complete   = mwl_mac80211_sw_scan_complete,
@@ -502,7 +502,7 @@
  	case TX_RATE_FORMAT_LEGACY:
 --- a/hif/pcie/pcie.c
 +++ b/hif/pcie/pcie.c
-@@ -546,7 +546,7 @@ static irqreturn_t pcie_isr_8864(struct
+@@ -533,7 +533,7 @@ static irqreturn_t pcie_isr_8864(struct
  
  		if (int_status & MACREG_A2HRIC_BIT_RADAR_DETECT) {
  			wiphy_info(hw->wiphy, "radar detected by firmware\n");
@@ -510,8 +510,8 @@
 +			ieee80211_radar_detected(hw, NULL);
  		}
  
- 		if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH) ieee80211_queue_work(hw, &priv->chnl_switch_handle);
-@@ -593,7 +593,7 @@ static irqreturn_t pcie_isr_8997(struct
+ 		if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH)
+@@ -575,7 +575,7 @@ static irqreturn_t pcie_isr_8997(struct
  
  		if (int_status & MACREG_A2HRIC_BIT_RADAR_DETECT) {
  			wiphy_info(hw->wiphy, "radar detected by firmware\n");
@@ -520,7 +520,7 @@
  		}
  
  		if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH)
-@@ -1071,7 +1071,7 @@ static irqreturn_t pcie_isr_ndp(struct i
+@@ -1053,7 +1053,7 @@ static irqreturn_t pcie_isr_ndp(struct i
  
  		if (int_status & MACREG_A2HRIC_NEWDP_DFS) {
  			wiphy_info(hw->wiphy, "radar detected by firmware\n");




More information about the lede-commits mailing list