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/rx.c | |
parent | iwlwifi: pcie: move warning message into warning (diff) | |
download | linux-fb8b8ee10e1bff6531d588525d6b6c3440e71e11.tar.xz linux-fb8b8ee10e1bff6531d588525d6b6c3440e71e11.zip |
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/rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c index a4af5019a496..3a1f3982109d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/iwlwifi/mvm/rx.c @@ -300,10 +300,14 @@ int iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, return 0; } + /* + * Keep packets with CRC errors (and with overrun) for monitor mode + * (otherwise the firmware discards them) but mark them as bad. + */ if (!(rx_pkt_status & RX_MPDU_RES_STATUS_CRC_OK) || !(rx_pkt_status & RX_MPDU_RES_STATUS_OVERRUN_OK)) { IWL_DEBUG_RX(mvm, "Bad CRC or FIFO: 0x%08X.\n", rx_pkt_status); - return 0; + rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; } /* This will be used in several places later */ |