* [PATCH wireless-next 0/2] wifi: mac80211: fix CSA/CCA regression
@ 2026-10-02 19:10 Aloka Dixit
2026-10-02 19:10 ` [PATCH wireless-next 1/2] Revert "wifi: mac80211: do not use old MBSSID elements" Aloka Dixit
2026-10-02 19:10 ` [PATCH wireless-next 2/2] wifi: mac80211: remove redundant null check in ieee80211_assign_beacon() Aloka Dixit
0 siblings, 2 replies; 3+ messages in thread
From: Aloka Dixit @ 2026-10-02 19:10 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linux-kernel, Aloka Dixit
First patch reverts an old commit with detailed description.
Second patch removes a minor redundant check.
Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
---
Aloka Dixit (2):
Revert "wifi: mac80211: do not use old MBSSID elements"
wifi: mac80211: remove redundant null check in ieee80211_assign_beacon()
net/mac80211/cfg.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
base-commit: f49defea7668d8c68ec19fa085ef3da6075561c7
change-id: 20261002-csa_cca_fix-ec333d7100e0
Best regards,
--
Aloka Dixit <aloka.dixit@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH wireless-next 1/2] Revert "wifi: mac80211: do not use old MBSSID elements"
2026-10-02 19:10 [PATCH wireless-next 0/2] wifi: mac80211: fix CSA/CCA regression Aloka Dixit
@ 2026-10-02 19:10 ` Aloka Dixit
2026-10-02 19:10 ` [PATCH wireless-next 2/2] wifi: mac80211: remove redundant null check in ieee80211_assign_beacon() Aloka Dixit
1 sibling, 0 replies; 3+ messages in thread
From: Aloka Dixit @ 2026-10-02 19:10 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linux-kernel, Aloka Dixit
Commit a519be2f5d95 ("wifi: mac80211: do not use old MBSSID
elements") fixed the incorrect inclusion of stopped/removed
non-transmitted profiles from the Beacon frames, but it caused
a regression for channel switch (CSA) and BSS color change (CCA)
operations initiated from hostapd.
Hostapd passes two Beacon templates to kernel for CSA and CCA -
(1) beacon_csa/beacon_color_change used during the countdown.
(2) beacon_after/beacon_next used after the countdown completes.
Hostapd relies on the kernel to include the old MBSSID elements
while sending beacon_csa/beacon_color_change templates to the
driver.
This path is now broken and results in CSA/CCA failure.
Including existing MBSSID elements explicitly makes the netlink
buffer larger than default 4 KB depending on the number of APs
which would need unnecessary complication to pre-calculate the
buffer length.
Revert the commit to fix the regression.
Regarding the original issue fixed by the reverted commit -
Hostapd now has a new commit which always includes at least one
MBSSID element when the feature is enabled, hence when all
non-transmitted profiles are removed, this empty element ensures
that stopped profiles are not advertised.
Fixes: a519be2f5d95 ("wifi: mac80211: do not use old MBSSID elements")
Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
---
net/mac80211/cfg.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index bd1a857c812d..b38941e6784f 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1518,6 +1518,7 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
size = sizeof(*new) + new_head_len + new_tail_len;
+ /* new or old multiple BSSID elements? */
if (params->mbssid_ies) {
mbssid = params->mbssid_ies;
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
@@ -1527,6 +1528,15 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
}
size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
mbssid->cnt);
+ } else if (old && old->mbssid_ies) {
+ mbssid = old->mbssid_ies;
+ size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
+ if (old && old->rnr_ies) {
+ rnr = old->rnr_ies;
+ size += struct_size(new->rnr_ies, elem, rnr->cnt);
+ }
+ size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
+ mbssid->cnt);
}
new = kzalloc(size, GFP_KERNEL);
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH wireless-next 2/2] wifi: mac80211: remove redundant null check in ieee80211_assign_beacon()
2026-10-02 19:10 [PATCH wireless-next 0/2] wifi: mac80211: fix CSA/CCA regression Aloka Dixit
2026-10-02 19:10 ` [PATCH wireless-next 1/2] Revert "wifi: mac80211: do not use old MBSSID elements" Aloka Dixit
@ 2026-10-02 19:10 ` Aloka Dixit
1 sibling, 0 replies; 3+ messages in thread
From: Aloka Dixit @ 2026-10-02 19:10 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linux-kernel, Aloka Dixit
The else-if branch condition 'old && old->mbssid_ies' already
guarantees 'old' is non-NULL. The inner 'old &&' in
'if (old && old->rnr_ies)' is therefore redundant; remove it.
Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
---
net/mac80211/cfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index b38941e6784f..cd5781ba2873 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1531,7 +1531,7 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
} else if (old && old->mbssid_ies) {
mbssid = old->mbssid_ies;
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
- if (old && old->rnr_ies) {
+ if (old->rnr_ies) {
rnr = old->rnr_ies;
size += struct_size(new->rnr_ies, elem, rnr->cnt);
}
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-02 19:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 19:10 [PATCH wireless-next 0/2] wifi: mac80211: fix CSA/CCA regression Aloka Dixit
2026-10-02 19:10 ` [PATCH wireless-next 1/2] Revert "wifi: mac80211: do not use old MBSSID elements" Aloka Dixit
2026-10-02 19:10 ` [PATCH wireless-next 2/2] wifi: mac80211: remove redundant null check in ieee80211_assign_beacon() Aloka Dixit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®