Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1422045rdd; Wed, 10 Jan 2024 20:52:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCRvQGbmiY9rhOD+7R/UHdta+vEmsEryUb0ECQ/JLdkj133fxZaALPZT/up0elALo60g/E X-Received: by 2002:a05:6358:24a3:b0:175:5850:782 with SMTP id m35-20020a05635824a300b0017558500782mr714495rwc.35.1704948746613; Wed, 10 Jan 2024 20:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704948746; cv=none; d=google.com; s=arc-20160816; b=RPK/rXqnqmMZEmkpeZVKSQnpYd35UWhcPC1xTUDMbAxXU4H+s1fwYbARDAeiPbMGSQ /z4B3tN9rCSQyksyCxbWICYiQh0rwp0nPsQXUzECv90eyYEwrvDW5cj6Y4E1UDubATs1 YFT6b3YuK8BEe7ZWxNp8nC+QXBWcWSVj4gHZvSO2k9gaMU0k0fncPKhN/REoYOSkyoTG FKtr0cHnPzHX2zN4ApTqKRxYE1vVbdM65Tr3gzn8p65SwFxy2LqJSUu2vDnU+HPSeH9t NxqgTI5qyZdSZLkK4gqoMTa4j7f+tN9tXpBUfW5EaWBRyM7WyDqjkbMMEC7HKmNaHDNi plOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=44d6ppnfHLJS5gJ5jTfkCdHMqHWLX8zv+3Xm9nssYMY=; fh=AbPIYUmLJBwTg11YE+PxpxKzNq+ErB2KX7qIU43oOA8=; b=KO80d66jEEauCrCCGN5DKJBsTUGY1KeEYOGr0SL/HTU23XhKOp1/zI458nUxTY4cHJ PNQDEkTC19jF1SO1Xk366s7A5xLoUgdKmpj+oW1vEQ+w7IggQSCnvYLKKsyb5aC9hDv+ UM9letoFitHSgbkF2oC1etLNtgeU/QV6pQSoVK9Zle9gZMWYUUT+ShFRymzp3jf+GXnh OGtZ0Yz10resvOsc7skVcAO8rQWhlfgYlOKJHpepernuGm0ANeGW8tMOavB6M8heQxJC sd8DMvpkF+tUSwk+qVmNh1pxLsk2sugzJtOZkLtwwIrpGiiy5iA5RN3en4TuxjDjDf2M ZRzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Lu8XT2OQ; spf=pass (google.com: domain of linux-wireless+bounces-1697-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1697-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j192-20020a638bc9000000b005cdf3787c1fsi314134pge.67.2024.01.10.20.52.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 20:52:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1697-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Lu8XT2OQ; spf=pass (google.com: domain of linux-wireless+bounces-1697-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1697-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 443422882BE for ; Thu, 11 Jan 2024 04:52:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEF1E20FA; Thu, 11 Jan 2024 04:51:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Lu8XT2OQ" X-Original-To: linux-wireless@vger.kernel.org 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 A1B0717D4 for ; Thu, 11 Jan 2024 04:51:44 +0000 (UTC) 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 (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40B4UF6K027580; Thu, 11 Jan 2024 04:51:42 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-type; s=qcppdkim1; bh=44d6ppnfHLJS5gJ5jTfk CdHMqHWLX8zv+3Xm9nssYMY=; b=Lu8XT2OQVifKeTECGr670Ie+lUu504WpTZPT 9YsKmSm1Fe81422Ymoj/BM6q6jcNyfRxRwoTak+yQLKlXrzE6xx9fCQady02+iAh giiBvmTvXOmbqu1eq4jJfm+7TioXLUuGg/+BWcAa8wmA9OHCAF94IT5xKz+XJP9M v34ISkS+7FzWAzowMrtX8Ce2c4SW4wYlYJ0MXt6mJw+n1Kbk3L5iHnmYfM13YNlq FeMbsqGzjxRUvXM2hfEXo/utfZXmx6/eT+7jlC/pdWT3vZQvj6ndVN07/E3ujpdy Pr6F8HqIklq/fws9OTYFrQrLhMYuc+LM7XW0Q2YMBgG/E+mfcQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vhvye1n73-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Jan 2024 04:51:42 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40B4pfQD010548 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Jan 2024 04:51:41 GMT Received: from srirrama-linux.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.1118.40; Wed, 10 Jan 2024 20:51:39 -0800 From: Sriram R To: CC: , Sriram R Subject: [PATCH 11/12] wifi: ath12k: Modify rts threshold mac op for single wiphy Date: Thu, 11 Jan 2024 10:20:44 +0530 Message-ID: <20240111045045.28377-12-quic_srirrama@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240111045045.28377-1-quic_srirrama@quicinc.com> References: <20240111045045.28377-1-quic_srirrama@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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-GUID: aI55gCjyCqZKhjCuImJ5P7gyCuDO3dvH X-Proofpoint-ORIG-GUID: aI55gCjyCqZKhjCuImJ5P7gyCuDO3dvH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=793 lowpriorityscore=0 spamscore=0 impostorscore=0 mlxscore=0 adultscore=0 suspectscore=0 clxscore=1015 malwarescore=0 bulkscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401110035 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 --- drivers/net/wireless/ath/ath12k/mac.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 00063c783e6c..900741a5f9e3 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7266,13 +7266,26 @@ 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, i; mutex_lock(&ah->conf_mutex); 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 (i = 0; i < ah->num_radio; 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; + } + ar++; + } mutex_unlock(&ah->conf_mutex); -- 2.17.1