]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Replace band define G with GHZ where appropriate
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Mon, 24 Mar 2025 06:25:12 +0000 (11:55 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 27 Mar 2025 22:55:41 +0000 (15:55 -0700)
Currently, band define and enum are with the word 'G'. Replace it with
more appropriate 'GHZ' for clarity and correctness.

No functional changes. Only compile tested.

Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Link: https://patch.msgid.link/20250324062518.2752822-5-quic_periyasa@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/debugfs.c
drivers/net/wireless/ath/ath12k/dp_rx.c
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/wmi.c
drivers/net/wireless/ath/ath12k/wmi.h

index 9bf20f7b6cfee424e68541a3c3db629930fafbf0..2a1ad27e331cb7cdb91d980e6eb2bda2554fd5e7 100644 (file)
@@ -536,11 +536,11 @@ struct ath12k_sta {
        enum ieee80211_sta_state state;
 };
 
-#define ATH12K_MIN_5G_FREQ 4150
-#define ATH12K_MIN_6G_FREQ 5925
-#define ATH12K_MAX_6G_FREQ 7115
+#define ATH12K_MIN_5GHZ_FREQ 4150
+#define ATH12K_MIN_6GHZ_FREQ 5925
+#define ATH12K_MAX_6GHZ_FREQ 7115
 #define ATH12K_NUM_CHANS 101
-#define ATH12K_MAX_5G_CHAN 173
+#define ATH12K_MAX_5GHZ_CHAN 173
 
 enum ath12k_hw_state {
        ATH12K_HW_STATE_OFF,
index 44322db70c852d9507b41a97d8a8de575ec8c491..e8a2d0eefa43482385e4bfe4c80a5cded0bdc28d 100644 (file)
@@ -88,8 +88,8 @@ static int ath12k_get_tpc_ctl_mode_idx(struct wmi_tpc_stats_arg *tpc_stats,
        u32 chan_freq = le32_to_cpu(tpc_stats->tpc_config.chan_freq);
        u8 band;
 
-       band = ((chan_freq > ATH12K_MIN_6G_FREQ) ? NL80211_BAND_6GHZ :
-               ((chan_freq > ATH12K_MIN_5G_FREQ) ? NL80211_BAND_5GHZ :
+       band = ((chan_freq > ATH12K_MIN_6GHZ_FREQ) ? NL80211_BAND_6GHZ :
+               ((chan_freq > ATH12K_MIN_5GHZ_FREQ) ? NL80211_BAND_5GHZ :
                NL80211_BAND_2GHZ));
 
        if (band == NL80211_BAND_5GHZ || band == NL80211_BAND_6GHZ) {
index 46460361986fd674e6e5ac724aaa6d32d0ec4aa1..66603e9c154b9036a8689053955cdbf53a1efe34 100644 (file)
@@ -2433,8 +2433,8 @@ void ath12k_dp_rx_h_ppdu(struct ath12k *ar, struct hal_rx_desc *rx_desc,
        channel_num = meta_data;
        center_freq = meta_data >> 16;
 
-       if (center_freq >= ATH12K_MIN_6G_FREQ &&
-           center_freq <= ATH12K_MAX_6G_FREQ) {
+       if (center_freq >= ATH12K_MIN_6GHZ_FREQ &&
+           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) {
index 842eda56c8b152b3303c83b43fbef400442c59fc..245adb73df04b7693d4990f95d4f329443ea221a 100644 (file)
@@ -874,12 +874,12 @@ static bool ath12k_mac_band_match(enum nl80211_band band1, enum WMI_HOST_WLAN_BA
 {
        switch (band1) {
        case NL80211_BAND_2GHZ:
-               if (band2 & WMI_HOST_WLAN_2G_CAP)
+               if (band2 & WMI_HOST_WLAN_2GHZ_CAP)
                        return true;
                break;
        case NL80211_BAND_5GHZ:
        case NL80211_BAND_6GHZ:
-               if (band2 & WMI_HOST_WLAN_5G_CAP)
+               if (band2 & WMI_HOST_WLAN_5GHZ_CAP)
                        return true;
                break;
        default:
@@ -980,7 +980,7 @@ static int ath12k_mac_txpower_recalc(struct ath12k *ar)
        ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "txpower to set in hw %d\n",
                   txpower / 2);
 
-       if ((pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) &&
+       if ((pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP) &&
            ar->txpower_limit_2g != txpower) {
                param = WMI_PDEV_PARAM_TXPOWER_LIMIT2G;
                ret = ath12k_wmi_pdev_set_param(ar, param,
@@ -990,7 +990,7 @@ static int ath12k_mac_txpower_recalc(struct ath12k *ar)
                ar->txpower_limit_2g = txpower;
        }
 
-       if ((pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP) &&
+       if ((pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP) &&
            ar->txpower_limit_5g != txpower) {
                param = WMI_PDEV_PARAM_TXPOWER_LIMIT5G;
                ret = ath12k_wmi_pdev_set_param(ar, param,
@@ -1272,12 +1272,12 @@ static int ath12k_mac_monitor_vdev_create(struct ath12k *ar)
        arg.pdev_id = pdev->pdev_id;
        arg.if_stats_id = ATH12K_INVAL_VDEV_STATS_ID;
 
-       if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
+       if (pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
                arg.chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
                arg.chains[NL80211_BAND_2GHZ].rx = ar->num_rx_chains;
        }
 
-       if (pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP) {
+       if (pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
                arg.chains[NL80211_BAND_5GHZ].tx = ar->num_tx_chains;
                arg.chains[NL80211_BAND_5GHZ].rx = ar->num_rx_chains;
        }
@@ -3988,7 +3988,7 @@ static void ath12k_mac_bss_info_changed(struct ath12k *ar,
                else
                        rateidx = ffs(info->basic_rates) - 1;
 
-               if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP)
+               if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP)
                        rateidx += ATH12K_MAC_FIRST_OFDM_RATE_IDX;
 
                bitrate = ath12k_legacy_rates[rateidx].bitrate;
@@ -4162,9 +4162,9 @@ ath12k_mac_select_scan_device(struct ieee80211_hw *hw,
         * split the hw request and perform multiple scans
         */
 
-       if (center_freq < ATH12K_MIN_5G_FREQ)
+       if (center_freq < ATH12K_MIN_5GHZ_FREQ)
                band = NL80211_BAND_2GHZ;
-       else if (center_freq < ATH12K_MIN_6G_FREQ)
+       else if (center_freq < ATH12K_MIN_6GHZ_FREQ)
                band = NL80211_BAND_5GHZ;
        else
                band = NL80211_BAND_6GHZ;
@@ -6614,7 +6614,7 @@ static void ath12k_mac_setup_ht_vht_cap(struct ath12k *ar,
        rate_cap_tx_chainmask = ar->cfg_tx_chainmask >> cap->tx_chain_mask_shift;
        rate_cap_rx_chainmask = ar->cfg_rx_chainmask >> cap->rx_chain_mask_shift;
 
-       if (cap->supported_bands & WMI_HOST_WLAN_2G_CAP) {
+       if (cap->supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
                band = &ar->mac.sbands[NL80211_BAND_2GHZ];
                ht_cap = cap->band[NL80211_BAND_2GHZ].ht_cap_info;
                if (ht_cap_info)
@@ -6623,7 +6623,7 @@ static void ath12k_mac_setup_ht_vht_cap(struct ath12k *ar,
                                                    rate_cap_rx_chainmask);
        }
 
-       if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
+       if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
            (ar->ab->hw_params->single_pdev_only ||
             !ar->supports_6ghz)) {
                band = &ar->mac.sbands[NL80211_BAND_5GHZ];
@@ -7032,7 +7032,7 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
        enum nl80211_band band;
        int count;
 
-       if (cap->supported_bands & WMI_HOST_WLAN_2G_CAP) {
+       if (cap->supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
                band = NL80211_BAND_2GHZ;
                count = ath12k_mac_copy_sband_iftype_data(ar, cap,
                                                          ar->mac.iftype[band],
@@ -7042,7 +7042,7 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
                                                 count);
        }
 
-       if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP) {
+       if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
                band = NL80211_BAND_5GHZ;
                count = ath12k_mac_copy_sband_iftype_data(ar, cap,
                                                          ar->mac.iftype[band],
@@ -7052,7 +7052,7 @@ static void ath12k_mac_setup_sband_iftype_data(struct ath12k *ar,
                                                 count);
        }
 
-       if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
+       if (cap->supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
            ar->supports_6ghz) {
                band = NL80211_BAND_6GHZ;
                count = ath12k_mac_copy_sband_iftype_data(ar, cap,
@@ -8043,15 +8043,15 @@ static int ath12k_mac_setup_vdev_create_arg(struct ath12k_link_vif *arvif,
                        return ret;
        }
 
-       if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
+       if (pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
                arg->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
                arg->chains[NL80211_BAND_2GHZ].rx = ar->num_rx_chains;
        }
-       if (pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP) {
+       if (pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
                arg->chains[NL80211_BAND_5GHZ].tx = ar->num_tx_chains;
                arg->chains[NL80211_BAND_5GHZ].rx = ar->num_rx_chains;
        }
-       if (pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
+       if (pdev->cap.supported_bands & WMI_HOST_WLAN_5GHZ_CAP &&
            ar->supports_6ghz) {
                arg->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains;
                arg->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains;
@@ -8080,7 +8080,7 @@ ath12k_mac_prepare_he_mode(struct ath12k_pdev *pdev, u32 viftype)
        u32 *hecap_phy_ptr = NULL;
        u32 hemode;
 
-       if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP)
+       if (pdev->cap.supported_bands & WMI_HOST_WLAN_2GHZ_CAP)
                cap_band = &pdev_cap->band[NL80211_BAND_2GHZ];
        else
                cap_band = &pdev_cap->band[NL80211_BAND_5GHZ];
@@ -10762,10 +10762,10 @@ static u32 ath12k_get_phy_id(struct ath12k *ar, u32 band)
        struct ath12k_pdev *pdev = ar->pdev;
        struct ath12k_pdev_cap *pdev_cap = &pdev->cap;
 
-       if (band == WMI_HOST_WLAN_2G_CAP)
+       if (band == WMI_HOST_WLAN_2GHZ_CAP)
                return pdev_cap->band[NL80211_BAND_2GHZ].phy_id;
 
-       if (band == WMI_HOST_WLAN_5G_CAP)
+       if (band == WMI_HOST_WLAN_5GHZ_CAP)
                return pdev_cap->band[NL80211_BAND_5GHZ].phy_id;
 
        ath12k_warn(ar->ab, "unsupported phy cap:%d\n", band);
@@ -10790,7 +10790,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
 
        reg_cap = &ar->ab->hal_reg_cap[ar->pdev_idx];
 
-       if (supported_bands & WMI_HOST_WLAN_2G_CAP) {
+       if (supported_bands & WMI_HOST_WLAN_2GHZ_CAP) {
                channels = kmemdup(ath12k_2ghz_channels,
                                   sizeof(ath12k_2ghz_channels),
                                   GFP_KERNEL);
@@ -10806,7 +10806,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
                bands[NL80211_BAND_2GHZ] = band;
 
                if (ar->ab->hw_params->single_pdev_only) {
-                       phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_2G_CAP);
+                       phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_2GHZ_CAP);
                        reg_cap = &ar->ab->hal_reg_cap[phy_id];
                }
                ath12k_mac_update_ch_list(ar, band,
@@ -10814,8 +10814,8 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
                                          reg_cap->high_2ghz_chan);
        }
 
-       if (supported_bands & WMI_HOST_WLAN_5G_CAP) {
-               if (reg_cap->high_5ghz_chan >= ATH12K_MIN_6G_FREQ) {
+       if (supported_bands & WMI_HOST_WLAN_5GHZ_CAP) {
+               if (reg_cap->high_5ghz_chan >= ATH12K_MIN_6GHZ_FREQ) {
                        channels = kmemdup(ath12k_6ghz_channels,
                                           sizeof(ath12k_6ghz_channels), GFP_KERNEL);
                        if (!channels) {
@@ -10837,7 +10837,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
                        ah->use_6ghz_regd = true;
                }
 
-               if (reg_cap->low_5ghz_chan < ATH12K_MIN_6G_FREQ) {
+               if (reg_cap->low_5ghz_chan < ATH12K_MIN_6GHZ_FREQ) {
                        channels = kmemdup(ath12k_5ghz_channels,
                                           sizeof(ath12k_5ghz_channels),
                                           GFP_KERNEL);
@@ -10856,7 +10856,7 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
                        bands[NL80211_BAND_5GHZ] = band;
 
                        if (ar->ab->hw_params->single_pdev_only) {
-                               phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_5G_CAP);
+                               phy_id = ath12k_get_phy_id(ar, WMI_HOST_WLAN_5GHZ_CAP);
                                reg_cap = &ar->ab->hal_reg_cap[phy_id];
                        }
 
index 04dd307ebfc4c4e5c0aee57b1eb7b9074ead6aee..c8248675354c92f5d0c4b03049388ad2975810fc 100644 (file)
@@ -521,10 +521,10 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(struct ath12k_wmi_pdev *wmi_handle,
         * band to band for a single radio, need to see how this should be
         * handled.
         */
-       if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2G_CAP) {
+       if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2GHZ_CAP) {
                pdev_cap->tx_chain_mask = le32_to_cpu(mac_caps->tx_chain_mask_2g);
                pdev_cap->rx_chain_mask = le32_to_cpu(mac_caps->rx_chain_mask_2g);
-       } else if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5G_CAP) {
+       } else if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5GHZ_CAP) {
                pdev_cap->vht_cap = le32_to_cpu(mac_caps->vht_cap_info_5g);
                pdev_cap->vht_mcs = le32_to_cpu(mac_caps->vht_supp_mcs_5g);
                pdev_cap->he_mcs = le32_to_cpu(mac_caps->he_supp_mcs_5g);
@@ -547,7 +547,7 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(struct ath12k_wmi_pdev *wmi_handle,
        pdev_cap->rx_chain_mask_shift =
                        find_first_bit((unsigned long *)&pdev_cap->rx_chain_mask, 32);
 
-       if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2G_CAP) {
+       if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_2GHZ_CAP) {
                cap_band = &pdev_cap->band[NL80211_BAND_2GHZ];
                cap_band->phy_id = le32_to_cpu(mac_caps->phy_id);
                cap_band->max_bw_supported = le32_to_cpu(mac_caps->max_bw_supported_2g);
@@ -567,7 +567,7 @@ ath12k_pull_mac_phy_cap_svc_ready_ext(struct ath12k_wmi_pdev *wmi_handle,
                                le32_to_cpu(mac_caps->he_ppet2g.ppet16_ppet8_ru3_ru0[i]);
        }
 
-       if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5G_CAP) {
+       if (le32_to_cpu(mac_caps->supported_bands) & WMI_HOST_WLAN_5GHZ_CAP) {
                cap_band = &pdev_cap->band[NL80211_BAND_5GHZ];
                cap_band->phy_id = le32_to_cpu(mac_caps->phy_id);
                cap_band->max_bw_supported =
@@ -3665,15 +3665,15 @@ ath12k_fill_band_to_mac_param(struct ath12k_base  *soc,
                arg[i].pdev_id = pdev->pdev_id;
 
                switch (pdev->cap.supported_bands) {
-               case WMI_HOST_WLAN_2G_5G_CAP:
+               case WMI_HOST_WLAN_2GHZ_5GHZ_CAP:
                        arg[i].start_freq = hal_reg_cap->low_2ghz_chan;
                        arg[i].end_freq = hal_reg_cap->high_5ghz_chan;
                        break;
-               case WMI_HOST_WLAN_2G_CAP:
+               case WMI_HOST_WLAN_2GHZ_CAP:
                        arg[i].start_freq = hal_reg_cap->low_2ghz_chan;
                        arg[i].end_freq = hal_reg_cap->high_2ghz_chan;
                        break;
-               case WMI_HOST_WLAN_5G_CAP:
+               case WMI_HOST_WLAN_5GHZ_CAP:
                        arg[i].start_freq = hal_reg_cap->low_5ghz_chan;
                        arg[i].end_freq = hal_reg_cap->high_5ghz_chan;
                        break;
@@ -4718,7 +4718,7 @@ ath12k_wmi_tlv_mac_phy_caps_ext_parse(struct ath12k_base *ab,
                bands = pdev->cap.supported_bands;
        }
 
-       if (bands & WMI_HOST_WLAN_2G_CAP) {
+       if (bands & WMI_HOST_WLAN_2GHZ_CAP) {
                ath12k_wmi_eht_caps_parse(pdev, NL80211_BAND_2GHZ,
                                          caps->eht_cap_mac_info_2ghz,
                                          caps->eht_cap_phy_info_2ghz,
@@ -4727,7 +4727,7 @@ ath12k_wmi_tlv_mac_phy_caps_ext_parse(struct ath12k_base *ab,
                                          caps->eht_cap_info_internal);
        }
 
-       if (bands & WMI_HOST_WLAN_5G_CAP) {
+       if (bands & WMI_HOST_WLAN_5GHZ_CAP) {
                ath12k_wmi_eht_caps_parse(pdev, NL80211_BAND_5GHZ,
                                          caps->eht_cap_mac_info_5ghz,
                                          caps->eht_cap_phy_info_5ghz,
@@ -4941,7 +4941,7 @@ static u8 ath12k_wmi_ignore_num_extra_rules(struct ath12k_wmi_reg_rule_ext_param
        for (count = 0; count < num_reg_rules; count++) {
                start_freq = le32_get_bits(rule[count].freq_info, REG_RULE_START_FREQ);
 
-               if (start_freq >= ATH12K_MIN_6G_FREQ)
+               if (start_freq >= ATH12K_MIN_6GHZ_FREQ)
                        num_invalid_5ghz_rules++;
        }
 
@@ -5011,9 +5011,9 @@ static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab,
        for (i = 0; i < WMI_REG_CURRENT_MAX_AP_TYPE; i++) {
                num_6g_reg_rules_ap[i] = reg_info->num_6g_reg_rules_ap[i];
 
-               if (num_6g_reg_rules_ap[i] > MAX_6G_REG_RULES) {
+               if (num_6g_reg_rules_ap[i] > MAX_6GHZ_REG_RULES) {
                        ath12k_warn(ab, "Num 6G reg rules for AP mode(%d) exceeds max limit (num_6g_reg_rules_ap: %d, max_rules: %d)\n",
-                                   i, num_6g_reg_rules_ap[i], MAX_6G_REG_RULES);
+                                   i, num_6g_reg_rules_ap[i], MAX_6GHZ_REG_RULES);
                        kfree(tb);
                        return -EINVAL;
                }
@@ -5034,9 +5034,9 @@ static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab,
                                reg_info->num_6g_reg_rules_cl[WMI_REG_VLP_AP][i];
                total_reg_rules += num_6g_reg_rules_cl[WMI_REG_VLP_AP][i];
 
-               if (num_6g_reg_rules_cl[WMI_REG_INDOOR_AP][i] > MAX_6G_REG_RULES ||
-                   num_6g_reg_rules_cl[WMI_REG_STD_POWER_AP][i] > MAX_6G_REG_RULES ||
-                   num_6g_reg_rules_cl[WMI_REG_VLP_AP][i] >  MAX_6G_REG_RULES) {
+               if (num_6g_reg_rules_cl[WMI_REG_INDOOR_AP][i] > MAX_6GHZ_REG_RULES ||
+                   num_6g_reg_rules_cl[WMI_REG_STD_POWER_AP][i] > MAX_6GHZ_REG_RULES ||
+                   num_6g_reg_rules_cl[WMI_REG_VLP_AP][i] >  MAX_6GHZ_REG_RULES) {
                        ath12k_warn(ab, "Num 6g client reg rules exceeds max limit, for client(type: %d)\n",
                                    i);
                        kfree(tb);
@@ -6336,13 +6336,13 @@ static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb)
        if (rx_ev.status & WMI_RX_STATUS_ERR_MIC)
                status->flag |= RX_FLAG_MMIC_ERROR;
 
-       if (rx_ev.chan_freq >= ATH12K_MIN_6G_FREQ &&
-           rx_ev.chan_freq <= ATH12K_MAX_6G_FREQ) {
+       if (rx_ev.chan_freq >= ATH12K_MIN_6GHZ_FREQ &&
+           rx_ev.chan_freq <= ATH12K_MAX_6GHZ_FREQ) {
                status->band = NL80211_BAND_6GHZ;
                status->freq = rx_ev.chan_freq;
        } else if (rx_ev.channel >= 1 && rx_ev.channel <= 14) {
                status->band = NL80211_BAND_2GHZ;
-       } else if (rx_ev.channel >= 36 && rx_ev.channel <= ATH12K_MAX_5G_CHAN) {
+       } else if (rx_ev.channel >= 36 && rx_ev.channel <= ATH12K_MAX_5GHZ_CHAN) {
                status->band = NL80211_BAND_5GHZ;
        } else {
                /* Shouldn't happen unless list of advertised channels to
index 1ba33e30ddd279e21a57a1db6150e1d08f4a2890..be4ac91dd34f504bbd6728dafd41daec52a138d6 100644 (file)
@@ -216,9 +216,9 @@ enum wmi_host_hw_mode_priority {
 };
 
 enum WMI_HOST_WLAN_BAND {
-       WMI_HOST_WLAN_2G_CAP    = 1,
-       WMI_HOST_WLAN_5G_CAP    = 2,
-       WMI_HOST_WLAN_2G_5G_CAP = 3,
+       WMI_HOST_WLAN_2GHZ_CAP          = 1,
+       WMI_HOST_WLAN_5GHZ_CAP          = 2,
+       WMI_HOST_WLAN_2GHZ_5GHZ_CAP     = 3,
 };
 
 enum wmi_cmd_group {
@@ -2690,8 +2690,8 @@ enum wmi_channel_width {
  * 2 - index for 160 MHz, first 3 bytes valid
  * 3 - index for 320 MHz, first 3 bytes valid
  */
-#define WMI_MAX_EHT_SUPP_MCS_2G_SIZE  2
-#define WMI_MAX_EHT_SUPP_MCS_5G_SIZE  4
+#define WMI_MAX_EHT_SUPP_MCS_2GHZ_SIZE  2
+#define WMI_MAX_EHT_SUPP_MCS_5GHZ_SIZE  4
 
 #define WMI_EHTCAP_TXRX_MCS_NSS_IDX_80    0
 #define WMI_EHTCAP_TXRX_MCS_NSS_IDX_160   1
@@ -2730,8 +2730,8 @@ struct ath12k_wmi_caps_ext_params {
        struct ath12k_wmi_ppe_threshold_params eht_ppet_2ghz;
        struct ath12k_wmi_ppe_threshold_params eht_ppet_5ghz;
        __le32 eht_cap_info_internal;
-       __le32 eht_supp_mcs_ext_2ghz[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
-       __le32 eht_supp_mcs_ext_5ghz[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
+       __le32 eht_supp_mcs_ext_2ghz[WMI_MAX_EHT_SUPP_MCS_2GHZ_SIZE];
+       __le32 eht_supp_mcs_ext_5ghz[WMI_MAX_EHT_SUPP_MCS_5GHZ_SIZE];
        __le32 eml_capability;
        __le32 mld_capability;
 } __packed;
@@ -4108,7 +4108,7 @@ struct ath12k_wmi_eht_rate_set_params {
 
 #define MAX_REG_RULES 10
 #define REG_ALPHA2_LEN 2
-#define MAX_6G_REG_RULES 5
+#define MAX_6GHZ_REG_RULES 5
 
 enum wmi_start_event_param {
        WMI_VDEV_START_RESP_EVENT = 0,