aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index c686987c4840..ce9e59f4cd3d 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -479,6 +479,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
479 ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, 479 ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
480 "Failed allocating banks for " 480 "Failed allocating banks for "
481 "external radio\n"); 481 "external radio\n");
482 ath9k_hw_rf_free_ext_banks(ah);
482 return ecode; 483 return ecode;
483 } 484 }
484 485
@@ -947,9 +948,12 @@ static void ath9k_hw_set_operating_mode(struct ath_hw *ah, int opmode)
947 REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION); 948 REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
948 break; 949 break;
949 case NL80211_IFTYPE_STATION: 950 case NL80211_IFTYPE_STATION:
950 case NL80211_IFTYPE_MONITOR:
951 REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE); 951 REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE);
952 break; 952 break;
953 default:
954 if (ah->is_monitoring)
955 REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE);
956 break;
953 } 957 }
954} 958}
955 959
@@ -1629,7 +1633,6 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
1629 1633
1630 switch (ah->opmode) { 1634 switch (ah->opmode) {
1631 case NL80211_IFTYPE_STATION: 1635 case NL80211_IFTYPE_STATION:
1632 case NL80211_IFTYPE_MONITOR:
1633 REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(next_beacon)); 1636 REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(next_beacon));
1634 REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff); 1637 REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff);
1635 REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff); 1638 REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff);
@@ -1658,6 +1661,14 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
1658 AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN; 1661 AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN;
1659 break; 1662 break;
1660 default: 1663 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 }
1661 ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON, 1672 ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON,
1662 "%s: unsupported opmode: %d\n", 1673 "%s: unsupported opmode: %d\n",
1663 __func__, ah->opmode); 1674 __func__, ah->opmode);