Prechádzať zdrojové kódy

qcacmn: Fix pool alloc issue in detach path

Memory is freed and allocated only during
wifi load and unload in case of WIN and not
during wifi up/down

Calling dp_tx_soc_detach unconditionally
was leading to memory free in wifi down
path and when wifi up was issued the
memory which was freed was never allocated

Call dp_tx_soc_detach conditonaly only for
MCL in dp_soc_cmn_cleanup and for WIN in
dp_soc_detach using dp_soc_reinit flag which 
is set for WIN during wifi unload

Change-Id: I9da34f7945d65a34e719c7db58da13e85ae3d228
phadiman 5 rokov pred
rodič
commit
a73cc69157
1 zmenil súbory, kde vykonal 7 pridanie a 1 odobranie
  1. 7 1
      dp/wifi3.0/dp_main.c

+ 7 - 1
dp/wifi3.0/dp_main.c

@@ -3055,7 +3055,9 @@ fail1:
  */
 static void dp_soc_cmn_cleanup(struct dp_soc *soc)
 {
-	dp_tx_soc_detach(soc);
+	if (!dp_is_soc_reinit(soc)) {
+		dp_tx_soc_detach(soc);
+	}
 
 	qdf_spinlock_destroy(&soc->rx.defrag.defrag_lock);
 
@@ -4243,6 +4245,10 @@ static void dp_soc_detach(void *txrx_soc)
 	qdf_minidump_remove(soc->wbm_desc_rel_ring.base_vaddr_unaligned);
 	dp_srng_cleanup(soc, &soc->wbm_desc_rel_ring, SW2WBM_RELEASE, 0);
 
+	if (dp_is_soc_reinit(soc)) {
+		dp_tx_soc_detach(soc);
+	}
+
 	/* Tx data rings */
 	if (!wlan_cfg_per_pdev_tx_ring(soc->wlan_cfg_ctx)) {
 		for (i = 0; i < soc->num_tcl_data_rings; i++) {