]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.36.2/mac80211-fix-offchannel-assumption-upon-association.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / mac80211-fix-offchannel-assumption-upon-association.patch
CommitLineData
ad522180
GKH
1From 8d4780eb1ece4e8109b4f6b2e5e61f7fc593c3f4 Mon Sep 17 00:00:00 2001
2From: Luis R. Rodriguez <lrodriguez@atheros.com>
3Date: Fri, 24 Sep 2010 21:59:57 -0400
4Subject: mac80211: fix offchannel assumption upon association
5
6From: Luis R. Rodriguez <lrodriguez@atheros.com>
7
8commit 8d4780eb1ece4e8109b4f6b2e5e61f7fc593c3f4 upstream.
9
10Association is dealt with as an atomic offchannel operation,
11we do this because we don't know we are associated until we
12get the associatin response from the AP. When we do get the
13associatin response though we were never clearing the offchannel
14state. This has a few implications, we told drivers we were
15still offchannel, and the first configured TX power for the
16channel does not take into account any power constraints.
17
18For ath9k this meant ANI calibration would not start upon
19association, and we'd have to wait until the first bgscan
20to be triggered. There may be other issues this resolves
21but I'm too lazy to comb the code to check.
22
23Cc: Amod Bodas <amod.bodas@atheros.com>
24Cc: Vasanth Thiagarajan <vasanth.thiagarajan@atheros.com>
25Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
26Signed-off-by: John W. Linville <linville@tuxdriver.com>
27Signed-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;