mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
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:
parent
2a2b7fecb0
commit
3c60631d7c
3 changed files with 11 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -258,6 +258,8 @@ struct cdp_tx_stats {
|
|||
uint32_t tx_data_success_last;
|
||||
uint32_t tx_byte_rate;
|
||||
uint32_t tx_data_rate;
|
||||
uint32_t tx_data_ucast_last;
|
||||
uint32_t tx_data_ucast_rate;
|
||||
struct cdp_pkt_type pkt_type[DOT11_MAX];
|
||||
uint32_t sgi_count[MAX_GI];
|
||||
|
||||
|
|
|
|||
|
|
@ -195,11 +195,6 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
|
|||
|
||||
dp_peer_stats_notify(peer);
|
||||
|
||||
if (peer->stats.tx.ucast.num)
|
||||
peer->stats.tx.last_per = ((peer->stats.tx.ucast.num -
|
||||
peer->stats.tx.tx_success.num) * 100) /
|
||||
peer->stats.tx.ucast.num;
|
||||
|
||||
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
|
||||
dp_wdi_event_handler(WDI_EVENT_UPDATE_DP_STATS, pdev->soc,
|
||||
&peer->stats, ppdu->peer_id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue