]> Git Repo - J-linux.git/commitdiff
wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he()
authorBaochen Qiang <[email protected]>
Wed, 10 Jul 2024 02:18:19 +0000 (10:18 +0800)
committerKalle Valo <[email protected]>
Wed, 7 Aug 2024 08:14:34 +0000 (11:14 +0300)
Currently ampdu_factor is wrongly calculated in ath12k_peer_assoc_h_he(), fix it.

This is found during code review.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Baochen Qiang <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://patch.msgid.link/[email protected]
drivers/net/wireless/ath/ath12k/mac.c

index 8106297f0bc1c786fbb10489d4396cb3e93af08e..a7b86e6a26557ae7832d022885f06426c726628c 100644 (file)
@@ -2196,9 +2196,8 @@ static void ath12k_peer_assoc_h_he(struct ath12k *ar,
         * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
         * length.
         */
-       ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
-                       IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
-                       IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK;
+       ampdu_factor = u8_get_bits(he_cap->he_cap_elem.mac_cap_info[3],
+                                  IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK);
 
        if (ampdu_factor) {
                if (sta->deflink.vht_cap.vht_supported)
This page took 0.13075 seconds and 4 git commands to generate.