Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp825180rwo; Wed, 2 Aug 2023 05:00:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlFFrJStfzXT1Sv1ULQjeK2j+ciDEN+czfjGxJGI1cYKj5zeq9N1pmM+nb79mNsH05tUcJ2w X-Received: by 2002:a05:6402:1859:b0:522:3ef1:b1d with SMTP id v25-20020a056402185900b005223ef10b1dmr4640062edy.6.1690977645139; Wed, 02 Aug 2023 05:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690977645; cv=none; d=google.com; s=arc-20160816; b=ehfuE9lxDpP4iLKBnA49h6dK413txzh7r/d968WrsvHmOAdDfhR4x+cS9CaOy3LqyV UYM8i9HWa7h63yNtKRwsh6tXRMSQxCDL+AsRqMNO9qnMUEsknKLqujVL/WnH2O/tLFAv aSiRerTLhV0hAHJLxms90hsNnafK7bcg389INk7yESAJLM9ZYdFoKBWKNY0cfJX12bHJ d7VnUmISgL2AKF493TYocppj5sL5Rx4ErSc+eZzRJR/mlD4npUM1CPZgN2YsTMyrpymV EQpYhgBTX8JOa0jHnGioxeq/WIrta1uQSz/ONh4hZPs+13JQlqgXl/bgxO4O+hdMEeuE f+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=8levXE6dRLPPIDyVQ8b3V5K2ThncAHhs8liP2oT3Rn0=; fh=rGEXwBaxCYau5ZdGJimQSMVIpHf6XOv6XoiZCkc5FJo=; b=Dqm93JwXIYRanVNKhCizmkDwIMk271cfBvL2yZsVXKricSVHoV0cnJ7x7GIidmEMEE E/MhWTTmEgmsuWsVnvV0J8Ngd+oNrZxCm3Xf/XyZKclN34A29VcxNwgVJlcWCW0LwDaJ kIAHTJpTCEYF6zTPEXt8Bsi82z770y/DNt0/36VoRh5rU3kTuU/Uz17/WQSS1MITEU6O Reze+z+PdfiePZF0XDdtW51K+5dw006f9yOQPOuilwzE0sicvZg7qqU4EXZw2mk1Sa+m 7wwEcYuh+fD5i1trTvPrSU9hpnEld1n292CSig37pOFS95zrcwqYVOWA3Evoj0vKvCR8 3kkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YR9WmRRw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020aa7c152000000b00522d912cd61si3157195edp.175.2023.08.02.05.00.27; Wed, 02 Aug 2023 05:00:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YR9WmRRw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232818AbjHBLpt (ORCPT + 58 others); Wed, 2 Aug 2023 07:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234211AbjHBLps (ORCPT ); Wed, 2 Aug 2023 07:45:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B316226A1 for ; Wed, 2 Aug 2023 04:45:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 523FC6193C for ; Wed, 2 Aug 2023 11:45:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F19DFC433C7; Wed, 2 Aug 2023 11:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690976745; bh=zwoKG3lx3jesoWIM65Zml8EW8Hft2kRROiIGMP7TCKs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YR9WmRRwYB3w+kXXEB0NwMed/Q9l1QF6KxLe8+Jc3GC31rsCeu35OGfprLGtoQg8O 9k7hsNstZgCi5AdFiAPd0Nd5ptrHI/zadBnV/0MxNHZSRmjOxDyfHX8LYgBkcD429n OMskULJz0rFqqP4Lhyp7HSutYKQo5ii3PaQKy+er1bQqNaCHrrPo2+s42IUSk3Jba/ lJoh0UzC8N5HfDF/ChVsT9xN8JkOVmw3yM9zCmclvcmRApBVIVVgFzxYoCA7eEtkA4 UriD/OpjUudKHWGnUWk3QO03APkwJ9K+BD3WtXHCZCYMkYNmz2+YojfTu1Vbk2jlK4 pFL4BeqtKCePQ== From: Kalle Valo To: Wen Gong Cc: , Subject: Re: [PATCH v4 1/5] wifi: ath11k: add support to select 6 GHz Regulatory type References: <20230607094810.26707-1-quic_wgong@quicinc.com> <20230607094810.26707-2-quic_wgong@quicinc.com> Date: Wed, 02 Aug 2023 14:45:43 +0300 In-Reply-To: <20230607094810.26707-2-quic_wgong@quicinc.com> (Wen Gong's message of "Wed, 7 Jun 2023 05:48:06 -0400") Message-ID: <87v8dxvfa0.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Wen Gong writes: > There are 3 types of regulatory rules for AP mode and 6 type for > station mode. Add wmi_vdev_type and ieee80211_ap_reg_power to > select the exact reg rules. > > Tested-on: WCN6855 hw2.0 PCI > WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 > > Signed-off-by: Wen Gong [...] > --- a/drivers/net/wireless/ath/ath11k/reg.c > +++ b/drivers/net/wireless/ath/ath11k/reg.c > @@ -607,25 +607,64 @@ ath11k_reg_update_weather_radar_band(struct ath11k_base *ab, > *rule_idx = i; > } > > +enum wmi_reg_6ghz_ap_type > +ath11k_ieee80211_ap_pwr_type_convert(enum ieee80211_ap_reg_power power_type) > +{ > + switch (power_type) { > + case IEEE80211_REG_LPI_AP: > + return WMI_REG_INDOOR_AP; > + case IEEE80211_REG_SP_AP: > + return WMI_REG_STANDARD_POWER_AP; > + case IEEE80211_REG_VLP_AP: > + return WMI_REG_VERY_LOW_POWER_AP; > + default: > + return WMI_REG_MAX_AP_TYPE; > + } Rename to something like ath11k_reg_ap_pwr_convert()? And this can be a static function, I don't see it used outside of reg.c. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches