* [PATCH 1/2 2.6.32.y] mac80211: do not wip out old supported rates
@ 2010-06-07 9:59 Stanislaw Gruszka
2010-06-07 9:59 ` [PATCH 2/2 2.6.32.y] mac80211: fix supported rates IE if AP doesn't give us it's rates Stanislaw Gruszka
0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2010-06-07 9:59 UTC (permalink / raw)
To: stable; +Cc: Stanislaw Gruszka, Ben Hutchings, linux-wireless
Use old supported rates, if some buggy AP do not provide
supported rates information element in managment frame.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
net/mac80211/scan.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index fd6411d..169111a 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -62,7 +62,7 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
bool beacon)
{
struct ieee80211_bss *bss;
- int clen;
+ int clen, srlen;
s32 signal = 0;
if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
@@ -94,23 +94,24 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
if (bss->dtim_period == 0)
bss->dtim_period = 1;
- bss->supp_rates_len = 0;
+ /* replace old supported rates if we get new values */
+ srlen = 0;
if (elems->supp_rates) {
- clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len;
+ clen = IEEE80211_MAX_SUPP_RATES;
if (clen > elems->supp_rates_len)
clen = elems->supp_rates_len;
- memcpy(&bss->supp_rates[bss->supp_rates_len], elems->supp_rates,
- clen);
- bss->supp_rates_len += clen;
+ memcpy(bss->supp_rates, elems->supp_rates, clen);
+ srlen += clen;
}
if (elems->ext_supp_rates) {
- clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len;
+ clen = IEEE80211_MAX_SUPP_RATES - srlen;
if (clen > elems->ext_supp_rates_len)
clen = elems->ext_supp_rates_len;
- memcpy(&bss->supp_rates[bss->supp_rates_len],
- elems->ext_supp_rates, clen);
- bss->supp_rates_len += clen;
+ memcpy(bss->supp_rates + srlen, elems->ext_supp_rates, clen);
+ srlen += clen;
}
+ if (srlen)
+ bss->supp_rates_len = srlen;
bss->wmm_used = elems->wmm_param || elems->wmm_info;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2 2.6.32.y] mac80211: fix supported rates IE if AP doesn't give us it's rates
2010-06-07 9:59 [PATCH 1/2 2.6.32.y] mac80211: do not wip out old supported rates Stanislaw Gruszka
@ 2010-06-07 9:59 ` Stanislaw Gruszka
2010-07-27 22:39 ` [stable] " Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2010-06-07 9:59 UTC (permalink / raw)
To: stable; +Cc: Stanislaw Gruszka, Ben Hutchings, linux-wireless
If AP do not provide us supported rates before assiociation, send
all rates we are supporting instead of empty information element.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
net/mac80211/mlme.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d3950b7..abd62fc 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -269,12 +269,6 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
if (wk->bss->wmm_used)
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) &&
(local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT))
capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
@@ -309,6 +303,17 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
*pos++ = 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 */
supp_rates_len = rates_len;
if (supp_rates_len > 8)
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [stable] [PATCH 2/2 2.6.32.y] mac80211: fix supported rates IE if AP doesn't give us it's rates
2010-06-07 9:59 ` [PATCH 2/2 2.6.32.y] mac80211: fix supported rates IE if AP doesn't give us it's rates Stanislaw Gruszka
@ 2010-07-27 22:39 ` Greg KH
2010-07-28 6:53 ` Stanislaw Gruszka
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2010-07-27 22:39 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: stable, linux-wireless, Ben Hutchings
On Mon, Jun 07, 2010 at 11:59:43AM +0200, Stanislaw Gruszka wrote:
> If AP do not provide us supported rates before assiociation, send
> all rates we are supporting instead of empty information element.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> net/mac80211/mlme.c | 17 +++++++++++------
What is the commit id of this patch upstream?
thanks,
greg k-h
> 1 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index d3950b7..abd62fc 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -269,12 +269,6 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
> if (wk->bss->wmm_used)
> 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) &&
> (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT))
> capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
> @@ -309,6 +303,17 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
> *pos++ = 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 */
> supp_rates_len = rates_len;
> if (supp_rates_len > 8)
> --
> 1.6.2.5
>
> _______________________________________________
> stable mailing list
> stable@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/stable
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [stable] [PATCH 2/2 2.6.32.y] mac80211: fix supported rates IE if AP doesn't give us it's rates
2010-07-27 22:39 ` [stable] " Greg KH
@ 2010-07-28 6:53 ` Stanislaw Gruszka
0 siblings, 0 replies; 4+ messages in thread
From: Stanislaw Gruszka @ 2010-07-28 6:53 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-wireless, Ben Hutchings
On Tue, 27 Jul 2010 15:39:32 -0700
Greg KH <greg@kroah.com> wrote:
> On Mon, Jun 07, 2010 at 11:59:43AM +0200, Stanislaw Gruszka wrote:
> > If AP do not provide us supported rates before assiociation, send
> > all rates we are supporting instead of empty information element.
> >
> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> > ---
> > net/mac80211/mlme.c | 17 +++++++++++------
>
> What is the commit id of this patch upstream?
76f273640134f3eb8257179cd5b3bc6ba5fe4a96
Cheers
Stanislaw
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-28 6:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-07 9:59 [PATCH 1/2 2.6.32.y] mac80211: do not wip out old supported rates Stanislaw Gruszka
2010-06-07 9:59 ` [PATCH 2/2 2.6.32.y] mac80211: fix supported rates IE if AP doesn't give us it's rates Stanislaw Gruszka
2010-07-27 22:39 ` [stable] " Greg KH
2010-07-28 6:53 ` Stanislaw Gruszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).