qcacld-3.0: Optimize logs while printing HT/VHT/HE MCS

Optimize logs while printing HT/VHT/HE MCS

Change-Id: Ie4953c25841b7940df101affa9cf5c4b4a9a099e
CRs-Fixed: 2616911
This commit is contained in:
Abhishek Singh 2020-02-06 12:28:33 +05:30 • committed by nshrivas
commit 3be6fabc18
2 changed files with 55 additions and 34 deletions

View file

@ -1318,9 +1318,9 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx,
rates->vhtTxMCSMap |= peer_mcs_map;
}
}
pe_debug("enable2x2 - %d nss %d vhtRxMCSMap - %x vhtTxMCSMap - %x",
vht_cap_info->enable2x2, nss,
rates->vhtRxMCSMap, rates->vhtTxMCSMap);
pe_debug("RxMCSMap %x TxMCSMap %x", rates->vhtRxMCSMap,
rates->vhtTxMCSMap);
if (!session_entry)
return QDF_STATUS_SUCCESS;
@ -1328,7 +1328,6 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx,
session_entry->supported_nss_1x1 =
((rates->vhtTxMCSMap & VHT_MCS_1x1) == VHT_MCS_1x1) ?
true : false;
pe_debug("VHT supported nss 1x1: %d", session_entry->supported_nss_1x1);
if (!sta_ds || CH_WIDTH_80MHZ >= session_entry->ch_width)
return QDF_STATUS_SUCCESS;
@ -1340,6 +1339,43 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx,
return QDF_STATUS_SUCCESS;
}
static void lim_dump_ht_mcs_mask(uint8_t *self_mcs, uint8_t *peer_mcs)
{
uint32_t len = 0;
uint8_t idx;
uint8_t *buff;
uint32_t buff_len;
/*
* Buffer of (SIR_MAC_MAX_SUPPORTED_MCS_SET * 5) + 1 to consider the 4
* char MCS eg 0xff and 1 space after it and 1 to end the string with
* NULL.
*/
buff_len = (SIR_MAC_MAX_SUPPORTED_MCS_SET * 5) + 1;
buff = qdf_mem_malloc(buff_len);
if (!buff)
return;
if (self_mcs) {
for (idx = 0; idx < SIR_MAC_MAX_SUPPORTED_MCS_SET; idx++)
len += qdf_scnprintf(buff + len, buff_len - len,
"0x%x ", self_mcs[idx]);
pe_nofl_debug("SELF HT MCS: %s", buff);
}
if (peer_mcs) {
len = 0;
for (idx = 0; idx < SIR_MAC_MAX_SUPPORTED_MCS_SET; idx++)
len += qdf_scnprintf(buff + len, buff_len - len,
"0x%x ", peer_mcs[idx]);
pe_nofl_debug("PEER HT MCS: %s", buff);
}
qdf_mem_free(buff);
}
QDF_STATUS lim_populate_own_rate_set(struct mac_context *mac_ctx,
struct supported_rates *rates,
uint8_t *supported_mcs_set,
@ -1460,9 +1496,7 @@ QDF_STATUS lim_populate_own_rate_set(struct mac_context *mac_ctx,
supported_mcs_set[i];
}
pe_debug("MCS Rate Set Bitmap: ");
for (i = 0; i < SIR_MAC_MAX_SUPPORTED_MCS_SET; i++)
pe_debug("%x ", rates->supportedMCSSet[i]);
lim_dump_ht_mcs_mask(rates->supportedMCSSet, NULL);
}
lim_populate_vht_mcs_set(mac_ctx, rates, vht_caps, session_entry,
session_entry->nss, NULL);
@ -1653,9 +1687,8 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac,
pRates->supportedMCSSet[i] &=
pSupportedMCSSet[i];
}
pe_debug("MCS Rate Set Bitmap: ");
for (i = 0; i < SIR_MAC_MAX_SUPPORTED_MCS_SET; i++)
pe_debug("%x ", pRates->supportedMCSSet[i]);
lim_dump_ht_mcs_mask(NULL, pRates->supportedMCSSet);
if (pRates->supportedMCSSet[0] == 0) {
pe_debug("Incorrect MCS 0 - 7. They must be supported");
@ -1664,8 +1697,6 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac,
pe_session->supported_nss_1x1 =
((pRates->supportedMCSSet[1] != 0) ? false : true);
pe_debug("HT supported nss 1x1: %d",
pe_session->supported_nss_1x1);
}
lim_populate_vht_mcs_set(mac, pRates, pVHTCaps, pe_session,
pe_session->nss, sta_ds);
@ -1696,7 +1727,8 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac,
} else if (pRates->supportedMCSSet[1] == 0) {
pe_session->nss = NSS_1x1_MODE;
}
pe_debug("nss: %d", pe_session->nss);
pe_debug("nss 1x1 %d nss %d", pe_session->supported_nss_1x1,
pe_session->nss);
if (pBeaconStruct)
qdf_mem_free(pBeaconStruct);
@ -1918,11 +1950,8 @@ QDF_STATUS lim_populate_matching_rate_set(struct mac_context *mac_ctx,
sta_ds->supportedRates.supportedMCSSet[i] =
mcs_set[i] & supported_mcs_set[i];
pe_debug("MCS Rate Set Bitmap from CFG and DPH: ");
for (i = 0; i < SIR_MAC_MAX_SUPPORTED_MCS_SET; i++) {
pe_debug("%x %x ", mcs_set[i],
sta_ds->supportedRates.supportedMCSSet[i]);
}
lim_dump_ht_mcs_mask(mcs_set,
sta_ds->supportedRates.supportedMCSSet);
}
lim_populate_vht_mcs_set(mac_ctx, &sta_ds->supportedRates, vht_caps,
session_entry, session_entry->nss, sta_ds);
@ -3167,9 +3196,6 @@ QDF_STATUS lim_extract_ap_capabilities(struct mac_context *mac,
{
qdf_mem_zero((uint8_t *) beaconStruct, sizeof(tSirProbeRespBeacon));
pe_debug("The IE's being received are:");
QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
pIE, ieLen);
/* Parse the Beacon IE's, Don't try to parse if we dont have anything in IE */
if (ieLen > 0) {
if (QDF_STATUS_SUCCESS !=

View file

@ -7483,13 +7483,11 @@ QDF_STATUS lim_populate_he_mcs_set(struct mac_context *mac_ctx,
return QDF_STATUS_E_FAILURE;
}
pe_debug("peer rates lt 80: rx_mcs - 0x%04x tx_mcs - 0x%04x",
pe_debug("PEER: lt 80: rx 0x%04x tx 0x%04x, 160: rx 0x%04x tx 0x%04x, 80+80: rx 0x%04x tx 0x%04x",
peer_he_caps->rx_he_mcs_map_lt_80,
peer_he_caps->tx_he_mcs_map_lt_80);
pe_debug("peer rates 160: rx_mcs - 0x%04x tx_mcs - 0x%04x",
peer_he_caps->tx_he_mcs_map_lt_80,
(*(uint16_t *)peer_he_caps->rx_he_mcs_map_160),
(*(uint16_t *)peer_he_caps->tx_he_mcs_map_160));
pe_debug("peer rates 80+80: rx_mcs - 0x%04x tx_mcs - 0x%04x",
(*(uint16_t *)peer_he_caps->tx_he_mcs_map_160),
(*(uint16_t *)peer_he_caps->rx_he_mcs_map_80_80),
(*(uint16_t *)peer_he_caps->tx_he_mcs_map_80_80));
@ -7551,14 +7549,11 @@ QDF_STATUS lim_populate_he_mcs_set(struct mac_context *mac_ctx,
rates->tx_he_mcs_map_80_80 |= HE_MCS_INV_MSK_4_NSS(1);
}
pe_debug("enable2x2 - %d nss %d",
mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2, nss);
pe_debug("he_rx_lt_80 - 0x%x he_tx_lt_80 0x%x",
rates->rx_he_mcs_map_lt_80, rates->tx_he_mcs_map_lt_80);
pe_debug("he_rx_160 - 0x%x he_tx_160 0x%x",
rates->rx_he_mcs_map_160, rates->tx_he_mcs_map_160);
pe_debug("he_rx_80_80 - 0x%x he_tx_80_80 0x%x",
rates->rx_he_mcs_map_80_80, rates->tx_he_mcs_map_80_80);
pe_debug("lt 80: rx 0x%x tx 0x%x, 160: rx 0x%x tx 0x%x, 80_80: rx 0x%x tx 0x%x",
rates->rx_he_mcs_map_lt_80, rates->tx_he_mcs_map_lt_80,
rates->rx_he_mcs_map_160, rates->tx_he_mcs_map_160,
rates->rx_he_mcs_map_80_80, rates->tx_he_mcs_map_80_80);
return QDF_STATUS_SUCCESS;
}
#endif