*
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 Intel Corporation
+ * Copyright(c) 2018 - 2019 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
  *
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 Intel Corporation
+ * Copyright(c) 2018 - 2019 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
        IWL_TLC_MNG_HT_RATE_MAX = IWL_TLC_MNG_HT_RATE_MCS11,
 };
 
-/* Maximum supported tx antennas number */
-#define MAX_NSS 2
+enum IWL_TLC_MNG_NSS {
+       IWL_TLC_NSS_1,
+       IWL_TLC_NSS_2,
+       IWL_TLC_NSS_MAX
+};
+
+enum IWL_TLC_HT_BW_RATES {
+       IWL_TLC_HT_BW_NONE_160,
+       IWL_TLC_HT_BW_160,
+};
 
 /**
  * struct tlc_config_cmd - TLC configuration
        u8 amsdu;
        __le16 flags;
        __le16 non_ht_rates;
-       __le16 ht_rates[MAX_NSS][2];
+       __le16 ht_rates[IWL_TLC_NSS_MAX][2];
        __le16 max_mpdu_len;
        u8 sgi_ch_width_supp;
        u8 reserved2[1];
 
        int i, highest_mcs;
 
        for (i = 0; i < sta->rx_nss; i++) {
-               if (i == MAX_NSS)
+               if (i == IWL_TLC_NSS_MAX)
                        break;
 
                highest_mcs = rs_fw_vht_highest_rx_mcs_index(vht_cap, i + 1);
                if (sta->bandwidth == IEEE80211_STA_RX_BW_20)
                        supp &= ~BIT(IWL_TLC_MNG_HT_RATE_MCS9);
 
-               cmd->ht_rates[i][0] = cpu_to_le16(supp);
+               cmd->ht_rates[i][IWL_TLC_HT_BW_NONE_160] = cpu_to_le16(supp);
                if (sta->bandwidth == IEEE80211_STA_RX_BW_160)
-                       cmd->ht_rates[i][1] = cmd->ht_rates[i][0];
+                       cmd->ht_rates[i][IWL_TLC_HT_BW_160] =
+                               cmd->ht_rates[i][IWL_TLC_HT_BW_NONE_160];
        }
 }
 
                le16_to_cpu(sband->iftype_data->he_cap.he_mcs_nss_supp.tx_mcs_160);
        int i;
 
-       for (i = 0; i < sta->rx_nss && i < MAX_NSS; i++) {
+       for (i = 0; i < sta->rx_nss && i < IWL_TLC_NSS_MAX; i++) {
                u16 _mcs_160 = (mcs_160 >> (2 * i)) & 0x3;
                u16 _mcs_80 = (mcs_80 >> (2 * i)) & 0x3;
                u16 _tx_mcs_160 = (tx_mcs_160 >> (2 * i)) & 0x3;
                }
                if (_mcs_80 > _tx_mcs_80)
                        _mcs_80 = _tx_mcs_80;
-               cmd->ht_rates[i][0] =
+               cmd->ht_rates[i][IWL_TLC_HT_BW_NONE_160] =
                        cpu_to_le16(rs_fw_he_ieee80211_mcs_to_rs_mcs(_mcs_80));
 
                /* If one side doesn't support - mark both as not supporting */
                }
                if (_mcs_160 > _tx_mcs_160)
                        _mcs_160 = _tx_mcs_160;
-               cmd->ht_rates[i][1] =
+               cmd->ht_rates[i][IWL_TLC_HT_BW_160] =
                        cpu_to_le16(rs_fw_he_ieee80211_mcs_to_rs_mcs(_mcs_160));
        }
 }
                rs_fw_vht_set_enabled_rates(sta, vht_cap, cmd);
        } else if (ht_cap->ht_supported) {
                cmd->mode = IWL_TLC_MNG_MODE_HT;
-               cmd->ht_rates[0][0] = cpu_to_le16(ht_cap->mcs.rx_mask[0]);
-               cmd->ht_rates[1][0] = cpu_to_le16(ht_cap->mcs.rx_mask[1]);
+               cmd->ht_rates[IWL_TLC_NSS_1][IWL_TLC_HT_BW_NONE_160] =
+                       cpu_to_le16(ht_cap->mcs.rx_mask[0]);
+               cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] =
+                       cpu_to_le16(ht_cap->mcs.rx_mask[1]);
        }
 }