From: Bruno Randolf <br1@einfach.org>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 8/8] ath5k: Remove redundant sc->curband
Date: Wed, 19 Jan 2011 18:21:13 +0900 [thread overview]
Message-ID: <20110119092113.19628.33322.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>
Remove sc->curband because the band is already stored in the current channel.
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
drivers/net/wireless/ath/ath5k/base.c | 11 ++++-------
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 a00cc11..0e39ee8 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -551,7 +551,7 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
"hw_rix out of bounds: %x\n", hw_rix))
return 0;
- rix = sc->rate_idx[sc->curband->band][hw_rix];
+ rix = sc->rate_idx[sc->curchan->band][hw_rix];
if (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix))
rix = 0;
@@ -1361,7 +1361,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
rxs->flag |= RX_FLAG_TSFT;
rxs->freq = sc->curchan->center_freq;
- rxs->band = sc->curband->band;
+ rxs->band = sc->curchan->band;
rxs->signal = sc->ah->ah_noise_floor + rs->rs_rssi;
@@ -1376,7 +1376,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
rxs->flag |= ath5k_rx_decrypted(sc, skb, rs);
if (rxs->rate_idx >= 0 && rs->rs_rate ==
- sc->curband->bitrates[rxs->rate_idx].hw_value_short)
+ sc->sbands[sc->curchan->band].bitrates[rxs->rate_idx].hw_value_short)
rxs->flag |= RX_FLAG_SHORTPRE;
ath5k_debug_dump_skb(sc, skb, "RX ", 0);
@@ -2536,7 +2536,6 @@ ath5k_init_hw(struct ath5k_softc *sc)
* and then setup of the interrupt mask.
*/
sc->curchan = sc->hw->conf.channel;
- sc->curband = &sc->sbands[sc->curchan->band];
sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL |
AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL |
AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB;
@@ -2663,10 +2662,8 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
* so we should also free any remaining
* tx buffers */
ath5k_drain_tx_buffs(sc);
- if (chan) {
+ if (chan)
sc->curchan = chan;
- sc->curband = &sc->sbands[chan->band];
- }
ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL,
skip_pcu);
if (ret) {
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index 58660e4..8f919dc 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -183,8 +183,6 @@ struct ath5k_softc {
enum nl80211_iftype opmode;
struct ath5k_hw *ah; /* Atheros HW */
- struct ieee80211_supported_band *curband;
-
#ifdef CONFIG_ATH5K_DEBUG
struct ath5k_dbg_info debug; /* debug info */
#endif /* CONFIG_ATH5K_DEBUG */
next prev parent reply other threads:[~2011-01-19 9:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 9:20 [PATCH 0/8] ath5k 802.11j preparation and cleanup Bruno Randolf
2011-01-19 9:20 ` [PATCH 1/8] ath5k: Use mac80211 channel mapping function Bruno Randolf
2011-01-19 15:39 ` Bob Copeland
2011-01-19 9:20 ` [PATCH 2/8] ath5k: Simplify loop when setting up channels Bruno Randolf
2011-01-19 11:07 ` Bob Copeland
2011-01-19 11:51 ` Bruno Randolf
2011-01-19 9:20 ` [PATCH 3/8] ath5k: Rename ath5k_copy_channels Bruno Randolf
2011-01-19 11:08 ` Bob Copeland
2011-01-19 15:54 ` Nick Kossifidis
2011-01-19 9:20 ` [PATCH 4/8] ath5k: ath5k_setup_channels cleanup and whitespace Bruno Randolf
2011-01-19 11:09 ` Bob Copeland
2011-01-19 15:57 ` Nick Kossifidis
2011-01-19 9:20 ` [PATCH 5/8] ath5k: Add 802.11j 4.9GHz channels to allowed channels Bruno Randolf
2011-01-19 11:14 ` Bob Copeland
2011-01-19 11:52 ` Bruno Randolf
2011-01-19 15:18 ` Bob Copeland
2011-01-19 15:55 ` Nick Kossifidis
2011-01-19 9:21 ` [PATCH 6/8] ath5: Remove unused CTL definitions Bruno Randolf
2011-01-19 11:15 ` Bob Copeland
2011-01-19 15:55 ` Nick Kossifidis
2011-01-19 9:21 ` [PATCH 7/8] ath5k: Remove unused sc->curmode Bruno Randolf
2011-01-19 11:17 ` Bob Copeland
2011-01-19 15:56 ` Nick Kossifidis
2011-01-19 9:21 ` Bruno Randolf [this message]
2011-01-19 11:19 ` [PATCH 8/8] ath5k: Remove redundant sc->curband Bob Copeland
2011-01-19 15:57 ` Nick Kossifidis
2011-01-19 15:58 ` [PATCH 0/8] ath5k 802.11j preparation and cleanup Nick Kossifidis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110119092113.19628.33322.stgit@localhost6.localdomain6 \
--to=br1@einfach.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox