linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: jiajia.zheng@intel.com
Cc: linux-wireless@vger.kernel.org,
	wifi-test-devel@lists.sourceforge.net,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>,
	stable@kernel.org, Amod Bodas <amod.bodas@atheros.com>,
	Vasanth Thiagarajan <vasanth.thiagarajan@atheros.com>
Subject: [PATCH] mac80211: fix offchannel assumption upon association
Date: Fri, 24 Sep 2010 21:58:26 -0400	[thread overview]
Message-ID: <1285379906-23806-1-git-send-email-lrodriguez@atheros.com> (raw)

Association is dealt with as an atomic offchannel operation,
we do this because we don't know we are associated until we
get the associatin response from the AP. When we do get the
associatin response though we were never clearing the offchannel
state. This has a few implications, we told drivers we were
still offchannel, and the first configured TX power for the
channel does not take into account any power constraints.

For ath9k this meant ANI calibration would not start upon
association, and we'd have to wait until the first bgscan
to be triggered. There may be other issues this resolves
but I'm too lazy to colb the code to check.

Cc: stable@kernel.org
Cc: Amod Bodas <amod.bodas@atheros.com>
Cc: Vasanth Thiagarajan <vasanth.thiagarajan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 net/mac80211/main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 7c85426..e24fa5b 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -110,7 +110,8 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
 		chan = scan_chan;
 		channel_type = NL80211_CHAN_NO_HT;
 		local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
-	} else if (local->tmp_channel) {
+	} else if (local->tmp_channel &&
+		   local->oper_channel != local->tmp_channel) {
 		chan = scan_chan = local->tmp_channel;
 		channel_type = local->tmp_channel_type;
 		local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
-- 
1.7.0.4


             reply	other threads:[~2010-09-25  1:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25  1:58 Luis R. Rodriguez [this message]
2010-09-25  1:59 [PATCH] mac80211: fix offchannel assumption upon association Luis R. Rodriguez
2010-09-27 10:52 ` Johannes Berg
2010-09-27 17:14   ` Luis R. Rodriguez

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=1285379906-23806-1-git-send-email-lrodriguez@atheros.com \
    --to=lrodriguez@atheros.com \
    --cc=amod.bodas@atheros.com \
    --cc=jiajia.zheng@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=vasanth.thiagarajan@atheros.com \
    --cc=wifi-test-devel@lists.sourceforge.net \
    /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).