Skip to content

Commit af6d39d

Browse files
Tamizh ChelvamKalle Valo
authored andcommitted
ath11k: Add peer max mpdu parameter in peer assoc command
Add peer max mpdu length configuration support in peer_assoc_he parameters. Noticed low throughput for the STA which supports HE, HT and not VHT in MU-MIMO case without this configuration Signed-off-by: Tamizh Chelvam <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c7187ac commit af6d39d

File tree

1 file changed

+25
-0
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+25
-0
lines changed

drivers/net/wireless/ath/ath11k/mac.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
12761276
struct peer_assoc_params *arg)
12771277
{
12781278
const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
1279+
u8 ampdu_factor;
12791280
u16 v;
12801281

12811282
if (!he_cap->has_he)
@@ -1292,6 +1293,30 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
12921293
/* the top most byte is used to indicate BSS color info */
12931294
arg->peer_he_ops &= 0xffffff;
12941295

1296+
/* As per section 26.6.1 11ax Draft5.0, if the Max AMPDU Exponent Extension
1297+
* in HE cap is zero, use the arg->peer_max_mpdu as calculated while parsing
1298+
* VHT caps(if VHT caps is present) or HT caps (if VHT caps is not present).
1299+
*
1300+
* For non-zero value of Max AMPDU Extponent Extension in HE MAC caps,
1301+
* if a HE STA sends VHT cap and HE cap IE in assoc request then, use
1302+
* MAX_AMPDU_LEN_FACTOR as 20 to calculate max_ampdu length.
1303+
* If a HE STA that does not send VHT cap, but HE and HT cap in assoc
1304+
* request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
1305+
* length.
1306+
*/
1307+
ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
1308+
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
1309+
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
1310+
1311+
if (ampdu_factor) {
1312+
if (sta->vht_cap.vht_supported)
1313+
arg->peer_max_mpdu = (1 << (IEEE80211_HE_VHT_MAX_AMPDU_FACTOR +
1314+
ampdu_factor)) - 1;
1315+
else if (sta->ht_cap.ht_supported)
1316+
arg->peer_max_mpdu = (1 << (IEEE80211_HE_HT_MAX_AMPDU_FACTOR +
1317+
ampdu_factor)) - 1;
1318+
}
1319+
12951320
if (he_cap->he_cap_elem.phy_cap_info[6] &
12961321
IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT) {
12971322
int bit = 7;

0 commit comments

Comments
 (0)