Ver código fonte

qcacld-3.0: Move unused params of struct hdd_station_ctx to CM flag

Move unused params of struct hdd_station_ctx to CM flag.

Change-Id: Ibcdc47df23937e74ff6558955c9a179371c4d5ae
CRs-Fixed: 2953953
Utkarsh Bhatnagar 3 anos atrás
pai
commit
3a4fb68722

+ 9 - 14
core/hdd/inc/wlan_hdd_main.h

@@ -870,33 +870,26 @@ struct hdd_mon_set_ch_info {
 /**
  * struct hdd_station_ctx -- STA-specific information
  * @roam_profile: current roaming profile
- * @security_ie: WPA or RSN IE used by the @roam_profile
- * @assoc_additional_ie: association additional IE used by the @roam_profile
- * @wpa_versions: bitmap of supported WPA versions
- * @auth_key_mgmt: bitmap of supported auth key mgmt protocols
- * @requested_bssid: Specific BSSID to which to connect
  * @conn_info: current connection information
- * @roam_info: current roaming information
- * @ft_carrier_on: is carrier on
- * @hdd_reassoc_scenario: is station in the middle of reassociation?
- * @sta_debug_state: STA context debug variable
- * @broadcast_sta_id: STA ID assigned for broadcast frames
+ * @cache_conn_info: prev connection info
+ * @reg_phymode: reg phymode
  * @ch_info: monitor mode channel information
  * @ap_supports_immediate_power_save: Does the current AP allow our STA
  *    to immediately go into power save?
  */
 struct hdd_station_ctx {
-	struct csr_roam_profile roam_profile;
+#ifndef FEATURE_CM_ENABLE
 	uint8_t security_ie[WLAN_MAX_IE_LEN];
 	tSirAddie assoc_additional_ie;
 	enum nl80211_wpa_versions wpa_versions;
 	enum hdd_auth_key_mgmt auth_key_mgmt;
 	struct qdf_mac_addr requested_bssid;
+	bool ft_carrier_on;
+#endif
+	uint32_t reg_phymode;
+	struct csr_roam_profile roam_profile;
 	struct hdd_connection_info conn_info;
 	struct hdd_connection_info cache_conn_info;
-	bool ft_carrier_on;
-	bool hdd_reassoc_scenario;
-	int sta_debug_state;
 	struct hdd_mon_set_ch_info ch_info;
 	bool ap_supports_immediate_power_save;
 };
@@ -3997,6 +3990,7 @@ struct csr_roam_profile *hdd_roam_profile(struct hdd_adapter *adapter)
 	return &sta_ctx->roam_profile;
 }
 
+#ifndef FEATURE_CM_ENABLE
 /**
  * hdd_security_ie() - Get adapter's security IE
  * @adapter: The adapter being queried
@@ -4044,6 +4038,7 @@ tSirAddie *hdd_assoc_additional_ie(struct hdd_adapter *adapter)
 
 	return &sta_ctx->assoc_additional_ie;
 }
+#endif
 
 /**
  * hdd_is_roaming_in_progress() - check if roaming is in progress

+ 17 - 23
core/hdd/src/wlan_hdd_assoc.c

@@ -264,8 +264,6 @@ static void hdd_start_powersave_timer_on_associated(struct hdd_adapter *adapter)
 {
 	uint32_t timeout;
 	uint32_t auto_bmps_timer_val;
-	struct hdd_station_ctx *hddstactx =
-		WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
 	if (adapter->device_mode != QDF_STA_MODE &&
@@ -273,7 +271,7 @@ static void hdd_start_powersave_timer_on_associated(struct hdd_adapter *adapter)
 		return;
 	ucfg_mlme_get_auto_bmps_timer_value(hdd_ctx->psoc,
 					    &auto_bmps_timer_val);
-	timeout = hddstactx->hdd_reassoc_scenario ?
+	timeout = hdd_cm_is_vdev_roaming(adapter) ?
 		AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE :
 		(auto_bmps_timer_val * 1000);
 	sme_ps_enable_auto_ps_timer(hdd_ctx->mac_handle,
@@ -1627,15 +1625,17 @@ void hdd_conn_remove_connect_info(struct hdd_station_ctx *sta_ctx)
 
 void hdd_clear_roam_profile_ie(struct hdd_adapter *adapter)
 {
+#ifndef FEATURE_CM_ENABLE
 	struct hdd_station_ctx *sta_ctx;
 	struct csr_roam_profile *roam_profile;
+#endif
 
 	hdd_enter();
 
+#ifndef FEATURE_CM_ENABLE
 	/* clear WPA/RSN/WSC IE information in the profile */
 	roam_profile = hdd_roam_profile(adapter);
 
