|
@@ -855,11 +855,17 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm,
|
|
u32 action)
|
|
u32 action)
|
|
{
|
|
{
|
|
struct iwl_mac_ctx_cmd cmd = {};
|
|
struct iwl_mac_ctx_cmd cmd = {};
|
|
|
|
+ u32 tfd_queue_msk = 0;
|
|
|
|
+ int ret, i;
|
|
|
|
|
|
WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
|
|
WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
|
|
|
|
|
|
iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, NULL, action);
|
|
iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, NULL, action);
|
|
|
|
|
|
|
|
+ for (i = 0; i < IEEE80211_NUM_ACS; i++)
|
|
|
|
+ if (vif->hw_queue[i] != IEEE80211_INVAL_HW_QUEUE)
|
|
|
|
+ tfd_queue_msk |= BIT(vif->hw_queue[i]);
|
|
|
|
+
|
|
cmd.filter_flags = cpu_to_le32(MAC_FILTER_IN_PROMISC |
|
|
cmd.filter_flags = cpu_to_le32(MAC_FILTER_IN_PROMISC |
|
|
MAC_FILTER_IN_CONTROL_AND_MGMT |
|
|
MAC_FILTER_IN_CONTROL_AND_MGMT |
|
|
MAC_FILTER_IN_BEACON |
|
|
MAC_FILTER_IN_BEACON |
|
|
@@ -867,6 +873,12 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm,
|
|
MAC_FILTER_IN_CRC32);
|
|
MAC_FILTER_IN_CRC32);
|
|
ieee80211_hw_set(mvm->hw, RX_INCLUDES_FCS);
|
|
ieee80211_hw_set(mvm->hw, RX_INCLUDES_FCS);
|
|
|
|
|
|
|
|
+ /* Allocate sniffer station */
|
|
|
|
+ ret = iwl_mvm_allocate_int_sta(mvm, &mvm->snif_sta, tfd_queue_msk,
|
|
|
|
+ vif->type);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
+
|
|
return iwl_mvm_mac_ctxt_send_cmd(mvm, &cmd);
|
|
return iwl_mvm_mac_ctxt_send_cmd(mvm, &cmd);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1289,8 +1301,10 @@ int iwl_mvm_mac_ctxt_remove(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
|
|
|
|
|
mvmvif->uploaded = false;
|
|
mvmvif->uploaded = false;
|
|
|
|
|
|
- if (vif->type == NL80211_IFTYPE_MONITOR)
|
|
|
|
|
|
+ if (vif->type == NL80211_IFTYPE_MONITOR) {
|
|
__clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, mvm->hw->flags);
|
|
__clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, mvm->hw->flags);
|
|
|
|
+ iwl_mvm_dealloc_snif_sta(mvm);
|
|
|
|
+ }
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|