mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
iwlwifi: mvm: Implement per vif frame registration API
Implement config_iface_filter() driver op. Currently support only probe request registration for p2p client vifs, by setting MAC_FILTER_IN_PROBE_REQUEST flag in MAC_CONTEXT_CMD. This is needed since WFDS spec and certification require a P2P client to be discoverable on its operating channel. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:
parent
053225de12
commit
effd19298c
@ -843,6 +843,9 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
|
|||||||
ctxt_sta->listen_interval = cpu_to_le32(mvm->hw->conf.listen_interval);
|
ctxt_sta->listen_interval = cpu_to_le32(mvm->hw->conf.listen_interval);
|
||||||
ctxt_sta->assoc_id = cpu_to_le32(vif->bss_conf.aid);
|
ctxt_sta->assoc_id = cpu_to_le32(vif->bss_conf.aid);
|
||||||
|
|
||||||
|
if (vif->probe_req_reg && vif->bss_conf.assoc && vif->p2p)
|
||||||
|
cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST);
|
||||||
|
|
||||||
return iwl_mvm_mac_ctxt_send_cmd(mvm, &cmd);
|
return iwl_mvm_mac_ctxt_send_cmd(mvm, &cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1996,6 +1996,27 @@ out:
|
|||||||
*total_flags = 0;
|
*total_flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void iwl_mvm_config_iface_filter(struct ieee80211_hw *hw,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
unsigned int filter_flags,
|
||||||
|
unsigned int changed_flags)
|
||||||
|
{
|
||||||
|
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||||
|
|
||||||
|
/* We support only filter for probe requests */
|
||||||
|
if (!(changed_flags & FIF_PROBE_REQ))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Supported only for p2p client interfaces */
|
||||||
|
if (vif->type != NL80211_IFTYPE_STATION || !vif->bss_conf.assoc ||
|
||||||
|
!vif->p2p)
|
||||||
|
return;
|
||||||
|
|
||||||
|
mutex_lock(&mvm->mutex);
|
||||||
|
iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
|
||||||
|
mutex_unlock(&mvm->mutex);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
|
#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
|
||||||
struct iwl_bcast_iter_data {
|
struct iwl_bcast_iter_data {
|
||||||
struct iwl_mvm *mvm;
|
struct iwl_mvm *mvm;
|
||||||
@ -4175,6 +4196,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
|
|||||||
.config = iwl_mvm_mac_config,
|
.config = iwl_mvm_mac_config,
|
||||||
.prepare_multicast = iwl_mvm_prepare_multicast,
|
.prepare_multicast = iwl_mvm_prepare_multicast,
|
||||||
.configure_filter = iwl_mvm_configure_filter,
|
.configure_filter = iwl_mvm_configure_filter,
|
||||||
|
.config_iface_filter = iwl_mvm_config_iface_filter,
|
||||||
.bss_info_changed = iwl_mvm_bss_info_changed,
|
.bss_info_changed = iwl_mvm_bss_info_changed,
|
||||||
.hw_scan = iwl_mvm_mac_hw_scan,
|
.hw_scan = iwl_mvm_mac_hw_scan,
|
||||||
.cancel_hw_scan = iwl_mvm_mac_cancel_hw_scan,
|
.cancel_hw_scan = iwl_mvm_mac_cancel_hw_scan,
|
||||||
|
Loading…
Reference in New Issue
Block a user