Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp65185lqe; Fri, 5 Apr 2024 12:46:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/tCVN6gwUrlipvtf9h2tZNQOdhySD5QfutTbIWJpN0kdOEqMXzrcso8p6tKwUSmWMIc4PpwIuuwymqQtSG0v6tNzrsK0mpp37jW6wyQ== X-Google-Smtp-Source: AGHT+IGy/p+8Rk+tPAiz+QO4yMh1mhGA9sUQbHGBN3zUFKQXP69xypvXvpH5EwiCG3khN7bQiWnD X-Received: by 2002:a17:90b:1bcc:b0:2a2:5860:dea8 with SMTP id oa12-20020a17090b1bcc00b002a25860dea8mr2148089pjb.7.1712346393879; Fri, 05 Apr 2024 12:46:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712346393; cv=pass; d=google.com; s=arc-20160816; b=REx6DR4PLpDzbqtkAm8paL1YHLyvWRA5upBW+8xbLy7rrobjiWc/JlWznOgHkMZqci 5lk0juzIUh5NSB7I/Cor3+HVgEWUPmwoBG5lfPKlLKETpnOv6a0KxeVGZUrLa5RQqIFM sBxCOu0FGjmqO0LTYo2oyLX+dbApbHiAbA7e0El2gVEfG053hSt0YBTItSK3r9OHLLYV glua0KE1rNQ0KSKENEbcj66w6p4t8bKPqDc4nX44an6HCLgB2MjZRZz8xhrmgKgi1LQY P/Wa5YVwXe6sx6PCcJemUggUSEP0F+wM126ag/XZTT4PwTwaU4mRHrTcRSSQ4+qlw98W Bfuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wdsL99qdpnEddxsJCocb7LqJRTPegYy2s5uSFogKxdU=; fh=hXmvBwTcrACbulhadJq4aGomw93PvN9px3WarQqqC4o=; b=Kg+DDspfeqox9HNnkkBDGDAG6WcnFad6OJEW9aOM41MO/R13K6AlwE7/rhwZbJlNk8 l25bnMa5dxXuJGvwAwTvC3UUS6E7wfDrEe36tX3gFv7olN5vDpduK5fm9tCUWaUjE3pQ eh/OKuQ+lnQRtSdMdr9qNQhTeOdqpoaK/A5A0L5/DKVok2bRJf8rmF//CWbuPKSsCDtp H1HQ80/mYvfKj8G8C5q6FH/bOPvK99N4lP27pB+mqTwZYXjOZjQFspzds/20CLVzU949 NDkTEJfc3qGF4ENF3krjyt8LMjWLnH/IrL44O8C7JW91podCYuiPN/QJ6P6a7QycNDAE RgRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=J3qBZ+Um; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-5929-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5929-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m18-20020a17090aab1200b002a2b375020asi4032629pjq.122.2024.04.05.12.46.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 12:46:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5929-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=J3qBZ+Um; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-5929-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5929-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 87BA3283A5A for ; Fri, 5 Apr 2024 19:46:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BE3F173345; Fri, 5 Apr 2024 19:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="J3qBZ+Um" X-Original-To: linux-wireless@vger.kernel.org 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 E24D5174EE2 for ; Fri, 5 Apr 2024 19:46:03 +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=1712346365; cv=none; b=Bj/TBAuhACdhNH6em9X8/glhR1YOuFjIUd0IkFfwWhjQOPvkt7/StBwc10XOL1b4Vd5uBur1qdod61fGLO6nsswYQI2G/XbH68KG4sI4Z+/yfsetEssoQz/3kVZrERErBhFK9f1iGmFgutCDoC7Gj7PQb6Cx7M1g0Ev+QkY36GA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712346365; c=relaxed/simple; bh=gy9bSoI/K1xLowZlaYZygQO//BQKC3Mpf4KmLfUQO40=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eHgaPErCcvfEZzzv6KJZHj7PCO/jDqbciyQGnc/rmjOiD2TMnINmrmGQOYhaieOt37j7JkAzJ0VHAgMFRFr5QAxZqJyZMMl1OPb7XBiJzEIR5CXKzH7oGeT6gIiv188TFLRK8aJ7eRBM6JaX8e/MqsiMtnt269cvWLGCzRxMADY= 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=J3qBZ+Um; 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 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 435JQMEZ003272; Fri, 5 Apr 2024 19:46:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=wdsL99qdpnEddxsJCocb7LqJRTPegYy2s5uSFogKxdU=; b=J3 qBZ+UmKOsaX43FXIomD5gfieJzi1jp3aJpcCKROSHfqSPVj4EuH1R5nXf97ChFSK BMAyt0bBjmIFv3oNYlmKbjmUb2gEyAYdNUnMAd7D7uZKUCi6jYylbare4ZM02+kP hKX5mQU2RO0fkHAt1HtXLjBTMBdX3RmE/t1aPpHKr//iXEWGjd07PjKV+71tSNwP NK/32XkhJJBvRs74bDg1nUiN2AlLKuHeJIE5vBD6nrU/H++OoHeqKUL1Iz0h+VQM t1t4wWvN/MD5FwLuDm8mKBqleRSUqoeD9ppJasCSiR7d/GjYPlOHKEZw7XRLZF8J nyeJfSD5wWFo2R63zIDw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xahb10ywy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Apr 2024 19:46:00 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 435Jjx8H016758 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Apr 2024 19:45:59 GMT Received: from hu-ramess-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 5 Apr 2024 12:45:57 -0700 From: Rameshkumar Sundaram To: CC: , Sriram R , Rameshkumar Sundaram , Jeff Johnson Subject: [PATCH v7 11/12] wifi: ath12k: Modify rts threshold mac op for single wiphy Date: Sat, 6 Apr 2024 01:15:18 +0530 Message-ID: <20240405194519.1337906-12-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240405194519.1337906-1-quic_ramess@quicinc.com> References: <20240405194519.1337906-1-quic_ramess@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: z--LjhqrORj_m3kdP0o7K_6ZJQDGnYQL X-Proofpoint-GUID: z--LjhqrORj_m3kdP0o7K_6ZJQDGnYQL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-05_21,2024-04-05_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 malwarescore=0 impostorscore=0 mlxlogscore=924 mlxscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404050138 From: Sriram R Since multiple radios are abstracted under a single wiphy, apply the rts threshold value to all the vdevs of the radios combined under single wiphy. This also implies that vif specific rts threshold support needs to be added in future from cfg80211/mac80211. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Sriram R Signed-off-by: Rameshkumar Sundaram Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 77abd46a69d3..72495136022b 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7322,11 +7322,21 @@ static int ath12k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) { struct ath12k_hw *ah = ath12k_hw_to_ah(hw); struct ath12k *ar; - int param_id = WMI_VDEV_PARAM_RTS_THRESHOLD, ret; + int param_id = WMI_VDEV_PARAM_RTS_THRESHOLD, ret = 0, i; - ar = ath12k_ah_to_ar(ah, 0); - - ret = ath12k_set_vdev_param_to_all_vifs(ar, param_id, value); + /* Currently we set the rts threshold value to all the vifs across + * all radios of the single wiphy. + * TODO Once support for vif specific RTS threshold in mac80211 is + * available, ath12k can make use of it. + */ + for_each_ar(ah, ar, i) { + ret = ath12k_set_vdev_param_to_all_vifs(ar, param_id, value); + if (ret) { + ath12k_warn(ar->ab, "failed to set RTS config for all vdevs of pdev %d", + ar->pdev->pdev_id); + break; + } + } return ret; } -- 2.25.1