qcacmn: Add support for last_per
Calculate last_per based on unicast packets and success packets in last one second Change-Id: I8b469e5d9c1e40498b3267bf7bdf3149159bdc31 CRs-Fixed: 2343479
This commit is contained in:

gecommit door
nshrivas

bovenliggende
2a2b7fecb0
commit
3c60631d7c
@@ -134,6 +134,7 @@ void dp_cal_client_update_peer_stats(struct cdp_peer_stats *peer_stats)
|
||||
uint32_t temp_rx_data = peer_stats->rx.to_stack.num;
|
||||
uint32_t temp_tx_bytes = peer_stats->tx.tx_success.bytes;
|
||||
uint32_t temp_tx_data = peer_stats->tx.tx_success.num;
|
||||
uint32_t temp_tx_ucast_pkts = peer_stats->tx.ucast.num;
|
||||
|
||||
peer_stats->rx.rx_byte_rate = temp_rx_bytes -
|
||||
peer_stats->rx.rx_bytes_success_last;
|
||||
@@ -143,11 +144,19 @@ void dp_cal_client_update_peer_stats(struct cdp_peer_stats *peer_stats)
|
||||
peer_stats->tx.tx_bytes_success_last;
|
||||
peer_stats->tx.tx_data_rate = temp_tx_data -
|
||||
peer_stats->tx.tx_data_success_last;
|
||||
peer_stats->tx.tx_data_ucast_rate = temp_tx_ucast_pkts -
|
||||
peer_stats->tx.tx_data_ucast_last;
|
||||
|
||||
peer_stats->rx.rx_bytes_success_last = temp_rx_bytes;
|
||||
peer_stats->rx.rx_data_success_last = temp_rx_data;
|
||||
peer_stats->tx.tx_bytes_success_last = temp_tx_bytes;
|
||||
peer_stats->tx.tx_data_success_last = temp_tx_data;
|
||||
peer_stats->tx.tx_data_ucast_last = temp_tx_ucast_pkts;
|
||||
|
||||
if (peer_stats->tx.tx_data_ucast_rate)
|
||||
peer_stats->tx.last_per = ((peer_stats->tx.tx_data_ucast_last -
|
||||
peer_stats->tx.tx_data_success_last) * 100) /
|
||||
peer_stats->tx.tx_data_ucast_last;
|
||||
}
|
||||
|
||||
qdf_export_symbol(dp_cal_client_update_peer_stats);
|
||||
|
Verwijs in nieuw issue
Block a user