Kaynağa Gözat

qcacld-3.0: Move hdd_override_all_ps() to after psoc create

hdd_override_all_ps() has been changed to override ini setting by
calling ucfg_mlme_override_bmps_imps(), which need a valid psoc, so move
it after hdd_objmgr_create_and_store_psoc(). Looks put it in
hdd_override_ini_config() is a good choice.

Change-Id: Ia902a5a94ae2e06f984473fc69628c114f35b052
CRs-Fixed: 2381140
Will Huang 6 yıl önce
ebeveyn
işleme
14b120fdc4

+ 16 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -1156,4 +1156,20 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss);
  * Return: true on success, else false
  */
 bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx);
+
+/**
+ * hdd_override_all_ps() - overrides to disables all the powersave features.
+ * @hdd_ctx: Pointer to HDD context.
+ * Overrides below powersave ini configurations.
+ * gEnableImps=0
+ * gEnableBmps=0
+ * gRuntimePM=0
+ * gWlanAutoShutdown = 0
+ * gEnableSuspend=0
+ * gEnablePowerSaveOffload=0
+ * gEnableWoW=0
+ *
+ * Return: None
+ */
+void hdd_override_all_ps(struct hdd_context *hdd_ctx);
 #endif

+ 1 - 17
core/hdd/src/wlan_hdd_cfg.c

@@ -1183,21 +1183,7 @@ static void hdd_disable_auto_shutdown(struct hdd_config *cfg_ini)
 }
 #endif
 
-/**
- * hdd_override_all_ps() - overrides to disables all the powersave features.
- * @hdd_ctx: Pointer to HDD context.
- * Overrides below powersave ini configurations.
- * gEnableImps=0
- * gEnableBmps=0
- * gRuntimePM=0
- * gWlanAutoShutdown = 0
- * gEnableSuspend=0
- * gEnablePowerSaveOffload=0
- * gEnableWoW=0
- *
- * Return: None
- */
-static void hdd_override_all_ps(struct hdd_context *hdd_ctx)
+void hdd_override_all_ps(struct hdd_context *hdd_ctx)
 {
 	struct hdd_config *cfg_ini = hdd_ctx->config;
 
@@ -1316,8 +1302,6 @@ QDF_STATUS hdd_parse_config_ini(struct hdd_context *hdd_ctx)
 
 	/* Loop through the registry table and apply all these configs */
 	qdf_status = hdd_apply_cfg_ini(hdd_ctx, cfg_ini_table, i);
-	if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())
-		hdd_override_all_ps(hdd_ctx);
 
 config_exit:
 	release_firmware(fw);

+ 3 - 0
core/hdd/src/wlan_hdd_main.c

@@ -9115,6 +9115,9 @@ static void hdd_override_ini_config(struct hdd_context *hdd_ctx)
 		hdd_ctx->config->action_oui_enable = 0;
 		hdd_err("Ignore action oui ini, since no action_oui component");
 	}
+
+	if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())
+		hdd_override_all_ps(hdd_ctx);
 }
 
 #ifdef ENABLE_MTRACE_LOG