Browse Source

qcacld-3.0: fix softlock-up caused by co-existence of NAPI and rx-thread.

If rxthread is on, NAPI will call the kernel-thread context API (instead
of softirq context) API to transfer the packet to the stack.

Eventually, this part will be re-considered when multi-queue NAPI gets
in, which will eliminate the rx-thread.

Change-Id: Ib3d4d1450fb36f5c1e710802ceaab5d015e20c7d
CRs-Fixed: 957299
Orhan K AKYILDIZ 9 years ago
parent
commit
d6c020bb96
2 changed files with 5 additions and 4 deletions
  1. 2 2
      core/hdd/src/wlan_hdd_softap_tx_rx.c
  2. 3 2
      core/hdd/src/wlan_hdd_tx_rx.c

+ 2 - 2
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -581,7 +581,7 @@ CDF_STATUS hdd_softap_rx_packet_cbk(void *cds_context,
 	 */
 	cdf_net_buf_debug_release_skb(rxBuf);
 
-	if (hdd_napi_enabled(HDD_NAPI_ANY))
+	if (hdd_napi_enabled(HDD_NAPI_ANY) && !pHddCtx->config->enableRxThread)
 		rxstat = netif_receive_skb(skb);
 	else
 		rxstat = netif_rx_ni(skb);

+ 3 - 2
core/hdd/src/wlan_hdd_tx_rx.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -744,7 +744,8 @@ CDF_STATUS hdd_rx_packet_cbk(void *cds_context, cdf_nbuf_t rxBuf, uint8_t staId)
 
 	if (HDD_LRO_NO_RX ==
 		 hdd_lro_rx(pHddCtx, pAdapter, skb)) {
-		if (hdd_napi_enabled(HDD_NAPI_ANY))
+		if (hdd_napi_enabled(HDD_NAPI_ANY) &&
+		    !pHddCtx->config->enableRxThread)
 			rxstat = netif_receive_skb(skb);
 		else
 			rxstat = netif_rx_ni(skb);