qcacld-3.0: Calculate HDD TX stats correctly for TSO packets
Currently the number of TX packets sent is simply calculated by the
number of times hard_xmit_function is called. We use the number of TX
(and Rx) packets in a 100ms interval, to tweak the system for high
bandwidth scenarios.
For, TSO jumbo packets, in high throughput scenarios, the number of TX
packets received in 100ms interval remains low because of aggregation.
This causes the driver to incorrectly detect the throughput mode(low).
Calculate total TX packet (in 100 ms interval) based on the size of the TSO
jumbo packet. This will allow the driver to trigger high throughput mode
and tweak system parameters correctly.
Change-Id: I3c7a3c3992b41d3a00ff903e6317a62394c1c0fe
CRs-Fixed: 2002971
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index d4aff03..7c6c18f 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -374,7 +374,12 @@
#endif
pAdapter->stats.tx_bytes += skb->len;
- ++pAdapter->stats.tx_packets;
+
+ if (qdf_nbuf_is_tso(skb))
+ pAdapter->stats.tx_packets += qdf_nbuf_get_tso_num_seg(skb);
+ else {
+ ++pAdapter->stats.tx_packets;
+ }
hdd_event_eapol_log(skb, QDF_TX);
qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_TX);