Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2730089rdb; Fri, 22 Sep 2023 07:03:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFY5uyOMoNCB/iXMNiFB4/g5upwBza/7CcGn+Ua7dtEkb78ekBHTJlEds+ZnSh4vODwW8gS X-Received: by 2002:a05:6a20:104e:b0:15d:641b:57b6 with SMTP id gt14-20020a056a20104e00b0015d641b57b6mr3641040pzc.5.1695391388867; Fri, 22 Sep 2023 07:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695391388; cv=none; d=google.com; s=arc-20160816; b=TIDOBPN9e9n1ohWqN08t2ApN7PxjqKYscCCXrDuvECye1wL5U5h66wKO0O3iez9uxF qDj7ruR4dBIXqP2mtCHwWGK/xO40aOzAKagAEsp0aYEGo9k/2fDa+bi+rYb4gxkGDGp8 rNcbDPEFzgTi3k6KwNNZKow+srvTz/RYn0/My8c3sBqndIn+OneGcwpdKB2Zqxxv6CCg vnTATB2cUnyeRCMfytWoJrKcciOO+UHwDcnAJaWbwRZnoin6bOGzK1kh2yIU+g4RwAoJ OvRPIaNyXbSezHup1gOcb7exoZU0e5eqz3N/FsUdA6rz9EbuAXGS8yvn4VZX9irFMsiw EEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BpNWDr/p+sNssrpqDRn01GQk5e3gdOKA+k3ursFJFyA=; fh=75CDHJDuowxspHrWYGyFkxqtTsCAv36FxKet5aSzFkk=; b=HBSmYWgg+RcznmDz6WJ7mJQxi7fLgYY75Pz0QVrEgoy8egITOOm/hdtlgE/dhNmCjm 5jIW7vHXIR8gNY0R+AE1XRMUDGdNWo0EisOkiWUpOkA7I0cG5BXlYBjl8cp43Y6NmyPk L/hyv5/uYtU1lUTLthGs5KC4fv4aF5h7cpdylGb7BHzSfMkso1hMxuUiwtyG4UYwxUTm vf1WqZI54nn7z2ZNaX/YyERVNB/2j7pAESeJezy6z0iXwlR9locoyMR1ixyerVfHSCN1 ECbAUMhrE88UmxipkY+CV0HwacajCmZqjMtdAafyS3uXUqdjTQwe0ii/d697+gCsmDL2 YF2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gAth5Ax9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id f31-20020a056a000b1f00b0068a85532963si3605681pfu.160.2023.09.22.07.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 07:03:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gAth5Ax9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id EF1CC83B7AA1; Fri, 22 Sep 2023 02:33:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233057AbjIVJdR (ORCPT + 56 others); Fri, 22 Sep 2023 05:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233046AbjIVJdE (ORCPT ); Fri, 22 Sep 2023 05:33:04 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92195E61 for ; Fri, 22 Sep 2023 02:32:34 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38M91nBB027510; Fri, 22 Sep 2023 09:32:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=BpNWDr/p+sNssrpqDRn01GQk5e3gdOKA+k3ursFJFyA=; b=gAth5Ax9syYsvsyxQ4I5O6RLRJ9V4ap6DqcEEe1DGv5meP8rIFDbQBciAALGBtB3g9uj wGpLLxUC2OhZ/rqLhQYwKSlyPAqdI70yB1ixHVHM7gKuoJQManUXikY6ZTJi+s3hYuzS vlQjD3/EdDcXmQ+Qil6RmEyDvKILZpj6ncGmBZxvaSwzNPHwNFtwbRI5YuA/5ysUIPn8 lckaX7/nSMngjY43Tlnvsp+wA2OTGD1c5bj0YuUNkBeuA0DGmf9skqUvbxOsNBwWTwgc izX1MBuKhqFcYOeLSa7wPSBQuUDLPAYIbbBWV/VQ4ki492ZSxCaUXiz/8EJJpi69Os6G lg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t8u0hhfqu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 09:32:27 +0000 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 38M9WQCj022184 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 09:32:26 GMT Received: from [10.216.13.153] (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.36; Fri, 22 Sep 2023 02:32:23 -0700 Message-ID: Date: Fri, 22 Sep 2023 15:02:19 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 04/13] wifi: ath11k: update regulatory rules when interface added Content-Language: en-US To: Wen Gong , CC: , , References: <20230920082349.29111-1-quic_wgong@quicinc.com> <20230920082349.29111-5-quic_wgong@quicinc.com> From: Aditya Kumar Singh In-Reply-To: <20230920082349.29111-5-quic_wgong@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] 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: Zb5AT49d7JW4Tg-tREqZlGlALOnoBe7B X-Proofpoint-GUID: Zb5AT49d7JW4Tg-tREqZlGlALOnoBe7B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-22_07,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 lowpriorityscore=0 phishscore=0 priorityscore=1501 spamscore=0 adultscore=0 suspectscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309220079 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 02:33:14 -0700 (PDT) On 9/20/23 13:53, Wen Gong wrote: > There are two power types for 6 GHz regulatory, one is AP, another > is client. > > When wlan boot up, WMI_REG_CHAN_LIST_CC_EXT_EVENTID is sent from > firmware at an early stage, the interface mode is not decided at > this point, then ath11k select reg rules of AP type as default. > > After interface is created, it is exactly decided the interface > type such as AP/mesh point/station. Then ath11k need to update > reg rules to the exact power type matched to the interface type. > > The client power type is used for station interface, and AP power > type is used for AP/mesh point interface. > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 > > Signed-off-by: Wen Gong > --- > drivers/net/wireless/ath/ath11k/mac.c | 14 ++++++++++++++ > drivers/net/wireless/ath/ath11k/mac.h | 2 +- > 2 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c > index c071bf5841af..0512c8b0661c 100644 > --- a/drivers/net/wireless/ath/ath11k/mac.c > +++ b/drivers/net/wireless/ath/ath11k/mac.c > @@ -6714,6 +6714,12 @@ static int ath11k_mac_vdev_delete(struct ath11k *ar, struct ath11k_vif *arvif) > return ret; > } > > +bool ath11k_mac_supports_6ghz_cc_ext(struct ath11k *ar) > +{ > + return (test_bit(WMI_TLV_SERVICE_REG_CC_EXT_EVENT_SUPPORT, > + ar->ab->wmi_ab.svc_map)) && ar->supports_6ghz; > +} > + Primarily we are checking whether WMI service is advertised or not, so better place to keep this function would be in wmi.c?