Linux wireless drivers development
 help / color / mirror / Atom feed
From: Sujith Manoharan <sujith@msujith.org>
To: John Linville <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>, <ath9k-devel@qca.qualcomm.com>
Subject: Re: [PATCH 6/6] ath9k: Process beacons properly
Date: Tue, 7 Oct 2014 10:06:29 +0530	[thread overview]
Message-ID: <21555.28109.720719.149443@gargle.gargle.HOWL> (raw)
In-Reply-To: <1412574579-22532-7-git-send-email-sujith@msujith.org>

Sujith Manoharan wrote:
> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> 
> When the current operating channel context has
> been marked as ATH_CHANCTX_STATE_FORCE_ACTIVE,
> do not process beacons that might be received,
> since we have to wait for the station to become
> authorized.
> 
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath9k/channel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
> index 16bed6a..55f2369 100644
> --- a/drivers/net/wireless/ath/ath9k/channel.c
> +++ b/drivers/net/wireless/ath/ath9k/channel.c
> @@ -492,7 +492,8 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
>  		break;
>  	case ATH_CHANCTX_EVENT_BEACON_RECEIVED:
>  		if (!test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags) ||
> -		    sc->cur_chan == &sc->offchannel.chan)
> +		    sc->cur_chan == &sc->offchannel.chan ||
> +		    sc->sched.state == ATH_CHANCTX_STATE_FORCE_ACTIVE)
>  			break;

The check for FORCE_ACTIVE needs to be done after we set
beacon_miss/beacon_pending to zero.

Also, since we now have a small window where we start receiving
beacons while waiting for the handshake to complete, we
end up rearming the timer based on the cached tsf_val of the current
channel. But, since it will be zero the first time the
context becomes active, the timeout value is assigned
spurious values.

I'll address both these issues and send a v2.

Sujith

      reply	other threads:[~2014-10-07  4:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06  5:49 [PATCH 0/6] ath9k patches Sujith Manoharan
2014-10-06  5:49 ` [PATCH 1/6] ath: Fix smatch warning Sujith Manoharan
2014-10-06  5:49 ` [PATCH 2/6] ath9k: Fix crash in MCC mode Sujith Manoharan
2014-10-06  5:49 ` [PATCH 3/6] ath9k: Fix sequence number assignment Sujith Manoharan
2014-10-06  5:49 ` [PATCH 4/6] ath9k: Use sta_state() callback Sujith Manoharan
2014-10-06  5:49 ` [PATCH 5/6] ath9k: Enable multi-channel properly Sujith Manoharan
2014-10-06  5:49 ` [PATCH 6/6] ath9k: Process beacons properly Sujith Manoharan
2014-10-07  4:36   ` Sujith Manoharan [this message]

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=21555.28109.720719.149443@gargle.gargle.HOWL \
    --to=sujith@msujith.org \
    --cc=ath9k-devel@qca.qualcomm.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