[PATCH ath-next] wifi: ath12k: add channel 177 to the 5 GHz channel list

Baochen Qiang baochen.qiang at oss.qualcomm.com
Mon Apr 20 19:57:58 PDT 2026



On 4/15/2026 2:38 PM, Yingying Tang wrote:
> From: Yingying Tang <yingying.tang at 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 at 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 at oss.qualcomm.com>



More information about the ath12k mailing list