linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH 2/2] mac80211: fix supported rates IE if AP doesn't give us it's rates
Date: Wed, 28 Apr 2010 15:39:24 +0200	[thread overview]
Message-ID: <1272461964.3565.21.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1272460624-3611-2-git-send-email-sgruszka@redhat.com>

On Wed, 2010-04-28 at 15:17 +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/work.c |   23 ++++++++++++++---------
>  1 files changed, 14 insertions(+), 9 deletions(-)
> 
> diff --git a/net/mac80211/work.c b/net/mac80211/work.c
> index 15e1ba9..f8f5c9a 100644
> --- a/net/mac80211/work.c
> +++ b/net/mac80211/work.c
> @@ -213,15 +213,20 @@ 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 {
> +		rates = ~0;
> +		rates_len = sband->n_bitrates;
> +	}

Could you add a comment about what AP this is, and that it's a
workaround please? The AP is surely supposed to send this information!

johannes


  parent reply	other threads:[~2010-04-28 13:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 13:17 [PATCH 1/2] mac80211: do not wip out old supported rates Stanislaw Gruszka
2010-04-28 13:17 ` [PATCH 2/2] mac80211: fix supported rates IE if AP doesn't give us it's rates Stanislaw Gruszka
2010-04-28 13:33   ` Stanislaw Gruszka
2010-04-28 20:33     ` John W. Linville
2010-04-30  8:57       ` Stanislaw Gruszka
2010-04-28 13:39   ` Johannes Berg [this message]
2010-04-28 13:57     ` Stanislaw Gruszka
2010-04-28 13:59       ` Johannes Berg
2010-04-28 15:03         ` [PATCH 2/2 v2] " Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272461964.3565.21.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).