| From cd9eddae9afaece218189e1d3ccaffe256b3ccc8 Mon Sep 17 00:00:00 2001 |
| From: "Allen.Ye" <allen.ye@mediatek.com> |
| Date: Fri, 14 Apr 2023 05:05:17 +0800 |
| Subject: [PATCH 17/61] mtk: mac80211: update max_bssid_indicator based on real |
| BSS numbers |
| |
| Fix max_bssid_indicator get empty value due to wrong pointer. |
| |
| CR-Id: WCNCR00259302 |
| Change-Id: I2a9bcd96e9432569a9968ba9e519c55ebe13cdfe |
| --- |
| net/mac80211/cfg.c | 5 +++-- |
| 1 file changed, 3 insertions(+), 2 deletions(-) |
| |
| diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c |
| index 3f4c129..cb91223 100644 |
| --- a/net/mac80211/cfg.c |
| +++ b/net/mac80211/cfg.c |
| @@ -1167,9 +1167,11 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata, |
| /* copy in optional mbssid_ies */ |
| if (mbssid) { |
| u8 *pos = new->tail + new->tail_len; |
| + u8 *bssid_indicator; |
| |
| new->mbssid_ies = (void *)pos; |
| pos += struct_size(new->mbssid_ies, elem, mbssid->cnt); |
| + bssid_indicator = pos + 2; |
| pos += ieee80211_copy_mbssid_beacon(pos, new->mbssid_ies, |
| mbssid); |
| if (rnr) { |
| @@ -1178,8 +1180,7 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata, |
| ieee80211_copy_rnr_beacon(pos, new->rnr_ies, rnr); |
| } |
| /* update bssid_indicator */ |
| - link_conf->bssid_indicator = |
| - ilog2(__roundup_pow_of_two(mbssid->cnt + 1)); |
| + sdata->vif.bss_conf.bssid_indicator = *(bssid_indicator); |
| } |
| |
| if (csa) { |
| -- |
| 2.39.2 |
| |