From patchwork Sun Jun 15 08:23:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roopni Devanathan X-Patchwork-Id: 897344 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 4B34B2638BA for ; Sun, 15 Jun 2025 08:24:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749975877; cv=none; b=JJwQYDv/u9xHTrZMJZIGC1DEyoFVoP1gBH6pLNWOxKMvSS+bhxJm6NjVqZ7PI1+3skLCNGDphxGfEbeeiqbccI03rZ8/g89qj9t8LMRqfFzb7WYvmqAFpCzvohT6BVGZFFzOFsIiP76dDmQP+nTmq9rL/6ZFTMKztaMtQ7vq18U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749975877; c=relaxed/simple; bh=DJwrxY8F8eBAMhYtgIKXSmZ2Ej/KSZdR1AZJLAfEqmM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uRQZcesG5OlMeFYxZwLl0fDwmHKFbRF/OEtu7w74MnARdxmVofCLyz3zCHUFXkiwfhsO1OIcqMbUt1TdhErQ7LURRJB5MFW+NRuhn+ANVvvJbiwEgwI6XKsRdDbkiDju8Pz33m7Cf4nCYXbfriNP/7IiSOu0pXl1tBw5+zX/qmo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=LRZahbXw; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="LRZahbXw" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55F6eQ8m021338; Sun, 15 Jun 2025 08:24:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= IevZP6+QzHRtgjsGKDokLXzsxaGWMC6gR2UhAsDlNzo=; b=LRZahbXw7hdwx3iI +JvMtGbwFibLM6VLAsA2kVvnUM6OF1/Qp77E9RPj5KeM86HYuy9+7WYTTHognBlu 7oL+9S5RQZsr2UXHPz1R5eKruwWNAAYQX5dqwe9wYRoX6GFKZ5msv+V2RzhzY1x0 coY/YfU8TWM5a7d5USF+4KwDtf0MfFmjFXop+Zc8QzO+xX/bcV0XqJS4CnPFdqxo KauOmXXPkZvnzSs1gq9bN4LGwnsAJDoXwvbl7nwWDNFqqWEOR4nnMWCvPuJ2VUPl dBOKKD+rAhTRMBI7dtPVxWm/rvjDmcQT82N7lTNQu4pmCtKluBfH2UIeAbBteW3Q RDo0rQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4791ht1m3m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 15 Jun 2025 08:24:28 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 55F8ORRR000480 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 15 Jun 2025 08:24:27 GMT Received: from hu-rdevanat-blr.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 15 Jun 2025 01:24:26 -0700 From: Roopni Devanathan To: CC: , Roopni Devanathan Subject: [PATCH wireless-next v15 3/4] wifi: cfg80211: Report per-radio RTS threshold to userspace Date: Sun, 15 Jun 2025 13:53:11 +0530 Message-ID: <20250615082312.619639-4-quic_rdevanat@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250615082312.619639-1-quic_rdevanat@quicinc.com> References: <20250615082312.619639-1-quic_rdevanat@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjE1MDA2MCBTYWx0ZWRfX71tLiwOzy67Y hizHTJhU/PCN/YSiC0PHQTb4/ST0pFtNML5cIqxNtfsknOz+KpVuW4aoR88pd8zECV5ilVBVN+6 9lG3T6CbS0ta6hpfQFww6HRRgd5EBUP6sNBEizFmrniWPy2L1ALonjV2snK3HjA+B+egpH4H5Yy Oal7BJE+7nUAJKFidcHCk+NouzGiWCMHOzv3jftGRdbJGhjumfG1HEq7N8YZ+gxBzone3yhnRRa Gib5bej/CwwX43fliRtz1XTcWmpEbaZeUToH6XxodZmMwQYcWqM/WjC0n3p5QGLAUSK0B75tkC+ aszFPYCNqW6yJBTJ8KOhNcaAeJCOew8Z2atffZuc1gqlWkm9i/REnlusynvU5Wck/DN3f7aKYei dkEPCALhddsUmciK7rxj1GnUHE6lk44yNrcvGRkt+ME8WibOrrKCVAT+f86SkxlOcVWYAn1R X-Proofpoint-GUID: Jal4hYGbUigRQekzyiczjxXT6b7jC8zk X-Proofpoint-ORIG-GUID: Jal4hYGbUigRQekzyiczjxXT6b7jC8zk X-Authority-Analysis: v=2.4 cv=CtK/cm4D c=1 sm=1 tr=0 ts=684e833c cx=c_pps a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=GEpy-HfZoHoA:10 a=6IFa9wvqVegA:10 a=COk6AnOGAAAA:8 a=t2xFH_FA9tHEZGNgIz8A:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-15_04,2025-06-13_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 bulkscore=0 phishscore=0 mlxlogscore=999 adultscore=0 impostorscore=0 malwarescore=0 mlxscore=0 priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506150060 In case of multi-radio wiphys, with per-radio RTS threshold brought into use, RTS threshold for each radio in a wiphy can be recorded in wiphy parameter - wiphy_radio_cfg, as an array. Add a new attribute - NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD in nested parameter - NL80211_ATTR_WIPHY_RADIOS. When a request for getting RTS threshold for a particular radio is received, parse the radio id and get the required data. Add this data to the newly added nested attribute NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD. Add support to report this data to userspace. Signed-off-by: Roopni Devanathan --- include/uapi/linux/nl80211.h | 2 ++ net/wireless/nl80211.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 464240e1903f..fe559fd1d4b2 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -8098,6 +8098,7 @@ enum nl80211_ap_settings_flags { * and contains attributes defined in &enum nl80211_if_combination_attrs. * @NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK: bitmask (u32) of antennas * connected to this radio. + * @NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD: RTS threshold (u32) of this radio. * * @__NL80211_WIPHY_RADIO_ATTR_LAST: Internal * @NL80211_WIPHY_RADIO_ATTR_MAX: Highest attribute @@ -8109,6 +8110,7 @@ enum nl80211_wiphy_radio_attrs { NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE, NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION, NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK, + NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD, /* keep last */ __NL80211_WIPHY_RADIO_ATTR_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 284fa19378e7..21f0b3fb0928 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -2447,6 +2447,7 @@ static int nl80211_put_mbssid_support(struct wiphy *wiphy, struct sk_buff *msg) static int nl80211_put_radio(struct wiphy *wiphy, struct sk_buff *msg, int idx) { const struct wiphy_radio *r = &wiphy->radio[idx]; + const struct wiphy_radio_cfg *rcfg = &wiphy->radio_cfg[idx]; struct nlattr *radio, *freq; int i; @@ -2457,6 +2458,11 @@ static int nl80211_put_radio(struct wiphy *wiphy, struct sk_buff *msg, int idx) if (nla_put_u32(msg, NL80211_WIPHY_RADIO_ATTR_INDEX, idx)) goto nla_put_failure; + if (rcfg->rts_threshold && + nla_put_u32(msg, NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD, + rcfg->rts_threshold)) + goto nla_put_failure; + if (r->antenna_mask && nla_put_u32(msg, NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK, r->antenna_mask))