diff options
| author | Sravan Kumar Kairam <sgoud@codeaurora.org> | 2018-12-20 15:39:56 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-12-24 05:26:54 -0800 |
| commit | ce9d2d41aec96270ff5036835cb71d28d0a5475b (patch) | |
| tree | ef61769838f81f3e356e076e637cc953f14423f1 | |
| parent | ba93865c8917afff4f609b8cc7c6ffac44a53182 (diff) | |
qcacld-3.0: Fix sap adapter net dev rx stats
Currently ipa tx and rx stats are always updated to the last
adapter. If the last adapter is not SAP then rx stats are not
updated to SAP net dev stats. Fix by correctly updating the
ipa stats to adapter whose device mode is SAP only.
Change-Id: I3ac1970f4e5199f2f4e72dcea66016281e34b6a4
CRs-Fixed: 2368746
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 36777e9e7bb5..3c989d4f9ffb 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7416,6 +7416,7 @@ static void hdd_bus_bw_compute_cbk(void *priv) { hdd_context_t *hdd_ctx = (hdd_context_t *)priv; hdd_adapter_t *adapter = NULL; + hdd_adapter_t *sap_adapter = NULL; uint64_t tx_packets = 0, rx_packets = 0; uint64_t fwd_tx_packets = 0, fwd_rx_packets = 0; uint64_t fwd_tx_packets_diff = 0, fwd_rx_packets_diff = 0; @@ -7459,6 +7460,9 @@ static void hdd_bus_bw_compute_cbk(void *priv) continue; } + if (adapter->device_mode == QDF_SAP_MODE) + sap_adapter = adapter; + tx_packets += HDD_BW_GET_DIFF(adapter->stats.tx_packets, adapter->prev_tx_packets); rx_packets += HDD_BW_GET_DIFF(adapter->stats.rx_packets, @@ -7508,8 +7512,10 @@ static void hdd_bus_bw_compute_cbk(void *priv) tx_packets += (uint64_t)ipa_tx_packets; rx_packets += (uint64_t)ipa_rx_packets; - adapter->stats.tx_packets += ipa_tx_packets; - adapter->stats.rx_packets += ipa_rx_packets; + if (sap_adapter) { + sap_adapter->stats.tx_packets += ipa_tx_packets; + sap_adapter->stats.rx_packets += ipa_rx_packets; + } hdd_ipa_set_perf_level(hdd_ctx, tx_packets, rx_packets); hdd_ipa_uc_stat_request(hdd_ctx, 2); |
