diff options
author | Benjamin Berg <benjamin.berg@intel.com> | 2024-02-01 15:05:01 +0100 |
---|---|---|
committer | iwlwifi publisher <> | 2024-04-17 12:43:21 +0000 |
commit | 12fb3a48f577285e46a95e2e63841888c8a2bcce (patch) | |
tree | 753b97618a10b0f4a70cc0c565652f3b62b4f538 | |
parent | b1cb900ebfa7988ebf4a0257b8e1f7addfcfe180 (diff) | |
download | backport-iwlwifi-12fb3a48f577285e46a95e2e63841888c8a2bcce.tar.gz |
[BUGFIX] wifi: cfg80211: set correct param change count in ML element
The ML element generation code to create a BSS entry from a per-STA
profile was not overwriting the BSS parameter change count. This meant
that the incorrect parameter change count would be reported within the
multi-link element.
Fix this by returning the BSS parameter change count from the function
and placing it into the ML element. The returned tbtt info was never
used, so just drop that to simplify the code.
type=bugfix
ticket=none
fixes=Ide468f95dd63b77c154aa6d0e0fc24ceccfc5cd1
Fixes: 5f478adf1f99 ("wifi: cfg80211: generate an ML element for per-STA profiles")
Change-Id: I06b122c7a319a38b4e970f5e0bd3d3ef9cac4cbe
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/92459
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Tested-by: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
x-iwlwifi-stack-dev: 192ff22befb18aa53ea907b792f12d598e4d7343
-rw-r--r-- | net/wireless/scan.c | 26 | ||||
-rw-r--r-- | versions | 2 |
2 files changed, 17 insertions, 11 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index e6abb8f4ad..a322d0e522 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2567,9 +2567,9 @@ error: } static u8 -cfg80211_tbtt_info_for_mld_ap(const u8 *ie, size_t ielen, u8 mld_id, u8 link_id, - const struct ieee80211_neighbor_ap_info **ap_info, - const u8 **tbtt_info) +cfg80211_rnr_info_for_mld_ap(const u8 *ie, size_t ielen, u8 mld_id, u8 link_id, + const struct ieee80211_neighbor_ap_info **ap_info, + u8 *param_ch_count) { const struct ieee80211_neighbor_ap_info *info; const struct element *rnr; @@ -2626,7 +2626,9 @@ cfg80211_tbtt_info_for_mld_ap(const u8 *ie, size_t ielen, u8 mld_id, u8 link_id, if (mld_id == mld_params->mld_id && link_id == lid) { *ap_info = info; - *tbtt_info = pos; + *param_ch_count = + le16_get_bits(mld_params->params, + IEEE80211_RNR_MLD_PARAMS_BSS_CHANGE_COUNT); return use_for; } @@ -2836,8 +2838,8 @@ cfg80211_parse_ml_elem_sta_data(struct wiphy *wiphy, enum nl80211_band band; u32 freq; const u8 *profile; - const u8 *tbtt_info; ssize_t profile_len; + u8 param_ch_count; u8 link_id, use_for; if (!ieee80211_mle_basic_sta_prof_size_ok((u8 *)mle->sta_prof[i], @@ -2880,10 +2882,11 @@ cfg80211_parse_ml_elem_sta_data(struct wiphy *wiphy, profile_len -= 2; /* Find in RNR to look up channel information */ - use_for = cfg80211_tbtt_info_for_mld_ap(tx_data->ie, - tx_data->ielen, - mld_id, link_id, - &ap_info, &tbtt_info); + use_for = cfg80211_rnr_info_for_mld_ap(tx_data->ie, + tx_data->ielen, + mld_id, link_id, + &ap_info, + ¶m_ch_count); if (!use_for) continue; @@ -2926,7 +2929,8 @@ cfg80211_parse_ml_elem_sta_data(struct wiphy *wiphy, continue; /* Copy the Basic Multi-Link element including the common - * information, and then fix up the link ID. + * information, and then fix up the link ID and BSS param + * change count. * Note that the ML element length has been verified and we * also checked that it contains the link ID. */ @@ -2937,6 +2941,8 @@ cfg80211_parse_ml_elem_sta_data(struct wiphy *wiphy, sizeof(*ml_elem) + ml_common_len); new_ie[data.ielen + sizeof(*ml_elem) + 1 + ETH_ALEN] = link_id; + new_ie[data.ielen + sizeof(*ml_elem) + 1 + ETH_ALEN + 1] = + param_ch_count; data.ielen += sizeof(*ml_elem) + ml_common_len; @@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)" BACKPORTED_KERNEL_VERSION="(see git)" BACKPORTED_KERNEL_NAME="iwlwifi" BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ -BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11866:ab0e815d" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11867:192ff22b" |