Skip to content

Commit

Permalink
ath9k: Fix monitor mode handling
Browse files Browse the repository at this point in the history
mac80211 passes appropriate flags indicating whether
monitor mode is being used. Use this to set the HW opmode.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Sujith authored and John W. Linville committed Jan 12, 2010
1 parent 1395d3f commit 199afd9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,14 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
}
}

if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
if (conf->flags & IEEE80211_CONF_MONITOR) {
ath_print(common, ATH_DBG_CONFIG,
"HW opmode set to Monitor mode\n");
sc->sc_ah->opmode = NL80211_IFTYPE_MONITOR;
}
}

if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
struct ieee80211_channel *curchan = hw->conf.channel;
int pos = curchan->hw_value;
Expand Down

0 comments on commit 199afd9

Please sign in to comment.