aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mshajakhan@atheros.com>2010-12-09 11:18:54 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:28 -0500
commitf33fdcf1b3a02fb92971a577d194ec6c579374af (patch)
tree434f96f3b49b0b16dd01c2ee084833428d6339f3
parent01123e233193a544c85b622e1690f44532052c5b (diff)
ath9k: clean up hardware code for beacon handling
The registers TBTT_TIMER ,DMA_BEACON_ALERT ,NEXT_SWBA are need to be configured only for AP and IBSS mode. SWBA register is used for generating software interrupts so that beacon frames will be created by the software.DMA beacon alert register is to indicate the hardware to DMA the contents of beacon buffer to PCU buffer and TBTT to start transmitting the packet buffer to the base band. Clearly these things are not needed for station/monitor mode so remove configuring them. Cc: doug dahlby <ddahlby@atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 516227fa668e..1beb89673b0c 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1632,12 +1632,6 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
1632 ENABLE_REGWRITE_BUFFER(ah); 1632 ENABLE_REGWRITE_BUFFER(ah);
1633 1633
1634 switch (ah->opmode) { 1634 switch (ah->opmode) {
1635 case NL80211_IFTYPE_STATION:
1636 REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(next_beacon));
1637 REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff);
1638 REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff);
1639 flags |= AR_TBTT_TIMER_EN;
1640 break;
1641 case NL80211_IFTYPE_ADHOC: 1635 case NL80211_IFTYPE_ADHOC:
1642 case NL80211_IFTYPE_MESH_POINT: 1636 case NL80211_IFTYPE_MESH_POINT:
1643 REG_SET_BIT(ah, AR_TXCFG, 1637 REG_SET_BIT(ah, AR_TXCFG,
@@ -1661,14 +1655,6 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
1661 AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN; 1655 AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN;
1662 break; 1656 break;
1663 default: 1657 default:
1664 if (ah->is_monitoring) {
1665 REG_WRITE(ah, AR_NEXT_TBTT_TIMER,
1666 TU_TO_USEC(next_beacon));
1667 REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff);
1668 REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff);
1669 flags |= AR_TBTT_TIMER_EN;
1670 break;
1671 }
1672 ath_dbg(ath9k_hw_common(ah), ATH_DBG_BEACON, 1658 ath_dbg(ath9k_hw_common(ah), ATH_DBG_BEACON,
1673 "%s: unsupported opmode: %d\n", 1659 "%s: unsupported opmode: %d\n",
1674 __func__, ah->opmode); 1660 __func__, ah->opmode);