From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD68735CB65; Tue, 6 Jan 2026 17:46:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767721594; cv=none; b=gC3aoY+VgpxfgzIIP2yCs8lvlem+NstO7cNjGMd8ht5Cj2AU0h7xGp8Zy62116r3Efgi/bgibU4kINwuyd8t0wnlhDP29t7TA7XBulEG7HUCejI9trs+MKXxj05m5gzrsuT4eG/s0MGm0gj6EGJHD2yIAlom8YOf3G0GZ8WDwao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767721594; c=relaxed/simple; bh=UyzgdVq4H1FUIh8a3DuyUPvnbeEge2EDoJayOI/0Xew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=brMUHhyau5YK8TldKzd+epCXkLpZkAnoXGXtsUrLA28VeyUf7MgLkuKF/sfmu12DRAkMlqPVnRrnwNxaOcJoO9nST6VB7PPh8zLowBZdiS08fQwB3v+befvlkHRr2Xy2/5HUSMvkhNrrp51jaLtKpXm9zh1hDMkSNN7QHZ6kH8I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wI3lln0d; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wI3lln0d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51BE3C116C6; Tue, 6 Jan 2026 17:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767721593; bh=UyzgdVq4H1FUIh8a3DuyUPvnbeEge2EDoJayOI/0Xew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wI3lln0dIx80/q5uRIZzKBjvs6TPuVkTN0z8Pjjl+u5yZYcGpVbHRq+MFzyc7N7vQ K9u/zDMxNfNDmN6V2LtoWO5cwhZtqqU5uTKtW3atxz1+Vr81LmqyrlK8NCaOfJkx/n Grk0SK0/hZn5mzC9be5Qvw8KnUauO+VTnVqM5X6E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aloka Dixit , Johannes Berg , Sasha Levin Subject: [PATCH 6.18 015/312] wifi: mac80211: do not use old MBSSID elements Date: Tue, 6 Jan 2026 18:01:29 +0100 Message-ID: <20260106170548.405574603@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106170547.832845344@linuxfoundation.org> References: <20260106170547.832845344@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aloka Dixit [ 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: 2b3171c6fe0a ("mac80211: MBSSID beacon handling in AP mode") Signed-off-by: Aloka Dixit Link: https://patch.msgid.link/20251215174656.2866319-2-aloka.dixit@oss.qualcomm.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/cfg.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c52b0456039d..e18df59951a8 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1328,7 +1328,6 @@ 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); @@ -1338,15 +1337,6 @@ 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.51.0