diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2010-04-28 17:03:15 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-28 16:50:29 -0400 |
commit | 76f273640134f3eb8257179cd5b3bc6ba5fe4a96 (patch) | |
tree | 827c91fee5a626a76af30a1f48d65e1d429abed2 | |
parent | f0b058b61711ebf5be94d6865ca7b2c259b71d37 (diff) | |
download | kernel_goldelico_gta04-76f273640134f3eb8257179cd5b3bc6ba5fe4a96.zip kernel_goldelico_gta04-76f273640134f3eb8257179cd5b3bc6ba5fe4a96.tar.gz kernel_goldelico_gta04-76f273640134f3eb8257179cd5b3bc6ba5fe4a96.tar.bz2 |
mac80211: fix supported rates IE if AP doesn't give us it's rates
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: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/work.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 7bd8670..4c7de72 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, sband = local->hw.wiphy->bands[wk->chan->band]; - /* - * 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->assoc.supp_rates, - wk->assoc.supp_rates_len, - sband, &rates); + if (wk->assoc.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->assoc.supp_rates, + wk->assoc.supp_rates_len, + sband, &rates); + } else { + /* + * In case AP not provide any supported rates information + * before association, we send information element(s) with + * all rates that we support. + */ + rates = ~0; + rates_len = sband->n_bitrates; + } skb = alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt) + /* bit too much but doesn't matter */ |