|
@@ -3204,10 +3204,6 @@ void wpa_supplicant_apply_vht_overrides(
|
|
|
{
|
|
|
struct ieee80211_vht_capabilities *vhtcaps;
|
|
|
struct ieee80211_vht_capabilities *vhtcaps_mask;
|
|
|
-#ifdef CONFIG_HT_OVERRIDES
|
|
|
- int max_ampdu;
|
|
|
- const u32 max_ampdu_mask = VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX;
|
|
|
-#endif /* CONFIG_HT_OVERRIDES */
|
|
|
|
|
|
if (!ssid)
|
|
|
return;
|
|
@@ -3225,9 +3221,12 @@ void wpa_supplicant_apply_vht_overrides(
|
|
|
|
|
|
#ifdef CONFIG_HT_OVERRIDES
|
|
|
/* if max ampdu is <= 3, we have to make the HT cap the same */
|
|
|
- if (ssid->vht_capa_mask & max_ampdu_mask) {
|
|
|
- max_ampdu = (ssid->vht_capa & max_ampdu_mask) >>
|
|
|
- find_first_bit(max_ampdu_mask);
|
|
|
+ if (ssid->vht_capa_mask & VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX) {
|
|
|
+ int max_ampdu;
|
|
|
+
|
|
|
+ max_ampdu = (ssid->vht_capa &
|
|
|
+ VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX) >>
|
|
|
+ VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX_SHIFT;
|
|
|
|
|
|
max_ampdu = max_ampdu < 3 ? max_ampdu : 3;
|
|
|
wpa_set_ampdu_factor(wpa_s,
|