|
51 | 51 | .max_power = 30, \ |
52 | 52 | } |
53 | 53 |
|
| 54 | +#define ATH12K_5_9_GHZ_MIN_FREQ 5845 |
| 55 | +#define ATH12K_5_9_GHZ_MAX_FREQ 5885 |
| 56 | + |
54 | 57 | static const struct ieee80211_channel ath12k_2ghz_channels[] = { |
55 | 58 | CHAN2G(1, 2412, 0), |
56 | 59 | CHAN2G(2, 2417, 0), |
@@ -96,6 +99,7 @@ static const struct ieee80211_channel ath12k_5ghz_channels[] = { |
96 | 99 | CHAN5G(165, 5825, 0), |
97 | 100 | CHAN5G(169, 5845, 0), |
98 | 101 | CHAN5G(173, 5865, 0), |
| 102 | + CHAN5G(177, 5885, 0), |
99 | 103 | }; |
100 | 104 |
|
101 | 105 | static const struct ieee80211_channel ath12k_6ghz_channels[] = { |
@@ -13879,6 +13883,26 @@ static int ath12k_mac_update_band(struct ath12k *ar, |
13879 | 13883 | return 0; |
13880 | 13884 | } |
13881 | 13885 |
|
| 13886 | +static void ath12k_mac_update_5_9_ghz_ch_list(struct ath12k *ar, |
| 13887 | + struct ieee80211_supported_band *band) |
| 13888 | +{ |
| 13889 | + int i; |
| 13890 | + |
| 13891 | + if (test_bit(WMI_TLV_SERVICE_5_9GHZ_SUPPORT, |
| 13892 | + ar->ab->wmi_ab.svc_map)) |
| 13893 | + return; |
| 13894 | + |
| 13895 | + guard(spinlock_bh)(&ar->ab->base_lock); |
| 13896 | + if (ar->ab->dfs_region != ATH12K_DFS_REG_FCC) |
| 13897 | + return; |
| 13898 | + |
| 13899 | + for (i = 0; i < band->n_channels; i++) { |
| 13900 | + if (band->channels[i].center_freq >= ATH12K_5_9_GHZ_MIN_FREQ && |
| 13901 | + band->channels[i].center_freq <= ATH12K_5_9_GHZ_MAX_FREQ) |
| 13902 | + band->channels[i].flags |= IEEE80211_CHAN_DISABLED; |
| 13903 | + } |
| 13904 | +} |
| 13905 | + |
13882 | 13906 | static int ath12k_mac_setup_channels_rates(struct ath12k *ar, |
13883 | 13907 | u32 supported_bands, |
13884 | 13908 | struct ieee80211_supported_band *bands[]) |
@@ -14012,6 +14036,8 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar, |
14012 | 14036 | band->n_bitrates = ath12k_a_rates_size; |
14013 | 14037 | band->bitrates = ath12k_a_rates; |
14014 | 14038 |
|
| 14039 | + ath12k_mac_update_5_9_ghz_ch_list(ar, band); |
| 14040 | + |
14015 | 14041 | if (ab->hw_params->single_pdev_only) { |
14016 | 14042 | phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_5GHZ_CAP); |
14017 | 14043 | reg_cap = &ab->hal_reg_cap[phy_id]; |
|
0 commit comments