]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/6.6.26/wifi-iwlwifi-disable-multi-rx-queue-for-9000.patch
Linux 6.6.26
[thirdparty/kernel/stable-queue.git] / releases / 6.6.26 / wifi-iwlwifi-disable-multi-rx-queue-for-9000.patch
CommitLineData
ffc1c2fe
SL
1From 4a8f79988f9ef2452a139c0cdb6bb447d30e602a Mon Sep 17 00:00:00 2001
2From: Sasha Levin <sashal@kernel.org>
3Date: Tue, 17 Oct 2023 12:16:46 +0300
4Subject: wifi: iwlwifi: disable multi rx queue for 9000
5
6From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
7
8[ Upstream commit 29fa9a984b6d1075020f12071a89897fd62ed27f ]
9
10Multi rx queue allows to spread the load of the Rx streams on different
11CPUs. 9000 series required complex synchronization mechanisms from the
12driver side since the hardware / firmware is not able to provide
13information about duplicate packets and timeouts inside the reordering
14buffer.
15
16Users have complained that for newer devices, all those synchronization
17mechanisms have caused spurious packet drops. Those packet drops
18disappeared if we simplify the code, but unfortunately, we can't have
19RSS enabled on 9000 series without this complex code.
20
21Remove support for RSS on 9000 so that we can make the code much simpler
22for newer devices and fix the bugs for them.
23
24The down side of this patch is a that all the Rx path will be routed to
25a single CPU, but this has never been an issue, the modern CPUs are just
26fast enough to cope with all the traffic.
27
28Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
29Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
30Link: https://lore.kernel.org/r/20231017115047.2917eb8b7af9.Iddd7dcf335387ba46fcbbb6067ef4ff9cd3755a7@changeid
31Signed-off-by: Johannes Berg <johannes.berg@intel.com>
32Stable-dep-of: e78d78773089 ("wifi: iwlwifi: mvm: include link ID when releasing frames")
33Signed-off-by: Sasha Levin <sashal@kernel.org>
34---
35 drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 +-
36 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 +++-
37 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 11 ++++++++++-
38 3 files changed, 14 insertions(+), 3 deletions(-)
39
40diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
41index 168eda2132fb8..9dcc1506bd0b0 100644
42--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
43+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
44@@ -278,7 +278,7 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
45 #define IWL_MGMT_TID 15
46 #define IWL_FRAME_LIMIT 64
47 #define IWL_MAX_RX_HW_QUEUES 16
48-#define IWL_9000_MAX_RX_HW_QUEUES 6
49+#define IWL_9000_MAX_RX_HW_QUEUES 1
50
51 /**
52 * enum iwl_wowlan_status - WoWLAN image/device status
53diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
54index aaa9840d0d4c5..ee9d14250a261 100644
55--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
56+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
57@@ -352,7 +352,9 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
58 ieee80211_hw_set(hw, HAS_RATE_CONTROL);
59 }
60
61- if (iwl_mvm_has_new_rx_api(mvm))
62+ /* We want to use the mac80211's reorder buffer for 9000 */
63+ if (iwl_mvm_has_new_rx_api(mvm) &&
64+ mvm->trans->trans_cfg->device_family > IWL_DEVICE_FAMILY_9000)
65 ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
66
67 if (fw_has_capa(&mvm->fw->ucode_capa,
68diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
69index bac0228b8c866..92b3e18dbe877 100644
70--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
71+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
72@@ -963,6 +963,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
73 baid = (reorder & IWL_RX_MPDU_REORDER_BAID_MASK) >>
74 IWL_RX_MPDU_REORDER_BAID_SHIFT;
75
76+ if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000)
77+ return false;
78+
79 /*
80 * This also covers the case of receiving a Block Ack Request
81 * outside a BA session; we'll pass it to mac80211 and that
82@@ -2621,9 +2624,15 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
83
84 if (!iwl_mvm_reorder(mvm, napi, queue, sta, skb, desc) &&
85 likely(!iwl_mvm_time_sync_frame(mvm, skb, hdr->addr2)) &&
86- likely(!iwl_mvm_mei_filter_scan(mvm, skb)))
87+ likely(!iwl_mvm_mei_filter_scan(mvm, skb))) {
88+ if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
89+ (desc->mac_flags2 & IWL_RX_MPDU_MFLG2_AMSDU) &&
90+ !(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME))
91+ rx_status->flag |= RX_FLAG_AMSDU_MORE;
92+
93 iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta,
94 link_sta);
95+ }
96 out:
97 rcu_read_unlock();
98 }
99--
1002.43.0
101