diff options
author | Bruno Randolf <br1@einfach.org> | 2011-01-19 04:21:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-21 15:35:46 -0500 |
commit | 930a7622d618cdf794787938d7cbda5461adb1cb (patch) | |
tree | d28516b287a0a53bd273e5c7026e1e1c125496d0 /drivers/net/wireless | |
parent | 4b3721ceb3c1f9b032c6eeb108e44692efbcacef (diff) |
ath5k: Remove redundant sc->curband
Remove sc->curband because the band is already stored in the current channel.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.h | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 43db07b9711b..217c2a09d979 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -557,7 +557,7 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix) | |||
557 | "hw_rix out of bounds: %x\n", hw_rix)) | 557 | "hw_rix out of bounds: %x\n", hw_rix)) |
558 | return 0; | 558 | return 0; |
559 | 559 | ||
560 | rix = sc->rate_idx[sc->curband->band][hw_rix]; | 560 | rix = sc->rate_idx[sc->curchan->band][hw_rix]; |
561 | if (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix)) | 561 | if (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix)) |
562 | rix = 0; | 562 | rix = 0; |
563 | 563 | ||
@@ -1367,7 +1367,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb, | |||
1367 | rxs->flag |= RX_FLAG_TSFT; | 1367 | rxs->flag |= RX_FLAG_TSFT; |
1368 | 1368 | ||
1369 | rxs->freq = sc->curchan->center_freq; | 1369 | rxs->freq = sc->curchan->center_freq; |
1370 | rxs->band = sc->curband->band; | 1370 | rxs->band = sc->curchan->band; |
1371 | 1371 | ||
1372 | rxs->signal = sc->ah->ah_noise_floor + rs->rs_rssi; | 1372 | rxs->signal = sc->ah->ah_noise_floor + rs->rs_rssi; |
1373 | 1373 | ||
@@ -1382,7 +1382,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb, | |||
1382 | rxs->flag |= ath5k_rx_decrypted(sc, skb, rs); | 1382 | rxs->flag |= ath5k_rx_decrypted(sc, skb, rs); |
1383 | 1383 | ||
1384 | if (rxs->rate_idx >= 0 && rs->rs_rate == | 1384 | if (rxs->rate_idx >= 0 && rs->rs_rate == |
1385 | sc->curband->bitrates[rxs->rate_idx].hw_value_short) | 1385 | sc->sbands[sc->curchan->band].bitrates[rxs->rate_idx].hw_value_short) |
1386 | rxs->flag |= RX_FLAG_SHORTPRE; | 1386 | rxs->flag |= RX_FLAG_SHORTPRE; |
1387 | 1387 | ||
1388 | ath5k_debug_dump_skb(sc, skb, "RX ", 0); | 1388 | ath5k_debug_dump_skb(sc, skb, "RX ", 0); |
@@ -2538,7 +2538,6 @@ ath5k_init_hw(struct ath5k_softc *sc) | |||
2538 | * and then setup of the interrupt mask. | 2538 | * and then setup of the interrupt mask. |
2539 | */ | 2539 | */ |
2540 | sc->curchan = sc->hw->conf.channel; | 2540 | sc->curchan = sc->hw->conf.channel; |
2541 | sc->curband = &sc->sbands[sc->curchan->band]; | ||
2542 | sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL | | 2541 | sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL | |
2543 | AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL | | 2542 | AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL | |
2544 | AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB; | 2543 | AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB; |
@@ -2665,10 +2664,8 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, | |||
2665 | * so we should also free any remaining | 2664 | * so we should also free any remaining |
2666 | * tx buffers */ | 2665 | * tx buffers */ |
2667 | ath5k_drain_tx_buffs(sc); | 2666 | ath5k_drain_tx_buffs(sc); |
2668 | if (chan) { | 2667 | if (chan) |
2669 | sc->curchan = chan; | 2668 | sc->curchan = chan; |
2670 | sc->curband = &sc->sbands[chan->band]; | ||
2671 | } | ||
2672 | ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL, | 2669 | ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL, |
2673 | skip_pcu); | 2670 | skip_pcu); |
2674 | if (ret) { | 2671 | if (ret) { |
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h index 58660e4d274a..8f919dca95f1 100644 --- a/drivers/net/wireless/ath/ath5k/base.h +++ b/drivers/net/wireless/ath/ath5k/base.h | |||
@@ -183,8 +183,6 @@ struct ath5k_softc { | |||
183 | enum nl80211_iftype opmode; | 183 | enum nl80211_iftype opmode; |
184 | struct ath5k_hw *ah; /* Atheros HW */ | 184 | struct ath5k_hw *ah; /* Atheros HW */ |
185 | 185 | ||
186 | struct ieee80211_supported_band *curband; | ||
187 | |||
188 | #ifdef CONFIG_ATH5K_DEBUG | 186 | #ifdef CONFIG_ATH5K_DEBUG |
189 | struct ath5k_dbg_info debug; /* debug info */ | 187 | struct ath5k_dbg_info debug; /* debug info */ |
190 | #endif /* CONFIG_ATH5K_DEBUG */ | 188 | #endif /* CONFIG_ATH5K_DEBUG */ |