]>
Commit | Line | Data |
---|---|---|
c06f7f46 GKH |
1 | From 52b8ac92496e03d6b5619204d7f3bae6ce6eae45 Mon Sep 17 00:00:00 2001 |
2 | From: Luis R. Rodriguez <lrodriguez@atheros.com> | |
3 | Date: Thu, 16 Sep 2010 15:12:27 -0400 | |
4 | Subject: ath9k: fix regression on beacon loss after bgscan | |
5 | ||
6 | From: Luis R. Rodriguez <lrodriguez@atheros.com> | |
7 | ||
8 | commit 52b8ac92496e03d6b5619204d7f3bae6ce6eae45 upstream. | |
9 | ||
10 | When we return to the home channel we were never reseting our beacon | |
11 | timers, this was casued by the fact that the scanning flag was still | |
12 | on even after we returned to our home channel. There are also other | |
13 | reasons why we would get a reset and if we are not off channel | |
14 | we always need to resynch our beacon timers, because a reset will | |
15 | clear them. | |
16 | ||
17 | This bug is a regression introduced on 2.6.36. The order of the | |
18 | changes are as follows: | |
19 | ||
20 | 5ee08656 - Sat Jul 31 - ath9k: prevent calibration during off-channel activity | |
21 | a0daa0e7 - Tue Jul 27 - Revert "mac80211: fix sw scan bracketing" | |
22 | 543708be - Fri Jun 18 - mac80211: fix sw scan bracketing | |
23 | ||
24 | mcgrof@tux ~/linux-2.6-allstable (git::master)$ git describe \ | |
25 | --contains 5ee0865615f65f84e6ee9174771a6716c29e08e1 | |
26 | v2.6.36-rc1~43^2~34^2~22 | |
27 | ||
28 | mcgrof@tux ~/linux-2.6-allstable (git::master)$ git describe \ | |
29 | --contains a0daa0e7592ada797d6835f11529097aabc27ad2 | |
30 | v2.6.36-rc1~571^2~64^2~13 | |
31 | ||
32 | mcgrof@tux ~/linux-2.6-allstable (git::master)$ git describe \ | |
33 | --contains 543708be320d7df692d24b349ca01a947b340764 | |
34 | v2.6.36-rc1~571^2~107^2~187 | |
35 | ||
36 | So 5ee08656 would have worked if a0daa0e7 was not committed but | |
37 | it was so this means 5ee08656 was broken since it assumed that | |
38 | when we were in the channel change routine the scan flag would | |
39 | be lifted. As it turns out the scan flag will be set when we | |
40 | are already on the home channel. | |
41 | ||
42 | For more details refer to: | |
43 | ||
44 | http://code.google.com/p/chromium-os/issues/detail?id=5715 | |
45 | ||
46 | These issues will need to be considered for our solution on | |
47 | reshifting the scan complete callback location on mac80211 on | |
48 | current development kernel work. | |
49 | ||
50 | This patch has stable fixes which apply down to [2.6.36+] | |
51 | ||
52 | Cc: Paul Stewart <pstew@google.com> | |
53 | Cc: Amod Bodas <amod.bodas@atheros.com> | |
54 | Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> | |
55 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | |
56 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
57 | ||
58 | --- | |
59 | drivers/net/wireless/ath/ath9k/main.c | 6 ++++-- | |
60 | 1 file changed, 4 insertions(+), 2 deletions(-) | |
61 | ||
62 | --- a/drivers/net/wireless/ath/ath9k/main.c | |
63 | +++ b/drivers/net/wireless/ath/ath9k/main.c | |
64 | @@ -257,9 +257,11 @@ int ath_set_channel(struct ath_softc *sc | |
65 | if (!(sc->sc_flags & (SC_OP_OFFCHANNEL | SC_OP_SCANNING))) { | |
66 | ath_start_ani(common); | |
67 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); | |
68 | - ath_beacon_config(sc, NULL); | |
69 | } | |
70 | ||
71 | + if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) | |
72 | + ath_beacon_config(sc, NULL); | |
73 | + | |
74 | ps_restore: | |
75 | ath9k_ps_restore(sc); | |
76 | return r; | |
77 | @@ -953,7 +955,7 @@ int ath_reset(struct ath_softc *sc, bool | |
78 | ||
79 | ath_update_txpow(sc); | |
80 | ||
81 | - if (sc->sc_flags & SC_OP_BEACONS) | |
82 | + if ((sc->sc_flags & SC_OP_BEACONS) || !(sc->sc_flags & (SC_OP_OFFCHANNEL))) | |
83 | ath_beacon_config(sc, NULL); /* restart beacons */ | |
84 | ||
85 | ath9k_hw_set_interrupts(ah, ah->imask); |