From nobody Fri Apr 3 09:34:41 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 F051C2D7DE2 for ; Thu, 19 Feb 2026 19:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771530179; cv=none; b=qjfaLwkrn695sIMCuujcUPuWLxIXFFVCcdDepQIB2X23Wt+hQpo3ejyh3+8fdL+CrDgsdtG4PLWzENQ5m7jum4NxqRxG8jEG6l1XM2sZBi+YrGv1nglmOP3WBzR+dvumzsBUyvZjatftHXtbNGDiikUogg2/8xZGUGjTnA4Gs5s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771530179; c=relaxed/simple; bh=5Xq8cH8UextoMw31S+uSZYrM/9dwxqrsXMjrbtcbjrw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NNLgjOA7yLG6Q+RYSuSf8WiuU4N/KU2zBLtcbZvSOC30F7/b8lUzh+G4sf9aKQs5XoxCLwB9X917WcAKEIWWrNaPUDTybRpsARyapLvW8jfvA85qIp5WNgIhkGMI46DdRU6vNHFpt1yjQnLkTjhC3VxWSPYhMizGMQ74JqfYWMc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=DANjuMZW; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=QK6IgbmI; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="DANjuMZW"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="QK6IgbmI" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61JBe4Ep1924861 for ; Thu, 19 Feb 2026 19:42:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= FmxNHp+wAQ9sYx3bt/fGgakAW78bGdOHRXPUHaz0Tz0=; b=DANjuMZW7UtPXq/c SnOshB5sStiI8ii369enB5ysZHnVGjAO3fw+HMIkz9Qczvxc0b9CkGC/x3eK4yF9 L1KZIRy2pBdgpikbk81lgEXK1Kbvhl/tI1dJLev4DdHU/Os77r3OYKoJCPeIsM2M +3IDo88SPE3ZjRw3EYYJGFTElsBpu+/44PZc+9PAlemMRrEr7pDrmM9WPN9dYGl7 18MokW7GyVgQN4yf5e2t7QzHBaPuApVBBJrhj5yl4jIi9E016NXrudaDe8kgvMeN 6Y6hI1SGw9VxtLm7UhsqYesdPhmvWdnns9QJhTRLk3NS+ibTmxW33xtWk3DhIgkh 5MxJ5A== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cdqdgb1r6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 19 Feb 2026 19:42:57 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2aae0d40a47so89623575ad.2 for ; Thu, 19 Feb 2026 11:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771530177; x=1772134977; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=FmxNHp+wAQ9sYx3bt/fGgakAW78bGdOHRXPUHaz0Tz0=; b=QK6IgbmI2Y31vUUcoseqgraUl/cJQePzv3Sgr7f6U8lOD8WeFXyZjbGD0Q3eRMwvxe eUnDmBIZOhVsxv2Qqhc6AoBZ2jE5n4o+sj73ZhBdCusSCzUz/kA8YKlaYDz5ZV3wdTmw 7NSETiUVBKmr3WeZy5ixZutcmGMCIE3ok7ATb3iUABUNBKSJNaAA1OhtQkt5TB8WU91R 2NmpJklyOpUKdTi6uz8T6BOvQWfO9W8RvveQoRCfZ6SInCD2YJnFKDFdhCODXBBMu/97 AYPf45NrFOk58N0vjpk3o4qvkIQ/mqN3Rz5r3QvjTuSEhZYvUGIrnw0XJbwJTTJcYQKN Be0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771530177; x=1772134977; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FmxNHp+wAQ9sYx3bt/fGgakAW78bGdOHRXPUHaz0Tz0=; b=DA2Do1pN22JFKYZewBkL8lsmbRxGoMpnSFXvTSHzKCUSAiyBUUh76oyCD/XtjsObAE hnRh/ViqSK+aUVYEFTAtlZaZ2/wUecsNC2hIElnmgMRrKB9PS9wXtKCxpXCa9nqYJVvT 5xsA6lS7oIzPdxJW8bw1wcl+7O/7IZeTCB5m4EsYLkbaiw6CDfZQL/qoNgPHdelTlKlW RjHseG4yc7PnxlJtrRDvvAgmLc82QlOk86Wgd/vwVrs9Z1cZZQuHFMUMk2dwiAgg5G6S h0Ce5ahNbjtoJ2sSPP6mphfZJGxrg1a+D98MIbu5SodZkPVjlLoeNh1igtd1YF4spC+T GZLw== X-Forwarded-Encrypted: i=1; AJvYcCVEXrKiaXNXO5qqsxJkTbBmJqfCKjhH4p2wuKf4L0v0JzdZjH0lTc7Fy8rRTwiiNyf5uoX2cy31QX0k2+M=@vger.kernel.org X-Gm-Message-State: AOJu0YyZj9kIdxS/Ry41oTeaOpUsML4H30di5PJDAmM8NZ86hDo/rg4F VhJ02T6tHiNBT9Lv5+ylK0Xfo52fSOT5qA+sD43eGhSizV3x7lUqunS9Jr2h/tJNjhf4ucZt3zg 68369Pj9Pc7Z8E3W0LnX9XuKYKwblNrtmyWaMuETYLclHAOdDNwTnr92Xd82OhMWLm88= X-Gm-Gg: AZuq6aLP+5N9DL5R/QYXy8swT6ESjh6Oa6SVJk6FA+9Tm9wcCCRfZJBod6KAoBqImy1 T0AHoXPgJfMbcPbBzKiZBHYWPP7Pzw9bjmdBCmrS86NV6gvVBXl0LhmMRTTaYdik0qf3O5KMAH/ h9/g1cgr4k6eqN6jFdirM1pIk9zJ4Wb7GLCNL6hnDmyKOmtWrC3yOLfJjLZEFvlY4FrQRc7dhJp /eARyPGOD2YyYRhpIYGQjhaPLCJo3MAmcmBZgSdcXH/wb8/6sfo12ZfqffWdDIYuFFxlz5oCBMa oS6o/v2LNmTQsytg3nkUSH37Nl8xHO7tPguXOeg6V4qbVmf/W0F8OyoEhUk8T/HH7obrV/T9Xpo rxhDgtLHkaAdwrJIg+X1QTkVNPRqjVuys3gV8x1DtvoweWHYti+poXptCubCb3kRYVFvIIBuY/Q Ha7omqOSFF4kHfCkm3krcu3BzPo5eM1OXOhVSBrq0= X-Received: by 2002:a17:902:d591:b0:298:5abe:4b1 with SMTP id d9443c01a7336-2ad17591077mr197412945ad.52.1771530176609; Thu, 19 Feb 2026 11:42:56 -0800 (PST) X-Received: by 2002:a17:902:d591:b0:298:5abe:4b1 with SMTP id d9443c01a7336-2ad17591077mr197412775ad.52.1771530176165; Thu, 19 Feb 2026 11:42:56 -0800 (PST) Received: from hu-rajkbhag-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1a712ed9sm264404225ad.20.2026.02.19.11.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 11:42:55 -0800 (PST) From: Raj Kumar Bhagat Date: Fri, 20 Feb 2026 01:12:41 +0530 Subject: [PATCH wireless-next 1/2] wifi: mac80211: fetch FILS discovery template by link ID Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260220-fils-prob-by-link-v1-1-a2746a853f75@oss.qualcomm.com> References: <20260220-fils-prob-by-link-v1-0-a2746a853f75@oss.qualcomm.com> In-Reply-To: <20260220-fils-prob-by-link-v1-0-a2746a853f75@oss.qualcomm.com> To: Jeff Johnson , Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Johannes Berg Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, ath12k@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Sriram R , Raj Kumar Bhagat X-Mailer: b4 0.14.3 X-Proofpoint-ORIG-GUID: ly2TkXGH9bUMpGt08nUmeS-pmP8LvVQm X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE5MDE3OSBTYWx0ZWRfX5bZG8tf/KhqW cWxLGij7duC9G1f1R+eMI+u34p20QwFWED4sEGjgv32rLXy8x8hNwHWjfJ/fCRFa5e9GEDEX8Cr 7qWfXW1b0Aq9gi0FZB/pjDxGgGG18cNq+7SnlHeqBWdIyxBTd80dxoQVVbUVag1ajoUa7mSjY0F 7zYR4Vg6Xkh6jm89aD7OV4tjhS/S8xSS8F7DzTC3gILraY+ZXS5VNkQ4/NTsUxfSMfTFPTNvA08 YB3+cKbnUCDimWJpgEwDcE6lFsPb943p1EgSpWK0w2lDr4Hoc38VsPGDPsXLvFkF16zfEKDSF8v r4vENslXED8hE8NRWwgT3Gy020Ws8vs1Sp8W9OSdR6/q73Xrk4DrKKFbM5ZUnFWE0rlzR36znu3 InUSEdcGeAIaAfJwSQJzb2cFsO2qB6qcTnm5LTV/fyQg/UHdzpZL+Ekdee8Xuwjm/mgEF2oy680 B4MXmOoFiBYNQZY4VfQ== X-Proofpoint-GUID: ly2TkXGH9bUMpGt08nUmeS-pmP8LvVQm X-Authority-Analysis: v=2.4 cv=W/M1lBWk c=1 sm=1 tr=0 ts=699767c1 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=COk6AnOGAAAA:8 a=EUspDBNiAAAA:8 a=uhjc5PK_p913YsLhG_cA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-19_04,2026-02-19_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 adultscore=0 malwarescore=0 clxscore=1015 suspectscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602190179 From: Sriram R Currently, the FILS discovery template is always fetched from the default link of a virtual interface in both Multi-Link Operation (MLO) and non-MLO cases. However, in the MLO case there is a need to fetch the FILS discovery template from a specific link instead of the default link. Hence, add support for fetching the FILS discovery template based on the link ID from the corresponding link data. Signed-off-by: Sriram R Co-developed-by: Raj Kumar Bhagat Signed-off-by: Raj Kumar Bhagat Acked-by: Jeff Johnson # for drivers/net/wireless/ath --- drivers/net/wireless/ath/ath11k/mac.c | 2 +- drivers/net/wireless/ath/ath12k/mac.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 ++- include/net/mac80211.h | 4 +++- net/mac80211/tx.c | 20 +++++++++++++------- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/a= th/ath11k/mac.c index 4dfd08b58416..4776bb6fc889 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3305,7 +3305,7 @@ static int ath11k_mac_fils_discovery(struct ath11k_vi= f *arvif, if (info->fils_discovery.max_interval) { interval =3D info->fils_discovery.max_interval; =20 - tmpl =3D ieee80211_get_fils_discovery_tmpl(ar->hw, arvif->vif); + tmpl =3D ieee80211_get_fils_discovery_tmpl(ar->hw, arvif->vif, 0); if (tmpl) ret =3D ath11k_wmi_fils_discovery_tmpl(ar, arvif->vdev_id, tmpl); diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/a= th/ath12k/mac.c index 68431a0e128e..34f82cda4197 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -4311,7 +4311,8 @@ static int ath12k_mac_fils_discovery(struct ath12k_li= nk_vif *arvif, if (info->fils_discovery.max_interval) { interval =3D info->fils_discovery.max_interval; =20 - tmpl =3D ieee80211_get_fils_discovery_tmpl(hw, vif); + tmpl =3D ieee80211_get_fils_discovery_tmpl(hw, vif, + info->link_id); if (tmpl) ret =3D ath12k_wmi_fils_discovery_tmpl(ar, arvif->vdev_id, tmpl); diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/= wireless/mediatek/mt76/mt7915/mcu.c index 00bff4d3aab8..83ce06857a1e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -1977,7 +1977,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, = struct ieee80211_vif *vif, =20 if (changed & BSS_CHANGED_FILS_DISCOVERY) { interval =3D vif->bss_conf.fils_discovery.max_interval; - skb =3D ieee80211_get_fils_discovery_tmpl(hw, vif); + skb =3D ieee80211_get_fils_discovery_tmpl(hw, vif, 0); } else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP && vif->bss_conf.unsol_bcast_probe_resp_interval) { interval =3D vif->bss_conf.unsol_bcast_probe_resp_interval; diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/= wireless/mediatek/mt76/mt7996/mcu.c index 14a88ef79b6c..795a294fa904 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c @@ -2863,7 +2863,8 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev= *dev, if (changed & BSS_CHANGED_FILS_DISCOVERY && link_conf->fils_discovery.max_interval) { interval =3D link_conf->fils_discovery.max_interval; - skb =3D ieee80211_get_fils_discovery_tmpl(hw, vif); + skb =3D ieee80211_get_fils_discovery_tmpl(hw, vif, + link_conf->link_id); } else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP && link_conf->unsol_bcast_probe_resp_interval) { interval =3D link_conf->unsol_bcast_probe_resp_interval; diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 7f9d96939a4e..d36c14a86c8a 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -7766,13 +7766,15 @@ u32 ieee80211_calc_tx_airtime(struct ieee80211_hw *= hw, * ieee80211_get_fils_discovery_tmpl - Get FILS discovery template. * @hw: pointer obtained from ieee80211_alloc_hw(). * @vif: &struct ieee80211_vif pointer from the add_interface callback. + * @link_id: valid link_id during MLO or 0 for non-MLO. * * The driver is responsible for freeing the returned skb. * * Return: FILS discovery template. %NULL on error. */ struct sk_buff *ieee80211_get_fils_discovery_tmpl(struct ieee80211_hw *hw, - struct ieee80211_vif *vif); + struct ieee80211_vif *vif, + unsigned int link_id); =20 /** * ieee80211_get_unsol_bcast_probe_resp_tmpl - Get unsolicited broadcast diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 007f5a368d41..f547cfb27666 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -5839,21 +5839,28 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee= 80211_hw *hw, EXPORT_SYMBOL(ieee80211_proberesp_get); =20 struct sk_buff *ieee80211_get_fils_discovery_tmpl(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) + struct ieee80211_vif *vif, + unsigned int link_id) { struct sk_buff *skb =3D NULL; struct fils_discovery_data *tmpl =3D NULL; struct ieee80211_sub_if_data *sdata =3D vif_to_sdata(vif); + struct ieee80211_link_data *link; =20 if (sdata->vif.type !=3D NL80211_IFTYPE_AP) return NULL; =20 - rcu_read_lock(); - tmpl =3D rcu_dereference(sdata->deflink.u.ap.fils_discovery); - if (!tmpl) { - rcu_read_unlock(); + if (link_id >=3D IEEE80211_MLD_MAX_NUM_LINKS) + return NULL; + + guard(rcu)(); + link =3D rcu_dereference(sdata->link[link_id]); + if (!link) + return NULL; + + tmpl =3D rcu_dereference(link->u.ap.fils_discovery); + if (!tmpl) return NULL; - } =20 skb =3D dev_alloc_skb(sdata->local->hw.extra_tx_headroom + tmpl->len); if (skb) { @@ -5861,7 +5868,6 @@ struct sk_buff *ieee80211_get_fils_discovery_tmpl(str= uct ieee80211_hw *hw, skb_put_data(skb, tmpl->data, tmpl->len); } =20 - rcu_read_unlock(); return skb; } EXPORT_SYMBOL(ieee80211_get_fils_discovery_tmpl); --=20 2.34.1 From nobody Fri Apr 3 09:34:41 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 8522030B50C for ; Thu, 19 Feb 2026 19:43:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771530184; cv=none; b=ITJMyCifM0C8vpad3W55G3AEPI1z+rt15U1P8kDmD++NdEZqwlEV9Rg5D7bBd5PNMEtnwidn9w75appqLbPOQLWZaCn20Ugm9wFyrBrMqe5SdoOSCKQ8UE5yfLT2HcS6bNLlwqjNbA/NS8vJmLjoM9dfNqfGCIm/9UbllI4U4BU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771530184; c=relaxed/simple; bh=01W00KA19CzfPhCzkXdPK6TmMqN+jdXBBWmRF5bs2p4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QlIpYM/fAaM8TNJAZsOKvb8MdYHevmw4UpRHsJWuIJn9HKCmoipnNpkoTPPdjbUBN+hcBer+QF9YEVcTet23pegEHSNWOe5LpQJhO8qgLt4sn4MTqRcYekoJ5WYE+tl9/MYArZUn0Pu/qAbTTxqwD+XNh+QZQKXftj13nUYbEV8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=P49Taiin; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JFJL9trI; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="P49Taiin"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JFJL9trI" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61JCP3b21717804 for ; Thu, 19 Feb 2026 19:43:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= cw6oegE7BJrIH7ye5GHNWs5b/IUa25g+uNiuS7o/4uw=; b=P49TaiinQnf3Zapr kl0aQrMx7MQCzXDWhzNBGjFa4GzzO/I4lQvuwv3gn7t/7dpgnEnkeel3bzzDzUg4 pLJSxmJrd4JCG/HxHovQxHBl3sphHqMcvXyngw+pFxISyHvk5VEqmmRJewTGRgHc VLqDrcUcqo68tT0NYr26VQc1dR/U0X0HKfIbTO6hXpj/Ikr/Os1OuMpojd8N6Yr9 0AkfS0F3ztsEz43MAlkJ0hwqQXloESXfWNiiOe8YFnGejoSCV4D+6I0b+oNlTebv igMzu5rkmODUW1b+cOLY66Yw7bCZje5NqJfSsxF+iS0O0fvo8v68jFu4m/ADArv1 Qnn0tw== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ce2ghsesq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 19 Feb 2026 19:43:02 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2aad5fec176so13412895ad.2 for ; Thu, 19 Feb 2026 11:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771530182; x=1772134982; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=cw6oegE7BJrIH7ye5GHNWs5b/IUa25g+uNiuS7o/4uw=; b=JFJL9trInjT44dmspCZ5DxLoi3N+2gotydi27ynAkuWeaeFrU/KmKvK07GiQhz2Iw0 DwavA5pJjPc8O3JL5MMEHRGxQ1AZyEnBCpLjEjJwFLuhWwjeJ5P7/g58oQXOdqphZ0zS JM0Nw1w6EcF0lWt0Y9qNGotkkM51+kAIUngbCevn5FQUKzBUtJjolJFI2pj4eAmQs6KU U934OUmjFcRdmkET8DFT0ARk+tP4OMOpst0xyDxBarwrU7vlj1+GhYIdsFBK+HiGH1af vwMrAiu9b/ZckuWis/+fgwBKjRJ1BgYQI7unyrVlBmMvmkMkIGBDMiMLW1kBGpWyTh6A kstA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771530182; x=1772134982; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=cw6oegE7BJrIH7ye5GHNWs5b/IUa25g+uNiuS7o/4uw=; b=o6xfsnTJKjbA1H2SUsOAF6AK1rPT5flZ0DTXFobDEpivlkHho36TBt2fXwr97IcKlE ivjJladYuwapYZOS01SP6h+5v8D28yuMsYug7dWiunYoMaMx3fMIcnVN0TFdtUN0QpPE R+XfOJLRQJmpD0xiA/Uv4OPAiXsfMBoIGUwnhOl5yMvGtaIM52lOadYBxu/GZx1BDur1 vPbRK6ksZcp4K0um7iA9lTeh4EI1Ys/j5mj8OMAB4QVcznFPbfMOchNti38WtuHLnIG0 94Ie3Rq6xecculE8WhJLkhH4XH5j0oi+EJdt9rUhTYaJuPlF42z+PQlbxW90KRKlUmgO C48A== X-Forwarded-Encrypted: i=1; AJvYcCV3WDVPcj2dHyYCLuFzl/GOMTvCLSybOO8yDiOf6ZAcEi3iXIFY4fxE7AwwNld5cFzCzHltvrRZR6h5z8I=@vger.kernel.org X-Gm-Message-State: AOJu0YzFSHQPw6/s+3FAiXcwQW4pD0lNKUhUer7Fg6jqbDRPa9cIJkvm 1T9UeUuiNKFiOGTLVY/xZGV1Zb5z7rcoUp+1ZAQnBJLBukX1PkaJlw0tVNEQoMh309hPEG+XsZr xnAhbxTm0WJwm2kCcRUOkyTd62VsJVGUQ0CfFd1ODr458bmON8hKIh4HzyPINxs+gdmk= X-Gm-Gg: AZuq6aKH8WnT59n6ZYDc8zfgCBa9V8uGAaD5hh5XePBN12k9aa5uwjwXSuaVLWkOk60 ZGxsEES14j5oyTq00CMTfmHyd+BWuIvCD+Lzmd9a4pufmMWqJ64XJcPlua8FxMw9yy7LhRrIaPA 7NSFdXrWlWTXGqpH3pRihWBpgfVqEO3acW2pw2EjwL9Zy/F3FhkUXrv6JBJR7ayVSgacqtK4GVv +ibhbaa0XxdhbzwDbt9DJ+64eGDkfZSqvs999T2sGSFojbfoNLor09jVge4XY/clN3cFKMdccu9 WD48Vr2eUhimaF+hTFXDwM+9dE9PEN6LF/o+48mvFVQ7k841ppfD0FvkcN277SWf0dib6UTk8Ul FT/u3wYJ4AbG2AGvtex007qQg+I6Qd1uFfzaI2Hub5VS1kSRfnAryowi39xYI6IMIjle6O88PL6 M/X+puNw6Xn2fq9Kt//kDSPmZMaDfNxvV5kC89L7A= X-Received: by 2002:a17:903:2ec3:b0:2aa:d630:cd5d with SMTP id d9443c01a7336-2ad5b144c92mr33071735ad.44.1771530182055; Thu, 19 Feb 2026 11:43:02 -0800 (PST) X-Received: by 2002:a17:903:2ec3:b0:2aa:d630:cd5d with SMTP id d9443c01a7336-2ad5b144c92mr33071375ad.44.1771530181608; Thu, 19 Feb 2026 11:43:01 -0800 (PST) Received: from hu-rajkbhag-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1a712ed9sm264404225ad.20.2026.02.19.11.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 11:43:01 -0800 (PST) From: Raj Kumar Bhagat Date: Fri, 20 Feb 2026 01:12:42 +0530 Subject: [PATCH wireless-next 2/2] wifi: mac80211: fetch unsolicited probe response template by link ID Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260220-fils-prob-by-link-v1-2-a2746a853f75@oss.qualcomm.com> References: <20260220-fils-prob-by-link-v1-0-a2746a853f75@oss.qualcomm.com> In-Reply-To: <20260220-fils-prob-by-link-v1-0-a2746a853f75@oss.qualcomm.com> To: Jeff Johnson , Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Johannes Berg Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, ath12k@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Sriram R , Raj Kumar Bhagat X-Mailer: b4 0.14.3 X-Proofpoint-ORIG-GUID: E49oMwbFTOGZEFndtdfwhQu5iWSo0oOJ X-Authority-Analysis: v=2.4 cv=dqzWylg4 c=1 sm=1 tr=0 ts=699767c6 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=COk6AnOGAAAA:8 a=EUspDBNiAAAA:8 a=tVayKBx9Dmlhv4CN5F0A:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE5MDE3OSBTYWx0ZWRfX5kDd1fcv5/VO mYH4ILNkV9K2pz5CWs86nUXNBjW44jFLoKcRpJnn6jqbdJeePy2/d3ei+851pZog2sN9X0KVTTg zQFAkXybGwaQDAphYEjo45O4678pGqTYDD8gHkv2b6CtZKcPDbgTdkYUWKy4i3UBWy6SNkINkoE 84gzwE0glYkZbM5nVoKZJLkEF3QiFKGgqFCKCIXoag5jJlJN9R9yg9532s+04Kv7k7pEwVx5SMc aMX3wIU249u7YyDTljMFzBwddkLvCMIAf1WAOiW6Kz7qEWtZWDQyRgmypGxRFztX0DcYT0uNd6P XWHxwgiua5zl8WJliLa/4oS88qaw2PmRcN+UperJgMEFChBZ4+GWOscatQisxm8qxgU0KonF1qH bybhSHYQqviuMEb2EH2WKg68iiIceHXmIefux9wRFlATI+KGsw3hIZcDOQE1ZSM3A9Qu8ifYJ5R iadWM5jc30fBSrop7iQ== X-Proofpoint-GUID: E49oMwbFTOGZEFndtdfwhQu5iWSo0oOJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-19_04,2026-02-19_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602190179 From: Sriram R Currently, the unsolicited probe response template is always fetched from the default link of a virtual interface in both Multi-Link Operation (MLO) and non-MLO cases. However, in the MLO case there is a need to fetch the unsolicited probe response template from a specific link instead of the default link. Hence, add support for fetching the unsolicited probe response template based on the link ID from the corresponding link data. Signed-off-by: Sriram R Co-developed-by: Raj Kumar Bhagat Signed-off-by: Raj Kumar Bhagat Acked-by: Jeff Johnson # for drivers/net/wireless/ath --- drivers/net/wireless/ath/ath11k/mac.c | 2 +- drivers/net/wireless/ath/ath12k/mac.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 ++- include/net/mac80211.h | 4 +++- net/mac80211/tx.c | 20 +++++++++++++------- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/a= th/ath11k/mac.c index 4776bb6fc889..d9b5eac6c7bb 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3314,7 +3314,7 @@ static int ath11k_mac_fils_discovery(struct ath11k_vi= f *arvif, interval =3D info->unsol_bcast_probe_resp_interval; =20 tmpl =3D ieee80211_get_unsol_bcast_probe_resp_tmpl(ar->hw, - arvif->vif); + arvif->vif, 0); if (tmpl) ret =3D ath11k_wmi_probe_resp_tmpl(ar, arvif->vdev_id, tmpl); diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/a= th/ath12k/mac.c index 34f82cda4197..b281f81039fb 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -4320,7 +4320,8 @@ static int ath12k_mac_fils_discovery(struct ath12k_li= nk_vif *arvif, unsol_bcast_probe_resp_enabled =3D 1; interval =3D info->unsol_bcast_probe_resp_interval; =20 - tmpl =3D ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif); + tmpl =3D ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif, + info->link_id); if (tmpl) ret =3D ath12k_wmi_probe_resp_tmpl(ar, arvif->vdev_id, tmpl); diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/= wireless/mediatek/mt76/mt7915/mcu.c index 83ce06857a1e..2d2f34aa465d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -1981,7 +1981,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, = struct ieee80211_vif *vif, } else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP && vif->bss_conf.unsol_bcast_probe_resp_interval) { interval =3D vif->bss_conf.unsol_bcast_probe_resp_interval; - skb =3D ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif); + skb =3D ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif, 0); } =20 if (!skb) { diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/= wireless/mediatek/mt76/mt7996/mcu.c index 795a294fa904..c3cb4a33cb3d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c @@ -2868,7 +2868,8 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev= *dev, } else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP && link_conf->unsol_bcast_probe_resp_interval) { interval =3D link_conf->unsol_bcast_probe_resp_interval; - skb =3D ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif); + skb =3D ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif, + link_conf->link_id); } =20 if (!skb) { diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d36c14a86c8a..89027e94ba5c 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -7781,6 +7781,7 @@ struct sk_buff *ieee80211_get_fils_discovery_tmpl(str= uct ieee80211_hw *hw, * probe response template. * @hw: pointer obtained from ieee80211_alloc_hw(). * @vif: &struct ieee80211_vif pointer from the add_interface callback. + * @link_id: valid link_id during MLO or 0 for non-MLO. * * The driver is responsible for freeing the returned skb. * @@ -7788,7 +7789,8 @@ struct sk_buff *ieee80211_get_fils_discovery_tmpl(str= uct ieee80211_hw *hw, */ struct sk_buff * ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw, - struct ieee80211_vif *vif); + struct ieee80211_vif *vif, + unsigned int link_id); =20 /** * ieee80211_obss_color_collision_notify - notify userland about a BSS col= or diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index f547cfb27666..9f2363a34511 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -5874,21 +5874,28 @@ EXPORT_SYMBOL(ieee80211_get_fils_discovery_tmpl); =20 struct sk_buff * ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) + struct ieee80211_vif *vif, + unsigned int link_id) { struct sk_buff *skb =3D NULL; struct unsol_bcast_probe_resp_data *tmpl =3D NULL; struct ieee80211_sub_if_data *sdata =3D vif_to_sdata(vif); + struct ieee80211_link_data *link; =20 if (sdata->vif.type !=3D NL80211_IFTYPE_AP) return NULL; =20 - rcu_read_lock(); - tmpl =3D rcu_dereference(sdata->deflink.u.ap.unsol_bcast_probe_resp); - if (!tmpl) { - rcu_read_unlock(); + if (link_id >=3D IEEE80211_MLD_MAX_NUM_LINKS) + return NULL; + + guard(rcu)(); + link =3D rcu_dereference(sdata->link[link_id]); + if (!link) + return NULL; + + tmpl =3D rcu_dereference(link->u.ap.unsol_bcast_probe_resp); + if (!tmpl) return NULL; - } =20 skb =3D dev_alloc_skb(sdata->local->hw.extra_tx_headroom + tmpl->len); if (skb) { @@ -5896,7 +5903,6 @@ ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee= 80211_hw *hw, skb_put_data(skb, tmpl->data, tmpl->len); } =20 - rcu_read_unlock(); return skb; } EXPORT_SYMBOL(ieee80211_get_unsol_bcast_probe_resp_tmpl); --=20 2.34.1