ソースを参照

qcacld-3.0: Move ini cfg to LIM

Move ini configuration params to LIM
as per of connection manager.

Change-Id: I85f7dc87fb483d49ed021349f81a1072b4aa114a
CRs-Fixed: 2820684
gaurank kathpalia 4 年 前
コミット
6ef65a43ed

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

@@ -908,7 +908,6 @@ struct join_req {
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	uint8_t cc_switch_mode;
 #endif
-	enum QDF_OPMODE staPersona;       /* Persona */
 	bool wps_registration;
 	ePhyChanBondState cbMode;       /* Pass CB mode value in Join. */
 
@@ -947,27 +946,11 @@ struct join_req {
 	bool isESEconnection;
 	tESETspecInfo eseTspecInfo;
 #endif
-
-	bool isFastTransitionEnabled;
-	bool isFastRoamIniFeatureEnabled;
-
-	uint8_t txLdpcIniFeatureEnabled;
-	uint8_t enableVhtpAid;
-	uint8_t enableVhtGid;
-	uint8_t enableAmpduPs;
-	uint8_t enableHtSmps;
-	uint8_t htSmps;
-	bool send_smps_action;
 	bool he_with_wep_tkip;
-	uint8_t max_amsdu_num;
-	bool isWMEenabled;
-	bool isQosEnabled;
 	bool isOSENConnection;
-	struct rrm_config_param rrm_config;
 	bool spectrumMgtIndicator;
 	struct power_cap_info powerCap;
 	struct supported_channels supportedChannels;
-	bool enable_bcast_probe_rsp;
 	bool sae_pmk_cached;
 	/* Pls make this as last variable in struct */
 	bool force_24ghz_in_ht20;

+ 1 - 2
core/mac/src/pe/include/lim_session.h

@@ -621,7 +621,6 @@ static inline void pe_free_dph_node_array_buffer(void)
  * @numSta: number of stations
  * @bssType: bss type of new session to do conditional memory allocation.
  * @vdev_id: vdev_id
- * @opmode: operating mode
  *
  * This function returns the session context and the session ID if the session
  * corresponding to the passed BSSID is found in the PE session table.
@@ -631,7 +630,7 @@ static inline void pe_free_dph_node_array_buffer(void)
 struct pe_session *pe_create_session(struct mac_context *mac,
 				     uint8_t *bssid, uint8_t *sessionId,
 				     uint16_t numSta, enum bss_type bssType,
-				     uint8_t vdev_id, enum QDF_OPMODE opmode);
+				     uint8_t vdev_id);
 
 /**
  * pe_find_session_by_bssid() - looks up the PE session given the BSSID.

+ 2 - 4
core/mac/src/pe/lim/lim_api.c

@@ -2512,8 +2512,7 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 					   &session_id,
 					   mac_ctx->lim.max_sta_of_pe_session,
 					   session_ptr->bssType,
-					   session_ptr->vdev_id,
-					   session_ptr->opmode);
+					   session_ptr->vdev_id);
 	if (!ft_session_ptr) {
 		pe_err("LFR3:Cannot create PE Session");
 		lim_print_mac_addr(mac_ctx, bss_desc->bssId, LOGE);
@@ -2851,8 +2850,7 @@ void lim_mon_init_session(struct mac_context *mac_ptr,
 					   &session_id,
 					   mac_ptr->lim.max_sta_of_pe_session,
 					   eSIR_MONITOR_MODE,
-					   msg->vdev_id,
-					   QDF_MONITOR_MODE);
+					   msg->vdev_id);
 	if (!psession_entry) {
 		pe_err("Monitor mode: Session Can not be created");
 		lim_print_mac_addr(mac_ptr, msg->bss_id.bytes, LOGE);

+ 1 - 2
core/mac/src/pe/lim/lim_ft_preauth.c

@@ -442,8 +442,7 @@ void lim_handle_ft_pre_auth_rsp(struct mac_context *mac, QDF_STATUS status,
 					  &sessionId,
 					  mac->lim.max_sta_of_pe_session,
 					  pe_session->bssType,
-					  pe_session->vdev_id,
-					  pe_session->opmode);
+					  pe_session->vdev_id);
 		if (!ft_session) {
 			pe_err("Session not created for pre-auth 11R AP");
 			status = QDF_STATUS_E_FAILURE;

+ 70 - 26
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -622,8 +622,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
 					&session_id,
 					mac_ctx->lim.max_sta_of_pe_session,
 					sme_start_bss_req->bssType,
-					sme_start_bss_req->vdev_id,
-					sme_start_bss_req->bssPersona);
+					sme_start_bss_req->vdev_id);
 			if (!session) {
 				pe_warn("Session Can not be created");
 				ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
@@ -1429,8 +1428,7 @@ lim_cm_create_session(struct mac_context *mac_ctx, struct cm_vdev_join_req *req)
 			&session_id,
 			mac_ctx->lim.max_sta_of_pe_session,
 			eSIR_INFRASTRUCTURE_MODE,
-			req->vdev_id,
-			wlan_vdev_mlme_get_opmode(vdev));
+			req->vdev_id);
 	if (!pe_session)
 		pe_err("vdev_id: %d cm_id 0x%x : pe_session create failed BSSID"
 		       QDF_MAC_ADDR_FMT, req->vdev_id, req->cm_id,
@@ -1514,6 +1512,37 @@ QDF_STATUS cm_process_disconnect_req(struct scheduler_msg *msg)
 }
 #endif
 
+static bool lim_is_fast_roam_enabled(struct mac_context *mac_ctx,
+				     struct wlan_objmgr_vdev *vdev) {
+
+	if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE)
+		return false;
+
+	if (mac_ctx->mlme_cfg->lfr.enable_fast_roam_in_concurrency)
+		return mac_ctx->mlme_cfg->lfr.lfr_enabled;
+
+	/*
+	 * If fast roam in concurrency is disabled and there are concurrent
+	 * sessions runnig return false.
+	 */
+	if (policy_mgr_get_connection_count(mac_ctx->psoc))
+		return false;
+
+	return mac_ctx->mlme_cfg->lfr.lfr_enabled;
+}
+
+#ifdef FEATURE_WLAN_ESE
+static inline bool lim_is_ese_enabled(struct mac_context *mac_ctx)
+{
+	return mac_ctx->mlme_cfg->lfr.ese_enabled;
+}
+#else
+static inline bool lim_is_ese_enabled(struct mac_context *mac_ctx)
+{
+	return false;
+}
+#endif
+
 /**
  * __lim_process_sme_join_req() - process SME_JOIN_REQ message
  * @mac_ctx: Pointer to Global MAC structure
@@ -1631,8 +1660,7 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
 					&session_id,
 					mac_ctx->lim.max_sta_of_pe_session,
 					eSIR_INFRASTRUCTURE_MODE,
-					sme_join_req->vdev_id,
-					sme_join_req->staPersona);
+					sme_join_req->vdev_id);
 			if (!session) {
 				pe_err("Session Can not be created");
 				ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
@@ -1642,7 +1670,8 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
 			lim_set_bcn_probe_filter(mac_ctx, session,
 						 bss_chan_id);
 		}
-		session->max_amsdu_num = sme_join_req->max_amsdu_num;
+		session->max_amsdu_num =
+				mac_ctx->mlme_cfg->ht_caps.max_num_amsdu;
 		session->enable_session_twt_support =
 			sme_join_req->enable_session_twt_support;
 		/*
@@ -1666,13 +1695,23 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
 				  sme_join_req->self_mac_addr);
 
 		session->statypeForBss = STA_ENTRY_PEER;
-		session->limWmeEnabled = sme_join_req->isWMEenabled;
-		session->limQosEnabled = sme_join_req->isQosEnabled;
+
+		if (mac_ctx->roam.roamSession[in_req->vdev_id].fWMMConnection)
+			session->limWmeEnabled = true;
+		else
+			session->limWmeEnabled = false;
+
+		if (mac_ctx->roam.roamSession[in_req->vdev_id].fQOSConnection)
+			session->limQosEnabled = true;
+		else
+			session->limQosEnabled = false;
+
 		session->wps_registration = sme_join_req->wps_registration;
 		session->he_with_wep_tkip = sme_join_req->he_with_wep_tkip;
 
-		session->enable_bcast_probe_rsp =
-				sme_join_req->enable_bcast_probe_rsp;
+		if (session->opmode == QDF_STA_MODE)
+			session->enable_bcast_probe_rsp =
+				mac_ctx->mlme_cfg->oce.enable_bcast_probe_rsp;
 
 		/* Store vendor specific IE for CISCO AP */
 		ie_len = (bss_desc->length + sizeof(bss_desc->length) -
@@ -1691,11 +1730,12 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
 		session->cc_switch_mode = sme_join_req->cc_switch_mode;
 #endif
 		session->nwType = bss_desc->nwType;
-		session->enableAmpduPs = sme_join_req->enableAmpduPs;
-		session->enableHtSmps = sme_join_req->enableHtSmps;
-		session->htSmpsvalue = sme_join_req->htSmps;
+		session->enableAmpduPs =
+			mac_ctx->mlme_cfg->ht_caps.enable_ampdu_ps;
+		session->enableHtSmps = mac_ctx->mlme_cfg->ht_caps.enable_smps;
+		session->htSmpsvalue = mac_ctx->mlme_cfg->ht_caps.smps;
 		session->send_smps_action =
-			sme_join_req->send_smps_action;
+			mac_ctx->roam.configParam.send_smps_action;
 		/*
 		 * By default supported NSS 1x1 is set to true
 		 * and later on updated while determining session
@@ -1707,9 +1747,9 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
 			IS_DOT11_MODE_VHT(session->dot11mode);
 		if (session->vhtCapability) {
 			session->enableVhtpAid =
-				sme_join_req->enableVhtpAid;
+			   mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_paid;
 			session->enableVhtGid =
-				sme_join_req->enableVhtGid;
+			   mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_gid;
 		}
 
 		/*Phy mode */
@@ -1772,13 +1812,17 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
 #ifdef FEATURE_WLAN_ESE
 		session->isESEconnection = sme_join_req->isESEconnection;
 #endif
+		session->isFastRoamIniFeatureEnabled =
+			lim_is_fast_roam_enabled(mac_ctx, session->vdev);
+
 		session->isFastTransitionEnabled =
-			sme_join_req->isFastTransitionEnabled;
+					lim_is_ese_enabled(mac_ctx) ||
+					session->isFastRoamIniFeatureEnabled;
+
+
 
-		session->isFastRoamIniFeatureEnabled =
-			sme_join_req->isFastRoamIniFeatureEnabled;
 		session->txLdpcIniFeatureEnabled =
-			sme_join_req->txLdpcIniFeatureEnabled;
+			mac_ctx->mlme_cfg->ht_caps.tx_ldpc_enable;
 
 		lim_update_fils_config(mac_ctx, session, sme_join_req);
 		lim_update_sae_config(session, sme_join_req);
@@ -2087,9 +2131,9 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
 			session_entry->vht_config.su_beam_formee = 0;
 		}
 		session_entry->enableVhtpAid =
