aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanoharan@atheros.com>2010-10-27 09:01:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-08 16:53:46 -0500
commit5f841b4130a639e5f0fbcf4a9b26045d734e4ee6 (patch)
tree2a13d6467b753647a779cb47f2cb97d440f4d2b8 /drivers/net/wireless/ath/ath9k/main.c
parent269e2d77b82d92d8dad543a2375e74372e9d773e (diff)
ath9k: Avoid HW opmode overridden on monitor mode changes
The HW opmode is blindly set to monitor type on monitor mode change notification. This overrides the opmode when one of the interfaces is still running as non-monitor iftype. So the monitoring information needs to be maintained seperately. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index b52f1cf8a603..cf6fa54a2fa3 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1217,6 +1217,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
1217 ah->imask |= ATH9K_INT_CST; 1217 ah->imask |= ATH9K_INT_CST;
1218 1218
1219 sc->sc_flags &= ~SC_OP_INVALID; 1219 sc->sc_flags &= ~SC_OP_INVALID;
1220 sc->sc_ah->is_monitoring = false;
1220 1221
1221 /* Disable BMISS interrupt when we're not associated */ 1222 /* Disable BMISS interrupt when we're not associated */
1222 ah->imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS); 1223 ah->imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS);
@@ -1493,8 +1494,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1493 ath9k_hw_set_interrupts(ah, ah->imask); 1494 ath9k_hw_set_interrupts(ah, ah->imask);
1494 1495
1495 if (vif->type == NL80211_IFTYPE_AP || 1496 if (vif->type == NL80211_IFTYPE_AP ||
1496 vif->type == NL80211_IFTYPE_ADHOC || 1497 vif->type == NL80211_IFTYPE_ADHOC) {
1497 vif->type == NL80211_IFTYPE_MONITOR) {
1498 sc->sc_flags |= SC_OP_ANI_RUN; 1498 sc->sc_flags |= SC_OP_ANI_RUN;
1499 ath_start_ani(common); 1499 ath_start_ani(common);
1500 } 1500 }
@@ -1644,8 +1644,12 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1644 if (changed & IEEE80211_CONF_CHANGE_MONITOR) { 1644 if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
1645 if (conf->flags & IEEE80211_CONF_MONITOR) { 1645 if (conf->flags & IEEE80211_CONF_MONITOR) {
1646 ath_print(common, ATH_DBG_CONFIG, 1646 ath_print(common, ATH_DBG_CONFIG,
1647 "HW opmode set to Monitor mode\n"); 1647 "Monitor mode is enabled\n");
1648 sc->sc_ah->opmode = NL80211_IFTYPE_MONITOR; 1648 sc->sc_ah->is_monitoring = true;
1649 } else {
1650 ath_print(common, ATH_DBG_CONFIG,
1651 "Monitor mode is disabled\n");
1652 sc->sc_ah->is_monitoring = false;
1649 } 1653 }
1650 } 1654 }
1651 1655