]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: update ath12k_mac_op_update_vif_offload() for MLO
authorSriram R <quic_srirrama@quicinc.com>
Tue, 15 Oct 2024 17:14:15 +0000 (20:14 +0300)
committerJeff Johnson <quic_jjohnson@quicinc.com>
Wed, 16 Oct 2024 15:36:20 +0000 (08:36 -0700)
Currently ath12k_mac_op_update_vif_offload() updates for vif encapsulation and
decapsulation offload configurations for intended vif's deflink.

But for an ML vif encapapsulation and decapsulation offloads are an MLD level
configuration so apply the same configuration for all affiliated links of the
ML vif.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-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>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20241015171416.518022-11-kvalo@kernel.org
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
drivers/net/wireless/ath/ath12k/mac.c

index 8771d9738ffb7d15570103a68ab5dbd99eab3d50..ba633dad4c47c0bb3e7c97f6eaca24edfa17397f 100644 (file)
@@ -6683,9 +6683,25 @@ static void ath12k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
                                             struct ieee80211_vif *vif)
 {
        struct ath12k_vif *ahvif = ath12k_vif_to_ahvif(vif);
+       struct ath12k_link_vif *arvif;
+       unsigned long links;
+       int link_id;
 
        lockdep_assert_wiphy(hw->wiphy);
 
+       if (vif->valid_links) {
+               links = vif->valid_links;
+               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_update_vif_offload(arvif);
+               }
+
+               return;
+       }
+
        ath12k_mac_update_vif_offload(&ahvif->deflink);
 }