From: Aditya Kumar Singh <quic_adisi@quicinc.com>
To: Wen Gong <quic_wgong@quicinc.com>, <ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>, <kvalo@kernel.org>,
<quic_jjohnson@quicinc.com>
Subject: Re: [PATCH v6 11/13] wifi: ath11k: discard BSS_CHANGED_TXPOWER when EXT_TPC_REG_SUPPORT for 6 GHz
Date: Fri, 22 Sep 2023 14:34:32 +0530 [thread overview]
Message-ID: <4e4024eb-b518-4a36-b230-3c413c3a06e8@quicinc.com> (raw)
In-Reply-To: <20230920082349.29111-12-quic_wgong@quicinc.com>
On 9/20/23 13:53, Wen Gong wrote:
> When station is connected to a 6 GHz AP, it has 2 way to configure
> the power limit to firmware. The first way is to send 2 wmi command
> WMI_PDEV_PARAM_TXPOWER_LIMIT2G/WMI_PDEV_PARAM_TXPOWER_LIMIT5G to
> firmware, the second way is to send WMI_VDEV_SET_TPC_POWER_CMDID to
> firmware which include more parameters for power control.
>
> When firmware support SERVICE_EXT_TPC_REG, it means firmware support
> the second way for WMI_VDEV_SET_TPC_POWER_CMDID, then ath11k discard
> BSS_CHANGED_TXPOWER flag from mac80211 which is used to the first way
> for 6 GHz band in this patch and select the second way in the subsequent
> patch.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
> ---
> drivers/net/wireless/ath/ath11k/mac.c | 22 +++++++++++++++++++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
> index f05d66913abd..a8ae281d2635 100644
> --- a/drivers/net/wireless/ath/ath11k/mac.c
> +++ b/drivers/net/wireless/ath/ath11k/mac.c
> @@ -3396,6 +3396,18 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
> return 0;
> }
>
> +static bool ath11k_mac_supports_station_tpc(struct ath11k *ar,
> + struct ath11k_vif *arvif,
> + const struct cfg80211_chan_def *chandef)
> +{
> + return ath11k_mac_supports_6ghz_cc_ext(ar) &&
> + test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT, ar->ab->wmi_ab.svc_map) &&
> + arvif->vdev_type == WMI_VDEV_TYPE_STA &&
> + arvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE &&
> + chandef->chan &&
> + chandef->chan->band == NL80211_BAND_6GHZ;
> +}
> +
> static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
> struct ieee80211_vif *vif,
> struct ieee80211_bss_conf *info,
> @@ -3595,9 +3607,13 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
> if (changed & BSS_CHANGED_TXPOWER) {
> ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev_id %i txpower %d\n",
> arvif->vdev_id, info->txpower);
> -
> - arvif->txpower = info->txpower;
> - ath11k_mac_txpower_recalc(ar);
> + if (ath11k_mac_supports_station_tpc(ar, arvif, &info->chandef)) {
So even if user wants to operate in low power value, we won't be
allowing to do that in case of 6 GHz station mode? Only TPC power is valid?
> + ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
> + "discard tx power, change to set TPC power\n");
> + } else {
> + arvif->txpower = info->txpower;
> + ath11k_mac_txpower_recalc(ar);
> + }
> }
>
> if (changed & BSS_CHANGED_PS &&
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2023-09-22 9:04 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 8:23 [PATCH v6 00/13] wifi: ath11k: add support for 6 GHz station for various modes : LPI, SP and VLP Wen Gong
2023-09-20 8:23 ` [PATCH v6 01/13] wifi: ath11k: add support to select 6 GHz regulatory type Wen Gong
2023-09-20 8:23 ` [PATCH v6 02/13] wifi: ath11k: store cur_regulatory_info for each radio Wen Gong
2023-09-21 19:51 ` Jeff Johnson
2023-09-29 13:16 ` Kalle Valo
2023-09-20 8:23 ` [PATCH v6 03/13] wifi: ath11k: fix a possible dead lock caused by ab->base_lock Wen Gong
2023-09-21 19:54 ` Jeff Johnson
2023-09-25 10:35 ` Kalle Valo
2023-10-02 15:51 ` Kalle Valo
2023-09-20 8:23 ` [PATCH v6 04/13] wifi: ath11k: update regulatory rules when interface added Wen Gong
2023-09-21 19:58 ` Jeff Johnson
2023-09-22 9:32 ` Aditya Kumar Singh
2023-09-20 8:23 ` [PATCH v6 05/13] wifi: ath11k: update regulatory rules when connect to AP on 6 GHz band for station Wen Gong
2023-09-21 19:59 ` Jeff Johnson
2023-09-22 9:39 ` Aditya Kumar Singh
2023-09-22 10:02 ` Wen Gong
2023-09-22 13:18 ` Aditya Kumar Singh
2023-09-25 10:43 ` Wen Gong
2023-09-25 10:52 ` Aditya Kumar Singh
2023-09-25 10:57 ` Wen Gong
2023-09-20 8:23 ` [PATCH v6 06/13] wifi: ath11k: save power spectral density(psd) of regulatory rule Wen Gong
2023-09-21 20:00 ` Jeff Johnson
2023-09-22 9:49 ` Aditya Kumar Singh
2023-09-20 8:23 ` [PATCH v6 07/13] wifi: ath11k: add parse of transmit power envelope element Wen Gong
2023-09-21 20:04 ` Jeff Johnson
2023-09-20 8:23 ` [PATCH v6 08/13] wifi: ath11k: save max tx power in vdev start response event from firmware Wen Gong
2023-09-21 20:04 ` Jeff Johnson
2023-09-20 8:23 ` [PATCH v6 09/13] wifi: ath11k: fill parameters for vdev set tpc power WMI command Wen Gong
2023-09-21 20:09 ` Jeff Johnson
2023-09-21 20:11 ` Jeff Johnson
2023-09-25 10:46 ` Wen Gong
2023-09-29 13:18 ` Kalle Valo
2023-09-20 8:23 ` [PATCH v6 10/13] wifi: ath11k: add WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT service bit Wen Gong
2023-09-21 20:13 ` Jeff Johnson
2023-09-20 8:23 ` [PATCH v6 11/13] wifi: ath11k: discard BSS_CHANGED_TXPOWER when EXT_TPC_REG_SUPPORT for 6 GHz Wen Gong
2023-09-21 20:39 ` Jeff Johnson
2023-09-22 9:04 ` Aditya Kumar Singh [this message]
2023-09-22 9:17 ` Wen Gong
2023-09-20 8:23 ` [PATCH v6 12/13] wifi: ath11k: add handler for WMI_VDEV_SET_TPC_POWER_CMDID Wen Gong
2023-09-21 20:37 ` Jeff Johnson
2023-09-20 8:23 ` [PATCH v6 13/13] wifi: ath11k: send TPC power to firmware for 6 GHz station Wen Gong
2023-09-21 20:38 ` Jeff Johnson
2023-09-22 9:24 ` Aditya Kumar Singh
2023-09-22 10:12 ` Wen Gong
2023-09-22 13:25 ` Aditya Kumar Singh
2023-09-25 2:15 ` Wen Gong
2023-09-25 5:41 ` Aditya Kumar Singh
2023-09-25 10:50 ` Wen Gong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e4024eb-b518-4a36-b230-3c413c3a06e8@quicinc.com \
--to=quic_adisi@quicinc.com \
--cc=ath11k@lists.infradead.org \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_jjohnson@quicinc.com \
--cc=quic_wgong@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).