Przeglądaj źródła

qcacld-3.0: Cleanup the tCsrRoamConnectedProfile params

Cleanup the tCsrRoamConnectedProfile params

Change-Id: I6c6f9a8888eebc320191c88020a8ec19cd32c998
CRs-Fixed: 2896190
Utkarsh Bhatnagar 4 lat temu
rodzic
commit
9f9dc3d5ee

+ 2 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -2825,6 +2825,8 @@ QDF_STATUS wlan_mlme_get_ssid_vdev_id(struct wlan_objmgr_pdev *pdev,
 	struct wlan_objmgr_vdev *vdev;
 	QDF_STATUS status;
 
+	*ssid_len = 0;
+
 	if (!pdev)
 		return QDF_STATUS_E_INVAL;
 

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

@@ -235,6 +235,17 @@ cm_update_rso_ese_info(struct rso_config *rso_cfg,
 {
 	rso_config->rso_ese_info.is_ese_assoc = rso_cfg->is_ese_assoc;
 	rso_config->rso_11r_info.is_11r_assoc = rso_cfg->is_11r_assoc;
+	if (rso_cfg->is_ese_assoc) {
+		qdf_mem_copy(rso_config->rso_ese_info.krk, rso_cfg->krk,
+			     WMI_KRK_KEY_LEN);
+		qdf_mem_copy(rso_config->rso_ese_info.btk, rso_cfg->btk,
+			     WMI_BTK_KEY_LEN);
+		rso_config->rso_11i_info.fw_okc = 0;
+		rso_config->rso_11i_info.fw_pmksa_cache = 0;
+		rso_config->rso_11i_info.pmk_len = 0;
+		qdf_mem_zero(&rso_config->rso_11i_info.psk_pmk[0],
+			     sizeof(rso_config->rso_11i_info.psk_pmk));
+	}
 }
 #else
 static inline void

+ 6 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h

@@ -271,6 +271,8 @@ enum roam_fail_params {
  * @occupied_chan_lst: occupied channel list
  * @roam_candidate_count: candidate count
  * @is_ese_assoc: is ese assoc
+ * @krk: krk data
+ * @btk: btk data
  * @psk_pmk: pmk
  * @pmk_len: length of pmk
  * @mdid: mdid info
@@ -302,6 +304,10 @@ struct rso_config {
 	uint8_t uapsd_mask;
 #ifdef FEATURE_WLAN_ESE
 	bool is_ese_assoc;
+	uint8_t krk[WMI_KRK_KEY_LEN];
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+	uint8_t btk[WMI_BTK_KEY_LEN];
+#endif
 #endif
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 	uint8_t psk_pmk[ROAM_SCAN_PSK_SIZE];

+ 19 - 13
core/hdd/src/wlan_hdd_assoc.c

@@ -1098,9 +1098,15 @@ hdd_conn_save_connect_info(struct hdd_adapter *adapter,
 {
 	struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	eCsrEncryptionType encrypt_type = eCSR_ENCRYPT_TYPE_NONE;
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+	struct wlan_channel *des_chan;
 
 	QDF_ASSERT(roam_info);
 
+	des_chan = wlan_vdev_mlme_get_des_chan(adapter->vdev);
+	if (!des_chan)
+		return;
+
 	if (roam_info) {
 		/* Save the BSSID for the connection */
 		if (eCSR_BSS_TYPE_INFRASTRUCTURE == bss_type) {
@@ -1136,20 +1142,20 @@ hdd_conn_save_connect_info(struct hdd_adapter *adapter,
 				sta_ctx->conn_info.auth_type;
 
 			sta_ctx->conn_info.chan_freq =
-				roam_info->u.pConnectedProfile->op_freq;
-
+				wlan_get_operation_chan_freq_vdev_id(hdd_ctx->pdev,
+								     adapter->vdev_id);
+			wlan_mlme_get_ssid_vdev_id(hdd_ctx->pdev,
+					adapter->vdev_id,
+					sta_ctx->conn_info.ssid.SSID.ssId,
+					&sta_ctx->conn_info.ssid.SSID.length);
 			/* Save the ssid for the connection */
-			qdf_mem_copy(&sta_ctx->conn_info.ssid.SSID,
-				     &roam_info->u.pConnectedProfile->SSID,
-				     sizeof(tSirMacSSid));
 			qdf_mem_copy(&sta_ctx->conn_info.last_ssid.SSID,
-				     &roam_info->u.pConnectedProfile->SSID,
+				     &sta_ctx->conn_info.ssid.SSID,
 				     sizeof(tSirMacSSid));
 
 			/* Save dot11mode in which STA associated to AP */
 			sta_ctx->conn_info.dot11mode =
-				roam_info->u.pConnectedProfile->dot11Mode;
-
+				sme_phy_mode_to_dot11mode(des_chan->ch_phymode);
 			sta_ctx->conn_info.proxy_arp_service =
 				roam_info->u.pConnectedProfile->proxy_arp_service;
 
@@ -2840,6 +2846,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 					if (!hddDisconInProgress &&
 						roam_info->bss_desc) {
 						struct cfg80211_bss *roam_bss;
+						struct wlan_ssid ssid;
 
 						/*
 						 * After roaming is completed,
@@ -2868,16 +2875,15 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 						chan = ieee80211_get_channel(
 							adapter->wdev.wiphy,
 							roam_info->bss_desc->chan_freq);
-
+						wlan_mlme_get_ssid_vdev_id(hdd_ctx->pdev,
+							adapter->vdev_id,
+							ssid.ssid, &ssid.length);
 						roam_bss =
 							wlan_cfg80211_get_bss(
 							adapter->wdev.wiphy,
 							chan,
 							roam_info->bssid.bytes,
-							roam_info->u.
-							pConnectedProfile->SSID.ssId,
-							roam_info->u.
-							pConnectedProfile->SSID.length);
+							ssid.ssid, ssid.length);
 
 						cdp_hl_fc_set_td_limit(soc,
 							adapter->vdev_id,

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

@@ -6152,6 +6152,7 @@ struct hdd_station_info *hdd_get_stainfo(struct hdd_station_info *astainfo,
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 
+#ifndef FEATURE_CM_ENABLE
 /**
  * hdd_get_roam_reason() - convert wmi roam reason to
  * enum qca_roam_reason
@@ -6185,7 +6186,7 @@ static enum qca_roam_reason hdd_get_roam_reason(uint16_t roam_scan_trigger)
 
 	return QCA_ROAM_REASON_UNKNOWN;
 }
-
+#endif
 /**
  * __wlan_hdd_cfg80211_keymgmt_set_key() - Store the Keys in the driver session
  * @wiphy: pointer to wireless wiphy structure.
@@ -6585,6 +6586,7 @@ end:
 }
 #endif
 
+#ifndef FEATURE_CM_ENABLE
 #if defined(WLAN_FEATURE_FILS_SK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
 /**
  * wlan_hdd_add_fils_params_roam_auth_event() - Adds FILS params in roam auth
@@ -6633,6 +6635,7 @@ wlan_hdd_add_fils_params_roam_auth_event(struct sk_buff *skb,
 	return 0;
 }
 #endif
+#endif /* FEATURE_CM_ENABLE */
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
@@ -6676,6 +6679,7 @@ void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
 	cfg80211_vendor_event(vendor_event, GFP_KERNEL);
 }
 
+#ifndef FEATURE_CM_ENABLE
 /**
  * lan_hdd_send_roam_auth_event() - Send the roamed and authorized event
  * @adapter: Pointer to adapter struct
@@ -6857,6 +6861,7 @@ nla_put_failure:
 	return -EINVAL;
 }
 #endif
+#endif
 
 #define ANT_DIV_SET_PERIOD(probe_period, stay_period) \
 	((1 << 26) | \

+ 4 - 1
core/hdd/src/wlan_hdd_cfg80211.h

@@ -539,11 +539,14 @@ void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
 				      uint8_t vdev_id, uint16_t buf_len,
 				      uint8_t *buf);
 
+#ifndef FEATURE_CM_ENABLE
 int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter, uint8_t *bssid,
 		uint8_t *req_rsn_ie, uint32_t req_rsn_length, uint8_t
 		*rsp_rsn_ie, uint32_t rsp_rsn_length, struct csr_roam_info
 		*roam_info_ptr);
+#endif
 #else
+#ifndef FEATURE_CM_ENABLE
 static inline int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter,
 		uint8_t *bssid, uint8_t *req_rsn_ie, uint32_t req_rsn_length,
 		uint8_t *rsp_rsn_ie, uint32_t rsp_rsn_length,
@@ -551,7 +554,7 @@ static inline int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter,
 {
 	return 0;
 }
-
+#endif
 static inline
 void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
 				      uint8_t vdev_id, uint16_t buf_len,

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

@@ -8252,12 +8252,14 @@ void hdd_connect_result(struct net_device *dev, const u8 *bssid,
 
 	if (WLAN_STATUS_SUCCESS == status) {
 		struct ieee80211_channel *chan;
+		struct wlan_ssid ssid;
 
+		wlan_mlme_get_ssid_vdev_id(hdd_ctx->pdev, adapter->vdev_id,
+					   ssid.ssid, &ssid.length);
 		chan = ieee80211_get_channel(adapter->wdev.wiphy,
 					     roam_info->bss_desc->chan_freq);
 		bss = wlan_cfg80211_get_bss(adapter->wdev.wiphy, chan, bssid,
-			roam_info->u.pConnectedProfile->SSID.ssId,
-			roam_info->u.pConnectedProfile->SSID.length);
+					    ssid.ssid, ssid.length);
 	}
 	wlan_rec_conn_info(adapter->vdev_id, DEBUG_CONN_CONNECT_RESULT,
 			   bssid ? bssid : NULL,

+ 17 - 11
core/hdd/src/wlan_hdd_wmm.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -2359,29 +2359,28 @@ QDF_STATUS hdd_wmm_connect(struct hdd_adapter *adapter,
 			   eCsrRoamBssType bss_type)
 {
 	int ac;
-	bool qap;
-	bool qos_connection;
-	uint8_t acm_mask;
+	bool qap = true;
+	bool qos_connection = true;
+	uint8_t acm_mask = 0x0;
+#ifndef FEATURE_CM_ENABLE
 	mac_handle_t mac_handle;
+#endif
 
+#ifndef FEATURE_CM_ENABLE
 	if ((eCSR_BSS_TYPE_INFRASTRUCTURE == bss_type) &&
 	    roam_info && roam_info->u.pConnectedProfile) {
 		qap = roam_info->u.pConnectedProfile->qap;
 		qos_connection = roam_info->u.pConnectedProfile->qosConnection;
 		acm_mask = roam_info->u.pConnectedProfile->acm_mask;
-	} else {
-		qap = true;
-		qos_connection = true;
-		acm_mask = 0x0;
 	}
-
+#endif
 	hdd_debug("qap is %d, qos_connection is %d, acm_mask is 0x%x",
 		 qap, qos_connection, acm_mask);
 
 	adapter->hdd_wmm_status.qap = qap;
 	adapter->hdd_wmm_status.qos_connection = qos_connection;
+#ifndef FEATURE_CM_ENABLE
 	mac_handle = hdd_adapter_get_mac_handle(adapter);
-
 	for (ac = 0; ac < WLAN_MAX_AC; ac++) {
 		if (qap && qos_connection && (acm_mask & acm_mask_bit[ac])) {
 			hdd_debug("ac %d on", ac);
@@ -2422,7 +2421,14 @@ QDF_STATUS hdd_wmm_connect(struct hdd_adapter *adapter,
 		}
 
 	}
-
+#else
+	for (ac = 0; ac < WLAN_MAX_AC; ac++) {
+		hdd_debug("ac %d off", ac);
+		/* admission is not required so access is allowed */
+		adapter->hdd_wmm_status.ac_status[ac].is_access_required = false;
+		adapter->hdd_wmm_status.ac_status[ac].is_access_allowed = true;
+	}
+#endif
 	return QDF_STATUS_SUCCESS;
 }
 

+ 0 - 2
core/mac/inc/sir_api.h

@@ -118,8 +118,6 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
 #define SIR_SAP_MAX_NUM_PEERS 32
 #endif
 
-#define SIR_KRK_KEY_LEN 16
-#define SIR_BTK_KEY_LEN 32
 #define SIR_KCK_KEY_LEN 16
 #define KCK_192BIT_KEY_LEN 24
 #define KCK_256BIT_KEY_LEN 32

+ 12 - 7
core/mac/src/pe/lim/lim_ft_preauth.c

@@ -33,6 +33,7 @@
 #include <lim_admit_control.h>
 #include <wlan_scan_ucfg_api.h>
 #include "wma.h"
+#include "wlan_crypto_global_api.h"
 
 /**
  * lim_ft_cleanup_pre_auth_info() - Cleanup preauth related information
@@ -225,22 +226,26 @@ void lim_perform_ft_pre_auth(struct mac_context *mac, QDF_STATUS status,
 			     uint32_t *data, struct pe_session *pe_session)
 {
 	tSirMacAuthFrameBody authFrame;
-	unsigned int session_id;
-	enum csr_akm_type auth_type;
+	int32_t ucast_cipher;
+	bool is_open = false;
 
 	if (!pe_session) {
 		pe_err("pe_session is NULL");
 		return;
 	}
-	session_id = pe_session->smeSessionId;
-	auth_type =
-		mac->roam.roamSession[session_id].connectedProfile.AuthType;
+
+	ucast_cipher = wlan_crypto_get_param(pe_session->vdev,
+					     WLAN_CRYPTO_PARAM_UCAST_CIPHER);
+	if (!ucast_cipher ||
+	    ((QDF_HAS_PARAM(ucast_cipher, WLAN_CRYPTO_CIPHER_NONE) ==
+	      ucast_cipher)))
+		is_open = true;
 
 	if (pe_session->is11Rconnection &&
 	    pe_session->ftPEContext.pFTPreAuthReq) {
 		/* Only 11r assoc has FT IEs */
-		if ((auth_type != eCSR_AUTH_TYPE_OPEN_SYSTEM) &&
-			(pe_session->ftPEContext.pFTPreAuthReq->ft_ies_length
+		if ((!is_open) &&
+		     (pe_session->ftPEContext.pFTPreAuthReq->ft_ies_length
 									== 0)) {
 			pe_err("FTIEs for Auth Req Seq 1 is absent");
 			goto preauth_fail;

+ 2 - 7
core/mac/src/pe/rrm/rrm_api.c

@@ -526,7 +526,6 @@ rrm_get_country_code_from_connected_profile(
 				uint8_t country_code[WNI_CFG_COUNTRY_CODE_LEN])
 {
 	uint8_t id;
-	uint8_t *country;
 
 	qdf_mem_zero(country_code, sizeof(country_code[0]) *
 					WNI_CFG_COUNTRY_CODE_LEN);
@@ -539,12 +538,8 @@ rrm_get_country_code_from_connected_profile(
 		pe_err("smeSessionId %d is invalid", id);
 		return;
 	}
-	country =
-		mac->roam.roamSession[id].connectedProfile.country_code;
-	if (country[0])
-		qdf_mem_copy(country_code, country, sizeof(country_code[0]) *
-						WNI_CFG_COUNTRY_CODE_LEN);
-	else
+	wlan_reg_read_current_country(mac->psoc, country_code);
+	if (!country_code[0])
 		country_code[2] = OP_CLASS_GLOBAL;
 }
 

+ 0 - 4
core/sap/inc/sap_api.h

@@ -249,10 +249,6 @@ typedef struct sap_StationAssocIndication_s {
 	uint32_t assocReqLength;
 	uint8_t *assocReqPtr;
 	bool fWmmEnabled;
-	enum csr_akm_type negotiatedAuthType;
-	eCsrEncryptionType negotiatedUCEncryptionType;
-	eCsrEncryptionType negotiatedMCEncryptionType;
-	bool fAuthRequired;
 	uint8_t ecsa_capable;
 	uint32_t owe_ie_len;
 	uint8_t *owe_ie;

+ 0 - 9
core/sap/src/sap_fsm.c

@@ -1444,15 +1444,6 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
 		assoc_ind->assocReqPtr = csr_roaminfo->assocReqPtr;
 		assoc_ind->fWmmEnabled = csr_roaminfo->wmmEnabledSta;
 		assoc_ind->ecsa_capable = csr_roaminfo->ecsa_capable;
-		if (csr_roaminfo->u.pConnectedProfile) {
-			assoc_ind->negotiatedAuthType =
-				csr_roaminfo->u.pConnectedProfile->AuthType;
-			assoc_ind->negotiatedUCEncryptionType =
-			    csr_roaminfo->u.pConnectedProfile->EncryptionType;
-			assoc_ind->negotiatedMCEncryptionType =
-			    csr_roaminfo->u.pConnectedProfile->mcEncryptionType;
-			assoc_ind->fAuthRequired = csr_roaminfo->fAuthRequired;
-		}
 		if (csr_roaminfo->owe_pending_assoc_ind) {
 			if (!sap_fill_owe_ie_in_assoc_ind(assoc_ind,
 					 csr_roaminfo->owe_pending_assoc_ind)) {

+ 4 - 23
core/sme/inc/csr_api.h

@@ -243,17 +243,6 @@ typedef struct tagCsrAuthList {
 	enum csr_akm_type authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
 } tCsrAuthList, *tpCsrAuthList;
 
-#ifdef FEATURE_WLAN_ESE
-typedef struct tagCsrEseCckmInfo {
-	uint32_t reassoc_req_num;
-	bool krk_plumbed;
-	uint8_t krk[SIR_KRK_KEY_LEN];
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
-	uint8_t btk[SIR_BTK_KEY_LEN];
-#endif
-} tCsrEseCckmInfo;
-#endif /* FEATURE_WLAN_ESE */
-
 typedef struct sCsrChannel_ {
 	uint8_t numChannels;
 	uint32_t channel_freq_list[CFG_VALID_CHANNEL_LIST_LEN];
@@ -688,17 +677,14 @@ struct csr_roam_profile {
 };
 
 typedef struct tagCsrRoamConnectedProfile {
-	tSirMacSSid SSID;
-	uint32_t op_freq;
-	struct qdf_mac_addr bssid;
-	uint16_t beaconInterval;
 	eCsrRoamBssType BSSType;
+	tCsrRoamModifyProfileFields modifyProfileFields;
+#ifndef FEATURE_CM_ENABLE
 	enum csr_akm_type AuthType;
 	eCsrEncryptionType EncryptionType;
 	eCsrEncryptionType mcEncryptionType;
-	uint8_t country_code[WNI_CFG_COUNTRY_CODE_LEN];
-	uint32_t vht_channel_width;
-	tCsrKeys Keys;
+	bool qosConnection;     /* A connection is QoS enabled */
+	bool qap;               /* AP supports QoS */
 	/*
 	 * meaningless on connect. It's an OUT param from CSR's point of view
 	 * During assoc response carries the ACM bit-mask i.e. what
@@ -706,11 +692,6 @@ typedef struct tagCsrRoamConnectedProfile {
 	 * all other bits are ignored)
 	 */
 	uint8_t acm_mask;
-	tCsrRoamModifyProfileFields modifyProfileFields;
-	bool qosConnection;     /* A connection is QoS enabled */
-	bool qap;               /* AP supports QoS */
-	uint32_t dot11Mode;
-#ifndef FEATURE_CM_ENABLE
 	uint8_t proxy_arp_service;
 #endif
 } tCsrRoamConnectedProfile;

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

@@ -521,9 +521,7 @@ struct csr_roam_session {
 	bool fWMMConnection;
 	bool fQOSConnection;
 #ifdef FEATURE_WLAN_ESE
-	tCsrEseCckmInfo eseCckmInfo;
 	bool isPrevApInfoValid;
-	tSirMacSSid prevApSSID;
 	uint32_t roamTS1;
 #endif
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
@@ -869,8 +867,8 @@ static inline QDF_STATUS csr_roam_offload_scan_rsp_hdlr(
 QDF_STATUS csr_handoff_request(struct mac_context *mac, uint8_t sessionId,
 		tCsrHandoffRequest
 		*pHandoffInfo);
-#endif
 bool csr_roam_is_sta_mode(struct mac_context *mac, uint8_t vdev_id);
+#endif
 
 /* Post Channel Change Indication */
 QDF_STATUS csr_roam_channel_change_req(struct mac_context *mac,

+ 86 - 61
core/sme/src/common/sme_api.c

@@ -1645,7 +1645,6 @@ QDF_STATUS sme_set_ese_beacon_request(mac_handle_t mac_handle,
 	tpSirBeaconReportReqInd sme_bcn_rpt_req = NULL;
 	const tCsrEseBeaconReqParams *bcn_req = NULL;
 	uint8_t counter = 0;
-	struct csr_roam_session *session = CSR_GET_SESSION(mac, sessionId);
 	tpRrmSMEContext sme_rrm_ctx = &mac->rrm.rrmSmeContext[0];
 
 	if (sme_rrm_ctx->eseBcnReqInProgress == true) {
@@ -1668,9 +1667,8 @@ QDF_STATUS sme_set_ese_beacon_request(mac_handle_t mac_handle,
 
 	sme_bcn_rpt_req->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
 	sme_bcn_rpt_req->length = sizeof(tSirBeaconReportReqInd);
-	qdf_mem_copy(sme_bcn_rpt_req->bssId,
-		     session->connectedProfile.bssid.bytes,
-		     sizeof(tSirMacAddr));
+	wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId,
+				    (struct qdf_mac_addr *)&sme_bcn_rpt_req->bssId);
 	sme_bcn_rpt_req->channel_info.chan_num = 255;
 	sme_bcn_rpt_req->channel_list.num_channels = in_req->numBcnReqIe;
 	sme_bcn_rpt_req->msgSource = eRRM_MSG_SOURCE_ESE_UPLOAD;
@@ -3676,8 +3674,8 @@ QDF_STATUS sme_dhcp_start_ind(mac_handle_t mac_handle,
 		pMsg->device_mode = device_mode;
 		qdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
 			     QDF_MAC_ADDR_SIZE);
-		qdf_copy_macaddr(&pMsg->peerMacAddr,
-				 &pSession->connectedProfile.bssid);
+		wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId,
+					    &pMsg->peerMacAddr);
 
 		message.type = WMA_DHCP_START_IND;
 		message.bodyptr = pMsg;
@@ -3743,8 +3741,9 @@ QDF_STATUS sme_dhcp_stop_ind(mac_handle_t mac_handle,
 		pMsg->device_mode = device_mode;
 		qdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
 			     QDF_MAC_ADDR_SIZE);
-		qdf_copy_macaddr(&pMsg->peerMacAddr,
-				 &pSession->connectedProfile.bssid);
+
+		wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId,
+					    &pMsg->peerMacAddr);
 
 		message.type = WMA_DHCP_STOP_IND;
 		message.bodyptr = pMsg;
@@ -4725,21 +4724,21 @@ QDF_STATUS sme_set_keep_alive(mac_handle_t mac_handle, uint8_t session_id,
 	struct keep_alive_req *request_buf;
 	struct scheduler_msg msg = {0};
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, session_id);
 
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 			FL("WMA_SET_KEEP_ALIVE message"));
 
-	if (!pSession) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				FL("Session not Found"));
-		return QDF_STATUS_E_FAILURE;
+	if (!CSR_IS_SESSION_VALID(mac, session_id)) {
+		sme_err("CSR session is invalid");
+		return QDF_STATUS_E_INVAL;
 	}
+
 	request_buf = qdf_mem_malloc(sizeof(*request_buf));
 	if (!request_buf)
 		return QDF_STATUS_E_NOMEM;
 
-	qdf_copy_macaddr(&request->bssid, &pSession->connectedProfile.bssid);
+	wlan_mlme_get_bssid_vdev_id(mac->pdev, session_id,
+				    &request->bssid);
 	qdf_mem_copy(request_buf, request, sizeof(*request_buf));
 
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
@@ -5505,8 +5504,8 @@ QDF_STATUS sme_8023_multicast_list(mac_handle_t mac_handle, uint8_t sessionId,
 		     sizeof(tSirRcvFltMcAddrList));
 
 	qdf_copy_macaddr(&request_buf->self_macaddr, &pSession->self_mac_addr);
-	qdf_copy_macaddr(&request_buf->bssid,
-			 &pSession->connectedProfile.bssid);
+
+	wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId, &request_buf->bssid);
 
 	msg.type = WMA_8023_MULTICAST_LIST_REQ;
 	msg.reserved = 0;
@@ -6266,9 +6265,10 @@ int sme_add_key_krk(mac_handle_t mac_handle, uint8_t session_id,
 		    const uint8_t *key, const int key_len)
 {
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *session;
+	struct wlan_objmgr_vdev *vdev;
+	struct rso_config *rso_cfg;
 
-	if (key_len < SIR_KRK_KEY_LEN) {
+	if (key_len < WMI_KRK_KEY_LEN) {
 		sme_warn("Invalid KRK keylength [= %d]", key_len);
 		return -EINVAL;
 	}
@@ -6278,11 +6278,20 @@ int sme_add_key_krk(mac_handle_t mac_handle, uint8_t session_id,
 		return -EINVAL;
 	}
 
-	session = CSR_GET_SESSION(mac_ctx, session_id);
+	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev, session_id,
+						    WLAN_LEGACY_SME_ID);
+	if (!vdev) {
+		sme_err("vdev object is NULL for vdev %d", session_id);
+		return QDF_STATUS_E_INVAL;
+	}
+	rso_cfg = wlan_cm_get_rso_config(vdev);
+	if (!rso_cfg) {
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
+		return QDF_STATUS_E_INVAL;
+	}
 
-	qdf_mem_copy(session->eseCckmInfo.krk, key, SIR_KRK_KEY_LEN);
-	session->eseCckmInfo.reassoc_req_num = 1;
-	session->eseCckmInfo.krk_plumbed = true;
+	qdf_mem_copy(rso_cfg->krk, key, WMI_KRK_KEY_LEN);
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
 
 	return 0;
 }
@@ -6293,9 +6302,10 @@ int sme_add_key_btk(mac_handle_t mac_handle, uint8_t session_id,
 		    const uint8_t *key, const int key_len)
 {
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *session;
+	struct wlan_objmgr_vdev *vdev;
+	struct rso_config *rso_cfg;
 
-	if (key_len < SIR_BTK_KEY_LEN) {
+	if (key_len < WMI_BTK_KEY_LEN) {
 		sme_warn("Invalid BTK keylength [= %d]", key_len);
 		return -EINVAL;
 	}
@@ -6305,14 +6315,26 @@ int sme_add_key_btk(mac_handle_t mac_handle, uint8_t session_id,
 		return -EINVAL;
 	}
 
-	session = CSR_GET_SESSION(mac_ctx, session_id);
+	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev, session_id,
+						    WLAN_LEGACY_SME_ID);
+	if (!vdev) {
+		sme_err("vdev object is NULL for vdev %d", session_id);
+		return QDF_STATUS_E_INVAL;
+	}
+	rso_cfg = wlan_cm_get_rso_config(vdev);
+	if (!rso_cfg) {
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
+		return QDF_STATUS_E_INVAL;
+	}
 
-	qdf_mem_copy(session->eseCckmInfo.btk, key, SIR_BTK_KEY_LEN);
+	qdf_mem_copy(rso_cfg->btk, key, WMI_BTK_KEY_LEN);
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
 	/*
 	 * KRK and BTK are updated by upper layer back to back. Send
 	 * updated KRK and BTK together to FW here.
 	 */
-	wlan_roam_update_cfg(mac_ctx->psoc, session_id, REASON_ROAM_PSK_PMK_CHANGED);
+	wlan_roam_update_cfg(mac_ctx->psoc, session_id,
+			     REASON_ROAM_PSK_PMK_CHANGED);
 
 	return 0;
 }
@@ -7837,7 +7859,6 @@ int sme_send_addba_req(mac_handle_t mac_handle, uint8_t session_id, uint8_t tid,
 	QDF_STATUS status;
 	struct scheduler_msg msg = {0};
 	struct send_add_ba_req *send_ba_req;
-	struct csr_roam_session *csr_session = NULL;
 
 	/* This is temp ifdef will be removed in near future */
 #ifdef FEATURE_CM_ENABLE
@@ -7853,18 +7874,16 @@ int sme_send_addba_req(mac_handle_t mac_handle, uint8_t session_id, uint8_t tid,
 		return -EINVAL;
 	}
 #endif
-	csr_session = CSR_GET_SESSION(mac_ctx, session_id);
-	if (!csr_session) {
-		sme_err("CSR session is NULL");
+	if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) {
+		sme_err("CSR session is invalid");
 		return -EINVAL;
 	}
 	send_ba_req = qdf_mem_malloc(sizeof(*send_ba_req));
 	if (!send_ba_req)
 		return -EIO;
 
-	qdf_mem_copy(send_ba_req->mac_addr,
-			csr_session->connectedProfile.bssid.bytes,
-			QDF_MAC_ADDR_SIZE);
+	wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, session_id,
+				    (struct qdf_mac_addr *)&send_ba_req->mac_addr);
 	ba_buff = buff_size;
 	if (!buff_size) {
 		if (mac_ctx->usr_cfg_ba_buff_size)
@@ -9026,7 +9045,7 @@ QDF_STATUS sme_update_dsc_pto_up_mapping(mac_handle_t mac_handle,
 {
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	uint8_t i, j, peSessionId;
+	uint8_t i, j;
 	struct csr_roam_session *pCsrSession = NULL;
 	struct pe_session *pSession = NULL;
 
@@ -9040,13 +9059,10 @@ QDF_STATUS sme_update_dsc_pto_up_mapping(mac_handle_t mac_handle,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pSession = pe_find_session_by_bssid(mac,
-				pCsrSession->connectedProfile.bssid.bytes,
-				&peSessionId);
+	pSession = pe_find_session_by_vdev_id(mac, sessionId);
 
 	if (!pSession) {
-		sme_err("Session lookup fails for " QDF_MAC_ADDR_FMT,
-			QDF_MAC_ADDR_REF(pCsrSession->connectedProfile.bssid.bytes));
+		sme_err("Session lookup fails for vdev %d", sessionId);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -11004,6 +11020,10 @@ int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id)
 	void *wma_handle;
 	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
 	uint32_t param_val = 0;
+	qdf_freq_t op_chan_freq;
+	qdf_freq_t freq_seg_0;
+	enum phy_ch_width ch_width;
+	struct qdf_mac_addr connected_bssid;
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
 	if (!wma_handle)
@@ -11014,6 +11034,10 @@ int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id)
 	if (QDF_IS_STATUS_ERROR(status))
 		return -EINVAL;
 
+	wlan_get_op_chan_freq_info_vdev_id(mac_ctx->pdev, session_id,
+					   &op_chan_freq, &freq_seg_0,
+					   &ch_width);
+
 	omi_data.a_ctrl_id = A_CTRL_ID_OMI;
 
 	if (mac_ctx->he_om_ctrl_cfg_nss_set)
@@ -11029,7 +11053,7 @@ int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id)
 	if (mac_ctx->he_om_ctrl_cfg_bw_set)
 		omi_data.ch_bw = mac_ctx->he_om_ctrl_cfg_bw;
 	else
-		omi_data.ch_bw = session->connectedProfile.vht_channel_width;
+		omi_data.ch_bw = ch_width;
 
 	omi_data.ul_mu_dis = mac_ctx->he_om_ctrl_cfg_ul_mu_dis;
 	omi_data.ul_mu_data_dis = mac_ctx->he_om_ctrl_ul_mu_data_dis;
@@ -11040,10 +11064,12 @@ int sme_send_he_om_ctrl_update(mac_handle_t mac_handle, uint8_t session_id)
 		  omi_data.ch_bw, omi_data.tx_nsts, omi_data.rx_nss,
 		  omi_data.ul_mu_dis, omi_data.omi_in_vht, omi_data.omi_in_he);
 	qdf_mem_copy(&param_val, &omi_data, sizeof(omi_data));
+	wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, session_id,
+				    &connected_bssid);
 	sme_debug("param val %08X, bssid:"QDF_MAC_ADDR_FMT, param_val,
-		  QDF_MAC_ADDR_REF(session->connectedProfile.bssid.bytes));
+		  QDF_MAC_ADDR_REF(connected_bssid.bytes));
 	status = wma_set_peer_param(wma_handle,
-				    session->connectedProfile.bssid.bytes,
+				    connected_bssid.bytes,
 				    WMI_PEER_PARAM_XMIT_OMI,
 				    param_val, session_id);
 	if (QDF_STATUS_SUCCESS != status) {
@@ -11061,12 +11087,19 @@ int sme_set_he_om_ctrl_param(mac_handle_t mac_handle, uint8_t session_id,
 	QDF_STATUS status;
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
 	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
+	qdf_freq_t op_chan_freq;
+	qdf_freq_t freq_seg_0;
+	enum phy_ch_width ch_width;
 
 	status = sme_validate_session_for_cap_update(mac_ctx, session_id,
 						     session);
 	if (QDF_IS_STATUS_ERROR(status))
 		return -EINVAL;
 
+	wlan_get_op_chan_freq_info_vdev_id(mac_ctx->pdev, session_id,
+					    &op_chan_freq, &freq_seg_0,
+					    &ch_width);
+
 	switch(param) {
 		case QCA_WLAN_VENDOR_ATTR_HE_OMI_ULMU_DISABLE:
 			sme_debug("Set OM ctrl UL MU dis to %d", cfg_val);
@@ -11084,12 +11117,9 @@ int sme_set_he_om_ctrl_param(mac_handle_t mac_handle, uint8_t session_id,
 			mac_ctx->he_om_ctrl_cfg_nss = cfg_val;
 			break;
 		case QCA_WLAN_VENDOR_ATTR_HE_OMI_CH_BW:
-			if (cfg_val >
-			    session->connectedProfile.vht_channel_width) {
-				sme_debug
-				  ("OMI BW %d is > connected BW %d",
-				   cfg_val,
-				   session->connectedProfile.vht_channel_width);
+			if (cfg_val > ch_width) {
+				sme_debug("OMI BW %d is > connected BW %d",
+					  cfg_val, ch_width);
 				mac_ctx->he_om_ctrl_cfg_bw_set = false;
 				return 0;
 			}
@@ -14600,33 +14630,28 @@ int16_t sme_get_oper_chan_freq(struct wlan_objmgr_vdev *vdev)
 enum phy_ch_width sme_get_oper_ch_width(struct wlan_objmgr_vdev *vdev)
 {
 	uint8_t vdev_id;
-	struct csr_roam_session *session;
 	struct mac_context *mac_ctx;
 	mac_handle_t mac_handle;
-	enum phy_ch_width ch_width = CH_WIDTH_20MHZ;
+	struct wlan_channel *des_chan;
 
 	if (!vdev) {
 		sme_err("Invalid vdev id is passed");
 		return CH_WIDTH_INVALID;
 	}
+	vdev_id = wlan_vdev_get_id(vdev);
+	des_chan = wlan_vdev_mlme_get_des_chan(vdev);
+	if (!des_chan)
+		return CH_WIDTH_INVALID;
 
 	mac_handle = cds_get_context(QDF_MODULE_ID_SME);
 	if (!mac_handle)
 		return CH_WIDTH_INVALID;
 
 	mac_ctx = MAC_CONTEXT(mac_handle);
-	vdev_id = wlan_vdev_get_id(vdev);
-	if (!CSR_IS_SESSION_VALID(mac_ctx, vdev_id)) {
-		sme_err("Invalid vdev id is passed");
-		return CH_WIDTH_INVALID;
-	}
-
-	session = CSR_GET_SESSION(mac_ctx, vdev_id);
-
 	if (csr_is_conn_state_connected(mac_ctx, vdev_id))
-		ch_width = session->connectedProfile.vht_channel_width;
+		return des_chan->ch_width;
 
-	return ch_width;
+	return CH_WIDTH_INVALID;
 }
 
 int sme_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev,

+ 23 - 8
core/sme/src/common/sme_ft_api.c

@@ -398,19 +398,37 @@ void sme_preauth_reassoc_intvl_timer_callback(void *context)
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 #ifdef FEATURE_WLAN_ESE
-static void sme_reset_esecckm_info(struct csr_roam_session *session)
+static void sme_reset_esecckm_info(struct mac_context *mac, uint8_t vdev_id)
 {
-	qdf_mem_zero(&session->eseCckmInfo, sizeof(session->eseCckmInfo));
+	struct wlan_objmgr_vdev *vdev;
+	struct rso_config *rso_cfg;
+
+	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac->pdev, vdev_id,
+						    WLAN_LEGACY_SME_ID);
+	if (!vdev) {
+		sme_err("vdev object is NULL for vdev %d", vdev_id);
+		return;
+	}
+	rso_cfg = wlan_cm_get_rso_config(vdev);
+	if (!rso_cfg) {
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
+		return;
+	}
+
+	qdf_mem_zero(rso_cfg->krk, WMI_KRK_KEY_LEN);
+	qdf_mem_zero(rso_cfg->btk, WMI_BTK_KEY_LEN);
+	rso_cfg->is_ese_assoc = false;
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
+
 }
 #else
-static void sme_reset_esecckm_info(struct csr_roam_session *session)
+static void sme_reset_esecckm_info(struct mac_context *mac, uint8_t vdev_id)
 {
 }
 #endif
 void sme_reset_key(mac_handle_t mac_handle, uint32_t vdev_id)
 {
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *session = NULL;
 
 	if (!mac) {
 		sme_err("mac is NULL");
@@ -418,10 +436,7 @@ void sme_reset_key(mac_handle_t mac_handle, uint32_t vdev_id)
 	}
 
 	wlan_cm_set_psk_pmk(mac->pdev, vdev_id, NULL, 0);
-	session = CSR_GET_SESSION(mac, vdev_id);
-	if (!session)
-		return;
-	sme_reset_esecckm_info(session);
+	sme_reset_esecckm_info(mac, vdev_id);
 }
 #endif
 /* Reset the FT context. */

+ 10 - 12
core/sme/src/common/sme_power_save.c

@@ -631,7 +631,6 @@ QDF_STATUS sme_set_ps_host_offload(mac_handle_t mac_handle,
 	struct sir_host_offload_req *request_buf;
 	struct scheduler_msg msg = {0};
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
 
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 			"%s: IP address = %d.%d.%d.%d", __func__,
@@ -640,18 +639,17 @@ QDF_STATUS sme_set_ps_host_offload(mac_handle_t mac_handle,
 			request->params.hostIpv4Addr[2],
 			request->params.hostIpv4Addr[3]);
 
-	if (!session) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				"%s: SESSION not Found", __func__);
-		return QDF_STATUS_E_FAILURE;
+	if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) {
+		sme_err("CSR session is invalid");
+		return QDF_STATUS_E_INVAL;
 	}
 
 	request_buf = qdf_mem_malloc(sizeof(struct sir_host_offload_req));
 	if (!request_buf)
 		return QDF_STATUS_E_NOMEM;
 
-	qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
-
+	wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, session_id,
+				    &request->bssid);
 	qdf_mem_copy(request_buf, request, sizeof(struct sir_host_offload_req));
 
 	msg.type = WMA_SET_HOST_OFFLOAD;
@@ -689,14 +687,14 @@ QDF_STATUS sme_set_ps_ns_offload(mac_handle_t mac_handle,
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
 	struct sir_host_offload_req *request_buf;
 	struct scheduler_msg msg = {0};
-	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
 
-	if (!session) {
-		sme_err("Session not found");
-		return QDF_STATUS_E_FAILURE;
+	if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) {
+		sme_err("CSR session is invalid");
+		return QDF_STATUS_E_INVAL;
 	}
 
-	qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
+	wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, session_id,
+				    &request->bssid);
 
 	request_buf = qdf_mem_malloc(sizeof(*request_buf));
 	if (!request_buf)

Plik diff jest za duży
+ 193 - 239
core/sme/src/csr/csr_api_roam.c


+ 12 - 16
core/sme/src/csr/csr_neighbor_roam.c

@@ -240,13 +240,9 @@ csr_neighbor_roam_get_scan_filter_from_profile(struct mac_context *mac,
 	} else {
 		filter->num_of_ssid = 1;
 
-		filter->ssid_list[0].length = profile->SSID.length;
-		if (filter->ssid_list[0].length > WLAN_SSID_MAX_LEN)
-			filter->ssid_list[0].length = WLAN_SSID_MAX_LEN;
-		qdf_mem_copy(filter->ssid_list[0].ssid,
-			     profile->SSID.ssId,
-			     filter->ssid_list[0].length);
-
+		wlan_mlme_get_ssid_vdev_id(mac->pdev, vdev_id,
+					   filter->ssid_list[0].ssid,
+					   &filter->ssid_list[0].length);
 		sme_debug("Filtering for SSID %.*s,length of SSID = %u",
 			  filter->ssid_list[0].length,
 			  filter->ssid_list[0].ssid,
@@ -311,6 +307,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(struct mac_context *mac,
 	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
 	struct wlan_objmgr_vdev *vdev;
 	enum QDF_OPMODE opmode;
+	struct qdf_mac_addr connected_bssid;
 
 	if (!pSession) {
 		sme_err("pSession is NULL");
@@ -322,11 +319,11 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(struct mac_context *mac,
 			  sessionId, opmode);
 		return QDF_STATUS_SUCCESS;
 	}
-	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
-			FL("Disconn ind on session %d in state %d from bss :"
-			QDF_MAC_ADDR_FMT), sessionId,
+	wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId, &connected_bssid);
+	sme_debug("Disconn ind on session %d in state %d from bss :"
+			QDF_MAC_ADDR_FMT, sessionId,
 			pNeighborRoamInfo->neighborRoamState,
-			QDF_MAC_ADDR_REF(pSession->connectedProfile.bssid.bytes));
+			QDF_MAC_ADDR_REF(connected_bssid.bytes));
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc, sessionId,
 						    WLAN_LEGACY_SME_ID);
@@ -426,13 +423,12 @@ static void csr_neighbor_roam_info_ctx_init(struct mac_context *mac,
 {
 	tpCsrNeighborRoamControlInfo ngbr_roam_info =
 		&mac->roam.neighborRoamInfo[session_id];
-	struct csr_roam_session *session = &mac->roam.roamSession[session_id];
 	int init_ft_flag = false;
 
 	csr_neighbor_roam_state_transition(mac,
 			eCSR_NEIGHBOR_ROAM_STATE_CONNECTED, session_id);
-	qdf_copy_macaddr(&ngbr_roam_info->currAPbssid,
-			&session->connectedProfile.bssid);
+	wlan_mlme_get_bssid_vdev_id(mac->pdev, session_id,
+				    &ngbr_roam_info->currAPbssid);
 	cm_roam_start_init_on_connect(mac->pdev, session_id);
 
 	/*
@@ -519,8 +515,8 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
 		roam_info = qdf_mem_malloc(sizeof(*roam_info));
 		if (!roam_info)
 			return QDF_STATUS_E_NOMEM;
-		qdf_copy_macaddr(&roam_info->peerMac,
-				 &session->connectedProfile.bssid);
+		wlan_mlme_get_bssid_vdev_id(mac->pdev, session_id,
+					    &roam_info->peerMac);
 		csr_roam_call_callback(mac, session_id, roam_info, 0,
 				       eCSR_ROAM_SET_KEY_COMPLETE,
 				       eCSR_ROAM_RESULT_AUTHENTICATED);

+ 2 - 3
core/sme/src/csr/csr_roam_preauth.c

@@ -559,9 +559,8 @@ QDF_STATUS csr_roam_issue_ft_preauth_req(struct mac_context *mac_ctx,
 	preauth_req->pre_auth_channel_freq = bss_desc->chan_freq;
 	preauth_req->dot11mode = dot11mode;
 
-	qdf_mem_copy((void *)&preauth_req->currbssId,
-			(void *)csr_session->connectedProfile.bssid.bytes,
-			sizeof(tSirMacAddr));
+	wlan_mlme_get_bssid_vdev_id(mac_ctx->pdev, vdev_id,
+				    (struct qdf_mac_addr *)&preauth_req->currbssId);
 	qdf_mem_copy((void *)&preauth_req->preAuthbssId,
 			(void *)bss_desc->bssId, sizeof(tSirMacAddr));
 	qdf_mem_copy((void *)&preauth_req->self_mac_addr,

+ 1 - 1
core/sme/src/csr/csr_util.c

@@ -663,7 +663,7 @@ uint32_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
 		     (persona == QDF_SAP_MODE)) &&
 		     (session->connectState !=
 		      eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED))
-			return session->connectedProfile.op_freq;
+			return wlan_get_operation_chan_freq_vdev_id(mac_ctx->pdev, i);
 	}
 
 	return 0;

+ 0 - 13
core/sme/src/nan/nan_datapath_api.c

@@ -91,22 +91,9 @@ void csr_roam_save_ndi_connected_info(struct mac_context *mac_ctx,
 
 	connect_profile = &roam_session->connectedProfile;
 	qdf_mem_zero(connect_profile, sizeof(*connect_profile));
-	connect_profile->AuthType = roam_profile->negotiatedAuthType;
-	connect_profile->EncryptionType =
-		roam_profile->negotiatedUCEncryptionType;
-	connect_profile->mcEncryptionType =
-		roam_profile->negotiatedMCEncryptionType;
 	connect_profile->BSSType = roam_profile->BSSType;
 	connect_profile->modifyProfileFields.uapsd_mask =
 		roam_profile->uapsd_mask;
-	connect_profile->op_freq = bssdesc->chan_freq;
-	connect_profile->beaconInterval = 0;
-	qdf_mem_copy(&connect_profile->Keys, &roam_profile->Keys,
-		     sizeof(roam_profile->Keys));
-	csr_get_bss_id_bss_desc(bssdesc, &connect_profile->bssid);
-	connect_profile->SSID.length = 0;
-	connect_profile->qap = false;
-	connect_profile->qosConnection = false;
 }
 
 /**

+ 4 - 8
core/sme/src/rrm/sme_rrm.c

@@ -1105,10 +1105,8 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(struct mac_context *mac,
 	}
 
 	qdf_mem_zero(country, WNI_CFG_COUNTRY_CODE_LEN);
-	if (session->connectedProfile.country_code[0])
-		qdf_mem_copy(country, session->connectedProfile.country_code,
-			     WNI_CFG_COUNTRY_CODE_LEN);
-	else
+	wlan_reg_read_current_country(mac->psoc, country);
+	if (!country[0])
 		country[2] = OP_CLASS_GLOBAL;
 
 	if (wlan_reg_is_6ghz_op_class(mac->pdev,
@@ -1339,14 +1337,12 @@ QDF_STATUS sme_rrm_neighbor_report_request(struct mac_context *mac, uint8_t
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tpSirNeighborReportReqInd pMsg;
-	struct csr_roam_session *pSession;
 
 	sme_debug("Request to send Neighbor report request received ");
 	if (!CSR_IS_SESSION_VALID(mac, sessionId)) {
 		sme_err("Invalid session %d", sessionId);
 		return QDF_STATUS_E_INVAL;
 	}
-	pSession = CSR_GET_SESSION(mac, sessionId);
 
 	/* If already a report is pending, return failure */
 	if (true ==
@@ -1365,8 +1361,8 @@ QDF_STATUS sme_rrm_neighbor_report_request(struct mac_context *mac, uint8_t
 
 	pMsg->messageType = eWNI_SME_NEIGHBOR_REPORT_REQ_IND;
 	pMsg->length = sizeof(tSirNeighborReportReqInd);
-	qdf_mem_copy(&pMsg->bssId, &pSession->connectedProfile.bssid,
-		     sizeof(tSirMacAddr));
+	wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId,
+				    (struct qdf_mac_addr *)&pMsg->bssId);
 	pMsg->noSSID = pNeighborReq->no_ssid;
 	qdf_mem_copy(&pMsg->ucSSID, &pNeighborReq->ssid, sizeof(tSirMacSSid));
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików