diff options
author | Shaul Triebitz <shaul.triebitz@intel.com> | 2021-06-18 12:41:34 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2021-06-23 11:29:14 +0200 |
commit | 79ea0a5fad749dabfd7b8a1b73dd6662383762d1 (patch) | |
tree | 5b833e54386263c2558c510bb0a718112574c59c /net/mac80211 | |
parent | mac80211: allow SMPS requests only in client mode (diff) | |
download | linux-79ea0a5fad749dabfd7b8a1b73dd6662383762d1.tar.xz linux-79ea0a5fad749dabfd7b8a1b73dd6662383762d1.zip |
mac80211: move SMPS mode setting after ieee80211_prep_connection
ieee80211_mgd_assoc calls ieee80211_prep_connection which
might call ieee80211_prep_channel and set smps_mode to OFF.
That will override the previous setting of smps_mode in
ieee80211_mgd_assoc and HT SMPS will be set to "disabled"
in the association request frame.
Move the setting of smps_mode in ieee80211_mgd_assoc to
after the call to ieee80211_prep_connection.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210618133832.d8e5cc4b527f.Icf3a67fffbdd8c408c0cadfe43f8f4cffdc90acb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b1c44fa63a06..b33b155f3573 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -5646,15 +5646,6 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, 2 * FILS_NONCE_LEN); assoc_data->bss = req->bss; - - if (ifmgd->req_smps == IEEE80211_SMPS_AUTOMATIC) { - if (ifmgd->powersave) - sdata->smps_mode = IEEE80211_SMPS_DYNAMIC; - else - sdata->smps_mode = IEEE80211_SMPS_OFF; - } else - sdata->smps_mode = ifmgd->req_smps; - assoc_data->capability = req->bss->capability; assoc_data->supp_rates = bss->supp_rates; assoc_data->supp_rates_len = bss->supp_rates_len; @@ -5761,6 +5752,15 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, if (err) goto err_clear; + if (ifmgd->req_smps == IEEE80211_SMPS_AUTOMATIC) { + if (ifmgd->powersave) + sdata->smps_mode = IEEE80211_SMPS_DYNAMIC; + else + sdata->smps_mode = IEEE80211_SMPS_OFF; + } else { + sdata->smps_mode = ifmgd->req_smps; + } + rcu_read_lock(); beacon_ies = rcu_dereference(req->bss->beacon_ies); |