Skip to content

Commit a519be2

Browse files
Aloka Dixitjmberg-intel
authored andcommitted
wifi: mac80211: do not use old MBSSID elements
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>
1 parent 99067b5 commit a519be2

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
@@ -1345,7 +1345,6 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
13451345

13461346
size = sizeof(*new) + new_head_len + new_tail_len;
13471347

1348-
/* new or old multiple BSSID elements? */
13491348
if (params->mbssid_ies) {
13501349
mbssid = params->mbssid_ies;
13511350
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
@@ -1355,15 +1354,6 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
13551354
}
13561355
size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
13571356
mbssid->cnt);
1358-
} else if (old && old->mbssid_ies) {
1359-
mbssid = old->mbssid_ies;
1360-
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
1361-
if (old && old->rnr_ies) {
1362-
rnr = old->rnr_ies;
1363-
size += struct_size(new->rnr_ies, elem, rnr->cnt);
1364-
}
1365-
size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
1366-
mbssid->cnt);
13671357
}
13681358

13691359
new = kzalloc(size, GFP_KERNEL);

0 commit comments

Comments
 (0)