From c1dc5c788c81dc8e1df126f9e0f6cb07391fe344 Mon Sep 17 00:00:00 2001 From: Jinwei Chen Date: Mon, 26 Aug 2019 16:24:46 +0800 Subject: [PATCH] qcacld-3.0: check napi_gro_recevie result before do gro flush Check napi_gro_recevie result before do napi_gro_flush when bus bandwidth is idle (<18 Mbps), only if napi_gro_recevie result is not GRO_DROP and GRO_NORMAL then do napi_gro_flush for each RX packet. Change-Id: I8cd75fb680ad4cb13f8d8677136f51c5a0548b6d CRs-Fixed: 2515794 --- core/hdd/src/wlan_hdd_tx_rx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index cfc9e43cb5..1844277e98 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1554,8 +1554,11 @@ static QDF_STATUS hdd_gro_rx_bh_disable(struct hdd_adapter *adapter, gro_res = napi_gro_receive(napi_to_use, skb); if (hdd_get_current_throughput_level(hdd_ctx) == PLD_BUS_WIDTH_IDLE) { - adapter->hdd_stats.tx_rx_stats.rx_gro_low_tput_flush++; - napi_gro_flush(napi_to_use, false); + if (gro_res != GRO_DROP && gro_res != GRO_NORMAL) { + adapter->hdd_stats.tx_rx_stats. + rx_gro_low_tput_flush++; + napi_gro_flush(napi_to_use, false); + } } local_bh_enable();