-#ifndef FEATURE_CM_ENABLE
 	roam_profile->nWPAReqIELength = 0;
 	roam_profile->pWPAReqIE = NULL;
 	roam_profile->nRSNReqIELength = 0;
@@ -1677,9 +1677,11 @@ void hdd_clear_roam_profile_ie(struct hdd_adapter *adapter)
 	adapter->wapi_info.wapi_mode = false;
 #endif
 
+#ifndef FEATURE_CM_ENABLE
 	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	sta_ctx->auth_key_mgmt = 0;
 	qdf_zero_macaddr(&sta_ctx->requested_bssid);
+#endif
 	hdd_exit();
 }
 
@@ -4121,9 +4123,7 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
 			hdd_dis_connect_handler(adapter, roam_info, roam_id,
 						roam_status, roam_result);
 		sta_ctx->ft_carrier_on = false;
-		sta_ctx->hdd_reassoc_scenario = false;
-		hdd_debug("hdd_reassoc_scenario set to: %d, ReAssoc Failed, session: %d",
-			  sta_ctx->hdd_reassoc_scenario, adapter->vdev_id);
+		hdd_debug("ReAssoc Failed, session: %d", adapter->vdev_id);
 		break;
 	case eCSR_ROAM_FT_START:
 		/*
@@ -4142,9 +4142,7 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
 				WLAN_STOP_ALL_NETIF_QUEUE,
 				WLAN_CONTROL_PATH);
 		sta_ctx->ft_carrier_on = true;
-		sta_ctx->hdd_reassoc_scenario = true;
-		hdd_debug("hdd_reassoc_scenario set to: %d, due to eCSR_ROAM_FT_START, session: %d",
-			  sta_ctx->hdd_reassoc_scenario, adapter->vdev_id);
+		hdd_debug("eCSR_ROAM_FT_START, session: %d", adapter->vdev_id);
 		break;
 	case eCSR_ROAM_NAPI_OFF:
 		hdd_debug("After Roam Synch Comp: NAPI Serialize OFF");
@@ -4212,12 +4210,6 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
 		} else {
 			wlan_hdd_ft_set_key_delay(hdd_ctx->mac_handle, adapter);
 		}
-		if (sta_ctx->ft_carrier_on) {
-			sta_ctx->hdd_reassoc_scenario = false;
-			hdd_debug("hdd_reassoc_scenario set to: %d session: %d",
-				  sta_ctx->hdd_reassoc_scenario,
-				  adapter->vdev_id);
-		}
 
 		qdf_ret_status =
 			hdd_association_completion_handler(adapter, roam_info,
@@ -4249,12 +4241,9 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
 			hdd_roam_set_key_complete_handler(adapter, roam_info,
 							  roam_id, roam_status,
 							  roam_result);
-		if (eCSR_ROAM_RESULT_AUTHENTICATED == roam_result) {
-			sta_ctx->hdd_reassoc_scenario = false;
-			hdd_debug("hdd_reassoc_scenario set to: %d, set key complete, session: %d",
-				  sta_ctx->hdd_reassoc_scenario,
+		if (eCSR_ROAM_RESULT_AUTHENTICATED == roam_result)
+			hdd_debug("set key complete, session: %d",
 				  adapter->vdev_id);
-		}
 	}
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 		if (roam_info)
@@ -5164,8 +5153,10 @@ static void hdd_initialize_fils_info(struct hdd_adapter *adapter)
 void hdd_roam_profile_init(struct hdd_adapter *adapter)
 {
 	struct csr_roam_profile *roam_profile;
+#ifndef FEATURE_CM_ENABLE
 	uint8_t *security_ie;
 	tSirAddie *assoc_additional_ie;
+#endif
 	struct hdd_station_ctx *sta_ctx;
 
 	hdd_enter();
@@ -5173,12 +5164,13 @@ void hdd_roam_profile_init(struct hdd_adapter *adapter)
 	roam_profile = hdd_roam_profile(adapter);
 	qdf_mem_zero(roam_profile, sizeof(*roam_profile));
 
+#ifndef FEATURE_CM_ENABLE
 	security_ie = hdd_security_ie(adapter);
 	qdf_mem_zero(security_ie, WLAN_MAX_IE_LEN);
 
 	assoc_additional_ie = hdd_assoc_additional_ie(adapter);
 	qdf_mem_zero(assoc_additional_ie, sizeof(*assoc_additional_ie));
-
+#endif
 	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 
 	/* Configure the roaming profile links to SSID and bssid. */
