Parcourir la source

qcacld-3.0: Treat ROAM enable and RSO enable as different

Host driver sends ROAM enable to firmware by setting the
vdev param WMI_VDEV_PARAM_ROAM_FW_OFFLOAD and the internal
state is moved from WLAN_ROAM_DEINIT to WLAN_ROAM_INIT.
Then host driver can send ROAM SCAN OFFLOAD enable and firmware
honors it. Firmware drops the RSO enable command if ROAM enable
vdev param is not sent. Host tracks RSO enable through the states
WLAN_ROAM_RSO_ENABLED/WLAN_ROAMING_IN_PROG/
WLAN_ROAM_SYNCH_IN_PROG/WLAN_MLO_ROAM_SYNCH_IN_PROG.

Have different APIs to track ROAM enable and RSO enable which can
help to cleanup the corresponding params/states.

It's observed that ROAM enable/disable vdev param is not sent
to firmware properly when RSO is stopped in some other path
than disconnect (e.g. SAP concurrency, fast_roaming_disable
through wpa_supplicant). Check if the roam state is INIT and
send ROAM DISABLE to firmware while disconnect.


Change-Id: I1074c8f93e21f02086dfbcfae61fa6deb91c7d9d
CRs-Fixed: 3305563
Srinivas Dasari il y a 2 ans
Parent
commit
8a48ce4c7c

+ 26 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h

@@ -1671,8 +1671,34 @@ bool wlan_cm_same_band_sta_allowed(struct wlan_objmgr_psoc *psoc);
  */
 QDF_STATUS cm_cleanup_mlo_link(struct wlan_objmgr_vdev *vdev);
 
+/**
+ * wlan_is_roaming_enabled() - Check if Roaming is enabled
+ *
+ * @pdev: pointer to pdev object
+ * @vdev_id : Vdev id
+ *
+ * Check if the ROAM enable vdev param (WMI_VDEV_PARAM_ROAM_FW_OFFLOAD)
+ * is sent to firmware or not.
+ *
+ * Return: True if RSO state is not DEINIT, which indicates that vdev param
+ * WMI_VDEV_PARAM_ROAM_FW_OFFLOAD is sent to firmware.
+ */
 bool wlan_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
 
+/**
+ * wlan_is_rso_enabled() - Check if RSO state is enabled
+ *
+ * @pdev: pointer to pdev object
+ * @vdev_id : Vdev id
+ *
+ * Check if the ROAM SCAN OFFLOAD enable is sent to firmware. Host driver tracks
+ * this through RSO state machine and the states can be WLAN_ROAM_RSO_ENABLED/
+ * WLAN_ROAMING_IN_PROG/WLAN_ROAM_SYNCH_IN_PROG/WLAN_MLO_ROAM_SYNCH_IN_PROG.
+ *
+ * Return: True if RSO state is any of the above mentioned states.
+ */
+bool wlan_is_rso_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
+
 /**
  * wlan_cm_set_sae_auth_ta() - Set SAE auth tx address
  * @vdev_id : Vdev id

+ 4 - 6
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h

@@ -43,15 +43,13 @@ ucfg_user_space_enable_disable_rso(struct wlan_objmgr_pdev *pdev,
 				   const bool is_fast_roam_enabled);
 
 /**
- * ucfg_is_roaming_enabled() - Check if roaming enabled
- * to firmware.
- * @psoc: psoc context
+ * ucfg_is_rso_enabled() - Check if rso is enabled
+ * @pdev: Pointer to pdev
  * @vdev_id: vdev id
  *
- * Return: True if Roam state machine is in
- *	   WLAN_ROAM_RSO_ENABLED/WLAN_ROAMING_IN_PROG/WLAN_ROAM_SYNCH_IN_PROG
+ * Return: Wrapper for wlan_is_rso_enabled.
  */
-bool ucfg_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
+bool ucfg_is_rso_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
 
 /*
  * ucfg_cm_abort_roam_scan() -abort current roam scan cycle by roam scan

+ 13 - 2
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -3667,7 +3667,7 @@ cm_cleanup_mlo_link(struct wlan_objmgr_vdev *vdev)
 	return status;
 }
 
-bool wlan_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
+bool wlan_is_rso_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 {
 	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
 	enum roam_offload_state cur_state;
@@ -3675,12 +3675,23 @@ bool wlan_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 	cur_state = mlme_get_roam_state(psoc, vdev_id);
 	if (cur_state == WLAN_ROAM_RSO_ENABLED ||
 	    cur_state == WLAN_ROAMING_IN_PROG ||
-	    cur_state == WLAN_ROAM_SYNCH_IN_PROG)
+	    cur_state == WLAN_ROAM_SYNCH_IN_PROG ||
+	    cur_state == WLAN_MLO_ROAM_SYNCH_IN_PROG)
 		return true;
 
 	return false;
 }
 
+bool wlan_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
+{
+	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
+
+	if (mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAM_DEINIT)
+		return false;
+
+	return true;
+}
+
 QDF_STATUS
 wlan_cm_set_sae_auth_ta(struct wlan_objmgr_pdev *pdev,
 			uint8_t vdev_id,

+ 2 - 2
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c

@@ -26,9 +26,9 @@
 #include "../../core/src/wlan_cm_roam_offload.h"
 #include "wlan_reg_ucfg_api.h"
 
-bool ucfg_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
+bool ucfg_is_rso_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 {
-	return wlan_is_roaming_enabled(pdev, vdev_id);
+	return wlan_is_rso_enabled(pdev, vdev_id);
 }
 
 QDF_STATUS

+ 1 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -15681,8 +15681,7 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy,
 	 * Get current roaming state and decide whether to wait for RSO_STOP
 	 * response or not.
 	 */
-	roaming_enabled = ucfg_is_roaming_enabled(hdd_ctx->pdev,
-						  adapter->vdev_id);
+	roaming_enabled = ucfg_is_rso_enabled(hdd_ctx->pdev, adapter->vdev_id);
 
 	/* Update roaming */
 	qdf_status = ucfg_user_space_enable_disable_rso(hdd_ctx->pdev,