Commit bd1ba664 authored by Johannes Berg's avatar Johannes Berg Committed by Emmanuel Grumbach

iwlwifi: mvm: move U-APSD decision to authentication

In order to change the usage of U-APSD on the fly later,
move the enabling condition into a new function that is
called when authenticated.

This allows the module parameter to become writable, it
won't take effect immediately but at least on the next
association the new value will be used.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 7fe3016f
...@@ -1490,7 +1490,7 @@ module_param_named(d0i3_disable, iwlwifi_mod_params.d0i3_disable, ...@@ -1490,7 +1490,7 @@ module_param_named(d0i3_disable, iwlwifi_mod_params.d0i3_disable,
MODULE_PARM_DESC(d0i3_disable, "disable d0i3 functionality (default: Y)"); MODULE_PARM_DESC(d0i3_disable, "disable d0i3 functionality (default: Y)");
module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable,
bool, S_IRUGO); bool, S_IRUGO | S_IWUSR);
#ifdef CONFIG_IWLWIFI_UAPSD #ifdef CONFIG_IWLWIFI_UAPSD
MODULE_PARM_DESC(uapsd_disable, "disable U-APSD functionality (default: N)"); MODULE_PARM_DESC(uapsd_disable, "disable U-APSD functionality (default: N)");
#else #else
......
...@@ -1354,10 +1354,6 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, ...@@ -1354,10 +1354,6 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
mvm->bf_allowed_vif = mvmvif; mvm->bf_allowed_vif = mvmvif;
vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER |
IEEE80211_VIF_SUPPORTS_CQM_RSSI; IEEE80211_VIF_SUPPORTS_CQM_RSSI;
if (mvm->fw->ucode_capa.flags &
IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT &&
!iwlwifi_mod_params.uapsd_disable)
vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD;
} }
/* /*
...@@ -2305,6 +2301,20 @@ static void iwl_mvm_sta_pre_rcu_remove(struct ieee80211_hw *hw, ...@@ -2305,6 +2301,20 @@ static void iwl_mvm_sta_pre_rcu_remove(struct ieee80211_hw *hw,
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
} }
static void iwl_mvm_check_uapsd(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
const u8 *bssid)
{
if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT))
return;
if (iwlwifi_mod_params.uapsd_disable) {
vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD;
return;
}
vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD;
}
static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw, static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
...@@ -2364,6 +2374,7 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw, ...@@ -2364,6 +2374,7 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
* Reset EBS status here assuming environment has been changed. * Reset EBS status here assuming environment has been changed.
*/ */
mvm->last_ebs_successful = true; mvm->last_ebs_successful = true;
iwl_mvm_check_uapsd(mvm, vif, sta->addr);
ret = 0; ret = 0;
} else if (old_state == IEEE80211_STA_AUTH && } else if (old_state == IEEE80211_STA_AUTH &&
new_state == IEEE80211_STA_ASSOC) { new_state == IEEE80211_STA_ASSOC) {
......
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