qcacmn: populate NSS value and Translate MCS value for HT

This change will resolve displaying NSS value
in stats in case of HT. And also it will give
proper NSS value to calculate rate value. Modify MCS
value to match with Tx stats from firmware.

Also retain original MCS value to use in radiotap code
for HT case.

Change-Id: I4dad068262a5e9188a5935db6b2cbf8d14138e7e
This commit is contained in:
Keyur Parekh
2018-11-15 15:56:07 -08:00
committed by nshrivas
parent 706eecf986
commit f72cbe544a
4 changed files with 8 additions and 1 deletions

View File

@@ -130,6 +130,7 @@
#define HE_LTF_4_X 3
#define HE_LTF_UNKNOWN 0
#define VHT_SIG_SU_NSS_MASK 0x7
#define HT_SIG_SU_NSS_SHIFT 0x3
#define HAL_TID_INVALID 31
#define HAL_AST_IDX_INVALID 0xFFFF

View File

@@ -431,11 +431,15 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
1 : 0;
ppdu_info->rx_status.mcs = HAL_RX_GET(ht_sig_info,
HT_SIG_INFO_0, MCS);
ppdu_info->rx_status.ht_mcs = ppdu_info->rx_status.mcs;
ppdu_info->rx_status.bw = HAL_RX_GET(ht_sig_info,
HT_SIG_INFO_0, CBW);
ppdu_info->rx_status.sgi = HAL_RX_GET(ht_sig_info,
HT_SIG_INFO_1, SHORT_GI);
ppdu_info->rx_status.reception_type = HAL_RX_TYPE_SU;
ppdu_info->rx_status.nss = ((ppdu_info->rx_status.mcs) >>
HT_SIG_SU_NSS_SHIFT) + 1;
ppdu_info->rx_status.mcs &= ((1 << HT_SIG_SU_NSS_SHIFT) - 1);
break;
}

View File

@@ -181,6 +181,7 @@
* @ant_signal_db: Rx packet RSSI
* @nr_ant: Number of Antennas used for streaming
* @mcs: MCS index of Rx frame
* @ht_mcs: MCS index for HT RX frames
* @nss: Number of spatial streams
* @bw: bandwidth of rx frame
* @is_stbc: Is STBC enabled
@@ -246,6 +247,7 @@ struct mon_rx_status {
uint8_t ant_signal_db;
uint8_t nr_ant;
uint8_t mcs;
uint8_t ht_mcs;
uint8_t nss;
uint16_t tcp_msdu_count;
uint16_t udp_msdu_count;

View File

@@ -4141,7 +4141,7 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status,
rtap_buf[rtap_len] |= IEEE80211_RADIOTAP_MCS_BW_20;
rtap_len += 1;
rtap_buf[rtap_len] = rx_status->mcs;
rtap_buf[rtap_len] = rx_status->ht_mcs;
rtap_len += 1;
if ((rtap_len - length) > RADIOTAP_HT_FLAGS_LEN) {