Skip to content

Commit aea6a70

Browse files
Aloka Dixitopsiff
authored andcommitted
wifi: mac80211: do not use old MBSSID elements
[ Upstream commit a519be2f5d958c5804f2cfd68f1f384291271fab ] 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> (cherry picked from commit e27036473d398ed52b02f603aebdc2793c8c5cdf) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent e9095d5 commit aea6a70

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

net/mac80211/cfg.c

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

11481148
size = sizeof(*new) + new_head_len + new_tail_len;
11491149

1150-
/* new or old multiple BSSID elements? */
11511150
if (params->mbssid_ies) {
11521151
mbssid = params->mbssid_ies;
11531152
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
@@ -1157,15 +1156,6 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
11571156
}
11581157
size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
11591158
mbssid->cnt);
1160-
} else if (old && old->mbssid_ies) {
1161-
mbssid = old->mbssid_ies;
1162-
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
1163-
if (old && old->rnr_ies) {
1164-
rnr = old->rnr_ies;
1165-
size += struct_size(new->rnr_ies, elem, rnr->cnt);
1166-
}
1167-
size += ieee80211_get_mbssid_beacon_len(mbssid, rnr,
1168-
mbssid->cnt);
11691159
}
11701160

11711161
new = kzalloc(size, GFP_KERNEL);

0 commit comments

Comments
 (0)