Skip to content

Commit b4fb515

Browse files
committed
FROMLIST: wifi: ath12k: add channel 177 to the 5 GHz channel list
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. CRs-Fixed: 4435878 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3 Link: https://lore.kernel.org/all/20260415063857.2462256-1-yintang@qti.qualcomm.com Signed-off-by: Yingying Tang <yingying.tang@oss.qualcomm.com>
1 parent cdf31ed commit b4fb515

4 files changed

Lines changed: 38 additions & 4 deletions

File tree

drivers/net/wireless/ath/ath12k/core.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ struct ath12k_sta {
540540
#define ATH12K_MAX_5GHZ_FREQ (ATH12K_5GHZ_MAX_CENTER + ATH12K_HALF_20MHZ_BW)
541541
#define ATH12K_MIN_6GHZ_FREQ (ATH12K_6GHZ_MIN_CENTER - ATH12K_HALF_20MHZ_BW)
542542
#define ATH12K_MAX_6GHZ_FREQ (ATH12K_6GHZ_MAX_CENTER + ATH12K_HALF_20MHZ_BW)
543-
#define ATH12K_NUM_CHANS 101
544-
#define ATH12K_MAX_5GHZ_CHAN 173
543+
#define ATH12K_NUM_CHANS 102
544+
#define ATH12K_MAX_5GHZ_CHAN 177
545545

546546
static inline bool ath12k_is_2ghz_channel_freq(u32 freq)
547547
{

drivers/net/wireless/ath/ath12k/dp_rx.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
#include "dp_mon.h"
1818
#include "debugfs_htt_stats.h"
1919

20+
#define ATH12K_2GHZ_MIN_CHAN_NUM 1
21+
#define ATH12K_2GHZ_MAX_CHAN_NUM 14
22+
#define ATH12K_5GHZ_MIN_CHAN_NUM 36
23+
#define ATH12K_5GHZ_MAX_CHAN_NUM 177
24+
2025
static int ath12k_dp_rx_tid_delete_handler(struct ath12k_base *ab,
2126
struct ath12k_dp_rx_tid_rxq *rx_tid);
2227

@@ -1288,9 +1293,11 @@ void ath12k_dp_rx_h_ppdu(struct ath12k_pdev_dp *dp_pdev,
12881293
center_freq <= ATH12K_MAX_6GHZ_FREQ) {
12891294
rx_status->band = NL80211_BAND_6GHZ;
12901295
rx_status->freq = center_freq;
1291-
} else if (channel_num >= 1 && channel_num <= 14) {
1296+
} else if (channel_num >= ATH12K_2GHZ_MIN_CHAN_NUM &&
1297+
channel_num <= ATH12K_2GHZ_MAX_CHAN_NUM) {
12921298
rx_status->band = NL80211_BAND_2GHZ;
1293-
} else if (channel_num >= 36 && channel_num <= 173) {
1299+
} else if (channel_num >= ATH12K_5GHZ_MIN_CHAN_NUM &&
1300+
channel_num <= ATH12K_5GHZ_MAX_CHAN_NUM) {
12941301
rx_status->band = NL80211_BAND_5GHZ;
12951302
}
12961303

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
.max_power = 30, \
5252
}
5353

54+
#define ATH12K_5_9_GHZ_MIN_FREQ 5845
55+
#define ATH12K_5_9_GHZ_MAX_FREQ 5885
56+
5457
static const struct ieee80211_channel ath12k_2ghz_channels[] = {
5558
CHAN2G(1, 2412, 0),
5659
CHAN2G(2, 2417, 0),
@@ -96,6 +99,7 @@ static const struct ieee80211_channel ath12k_5ghz_channels[] = {
9699
CHAN5G(165, 5825, 0),
97100
CHAN5G(169, 5845, 0),
98101
CHAN5G(173, 5865, 0),
102+
CHAN5G(177, 5885, 0),
99103
};
100104

101105
static const struct ieee80211_channel ath12k_6ghz_channels[] = {
@@ -13880,6 +13884,26 @@ static int ath12k_mac_update_band(struct ath12k *ar,
1388013884
return 0;
1388113885
}
1388213886

13887+
static void ath12k_mac_update_5_9_ghz_ch_list(struct ath12k *ar,
13888+
struct ieee80211_supported_band *band)
13889+
{
13890+
int i;
13891+
13892+
if (test_bit(WMI_TLV_SERVICE_5_9GHZ_SUPPORT,
13893+
ar->ab->wmi_ab.svc_map))
13894+
return;
13895+
13896+
guard(spinlock_bh)(&ar->ab->base_lock);
13897+
if (ar->ab->dfs_region != ATH12K_DFS_REG_FCC)
13898+
return;
13899+
13900+
for (i = 0; i < band->n_channels; i++) {
13901+
if (band->channels[i].center_freq >= ATH12K_5_9_GHZ_MIN_FREQ &&
13902+
band->channels[i].center_freq <= ATH12K_5_9_GHZ_MAX_FREQ)
13903+
band->channels[i].flags |= IEEE80211_CHAN_DISABLED;
13904+
}
13905+
}
13906+
1388313907
static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
1388413908
u32 supported_bands,
1388513909
struct ieee80211_supported_band *bands[])
@@ -14013,6 +14037,8 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
1401314037
band->n_bitrates = ath12k_a_rates_size;
1401414038
band->bitrates = ath12k_a_rates;
1401514039

14040+
ath12k_mac_update_5_9_ghz_ch_list(ar, band);
14041+
1401614042
if (ab->hw_params->single_pdev_only) {
1401714043
phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_5GHZ_CAP);
1401814044
reg_cap = &ab->hal_reg_cap[phy_id];

drivers/net/wireless/ath/ath12k/wmi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,7 @@ enum wmi_tlv_service {
22592259
WMI_TLV_SERVICE_FREQINFO_IN_METADATA = 219,
22602260
WMI_TLV_SERVICE_EXT2_MSG = 220,
22612261
WMI_TLV_SERVICE_BEACON_PROTECTION_SUPPORT = 244,
2262+
WMI_TLV_SERVICE_5_9GHZ_SUPPORT = 247,
22622263
WMI_TLV_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT = 249,
22632264
WMI_TLV_SERVICE_MBSS_PARAM_IN_VDEV_START_SUPPORT = 253,
22642265

0 commit comments

Comments
 (0)