]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: ath12k_mac_op_flush(): MLO support
authorSriram R <quic_srirrama@quicinc.com>
Tue, 26 Nov 2024 17:11:32 +0000 (19:11 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 29 Nov 2024 11:17:44 +0000 (13:17 +0200)
Currently when tx flush is requested for an vif only packets corresponding to
deflink are flushed, with MLO multiple link arvif could be affiliated to the ML
vif and packets corresponding to all of them should be flushed.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Co-developed-by: Maharaja Kennadyrajan <quic_mkenna@quicinc.com>
Signed-off-by: Maharaja Kennadyrajan <quic_mkenna@quicinc.com>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20241126171139.2350704-4-kvalo@kernel.org
drivers/net/wireless/ath/ath12k/mac.c

index 5ca96cb86d17455ecf9f919ddfb6edd789a77609..595e8110ab86c403c3f68c6db197f2b854a4733f 100644 (file)
@@ -9287,7 +9287,11 @@ static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *v
                                u32 queues, bool drop)
 {
        struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
+       struct ath12k_link_vif *arvif;
+       struct ath12k_vif *ahvif;
+       unsigned long links;
        struct ath12k *ar;
+       u8 link_id;
        int i;
 
        lockdep_assert_wiphy(hw->wiphy);
@@ -9302,12 +9306,18 @@ static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *v
                return;
        }
 
-       ar = ath12k_get_ar_by_vif(hw, vif);
+       for_each_ar(ah, ar, i)
+               wiphy_work_flush(hw->wiphy, &ar->wmi_mgmt_tx_work);
 
-       if (!ar)
-               return;
+       ahvif = ath12k_vif_to_ahvif(vif);
+       links = ahvif->links_map;
+       for_each_set_bit(link_id, &links, IEEE80211_MLD_MAX_NUM_LINKS) {
+               arvif = wiphy_dereference(hw->wiphy, ahvif->link[link_id]);
+               if (!(arvif && arvif->ar))
+                       continue;
 
-       ath12k_mac_flush(ar);
+               ath12k_mac_flush(arvif->ar);
+       }
 }
 
 static int