Browse Source

qcacld-3.0: Reset per vdev roam trigger config upon disconnect

Roam trigger bitmap is configured to enable few specific
triggers when SETNCHOMODE command is issued. But if disconnect
happens without NCHO disable, then the roam_trigger_bitmap
per vdev doesn't reflect the ini configuration. This causes
some roam triggers not getting triggered.

Reset per vdev roam trigger configuration.

Change-Id: I3dc008a58a2a20c4f0820fe43aa4b6406ba8dd2a
CRs-Fixed: 3300488
Pragaspathi Thilagaraj 2 years ago
parent
commit
da70e5bcee

+ 15 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -5112,6 +5112,7 @@ void cm_roam_restore_default_config(struct wlan_objmgr_pdev *pdev,
 	struct cm_roam_values_copy src_config = {};
 	struct wlan_objmgr_psoc *psoc;
 	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+	uint32_t roam_trigger_bitmap;
 
 	psoc = wlan_pdev_get_psoc(pdev);
 	if (!psoc)
@@ -5122,6 +5123,20 @@ void cm_roam_restore_default_config(struct wlan_objmgr_pdev *pdev,
 		return;
 
 	if (mlme_obj->cfg.lfr.roam_scan_offload_enabled) {
+		/*
+		 * When vendor handoff is enabled and disconnection is received,
+		 * then restore the roam trigger bitmap from the ini
+		 * configuration
+		 */
+		wlan_cm_roam_cfg_get_value(psoc, vdev_id, ROAM_CONFIG_ENABLE,
+					   &src_config);
+		if (src_config.bool_value) {
+			roam_trigger_bitmap =
+					wlan_mlme_get_roaming_triggers(psoc);
+			mlme_set_roam_trigger_bitmap(psoc, vdev_id,
+						     roam_trigger_bitmap);
+		}
+
 		src_config.bool_value = 0;
 		wlan_cm_roam_cfg_set_value(psoc, vdev_id, ROAM_CONFIG_ENABLE,
 					   &src_config);

+ 3 - 0
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -805,6 +805,9 @@ QDF_STATUS wlan_cm_roam_cfg_get_value(struct wlan_objmgr_psoc *psoc,
 	case HI_RSSI_SCAN_RSSI_DELTA:
 		dst_config->uint_value = src_cfg->hi_rssi_scan_rssi_delta;
 		break;
+	case ROAM_CONFIG_ENABLE:
+		dst_config->bool_value = rso_cfg->roam_control_enable;
+		break;
 	default:
 		mlme_err("Invalid roam config requested:%d", roam_cfg_type);
 		status = QDF_STATUS_E_FAILURE;