summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-10-19 02:33:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-30 16:50:37 -0400
commit0a3b7bac673ee9462f5defe808609746d27af50d (patch)
tree5bb366282dc49d28406dc2a8e5afb45c2df2f5c0 /drivers/net/wireless/ath/ath9k/hw.c
parentdc51dd503953a8bed545d10eb89fb3340a98879b (diff)
downloadlwn-0a3b7bac673ee9462f5defe808609746d27af50d.tar.gz
lwn-0a3b7bac673ee9462f5defe808609746d27af50d.zip
ath9k_hw: make both analog channel change routines return int
This allows us to later define a callback for both. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 4c3ff2e429e7..d4dc1cbe00aa 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1868,6 +1868,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_channel *channel = chan->chan;
u32 synthDelay, qnum;
+ int r;
for (qnum = 0; qnum < AR_NUM_QCU; qnum++) {
if (ath9k_hw_numtxpending(ah, qnum)) {
@@ -1888,14 +1889,14 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
ath9k_hw_set_regs(ah, chan);
- if (AR_SREV_9280_10_OR_LATER(ah)) {
- ath9k_hw_ar9280_set_channel(ah, chan);
- } else {
- if (!(ath9k_hw_set_channel(ah, chan))) {
- ath_print(common, ATH_DBG_FATAL,
- "Failed to set channel\n");
- return false;
- }
+ if (AR_SREV_9280_10_OR_LATER(ah))
+ r = ath9k_hw_ar9280_set_channel(ah, chan);
+ else
+ r = ath9k_hw_set_channel(ah, chan);
+ if (r) {
+ ath_print(common, ATH_DBG_FATAL,
+ "Failed to set channel\n");
+ return false;
}
ah->eep_ops->set_txpower(ah, chan,
@@ -2534,10 +2535,11 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
REG_WRITE(ah, AR_RSSI_THR, INIT_RSSI_THR);
if (AR_SREV_9280_10_OR_LATER(ah))
- ath9k_hw_ar9280_set_channel(ah, chan);
+ r = ath9k_hw_ar9280_set_channel(ah, chan);
else
- if (!(ath9k_hw_set_channel(ah, chan)))
- return -EIO;
+ r = ath9k_hw_set_channel(ah, chan);
+ if (r)
+ return r;
for (i = 0; i < AR_NUM_DCU; i++)
REG_WRITE(ah, AR_DQCUMASK(i), 1 << i);