From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A293C433EF for ; Fri, 24 Sep 2021 10:01:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F079610CF for ; Fri, 24 Sep 2021 10:01:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0F079610CF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RDCHnsx9P0RzB3E8D3Zi1MGW/Nz3m9i1Exl05ZGGKfo=; b=XRTFX0oD4YE2n8 mCQk/2heytf2L5ogehXfTWCLUj8zl7rOH41NKjWWMI0iJQHTctgCaMz30OIdbZcCELxwpCr+iBs+D KM9OHzHr3JWVha0plZrFCAt2aQaFNan1FvGr0kU6tWxXc+yIRiyKHivQNalAtyCZMK3RssYeOCMlr PSBUjCmOEcgpXG9u5Mk+9GsJdEgFBu9fp1u1C0xTTyAv5oH3EzaRC1TvxUuXT8jlYEzjIrUUl4rqD q9pwvWK1KenqTCIP/PDxlwOK9NFyRcDuHdNmV8e5ODAPTyg2nu8lgRIuFdm21GiNgvqX8ltTaAOOo U2i9Y1nz4HxRSazZpvvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTi1D-00E1dC-A0; Fri, 24 Sep 2021 10:01:23 +0000 Received: from m43-7.mailgun.net ([69.72.43.7]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTi1B-00E1ch-0K for ath11k@lists.infradead.org; Fri, 24 Sep 2021 10:01:22 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1632477680; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=IP0sYybM0HxKXSdRgwB7ixtI/SKvU15/0Dr5fi1Qn/E=; b=mcFKYDDdq1lshQJx5owZMZuMxASC1X/pV9Lx4UeHENhEK4z7pha9v3h14rVrqDsarskMrAr8 Gs3voMaGa7qBy0quUbZOifukVn2S5yZouA5OWhAjkEr1BzF4+Qmstt2alvABh9HebmMGlf7S LbAf6PHrqGW4wFEBdS+YM3DqKpY= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyJmOGQ2ZiIsICJhdGgxMWtAbGlzdHMuaW5mcmFkZWFkLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 614da1efec62f57c9ac6a6f1 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 24 Sep 2021 10:01:19 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 7EDCCC43616; Fri, 24 Sep 2021 10:01:18 +0000 (UTC) Received: from wgong-HP3-Z230-SFF-Workstation.qca.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wgong) by smtp.codeaurora.org (Postfix) with ESMTPSA id D7E0BC4360C; Fri, 24 Sep 2021 10:01:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org D7E0BC4360C Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Wen Gong To: johannes@sipsolutions.net, ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, wgong@codeaurora.org Subject: [PATCH v4 2/6] mac80211: add parse regulatory info in 6 GHz operation information Date: Fri, 24 Sep 2021 06:00:48 -0400 Message-Id: <20210924100052.32029-3-wgong@codeaurora.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210924100052.32029-1-wgong@codeaurora.org> References: <20210924100052.32029-1-wgong@codeaurora.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210924_030121_137754_E849F06D X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath11k" Errors-To: ath11k-bounces+ath11k=archiver.kernel.org@lists.infradead.org This patch is to convert the regulatory info subfield in HE operation element to power type and save in struct cfg80211_chan_def. Signed-off-by: Wen Gong --- net/mac80211/util.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index ca8008ba9b1f..66e48f29495a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -3385,6 +3385,7 @@ bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata, const struct ieee80211_sta_he_cap *he_cap; struct cfg80211_chan_def he_chandef = *chandef; const struct ieee80211_he_6ghz_oper *he_6ghz_oper; + struct ieee80211_bss_conf *bss_conf; bool support_80_80, support_160; u8 he_phy_cap; u32 freq; @@ -3428,6 +3429,18 @@ bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata, NL80211_BAND_6GHZ); he_chandef.chan = ieee80211_get_channel(sdata->local->hw.wiphy, freq); + bss_conf = &sdata->vif.bss_conf; + + switch (u8_get_bits(he_6ghz_oper->control, + IEEE80211_HE_6GHZ_OPER_CTRL_REG_INFO)) { + case IEEE80211_6GHZ_CTRL_REG_LPI_AP: + bss_conf->power_type = IEEE80211_REG_LPI_AP; + break; + case IEEE80211_6GHZ_CTRL_REG_SP_AP: + bss_conf->power_type = IEEE80211_REG_SP_AP; + break; + } + switch (u8_get_bits(he_6ghz_oper->control, IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH)) { case IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_20MHZ: -- 2.31.1 -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k