summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/mci.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-10-11 21:30:53 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2013-10-14 17:39:58 (GMT)
commit8896934c168474079ba1e81cf3f0c4a975b30406 (patch)
tree94851f17700e6ab892ab1589925451dd0b49b740 /drivers/net/wireless/ath/ath9k/mci.c
parent1a04d59d3ec982689552077172893b6836def984 (diff)
downloadlinux-8896934c168474079ba1e81cf3f0c4a975b30406.tar.xz
ath9k_hw: remove direct accesses to channel mode flags
Use wrappers where available. Simplifies code and helps with further improvements to the channel data structure Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mci.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 815bee2..0ac1b5f 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -661,9 +661,9 @@ void ath9k_mci_update_wlan_channels(struct ath_softc *sc, bool allow_all)
chan_start = wlan_chan - 10;
chan_end = wlan_chan + 10;
- if (chan->chanmode == CHANNEL_G_HT40PLUS)
+ if (IS_CHAN_HT40PLUS(chan))
chan_end += 20;
- else if (chan->chanmode == CHANNEL_G_HT40MINUS)
+ else if (IS_CHAN_HT40MINUS(chan))
chan_start -= 20;
/* adjust side band */
@@ -707,11 +707,11 @@ void ath9k_mci_set_txpower(struct ath_softc *sc, bool setchannel,
if (setchannel) {
struct ath9k_hw_cal_data *caldata = &sc->caldata;
- if ((caldata->chanmode == CHANNEL_G_HT40PLUS) &&
+ if (IS_CHAN_HT40PLUS(ah->curchan) &&
(ah->curchan->channel > caldata->channel) &&
(ah->curchan->channel <= caldata->channel + 20))
return;
- if ((caldata->chanmode == CHANNEL_G_HT40MINUS) &&
+ if (IS_CHAN_HT40MINUS(ah->curchan) &&
(ah->curchan->channel < caldata->channel) &&
(ah->curchan->channel >= caldata->channel - 20))
return;