Răsfoiți Sursa

qcacld-3.0: Driver loading failure during monitor mode bring up

The API hdd_update_tgt_cfg decides whether to create a new PDEV
or use the existing one. In this case, the driver is
de-initialized/re-initialized followed by the cfg download. The
FW then generates SYS_READY and the control comes to this function.
Since there is no check for monitor mode the second PDEV is created.
FW seems to provide phy_id = 0 and expects the host to use the
corresponding pdev_id at various places during initialization.
Now here phy_id = 0 and pdev_id = 1, thus initializations fails.

To resolve this issue add a check for monitor mode in hdd_update_tgt_cfg
function and use the same pdev_id.

CRs-Fixed: 2087541
Change-Id: I9dd6449b1e81b6bb218d21c07ca0f5335067865d
Ashish Kumar Dhanotiya 7 ani în urmă
părinte
comite
fd758ecd2f
1 a modificat fișierele cu 8 adăugiri și 4 ștergeri
  1. 8 4
      core/hdd/src/wlan_hdd_main.c

+ 8 - 4
core/hdd/src/wlan_hdd_main.c

@@ -1519,9 +1519,11 @@ void hdd_update_tgt_cfg(void *context, void *param)
 	uint8_t antenna_mode;
 
 	/* Reuse same pdev for module start/stop or SSR */
-	if ((hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) ||
-	    !cds_is_driver_loading()) {
-		hdd_err("Reuse pdev for module start/stop or SSR");
+	if (((hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) ||
+		(hdd_get_conparam() == QDF_GLOBAL_MONITOR_MODE) ||
+	    !cds_is_driver_loading()) && (hdd_ctx->hdd_pdev != NULL)) {
+		hdd_debug("Reuse pdev for module start/stop or SSR pdev_id = %u",
+			hdd_ctx->hdd_pdev->pdev_objmgr.wlan_pdev_id);
 		/* Restore pdev to MAC/WMA contexts */
 		sme_store_pdev(hdd_ctx->hHal, hdd_ctx->hdd_pdev);
 	} else {
@@ -1529,7 +1531,9 @@ void hdd_update_tgt_cfg(void *context, void *param)
 		if (ret) {
 			hdd_err("pdev creation fails!");
 			QDF_BUG(0);
-		}
+		} else
+			hdd_debug("New pdev has been created with pdev_id = %u",
+				hdd_ctx->hdd_pdev->pdev_objmgr.wlan_pdev_id);
 	}
 
 	if (cds_cfg) {