summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/hw.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-11-18 09:09:54 +0530
committerJohn W. Linville <linville@tuxdriver.com>2008-11-26 09:47:33 -0500
commit788a3d6f3df595a6537ef537433c870d090afe02 (patch)
treeb34dde0a02d80f75a236be89f78c69cd059a635b /drivers/net/wireless/ath9k/hw.c
parentc428839008f6638317a0db102d4e65d631c288a6 (diff)
ath9k: Fix bug in deciphering channel flags
CHANNEL_CCK flag is set for all 2 Ghz channels, so IS_CHAN_CCK() would turn out to be true for all channles in that band. Use IS_CHAN_B() now, which checks the channel mode and not the channel flags. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath9k/hw.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
index eb1445143bc..10f6c08f6eb 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -86,10 +86,11 @@ static u32 ath9k_hw_mac_to_clks(struct ath_hal *ah, u32 usecs)
enum wireless_mode ath9k_hw_chan2wmode(struct ath_hal *ah,
const struct ath9k_channel *chan)
{
- if (IS_CHAN_CCK(chan))
- return ATH9K_MODE_11A;
+ if (IS_CHAN_B(chan))
+ return ATH9K_MODE_11B;
if (IS_CHAN_G(chan))
return ATH9K_MODE_11G;
+
return ATH9K_MODE_11A;
}
@@ -909,7 +910,7 @@ static void ath9k_hw_init_bb(struct ath_hal *ah,
u32 synthDelay;
synthDelay = REG_READ(ah, AR_PHY_RX_DELAY) & AR_PHY_RX_DELAY_DELAY;
- if (IS_CHAN_CCK(chan))
+ if (IS_CHAN_B(chan))
synthDelay = (4 * synthDelay) / 22;
else
synthDelay /= 10;
@@ -1647,7 +1648,7 @@ static struct ath9k_channel *ath9k_hw_check_chan(struct ath_hal *ah,
}
if (!IS_CHAN_OFDM(chan) &&
- !IS_CHAN_CCK(chan) &&
+ !IS_CHAN_B(chan) &&
!IS_CHAN_HT20(chan) &&
!IS_CHAN_HT40(chan)) {
DPRINTF(ah->ah_sc, ATH_DBG_CHANNEL,
@@ -1711,7 +1712,7 @@ static bool ath9k_hw_channel_change(struct ath_hal *ah,
}
synthDelay = REG_READ(ah, AR_PHY_RX_DELAY) & AR_PHY_RX_DELAY_DELAY;
- if (IS_CHAN_CCK(chan))
+ if (IS_CHAN_B(chan))
synthDelay = (4 * synthDelay) / 22;
else
synthDelay /= 10;