|
4 | 4 | * |
5 | 5 | * Portions of this file |
6 | 6 | * Copyright(c) 2015 - 2016 Intel Deutschland GmbH |
7 | | - * Copyright (C) 2018 - 2022 Intel Corporation |
| 7 | + * Copyright (C) 2018 - 2023 Intel Corporation |
8 | 8 | */ |
9 | 9 |
|
10 | 10 | #include <linux/ieee80211.h> |
@@ -116,12 +116,14 @@ void |
116 | 116 | ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, |
117 | 117 | struct ieee80211_supported_band *sband, |
118 | 118 | const struct ieee80211_vht_cap *vht_cap_ie, |
| 119 | + const struct ieee80211_vht_cap *vht_cap_ie2, |
119 | 120 | struct link_sta_info *link_sta) |
120 | 121 | { |
121 | 122 | struct ieee80211_sta_vht_cap *vht_cap = &link_sta->pub->vht_cap; |
122 | 123 | struct ieee80211_sta_vht_cap own_cap; |
123 | 124 | u32 cap_info, i; |
124 | 125 | bool have_80mhz; |
| 126 | + u32 mpdu_len; |
125 | 127 |
|
126 | 128 | memset(vht_cap, 0, sizeof(*vht_cap)); |
127 | 129 |
|
@@ -317,11 +319,21 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, |
317 | 319 |
|
318 | 320 | link_sta->pub->bandwidth = ieee80211_sta_cur_vht_bw(link_sta); |
319 | 321 |
|
| 322 | + /* |
| 323 | + * Work around the Cisco 9115 FW 17.3 bug by taking the min of |
| 324 | + * both reported MPDU lengths. |
| 325 | + */ |
| 326 | + mpdu_len = vht_cap->cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK; |
| 327 | + if (vht_cap_ie2) |
| 328 | + mpdu_len = min_t(u32, mpdu_len, |
| 329 | + le32_get_bits(vht_cap_ie2->vht_cap_info, |
| 330 | + IEEE80211_VHT_CAP_MAX_MPDU_MASK)); |
| 331 | + |
320 | 332 | /* |
321 | 333 | * FIXME - should the amsdu len be per link? store per link |
322 | 334 | * and maintain a minimum? |
323 | 335 | */ |
324 | | - switch (vht_cap->cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK) { |
| 336 | + switch (mpdu_len) { |
325 | 337 | case IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454: |
326 | 338 | link_sta->pub->agg.max_amsdu_len = IEEE80211_MAX_MPDU_LEN_VHT_11454; |
327 | 339 | break; |
|
0 commit comments