Commit 4b3721ce authored by Bruno Randolf's avatar Bruno Randolf Committed by John W. Linville

ath5k: Remove unused sc->curmode

sc->curmode is set but never used. Remove it and the helper function. Also the
ath5k_rate_update which is refered to in the comment does not exist (any more?)
so we don't need to setup the band in that place.
Signed-off-by: default avatarBruno Randolf <br1@einfach.org>
Acked-by: default avatarBob Copeland <me@bobcopeland.com>
Acked-by: default avatarNick Kossifidis <mickflemm@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 75f9569b
...@@ -445,18 +445,6 @@ ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) ...@@ -445,18 +445,6 @@ ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan)
return ath5k_reset(sc, chan, true); return ath5k_reset(sc, chan, true);
} }
static void
ath5k_setcurmode(struct ath5k_softc *sc, unsigned int mode)
{
sc->curmode = mode;
if (mode == AR5K_MODE_11A) {
sc->curband = &sc->sbands[IEEE80211_BAND_5GHZ];
} else {
sc->curband = &sc->sbands[IEEE80211_BAND_2GHZ];
}
}
struct ath_vif_iter_data { struct ath_vif_iter_data {
const u8 *hw_macaddr; const u8 *hw_macaddr;
u8 mask[ETH_ALEN]; u8 mask[ETH_ALEN];
...@@ -2778,12 +2766,6 @@ ath5k_init(struct ieee80211_hw *hw) ...@@ -2778,12 +2766,6 @@ ath5k_init(struct ieee80211_hw *hw)
goto err; goto err;
} }
/* NB: setup here so ath5k_rate_update is happy */
if (test_bit(AR5K_MODE_11A, ah->ah_modes))
ath5k_setcurmode(sc, AR5K_MODE_11A);
else
ath5k_setcurmode(sc, AR5K_MODE_11B);
/* /*
* Allocate tx+rx descriptors and populate the lists. * Allocate tx+rx descriptors and populate the lists.
*/ */
......
...@@ -202,7 +202,6 @@ struct ath5k_softc { ...@@ -202,7 +202,6 @@ struct ath5k_softc {
#define ATH_STAT_STARTED 4 /* opened & irqs enabled */ #define ATH_STAT_STARTED 4 /* opened & irqs enabled */
unsigned int filter_flags; /* HW flags, AR5K_RX_FILTER_* */ unsigned int filter_flags; /* HW flags, AR5K_RX_FILTER_* */
unsigned int curmode; /* current phy mode */
struct ieee80211_channel *curchan; /* current h/w channel */ struct ieee80211_channel *curchan; /* current h/w channel */
u16 nvifs; u16 nvifs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment