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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 E3EACC43460 for ; Mon, 17 May 2021 20:20:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9094610CC for ; Mon, 17 May 2021 20:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239129AbhEQUVm (ORCPT ); Mon, 17 May 2021 16:21:42 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:55231 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239054AbhEQUVf (ORCPT ); Mon, 17 May 2021 16:21:35 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1621282817; h=Content-Transfer-Encoding: Content-Type: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=n+zVQOhh2k/MElkBkxeXhh/b1v9515nxkUatCtVPed8=; b=I8fjo5XcTDZNIXUoDWJpCyiJ3xfx9jbDWoS2KVWLIsK4PZ/hG0JsV7IjuOxZacse8wbskkXU Ga3BXdIuDtVb1t/z3xO8WUgnVMcBOQ6/qfiNWyobPPd1nhIWq7UHjOhnBDGa1TArfF5QMycn JflfzdQrwDZDMY8tQoo0DVWSty0= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= 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-west-2.postgun.com with SMTP id 60a2cffd5f788b52a5430976 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 17 May 2021 20:20:13 GMT Sender: wgong=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 8007EC43460; Mon, 17 May 2021 20:20:13 +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 9FF19C43217; Mon, 17 May 2021 20:20:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9FF19C43217 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=wgong@codeaurora.org From: Wen Gong To: ath11k@lists.infradead.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, wgong@codeaurora.org Subject: [PATCH 6/9] mac80211: add definition for transmit power envelope element Date: Mon, 17 May 2021 16:19:29 -0400 Message-Id: <20210517201932.8860-7-wgong@codeaurora.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517201932.8860-1-wgong@codeaurora.org> References: <20210517201932.8860-1-wgong@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org IEEE P802.11ax™/D8.0 have some change for transmit power envelope element. This patch to add the definition of it. Signed-off-by: Wen Gong --- include/linux/ieee80211.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 894a2c4d7cb7..a39b5fc1dffc 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -2292,6 +2292,35 @@ struct ieee80211_he_6ghz_oper { u8 minrate; } __packed; +#define IEEE80211_TPE_MAX_IE_COUNT 8 +#define IEEE80211_TPE_MAX_POWER_COUNT 8 + +/* transmit power interpretation type of transmit power envelope element*/ +enum ieee80211_tx_power_intrpt_type { + IEEE80211_TPE_LOCAL_EIRP, + IEEE80211_TPE_LOCAL_EIRP_PSD, + IEEE80211_TPE_REG_CLIENT_EIRP, + IEEE80211_TPE_REG_CLIENT_EIRP_PSD, +}; + +/** + * struct ieee80211_tx_pwr_env + * + * This structure represents the "Transmit Power Envelope element" + */ +struct ieee80211_tx_pwr_env { + u8 tx_power_info; + s8 tx_power[IEEE80211_TPE_MAX_POWER_COUNT]; +} __packed; + +#define TX_PWR_ENV_INFO_COUNT GENMASK(2, 0) +#define TX_PWR_ENV_INFO_INTERPRET GENMASK(5, 3) +#define TX_PWR_ENV_INFO_CATEGORY GENMASK(7, 6) + +#define GET_TX_PWR_ENV_COUNT(fv) FIELD_GET(TX_PWR_ENV_INFO_COUNT, fv) +#define GET_TX_PWR_ENV_INTERPRET(fv) FIELD_GET(TX_PWR_ENV_INFO_INTERPRET, fv) +#define GET_TX_PWR_ENV_CATEGORY(fv) FIELD_GET(TX_PWR_ENV_INFO_CATEGORY, fv) + /* * ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size * @he_oper_ie: byte data of the He Operations IE, stating from the byte @@ -2873,7 +2902,7 @@ enum ieee80211_eid { WLAN_EID_VHT_OPERATION = 192, WLAN_EID_EXTENDED_BSS_LOAD = 193, WLAN_EID_WIDE_BW_CHANNEL_SWITCH = 194, - WLAN_EID_VHT_TX_POWER_ENVELOPE = 195, + WLAN_EID_TX_POWER_ENVELOPE = 195, WLAN_EID_CHANNEL_SWITCH_WRAPPER = 196, WLAN_EID_AID = 197, WLAN_EID_QUIET_CHANNEL = 198, -- 2.31.1 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=-17.1 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,URIBL_BLOCKED, 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 7C12AC43460 for ; Mon, 17 May 2021 20:20:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 0A34661352 for ; Mon, 17 May 2021 20:20:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A34661352 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+ath11k=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=sCUNEAo9kbNhKNBaP7zr3HObsut2ePPRUlyPQ3hEsj8=; b=RacaUo12WG1SN4sAV2zmPKg2t kJLIw99fzYPn4ETZEAUix2gFGgFuwOymk2vOPS9v8It1Rx2qCGuV9ylBeXi0EYJ7fkxEZGuPFzs7Z Yk4Wl5yslg18yAYanAlXiY2Be7niT5ok/oxBgTZ9SUGQ6E4mBSfR+voUMpnAincb5JZOnPPrB5z8H sBqee0LKbEb8Fu5ReK7uyD+i+8kpmQ4MDV0lBSTrzKmeqQfBs2XuIG7SeVDiUTt1gDDpHLjR3DhA9 Z2mfTrwOuUr4p2J0Mp3lPxveCm1QAKYij4GWoQ3R1ph7W51T0Oxhy3ctRW9qi242MniAD4hHYXoG8 dTLQWXvjA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lijjA-00G2nr-En; Mon, 17 May 2021 20:20:36 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lijj3-00G2mR-Q6 for ath11k@desiato.infradead.org; Mon, 17 May 2021 20:20:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=n+zVQOhh2k/MElkBkxeXhh/b1v9515nxkUatCtVPed8=; b=YcISGRosxtHpPkc8D5BvO6Oe32 y7zI/H1PmElT0s0FxOQuI1bWNhCpqQx4dfO4PYXzm9/U90o/oWCxck3rzNKdmImI/M/BoGlA2qrhv fq3opc7oQvuU0GuGOW9c24V6Dkvyhe3DpHiDdZ6DlwuGX1+YgWtbHXCD8ihJX7bf+Y6m8M8OWCb90 KJv1mt+ZZlpqb8yLwSxHeT0GBaKQqrNvddcZU4exbk4WfHmWuH95IYjKYb5FUyrPX8PIJ+HV33Jnf AZWjzMFz7V9BIJokZEFVw5dW2cPHdm1yJ9bG/YGnTdN8eWR6br3NzIoargXENtQH5rhkUgK7xPX4W DiO/Cmwg==; Received: from so254-9.mailgun.net ([198.61.254.9]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lijix-00E7mP-PR for ath11k@lists.infradead.org; Mon, 17 May 2021 20:20:28 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1621282827; h=Content-Transfer-Encoding: Content-Type: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=n+zVQOhh2k/MElkBkxeXhh/b1v9515nxkUatCtVPed8=; b=MafEN4lKZSuOxOL8BmqfdbBCMqMVpD1U5Pp/iR8lWQGL8UOOLd0qt5gcsepg8h914ZzVwIQR BjooZKshzXPlk/vdD4NkI7nhKlJ7nuaBYqbD7OCX87/4l8hKPdwLOvCrePVmqisyiBT8CMxU zdLyVxH+mawUJfnt2yDNjXDFRTI= X-Mailgun-Sending-Ip: 198.61.254.9 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-n07.prod.us-west-2.postgun.com with SMTP id 60a2cffd67d156359aff4b3e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 17 May 2021 20:20:13 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 30737C4323A; Mon, 17 May 2021 20:20:13 +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 9FF19C43217; Mon, 17 May 2021 20:20:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9FF19C43217 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=wgong@codeaurora.org From: Wen Gong To: ath11k@lists.infradead.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, wgong@codeaurora.org Subject: [PATCH 6/9] mac80211: add definition for transmit power envelope element Date: Mon, 17 May 2021 16:19:29 -0400 Message-Id: <20210517201932.8860-7-wgong@codeaurora.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517201932.8860-1-wgong@codeaurora.org> References: <20210517201932.8860-1-wgong@codeaurora.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_132027_380058_4E3015A8 X-CRM114-Status: GOOD ( 12.81 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "ath11k" Errors-To: ath11k-bounces+ath11k=archiver.kernel.org@lists.infradead.org SUVFRSBQODAyLjExYXjihKIvRDguMCBoYXZlIHNvbWUgY2hhbmdlIGZvciAgdHJhbnNtaXQgcG93 ZXIgZW52ZWxvcGUKZWxlbWVudC4gVGhpcyBwYXRjaCB0byBhZGQgdGhlIGRlZmluaXRpb24gb2Yg aXQuCgpTaWduZWQtb2ZmLWJ5OiBXZW4gR29uZyA8d2dvbmdAY29kZWF1cm9yYS5vcmc+Ci0tLQog aW5jbHVkZS9saW51e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