aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-13 15:28:44 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-14 05:08:38 -0500
commit04baaa27b43d389879237b32f8bd194a94cf1ca7 (patch)
tree5bfa25ca8690f3bc905599b6c2698325ee4b495e /drivers
parent31df3bb78be614fb9125abe56972dfee79bd3e18 (diff)
iwlwifi: fix monitor mode FCS flag
When the firmware is in SNIFFER mode, it leaves the FCS at the end of frame. Not telling mac80211 means it won't add the right flag to the radiotap header and that confuses wireshark. Since mac80211 doesn't have a per-packet flag, set the HW flag dynamically. This works as the monitor vif can only be present in the driver by itself. This fixes a regression introduced by my commit 578977264199de9815ace51ade87cec4894cf010 Author: Johannes Berg <johannes.berg@intel.com> Date: Fri May 11 10:53:18 2012 +0200 iwlwifi: support explicit monitor interface Cc: stable@vger.kernel.org [3.5+] Reported-by: MARK PHILLIPS <mark.phillips@virgin.net> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/mac80211.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index fa4d1b8cd9f6..2d9eee93c743 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -1354,6 +1354,20 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
1354 vif_priv->ctx = ctx; 1354 vif_priv->ctx = ctx;
1355 ctx->vif = vif; 1355 ctx->vif = vif;
1356 1356
1357 /*
1358 * In SNIFFER device type, the firmware reports the FCS to
1359 * the host, rather than snipping it off. Unfortunately,
1360 * mac80211 doesn't (yet) provide a per-packet flag for
1361 * this, so that we have to set the hardware flag based
1362 * on the interfaces added. As the monitor interface can
1363 * only be present by itself, and will be removed before
1364 * other interfaces are added, this is safe.
1365 */
1366 if (vif->type == NL80211_IFTYPE_MONITOR)
1367 priv->hw->flags |= IEEE80211_HW_RX_INCLUDES_FCS;
1368 else
1369 priv->hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
1370
1357 err = iwl_setup_interface(priv, ctx); 1371 err = iwl_setup_interface(priv, ctx);
1358 if (!err || reset) 1372 if (!err || reset)
1359 goto out; 1373 goto out;