Просмотр исходного кода

qcacld-3.0: Mark target not ready in hif disable path

Currently, the target-not-ready flag is only ever cleared in the event
of a firmware down notification from the platform driver. However, we
know that the target is not ready after a certain point in the hif
disable path. Additionally, the hif enable path does not clear this flag
during error handling. Address these issues.

Change-Id: I02555940dfba35874768aa453a24121a101354e5
CRs-Fixed: 2339361
Dustin Brown 6 лет назад
Родитель
Сommit
c2a156e17b
2 измененных файлов с 6 добавлено и 2 удалено
  1. 5 1
      core/hdd/src/wlan_hdd_driver_ops.c
  2. 1 1
      core/hdd/src/wlan_hdd_main.c

+ 5 - 1
core/hdd/src/wlan_hdd_driver_ops.c

@@ -255,7 +255,7 @@ int hdd_hif_open(struct device *dev, void *bdev, const struct hif_bus_id *bid,
 			hdd_err("NAPI creation error, rc: 0x%x, reinit: %d",
 				ret, reinit);
 			ret = -EFAULT;
-			goto err_hif_close;
+			goto mark_target_not_ready;
 		} else {
 			hdd_napi_event(NAPI_EVT_INI_FILE,
 				(void *)hdd_ctx->napi_enable);
@@ -271,6 +271,9 @@ int hdd_hif_open(struct device *dev, void *bdev, const struct hif_bus_id *bid,
 					CFG_DP_CE_SERVICE_MAX_RX_IND_FLUSH));
 	return 0;
 
+mark_target_not_ready:
+	cds_set_target_ready(false);
+
 err_hif_close:
 	hdd_deinit_cds_hif_context();
 	hif_close(hif_ctx);
@@ -287,6 +290,7 @@ void hdd_hif_close(struct hdd_context *hdd_ctx, void *hif_ctx)
 	if (hif_ctx == NULL)
 		return;
 
+	cds_set_target_ready(false);
 	hif_disable(hif_ctx, HIF_DISABLE_TYPE_REMOVE);
 
 	hdd_napi_destroy(true);

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -11077,7 +11077,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 
 	ol_cds_free();
 
-	if (IS_IDLE_STOP && cds_is_target_ready()) {
+	if (IS_IDLE_STOP) {
 		ret = pld_power_off(qdf_ctx->dev);
 		if (ret)
 			hdd_err("Failed to power down device; errno:%d", ret);