Răsfoiți Sursa

qcacld-3.0: Restore all control config params upon CLEAR_ALL

User might modify the roam control config params through
multiple commands as part of roam control config enable.
Currently, only the params which are modified as part of
SUBCMD_CONTROL_SET command are restored. Restore all of the roam
control config params from the default ini values when the
control config is disabled i.e when the CLEAR_ALL is received.

Change-Id: I59ebc2e3018b01889ffb2bcd19b72d6d20fd0517
CRs-Fixed: 2517854
Srinivas Dasari 5 ani în urmă
părinte
comite
a4e5639017
2 a modificat fișierele cu 24 adăugiri și 0 ștergeri
  1. 13 0
      mlme/core/inc/wlan_mlme_main.h
  2. 11 0
      mlme/core/src/wlan_mlme_main.c

+ 13 - 0
mlme/core/inc/wlan_mlme_main.h

@@ -512,4 +512,17 @@ mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 #define MLME_IS_ROAM_INITIALIZED(psoc, vdev_id) \
 	(mlme_get_roam_state(psoc, vdev_id) >= ROAM_INIT)
 #endif
+
+/**
+ * mlme_reinit_control_config_lfr_params() - Reinitialize roam control config
+ * @psoc: PSOC pointer
+ * @lfr: Pointer of an lfr_cfg buffer to fill.
+ *
+ * Reinitialize/restore the param related control roam config lfr params with
+ * default values of corresponding ini params.
+ *
+ * Return: None
+ */
+void mlme_reinit_control_config_lfr_params(struct wlan_objmgr_psoc *psoc,
+					   struct wlan_mlme_lfr_cfg *lfr);
 #endif

+ 11 - 0
mlme/core/src/wlan_mlme_main.c

@@ -1503,6 +1503,17 @@ mlme_init_bss_load_trigger_params(struct wlan_objmgr_psoc *psoc,
 			cfg_get(psoc, CFG_BSS_LOAD_TRIG_2G_RSSI_THRES);
 }
 
+void mlme_reinit_control_config_lfr_params(struct wlan_objmgr_psoc *psoc,
+					   struct wlan_mlme_lfr_cfg *lfr)
+{
+	/* Restore the params set through SETDFSSCANMODE */
+	lfr->roaming_dfs_channel =
+		cfg_get(psoc, CFG_LFR_ROAMING_DFS_CHANNEL);
+
+	/* Restore the params set through SETWESMODE */
+	lfr->wes_mode_enabled = cfg_get(psoc, CFG_LFR_ENABLE_WES_MODE);
+}
+
 static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
 			      struct wlan_mlme_lfr_cfg *lfr)
 {