Skip to content

Commit

Permalink
iwlwifi: add test to determine if interface in monitor mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chatre, Reinette authored and John W. Linville committed Jan 29, 2009
1 parent 1a9f509 commit 4c4df78
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,18 @@ static u8 iwl_count_chain_bitmap(u32 chain_bitmap)
return res;
}

/**
* iwl_is_monitor_mode - Determine if interface in monitor mode
*
* priv->iw_mode is set in add_interface, but add_interface is
* never called for monitor mode. The only way mac80211 informs us about
* monitor mode is through configuring filters (call to configure_filter).
*/
static bool iwl_is_monitor_mode(struct iwl_priv *priv)
{
return !!(priv->staging_rxon.filter_flags & RXON_FILTER_PROMISC_MSK);
}

/**
* iwl_set_rxon_chain - Set up Rx chain usage in "staging" RXON image
*
Expand Down

0 comments on commit 4c4df78

Please sign in to comment.