]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: iwlwifi: disable multi rx queue for 9000
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 17 Oct 2023 09:16:46 +0000 (12:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:35:41 +0000 (16:35 +0200)
[ Upstream commit 29fa9a984b6d1075020f12071a89897fd62ed27f ]

Multi rx queue allows to spread the load of the Rx streams on different
CPUs. 9000 series required complex synchronization mechanisms from the
driver side since the hardware / firmware is not able to provide
information about duplicate packets and timeouts inside the reordering
buffer.

Users have complained that for newer devices, all those synchronization
mechanisms have caused spurious packet drops. Those packet drops
disappeared if we simplify the code, but unfortunately, we can't have
RSS enabled on 9000 series without this complex code.

Remove support for RSS on 9000 so that we can make the code much simpler
for newer devices and fix the bugs for them.

The down side of this patch is a that all the Rx path will be routed to
a single CPU, but this has never been an issue, the modern CPUs are just
fast enough to cope with all the traffic.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20231017115047.2917eb8b7af9.Iddd7dcf335387ba46fcbbb6067ef4ff9cd3755a7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Stable-dep-of: e78d78773089 ("wifi: iwlwifi: mvm: include link ID when releasing frames")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

index 168eda2132fb81b30698f5d14c1644c406926d51..9dcc1506bd0b00f9d20d807f3ff42a89d4a535e6 100644 (file)
@@ -278,7 +278,7 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
 #define IWL_MGMT_TID           15
 #define IWL_FRAME_LIMIT        64
 #define IWL_MAX_RX_HW_QUEUES   16
-#define IWL_9000_MAX_RX_HW_QUEUES      6
+#define IWL_9000_MAX_RX_HW_QUEUES      1
 
 /**
  * enum iwl_wowlan_status - WoWLAN image/device status
index aaa9840d0d4c53cc9b43b7555d7961665a0872b2..ee9d14250a26122c7b130318de8461cb8fe95841 100644 (file)
@@ -352,7 +352,9 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
                ieee80211_hw_set(hw, HAS_RATE_CONTROL);
        }
 
-       if (iwl_mvm_has_new_rx_api(mvm))
+       /* We want to use the mac80211's reorder buffer for 9000 */
+       if (iwl_mvm_has_new_rx_api(mvm) &&
+           mvm->trans->trans_cfg->device_family > IWL_DEVICE_FAMILY_9000)
                ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
 
        if (fw_has_capa(&mvm->fw->ucode_capa,
index bac0228b8c8664e247ebf0f7349eee5ac05e38d3..92b3e18dbe87767389e3c6cc360cc171101a2f11 100644 (file)
@@ -963,6 +963,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
        baid = (reorder & IWL_RX_MPDU_REORDER_BAID_MASK) >>
                IWL_RX_MPDU_REORDER_BAID_SHIFT;
 
+       if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000)
+               return false;
+
        /*
         * This also covers the case of receiving a Block Ack Request
         * outside a BA session; we'll pass it to mac80211 and that
@@ -2621,9 +2624,15 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
 
        if (!iwl_mvm_reorder(mvm, napi, queue, sta, skb, desc) &&
            likely(!iwl_mvm_time_sync_frame(mvm, skb, hdr->addr2)) &&
-           likely(!iwl_mvm_mei_filter_scan(mvm, skb)))
+           likely(!iwl_mvm_mei_filter_scan(mvm, skb))) {
+               if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
+                   (desc->mac_flags2 & IWL_RX_MPDU_MFLG2_AMSDU) &&
+                   !(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME))
+                       rx_status->flag |= RX_FLAG_AMSDU_MORE;
+
                iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta,
                                                link_sta);
+       }
 out:
        rcu_read_unlock();
 }