* [PATCH] wifi: mac80211: Update bssid indicator with real BSS numbers
@ 2023-12-06 2:49 Allen Ye
2023-12-07 13:39 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Allen Ye @ 2023-12-06 2:49 UTC (permalink / raw)
To: linux-wireless
Cc: Johannes Berg, Felix Fietkau, Lorenzo Bianconi, Evelyn Tsai,
Money . Wang, linux-mediatek, Allen.Ye
From: "Allen.Ye" <allen.ye@mediatek.com>
The cnt member in mbssid is the count of total number of MBSSID elements
instead of BSSID. Therefore, we fix this by reading the MaxBSSID Indicator
field directly.
Signed-off-by: Evelyn.Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: Money.Wang <money.wang@mediatek.com>
Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
---
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 606b1b2e4123..f90bcd59f85a 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1164,9 +1164,11 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
/* copy in optional mbssid_ies */
if (mbssid) {
u8 *pos = new->tail + new->tail_len;
+ const struct element *mbssid_elem;
new->mbssid_ies = (void *)pos;
pos += struct_size(new->mbssid_ies, elem, mbssid->cnt);
+ mbssid_elem = (const struct element *)pos;
pos += ieee80211_copy_mbssid_beacon(pos, new->mbssid_ies,
mbssid);
if (rnr) {
@@ -1175,8 +1177,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));
+ link_conf->bssid_indicator = mbssid_elem->data[0];
}
if (csa) {
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wifi: mac80211: Update bssid indicator with real BSS numbers
2023-12-06 2:49 [PATCH] wifi: mac80211: Update bssid indicator with real BSS numbers Allen Ye
@ 2023-12-07 13:39 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2023-12-07 13:39 UTC (permalink / raw)
To: Allen Ye
Cc: linux-wireless, Johannes Berg, Felix Fietkau, Lorenzo Bianconi,
Evelyn Tsai, Money . Wang, linux-mediatek
Allen Ye <allen.ye@mediatek.com> writes:
> From: "Allen.Ye" <allen.ye@mediatek.com>
>
> The cnt member in mbssid is the count of total number of MBSSID elements
> instead of BSSID. Therefore, we fix this by reading the MaxBSSID Indicator
> field directly.
>
> Signed-off-by: Evelyn.Tsai <evelyn.tsai@mediatek.com>
> Signed-off-by: Money.Wang <money.wang@mediatek.com>
> Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
All the names, both in From and s-o-b, use '.' instead of space in names.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-07 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06 2:49 [PATCH] wifi: mac80211: Update bssid indicator with real BSS numbers Allen Ye
2023-12-07 13:39 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).