-			reassoc_req->enableVhtpAid;
+			mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_paid;
 		session_entry->enableVhtGid =
-			reassoc_req->enableVhtGid;
+			mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_gid;
 		pe_debug("vht su bformer [%d]", session_entry->vht_config.su_beam_former);
 	}
 
@@ -2103,10 +2147,10 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
 		session_entry->vht_config.su_beam_formee,
 		session_entry->vht_config.su_beam_former);
 
-	session_entry->enableHtSmps = reassoc_req->enableHtSmps;
-	session_entry->htSmpsvalue = reassoc_req->htSmps;
+	session_entry->enableHtSmps = mac_ctx->mlme_cfg->ht_caps.enable_smps;
+	session_entry->htSmpsvalue = mac_ctx->mlme_cfg->ht_caps.smps;
 	session_entry->send_smps_action =
-		reassoc_req->send_smps_action;
+		mac_ctx->roam.configParam.send_smps_action;
 	pe_debug("enableHtSmps: %d htSmps: %d send action: %d supported nss 1x1: %d",
 		session_entry->enableHtSmps,
 		session_entry->htSmpsvalue,

+ 6 - 6
core/mac/src/pe/lim/lim_session.c

@@ -544,7 +544,7 @@ void lim_update_bcn_probe_filter(struct mac_context *mac_ctx,
 struct pe_session *pe_create_session(struct mac_context *mac,
 				     uint8_t *bssid, uint8_t *sessionId,
 				     uint16_t numSta, enum bss_type bssType,
-				     uint8_t vdev_id, enum QDF_OPMODE opmode)
+				     uint8_t vdev_id)
 {
 	QDF_STATUS status;
 	uint8_t i;
@@ -603,7 +603,6 @@ struct pe_session *pe_create_session(struct mac_context *mac,
 	*sessionId = i;
 	session_ptr->peSessionId = i;
 	session_ptr->bssType = bssType;
-	session_ptr->opmode = opmode;
 	session_ptr->gLimPhyMode = WNI_CFG_PHY_MODE_11G;
 	/* Initialize CB mode variables when session is created */
 	session_ptr->htSupportedChannelWidthSet = 0;
@@ -621,10 +620,6 @@ struct pe_session *pe_create_session(struct mac_context *mac,
 	session_ptr->is_session_obss_color_collision_det_enabled =
 		mac->mlme_cfg->obss_ht40.obss_color_collision_offload_enabled;
 
-	pe_debug("Create PE session: %d opmode %d vdev_id %d  BSSID: "QDF_MAC_ADDR_FMT" Max No of STA: %d",
-		 *sessionId, opmode, vdev_id, QDF_MAC_ADDR_REF(bssid),
-		 numSta);
-
 	if (bssType == eSIR_INFRA_AP_MODE) {
 		session_ptr->pSchProbeRspTemplate =
 			qdf_mem_malloc(SIR_MAX_PROBE_RESP_SIZE);
@@ -653,6 +648,11 @@ struct pe_session *pe_create_session(struct mac_context *mac,
 	session_ptr->vdev = vdev;
 	session_ptr->vdev_id = vdev_id;
 	session_ptr->mac_ctx = mac;
+	session_ptr->opmode = wlan_vdev_mlme_get_opmode(vdev);
+
+	pe_debug("Create PE session: %d opmode %d vdev_id %d  BSSID: "QDF_MAC_ADDR_FMT" Max No of STA: %d",
+		 *sessionId, session_ptr->opmode, vdev_id,
+		 QDF_MAC_ADDR_REF(bssid), numSta);
 
 	if (eSIR_INFRASTRUCTURE_MODE == bssType)
 		lim_ft_open(mac, &mac->lim.gpSession[i]);

+ 3 - 4
core/mac/src/pe/rrm/rrm_api.c

@@ -1569,10 +1569,9 @@ void rrm_cleanup(struct mac_context *mac, uint8_t idx)
 void lim_update_rrm_capability(struct mac_context *mac_ctx,
 			       struct join_req *join_req)
 {
-	mac_ctx->rrm.rrmPEContext.rrmEnable = join_req->rrm_config.rrm_enabled;
+	mac_ctx->rrm.rrmPEContext.rrmEnable =
+				mac_ctx->rrm.rrmConfig.rrm_enabled;
 	qdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps,
-		     &join_req->rrm_config.rm_capability,
+		     &mac_ctx->rrm.rrmConfig.rm_capability,
 		     RMENABLEDCAP_MAX_LEN);
-
-	return;
 }

+ 3 - 53
core/sme/src/csr/csr_api_roam.c

@@ -14956,7 +14956,6 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
 	int8_t pwr_limit = 0;
 	struct ps_global_info *ps_global_info = &mac->sme.ps_global_info;
 	struct ps_params *ps_param = &ps_global_info->ps_params[sessionId];
-	uint8_t ese_config = 0;
 	tpCsrNeighborRoamControlInfo neigh_roam_info;
 	bool is_vendor_ap_present;
 	struct vdev_type_nss *vdev_type_nss;
@@ -14967,6 +14966,9 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
 	struct wlan_objmgr_vdev *vdev;
 	bool follow_ap_edca;
 	bool reconn_after_assoc_timeout = false;
+#ifdef FEATURE_WLAN_ESE
+	bool ese_config = false;
+#endif
 
 	if (!pSession) {
 		sme_err("session %d not found", sessionId);
@@ -15247,7 +15249,6 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
 		csr_join_req->cc_switch_mode =
 			mac->roam.configParam.cc_switch_mode;
 #endif
-		csr_join_req->staPersona = (uint8_t) pProfile->csrPersona;
 		csr_join_req->wps_registration = pProfile->bWPSAssociation;
 		csr_join_req->cbMode = (uint8_t) pSession->bssParams.cbMode;
 		csr_join_req->force_24ghz_in_ht20 =
@@ -15601,19 +15602,6 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
 			}
 		}
 #endif /* FEATURE_WLAN_ESE */
-		if (ese_config
-		    || csr_roam_is_fast_roam_enabled(mac, sessionId))
-			csr_join_req->isFastTransitionEnabled = true;
-		else
-			csr_join_req->isFastTransitionEnabled = false;
-
-		if (csr_roam_is_fast_roam_enabled(mac, sessionId))
-			csr_join_req->isFastRoamIniFeatureEnabled = true;
-		else
-			csr_join_req->isFastRoamIniFeatureEnabled = false;
-
-		csr_join_req->txLdpcIniFeatureEnabled =
-			(uint8_t)mac->mlme_cfg->ht_caps.tx_ldpc_enable;
 
 		if ((csr_is11h_supported(mac)) &&
 			(WLAN_REG_IS_5GHZ_CH_FREQ(bss_freq)) &&
@@ -15627,45 +15615,11 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
 			csr_apply_power2_current(mac);
 		}
 
-		csr_join_req->enableVhtpAid =
-			mac->mlme_cfg->vht_caps.vht_cap_info.enable_paid;
-
-		csr_join_req->enableVhtGid =
-			mac->mlme_cfg->vht_caps.vht_cap_info.enable_gid;
-
-		csr_join_req->enableAmpduPs =
-			(uint8_t)mac->mlme_cfg->ht_caps.enable_ampdu_ps;
-
-		csr_join_req->enableHtSmps =
-			(uint8_t)mac->mlme_cfg->ht_caps.enable_smps;
-
-		csr_join_req->htSmps = (uint8_t)mac->mlme_cfg->ht_caps.smps;
-		csr_join_req->send_smps_action =
-			mac->roam.configParam.send_smps_action;
-
-		csr_join_req->max_amsdu_num =
-			(uint8_t)mac->mlme_cfg->ht_caps.max_num_amsdu;
-
-		if (mac->roam.roamSession[sessionId].fWMMConnection)
-			csr_join_req->isWMEenabled = true;
-		else
-			csr_join_req->isWMEenabled = false;
-
-		if (mac->roam.roamSession[sessionId].fQOSConnection)
-			csr_join_req->isQosEnabled = true;
-		else
-			csr_join_req->isQosEnabled = false;
-
 		if (pProfile->bOSENAssociation)
 			csr_join_req->isOSENConnection = true;
 		else
 			csr_join_req->isOSENConnection = false;
 
-		/* Fill rrm config parameters */
-		qdf_mem_copy(&csr_join_req->rrm_config,
-			     &mac->rrm.rrmConfig,
-			     sizeof(struct rrm_config_param));
-
 		pAP_capabilityInfo =
 			(tSirMacCapabilityInfo *)
 				&pBssDescription->capabilityInfo;
@@ -15758,10 +15712,6 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
 			break;
 		}
 
-		if (pSession->pCurRoamProfile->csrPersona == QDF_STA_MODE)
-			csr_join_req->enable_bcast_probe_rsp =
-				mac->mlme_cfg->oce.enable_bcast_probe_rsp;
-
 		csr_join_req->enable_session_twt_support = csr_enable_twt(mac,
 									  pIes);
 		status = umac_send_mb_message_to_mac(csr_join_req);