public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Yingying Tang <yintang@qti.qualcomm.com>, ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, yingying.tang@oss.qualcomm.com
Subject: Re: [PATCH ath-next] wifi: ath12k: add channel 177 to the 5 GHz channel list
Date: Tue, 21 Apr 2026 10:57:58 +0800	[thread overview]
Message-ID: <8dee7c0f-ab0a-4b49-9c66-e80c9c305522@oss.qualcomm.com> (raw)
In-Reply-To: <20260415063857.2462256-1-yintang@qti.qualcomm.com>



On 4/15/2026 2:38 PM, Yingying Tang wrote:
> From: Yingying Tang <yingying.tang@oss.qualcomm.com>
> 
> Add support for 5 GHz channel 177 with a center frequency of 5885 MHz and
> Operating Class 125 per IEEE Std 802.11-2024 Table E-4.
> 
> Channels 169, 173, and 177 are in the 5.9 GHz band and must be disabled
> when 5.9 GHz service bit is not supported. The 5.9 GHz band is only permitted
> for WLAN operation under FCC regulations.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
> 
> Signed-off-by: Yingying Tang <yingying.tang@oss.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath12k/mac.c   | 26 +++++++++++++++++++++++++
>  drivers/net/wireless/ath/ath12k/wmi.h   |  1 +
>  4 files changed, 38 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
> index 59c193b24764..17b31c969cd9 100644
> --- a/drivers/net/wireless/ath/ath12k/core.h
> +++ b/drivers/net/wireless/ath/ath12k/core.h
> @@ -541,8 +541,8 @@ struct ath12k_sta {
>  #define ATH12K_MAX_5GHZ_FREQ	(ATH12K_5GHZ_MAX_CENTER + ATH12K_HALF_20MHZ_BW)
>  #define ATH12K_MIN_6GHZ_FREQ	(ATH12K_6GHZ_MIN_CENTER - ATH12K_HALF_20MHZ_BW)
>  #define ATH12K_MAX_6GHZ_FREQ	(ATH12K_6GHZ_MAX_CENTER + ATH12K_HALF_20MHZ_BW)
> -#define ATH12K_NUM_CHANS 101
> -#define ATH12K_MAX_5GHZ_CHAN 173
> +#define ATH12K_NUM_CHANS 102
> +#define ATH12K_MAX_5GHZ_CHAN 177
>  
>  static inline bool ath12k_is_2ghz_channel_freq(u32 freq)
>  {
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index f0b4f607b845..5327a427c26c 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -17,6 +17,11 @@
>  #include "dp_mon.h"
>  #include "debugfs_htt_stats.h"
>  
> +#define ATH12K_2GHZ_MIN_CHAN_NUM 1
> +#define ATH12K_2GHZ_MAX_CHAN_NUM 14
> +#define ATH12K_5GHZ_MIN_CHAN_NUM 36
> +#define ATH12K_5GHZ_MAX_CHAN_NUM 177
> +
>  static int ath12k_dp_rx_tid_delete_handler(struct ath12k_base *ab,
>  					   struct ath12k_dp_rx_tid_rxq *rx_tid);
>  
> @@ -1284,9 +1289,11 @@ void ath12k_dp_rx_h_ppdu(struct ath12k_pdev_dp *dp_pdev,
>  	    center_freq <= ATH12K_MAX_6GHZ_FREQ) {
>  		rx_status->band = NL80211_BAND_6GHZ;
>  		rx_status->freq = center_freq;
> -	} else if (channel_num >= 1 && channel_num <= 14) {
> +	} else if (channel_num >= ATH12K_2GHZ_MIN_CHAN_NUM &&
> +		   channel_num <= ATH12K_2GHZ_MAX_CHAN_NUM) {
>  		rx_status->band = NL80211_BAND_2GHZ;
> -	} else if (channel_num >= 36 && channel_num <= 173) {
> +	} else if (channel_num >= ATH12K_5GHZ_MIN_CHAN_NUM &&
> +		   channel_num <= ATH12K_5GHZ_MAX_CHAN_NUM) {
>  		rx_status->band = NL80211_BAND_5GHZ;
>  	}
>  
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index 553ec28b6aaa..7fb6507cebf8 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -51,6 +51,9 @@
>  	.max_power              = 30, \
>  }
>  
> +#define ATH12K_5_9_GHZ_MIN_FREQ 5845
> +#define ATH12K_5_9_GHZ_MAX_FREQ 5885
> +
>  static const struct ieee80211_channel ath12k_2ghz_channels[] = {
>  	CHAN2G(1, 2412, 0),
>  	CHAN2G(2, 2417, 0),
> @@ -96,6 +99,7 @@ static const struct ieee80211_channel ath12k_5ghz_channels[] = {
>  	CHAN5G(165, 5825, 0),
>  	CHAN5G(169, 5845, 0),
>  	CHAN5G(173, 5865, 0),
> +	CHAN5G(177, 5885, 0),
>  };
>  
>  static const struct ieee80211_channel ath12k_6ghz_channels[] = {
> @@ -13900,6 +13904,26 @@ static int ath12k_mac_update_band(struct ath12k *ar,
>  	return 0;
>  }
>  
> +static void ath12k_mac_update_5_9_ghz_ch_list(struct ath12k *ar,
> +					      struct ieee80211_supported_band *band)
> +{
> +	int i;
> +
> +	if (test_bit(WMI_TLV_SERVICE_5_9GHZ_SUPPORT,
> +		     ar->ab->wmi_ab.svc_map))
> +		return;
> +
> +	guard(spinlock_bh)(&ar->ab->base_lock);
> +	if (ar->ab->dfs_region != ATH12K_DFS_REG_FCC)
> +		return;
> +
> +	for (i = 0; i < band->n_channels; i++) {
> +		if (band->channels[i].center_freq >= ATH12K_5_9_GHZ_MIN_FREQ &&
> +		    band->channels[i].center_freq <= ATH12K_5_9_GHZ_MAX_FREQ)
> +			band->channels[i].flags |= IEEE80211_CHAN_DISABLED;
> +	}
> +}
> +
>  static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
>  					   u32 supported_bands,
>  					   struct ieee80211_supported_band *bands[])
> @@ -14033,6 +14057,8 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
>  			band->n_bitrates = ath12k_a_rates_size;
>  			band->bitrates = ath12k_a_rates;
>  
> +			ath12k_mac_update_5_9_ghz_ch_list(ar, band);
> +
>  			if (ab->hw_params->single_pdev_only) {
>  				phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_5GHZ_CAP);
>  				reg_cap = &ab->hal_reg_cap[phy_id];
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
> index 5ba9b7d3a888..8fab8ddaae59 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.h
> +++ b/drivers/net/wireless/ath/ath12k/wmi.h
> @@ -2259,6 +2259,7 @@ enum wmi_tlv_service {
>  	WMI_TLV_SERVICE_FREQINFO_IN_METADATA = 219,
>  	WMI_TLV_SERVICE_EXT2_MSG = 220,
>  	WMI_TLV_SERVICE_BEACON_PROTECTION_SUPPORT = 244,
> +	WMI_TLV_SERVICE_5_9GHZ_SUPPORT = 247,
>  	WMI_TLV_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT = 249,
>  	WMI_TLV_SERVICE_MBSS_PARAM_IN_VDEV_START_SUPPORT = 253,
>  

Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>

  reply	other threads:[~2026-04-21  2:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15  6:38 [PATCH ath-next] wifi: ath12k: add channel 177 to the 5 GHz channel list Yingying Tang
2026-04-21  2:57 ` Baochen Qiang [this message]
2026-04-21  6:15 ` Rameshkumar Sundaram

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=8dee7c0f-ab0a-4b49-9c66-e80c9c305522@oss.qualcomm.com \
    --to=baochen.qiang@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yingying.tang@oss.qualcomm.com \
    --cc=yintang@qti.qualcomm.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