mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-24 06:50:12 -04:00
wifi: mac80211: set AP NPCA parameters in bss_conf
Set the parameters advertised in the beacon in the BSS configuration as well. Note this is incomplete since it doesn't track updates. Link: https://patch.msgid.link/20260428112708.311609f2eedb.I3db62b48d6afefd23b50fd14663f863e6f9974ca@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -1725,10 +1725,42 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
}
|
||||
|
||||
if (params->beacon.uhr_oper) {
|
||||
const struct ieee80211_uhr_npca_info *npca;
|
||||
struct ieee80211_bss_npca_params npca_params = {};
|
||||
|
||||
if (!link_conf->eht_support)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
link_conf->uhr_support = true;
|
||||
|
||||
npca = ieee80211_uhr_npca_info(params->beacon.uhr_oper);
|
||||
if (!npca) {
|
||||
chanreq.oper.npca_chan = NULL;
|
||||
chanreq.oper.npca_punctured = 0;
|
||||
} else {
|
||||
npca_params.min_dur_thresh =
|
||||
le32_get_bits(npca->params,
|
||||
IEEE80211_UHR_NPCA_PARAMS_MIN_DUR_THRESH);
|
||||
npca_params.switch_delay =
|
||||
le32_get_bits(npca->params,
|
||||
IEEE80211_UHR_NPCA_PARAMS_SWITCH_DELAY);
|
||||
npca_params.switch_back_delay =
|
||||
le32_get_bits(npca->params,
|
||||
IEEE80211_UHR_NPCA_PARAMS_SWITCH_BACK_DELAY);
|
||||
npca_params.init_qsrc =
|
||||
le32_get_bits(npca->params,
|
||||
IEEE80211_UHR_NPCA_PARAMS_INIT_QSRC);
|
||||
npca_params.moplen =
|
||||
le32_get_bits(npca->params,
|
||||
IEEE80211_UHR_NPCA_PARAMS_MOPLEN);
|
||||
npca_params.enabled = true;
|
||||
}
|
||||
|
||||
if (memcmp(&npca_params, &link->conf->npca,
|
||||
sizeof(npca_params))) {
|
||||
link->conf->npca = npca_params;
|
||||
changed |= BSS_CHANGED_NPCA;
|
||||
}
|
||||
}
|
||||
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP &&
|
||||
|
||||
Reference in New Issue
Block a user