qcacmn: Rx and Tx peer statistics update

* Update the pkt_type counters correctly within the array bound
 * Add support for NSS counters on Tx side
 * Update ampdu flag in PPDU struct
 * Add support for ampdu flag in hal_ppdu struct

Change-Id: I79ea52727124ea4be4d82912cb2513ea58e2af10
This commit is contained in:
Pranita Solanke
2018-01-12 19:14:31 +05:30
committed by snandini
parent 5819e29cbb
commit ed0aba69a9
7 changed files with 68 additions and 27 deletions

View File

@@ -80,6 +80,7 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
DP_STATS_UPD(peer, tx.tx_rate, ppdu->tx_rate);
DP_STATS_INC(peer, tx.sgi_count[ppdu->gi], num_msdu);
DP_STATS_INC(peer, tx.bw[ppdu->bw], num_msdu);
DP_STATS_INC(peer, tx.nss[ppdu->nss], num_msdu);
DP_STATS_UPD(peer, tx.last_ack_rssi, ack_rssi);
DP_STATS_INC(peer, tx.wme_ac_type[TID_TO_WME_AC(ppdu->tid)], num_msdu);
DP_STATS_INCC(peer, tx.stbc, num_msdu, ppdu->stbc);
@@ -101,31 +102,31 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
DP_STATS_INC(peer, tx.retries,
(ppdu->long_retries + ppdu->short_retries));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
tx.pkt_type[preamble].mcs_count[MAX_MCS-1], num_msdu,
((mcs >= MAX_MCS_11A) && (preamble == DOT11_A)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11A) && (preamble == DOT11_A)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
tx.pkt_type[preamble].mcs_count[MAX_MCS-1], num_msdu,
((mcs >= MAX_MCS_11B) && (preamble == DOT11_B)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < (MAX_MCS_11B)) && (preamble == DOT11_B)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
tx.pkt_type[preamble].mcs_count[MAX_MCS-1], num_msdu,
((mcs >= MAX_MCS_11A) && (preamble == DOT11_N)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11A) && (preamble == DOT11_N)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
tx.pkt_type[preamble].mcs_count[MAX_MCS-1], num_msdu,
((mcs >= MAX_MCS_11AC) && (preamble == DOT11_AC)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11AC) && (preamble == DOT11_AC)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
tx.pkt_type[preamble].mcs_count[MAX_MCS-1], num_msdu,
((mcs >= (MAX_MCS - 1)) && (preamble == DOT11_AX)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,