Skip to content

Commit 50b592a

Browse files
Aloka Dixitsmb49
authored andcommitted
wifi: mac80211: do not use old MBSSID elements
BugLink: https://bugs.launchpad.net/bugs/2142789 [ Upstream commit a519be2 ] When userspace brings down and deletes a non-transmitted profile, it is expected to send a new updated Beacon template for the transmitted profile of that multiple BSSID (MBSSID) group which does not include the removed profile in MBSSID element. This update comes via NL80211_CMD_SET_BEACON. Such updates work well as long as the group continues to have at least one non-transmitted profile as NL80211_ATTR_MBSSID_ELEMS is included in the new Beacon template. But when the last non-trasmitted profile is removed, it still gets included in Beacon templates sent to driver. This happens because when no MBSSID elements are sent by the userspace, ieee80211_assign_beacon() ends up using the element stored from earlier Beacon template. Do not copy old MBSSID elements, instead userspace should always include these when applicable. Fixes: 2b3171c ("mac80211: MBSSID beacon handling in AP mode") Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> Link: https://patch.msgid.link/20251215174656.2866319-2-aloka.dixit@oss.qualcomm.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 883e46d commit 50b592a

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

net/mac80211/cfg.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,6 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
11421142

11431143
size = sizeof(*new) + new_head_len + new_tail_len;
11441144

1145-
/* new or old multiple BSSID elements? */
11461145
if (params->mbssid_ies) {
11471146
mbssid = params->mbssid_ies;
11481147
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
@@ -1152,15 +1151,6 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
11521151
}
11531152
size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
11541153
mbssid->cnt);
1155-
} else if (old && old->mbssid_ies) {
1156-
mbssid = old->mbssid_ies;
1157-
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
1158-
if (old && old->rnr_ies) {
1159-
rnr = old->rnr_ies;
1160-
size += struct_size(new->rnr_ies, elem, rnr->cnt);
1161-
}
1162-
size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
1163-
mbssid->cnt);
11641154
}
11651155

11661156
new = kzalloc(size, GFP_KERNEL);

0 commit comments

Comments
 (0)