aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/work.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 7bd8670379de..4c7de72c27e7 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -212,15 +212,25 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
212 212
213 sband = local->hw.wiphy->bands[wk->chan->band]; 213 sband = local->hw.wiphy->bands[wk->chan->band];
214 214
215 /* 215 if (wk->assoc.supp_rates_len) {
216 * Get all rates supported by the device and the AP as 216 /*
217 * some APs don't like getting a superset of their rates 217 * Get all rates supported by the device and the AP as
218 * in the association request (e.g. D-Link DAP 1353 in 218 * some APs don't like getting a superset of their rates
219 * b-only mode)... 219 * in the association request (e.g. D-Link DAP 1353 in
220 */ 220 * b-only mode)...
221 rates_len = ieee80211_compatible_rates(wk->assoc.supp_rates, 221 */
222 wk->assoc.supp_rates_len, 222 rates_len = ieee80211_compatible_rates(wk->assoc.supp_rates,
223 sband, &rates); 223 wk->assoc.supp_rates_len,
224 sband, &rates);
225 } else {
226 /*
227 * In case AP not provide any supported rates information
228 * before association, we send information element(s) with
229 * all rates that we support.
230 */
231 rates = ~0;
232 rates_len = sband->n_bitrates;
233 }
224 234
225 skb = alloc_skb(local->hw.extra_tx_headroom + 235 skb = alloc_skb(local->hw.extra_tx_headroom +
226 sizeof(*mgmt) + /* bit too much but doesn't matter */ 236 sizeof(*mgmt) + /* bit too much but doesn't matter */