Commit fe2dba54 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Greg Kroah-Hartman

mac80211: fix supported rates IE if AP doesn't give us it's rates

commit 76f27364 upstream.

If AP do not provide us supported rates before assiociation, send
all rates we are supporting instead of empty information element.

v1 -> v2: Add comment.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4abe1cbd
...@@ -269,12 +269,6 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata, ...@@ -269,12 +269,6 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
if (wk->bss->wmm_used) if (wk->bss->wmm_used)
wmm = 1; wmm = 1;
/* get all rates supported by the device and the AP as
* some APs don't like getting a superset of their rates
* in the association request (e.g. D-Link DAP 1353 in
* b-only mode) */
rates_len = ieee80211_compatible_rates(wk->bss, sband, &rates);
if ((wk->bss->cbss.capability & WLAN_CAPABILITY_SPECTRUM_MGMT) && if ((wk->bss->cbss.capability & WLAN_CAPABILITY_SPECTRUM_MGMT) &&
(local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT)) (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT))
capab |= WLAN_CAPABILITY_SPECTRUM_MGMT; capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
...@@ -309,6 +303,17 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata, ...@@ -309,6 +303,17 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
*pos++ = wk->ssid_len; *pos++ = wk->ssid_len;
memcpy(pos, wk->ssid, wk->ssid_len); memcpy(pos, wk->ssid, wk->ssid_len);
if (wk->bss->supp_rates_len) {
/* get all rates supported by the device and the AP as
* some APs don't like getting a superset of their rates
* in the association request (e.g. D-Link DAP 1353 in
* b-only mode) */
rates_len = ieee80211_compatible_rates(wk->bss, sband, &rates);
} else {
rates = ~0;
rates_len = sband->n_bitrates;
}
/* add all rates which were marked to be used above */ /* add all rates which were marked to be used above */
supp_rates_len = rates_len; supp_rates_len = rates_len;
if (supp_rates_len > 8) if (supp_rates_len > 8)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment