qcacmn: add 11be TX/RX rate statistic support
Currently 11be msdu rate statistic is not supported yet. Another issue is: HW reported pkt type value 6, while host SW defined 11be type DOT11_BE (value 5), they are not matching. DOT11_BE value 5 is referred in monitor mode and otherwhere, so do map and conversion in host sw side. Change-Id: Ic5c2dd2a35cbe0ecd6430f007b6e7e02ece40998 CRs-Fixed: 3230900
This commit is contained in:

committed by
Madan Koyyalamudi

parent
56d67b3e32
commit
9d2b26795a
@@ -2091,6 +2091,7 @@ void dp_rx_msdu_extd_stats_update(struct dp_soc *soc, qdf_nbuf_t nbuf,
|
||||
{
|
||||
bool is_ampdu;
|
||||
uint32_t sgi, mcs, tid, nss, bw, reception_type, pkt_type;
|
||||
uint8_t dst_mcs_idx;
|
||||
|
||||
/*
|
||||
* TODO - For KIWI this field is present in ring_desc
|
||||
@@ -2108,6 +2109,9 @@ void dp_rx_msdu_extd_stats_update(struct dp_soc *soc, qdf_nbuf_t nbuf,
|
||||
rx_tlv_hdr);
|
||||
nss = hal_rx_msdu_start_nss_get(soc->hal_soc, rx_tlv_hdr);
|
||||
pkt_type = hal_rx_tlv_get_pkt_type(soc->hal_soc, rx_tlv_hdr);
|
||||
/* do HW to SW pkt type conversion */
|
||||
pkt_type = (pkt_type >= HAL_DOT11_MAX ? DOT11_MAX :
|
||||
hal_2_dp_pkt_type_map[pkt_type]);
|
||||
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer, rx.rx_mpdu_cnt[mcs], 1,
|
||||
((mcs < MAX_MCS) && QDF_NBUF_CB_RX_CHFRAG_START(nbuf)));
|
||||
@@ -2118,9 +2122,7 @@ void dp_rx_msdu_extd_stats_update(struct dp_soc *soc, qdf_nbuf_t nbuf,
|
||||
* only if nss > 0 and pkt_type is 11N/AC/AX,
|
||||
* then increase index [nss - 1] in array counter.
|
||||
*/
|
||||
if (nss > 0 && (pkt_type == DOT11_N ||
|
||||
pkt_type == DOT11_AC ||
|
||||
pkt_type == DOT11_AX))
|
||||
if (nss > 0 && CDP_IS_PKT_TYPE_SUPPORT_NSS(pkt_type))
|
||||
DP_PEER_EXTD_STATS_INC(txrx_peer, rx.nss[nss - 1], 1);
|
||||
|
||||
DP_PEER_EXTD_STATS_INC(txrx_peer, rx.sgi_count[sgi], 1);
|
||||
@@ -2134,36 +2136,11 @@ void dp_rx_msdu_extd_stats_update(struct dp_soc *soc, qdf_nbuf_t nbuf,
|
||||
DP_PEER_EXTD_STATS_INC(txrx_peer, rx.wme_ac_type[TID_TO_WME_AC(tid)], 1);
|
||||
DP_PEER_EXTD_STATS_INC(txrx_peer, rx.reception_type[reception_type], 1);
|
||||
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[MAX_MCS - 1], 1,
|
||||
((mcs >= MAX_MCS_11A) && (pkt_type == DOT11_A)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[mcs], 1,
|
||||
((mcs <= MAX_MCS_11A) && (pkt_type == DOT11_A)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[MAX_MCS - 1], 1,
|
||||
((mcs >= MAX_MCS_11B) && (pkt_type == DOT11_B)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[mcs], 1,
|
||||
((mcs <= MAX_MCS_11B) && (pkt_type == DOT11_B)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[MAX_MCS - 1], 1,
|
||||
((mcs >= MAX_MCS_11A) && (pkt_type == DOT11_N)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[mcs], 1,
|
||||
((mcs <= MAX_MCS_11A) && (pkt_type == DOT11_N)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[MAX_MCS - 1], 1,
|
||||
((mcs >= MAX_MCS_11AC) && (pkt_type == DOT11_AC)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[mcs], 1,
|
||||
((mcs <= MAX_MCS_11AC) && (pkt_type == DOT11_AC)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[MAX_MCS - 1], 1,
|
||||
((mcs >= MAX_MCS) && (pkt_type == DOT11_AX)));
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[mcs], 1,
|
||||
((mcs < MAX_MCS) && (pkt_type == DOT11_AX)));
|
||||
dst_mcs_idx = dp_get_mcs_array_index_by_pkt_type_mcs(pkt_type, mcs);
|
||||
if (MCS_INVALID_ARRAY_INDEX != dst_mcs_idx)
|
||||
DP_PEER_EXTD_STATS_INC(txrx_peer,
|
||||
rx.pkt_type[pkt_type].mcs_count[dst_mcs_idx],
|
||||
1);
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
|
Reference in New Issue
Block a user