]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/ath/ath9k/main.c
ath9k: remove obsolete comments
[~andy/linux] / drivers / net / wireless / ath / ath9k / main.c
index e267c92dbfb8e22de58a0156771a461ccfada95a..22785c77d007c4c580e9056feba4905ed0a93c79 100644 (file)
@@ -340,9 +340,7 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan,
                fastcc = false;
 
        ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
-               hchan->channel, !!(hchan->channelFlags & (CHANNEL_HT40MINUS |
-                                                         CHANNEL_HT40PLUS)),
-               fastcc);
+               hchan->channel, IS_CHAN_HT40(hchan), fastcc);
 
        r = ath9k_hw_reset(ah, hchan, caldata, fastcc);
        if (r) {
@@ -1589,12 +1587,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
        ath9k_ps_wakeup(sc);
        mutex_lock(&sc->mutex);
 
-       /*
-        * Leave this as the first check because we need to turn on the
-        * radio if it was disabled before prior to processing the rest
-        * of the changes. Likewise we must only disable the radio towards
-        * the end.
-        */
        if (changed & IEEE80211_CONF_CHANGE_IDLE) {
                sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
                if (sc->ps_idle)
@@ -1629,7 +1621,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
 
        if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
                struct ieee80211_channel *curchan = hw->conf.channel;
-               struct ath9k_channel old_chan;
                int pos = curchan->hw_value;
                int old_pos = -1;
                unsigned long flags;
@@ -1654,11 +1645,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
                 * Preserve the current channel values, before updating
                 * the same channel
                 */
-               if (old_pos == pos) {
-                       memcpy(&old_chan, &sc->sc_ah->channels[pos],
-                               sizeof(struct ath9k_channel));
-                       ah->curchan = &old_chan;
-               }
+               if (ah->curchan && (old_pos == pos))
+                       ath9k_hw_getnf(ah, ah->curchan);
 
                ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos],
                                          curchan, conf->channel_type);