wifi: mac80211: don't set bss_conf in parsing
When parsing 6 GHz operation, don't set the bss_conf values. We only commit to that later in association, so move the code there. Also clear it later. While at it, handle IEEE80211_6GHZ_CTRL_REG_VLP_AP. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240111181514.c2da4bc515e8.I219ca40e15c0fbaff0e7c3e83ca4b92ecbc1f8ae@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
f04d2c247e
commit
bc8a0fac86
2 changed files with 28 additions and 20 deletions
|
@ -3081,6 +3081,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
|
||||||
memset(ifmgd->tx_tspec, 0, sizeof(ifmgd->tx_tspec));
|
memset(ifmgd->tx_tspec, 0, sizeof(ifmgd->tx_tspec));
|
||||||
wiphy_delayed_work_cancel(local->hw.wiphy, &ifmgd->tx_tspec_wk);
|
wiphy_delayed_work_cancel(local->hw.wiphy, &ifmgd->tx_tspec_wk);
|
||||||
|
|
||||||
|
sdata->vif.bss_conf.power_type = IEEE80211_REG_UNSET_AP;
|
||||||
sdata->vif.bss_conf.pwr_reduction = 0;
|
sdata->vif.bss_conf.pwr_reduction = 0;
|
||||||
sdata->vif.bss_conf.tx_pwr_env_num = 0;
|
sdata->vif.bss_conf.tx_pwr_env_num = 0;
|
||||||
memset(sdata->vif.bss_conf.tx_pwr_env, 0,
|
memset(sdata->vif.bss_conf.tx_pwr_env, 0,
|
||||||
|
@ -4236,12 +4237,38 @@ static bool ieee80211_assoc_config_link(struct ieee80211_link_data *link,
|
||||||
|
|
||||||
if (elems->he_operation && !(link->u.mgd.conn_flags & IEEE80211_CONN_DISABLE_HE) &&
|
if (elems->he_operation && !(link->u.mgd.conn_flags & IEEE80211_CONN_DISABLE_HE) &&
|
||||||
elems->he_cap) {
|
elems->he_cap) {
|
||||||
|
const struct ieee80211_he_6ghz_oper *he_6ghz_oper;
|
||||||
|
|
||||||
ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband,
|
ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband,
|
||||||
elems->he_cap,
|
elems->he_cap,
|
||||||
elems->he_cap_len,
|
elems->he_cap_len,
|
||||||
elems->he_6ghz_capa,
|
elems->he_6ghz_capa,
|
||||||
link_sta);
|
link_sta);
|
||||||
|
|
||||||
|
he_6ghz_oper = ieee80211_he_6ghz_oper(elems->he_operation);
|
||||||
|
|
||||||
|
if (is_6ghz && he_6ghz_oper) {
|
||||||
|
switch (u8_get_bits(he_6ghz_oper->control,
|
||||||
|
IEEE80211_HE_6GHZ_OPER_CTRL_REG_INFO)) {
|
||||||
|
case IEEE80211_6GHZ_CTRL_REG_LPI_AP:
|
||||||
|
bss_conf->power_type = IEEE80211_REG_LPI_AP;
|
||||||
|
break;
|
||||||
|
case IEEE80211_6GHZ_CTRL_REG_SP_AP:
|
||||||
|
bss_conf->power_type = IEEE80211_REG_SP_AP;
|
||||||
|
break;
|
||||||
|
case IEEE80211_6GHZ_CTRL_REG_VLP_AP:
|
||||||
|
bss_conf->power_type = IEEE80211_REG_VLP_AP;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
bss_conf->power_type = IEEE80211_REG_UNSET_AP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (is_6ghz) {
|
||||||
|
link_info(link,
|
||||||
|
"HE 6 GHz operation missing (on %d MHz), expect issues\n",
|
||||||
|
bss_conf->chandef.chan->center_freq);
|
||||||
|
}
|
||||||
|
|
||||||
bss_conf->he_support = link_sta->pub->he_cap.has_he;
|
bss_conf->he_support = link_sta->pub->he_cap.has_he;
|
||||||
if (elems->rsnx && elems->rsnx_len &&
|
if (elems->rsnx && elems->rsnx_len &&
|
||||||
(elems->rsnx[0] & WLAN_RSNX_CAPA_PROTECTED_TWT) &&
|
(elems->rsnx[0] & WLAN_RSNX_CAPA_PROTECTED_TWT) &&
|
||||||
|
|
|
@ -3845,7 +3845,6 @@ bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata,
|
||||||
const struct ieee80211_sta_eht_cap *eht_cap;
|
const struct ieee80211_sta_eht_cap *eht_cap;
|
||||||
struct cfg80211_chan_def he_chandef = *chandef;
|
struct cfg80211_chan_def he_chandef = *chandef;
|
||||||
const struct ieee80211_he_6ghz_oper *he_6ghz_oper;
|
const struct ieee80211_he_6ghz_oper *he_6ghz_oper;
|
||||||
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
|
|
||||||
bool support_80_80, support_160, support_320;
|
bool support_80_80, support_160, support_320;
|
||||||
u8 he_phy_cap, eht_phy_cap;
|
u8 he_phy_cap, eht_phy_cap;
|
||||||
u32 freq;
|
u32 freq;
|
||||||
|
@ -3881,13 +3880,8 @@ bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata,
|
||||||
eht_oper = NULL;
|
eht_oper = NULL;
|
||||||
|
|
||||||
he_6ghz_oper = ieee80211_he_6ghz_oper(he_oper);
|
he_6ghz_oper = ieee80211_he_6ghz_oper(he_oper);
|
||||||
|
if (!he_6ghz_oper)
|
||||||
if (!he_6ghz_oper) {
|
|
||||||
sdata_info(sdata,
|
|
||||||
"HE 6GHz operation missing (on %d MHz), expect issues\n",
|
|
||||||
chandef->chan->center_freq);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The EHT operation IE does not contain the primary channel so the
|
* The EHT operation IE does not contain the primary channel so the
|
||||||
|
@ -3898,19 +3892,6 @@ bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata,
|
||||||
NL80211_BAND_6GHZ);
|
NL80211_BAND_6GHZ);
|
||||||
he_chandef.chan = ieee80211_get_channel(sdata->local->hw.wiphy, freq);
|
he_chandef.chan = ieee80211_get_channel(sdata->local->hw.wiphy, freq);
|
||||||
|
|
||||||
switch (u8_get_bits(he_6ghz_oper->control,
|
|
||||||
IEEE80211_HE_6GHZ_OPER_CTRL_REG_INFO)) {
|
|
||||||
case IEEE80211_6GHZ_CTRL_REG_LPI_AP:
|
|
||||||
bss_conf->power_type = IEEE80211_REG_LPI_AP;
|
|
||||||
break;
|
|
||||||
case IEEE80211_6GHZ_CTRL_REG_SP_AP:
|
|
||||||
bss_conf->power_type = IEEE80211_REG_SP_AP;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
bss_conf->power_type = IEEE80211_REG_UNSET_AP;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!eht_oper ||
|
if (!eht_oper ||
|
||||||
!(eht_oper->params & IEEE80211_EHT_OPER_INFO_PRESENT)) {
|
!(eht_oper->params & IEEE80211_EHT_OPER_INFO_PRESENT)) {
|
||||||
switch (u8_get_bits(he_6ghz_oper->control,
|
switch (u8_get_bits(he_6ghz_oper->control,
|
||||||
|
|
Loading…
Add table
Reference in a new issue