From 869169a4a236de1fc29afef567c1d2bb107bb83a Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Tue, 1 Dec 2015 16:16:36 +0530 Subject: [PATCH] qcacld-3.0: cleanup tx-queue during SSR qcacld-2.0 to qcacld-3.0 propagation During SSR, Host is sending packets to firmware before WMI_READY_EVENT. Fix is to avoid sending tx when logp_in_progress & clean ll-queue packets in shutdown. Change-Id: Ib6b9f4d51f2aa7f85d384831818b45763c702c88 CRs-Fixed: 834887 --- core/hdd/src/wlan_hdd_tx_rx.c | 8 ++++++++ core/wma/src/wma_main.c | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 3ea2d855ed..0f6c3b9c13 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -338,6 +338,14 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) #endif ++pAdapter->hdd_stats.hddTxRxStats.txXmitCalled; + if (cds_is_logp_in_progress()) { + CDF_TRACE(CDF_MODULE_ID_HDD_DATA, CDF_TRACE_LEVEL_WARN, + "LOPG in progress, dropping the packet"); + ++pAdapter->stats.tx_dropped; + ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped; + kfree_skb(skb); + return NETDEV_TX_OK; + } if (WLAN_HDD_IBSS == pAdapter->device_mode) { struct cdf_mac_addr *pDestMacAddress = diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index f37d14f34d..2fc74131c6 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -2769,7 +2769,7 @@ CDF_STATUS wma_stop(void *cds_ctx, uint8_t reason) { tp_wma_handle wma_handle; CDF_STATUS cdf_status = CDF_STATUS_SUCCESS; - + int i; wma_handle = cds_get_context(CDF_MODULE_ID_WMA); WMA_LOGD("%s: Enter", __func__); @@ -2816,6 +2816,13 @@ CDF_STATUS wma_stop(void *cds_ctx, uint8_t reason) #endif /* HIF_USB */ } + /* clean up ll-queue for all vdev */ + for (i = 0; i < wma_handle->max_bssid; i++) { + if (wma_handle->interfaces[i].handle && + wma_handle->interfaces[i].vdev_up) { + ol_txrx_vdev_flush(wma_handle->interfaces[i].handle); + } + } cdf_status = wma_tx_detach(wma_handle); if (cdf_status != CDF_STATUS_SUCCESS) { WMA_LOGP("%s: Failed to deregister tx management", __func__);