ath9k: remove superfluous check on changing channel

When we try to change the channel in ath9k its because
either the configuration indicates we *have* changed
channels or HT configuration has changed. In both cases
we want to do a reset. Either way mac80211 will inform us
when we want to actually change the channel so trust those
calls.

Although in the patch it may seem as I am doing more code
changes I am not, all I am doing is removing the initial
branch conditional and shifting the code to the left.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Luis R. Rodriguez 2008-12-23 15:58:50 -08:00 коммит произвёл John W. Linville
Родитель 0de57d991b
Коммит c0d7c7af0a
1 изменённых файлов: 43 добавлений и 48 удалений

Просмотреть файл

@ -268,10 +268,6 @@ static int ath_set_channel(struct ath_softc *sc, struct ath9k_channel *hchan)
if (sc->sc_flags & SC_OP_INVALID) if (sc->sc_flags & SC_OP_INVALID)
return -EIO; return -EIO;
if (hchan->channel != sc->sc_ah->ah_curchan->channel ||
hchan->channelFlags != sc->sc_ah->ah_curchan->channelFlags ||
(sc->sc_flags & SC_OP_CHAINMASK_UPDATE) ||
(sc->sc_flags & SC_OP_FULL_RESET)) {
/* /*
* This is only performed if the channel settings have * This is only performed if the channel settings have
* actually changed. * actually changed.
@ -322,7 +318,6 @@ static int ath_set_channel(struct ath_softc *sc, struct ath9k_channel *hchan)
ath_cache_conf_rate(sc, &hw->conf); ath_cache_conf_rate(sc, &hw->conf);
ath_update_txpow(sc); ath_update_txpow(sc);
ath9k_hw_set_interrupts(ah, sc->sc_imask); ath9k_hw_set_interrupts(ah, sc->sc_imask);
}
return 0; return 0;
} }