qcacld-3.0: Fix tTxrateinfoflags as per linux coding guidelines
Fix tTxrateinfoflags as per linux coding guidelines, this will later
help move the struct to qcacmn.
Change-Id: I1911d25594aaecc7c166cf36b79111b61e6de457
CRs-Fixed: 2244834
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 70aa835..abbe1f6 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -8859,30 +8859,30 @@
return -EINVAL;
}
- if (!(rate_flags & eHAL_TX_RATE_LEGACY)) {
- if (rate_flags & eHAL_TX_RATE_VHT80) {
+ if (!(rate_flags & TX_RATE_LEGACY)) {
+ if (rate_flags & TX_RATE_VHT80) {
final_rate_flags |= RATE_INFO_FLAGS_VHT_MCS;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
final_rate_flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH;
#endif
- } else if (rate_flags & eHAL_TX_RATE_VHT40) {
+ } else if (rate_flags & TX_RATE_VHT40) {
final_rate_flags |= RATE_INFO_FLAGS_VHT_MCS;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
final_rate_flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
#endif
- } else if (rate_flags & eHAL_TX_RATE_VHT20) {
+ } else if (rate_flags & TX_RATE_VHT20) {
final_rate_flags |= RATE_INFO_FLAGS_VHT_MCS;
} else if (rate_flags &
- (eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) {
+ (TX_RATE_HT20 | TX_RATE_HT40)) {
final_rate_flags |= RATE_INFO_FLAGS_MCS;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
final_rate_flags |=
RATE_INFO_FLAGS_40_MHZ_WIDTH;
#endif
}
- if (rate_flags & eHAL_TX_RATE_SGI) {
+ if (rate_flags & TX_RATE_SGI) {
if (!(final_rate_flags & RATE_INFO_FLAGS_VHT_MCS))
final_rate_flags |= RATE_INFO_FLAGS_MCS;
final_rate_flags |= RATE_INFO_FLAGS_SHORT_GI;
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index 39d9a07..b579787 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -311,7 +311,7 @@
/* Function header is left blank intentionally */
static int hdd_parse_setrmcrate_command(uint8_t *pValue,
uint32_t *pRate,
- tTxrateinfoflags *pTxFlags)
+ enum tx_rate_info *pTxFlags)
{
uint8_t *inPtr = pValue;
int tempInt;
@@ -354,15 +354,15 @@
case 36:
case 48:
case 54:
- *pTxFlags = eHAL_TX_RATE_LEGACY;
+ *pTxFlags = TX_RATE_LEGACY;
*pRate = tempInt * 10;
break;
case 65:
- *pTxFlags = eHAL_TX_RATE_HT20;
+ *pTxFlags = TX_RATE_HT20;
*pRate = tempInt * 10;
break;
case 72:
- *pTxFlags = eHAL_TX_RATE_HT20 | eHAL_TX_RATE_SGI;
+ *pTxFlags = TX_RATE_HT20 | TX_RATE_SGI;
*pRate = 722;
break;
}
@@ -5182,7 +5182,7 @@
int ret = 0;
uint8_t *value = command;
uint32_t uRate = 0;
- tTxrateinfoflags txFlags = 0;
+ enum tx_rate_info txFlags = 0;
tSirRateUpdateInd rateUpdateParams = {0};
int status;
struct hdd_config *pConfig = hdd_ctx->config;
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c
index 19c68f0..338537b 100644
--- a/core/hdd/src/wlan_hdd_stats.c
+++ b/core/hdd/src/wlan_hdd_stats.c
@@ -3119,14 +3119,14 @@
int mode;
int i;
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
mode = 1;
else
mode = 0;
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
flag |= 1;
- if (rate_flags & eHAL_TX_RATE_SGI)
+ if (rate_flags & TX_RATE_SGI)
flag |= 2;
supported_mcs_rate = (struct index_data_rate_type *)
@@ -3195,19 +3195,19 @@
&supported_vht_mcs_rate_nss1 :
&supported_vht_mcs_rate_nss2);
- if (rate_flags & eHAL_TX_RATE_VHT80)
+ if (rate_flags & TX_RATE_VHT80)
mode = 2;
- else if (rate_flags & eHAL_TX_RATE_VHT40)
+ else if (rate_flags & TX_RATE_VHT40)
mode = 1;
else
mode = 0;
if (rate_flags &
- (eHAL_TX_RATE_VHT20 | eHAL_TX_RATE_VHT40 | eHAL_TX_RATE_VHT80)) {
+ (TX_RATE_VHT20 | TX_RATE_VHT40 | TX_RATE_VHT80)) {
vht_max_mcs =
(enum data_rate_11ac_max_mcs)
(stainfo->tx_mcs_map & DATA_RATE_11AC_MCS_MASK);
- if (rate_flags & eHAL_TX_RATE_SGI)
+ if (rate_flags & TX_RATE_SGI)
flag |= 1;
if (vht_max_mcs == DATA_RATE_11AC_MAX_MCS_7) {
@@ -3220,7 +3220,7 @@
* - MCS9 is valid for VHT20 when Nss = 3 or Nss = 6
* - MCS9 is not valid for VHT20 when Nss = 1,2,4,5,7,8
*/
- if ((rate_flags & eHAL_TX_RATE_VHT20) &&
+ if ((rate_flags & TX_RATE_VHT20) &&
(nss != 3 && nss != 6))
mcsidx = 8;
else
@@ -3242,13 +3242,13 @@
mcsidx = stats->tx_rate.mcs;
}
- if (rate_flags & eHAL_TX_RATE_VHT80)
+ if (rate_flags & TX_RATE_VHT80)
tmprate =
supported_vht_mcs_rate[mcsidx].supported_VHT80_rate[flag];
- else if (rate_flags & eHAL_TX_RATE_VHT40)
+ else if (rate_flags & TX_RATE_VHT40)
tmprate =
supported_vht_mcs_rate[mcsidx].supported_VHT40_rate[flag];
- else if (rate_flags & eHAL_TX_RATE_VHT20)
+ else if (rate_flags & TX_RATE_VHT20)
tmprate =
supported_vht_mcs_rate[mcsidx].supported_VHT20_rate[flag];
}
@@ -3282,17 +3282,17 @@
sinfo->txrate.nss = nss;
sinfo->txrate.mcs = mcsidx;
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
- if (rate_flags & eHAL_TX_RATE_VHT80)
+ if (rate_flags & TX_RATE_VHT80)
sinfo->txrate.bw = RATE_INFO_BW_80;
- else if (rate_flags & eHAL_TX_RATE_VHT40)
+ else if (rate_flags & TX_RATE_VHT40)
sinfo->txrate.bw = RATE_INFO_BW_40;
- else if (rate_flags & eHAL_TX_RATE_VHT20)
+ else if (rate_flags & TX_RATE_VHT20)
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
} else {
sinfo->txrate.mcs = (nss - 1) << 3;
sinfo->txrate.mcs |= mcsidx;
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
sinfo->txrate.bw = RATE_INFO_BW_40;
}
}
@@ -3319,17 +3319,17 @@
sinfo->txrate.nss = nss;
sinfo->txrate.mcs = mcsidx;
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
- if (rate_flags & eHAL_TX_RATE_VHT80)
+ if (rate_flags & TX_RATE_VHT80)
sinfo->txrate.flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH;
- else if (rate_flags & eHAL_TX_RATE_VHT40)
+ else if (rate_flags & TX_RATE_VHT40)
sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
- else if (rate_flags & eHAL_TX_RATE_VHT20)
+ else if (rate_flags & TX_RATE_VHT20)
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
} else {
sinfo->txrate.mcs = (nss - 1) << 3;
sinfo->txrate.mcs |= mcsidx;
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
}
}
@@ -3372,21 +3372,21 @@
uint8_t nss,
uint32_t maxrate)
{
- if (rate_flags & eHAL_TX_RATE_LEGACY) {
+ if (rate_flags & TX_RATE_LEGACY) {
/* provide to the UI in units of 100kbps */
sinfo->txrate.legacy = maxrate;
} else {
/* must be MCS */
if (rate_flags &
- (eHAL_TX_RATE_VHT80 |
- eHAL_TX_RATE_VHT40 |
- eHAL_TX_RATE_VHT20))
+ (TX_RATE_VHT80 |
+ TX_RATE_VHT40 |
+ TX_RATE_VHT20))
hdd_fill_bw_mcs_vht(sinfo, rate_flags, mcsidx, nss);
- if (rate_flags & (eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40))
+ if (rate_flags & (TX_RATE_HT20 | TX_RATE_HT40))
hdd_fill_bw_mcs(sinfo, rate_flags, mcsidx, nss, false);
- if (rate_flags & eHAL_TX_RATE_SGI) {
+ if (rate_flags & TX_RATE_SGI) {
if (!(sinfo->txrate.flags & RATE_INFO_FLAGS_VHT_MCS))
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
sinfo->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
@@ -3451,7 +3451,7 @@
/* convert to 100kbps expected in rate table */
myrate = stats->tx_rate.rate / 100;
rate_flags = stainfo->rate_flags;
- if (!(rate_flags & eHAL_TX_RATE_LEGACY)) {
+ if (!(rate_flags & TX_RATE_LEGACY)) {
nss = stainfo->nss;
if (eHDD_LINK_SPEED_REPORT_ACTUAL == cfg->reportMaxLinkSpeed) {
/* Get current rate flags if report actual */
@@ -3462,7 +3462,7 @@
}
if (stats->tx_rate.mcs == INVALID_MCS_IDX)
- rate_flags = eHAL_TX_RATE_LEGACY;
+ rate_flags = TX_RATE_LEGACY;
}
if (eHDD_LINK_SPEED_REPORT_ACTUAL != cfg->reportMaxLinkSpeed) {
@@ -3503,7 +3503,7 @@
* reporting actual speed
*/
if ((rssidx != 3) &&
- !(rate_flags & eHAL_TX_RATE_LEGACY)) {
+ !(rate_flags & TX_RATE_LEGACY)) {
hdd_get_max_rate_vht(stainfo,
stats,
rate_flags,
@@ -3528,7 +3528,7 @@
if (maxrate < tmprate &&
mcsidx != INVALID_MCS_IDX)
maxrate = tmprate;
- } else if (!(rate_flags & eHAL_TX_RATE_LEGACY)) {
+ } else if (!(rate_flags & TX_RATE_LEGACY)) {
maxrate = myrate;
mcsidx = stats->tx_rate.mcs;
}
@@ -3539,7 +3539,7 @@
*/
if ((maxrate < myrate) || (maxrate == 0)) {
maxrate = myrate;
- if (!(rate_flags & eHAL_TX_RATE_LEGACY)) {
+ if (!(rate_flags & TX_RATE_LEGACY)) {
mcsidx = stats->tx_rate.mcs;
/*
* 'IEEE_P802.11ac_2013.pdf' page 325, 326
@@ -3548,7 +3548,7 @@
* - MCS9 is not valid for VHT20 when
* Nss = 1,2,4,5,7,8
*/
- if ((rate_flags & eHAL_TX_RATE_VHT20) &&
+ if ((rate_flags & TX_RATE_VHT20) &&
(mcsidx > 8) &&
(nss != 3 && nss != 6))
mcsidx = 8;
@@ -3557,7 +3557,7 @@
} else {
/* report current rate instead of max rate */
maxrate = myrate;
- if (!(rate_flags & eHAL_TX_RATE_LEGACY))
+ if (!(rate_flags & TX_RATE_LEGACY))
mcsidx = stats->tx_rate.mcs;
}
@@ -3640,15 +3640,15 @@
&supported_mcs_rate_nss2);
if (rate == mcs_rate[mcs].supported_rate[0]) {
- flags |= eHAL_TX_RATE_HT20;
+ flags |= TX_RATE_HT20;
} else if (rate == mcs_rate[mcs].supported_rate[1]) {
- flags |= eHAL_TX_RATE_HT40;
+ flags |= TX_RATE_HT40;
} else if (rate == mcs_rate[mcs].supported_rate[2]) {
- flags |= eHAL_TX_RATE_HT20;
- flags |= eHAL_TX_RATE_SGI;
+ flags |= TX_RATE_HT20;
+ flags |= TX_RATE_SGI;
} else if (rate == mcs_rate[mcs].supported_rate[3]) {
- flags |= eHAL_TX_RATE_HT40;
- flags |= eHAL_TX_RATE_SGI;
+ flags |= TX_RATE_HT40;
+ flags |= TX_RATE_SGI;
} else {
hdd_err("invalid params rate %d nss %d mcs %d",
rate, nss, mcs);
@@ -3680,20 +3680,20 @@
&supported_vht_mcs_rate_nss2);
if (rate == mcs_rate[mcs].supported_VHT80_rate[0]) {
- flags |= eHAL_TX_RATE_VHT80;
+ flags |= TX_RATE_VHT80;
} else if (rate == mcs_rate[mcs].supported_VHT80_rate[1]) {
- flags |= eHAL_TX_RATE_VHT80;
- flags |= eHAL_TX_RATE_SGI;
+ flags |= TX_RATE_VHT80;
+ flags |= TX_RATE_SGI;
} else if (rate == mcs_rate[mcs].supported_VHT40_rate[0]) {
- flags |= eHAL_TX_RATE_VHT40;
+ flags |= TX_RATE_VHT40;
} else if (rate == mcs_rate[mcs].supported_VHT40_rate[1]) {
- flags |= eHAL_TX_RATE_VHT40;
- flags |= eHAL_TX_RATE_SGI;
+ flags |= TX_RATE_VHT40;
+ flags |= TX_RATE_SGI;
} else if (rate == mcs_rate[mcs].supported_VHT20_rate[0]) {
- flags |= eHAL_TX_RATE_VHT20;
+ flags |= TX_RATE_VHT20;
} else if (rate == mcs_rate[mcs].supported_VHT20_rate[1]) {
- flags |= eHAL_TX_RATE_VHT20;
- flags |= eHAL_TX_RATE_SGI;
+ flags |= TX_RATE_VHT20;
+ flags |= TX_RATE_SGI;
} else {
hdd_err("invalid params rate %d nss %d mcs %d",
rate, nss, mcs);
@@ -3997,7 +3997,7 @@
/* convert to the UI units of 100kbps */
myRate = adapter->hdd_stats.class_a_stat.tx_rate * 5;
- if (!(rate_flags & eHAL_TX_RATE_LEGACY)) {
+ if (!(rate_flags & TX_RATE_LEGACY)) {
nss = adapter->hdd_stats.class_a_stat.nss;
if ((nss > 1) &&
policy_mgr_is_current_hwmode_dbs(hdd_ctx->hdd_psoc) &&
@@ -4010,7 +4010,7 @@
/* Get current rate flags if report actual */
/* WMA fails to find mcs_index for legacy tx rates */
if (mcs_index == INVALID_MCS_IDX && myRate)
- rate_flags = eHAL_TX_RATE_LEGACY;
+ rate_flags = TX_RATE_LEGACY;
else
rate_flags =
adapter->hdd_stats.class_a_stat.mcs_rate_flags;
@@ -4116,7 +4116,7 @@
* Only if we are connected in non legacy mode and not
* reporting actual speed
*/
- if ((3 != rssidx) && !(rate_flags & eHAL_TX_RATE_LEGACY)) {
+ if ((3 != rssidx) && !(rate_flags & TX_RATE_LEGACY)) {
if (0 !=
sme_cfg_get_str(WLAN_HDD_GET_HAL_CTX(adapter),
WNI_CFG_CURRENT_MCS_SET, MCSRates,
@@ -4132,24 +4132,24 @@
1) ? &supported_vht_mcs_rate_nss1 :
&supported_vht_mcs_rate_nss2);
- if (rate_flags & eHAL_TX_RATE_VHT80)
+ if (rate_flags & TX_RATE_VHT80)
mode = 2;
- else if ((rate_flags & eHAL_TX_RATE_VHT40) ||
- (rate_flags & eHAL_TX_RATE_HT40))
+ else if ((rate_flags & TX_RATE_VHT40) ||
+ (rate_flags & TX_RATE_HT40))
mode = 1;
else
mode = 0;
/* VHT80 rate has separate rate table */
if (rate_flags &
- (eHAL_TX_RATE_VHT20 | eHAL_TX_RATE_VHT40 |
- eHAL_TX_RATE_VHT80)) {
+ (TX_RATE_VHT20 | TX_RATE_VHT40 |
+ TX_RATE_VHT80)) {
sme_cfg_get_int(WLAN_HDD_GET_HAL_CTX(adapter),
WNI_CFG_VHT_TX_MCS_MAP,
&vht_mcs_map);
vht_max_mcs = (enum data_rate_11ac_max_mcs)
(vht_mcs_map & DATA_RATE_11AC_MCS_MASK);
- if (rate_flags & eHAL_TX_RATE_SGI)
+ if (rate_flags & TX_RATE_SGI)
rateFlag |= 1;
if (DATA_RATE_11AC_MAX_MCS_7 == vht_max_mcs)
@@ -4169,21 +4169,21 @@
}
}
- if (rate_flags & eHAL_TX_RATE_VHT80) {
+ if (rate_flags & TX_RATE_VHT80) {
currentRate =
supported_vht_mcs_rate[mcs_index].
supported_VHT80_rate[rateFlag];
maxRate =
supported_vht_mcs_rate[maxMCSIdx].
supported_VHT80_rate[rateFlag];
- } else if (rate_flags & eHAL_TX_RATE_VHT40) {
+ } else if (rate_flags & TX_RATE_VHT40) {
currentRate =
supported_vht_mcs_rate[mcs_index].
supported_VHT40_rate[rateFlag];
maxRate =
supported_vht_mcs_rate[maxMCSIdx].
supported_VHT40_rate[rateFlag];
- } else if (rate_flags & eHAL_TX_RATE_VHT20) {
+ } else if (rate_flags & TX_RATE_VHT20) {
currentRate =
supported_vht_mcs_rate[mcs_index].
supported_VHT20_rate[rateFlag];
@@ -4197,9 +4197,9 @@
maxRate = currentRate;
} else {
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
rateFlag |= 1;
- if (rate_flags & eHAL_TX_RATE_SGI)
+ if (rate_flags & TX_RATE_SGI)
rateFlag |= 2;
supported_mcs_rate =
@@ -4246,7 +4246,7 @@
}
}
- else if (!(rate_flags & eHAL_TX_RATE_LEGACY)) {
+ else if (!(rate_flags & TX_RATE_LEGACY)) {
maxRate = myRate;
maxSpeedMCS = 1;
maxMCSIdx = mcs_index;
@@ -4254,7 +4254,7 @@
/* report a value at least as big as current rate */
if ((maxRate < myRate) || (0 == maxRate)) {
maxRate = myRate;
- if (rate_flags & eHAL_TX_RATE_LEGACY) {
+ if (rate_flags & TX_RATE_LEGACY) {
maxSpeedMCS = 0;
} else {
maxSpeedMCS = 1;
@@ -4262,7 +4262,7 @@
}
}
- if (rate_flags & eHAL_TX_RATE_LEGACY) {
+ if (rate_flags & TX_RATE_LEGACY) {
sinfo->txrate.legacy = maxRate;
linkspeed_dbg("Reporting legacy rate %d\n",
sinfo->txrate.legacy);
@@ -4270,22 +4270,22 @@
sinfo->txrate.mcs = maxMCSIdx;
sinfo->txrate.nss = nss;
- if (rate_flags & eHAL_TX_RATE_VHT80)
+ if (rate_flags & TX_RATE_VHT80)
hdd_set_rate_bw(&sinfo->txrate, HDD_RATE_BW_80);
- else if (rate_flags & eHAL_TX_RATE_VHT40)
+ else if (rate_flags & TX_RATE_VHT40)
hdd_set_rate_bw(&sinfo->txrate, HDD_RATE_BW_40);
if (rate_flags &
- (eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) {
+ (TX_RATE_HT20 | TX_RATE_HT40)) {
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
hdd_set_rate_bw(&sinfo->txrate,
HDD_RATE_BW_40);
} else {
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
}
- if (rate_flags & eHAL_TX_RATE_SGI) {
+ if (rate_flags & TX_RATE_SGI) {
if (!
(sinfo->txrate.
flags & RATE_INFO_FLAGS_VHT_MCS))
@@ -4299,7 +4299,7 @@
} else {
/* report current rate instead of max rate */
- if (rate_flags & eHAL_TX_RATE_LEGACY) {
+ if (rate_flags & TX_RATE_LEGACY) {
/* provide to the UI in units of 100kbps */
sinfo->txrate.legacy = myRate;
linkspeed_dbg("Reporting actual legacy rate %d\n",
@@ -4309,22 +4309,22 @@
sinfo->txrate.mcs = mcs_index;
sinfo->txrate.nss = nss;
- if (rate_flags & eHAL_TX_RATE_VHT80)
+ if (rate_flags & TX_RATE_VHT80)
hdd_set_rate_bw(&sinfo->txrate, HDD_RATE_BW_80);
- else if (rate_flags & eHAL_TX_RATE_VHT40)
+ else if (rate_flags & TX_RATE_VHT40)
hdd_set_rate_bw(&sinfo->txrate, HDD_RATE_BW_40);
if (rate_flags &
- (eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) {
+ (TX_RATE_HT20 | TX_RATE_HT40)) {
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
- if (rate_flags & eHAL_TX_RATE_HT40)
+ if (rate_flags & TX_RATE_HT40)
hdd_set_rate_bw(&sinfo->txrate,
HDD_RATE_BW_40);
} else {
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
}
- if (rate_flags & eHAL_TX_RATE_SGI) {
+ if (rate_flags & TX_RATE_SGI) {
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
sinfo->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
}
@@ -4349,7 +4349,7 @@
HDD_INFO_RX_BYTES |
HDD_INFO_RX_PACKETS;
- if (rate_flags & eHAL_TX_RATE_LEGACY)
+ if (rate_flags & TX_RATE_LEGACY)
hdd_debug("Reporting legacy rate %d pkt cnt tx %d rx %d",
sinfo->txrate.legacy, sinfo->tx_packets,
sinfo->rx_packets);
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index eae60bd..eb46e3f 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -1893,17 +1893,29 @@
void *txFailIndCallback;
} tAniTXFailMonitorInd, *tpAniTXFailMonitorInd;
-typedef enum eTxRateInfo {
- eHAL_TX_RATE_LEGACY = 0x1, /* Legacy rates */
- eHAL_TX_RATE_HT20 = 0x2, /* HT20 rates */
- eHAL_TX_RATE_HT40 = 0x4, /* HT40 rates */
- eHAL_TX_RATE_SGI = 0x8, /* Rate with Short guard interval */
- eHAL_TX_RATE_LGI = 0x10, /* Rate with Long guard interval */
- eHAL_TX_RATE_VHT20 = 0x20, /* VHT 20 rates */
- eHAL_TX_RATE_VHT40 = 0x40, /* VHT 40 rates */
- eHAL_TX_RATE_VHT80 = 0x80 /* VHT 80 rates */
-} tTxrateinfoflags;
-
+#ifndef QCA_SUPPORT_CP_STATS
+/**
+ * enum tx_rate_info - tx_rate flags
+ * @TX_RATE_LEGACY: Legacy rates
+ * @TX_RATE_HT20: HT20 rates
+ * @TX_RATE_HT40: HT40 rates
+ * @TX_RATE_SGI: Rate with Short guard interval
+ * @TX_RATE_LGI: Rate with Long guard interval
+ * @TX_RATE_VHT20: VHT 20 rates
+ * @TX_RATE_VHT40: VHT 40 rates
+ * @TX_RATE_VHT80: VHT 80 rates
+ */
+enum tx_rate_info {
+ TX_RATE_LEGACY = 0x1,
+ TX_RATE_HT20 = 0x2,
+ TX_RATE_HT40 = 0x4,
+ TX_RATE_SGI = 0x8,
+ TX_RATE_LGI = 0x10,
+ TX_RATE_VHT20 = 0x20,
+ TX_RATE_VHT40 = 0x40,
+ TX_RATE_VHT80 = 0x80
+};
+#endif
/**********************PE Statistics end*************************/
typedef struct sSirP2PNoaStart {
@@ -3606,7 +3618,7 @@
int32_t ucastDataRate;
/* TX flag to differentiate between HT20, HT40 etc */
- tTxrateinfoflags ucastDataRateTxFlag;
+ enum tx_rate_info ucastDataRateTxFlag;
/*
* 0 implies MCAST RA, positive value implies fixed rate,
@@ -3615,7 +3627,7 @@
int32_t reliableMcastDataRate; /* unit Mbpsx10 */
/* TX flag to differentiate between HT20, HT40 etc */
- tTxrateinfoflags reliableMcastDataRateTxFlag;
+ enum tx_rate_info reliableMcastDataRateTxFlag;
/*
* MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10,
@@ -3624,7 +3636,7 @@
uint32_t mcastDataRate24GHz;
/* TX flag to differentiate between HT20, HT40 etc */
- tTxrateinfoflags mcastDataRate24GHzTxFlag;
+ enum tx_rate_info mcastDataRate24GHzTxFlag;
/*
* MCAST(or BCAST) fixed data rate in 5 GHz,
@@ -3633,7 +3645,7 @@
uint32_t mcastDataRate5GHz;
/* TX flag to differentiate between HT20, HT40 etc */
- tTxrateinfoflags mcastDataRate5GHzTxFlag;
+ enum tx_rate_info mcastDataRate5GHzTxFlag;
} tSirRateUpdateInd, *tpSirRateUpdateInd;
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 4103629..a030ff2 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -188,29 +188,29 @@
if (!sta_ds->mlmStaContext.htCapability &&
!sta_ds->mlmStaContext.vhtCapability) {
- rate_flags |= eHAL_TX_RATE_LEGACY;
+ rate_flags |= TX_RATE_LEGACY;
} else {
if (sta_ds->mlmStaContext.vhtCapability) {
if (WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ ==
sta_ds->vhtSupportedChannelWidthSet) {
- rate_flags |= eHAL_TX_RATE_VHT80;
+ rate_flags |= TX_RATE_VHT80;
} else if (WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ ==
sta_ds->vhtSupportedChannelWidthSet) {
if (sta_ds->htSupportedChannelWidthSet)
- rate_flags |= eHAL_TX_RATE_VHT40;
+ rate_flags |= TX_RATE_VHT40;
else
- rate_flags |= eHAL_TX_RATE_VHT20;
+ rate_flags |= TX_RATE_VHT20;
}
} else if (sta_ds->mlmStaContext.htCapability) {
if (sta_ds->htSupportedChannelWidthSet)
- rate_flags |= eHAL_TX_RATE_HT40;
+ rate_flags |= TX_RATE_HT40;
else
- rate_flags |= eHAL_TX_RATE_HT20;
+ rate_flags |= TX_RATE_HT20;
}
}
if (sta_ds->htShortGI20Mhz || sta_ds->htShortGI40Mhz)
- rate_flags |= eHAL_TX_RATE_SGI;
+ rate_flags |= TX_RATE_SGI;
return rate_flags;
}
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 118a0fe..b31fd6c 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -9947,11 +9947,11 @@
if (rate_upd->mcastDataRate24GHz == HT20_SHORT_GI_MCS7_RATE)
rate_upd->mcastDataRate24GHzTxFlag =
- eHAL_TX_RATE_HT20 | eHAL_TX_RATE_SGI;
+ TX_RATE_HT20 | TX_RATE_SGI;
else if (rate_upd->reliableMcastDataRate ==
HT20_SHORT_GI_MCS7_RATE)
rate_upd->reliableMcastDataRateTxFlag =
- eHAL_TX_RATE_HT20 | eHAL_TX_RATE_SGI;
+ TX_RATE_HT20 | TX_RATE_SGI;
status = sme_acquire_global_lock(&pMac->sme);
if (QDF_STATUS_SUCCESS == status) {
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index 0277831..39fd0a2 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.c
@@ -741,30 +741,30 @@
if (add_bss->vhtCapable) {
if (add_bss->ch_width == CH_WIDTH_80P80MHZ)
- iface->rate_flags |= eHAL_TX_RATE_VHT80;
+ iface->rate_flags |= TX_RATE_VHT80;
if (add_bss->ch_width == CH_WIDTH_160MHZ)
- iface->rate_flags |= eHAL_TX_RATE_VHT80;
+ iface->rate_flags |= TX_RATE_VHT80;
if (add_bss->ch_width == CH_WIDTH_80MHZ)
- iface->rate_flags |= eHAL_TX_RATE_VHT80;
+ iface->rate_flags |= TX_RATE_VHT80;
else if (add_bss->ch_width)
- iface->rate_flags |= eHAL_TX_RATE_VHT40;
+ iface->rate_flags |= TX_RATE_VHT40;
else
- iface->rate_flags |= eHAL_TX_RATE_VHT20;
+ iface->rate_flags |= TX_RATE_VHT20;
}
/* avoid to conflict with htCapable flag */
else if (add_bss->htCapable) {
if (add_bss->ch_width)
- iface->rate_flags |= eHAL_TX_RATE_HT40;
+ iface->rate_flags |= TX_RATE_HT40;
else
- iface->rate_flags |= eHAL_TX_RATE_HT20;
+ iface->rate_flags |= TX_RATE_HT20;
}
if (add_bss->staContext.fShortGI20Mhz ||
add_bss->staContext.fShortGI40Mhz)
- iface->rate_flags |= eHAL_TX_RATE_SGI;
+ iface->rate_flags |= TX_RATE_SGI;
if (!add_bss->htCapable && !add_bss->vhtCapable)
- iface->rate_flags = eHAL_TX_RATE_LEGACY;
+ iface->rate_flags = TX_RATE_LEGACY;
}
/**
@@ -1276,7 +1276,7 @@
}
short_gi = intr[vdev_id].config.shortgi;
if (short_gi == 0)
- short_gi = (intr[vdev_id].rate_flags & eHAL_TX_RATE_SGI) ?
+ short_gi = (intr[vdev_id].rate_flags & TX_RATE_SGI) ?
true : false;
/* first check if reliable TX mcast rate is used. If not check the bcast
* Then is mcast. Mcast rate is saved in mcastDataRate24GHz
@@ -1285,7 +1285,7 @@
mbpsx10_rate = pRateUpdateParams->reliableMcastDataRate;
paramId = WMI_VDEV_PARAM_MCAST_DATA_RATE;
if (pRateUpdateParams->
- reliableMcastDataRateTxFlag & eHAL_TX_RATE_SGI)
+ reliableMcastDataRateTxFlag & TX_RATE_SGI)
short_gi = 1; /* upper layer specified short GI */
} else if (pRateUpdateParams->bcastDataRate > -1) {
mbpsx10_rate = pRateUpdateParams->bcastDataRate;
@@ -1294,7 +1294,7 @@
mbpsx10_rate = pRateUpdateParams->mcastDataRate24GHz;
paramId = WMI_VDEV_PARAM_MCAST_DATA_RATE;
if (pRateUpdateParams->
- mcastDataRate24GHzTxFlag & eHAL_TX_RATE_SGI)
+ mcastDataRate24GHzTxFlag & TX_RATE_SGI)
short_gi = 1; /* upper layer specified short GI */
}
WMA_LOGE("%s: dev_id = %d, dev_type = %d, dev_mode = %d,",
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index 89aed5a..5e91276 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.c
@@ -203,9 +203,9 @@
__func__, maxRate, rate_flags, nss);
*mcsRateFlag = rate_flags;
- *mcsRateFlag &= ~eHAL_TX_RATE_SGI;
+ *mcsRateFlag &= ~TX_RATE_SGI;
for (index = 0; index < MAX_VHT_MCS_IDX; index++) {
- if (rate_flags & eHAL_TX_RATE_VHT80) {
+ if (rate_flags & TX_RATE_VHT80) {
/* check for vht80 nss1/2 rate set */
match_rate = wma_mcs_rate_match(maxRate, &is_sgi, nss,
vht_mcs_nss1[index].ht80_rate[0],
@@ -215,8 +215,8 @@
if (match_rate)
goto rate_found;
}
- if ((rate_flags & eHAL_TX_RATE_VHT40) |
- (rate_flags & eHAL_TX_RATE_VHT80)) {
+ if ((rate_flags & TX_RATE_VHT40) |
+ (rate_flags & TX_RATE_VHT80)) {
/* check for vht40 nss1/2 rate set */
match_rate = wma_mcs_rate_match(maxRate, &is_sgi, nss,
vht_mcs_nss1[index].ht40_rate[0],
@@ -224,13 +224,13 @@
vht_mcs_nss2[index].ht40_rate[0],
vht_mcs_nss2[index].ht40_rate[1]);
if (match_rate) {
- *mcsRateFlag &= ~eHAL_TX_RATE_VHT80;
+ *mcsRateFlag &= ~TX_RATE_VHT80;
goto rate_found;
}
}
- if ((rate_flags & eHAL_TX_RATE_VHT20) |
- (rate_flags & eHAL_TX_RATE_VHT40) |
- (rate_flags & eHAL_TX_RATE_VHT80)) {
+ if ((rate_flags & TX_RATE_VHT20) |
+ (rate_flags & TX_RATE_VHT40) |
+ (rate_flags & TX_RATE_VHT80)) {
/* check for vht20 nss1/2 rate set */
match_rate = wma_mcs_rate_match(maxRate, &is_sgi, nss,
vht_mcs_nss1[index].ht20_rate[0],
@@ -238,14 +238,14 @@
vht_mcs_nss2[index].ht20_rate[0],
vht_mcs_nss2[index].ht20_rate[1]);
if (match_rate) {
- *mcsRateFlag &= ~(eHAL_TX_RATE_VHT80 |
- eHAL_TX_RATE_VHT40);
+ *mcsRateFlag &= ~(TX_RATE_VHT80 |
+ TX_RATE_VHT40);
goto rate_found;
}
}
}
for (index = 0; index < MAX_HT_MCS_IDX; index++) {
- if (rate_flags & eHAL_TX_RATE_HT40) {
+ if (rate_flags & TX_RATE_HT40) {
/* check for ht40 nss1/2 rate set */
match_rate = wma_mcs_rate_match(maxRate, &is_sgi, nss,
mcs_nss1[index].ht40_rate[0],
@@ -253,14 +253,14 @@
mcs_nss2[index].ht40_rate[0],
mcs_nss2[index].ht40_rate[1]);
if (match_rate) {
- *mcsRateFlag = eHAL_TX_RATE_HT40;
+ *mcsRateFlag = TX_RATE_HT40;
if (nss == 2)
index += MAX_HT_MCS_IDX;
goto rate_found;
}
}
- if ((rate_flags & eHAL_TX_RATE_HT20) ||
- (rate_flags & eHAL_TX_RATE_HT40)) {
+ if ((rate_flags & TX_RATE_HT20) ||
+ (rate_flags & TX_RATE_HT40)) {
/* check for ht20 nss1/2 rate set */
match_rate = wma_mcs_rate_match(maxRate, &is_sgi, nss,
mcs_nss1[index].ht20_rate[0],
@@ -268,7 +268,7 @@
mcs_nss2[index].ht20_rate[0],
mcs_nss2[index].ht20_rate[1]);
if (match_rate) {
- *mcsRateFlag = eHAL_TX_RATE_HT20;
+ *mcsRateFlag = TX_RATE_HT20;
if (nss == 2)
index += MAX_HT_MCS_IDX;
goto rate_found;
@@ -279,7 +279,7 @@
rate_found:
/* set SGI flag only if this is SGI rate */
if (match_rate && is_sgi == true)
- *mcsRateFlag |= eHAL_TX_RATE_SGI;
+ *mcsRateFlag |= TX_RATE_SGI;
WMA_LOGD("%s - match_rate: %d index: %d rate_flag: 0x%x is_sgi: %d",
__func__, match_rate, index, *mcsRateFlag, is_sgi);
@@ -2661,7 +2661,7 @@
}
classa_stats->tx_rate_flags = node->rate_flags;
- if (!(node->rate_flags & eHAL_TX_RATE_LEGACY)) {
+ if (!(node->rate_flags & TX_RATE_LEGACY)) {
classa_stats->mcs_index =
wma_get_mcs_idx(
(peer_stats->peer_tx_rate /
@@ -2863,8 +2863,8 @@
link_status |= LINK_SUPPORT_MIMO;
if (intr[ht_info->vdevid].rate_flags &
- (eHAL_TX_RATE_VHT20 | eHAL_TX_RATE_VHT40 |
- eHAL_TX_RATE_VHT80))
+ (TX_RATE_VHT20 | TX_RATE_VHT40 |
+ TX_RATE_VHT80))
link_status |= LINK_SUPPORT_VHT;
wma_post_link_status(