Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp925724lql; Tue, 12 Mar 2024 02:05:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQ6GjTUWhTuFcaWU0EYyvsQjQQlEmDdmHPXCjjYF95eJe9YqIRgdT4uHeYVVKh6EbeO2ur/fYDM6paIoRwWyMwj0zxfi3lrVLrw5UsqA== X-Google-Smtp-Source: AGHT+IGRtxPUx/tDcROjJlWXJCbt0j356s7wra++afrr8nI9FPbPMxMtLUKkQ58ttDdnaG87vx1K X-Received: by 2002:a81:d507:0:b0:609:ff6d:cb87 with SMTP id i7-20020a81d507000000b00609ff6dcb87mr2775355ywj.50.1710234336520; Tue, 12 Mar 2024 02:05:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710234336; cv=pass; d=google.com; s=arc-20160816; b=eKYHmakNXZo1X4NrfEXfUu2KHuUtz6smfi+bV6cjWneNHgJ/yRPymdviI48VanE3Rr i0EtDbmCjPRn5wdBrpQL9o0wXscqw+sOKgyjnQAz6nLpCwB/OBuOq3aH8BIQ44rmO5Nh 3StfhmMqGut28nk/D4ancD5MvpApje7xnkHDPNwfwxBKTs3W8m2d6GKKhDGy553ikoJp VvY6VfyvwjiMtPySvJnp+WhEc8PSuChte+nlht9xYvtGv8L4V84FrCCas7EfRTfTzyXX Y+31Ly9PIhINCqkhasL8Hs61Q49qxHsjBVAott0rxY90we9OG+s8YRDyMjrLsXgsFUcT HqHA== 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=2ooT2xNwMhbWwrEQmrl62I+wO7+i9J6o798XT7Cmwm4=; fh=woZAKccQQLpsH+ifgAFl/ubgLBC7CdNtwbjjrWqWXi0=; b=Gp3TeTHvI5R2b6gdzHJ3efuvxTELxgvQYhlOTDcv5rLnyQ19AIXXwHRIY9aOX09UGY yFVYHCOVE0PigVZK93RB/nAHVR03V9Q2CmkGbFXXfLZ9N7P0x6A2fk23GpHf2oDJ4Ffs gmJOg6qhTybVKG6HPCdV3BEcWDUkwMCnGYqFohsPh/3LRDx0lPew4aOZ+yqpMpixky1p lZFem+ZPCKqM1CsBTFa8Fxx2gBpftGbB5hy3uSXIdu+a6DEmki9s11045D1xfR1f6tFi 0tTFGjxbMjE5SHoK8IaowLQThq3CsBYaweaPweTR5wPiLPlSwS62Ld3MfCSal+IH1yp0 FU9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=asZySQLT; 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-4604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e1-20020ac85981000000b0042ef8988001si7224888qte.410.2024.03.12.02.05.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 02:05:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=asZySQLT; 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-4604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4604-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 22DD51C219A6 for ; Tue, 12 Mar 2024 09:05:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DAAB078284; Tue, 12 Mar 2024 09:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="asZySQLT" 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 6B7ED58ACD for ; Tue, 12 Mar 2024 09:04:48 +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=1710234289; cv=none; b=mK3eRC3VOginkrvsD3p/j1v6mrz8RcGSdzWI7vqZIhBlolXp1YmyVX5i5HpW3ThkZzh/PH9coEZ41+c2vudMiS561wHBx8I6xe1vVjCJX8mAqq74f1btZUwON9bvMCZoDERRekC1fo+zButnG0GVQA+VVcU3XaZf11qskCLWt3Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710234289; c=relaxed/simple; bh=nFpWTN4XYtHR9px+ar1TI87gZMRP0ZR4YizJg/0gSs0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eFoYtXQNlGWeB1AFQZN5D9cqX+Z6994QNj5S/YtxzLqgIpuHPAq+A3z7oFO+kABZdFMbduODqHZC0KtpGZ2P0M+h7Rc2FUx3m4K2vSRrLtiV3DsaV3UNajKKKqEo/BlLW1TCT1xH7qR+UlZp/ZyG+Hl292hy71jml9Y+a700WzU= 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=asZySQLT; arc=none smtp.client-ip=205.220.168.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 (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42C5tTGc008491; Tue, 12 Mar 2024 09:04: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-transfer-encoding:content-type; s= qcppdkim1; bh=2ooT2xNwMhbWwrEQmrl62I+wO7+i9J6o798XT7Cmwm4=; b=as ZySQLTKS9kBIce/SSBXCvI7Es/PZm1GQ7EpMGt4N490qzRGileT2LjXJU+JQoE9g xoDyUYT90Do04t79W4vYcHBdFkpqSnteZ4rRh/t1doDA6Oi0OGpcxUlTPpO4D+JK dnkEHMs0QOgZdIgS/jjmKl0sH5y2iM8Pw0btWu2A7HsiFtKeJkc6gsNpmEKTPbOI Y1jdqNB/LFFkZMAdnCBlJN9kdKrSHDxpZ5T3uM7PL7HGe2UkwQYFxWKy2rBcCGO0 ZfedQWC+8aueWf1qnvSpVxj3jA6C20Vi6Yel7CIhpgQNm928EkAivEboUlDHs32E 8XWNykzavT5PTd1VSKxw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wte5d0pc2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2024 09:04: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 42C94fv9023023 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2024 09:04:41 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.1118.40; Tue, 12 Mar 2024 02:04:39 -0700 From: Rameshkumar Sundaram To: CC: , Sriram R , Rameshkumar Sundaram Subject: [PATCH v3 11/12] wifi: ath12k: Modify rts threshold mac op for single wiphy Date: Tue, 12 Mar 2024 14:33:50 +0530 Message-ID: <20240312090351.1620218-12-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312090351.1620218-1-quic_ramess@quicinc.com> References: <20240312090351.1620218-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: 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-ORIG-GUID: mCu9YujQuP8k-mLCUKTBbiuYot7zFph9 X-Proofpoint-GUID: mCu9YujQuP8k-mLCUKTBbiuYot7zFph9 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-03-12_08,2024-03-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 impostorscore=0 phishscore=0 suspectscore=0 mlxlogscore=909 malwarescore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403120069 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 --- 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 0934abc7995f..6123d7db2edc 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7292,11 +7292,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, 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(i, ah, ar) { + 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