From nobody Fri Apr 3 11:00:27 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 --- 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