소스 검색

qcacld-3.0: Set NAPI event after hif layer is initialized

hdd_napi_event requires hif_ctx, after dynamic mode feature hif_ctx
is getting created later as part of hdd_start_modules. HIF ctx is being
created/destroyed depending on the interface up/down from the upper
layer, hence set NAPI event after hif layer is initialized.

Change-Id: I9fb21f6f75cc689620a6befd997956610e2ca3ae
CRs-fixed: 1055660
Govind Singh 8 년 전
부모
커밋
068c4b0fc3
2개의 변경된 파일9개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 5
      core/hdd/src/wlan_hdd_cfg.c
  2. 9 0
      core/hdd/src/wlan_hdd_driver_ops.c

+ 0 - 5
core/hdd/src/wlan_hdd_cfg.c

@@ -5970,11 +5970,6 @@ QDF_STATUS hdd_parse_config_ini(hdd_context_t *pHddCtx)
 	/* Loop through the registry table and apply all these configs */
 	qdf_status = hdd_apply_cfg_ini(pHddCtx, cfgIniTable, i);
 	hdd_set_rx_mode_value(pHddCtx);
-#ifdef FEATURE_NAPI
-	if (QDF_STATUS_SUCCESS == qdf_status)
-		hdd_napi_event(NAPI_EVT_INI_FILE,
-			       (void *)pHddCtx->napi_enable);
-#endif /* FEATURE_NAPI */
 	if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())
 		hdd_override_all_ps(pHddCtx);
 

+ 9 - 0
core/hdd/src/wlan_hdd_driver_ops.c

@@ -219,6 +219,12 @@ int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid,
 	qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 	struct hif_driver_state_callbacks cbk;
 	uint32_t mode = cds_get_conparam();
+	hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+
+	if (!hdd_ctx) {
+		hdd_err("hdd_ctx error");
+		return -EFAULT;
+	}
 
 	hdd_hif_init_driver_state_callbacks(dev, &cbk);
 
@@ -252,6 +258,9 @@ int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid,
 				ret, reinit);
 			ret = -EFAULT;
 			goto err_hif_close;
+		} else {
+			hdd_napi_event(NAPI_EVT_INI_FILE,
+				(void *)hdd_ctx->napi_enable);
 		}
 	}