linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jouni Malinen <j@w1.fi>
To: Kalle Valo <kalle.valo@nokia.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2] mac80211: don't drop null frames during software scan
Date: Mon, 16 Mar 2009 10:57:41 +0200	[thread overview]
Message-ID: <20090316085741.GA29986@jm.kir.nu> (raw)
In-Reply-To: <20090315200738.17370.29374.stgit@tikku>

On Sun, Mar 15, 2009 at 10:07:39PM +0200, Kalle Valo wrote:
> ieee80211_tx_h_check_assoc() was dropping everything else than probe
> requests during software scan. So the null frame with the power save
> bit was dropped and AP never received it. This meant that AP never
> buffered any frames for the station during software scan.
> 
> Fix this by allowing to transmit both probe request and null frames
> during software scan. Tested with stlc45xx.

I would assume the nullfunc frames are sent only just before the scan
and just after the scan, not really "during" the scan. Or am I missing
something here?

> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -193,7 +193,14 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
>  		return TX_CONTINUE;
>  
>  	if (unlikely(tx->local->sw_scanning) &&
> -	    !ieee80211_is_probe_req(hdr->frame_control))
> +	    !ieee80211_is_probe_req(hdr->frame_control) &&
> +	    !ieee80211_is_nullfunc(hdr->frame_control))
> +		/*
> +		 * When software scanning only null frames (to notify the
> +		 * sleep state to the AP) and probe requests (for the
> +		 * active scan) are allowed, everything else should be
> +		 * dropped.
> +		 */
>  		return TX_DROP;

While this is probably the easiest way of fixing the issue you are
seeing, the more correct operation would be to allow nullfunc frames
only at the beginning and end of the scan operation, not during it,
i.e., there is no point allowing those frames to go out when we are not
on our operational channel. I would hope we do not currently send those
frames at such time, so this should not matter much, but the comment
could be made more clear about the different needs for nullfunc frames
(please also s/null frames/nullfunc frames/) and probe request frames.
The former are sent only on the operational channel in the beginning and
end of scan while the latter are sent on the channels to be scanned
during an active scan.

-- 
Jouni Malinen                                            PGP id EFC895FA

  reply	other threads:[~2009-03-16  8:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-15 20:07 [PATCH v2] mac80211: don't drop null frames during software scan Kalle Valo
2009-03-16  8:57 ` Jouni Malinen [this message]
2009-03-16 12:35   ` Kalle Valo
2009-03-16 12:36     ` Kalle Valo
2009-03-16 18:50     ` Jouni Malinen
2009-03-16 14:00   ` Johannes Berg

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=20090316085741.GA29986@jm.kir.nu \
    --to=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=kalle.valo@nokia.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).