Quellcode durchsuchen

qcacmn: Fix init failure and DP detach crash

Skip free of nbuf with physical address less than 0x50000000. This will
ensure that same buffer is not getting allocated again resulting longer
DP init time and affecting WMI init sequence. And use correct pointer
in pdev detach function.

Change-Id: Iaab70c92adef741d5f20115cba164bcd7718886b
CRs-Fixed: 2013500
Kiran Venkatappa vor 8 Jahren
Ursprung
Commit
5dba3a3f9a
2 geänderte Dateien mit 8 neuen und 3 gelöschten Zeilen
  1. 2 2
      dp/wifi3.0/dp_main.c
  2. 6 1
      dp/wifi3.0/dp_rx.h

+ 2 - 2
dp/wifi3.0/dp_main.c

@@ -1150,7 +1150,6 @@ static inline void dp_reo_desc_freelist_destroy(struct dp_soc *soc)
 static void dp_soc_detach_wifi3(void *txrx_soc)
 {
 	struct dp_soc *soc = (struct dp_soc *)txrx_soc;
-	struct dp_pdev *pdev = qdf_mem_malloc(sizeof(*pdev));
 	int i;
 
 	soc->cmn_init_done = 0;
@@ -1159,7 +1158,8 @@ static void dp_soc_detach_wifi3(void *txrx_soc)
 
 	for (i = 0; i < MAX_PDEV_CNT; i++) {
 		if (soc->pdev_list[i])
-			dp_pdev_detach_wifi3((struct cdp_pdev *)pdev, 1);
+			dp_pdev_detach_wifi3(
+				(struct cdp_pdev *)soc->pdev_list[i], 1);
 	}
 
 	dp_peer_find_detach(soc);

+ 6 - 1
dp/wifi3.0/dp_rx.h

@@ -255,7 +255,12 @@ static inline int check_x86_paddr(struct dp_soc *dp_soc, qdf_nbuf_t *rx_netbuf,
 			if ((*rx_netbuf)) {
 				qdf_nbuf_unmap_single(dp_soc->osdev, *rx_netbuf,
 							QDF_DMA_BIDIRECTIONAL);
-				qdf_nbuf_free(*rx_netbuf);
+				/* Not freeing buffer intentionally.
+				 * Observed that same buffer is getting
+				 * re-allocated resulting in longer load time
+				 * WMI init timeout.
+				 * This buffer is anyway not useful so skip it.
+				 **/
 			}
 
 			*rx_netbuf = qdf_nbuf_alloc(pdev->osif_pdev,