ath9k: update hw configuration for virtual wiphys
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 28 Oct 2009 20:39:40 +0000 (13:39 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 11 Nov 2009 22:08:59 +0000 (17:08 -0500)
ath9k supports its own virtual wiphys. The hardware code
relies on the ieee80211_hw for the present interface but
with recent changes introduced the common->hw was never
updated and is required for virtual wiphys.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/virtual.c

index e6a50f3aa472d16c349f830e76189a701300c393..7678c4a2ca6f6252b358a3e68472fede96d4e69d 100644 (file)
@@ -298,6 +298,7 @@ static void ath9k_wiphy_unpause_channel(struct ath_softc *sc)
 void ath9k_wiphy_chan_work(struct work_struct *work)
 {
        struct ath_softc *sc = container_of(work, struct ath_softc, chan_work);
+       struct ath_common *common = ath9k_hw_common(sc->sc_ah);
        struct ath_wiphy *aphy = sc->next_wiphy;
 
        if (aphy == NULL)
@@ -313,6 +314,10 @@ void ath9k_wiphy_chan_work(struct work_struct *work)
        /* XXX: remove me eventually */
        ath9k_update_ichannel(sc, aphy->hw,
                              &sc->sc_ah->channels[sc->chan_idx]);
+
+       /* sync hw configuration for hw code */
+       common->hw = aphy->hw;
+
        ath_update_chainmask(sc, sc->chan_is_ht);
        if (ath_set_channel(sc, aphy->hw,
                            &sc->sc_ah->channels[sc->chan_idx]) < 0) {