Commit 866a6a85 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Luca Coelho

iwlwifi: mvm: rely on mac80211 to configure TWT support

Mac80211 will check both the HE Capability IE and the
Extended Capability IE, so set the TWT support bit when
mac80211 tells us to.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 7360f99e
...@@ -778,27 +778,9 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm, ...@@ -778,27 +778,9 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
if (vif->bss_conf.assoc && vif->bss_conf.he_support && if (vif->bss_conf.assoc && vif->bss_conf.he_support &&
!iwlwifi_mod_params.disable_11ax) { !iwlwifi_mod_params.disable_11ax) {
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
u8 sta_id = mvmvif->ap_sta_id;
cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_11AX); cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_11AX);
if (sta_id != IWL_MVM_INVALID_STA) { if (vif->bss_conf.twt_requester)
struct ieee80211_sta *sta; ctxt_sta->data_policy |= cpu_to_le32(TWT_SUPPORTED);
sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id],
lockdep_is_held(&mvm->mutex));
/*
* TODO: we should check the ext cap IE but it is
* unclear why the spec requires two bits (one in HE
* cap IE, and one in the ext cap IE). In the meantime
* rely on the HE cap IE only.
*/
if (sta && (sta->he_cap.he_cap_elem.mac_cap_info[0] &
IEEE80211_HE_MAC_CAP0_TWT_RES))
ctxt_sta->data_policy |=
cpu_to_le32(TWT_SUPPORTED);
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment