]>
Commit | Line | Data |
---|---|---|
ad522180 GKH |
1 | From 8d4780eb1ece4e8109b4f6b2e5e61f7fc593c3f4 Mon Sep 17 00:00:00 2001 |
2 | From: Luis R. Rodriguez <lrodriguez@atheros.com> | |
3 | Date: Fri, 24 Sep 2010 21:59:57 -0400 | |
4 | Subject: mac80211: fix offchannel assumption upon association | |
5 | ||
6 | From: Luis R. Rodriguez <lrodriguez@atheros.com> | |
7 | ||
8 | commit 8d4780eb1ece4e8109b4f6b2e5e61f7fc593c3f4 upstream. | |
9 | ||
10 | Association is dealt with as an atomic offchannel operation, | |
11 | we do this because we don't know we are associated until we | |
12 | get the associatin response from the AP. When we do get the | |
13 | associatin response though we were never clearing the offchannel | |
14 | state. This has a few implications, we told drivers we were | |
15 | still offchannel, and the first configured TX power for the | |
16 | channel does not take into account any power constraints. | |
17 | ||
18 | For ath9k this meant ANI calibration would not start upon | |
19 | association, and we'd have to wait until the first bgscan | |
20 | to be triggered. There may be other issues this resolves | |
21 | but I'm too lazy to comb the code to check. | |
22 | ||
23 | Cc: Amod Bodas <amod.bodas@atheros.com> | |
24 | Cc: Vasanth Thiagarajan <vasanth.thiagarajan@atheros.com> | |
25 | Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> | |
26 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | |
27 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
28 | ||
29 | --- | |
30 | net/mac80211/main.c | 3 ++- | |
31 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
32 | ||
33 | --- a/net/mac80211/main.c | |
34 | +++ b/net/mac80211/main.c | |
35 | @@ -108,7 +108,8 @@ int ieee80211_hw_config(struct ieee80211 | |
36 | chan = scan_chan; | |
37 | channel_type = NL80211_CHAN_NO_HT; | |
38 | local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; | |
39 | - } else if (local->tmp_channel) { | |
40 | + } else if (local->tmp_channel && | |
41 | + local->oper_channel != local->tmp_channel) { | |
42 | chan = scan_chan = local->tmp_channel; | |
43 | channel_type = local->tmp_channel_type; | |
44 | local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; |