qcacmn: Fill peer Tx/Rx statistics from ppdu
Fill peer level statistics such as nss, mcs, etc. from ppdu descriptor Change-Id: Ibc348b7fa1b6438adc06de74aeff36c882519a80
This commit is contained in:

committed by
Madan Koyyalamudi

parent
b33b9d857d
commit
942476d37d
@@ -157,6 +157,7 @@ enum HW_RATECODE_PREAM_TYPE {
|
||||
HW_RATECODE_PREAM_CCK,
|
||||
HW_RATECODE_PREAM_HT,
|
||||
HW_RATECODE_PREAM_VHT,
|
||||
HW_RATECODE_PREAM_HE,
|
||||
};
|
||||
|
||||
enum DP_CMN_MODULATION_TYPE dp_getmodulation(
|
||||
|
@@ -979,6 +979,18 @@ struct protocol_trace_count {
|
||||
* @ru_loc: pkt info for RU location 26/ 52/ 106/ 242/ 484 counter
|
||||
* @num_ppdu_cookie_valid : Number of comp received with valid ppdu cookie
|
||||
* @tx_success_twt: Successful Tx Packets in TWT session
|
||||
* @nss_info: NSS 1,2, ...8
|
||||
* @mcs_info: MCS index
|
||||
* @bw_info: Bandwidth
|
||||
* <enum 0 bw_20_MHz>
|
||||
* <enum 1 bw_40_MHz>
|
||||
* <enum 2 bw_80_MHz>
|
||||
* <enum 3 bw_160_MHz>
|
||||
* @gi_info: <enum 0 0_8_us_sgi > Legacy normal GI
|
||||
* <enum 1 0_4_us_sgi > Legacy short GI
|
||||
* <enum 2 1_6_us_sgi > HE related GI
|
||||
* <enum 3 3_2_us_sgi > HE
|
||||
* @preamble_info: preamble
|
||||
*/
|
||||
struct cdp_tx_stats {
|
||||
struct cdp_pkt_info comp_pkt;
|
||||
@@ -1071,6 +1083,12 @@ struct cdp_tx_stats {
|
||||
uint32_t num_ppdu_cookie_valid;
|
||||
uint32_t no_ack_count[QDF_PROTO_SUBTYPE_MAX];
|
||||
struct cdp_pkt_info tx_success_twt;
|
||||
|
||||
uint32_t nss_info:4,
|
||||
mcs_info:4,
|
||||
bw_info:4,
|
||||
gi_info:4,
|
||||
preamble_info:4;
|
||||
};
|
||||
|
||||
/* struct cdp_rx_stats - rx Level Stats
|
||||
@@ -1137,6 +1155,18 @@ struct cdp_tx_stats {
|
||||
* @last_snr: Previous snr
|
||||
* @multipass_rx_pkt_drop: Dropped multipass rx pkt
|
||||
* @rx_mpdu_cnt: rx mpdu count per MCS rate
|
||||
* @nss_info: NSS 1,2, ...8
|
||||
* @mcs_info: MCS index
|
||||
* @bw_info: Bandwidth
|
||||
* <enum 0 bw_20_MHz>
|
||||
* <enum 1 bw_40_MHz>
|
||||
* <enum 2 bw_80_MHz>
|
||||
* <enum 3 bw_160_MHz>
|
||||
* @gi_info: <enum 0 0_8_us_sgi > Legacy normal GI
|
||||
* <enum 1 0_4_us_sgi > Legacy short GI
|
||||
* <enum 2 1_6_us_sgi > HE related GI
|
||||
* <enum 3 3_2_us_sgi > HE
|
||||
* @preamble_info: preamble
|
||||
* @to_stack_twt: Total packets sent up the stack in TWT session
|
||||
*/
|
||||
struct cdp_rx_stats {
|
||||
@@ -1208,6 +1238,11 @@ struct cdp_rx_stats {
|
||||
uint8_t last_snr;
|
||||
uint32_t multipass_rx_pkt_drop;
|
||||
uint32_t rx_mpdu_cnt[MAX_MCS];
|
||||
uint32_t nss_info:4,
|
||||
mcs_info:4,
|
||||
bw_info:4,
|
||||
gi_info:4,
|
||||
preamble_info:4;
|
||||
struct cdp_pkt_info to_stack_twt;
|
||||
};
|
||||
|
||||
|
@@ -1525,6 +1525,11 @@ dp_tx_rate_stats_update(struct dp_peer *peer,
|
||||
ppdu_tx_rate = dp_ath_rate_out(peer->stats.tx.avg_tx_rate);
|
||||
DP_STATS_UPD(peer, tx.rnd_avg_tx_rate, ppdu_tx_rate);
|
||||
|
||||
peer->stats.tx.bw_info = ppdu->bw;
|
||||
peer->stats.tx.gi_info = ppdu->gi;
|
||||
peer->stats.tx.nss_info = ppdu->nss;
|
||||
peer->stats.tx.mcs_info = ppdu->mcs;
|
||||
peer->stats.tx.preamble_info = ppdu->preamble;
|
||||
if (peer->vdev) {
|
||||
/*
|
||||
* In STA mode:
|
||||
|
@@ -558,12 +558,21 @@ static inline void dp_rx_rate_stats_update(struct dp_peer *peer,
|
||||
nss = ppdu_user->nss - 1;
|
||||
mcs = ppdu_user->mcs;
|
||||
|
||||
if (peer) {
|
||||
peer->stats.rx.nss_info = ppdu_user->nss;
|
||||
peer->stats.rx.mcs_info = ppdu_user->mcs;
|
||||
}
|
||||
} else {
|
||||
if (ppdu->u.nss == 0)
|
||||
nss = 0;
|
||||
else
|
||||
nss = ppdu->u.nss - 1;
|
||||
mcs = ppdu->u.mcs;
|
||||
|
||||
if (peer) {
|
||||
peer->stats.rx.nss_info = ppdu->u.nss;
|
||||
peer->stats.rx.mcs_info = ppdu->u.mcs;
|
||||
}
|
||||
}
|
||||
|
||||
ratekbps = dp_getrateindex(ppdu->u.gi,
|
||||
@@ -582,6 +591,12 @@ static inline void dp_rx_rate_stats_update(struct dp_peer *peer,
|
||||
return;
|
||||
}
|
||||
|
||||
if (peer) {
|
||||
peer->stats.rx.bw_info = ppdu->u.bw;
|
||||
peer->stats.rx.gi_info = ppdu->u.gi;
|
||||
peer->stats.rx.preamble_info = ppdu->u.preamble;
|
||||
}
|
||||
|
||||
ppdu->rix = rix;
|
||||
DP_STATS_UPD(peer, rx.last_rx_rate, ratekbps);
|
||||
dp_ath_rate_lpf(peer->stats.rx.avg_rx_rate, ratekbps);
|
||||
|
Reference in New Issue
Block a user