diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-10-21 12:37:53 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-10-29 14:52:25 +0100 |
commit | fb8b8ee10e1bff6531d588525d6b6c3440e71e11 (patch) | |
tree | 6acae73f224abff273d74b87e26e5653b96ed406 /drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | |
parent | bcbb8c9c7d42e012d8f73dfcccfcc56d5c8da431 (diff) | |
download | op-kernel-dev-fb8b8ee10e1bff6531d588525d6b6c3440e71e11.zip op-kernel-dev-fb8b8ee10e1bff6531d588525d6b6c3440e71e11.tar.gz |
iwlwifi: mvm: capture the FCS in monitor mode
This can be useful when using the device as a sniffer.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index ab5a7ac..f41f9b0 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c @@ -719,7 +719,9 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm, cmd.filter_flags = cpu_to_le32(MAC_FILTER_IN_PROMISC | MAC_FILTER_IN_CONTROL_AND_MGMT | MAC_FILTER_IN_BEACON | - MAC_FILTER_IN_PROBE_REQUEST); + MAC_FILTER_IN_PROBE_REQUEST | + MAC_FILTER_IN_CRC32); + mvm->hw->flags |= IEEE80211_HW_RX_INCLUDES_FCS; return iwl_mvm_mac_ctxt_send_cmd(mvm, &cmd); } @@ -1122,6 +1124,10 @@ int iwl_mvm_mac_ctxt_remove(struct iwl_mvm *mvm, struct ieee80211_vif *vif) } mvmvif->uploaded = false; + + if (vif->type == NL80211_IFTYPE_MONITOR) + mvm->hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS; + return 0; } |