@@ -5195,8 +5187,10 @@ void hdd_roam_profile_init(struct hdd_adapter *adapter)
 	roam_profile->BSSType = eCSR_BSS_TYPE_INFRASTRUCTURE;
 
 	roam_profile->phyMode = eCSR_DOT11_MODE_AUTO;
-	sta_ctx->wpa_versions = 0;
 
+#ifndef FEATURE_CM_ENABLE
+	sta_ctx->wpa_versions = 0;
+#endif
 	/* Set the default scan mode */
 	adapter->scan_info.scan_mode = eSIR_ACTIVE_SCAN;
 

+ 22 - 10
core/hdd/src/wlan_hdd_cfg80211.c

@@ -18191,6 +18191,8 @@ static int __wlan_hdd_cfg80211_get_key(struct wiphy *wiphy,
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
 	struct csr_roam_profile *roam_profile;
 	struct key_params params;
+	eCsrEncryptionType enc_type;
+	struct hdd_station_ctx *sta_ctx;
 
 	hdd_enter();
 
@@ -18219,16 +18221,24 @@ static int __wlan_hdd_cfg80211_get_key(struct wiphy *wiphy,
 
 		roam_profile =
 			wlan_sap_get_roam_profile(ap_ctx->sap_context);
-	} else {
+		if (!roam_profile) {
+			hdd_err("Get roam profile failed!");
+			return -EINVAL;
+		}
+		enc_type = roam_profile->EncryptionType.encryptionType[0];
+	} else if (adapter->device_mode == QDF_NDI_MODE) {
 		roam_profile = hdd_roam_profile(adapter);
+		if (!roam_profile) {
+			hdd_err("Get roam profile failed!");
+			return -EINVAL;
+		}
+		enc_type = roam_profile->EncryptionType.encryptionType[0];
+	} else {
+		sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
+		enc_type = sta_ctx->conn_info.uc_encrypt_type;
 	}
 
-	if (!roam_profile) {
-		hdd_err("Get roam profile failed!");
-		return -EINVAL;
-	}
-
-	switch (roam_profile->EncryptionType.encryptionType[0]) {
+	switch (enc_type) {
 	case eCSR_ENCRYPT_TYPE_NONE:
 		params.cipher = IW_AUTH_CIPHER_NONE;
 		break;
@@ -19252,6 +19262,7 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
 						    REG_PHYMODE_MAX,
 						    oper_freq);
 		roam_profile->phyMode = csr_convert_from_reg_phy_mode(phy_mode);
+		sta_ctx->reg_phymode = roam_profile->phyMode;
 
 		sme_config = qdf_mem_malloc(sizeof(*sme_config));
 		if (!sme_config) {
@@ -24037,7 +24048,9 @@ __wlan_hdd_cfg80211_update_connect_params(struct wiphy *wiphy,
 					  struct cfg80211_connect_params *req,
 					  uint32_t changed)
 {
+#ifndef FEATURE_CM_ENABLE
 	struct csr_roam_profile *roam_profile;
+#endif
 	int ret;
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
@@ -24055,10 +24068,10 @@ __wlan_hdd_cfg80211_update_connect_params(struct wiphy *wiphy,
 		return -EINVAL;
 
 	mac_handle = hdd_ctx->mac_handle;
-	roam_profile = hdd_roam_profile(adapter);
 
 	if (changed & UPDATE_ASSOC_IE) {
 #ifndef FEATURE_CM_ENABLE
+		roam_profile = hdd_roam_profile(adapter);
 		/*
 		 * Validate the elements of the IE and copy it to
 		 * roam_profile in adapter
@@ -24096,8 +24109,7 @@ __wlan_hdd_cfg80211_update_connect_params(struct wiphy *wiphy,
 
 	if (changed) {
 		status = sme_send_rso_connect_params(mac_handle,
-						     adapter->vdev_id,
-						     roam_profile);
+						     adapter->vdev_id);
 		if (QDF_IS_STATUS_ERROR(status))
 			hdd_err("Update connect params to fw failed %d",
 				status);

+ 8 - 0
core/hdd/src/wlan_hdd_cm_api.h

@@ -270,4 +270,12 @@ bool hdd_cm_is_disconnected(struct hdd_adapter *adapter);
  */
 bool hdd_cm_is_disconnecting(struct hdd_adapter *adapter);
 
+/**
+ * hdd_cm_is_vdev_roaming() - Function to check roaming in progress
+ * @adapter: pointer to the adapter structure
+ *
+ * Return: true if roaming, false otherwise
+ */
+bool hdd_cm_is_vdev_roaming(struct hdd_adapter *adapter);
+
 #endif

+ 33 - 0
core/hdd/src/wlan_hdd_cm_connect.c

@@ -142,6 +142,28 @@ bool hdd_cm_is_disconnecting(struct hdd_adapter *adapter)
 	return is_vdev_disconnecting;
 }
 
+bool hdd_cm_is_vdev_roaming(struct hdd_adapter *adapter)
+{
+	struct wlan_objmgr_vdev *vdev;
+	bool is_vdev_roaming;
+	enum QDF_OPMODE opmode;
+
+	vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_CM_ID);
+	if (!vdev)
+		return false;
+
+	opmode = wlan_vdev_mlme_get_opmode(vdev);
+	if (opmode != QDF_STA_MODE && opmode != QDF_P2P_CLIENT_MODE) {
+		hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_CM_ID);
+		return false;
+	}
+	is_vdev_roaming = ucfg_cm_is_vdev_roaming(vdev);
+
+	hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_CM_ID);
+
+	return is_vdev_roaming;
+}
+
 #else
 bool hdd_cm_is_vdev_associated(struct hdd_adapter *adapter)
 {
@@ -171,6 +193,13 @@ bool hdd_cm_is_disconnecting(struct hdd_adapter *adapter)
 
 	return sta_ctx->conn_info.conn_state == eConnectionState_Disconnecting;
 }
+
+bool hdd_cm_is_vdev_roaming(struct hdd_adapter *adapter)
+{
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+
+	return sme_roaming_in_progress(hdd_ctx->mac_handle, adapter->vdev_id);
+}
 #endif
 
 void hdd_cm_set_peer_authenticate(struct hdd_adapter *adapter,
@@ -776,6 +805,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	mac_handle_t mac_handle;
 	bool is_roam = rsp->is_reassoc;
 	ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
+	uint32_t phymode;
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
@@ -801,6 +831,9 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	hdd_cm_rec_connect_info(adapter, rsp);
 
 	hdd_cm_save_connect_info(adapter, rsp);
+	phymode = wlan_reg_get_max_phymode(hdd_ctx->pdev, REG_PHYMODE_MAX,
+					   rsp->freq);
+	sta_ctx->reg_phymode = csr_convert_from_reg_phy_mode(phymode);
 
 	if (hdd_add_beacon_filter(adapter) != 0)
 		hdd_err("add beacon fileter failed");

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

@@ -189,6 +189,7 @@ void __hdd_cm_disconnect_handler_post_user_update(struct hdd_adapter *adapter)
 
 	adapter->hdd_stats.tx_rx_stats.cont_txtimeout_cnt = 0;
 
+#ifndef FEATURE_CM_ENABLE
 	/*
 	 * Reset hdd_reassoc_scenario to false here. After roaming in
 	 * 802.1x or WPA3 security, EAPOL is handled at supplicant and
@@ -196,7 +197,7 @@ void __hdd_cm_disconnect_handler_post_user_update(struct hdd_adapter *adapter)
 	 * happens before EAP/EAPOL at supplicant is complete.
 	 */
 	sta_ctx->ft_carrier_on = false;
-	sta_ctx->hdd_reassoc_scenario = false;
+#endif
 
 	hdd_nud_reset_tracking(adapter);
 	hdd_reset_limit_off_chan(adapter);

+ 1 - 12
core/hdd/src/wlan_hdd_hostapd.c

@@ -3988,18 +3988,7 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	if ((adapter->device_mode == QDF_STA_MODE) ||
-	    (adapter->device_mode == QDF_P2P_CLIENT_MODE)) {
-		struct csr_roam_profile *roam_profile;
-		struct hdd_station_ctx *sta_ctx =
-			WLAN_HDD_GET_STATION_CTX_PTR(adapter);
-
-		roam_profile = hdd_roam_profile(adapter);
-		num_ch = roam_profile->ChannelInfo.numOfChannels = 1;
-		sta_ctx->conn_info.chan_freq = chandef->chan->center_freq;
-		roam_profile->ChannelInfo.freq_list =
-			&sta_ctx->conn_info.chan_freq;
-	} else if (adapter->device_mode == QDF_SAP_MODE ||
+	if (adapter->device_mode == QDF_SAP_MODE ||
 		   adapter->device_mode == QDF_P2P_GO_MODE) {
 		sap_config = &((WLAN_HDD_GET_AP_CTX_PTR(adapter))->sap_config);
 		sap_config->chan_freq = chandef->chan->center_freq;

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

@@ -7291,7 +7291,6 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct hdd_station_ctx *sta_ctx;
 	struct sap_context *sap_ctx;
-	struct csr_roam_profile *roam_profile;
 	union iwreq_data wrqu;
 	tSirUpdateIE update_ie;
 	unsigned long rc;
@@ -7346,8 +7345,6 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
 #endif
 		    ) {
 			INIT_COMPLETION(adapter->disconnect_comp_var);
-
-			roam_profile = hdd_roam_profile(adapter);
 			if (cds_is_driver_recovering())
 				reason = REASON_DEVICE_RECOVERY;
 
@@ -18822,9 +18819,7 @@ int hdd_get_rssi_snr_by_bssid(struct hdd_adapter *adapter, const uint8_t *bssid,
 {
 	QDF_STATUS status;
 	mac_handle_t mac_handle;
-	struct csr_roam_profile *roam_profile;
 
-	roam_profile = hdd_roam_profile(adapter);
 	mac_handle = hdd_adapter_get_mac_handle(adapter);
 	status = sme_get_rssi_snr_by_bssid(mac_handle, bssid, rssi, snr);
 	if (QDF_STATUS_SUCCESS != status) {

+ 1 - 3
core/hdd/src/wlan_hdd_power.c

@@ -2868,7 +2868,6 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 	struct net_device *ndev = wdev->netdev;
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
 	int status;
-	struct hdd_station_ctx *sta_ctx;
 	static bool is_rate_limited;
 
 	hdd_enter_dev(ndev);
@@ -2891,8 +2890,7 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 	switch (adapter->device_mode) {
 	case QDF_STA_MODE:
 	case QDF_P2P_CLIENT_MODE:
-		sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
-		if (sta_ctx->hdd_reassoc_scenario) {
+		if (hdd_cm_is_vdev_roaming(adapter)) {
 			hdd_debug("Roaming is in progress, rej this req");
 			return -EINVAL;
 		}

+ 2 - 4
core/hdd/src/wlan_hdd_regulatory.c

@@ -1456,7 +1456,6 @@ static void hdd_country_change_update_sta(struct hdd_context *hdd_ctx)
 {
 	struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
 	struct hdd_station_ctx *sta_ctx = NULL;
-	struct csr_roam_profile *roam_profile = NULL;
 	struct wlan_objmgr_pdev *pdev = NULL;
 	uint32_t new_phy_mode;
 	bool freq_changed, phy_changed;
@@ -1483,13 +1482,12 @@ static void hdd_country_change_update_sta(struct hdd_context *hdd_ctx)
 			 */
 		case QDF_STA_MODE:
 			sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
-			roam_profile = &sta_ctx->roam_profile;
 			new_phy_mode = wlan_reg_get_max_phymode(pdev,
 								REG_PHYMODE_MAX,
 								oper_freq);
 			csr_phy_mode =
 				csr_convert_from_reg_phy_mode(new_phy_mode);
-			phy_changed = (roam_profile->phyMode != csr_phy_mode);
+			phy_changed = (sta_ctx->reg_phymode != csr_phy_mode);
 
 			if (phy_changed || freq_changed) {
 			/* This is temp ifdef will be removed in near future */
@@ -1504,7 +1502,7 @@ static void hdd_country_change_update_sta(struct hdd_context *hdd_ctx)
 					eCSR_DISCONNECT_REASON_UNSPECIFIED,
 					REASON_UNSPEC_FAILURE);
 #endif
-				roam_profile->phyMode = csr_phy_mode;
+				sta_ctx->reg_phymode = csr_phy_mode;
 			}
 			break;
 		default:

+ 6 - 12
core/hdd/src/wlan_hdd_stats.c

@@ -1985,8 +1985,6 @@ int wlan_hdd_ll_stats_get(struct hdd_adapter *adapter, uint32_t req_id,
 {
 	int errno;
 	tSirLLStatsGetReq get_req;
-	struct hdd_station_ctx *hddstactx =
-					WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 
 	hdd_enter_dev(adapter->dev);
 
@@ -1995,7 +1993,7 @@ int wlan_hdd_ll_stats_get(struct hdd_adapter *adapter, uint32_t req_id,
 		return -EPERM;
 	}
 
-	if (hddstactx->hdd_reassoc_scenario) {
+	if (hdd_cm_is_vdev_roaming(adapter)) {
 		hdd_err("Roaming in progress, cannot process the request");
 		return -EBUSY;
 	}
@@ -2042,7 +2040,6 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
 	tSirLLStatsGetReq LinkLayerStatsGetReq;
 	struct net_device *dev = wdev->netdev;
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
-	struct hdd_station_ctx *hddstactx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 
 	/* ENTER() intentionally not used in a frequently invoked API */
 
@@ -2061,7 +2058,7 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	if (hddstactx->hdd_reassoc_scenario) {
+	if (hdd_cm_is_vdev_roaming(adapter)) {
 		hdd_err("Roaming in progress, cannot process the request");
 		return -EBUSY;
 	}
@@ -5317,7 +5314,7 @@ static int wlan_hdd_get_sta_stats(struct wiphy *wiphy,
 		return 0;
 	}
 
-	if (sta_ctx->hdd_reassoc_scenario) {
+	if (hdd_cm_is_vdev_roaming(adapter)) {
 		hdd_debug("Roaming is in progress, cannot continue with this request");
 		/*
 		 * supplicant reports very low rssi to upper layer
@@ -5859,7 +5856,6 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
 {
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	struct hdd_context *hdd_ctx;
-	struct hdd_station_ctx *sta_ctx;
 	int status;
 	bool filled = false;
 
@@ -5881,12 +5877,10 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
-
 	if (!ucfg_scan_is_snr_monitor_enabled(hdd_ctx->psoc))
 		return -ENONET;
 
-	if (sta_ctx->hdd_reassoc_scenario) {
+	if (hdd_cm_is_vdev_roaming(adapter)) {
 		hdd_debug("Roaming in progress, hence return");
 		return -ENONET;
 	}
@@ -5979,7 +5973,7 @@ static bool hdd_is_rcpi_applicable(struct hdd_adapter *adapter,
 		if (!hdd_cm_is_vdev_associated(adapter))
 			return false;
 
-		if (hdd_sta_ctx->hdd_reassoc_scenario) {
+		if (hdd_cm_is_vdev_roaming(adapter)) {
 			/* return the cached rcpi, if mac addr matches */
 			hdd_debug("Roaming in progress, return cached RCPI");
 			if (!qdf_mem_cmp(&adapter->rcpi.mac_addr,
@@ -6231,7 +6225,7 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
 		return QDF_STATUS_SUCCESS;
 	}
 
-	if (sta_ctx->hdd_reassoc_scenario) {
+	if (hdd_cm_is_vdev_roaming(adapter)) {
 		hdd_debug("Roaming in progress, return cached RSSI");
 		*rssi_value = adapter->rssi;
 		return QDF_STATUS_SUCCESS;

+ 1 - 1
core/hdd/src/wlan_hdd_sysfs_connect_info.c

@@ -327,7 +327,7 @@ static ssize_t wlan_hdd_connect_info(struct hdd_adapter *adapter, uint8_t *buf,
 		return buf_avail_len;
 	}
 
-	if (hdd_sta_ctx->hdd_reassoc_scenario) {
+	if (hdd_cm_is_vdev_roaming(adapter)) {
 		ret_val = scnprintf(buf + length, buf_avail_len - length,
 				    "Roaming is in progress");
 		if (ret_val <= 0)

+ 9 - 8
core/hdd/src/wlan_hdd_wext.c

@@ -6325,19 +6325,20 @@ static int __iw_get_char_setnone(struct net_device *dev,
 #endif
 	case WE_GET_11W_INFO:
 	{
-		struct csr_roam_profile *roam_profile =
-			hdd_roam_profile(adapter);
+		struct qdf_mac_addr connected_bssid;
 
+		wlan_mlme_get_bssid_vdev_id(hdd_ctx->pdev, adapter->vdev_id,
+					    &connected_bssid);
 		snprintf(extra, WE_MAX_STR_LEN,
 			 "\n BSSID %02X:%02X:%02X:%02X:%02X:%02X"
 			 "\n Number of Unprotected Disassocs %d"
 			 "\n Number of Unprotected Deauths %d",
-			 roam_profile->BSSIDs.bssid->bytes[0],
-			 roam_profile->BSSIDs.bssid->bytes[1],
-			 roam_profile->BSSIDs.bssid->bytes[2],
-			 roam_profile->BSSIDs.bssid->bytes[3],
-			 roam_profile->BSSIDs.bssid->bytes[4],
-			 roam_profile->BSSIDs.bssid->bytes[5],
+			 connected_bssid.bytes[0],
+			 connected_bssid.bytes[1],
+			 connected_bssid.bytes[2],
+			 connected_bssid.bytes[3],
+			 connected_bssid.bytes[4],
+			 connected_bssid.bytes[5],
 			 adapter->hdd_stats.hdd_pmf_stats.
 			 num_unprot_disassoc_rx,
 			 adapter->hdd_stats.hdd_pmf_stats.

+ 1 - 3
core/sme/inc/sme_api.h

@@ -2854,7 +2854,6 @@ void sme_send_hlp_ie_info(mac_handle_t mac_handle, uint8_t vdev_id,
  * sme_send_rso_connect_params() - Updates the assoc IEs to csr_roam_session
  * @mac_handle: Opaque handle to the global MAC context
  * @vdev_id: vdev id
- * @src_profile: CSR Roam profile
  *
  * When the user space updates the assoc IEs or FILS auth type or FILS ERP info,
  * host driver needs to send these updated parameters to firmware via
@@ -2863,8 +2862,7 @@ void sme_send_hlp_ie_info(mac_handle_t mac_handle, uint8_t vdev_id,
  * Return: None
  */
 QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
-				       uint8_t vdev_id,
-				       struct csr_roam_profile *src_profile);
+				       uint8_t vdev_id);
 
 #if defined(WLAN_FEATURE_FILS_SK)
 #ifndef FEATURE_CM_ENABLE

+ 1 - 7
core/sme/src/common/sme_api.c

@@ -6292,8 +6292,7 @@ QDF_STATUS sme_update_roam_rssi_diff(mac_handle_t mac_handle, uint8_t vdev_id,
 }
 
 QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
-				       uint8_t vdev_id,
-				       struct csr_roam_profile *src_profile)
+				       uint8_t vdev_id)
 {
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -6303,11 +6302,6 @@ QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	if (!src_profile) {
-		sme_err("src roam profile NULL");
-		return QDF_STATUS_E_INVAL;
-	}
-
 	if (!mac->mlme_cfg->lfr.lfr_enabled) {
 		sme_debug("lfr enabled %d", mac->mlme_cfg->lfr.lfr_enabled);
 		return QDF_STATUS_E_PERM;