ath5k: write PCU registers on initial reset
authorBob Copeland <me@bobcopeland.com>
Sun, 5 Jul 2009 01:03:13 +0000 (21:03 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Sep 2009 15:27:08 +0000 (08:27 -0700)
commit 3355443ad7601991affa5992b0d53870335af765 upstream.

"Ath5k: unify resets"
introduced a regression into 2.6.28 where the PCU registers are never
initialized, due to ath5k_reset() always passing true for change_channel.
We subsequently program a lot of these registers but several may start
in an unknown state.

Reported-by: Forrest Zhang <forrest@hifulltech.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath5k/base.c

index 409f022992b1231c53af6120d23f0e695e950b44..09eb47b180ae8e11b4f4d33fe1bd5ee4fa4de437 100644 (file)
@@ -2623,7 +2623,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan)
                sc->curchan = chan;
                sc->curband = &sc->sbands[chan->band];
        }
-       ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, true);
+       ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL);
        if (ret) {
                ATH5K_ERR(sc, "can't reset hardware (%d)\n", ret);
                goto err;