diff options
author | Chatre, Reinette <reinette.chatre@intel.com> | 2009-01-23 16:45:09 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:31 -0500 |
commit | 4c4df78f5e224fd59fe337773878eca681ed02a9 (patch) | |
tree | d339341bf8abbee3bbc13f9dd7c59d15cc43bde5 /drivers/net/wireless/iwlwifi/iwl-core.c | |
parent | 1a9f509368ceb24fc66be961be15c69966f5eb5d (diff) |
iwlwifi: add test to determine if interface in monitor mode
mac80211 sets driver in monitor mode through configuring the
RX filters. We cannot trust priv->iw_mode to be accurate
regarding monitor mode as iw_mode is only set in add_interface,
which is not called by mac80211 when in monitor mode.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 9f284ebb6c28..ef4a7c54c736 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -699,6 +699,18 @@ static u8 iwl_count_chain_bitmap(u32 chain_bitmap) | |||
699 | } | 699 | } |
700 | 700 | ||
701 | /** | 701 | /** |
702 | * iwl_is_monitor_mode - Determine if interface in monitor mode | ||
703 | * | ||
704 | * priv->iw_mode is set in add_interface, but add_interface is | ||
705 | * never called for monitor mode. The only way mac80211 informs us about | ||
706 | * monitor mode is through configuring filters (call to configure_filter). | ||
707 | */ | ||
708 | static bool iwl_is_monitor_mode(struct iwl_priv *priv) | ||
709 | { | ||
710 | return !!(priv->staging_rxon.filter_flags & RXON_FILTER_PROMISC_MSK); | ||
711 | } | ||
712 | |||
713 | /** | ||
702 | * iwl_set_rxon_chain - Set up Rx chain usage in "staging" RXON image | 714 | * iwl_set_rxon_chain - Set up Rx chain usage in "staging" RXON image |
703 | * | 715 | * |
704 | * Selects how many and which Rx receivers/antennas/chains to use. | 716 | * Selects how many and which Rx receivers/antennas/chains to use. |