Browse Source

qcacld-3.0: Add connection roaming ini support

Add get/set support for connection roaming ini file

Change-Id: I09d6ebf86c5374fabb82f79d0a2cd8758e454e4b
CRs-Fixed: 3038459
Jyoti Kumari 3 years ago
parent
commit
714d3f7eb1

+ 3 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -2594,6 +2594,8 @@ struct wlan_mlme_iot {
  * @trig_min_rssi: Expected minimum RSSI value of candidate AP for
  * various roam triggers
  * @iot: IOT related CFG items
+ * @connection_roaming_ini_flag: To indicate whether connection_roaming related
+ * ini file is present or not.
  */
 struct wlan_mlme_cfg {
 	struct wlan_mlme_chainmask chainmask_cfg;
@@ -2642,6 +2644,7 @@ struct wlan_mlme_cfg {
 	struct roam_trigger_min_rssi trig_min_rssi[NUM_OF_ROAM_MIN_RSSI];
 	struct wlan_mlme_ratemask ratemask_cfg;
 	struct wlan_mlme_iot iot;
+	bool connection_roaming_ini_flag;
 };
 
 enum pkt_origin {

+ 40 - 0
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -4580,4 +4580,44 @@ ucfg_mlme_get_vdev_max_mcs_idx(struct wlan_objmgr_vdev *vdev)
 	return mlme_get_vdev_max_mcs_idx(vdev);
 }
 #endif /* WLAN_FEATURE_SON */
+
+#ifdef CONNECTION_ROAMING_CFG
+/**
+ * ucfg_mlme_set_connection_roaming_ini_present() - Set connection roaming ini
+ * present
+ * @psoc: pointer to psoc object
+ * @value:  Value to be set
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS
+ucfg_mlme_set_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
+					     bool value);
+
+/**
+ * ucfg_mlme_get_connection_roaming_ini_present() - Get connection roaming ini
+ * present
+ * @psoc: pointer to psoc object
+ * @value:  Value to be get
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS
+ucfg_mlme_get_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
+					     bool *value);
+#else
+static inline QDF_STATUS
+ucfg_mlme_set_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
+					     bool value)
+{
+	return QDF_STATUS_E_NOSUPPORT;
+}
+
+static inline QDF_STATUS
+ucfg_mlme_get_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
+					     bool *value)
+{
+	return QDF_STATUS_E_NOSUPPORT;
+}
+#endif /* CONNECTION_ROAMING_CFG */
 #endif /* _WLAN_MLME_UCFG_API_H_ */

+ 33 - 0
components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -1725,3 +1725,36 @@ bool ucfg_mlme_get_coex_unsafe_chan_reg_disable(
 	return mlme_obj->cfg.reg.coex_unsafe_chan_reg_disable;
 }
 #endif
+
+#ifdef CONNECTION_ROAMING_CFG
+QDF_STATUS
+ucfg_mlme_set_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
+					     bool value)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+	if (!mlme_obj)
+		return QDF_STATUS_E_INVAL;
+
+	mlme_obj->cfg.connection_roaming_ini_flag = value;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+ucfg_mlme_get_connection_roaming_ini_present(struct wlan_objmgr_psoc *psoc,
+					     bool *value)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+
+	if (!mlme_obj)
+		return QDF_STATUS_E_INVAL;
+
+	*value = mlme_obj->cfg.connection_roaming_ini_flag;
+
+	return QDF_STATUS_SUCCESS;
+}
+#endif

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

@@ -13409,7 +13409,7 @@ static QDF_STATUS hdd_cfg_parse_connection_roaming_cfg(void)
 #else
 static inline QDF_STATUS hdd_cfg_parse_connection_roaming_cfg(void)
 {
-	return QDF_STATUS_SUCCESS;
+	return QDF_STATUS_E_NOSUPPORT;
 }
 #endif
 
@@ -13462,6 +13462,10 @@ struct hdd_context *hdd_context_create(struct device *dev)
 		goto err_release_store;
 	}
 
+	if (QDF_IS_STATUS_SUCCESS(status))
+		ucfg_mlme_set_connection_roaming_ini_present(hdd_ctx->psoc,
+							     true);
+
 	hdd_cfg_params_init(hdd_ctx);
 
 	/* apply multiplier config, if not already set via module parameter */