Parcourir la source

qcacld-3.0: Replace tpPESession in lim_utils

To align with the Linux coding style replace tpPESession with struct
pe_session * in lim_utils.

Change-Id: Icdc8a2de69a676aa54d7f13b3373dc872ccb8889
CRs-Fixed: 2354269
Jeff Johnson il y a 6 ans
Parent
commit
c8baa90f9e
2 fichiers modifiés avec 221 ajouts et 221 suppressions
  1. 108 108
      core/mac/src/pe/lim/lim_utils.c
  2. 113 113
      core/mac/src/pe/lim/lim_utils.h

+ 108 - 108
core/mac/src/pe/lim/lim_utils.c

@@ -1007,7 +1007,7 @@ void lim_handle_update_olbc_cache(tpAniSirGlobal mac_ctx)
 	static int enable;
 	tUpdateBeaconParams beaconParams;
 
-	tpPESession psessionEntry = lim_is_ap_session_active(mac_ctx);
+	struct pe_session *psessionEntry = lim_is_ap_session_active(mac_ctx);
 
 	if (psessionEntry == NULL) {
 		pe_err(" Session not found");
@@ -1144,7 +1144,7 @@ lim_update_prot_sta_params(tpAniSirGlobal mac,
 			   tSirMacAddr peerMacAddr,
 			   tLimProtStaCacheType protStaCacheType,
 			   tHalBitVal gfSupported, tHalBitVal lsigTxopSupported,
-			   tpPESession psessionEntry)
+			   struct pe_session *psessionEntry)
 {
 	uint32_t i;
 
@@ -1216,7 +1216,7 @@ lim_update_prot_sta_params(tpAniSirGlobal mac,
 void
 lim_decide_ap_protection(tpAniSirGlobal mac, tSirMacAddr peerMacAddr,
 			 tpUpdateBeaconParams pBeaconParams,
-			 tpPESession psessionEntry)
+			 struct pe_session *psessionEntry)
 {
 	uint16_t tmpAid;
 	tpDphHashNode pStaDs;
@@ -1335,7 +1335,7 @@ lim_decide_ap_protection(tpAniSirGlobal mac, tSirMacAddr peerMacAddr,
 void
 lim_enable_overlap11g_protection(tpAniSirGlobal mac,
 				 tpUpdateBeaconParams pBeaconParams,
-				 tpSirMacMgmtHdr pMh, tpPESession psessionEntry)
+				 tpSirMacMgmtHdr pMh, struct pe_session *psessionEntry)
 {
 	lim_update_overlap_sta_param(mac, pMh->bssId,
 				     &(psessionEntry->gLimOlbcParams));
@@ -1354,7 +1354,7 @@ lim_enable_overlap11g_protection(tpAniSirGlobal mac,
  * @mac_ctx: pointer to Global MAC structure
  * @peer_mac_addr: pointer to tSirMacAddr
  * @pbeaconparams: pointer to tpUpdateBeaconParams
- * @psession_entry: pointer to tpPESession
+ * @psession_entry: pointer to struct pe_session *
  *
  * Function Updates short preamble if needed when a new station joins
  *
@@ -1363,7 +1363,7 @@ lim_enable_overlap11g_protection(tpAniSirGlobal mac,
 void
 lim_update_short_preamble(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr,
 				tpUpdateBeaconParams beaconparams,
-				tpPESession psession_entry)
+				struct pe_session *psession_entry)
 {
 	uint16_t aid;
 	tpDphHashNode sta_ds;
@@ -1461,7 +1461,7 @@ lim_update_short_preamble(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr,
  * @mac_ctx: pointer to Global MAC structure
  * @peer_mac_addr: pointer to tSirMacAddr
  * @beacon_params: pointer to tpUpdateBeaconParams
- * @psession_entry: pointer to tpPESession
+ * @psession_entry: pointer to struct pe_session *
  *
  * Function Updates short slot time if needed when a new station joins
  *
@@ -1470,7 +1470,7 @@ lim_update_short_preamble(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr,
 void
 lim_update_short_slot_time(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr,
 			   tpUpdateBeaconParams beacon_params,
-			   tpPESession session_entry)
+			   struct pe_session *session_entry)
 {
 	uint16_t aid;
 	tpDphHashNode sta_ds;
@@ -1601,7 +1601,7 @@ lim_update_short_slot_time(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr,
 void
 lim_decide_sta_protection_on_assoc(tpAniSirGlobal mac,
 				   tpSchBeaconStruct pBeaconStruct,
-				   tpPESession psessionEntry)
+				   struct pe_session *psessionEntry)
 {
 	enum band_info rfBand = BAND_UNKNOWN;
 	uint32_t phyMode = WNI_CFG_PHY_MODE_NONE;
@@ -1713,7 +1713,7 @@ static void
 lim_decide_sta_11bg_protection(tpAniSirGlobal mac_ctx,
 			tpSchBeaconStruct beacon_struct,
 			tpUpdateBeaconParams beaconparams,
-			tpPESession psession_entry,
+			struct pe_session *psession_entry,
 			uint32_t phy_mode)
 {
 
@@ -1835,7 +1835,7 @@ void
 lim_decide_sta_protection(tpAniSirGlobal mac_ctx,
 				tpSchBeaconStruct beacon_struct,
 				tpUpdateBeaconParams beaconparams,
-				tpPESession psession_entry)
+				struct pe_session *psession_entry)
 {
 
 	enum band_info rfband = BAND_UNKNOWN;
@@ -1957,7 +1957,7 @@ lim_decide_sta_protection(tpAniSirGlobal mac_ctx,
  */
 void lim_process_channel_switch_timeout(tpAniSirGlobal mac)
 {
-	tpPESession psessionEntry = NULL;
+	struct pe_session *psessionEntry = NULL;
 	uint8_t channel; /* This is received and stored from channelSwitch Action frame */
 
 	psessionEntry = pe_find_session_by_session_id(mac,
@@ -2055,7 +2055,7 @@ void lim_process_channel_switch_timeout(tpAniSirGlobal mac)
  * lim_update_channel_switch() - This Function updates channel switch
  * @mac_ctx: pointer to Global MAC structure
  * @beacon: pointer to tpSirProbeRespBeacon
- * @psessionentry: pointer to tpPESession
+ * @psessionentry: pointer to struct pe_session *
  *
  * This function is invoked whenever Station receives
  * either 802.11h channel switch IE or airgo proprietary
@@ -2066,7 +2066,7 @@ void lim_process_channel_switch_timeout(tpAniSirGlobal mac)
 void
 lim_update_channel_switch(struct mac_context *mac_ctx,
 			tpSirProbeRespBeacon beacon,
-			tpPESession psession_entry)
+			struct pe_session *psession_entry)
 {
 	uint16_t beacon_period;
 	tDot11fIEChanSwitchAnn *chnl_switch;
@@ -2162,7 +2162,7 @@ lim_update_channel_switch(struct mac_context *mac_ctx,
  * @return None
  */
 void lim_cancel_dot11h_channel_switch(tpAniSirGlobal mac,
-				      tpPESession psessionEntry)
+				      struct pe_session *psessionEntry)
 {
 	if (!LIM_IS_STA_ROLE(psessionEntry))
 		return;
@@ -2195,7 +2195,7 @@ void lim_cancel_dot11h_channel_switch(tpAniSirGlobal mac,
  */
 void
 lim_util_count_sta_add(tpAniSirGlobal mac,
-		       tpDphHashNode pSta, tpPESession psessionEntry)
+		       tpDphHashNode pSta, struct pe_session *psessionEntry)
 {
 
 	if ((!pSta) || (!pSta->valid) || (pSta->fAniCount))
@@ -2212,7 +2212,7 @@ lim_util_count_sta_add(tpAniSirGlobal mac,
 
 void
 lim_util_count_sta_del(tpAniSirGlobal mac,
-		       tpDphHashNode pSta, tpPESession psessionEntry)
+		       tpDphHashNode pSta, struct pe_session *psessionEntry)
 {
 
 	if ((pSta == NULL) || (!pSta->fAniCount))
@@ -2257,7 +2257,7 @@ lim_util_count_sta_del(tpAniSirGlobal mac,
  * @return NONE
  */
 void lim_switch_channel_cback(tpAniSirGlobal mac, QDF_STATUS status,
-			      uint32_t *data, tpPESession psessionEntry)
+			      uint32_t *data, struct pe_session *psessionEntry)
 {
 	struct scheduler_msg mmhMsg = { 0 };
 	tSirSmeSwitchChannelInd *pSirSmeSwitchChInd;
@@ -2322,7 +2322,7 @@ void lim_switch_channel_cback(tpAniSirGlobal mac, QDF_STATUS status,
  * @return NONE
  */
 void lim_switch_primary_channel(tpAniSirGlobal mac, uint8_t newChannel,
-				tpPESession psessionEntry)
+				struct pe_session *psessionEntry)
 {
 	pe_debug("old chnl: %d --> new chnl: %d",
 		       psessionEntry->currentOperChannel, newChannel);
@@ -2361,7 +2361,7 @@ void lim_switch_primary_channel(tpAniSirGlobal mac, uint8_t newChannel,
  * @return NONE
  */
 void lim_switch_primary_secondary_channel(tpAniSirGlobal mac,
-					tpPESession psessionEntry,
+					struct pe_session *psessionEntry,
 					uint8_t newChannel,
 					uint8_t ch_center_freq_seg0,
 					uint8_t ch_center_freq_seg1,
@@ -2437,7 +2437,7 @@ void lim_switch_primary_secondary_channel(tpAniSirGlobal mac,
  */
 
 uint8_t lim_get_ht_capability(tpAniSirGlobal mac,
-			      uint32_t htCap, tpPESession psessionEntry)
+			      uint32_t htCap, struct pe_session *psessionEntry)
 {
 	uint8_t retVal = 0;
 	uint8_t *ptr;
@@ -2630,7 +2630,7 @@ static void
 lim_enable_11a_protection(tpAniSirGlobal mac_ctx,
 			 uint8_t overlap,
 			 tpUpdateBeaconParams bcn_prms,
-			 tpPESession pe_session)
+			 struct pe_session *pe_session)
 {
 	/*
 	 * If we are AP and HT capable, we need to set the HT OP mode
@@ -2691,7 +2691,7 @@ static void
 lim_disable_11a_protection(tpAniSirGlobal mac_ctx,
 			   uint8_t overlap,
 			   tpUpdateBeaconParams bcn_prms,
-			   tpPESession pe_session)
+			   struct pe_session *pe_session)
 {
 	if (false == pe_session->beaconParams.llaCoexist)
 		return;
@@ -2799,7 +2799,7 @@ disable_11a_end:
 QDF_STATUS
 lim_update_11a_protection(tpAniSirGlobal mac_ctx, uint8_t enable,
 			 uint8_t overlap, tpUpdateBeaconParams bcn_prms,
-			 tpPESession session)
+			 struct pe_session *session)
 {
 	if (NULL == session) {
 		pe_err("session is NULL");
@@ -2829,7 +2829,7 @@ lim_update_11a_protection(tpAniSirGlobal mac_ctx, uint8_t enable,
  * @mac_ctx: pointer to Globale Mac structure
  * @beaconparams: pointer to tpUpdateBeaconParams
  * @overlap: 1=> called from overlap context, 0 => called from assoc context.
- * @session_entry: pointer to tpPESession
+ * @session_entry: pointer to struct pe_session *
  *
  * Function handles 11g protection enaled case
  *
@@ -2838,7 +2838,7 @@ lim_update_11a_protection(tpAniSirGlobal mac_ctx, uint8_t enable,
 static void
 lim_handle_enable11g_protection_enabled(tpAniSirGlobal mac_ctx,
 			tpUpdateBeaconParams beaconparams,
-			uint8_t overlap, tpPESession session_entry)
+			uint8_t overlap, struct pe_session *session_entry)
 {
 	/*
 	 * If we are AP and HT capable, we need to set the HT OP mode
@@ -2908,7 +2908,7 @@ lim_handle_enable11g_protection_enabled(tpAniSirGlobal mac_ctx,
  * @mac_ctx: pointer to Globale Mac structure
  * @beaconparams: pointer to tpUpdateBeaconParams
  * @overlap: 1=> called from overlap context, 0 => called from assoc context.
- * @session_entry: pointer to tpPESession
+ * @session_entry: pointer to struct pe_session *
  *
  * Function handles 11g protection for 11b co-exist
  *
@@ -2917,7 +2917,7 @@ lim_handle_enable11g_protection_enabled(tpAniSirGlobal mac_ctx,
 static void
 lim_handle_11g_protection_for_11bcoexist(tpAniSirGlobal mac_ctx,
 			tpUpdateBeaconParams beaconparams,
-			uint8_t overlap, tpPESession session_entry)
+			uint8_t overlap, struct pe_session *session_entry)
 {
 	/*
 	 * For AP role:
@@ -3038,7 +3038,7 @@ lim_handle_11g_protection_for_11bcoexist(tpAniSirGlobal mac_ctx,
  * @enable: 1=> enable protection, 0=> disable protection.
  * @overlap: 1=> called from overlap context, 0 => called from assoc context.
  * @beaconparams: pointer to tpUpdateBeaconParams
- * @session_entry: pointer to tpPESession
+ * @session_entry: pointer to struct pe_session *
  *
  * based on config setting enables\disables 11g protection.
  *
@@ -3047,7 +3047,7 @@ lim_handle_11g_protection_for_11bcoexist(tpAniSirGlobal mac_ctx,
 QDF_STATUS
 lim_enable11g_protection(tpAniSirGlobal mac_ctx, uint8_t enable,
 			 uint8_t overlap, tpUpdateBeaconParams beaconparams,
-			 tpPESession session_entry)
+			 struct pe_session *session_entry)
 {
 
 	/* overlapping protection configuration check. */
@@ -3089,7 +3089,7 @@ QDF_STATUS
 lim_enable_ht_protection_from11g(tpAniSirGlobal mac, uint8_t enable,
 				 uint8_t overlap,
 				 tpUpdateBeaconParams pBeaconParams,
-				 tpPESession psessionEntry)
+				 struct pe_session *psessionEntry)
 {
 	if (!psessionEntry->htCapability)
 		return QDF_STATUS_SUCCESS;  /* protection from 11g is only for HT stations. */
@@ -3318,7 +3318,7 @@ lim_enable_ht_protection_from11g(tpAniSirGlobal mac, uint8_t enable,
 QDF_STATUS
 lim_enable_ht_obss_protection(tpAniSirGlobal mac, uint8_t enable,
 			      uint8_t overlap, tpUpdateBeaconParams pBeaconParams,
-			      tpPESession psessionEntry)
+			      struct pe_session *psessionEntry)
 {
 
 	if (!psessionEntry->htCapability)
@@ -3389,7 +3389,7 @@ lim_enable_ht_obss_protection(tpAniSirGlobal mac, uint8_t enable,
  * @mac_ctx: pointer to Gloal Mac Structure
  * @overlap: variable for overlap detection
  * @beaconparams: pointer to tpUpdateBeaconParams
- * @session_entry: pointer to tpPESession
+ * @session_entry: pointer to struct pe_session *
  *
  * Function handles ht20 protection enabled
  *
@@ -3397,7 +3397,7 @@ lim_enable_ht_obss_protection(tpAniSirGlobal mac, uint8_t enable,
  */
 static void lim_handle_ht20protection_enabled(tpAniSirGlobal mac_ctx,
 			uint8_t overlap, tpUpdateBeaconParams beaconparams,
-			tpPESession session_entry)
+			struct pe_session *session_entry)
 {
 	/*
 	 * If we are AP and HT capable, we need to set the HT OP mode
@@ -3441,7 +3441,7 @@ static void lim_handle_ht20protection_enabled(tpAniSirGlobal mac_ctx,
  * lim_handle_ht20coexist_ht20protection() - ht20 protection for ht20 coexist
  * @mac_ctx: pointer to Gloal Mac Structure
  * @beaconparams: pointer to tpUpdateBeaconParams
- * @session_entry: pointer to tpPESession
+ * @session_entry: pointer to struct pe_session *
  * @overlap: variable for overlap detection
  *
  * Function handles ht20 protection for ht20 coexist
@@ -3450,7 +3450,7 @@ static void lim_handle_ht20protection_enabled(tpAniSirGlobal mac_ctx,
  */
 static void lim_handle_ht20coexist_ht20protection(tpAniSirGlobal mac_ctx,
 			tpUpdateBeaconParams beaconparams,
-			tpPESession session_entry, uint8_t overlap)
+			struct pe_session *session_entry, uint8_t overlap)
 {
 	/*
 	 * For AP role:
@@ -3535,7 +3535,7 @@ static void lim_handle_ht20coexist_ht20protection(tpAniSirGlobal mac_ctx,
  * @enable: 1=> enable protection, 0=> disable protection.
  * @overlap: 1=> called from overlap context, 0 => called from assoc context.
  * @beaconparams: pointer to tpUpdateBeaconParams
- * @session_entry: pointer to tpPESession
+ * @session_entry: pointer to struct pe_session *
  *
  * based on cofig enables\disables protection from Ht20
  *
@@ -3543,7 +3543,7 @@ static void lim_handle_ht20coexist_ht20protection(tpAniSirGlobal mac_ctx,
  */
 QDF_STATUS lim_enable_ht20_protection(tpAniSirGlobal mac_ctx, uint8_t enable,
 			   uint8_t overlap, tpUpdateBeaconParams beaconparams,
-			   tpPESession session_entry)
+			   struct pe_session *session_entry)
 {
 	/* This protection  is only for HT stations. */
 	if (!session_entry->htCapability)
@@ -3587,7 +3587,7 @@ QDF_STATUS lim_enable_ht20_protection(tpAniSirGlobal mac_ctx, uint8_t enable,
 QDF_STATUS
 lim_enable_ht_non_gf_protection(tpAniSirGlobal mac, uint8_t enable,
 				uint8_t overlap, tpUpdateBeaconParams pBeaconParams,
-				tpPESession psessionEntry)
+				struct pe_session *psessionEntry)
 {
 	if (!psessionEntry->htCapability)
 		return QDF_STATUS_SUCCESS;  /* this protection  is only for HT stations. */
@@ -3661,7 +3661,7 @@ QDF_STATUS
 lim_enable_ht_lsig_txop_protection(tpAniSirGlobal mac, uint8_t enable,
 				   uint8_t overlap,
 				   tpUpdateBeaconParams pBeaconParams,
-				   tpPESession psessionEntry)
+				   struct pe_session *psessionEntry)
 {
 	if (!psessionEntry->htCapability)
 		return QDF_STATUS_SUCCESS;  /* this protection  is only for HT stations. */
@@ -3746,7 +3746,7 @@ lim_enable_ht_lsig_txop_protection(tpAniSirGlobal mac, uint8_t enable,
 QDF_STATUS
 lim_enable_ht_rifs_protection(tpAniSirGlobal mac, uint8_t enable,
 			      uint8_t overlap, tpUpdateBeaconParams pBeaconParams,
-			      tpPESession psessionEntry)
+			      struct pe_session *psessionEntry)
 {
 	if (!psessionEntry->htCapability)
 		return QDF_STATUS_SUCCESS;  /* this protection  is only for HT stations. */
@@ -3832,7 +3832,7 @@ lim_enable_ht_rifs_protection(tpAniSirGlobal mac, uint8_t enable,
 QDF_STATUS
 lim_enable_short_preamble(tpAniSirGlobal mac, uint8_t enable,
 			  tpUpdateBeaconParams pBeaconParams,
-			  tpPESession psessionEntry)
+			  struct pe_session *psessionEntry)
 {
 	if (!mac->mlme_cfg->ht_caps.short_preamble)
 		return QDF_STATUS_SUCCESS;
@@ -3929,7 +3929,7 @@ QDF_STATUS lim_tx_complete(void *context, qdf_nbuf_t buf, bool free)
 void lim_update_sta_run_time_ht_switch_chnl_params(tpAniSirGlobal mac,
 						   tDot11fIEHTInfo *pHTInfo,
 						   uint8_t bssIdx,
-						   tpPESession psessionEntry)
+						   struct pe_session *psessionEntry)
 {
 	uint8_t center_freq = 0;
 	enum phy_ch_width ch_width = CH_WIDTH_20MHZ;
@@ -4075,7 +4075,7 @@ void lim_update_sta_run_time_ht_capability(tpAniSirGlobal mac,
 
 void lim_update_sta_run_time_ht_info(tpAniSirGlobal mac,
 				     tDot11fIEHTInfo *pHTInfo,
-				     tpPESession psessionEntry)
+				     struct pe_session *psessionEntry)
 {
 	if (psessionEntry->htRecommendedTxWidthSet !=
 	    (uint8_t) pHTInfo->recommendedTxWidthSet) {
@@ -4161,7 +4161,7 @@ void lim_update_sta_run_time_ht_info(tpAniSirGlobal mac,
 
 QDF_STATUS
 lim_validate_delts_req(tpAniSirGlobal mac_ctx, tpSirDeltsReq delts_req,
-		       tSirMacAddr peer_mac_addr, tpPESession psession_entry)
+		       tSirMacAddr peer_mac_addr, struct pe_session *psession_entry)
 {
 	tpDphHashNode sta;
 	uint8_t ts_status;
@@ -4498,7 +4498,7 @@ bool lim_is_channel_valid_for_channel_switch(tpAniSirGlobal mac, uint8_t channel
  */
 
 QDF_STATUS
-lim_restore_pre_channel_switch_state(tpAniSirGlobal mac, tpPESession psessionEntry)
+lim_restore_pre_channel_switch_state(tpAniSirGlobal mac, struct pe_session *psessionEntry)
 {
 
 	QDF_STATUS retCode = QDF_STATUS_SUCCESS;
@@ -4532,7 +4532,7 @@ lim_restore_pre_channel_switch_state(tpAniSirGlobal mac, tpPESession psessionEnt
  * @return None
  */
 void
-lim_prepare_for11h_channel_switch(tpAniSirGlobal mac, tpPESession psessionEntry)
+lim_prepare_for11h_channel_switch(tpAniSirGlobal mac, struct pe_session *psessionEntry)
 {
 	if (!LIM_IS_STA_ROLE(psessionEntry))
 		return;
@@ -4631,7 +4631,7 @@ uint8_t lim_get_channel_from_beacon(tpAniSirGlobal mac, tpSchBeaconStruct pBeaco
 }
 
 void lim_set_tspec_uapsd_mask_per_session(tpAniSirGlobal mac,
-					  tpPESession psessionEntry,
+					  struct pe_session *psessionEntry,
 					  tSirMacTSInfo *pTsInfo, uint32_t action)
 {
 	uint8_t userPrio = (uint8_t) pTsInfo->traffic.userPrio;
@@ -4687,14 +4687,14 @@ void lim_set_tspec_uapsd_mask_per_session(tpAniSirGlobal mac,
 /**
  * lim_handle_heart_beat_timeout_for_session() - Handle heart beat time out
  * @mac_ctx: pointer to Global Mac Structure
- * @psession_entry: pointer to tpPESession
+ * @psession_entry: pointer to struct pe_session *
  *
  * Function handles heart beat time out for session
  *
  * Return: none
  */
 void lim_handle_heart_beat_timeout_for_session(tpAniSirGlobal mac_ctx,
-					       tpPESession psession_entry)
+					       struct pe_session *psession_entry)
 {
 	if (psession_entry->valid == true) {
 		if (psession_entry->bssType == eSIR_IBSS_MODE)
@@ -4757,7 +4757,7 @@ uint8_t lim_get_current_operating_channel(tpAniSirGlobal mac)
  */
 void lim_process_add_sta_rsp(tpAniSirGlobal mac_ctx, struct scheduler_msg *msg)
 {
-	tpPESession session;
+	struct pe_session *session;
 	tpAddStaParams add_sta_params;
 
 	add_sta_params = (tpAddStaParams) msg->bodyptr;
@@ -4827,7 +4827,7 @@ void lim_update_beacon(tpAniSirGlobal mac_ctx)
 void lim_handle_heart_beat_failure_timeout(tpAniSirGlobal mac_ctx)
 {
 	uint8_t i;
-	tpPESession psession_entry;
+	struct pe_session *psession_entry;
 	/*
 	 * Probe response is not received  after HB failure.
 	 * This is handled by LMM sub module.
@@ -4895,7 +4895,7 @@ void lim_handle_heart_beat_failure_timeout(tpAniSirGlobal mac_ctx)
 /*
  * This function assumes there will not be more than one IBSS session active at any time.
  */
-tpPESession lim_is_ibss_session_active(tpAniSirGlobal mac)
+struct pe_session *lim_is_ibss_session_active(tpAniSirGlobal mac)
 {
 	uint8_t i;
 
@@ -4909,7 +4909,7 @@ tpPESession lim_is_ibss_session_active(tpAniSirGlobal mac)
 	return NULL;
 }
 
-tpPESession lim_is_ap_session_active(tpAniSirGlobal mac)
+struct pe_session *lim_is_ap_session_active(tpAniSirGlobal mac)
 {
 	uint8_t i;
 
@@ -4956,7 +4956,7 @@ void lim_handle_defer_msg_error(tpAniSirGlobal mac,
    \return void
    -----------------------------------------------------------*/
 void lim_diag_event_report(tpAniSirGlobal mac, uint16_t eventType,
-			   tpPESession pSessionEntry, uint16_t status,
+			   struct pe_session *pSessionEntry, uint16_t status,
 			   uint16_t reasonCode)
 {
 	tSirMacAddr nullBssid = { 0, 0, 0, 0, 0, 0 };
@@ -4986,7 +4986,7 @@ void lim_diag_event_report(tpAniSirGlobal mac, uint16_t eventType,
 
 static void lim_diag_fill_mgmt_event_report(tpAniSirGlobal mac_ctx,
 			tpSirMacMgmtHdr mac_hdr,
-			tpPESession session, uint16_t result_code,
+			struct pe_session *session, uint16_t result_code,
 			uint16_t reason_code,
 			struct host_event_wlan_mgmt_payload_type *mgmt_event)
 {
@@ -5010,7 +5010,7 @@ static void lim_diag_fill_mgmt_event_report(tpAniSirGlobal mac_ctx,
 }
 
 void lim_diag_mgmt_tx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
-				   tpPESession session, uint16_t result_code,
+				   struct pe_session *session, uint16_t result_code,
 				   uint16_t reason_code)
 {
 	tpSirMacMgmtHdr mac_hdr = mgmt_hdr;
@@ -5035,7 +5035,7 @@ void lim_diag_mgmt_tx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
 }
 
 void lim_diag_mgmt_rx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
-				   tpPESession session, uint16_t result_code,
+				   struct pe_session *session, uint16_t result_code,
 				   uint16_t reason_code)
 {
 	tpSirMacMgmtHdr mac_hdr = mgmt_hdr;
@@ -5101,7 +5101,7 @@ uint8_t lim_get_noa_attr_stream_in_mult_p2p_ies(tpAniSirGlobal mac,
 
 /* Returns length of NoA stream and Pointer pNoaStream passed to this function is filled with noa stream */
 uint8_t lim_get_noa_attr_stream(tpAniSirGlobal mac, uint8_t *pNoaStream,
-				tpPESession psessionEntry)
+				struct pe_session *psessionEntry)
 {
 	uint8_t len = 0;
 
@@ -5227,7 +5227,7 @@ void lim_pmf_sa_query_timer_handler(void *pMacGlobal, uint32_t param)
 {
 	tpAniSirGlobal mac = (tpAniSirGlobal) pMacGlobal;
 	tPmfSaQueryTimerId timerId;
-	tpPESession psessionEntry;
+	struct pe_session *psessionEntry;
 	tpDphHashNode pSta;
 	uint8_t maxretries;
 
@@ -5279,7 +5279,7 @@ void lim_pmf_sa_query_timer_handler(void *pMacGlobal, uint32_t param)
 }
 #endif
 
-bool lim_check_vht_op_mode_change(tpAniSirGlobal mac, tpPESession psessionEntry,
+bool lim_check_vht_op_mode_change(tpAniSirGlobal mac, struct pe_session *psessionEntry,
 				  uint8_t chanWidth, uint8_t staId,
 				  uint8_t *peerMac)
 {
@@ -5296,7 +5296,7 @@ bool lim_check_vht_op_mode_change(tpAniSirGlobal mac, tpPESession psessionEntry,
 }
 
 #ifdef WLAN_FEATURE_11AX_BSS_COLOR
-bool lim_send_he_ie_update(tpAniSirGlobal mac_ctx, tpPESession pe_session)
+bool lim_send_he_ie_update(tpAniSirGlobal mac_ctx, struct pe_session *pe_session)
 {
 	QDF_STATUS status;
 
@@ -5310,7 +5310,7 @@ bool lim_send_he_ie_update(tpAniSirGlobal mac_ctx, tpPESession pe_session)
 }
 #endif
 
-bool lim_set_nss_change(tpAniSirGlobal mac, tpPESession psessionEntry,
+bool lim_set_nss_change(tpAniSirGlobal mac, struct pe_session *psessionEntry,
 			uint8_t rxNss, uint8_t staId, uint8_t *peerMac)
 {
 	tUpdateRxNss tempParam;
@@ -5331,7 +5331,7 @@ bool lim_set_nss_change(tpAniSirGlobal mac, tpPESession psessionEntry,
 }
 
 bool lim_check_membership_user_position(tpAniSirGlobal mac,
-					tpPESession psessionEntry,
+					struct pe_session *psessionEntry,
 					uint32_t membership, uint32_t userPosition,
 					uint8_t staId)
 {
@@ -5357,7 +5357,7 @@ bool lim_check_membership_user_position(tpAniSirGlobal mac,
 	return true;
 }
 
-void lim_get_short_slot_from_phy_mode(tpAniSirGlobal mac, tpPESession psessionEntry,
+void lim_get_short_slot_from_phy_mode(tpAniSirGlobal mac, struct pe_session *psessionEntry,
 				      uint32_t phyMode, uint8_t *pShortSlotEnabled)
 {
 	uint8_t val = 0;
@@ -5416,7 +5416,7 @@ void lim_get_short_slot_from_phy_mode(tpAniSirGlobal mac, tpPESession psessionEn
  */
 void
 lim_set_protected_bit(tpAniSirGlobal mac,
-		      tpPESession psessionEntry,
+		      struct pe_session *psessionEntry,
 		      tSirMacAddr peer, tpSirMacMgmtHdr pMacHdr)
 {
 	uint16_t aid;
@@ -5444,7 +5444,7 @@ lim_set_protected_bit(tpAniSirGlobal mac,
 } /*** end lim_set_protected_bit() ***/
 #endif
 
-void lim_set_ht_caps(tpAniSirGlobal p_mac, tpPESession p_session_entry,
+void lim_set_ht_caps(tpAniSirGlobal p_mac, struct pe_session *p_session_entry,
 		uint8_t *p_ie_start, uint32_t num_bytes)
 {
 	const uint8_t *p_ie = NULL;
@@ -5519,7 +5519,7 @@ void lim_set_ht_caps(tpAniSirGlobal p_mac, tpPESession p_session_entry,
 	}
 }
 
-void lim_set_vht_caps(tpAniSirGlobal p_mac, tpPESession p_session_entry,
+void lim_set_vht_caps(tpAniSirGlobal p_mac, struct pe_session *p_session_entry,
 		      uint8_t *p_ie_start, uint32_t num_bytes)
 {
 	const uint8_t       *p_ie = NULL;
@@ -5592,7 +5592,7 @@ void lim_set_vht_caps(tpAniSirGlobal p_mac, tpPESession p_session_entry,
  * Return: true or false
  */
 bool lim_validate_received_frame_a1_addr(tpAniSirGlobal mac_ctx,
-		tSirMacAddr a1, tpPESession session)
+		tSirMacAddr a1, struct pe_session *session)
 {
 	if (mac_ctx == NULL || session == NULL) {
 		pe_err("mac or session context is null");
@@ -5658,7 +5658,7 @@ void lim_set_stads_rtt_cap(tpDphHashNode sta_ds, struct s_ext_cap *ext_cap,
 }
 
 #ifdef WLAN_SUPPORT_TWT
-void lim_set_peer_twt_cap(tpPESession session, struct s_ext_cap *ext_cap)
+void lim_set_peer_twt_cap(struct pe_session *session, struct s_ext_cap *ext_cap)
 {
 	if (session->enable_session_twt_support) {
 		session->peer_twt_requestor = ext_cap->twt_requestor_support;
@@ -5846,7 +5846,7 @@ end:
  * Return: status of operation
  */
 QDF_STATUS lim_send_ies_per_band(tpAniSirGlobal mac_ctx,
-				 tpPESession session,
+				 struct pe_session *session,
 				 uint8_t vdev_id)
 {
 	uint8_t ht_caps[DOT11F_IE_HTCAPS_MIN_LEN + 2] = {0};
@@ -6090,7 +6090,7 @@ QDF_STATUS lim_strip_ie(tpAniSirGlobal mac_ctx,
 }
 
 #ifdef WLAN_FEATURE_11W
-void lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, tpPESession pe_session)
+void lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, struct pe_session *pe_session)
 {
 	uint32_t associated_sta;
 	tpDphHashNode sta_ds = NULL;
@@ -6306,7 +6306,7 @@ QDF_STATUS lim_send_action_frm_tb_ppdu_cfg(struct mac_context *mac_ctx,
 {
 	tDot11fvendor_action_frame *frm;
 	uint8_t frm_len = sizeof(*frm);
-	tpPESession session;
+	struct pe_session *session;
 	struct cfg_action_frm_tb_ppdu *cfg_msg;
 	struct scheduler_msg msg = {0};
 	uint8_t *data_buf;
@@ -6414,7 +6414,7 @@ const char *lim_bss_type_to_string(const uint16_t bss_type)
  *
  * Return: None
  */
-void lim_init_obss_params(tpAniSirGlobal mac_ctx, tpPESession session)
+void lim_init_obss_params(tpAniSirGlobal mac_ctx, struct pe_session *session)
 {
 	struct wlan_mlme_obss_ht40 *obss_ht40;
 
@@ -6454,7 +6454,7 @@ void lim_init_obss_params(tpAniSirGlobal mac_ctx, tpPESession session)
  *
  * Return: None
  */
-void lim_update_obss_scanparams(tpPESession session,
+void lim_update_obss_scanparams(struct pe_session *session,
 			tDot11fIEOBSSScanParameters *scan_params)
 {
 	/*
@@ -6614,7 +6614,7 @@ void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx,
  * @return None
  */
 void lim_send_set_dtim_period(tpAniSirGlobal mac_ctx, uint8_t dtim_period,
-			      tpPESession session)
+			      struct pe_session *session)
 {
 	struct set_dtim_params *dtim_params = NULL;
 	QDF_STATUS ret = QDF_STATUS_SUCCESS;
@@ -6720,7 +6720,7 @@ void lim_add_he_cap(tpAddStaParams add_sta_params, tpSirAssocReq assoc_req)
 		     sizeof(add_sta_params->he_config));
 }
 
-void lim_add_self_he_cap(tpAddStaParams add_sta_params, tpPESession session)
+void lim_add_self_he_cap(tpAddStaParams add_sta_params, struct pe_session *session)
 {
 	if (!session)
 		return;
@@ -6795,7 +6795,7 @@ static void lim_intersect_he_caps(tDot11fIEhe_cap *rcvd_he,
 					peer_he->twt_responder : 0;
 }
 
-void lim_intersect_sta_he_caps(tpSirAssocReq assoc_req, tpPESession session,
+void lim_intersect_sta_he_caps(tpSirAssocReq assoc_req, struct pe_session *session,
 		tpDphHashNode sta_ds)
 {
 	tDot11fIEhe_cap *rcvd_he = &assoc_req->he_cap;
@@ -6806,7 +6806,7 @@ void lim_intersect_sta_he_caps(tpSirAssocReq assoc_req, tpPESession session,
 		lim_intersect_he_caps(rcvd_he, session_he, peer_he);
 }
 
-void lim_intersect_ap_he_caps(tpPESession session, tpAddBssParams add_bss,
+void lim_intersect_ap_he_caps(struct pe_session *session, tpAddBssParams add_bss,
 		tSchBeaconStruct *beacon, tpSirAssocRsp assoc_rsp)
 {
 	tDot11fIEhe_cap *rcvd_he;
@@ -6838,13 +6838,13 @@ void lim_add_bss_he_cap(tpAddBssParams add_bss, tpSirAssocRsp assoc_rsp)
 			     he_op, sizeof(*he_op));
 }
 
-void lim_add_bss_he_cfg(tpAddBssParams add_bss, tpPESession session)
+void lim_add_bss_he_cfg(tpAddBssParams add_bss, struct pe_session *session)
 {
 	add_bss->he_sta_obsspd = session->he_sta_obsspd;
 }
 
 void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
-			      tpPESession session_entry)
+			      struct pe_session *session_entry)
 {
 	tDot11fIEhe_cap *he_cap;
 
@@ -6858,7 +6858,7 @@ void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
 
 }
 
-void lim_update_usr_he_cap(tpAniSirGlobal mac_ctx, tpPESession session)
+void lim_update_usr_he_cap(tpAniSirGlobal mac_ctx, struct pe_session *session)
 {
 	tSirAddIeParams *add_ie = &session->addIeParams;
 	tDot11fIEhe_cap *he_cap = &session->he_config;
@@ -6894,7 +6894,7 @@ void lim_update_usr_he_cap(tpAniSirGlobal mac_ctx, tpPESession session)
 }
 
 void lim_decide_he_op(tpAniSirGlobal mac_ctx, tpAddBssParams add_bss,
-		      tpPESession session)
+		      struct pe_session *session)
 {
 	uint32_t val;
 	uint8_t color;
@@ -6948,14 +6948,14 @@ void lim_decide_he_op(tpAniSirGlobal mac_ctx, tpAddBssParams add_bss,
 		*((uint16_t *)he_ops->basic_mcs_nss));
 }
 
-void lim_copy_bss_he_cap(tpPESession session,
+void lim_copy_bss_he_cap(struct pe_session *session,
 			 tpSirSmeStartBssReq sme_start_bss_req)
 {
 	qdf_mem_copy(&(session->he_config), &(sme_start_bss_req->he_config),
 		     sizeof(session->he_config));
 }
 
-void lim_copy_join_req_he_cap(tpPESession session,
+void lim_copy_join_req_he_cap(struct pe_session *session,
 			      tpSirSmeJoinReq sme_join_req)
 {
 	qdf_mem_copy(&(session->he_config), &(sme_join_req->he_config),
@@ -7181,7 +7181,7 @@ void lim_log_he_bss_color(tpAniSirGlobal mac,
 
 void lim_update_sta_he_capable(tpAniSirGlobal mac,
 	tpAddStaParams add_sta_params, tpDphHashNode sta_ds,
-	tpPESession session_entry)
+	struct pe_session *session_entry)
 {
 	if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry))
 		add_sta_params->he_capable = sta_ds->mlmStaContext.he_capable;
@@ -7202,7 +7202,7 @@ void lim_update_stads_he_capable(tpDphHashNode sta_ds, tpSirAssocReq assoc_req)
 	sta_ds->mlmStaContext.he_capable = assoc_req->he_cap.present;
 }
 
-void lim_update_session_he_capable(tpAniSirGlobal mac, tpPESession session)
+void lim_update_session_he_capable(tpAniSirGlobal mac, struct pe_session *session)
 {
 	session->he_capable = true;
 	pe_debug("he_capable: %d", session->he_capable);
@@ -7214,7 +7214,7 @@ void lim_update_chan_he_capable(tpAniSirGlobal mac, tpSwitchChannelParams chan)
 	pe_debug("he_capable: %d", chan->he_capable);
 }
 
-void lim_set_he_caps(tpAniSirGlobal mac, tpPESession session, uint8_t *ie_start,
+void lim_set_he_caps(tpAniSirGlobal mac, struct pe_session *session, uint8_t *ie_start,
 		     uint32_t num_bytes)
 {
 	const uint8_t *ie = NULL;
@@ -7332,7 +7332,7 @@ void lim_set_he_caps(tpAniSirGlobal mac, tpPESession session, uint8_t *ie_start,
 	}
 }
 
-QDF_STATUS lim_send_he_caps_ie(tpAniSirGlobal mac_ctx, tpPESession session,
+QDF_STATUS lim_send_he_caps_ie(tpAniSirGlobal mac_ctx, struct pe_session *session,
 			       uint8_t vdev_id)
 {
 	uint8_t he_caps[SIR_MAC_HE_CAP_MIN_LEN + 3];
@@ -7421,7 +7421,7 @@ static QDF_STATUS lim_populate_he_mcs_per_bw(tpAniSirGlobal mac_ctx,
 QDF_STATUS lim_populate_he_mcs_set(tpAniSirGlobal mac_ctx,
 				   tpSirSupportedRates rates,
 				   tDot11fIEhe_cap *peer_he_caps,
-				   tpPESession session_entry, uint8_t nss)
+				   struct pe_session *session_entry, uint8_t nss)
 {
 	bool support_2x2 = false;
 	uint32_t self_sta_dot11mode = 0;
@@ -7705,7 +7705,7 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type,
 	return QDF_STATUS_SUCCESS;
 }
 
-enum rateid lim_get_min_session_txrate(tpPESession session)
+enum rateid lim_get_min_session_txrate(struct pe_session *session)
 {
 	enum rateid rid = RATEID_DEFAULT;
 	uint8_t min_rate = SIR_MAC_RATE_54, curr_rate, i;
@@ -7808,7 +7808,7 @@ void lim_convert_active_channel_to_passive_channel(tpAniSirGlobal mac_ctx)
 void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal mac_ctx, uint8_t frame_type,
 				 uint8_t *frame, uint32_t frame_len,
 				 uint16_t session_id, uint32_t rx_channel,
-				 tpPESession psession_entry, int8_t rx_rssi)
+				 struct pe_session *psession_entry, int8_t rx_rssi)
 {
 	tpSirSmeMgmtFrameInd sme_mgmt_frame = NULL;
 	uint16_t length;
@@ -7844,7 +7844,7 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal mac_ctx, uint8_t frame_type,
 }
 
 void
-lim_send_dfs_chan_sw_ie_update(tpAniSirGlobal mac_ctx, tpPESession session)
+lim_send_dfs_chan_sw_ie_update(tpAniSirGlobal mac_ctx, struct pe_session *session)
 {
 	/* Update the beacon template and send to FW */
 	if (sch_set_fixed_beacon_fields(mac_ctx, session) !=
@@ -7861,7 +7861,7 @@ lim_send_dfs_chan_sw_ie_update(tpAniSirGlobal mac_ctx, tpPESession session)
 
 void lim_process_ap_ecsa_timeout(void *data)
 {
-	tpPESession session = (tpPESession)data;
+	struct pe_session *session = (struct pe_session *)data;
 	tpAniSirGlobal mac_ctx;
 	uint8_t bcn_int, ch, ch_width;
 	QDF_STATUS status;
@@ -7994,13 +7994,13 @@ QDF_STATUS lim_sta_mlme_vdev_stop_send(struct vdev_mlme_obj *vdev_mlme,
 		status = lim_sta_send_down_link((join_params *)data);
 		mlme_set_connection_fail(vdev_mlme->vdev, false);
 	} else {
-		status = lim_sta_send_del_bss((tpPESession)data);
+		status = lim_sta_send_del_bss((struct pe_session *)data);
 	}
 
 	return status;
 }
 
-void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session)
+void lim_send_beacon(tpAniSirGlobal mac_ctx, struct pe_session *session)
 {
 	if (wlan_vdev_mlme_get_state(session->vdev) ==
 	    WLAN_VDEV_S_DFS_CAC_WAIT)
@@ -8013,7 +8013,7 @@ void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session)
 					      sizeof(*session), session);
 }
 
-void lim_ndi_mlme_vdev_up_transition(tpPESession session)
+void lim_ndi_mlme_vdev_up_transition(struct pe_session *session)
 {
 	if (!LIM_IS_NDI_ROLE(session))
 		return;
@@ -8026,7 +8026,7 @@ void lim_ndi_mlme_vdev_up_transition(tpPESession session)
 QDF_STATUS lim_ap_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme,
 				       uint16_t data_len, void *data)
 {
-	tpPESession session;
+	struct pe_session *session;
 	tSirResultCodes ret;
 	tpLimMlmStartReq start_req = (tLimMlmStartReq *)data;
 	tpAniSirGlobal mac_ctx;
@@ -8065,7 +8065,7 @@ QDF_STATUS lim_ap_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme,
 }
 
 static inline void lim_send_csa_restart_resp(tpAniSirGlobal mac_ctx,
-					     tpPESession session)
+					     struct pe_session *session)
 {
 	struct scheduler_msg msg = {0};
 	QDF_STATUS status;
@@ -8083,13 +8083,13 @@ QDF_STATUS lim_ap_mlme_vdev_update_beacon(struct vdev_mlme_obj *vdev_mlme,
 					  enum beacon_update_op op,
 					  uint16_t data_len, void *data)
 {
-	tpPESession session;
+	struct pe_session *session;
 
 	if (!data) {
 		pe_err("event_data is NULL");
 		return QDF_STATUS_E_INVAL;
 	}
-	session = (tpPESession)data;
+	session = (struct pe_session *)data;
 	if (LIM_IS_NDI_ROLE(session))
 		return QDF_STATUS_SUCCESS;
 
@@ -8106,7 +8106,7 @@ QDF_STATUS lim_ap_mlme_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
 {
 	struct scheduler_msg msg = {0};
 	QDF_STATUS status;
-	tpPESession session = (tpPESession)data;
+	struct pe_session *session = (struct pe_session *)data;
 
 	if (!session) {
 		pe_err("session is NULL");
@@ -8129,7 +8129,7 @@ QDF_STATUS lim_ap_mlme_vdev_up_send(struct vdev_mlme_obj *vdev_mlme,
 QDF_STATUS lim_ap_mlme_vdev_disconnect_peers(struct vdev_mlme_obj *vdev_mlme,
 					     uint16_t data_len, void *data)
 {
-	tpPESession session = (tpPESession)data;
+	struct pe_session *session = (struct pe_session *)data;
 
 	if (!data) {
 		pe_err("data is NULL");
@@ -8147,7 +8147,7 @@ QDF_STATUS lim_ap_mlme_vdev_disconnect_peers(struct vdev_mlme_obj *vdev_mlme,
 QDF_STATUS lim_ap_mlme_vdev_stop_send(struct vdev_mlme_obj *vdev_mlme,
 				      uint16_t data_len, void *data)
 {
-	tpPESession session = (tpPESession)data;
+	struct pe_session *session = (struct pe_session *)data;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	if (!data) {
@@ -8167,7 +8167,7 @@ QDF_STATUS lim_ap_mlme_vdev_stop_send(struct vdev_mlme_obj *vdev_mlme,
 QDF_STATUS lim_ap_mlme_vdev_restart_send(struct vdev_mlme_obj *vdev_mlme,
 					 uint16_t data_len, void *data)
 {
-	tpPESession session = (tpPESession)data;
+	struct pe_session *session = (struct pe_session *)data;
 
 	if (!data) {
 		pe_err("data is NULL");
@@ -8214,7 +8214,7 @@ void lim_send_start_bss_confirm(tpAniSirGlobal mac_ctx,
 		lim_post_sme_message(mac_ctx, LIM_MLM_START_CNF,
 				     (uint32_t *)start_cnf);
 	} else {
-		tpPESession session;
+		struct pe_session *session;
 
 		session = pe_find_session_by_session_id(mac_ctx,
 							start_cnf->sessionId);
@@ -8238,12 +8238,12 @@ void lim_send_start_bss_confirm(tpAniSirGlobal mac_ctx,
 			     (uint32_t *)start_cnf);
 }
 
-void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session)
+void lim_send_beacon(tpAniSirGlobal mac_ctx, struct pe_session *session)
 {
 	lim_send_beacon_ind(mac_ctx, session, REASON_DEFAULT);
 }
 
-void lim_ndi_mlme_vdev_up_transition(tpPESession session)
+void lim_ndi_mlme_vdev_up_transition(struct pe_session *session)
 {
 }
 #endif

+ 113 - 113
core/mac/src/pe/lim/lim_utils.h

@@ -140,28 +140,28 @@ void lim_print_msg_name(tpAniSirGlobal mac, uint16_t logLevel, uint32_t msgType)
 
 extern QDF_STATUS lim_send_set_max_tx_power_req(tpAniSirGlobal mac,
 		int8_t txPower,
-		tpPESession pSessionEntry);
+		struct pe_session *pSessionEntry);
 extern uint8_t lim_get_max_tx_power(int8_t regMax, int8_t apTxPower,
 		uint8_t iniTxPower);
 uint8_t lim_is_addr_bc(tSirMacAddr);
 uint8_t lim_is_group_addr(tSirMacAddr);
 
 /* AID pool management functions */
-void lim_init_peer_idxpool(tpAniSirGlobal, tpPESession);
-uint16_t lim_assign_peer_idx(tpAniSirGlobal, tpPESession);
+void lim_init_peer_idxpool(tpAniSirGlobal, struct pe_session *);
+uint16_t lim_assign_peer_idx(tpAniSirGlobal, struct pe_session *);
 
 void lim_enable_overlap11g_protection(tpAniSirGlobal mac,
 		tpUpdateBeaconParams pBeaconParams,
 		tpSirMacMgmtHdr pMh,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_update_overlap_sta_param(tpAniSirGlobal mac, tSirMacAddr bssId,
 		tpLimProtStaParams pStaParams);
 void lim_update_short_preamble(tpAniSirGlobal mac, tSirMacAddr peerMacAddr,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_update_short_slot_time(tpAniSirGlobal mac, tSirMacAddr peerMacAddr,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
 /*
  * lim_send_sme_mgmt_frame_ind() - Function to send mgmt frame ind to HDD
@@ -182,7 +182,7 @@ void lim_update_short_slot_time(tpAniSirGlobal mac, tSirMacAddr peerMacAddr,
 void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal mac_ctx, uint8_t frame_type,
 				 uint8_t *frame, uint32_t frame_len,
 				 uint16_t session_id, uint32_t rx_channel,
-				 tpPESession psession_entry, int8_t rx_rssi);
+				 struct pe_session *psession_entry, int8_t rx_rssi);
 
 /*
  * lim_convert_active_channel_to_passive_channel() - Timer callback function
@@ -209,68 +209,68 @@ void lim_deactivate_timers(tpAniSirGlobal mac_ctx);
  * The below 'product' check tobe removed if 'Association' is
  * allowed in IBSS.
  */
-void lim_release_peer_idx(tpAniSirGlobal, uint16_t, tpPESession);
+void lim_release_peer_idx(tpAniSirGlobal, uint16_t, struct pe_session *);
 
 void lim_decide_ap_protection(tpAniSirGlobal mac, tSirMacAddr peerMacAddr,
-		tpUpdateBeaconParams pBeaconParams, tpPESession);
+		tpUpdateBeaconParams pBeaconParams, struct pe_session *);
 void lim_decide_ap_protection_on_delete(tpAniSirGlobal mac,
 		tpDphHashNode pStaDs,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
 extern QDF_STATUS lim_update_11a_protection(tpAniSirGlobal mac,
 		uint8_t enable,
 		uint8_t overlap,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession);
+		struct pe_session *);
 extern QDF_STATUS lim_enable11g_protection(tpAniSirGlobal mac,
 		uint8_t enable,
 		uint8_t overlap,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 extern QDF_STATUS lim_enable_ht_protection_from11g(tpAniSirGlobal mac,
 		uint8_t enable,
 		uint8_t overlap,
 		tpUpdateBeaconParams
 		pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 extern QDF_STATUS lim_enable_ht20_protection(tpAniSirGlobal mac,
 		uint8_t enable, uint8_t overlap,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession sessionEntry);
+		struct pe_session *sessionEntry);
 extern QDF_STATUS lim_enable_ht_non_gf_protection(tpAniSirGlobal mac,
 		uint8_t enable, uint8_t overlap,
 		tpUpdateBeaconParams
-		pBeaconParams, tpPESession);
+		pBeaconParams, struct pe_session *);
 extern QDF_STATUS lim_enable_ht_rifs_protection(tpAniSirGlobal mac,
 		uint8_t enable, uint8_t overlap,
 		tpUpdateBeaconParams
 		pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 extern QDF_STATUS lim_enable_ht_lsig_txop_protection(tpAniSirGlobal mac,
 		uint8_t enable,
 		uint8_t overlap,
 		tpUpdateBeaconParams
-		pBeaconParams, tpPESession);
+		pBeaconParams, struct pe_session *);
 extern QDF_STATUS lim_enable_short_preamble(tpAniSirGlobal mac,
 		uint8_t enable,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 extern QDF_STATUS lim_enable_ht_obss_protection(tpAniSirGlobal mac,
 		uint8_t enable, uint8_t overlap,
 		tpUpdateBeaconParams
-		pBeaconParams, tpPESession);
+		pBeaconParams, struct pe_session *);
 void lim_decide_sta_protection(tpAniSirGlobal mac,
 		tpSchBeaconStruct pBeaconStruct,
 		tpUpdateBeaconParams pBeaconParams,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_decide_sta_protection_on_assoc(tpAniSirGlobal mac,
 		tpSchBeaconStruct pBeaconStruct,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_update_sta_run_time_ht_switch_chnl_params(tpAniSirGlobal mac,
 		tDot11fIEHTInfo *pHTInfo,
 		uint8_t bssIdx,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 /* Print MAC address utility function */
 void lim_print_mac_addr(tpAniSirGlobal, tSirMacAddr, uint8_t);
 
@@ -295,13 +295,13 @@ uint8_t lim_is_null_ssid(tSirMacSSid *pSsid);
 void lim_stop_tx_and_switch_channel(tpAniSirGlobal mac, uint8_t sessionId);
 void lim_process_channel_switch_timeout(tpAniSirGlobal);
 QDF_STATUS lim_start_channel_switch(tpAniSirGlobal mac,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_update_channel_switch(tpAniSirGlobal, tpSirProbeRespBeacon,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
-void lim_switch_primary_channel(tpAniSirGlobal, uint8_t, tpPESession);
+void lim_switch_primary_channel(tpAniSirGlobal, uint8_t, struct pe_session *);
 void lim_switch_primary_secondary_channel(tpAniSirGlobal mac,
-					tpPESession psessionEntry,
+					struct pe_session *psessionEntry,
 					uint8_t newChannel,
 					uint8_t ch_center_freq_seg0,
 					uint8_t ch_center_freq_seg1,
@@ -313,18 +313,18 @@ void lim_update_sta_run_time_ht_capability(tpAniSirGlobal mac,
 		tDot11fIEHTCaps *pHTCaps);
 void lim_update_sta_run_time_ht_info(struct mac_context *mac,
 		tDot11fIEHTInfo *pRcvdHTInfo,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_cancel_dot11h_channel_switch(tpAniSirGlobal mac,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 bool lim_is_channel_valid_for_channel_switch(tpAniSirGlobal mac,
 		uint8_t channel);
 QDF_STATUS lim_restore_pre_channel_switch_state(tpAniSirGlobal mac,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
 void lim_prepare_for11h_channel_switch(tpAniSirGlobal mac,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_switch_channel_cback(tpAniSirGlobal mac, QDF_STATUS status,
-		uint32_t *data, tpPESession psessionEntry);
+		uint32_t *data, struct pe_session *psessionEntry);
 
 /**
  * lim_get_session_by_macaddr() - api to find session based on MAC
@@ -353,7 +353,7 @@ static inline enum band_info lim_get_rf_band(uint8_t channel)
 
 static inline QDF_STATUS
 lim_get_mgmt_staid(tpAniSirGlobal mac, uint16_t *staid,
-		tpPESession psessionEntry)
+		struct pe_session *psessionEntry)
 {
 	if (LIM_IS_AP_ROLE(psessionEntry))
 		*staid = 1;
@@ -384,7 +384,7 @@ is_entering_mimo_ps(tSirMacHTMIMOPowerSaveState curState,
 }
 
 static inline int lim_select_cb_mode(tDphHashNode *pStaDs,
-		tpPESession psessionEntry, uint8_t channel,
+		struct pe_session *psessionEntry, uint8_t channel,
 		uint8_t chan_bw)
 {
 	if (pStaDs->mlmStaContext.vhtCapability && chan_bw) {
@@ -425,17 +425,17 @@ static inline int lim_select_cb_mode(tDphHashNode *pStaDs,
 
 /* ANI peer station count management and associated actions */
 void lim_util_count_sta_add(tpAniSirGlobal mac, tpDphHashNode pSta,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 void lim_util_count_sta_del(tpAniSirGlobal mac, tpDphHashNode pSta,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
-uint8_t lim_get_ht_capability(tpAniSirGlobal, uint32_t, tpPESession);
+uint8_t lim_get_ht_capability(tpAniSirGlobal, uint32_t, struct pe_session *);
 QDF_STATUS lim_tx_complete(void *context, qdf_nbuf_t buf, bool free);
 
 QDF_STATUS lim_validate_delts_req(tpAniSirGlobal mac,
 		tpSirDeltsReq pDeltsReq,
 		tSirMacAddr peerMacAddr,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
 void lim_pkt_free(tpAniSirGlobal mac,
 		eFrameType frmType, uint8_t *pBD, void *body);
@@ -489,11 +489,11 @@ tSirNwType lim_get_nw_type(tpAniSirGlobal mac, uint8_t channelNum,
 		uint32_t type, tpSchBeaconStruct pBeacon);
 
 void lim_set_tspec_uapsd_mask_per_session(tpAniSirGlobal mac,
-		tpPESession psessionEntry,
+		struct pe_session *psessionEntry,
 		tSirMacTSInfo *pTsInfo, uint32_t action);
 
 void lim_handle_heart_beat_timeout_for_session(tpAniSirGlobal mac,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
 void lim_process_add_sta_rsp(tpAniSirGlobal mac,
 			     struct scheduler_msg *pMsgQ);
@@ -502,17 +502,17 @@ void lim_update_beacon(tpAniSirGlobal mac);
 
 void lim_process_ap_mlm_add_sta_rsp(tpAniSirGlobal mac,
 				    struct scheduler_msg *limMsgQ,
-				    tpPESession psessionEntry);
+				    struct pe_session *psessionEntry);
 void lim_process_ap_mlm_del_bss_rsp(tpAniSirGlobal mac,
 		struct scheduler_msg *limMsgQ,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
 void lim_process_ap_mlm_del_sta_rsp(tpAniSirGlobal mac,
 		struct scheduler_msg *limMsgQ,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
-tpPESession lim_is_ibss_session_active(tpAniSirGlobal mac);
-tpPESession lim_is_ap_session_active(tpAniSirGlobal mac);
+struct pe_session *lim_is_ibss_session_active(tpAniSirGlobal mac);
+struct pe_session *lim_is_ap_session_active(tpAniSirGlobal mac);
 void lim_handle_heart_beat_failure_timeout(tpAniSirGlobal mac);
 
 #define limGetWscIEPtr(mac, ie, ie_len) \
@@ -527,7 +527,7 @@ uint8_t lim_get_noa_attr_stream_in_mult_p2p_ies(tpAniSirGlobal mac,
 		uint8_t *noaStream, uint8_t noaLen,
 		uint8_t overFlowLen);
 uint8_t lim_get_noa_attr_stream(tpAniSirGlobal mac, uint8_t *pNoaStream,
-		tpPESession psessionEntry);
+		struct pe_session *psessionEntry);
 
 uint8_t lim_build_p2p_ie(tpAniSirGlobal mac, uint8_t *ie, uint8_t *data,
 		uint8_t ie_len);
@@ -538,16 +538,16 @@ uint8_t lim_get_current_operating_channel(tpAniSirGlobal mac);
 uint32_t lim_get_max_rate_flags(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds);
 
 bool lim_check_vht_op_mode_change(tpAniSirGlobal mac,
-		tpPESession psessionEntry,
+		struct pe_session *psessionEntry,
 		uint8_t chanWidth, uint8_t staId,
 		uint8_t *peerMac);
 #ifdef WLAN_FEATURE_11AX_BSS_COLOR
-bool lim_send_he_ie_update(tpAniSirGlobal mac_ctx, tpPESession pe_session);
+bool lim_send_he_ie_update(tpAniSirGlobal mac_ctx, struct pe_session *pe_session);
 #endif
-bool lim_set_nss_change(tpAniSirGlobal mac, tpPESession psessionEntry,
+bool lim_set_nss_change(tpAniSirGlobal mac, struct pe_session *psessionEntry,
 		uint8_t rxNss, uint8_t staId, uint8_t *peerMac);
 bool lim_check_membership_user_position(tpAniSirGlobal mac,
-		tpPESession psessionEntry,
+		struct pe_session *psessionEntry,
 		uint32_t membership, uint32_t userPosition,
 		uint8_t staId);
 
@@ -653,7 +653,7 @@ typedef enum {
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT
 void lim_diag_event_report(tpAniSirGlobal mac, uint16_t eventType,
-		tpPESession pSessionEntry, uint16_t status,
+		struct pe_session *pSessionEntry, uint16_t status,
 		uint16_t reasonCode);
 /**
  * lim_diag_mgmt_tx_event_report() - to log TX event to external application
@@ -670,7 +670,7 @@ void lim_diag_event_report(tpAniSirGlobal mac, uint16_t eventType,
  * Return: void
  */
 void lim_diag_mgmt_tx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
-		tpPESession session, uint16_t result_code,
+		struct pe_session *session, uint16_t result_code,
 		uint16_t reason_code);
 /**
  * lim_diag_mgmt_rx_event_report() - to log RX event to external application
@@ -687,19 +687,19 @@ void lim_diag_mgmt_tx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
  * Return: void
  */
 void lim_diag_mgmt_rx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
-		tpPESession session, uint16_t result_code,
+		struct pe_session *session, uint16_t result_code,
 		uint16_t reason_code);
 #else
 static inline void lim_diag_event_report(tpAniSirGlobal mac, uint16_t
-		eventType, tpPESession pSessionEntry, uint16_t status,
+		eventType, struct pe_session *pSessionEntry, uint16_t status,
 		uint16_t reasonCode) {}
 static inline
 void lim_diag_mgmt_tx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
-		tpPESession session, uint16_t result_code,
+		struct pe_session *session, uint16_t result_code,
 		uint16_t reason_code) {}
 static inline
 void lim_diag_mgmt_rx_event_report(tpAniSirGlobal mac_ctx, void *mgmt_hdr,
-		tpPESession session, uint16_t result_code,
+		struct pe_session *session, uint16_t result_code,
 		uint16_t reason_code) {}
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 
@@ -707,7 +707,7 @@ void pe_set_resume_channel(tpAniSirGlobal mac, uint16_t channel,
 		ePhyChanBondState cbState);
 
 void lim_get_short_slot_from_phy_mode(tpAniSirGlobal mac,
-		tpPESession psessionEntry,
+		struct pe_session *psessionEntry,
 		uint32_t phyMode, uint8_t *pShortSlotEnable);
 
 void lim_clean_up_disassoc_deauth_req(tpAniSirGlobal mac, uint8_t *staMac,
@@ -720,25 +720,25 @@ bool lim_check_disassoc_deauth_ack_pending(tpAniSirGlobal mac,
 void lim_pmf_sa_query_timer_handler(void *pMacGlobal, uint32_t param);
 void lim_pmf_comeback_timer_callback(void *context);
 void lim_set_protected_bit(tpAniSirGlobal mac,
-	tpPESession psessionEntry,
+	struct pe_session *psessionEntry,
 	tSirMacAddr peer, tpSirMacMgmtHdr pMacHdr);
 #else
 static inline void lim_set_protected_bit(tpAniSirGlobal mac,
-	tpPESession psessionEntry,
+	struct pe_session *psessionEntry,
 	tSirMacAddr peer, tpSirMacMgmtHdr pMacHdr) {}
 #endif /* WLAN_FEATURE_11W */
 
 void lim_set_ht_caps(tpAniSirGlobal p_mac,
-		tpPESession p_session_ntry,
+		struct pe_session *p_session_ntry,
 		uint8_t *p_ie_start,
 		uint32_t num_bytes);
 
 void lim_set_vht_caps(tpAniSirGlobal p_mac,
-		tpPESession p_session_entry,
+		struct pe_session *p_session_entry,
 		uint8_t *p_ie_start,
 		uint32_t num_bytes);
 bool lim_validate_received_frame_a1_addr(tpAniSirGlobal mac_ctx,
-		tSirMacAddr a1, tpPESession session);
+		tSirMacAddr a1, struct pe_session *session);
 void lim_set_stads_rtt_cap(tpDphHashNode sta_ds, struct s_ext_cap *ext_cap,
 			   tpAniSirGlobal mac_ctx);
 
@@ -748,7 +748,7 @@ QDF_STATUS lim_send_ext_cap_ie(tpAniSirGlobal mac_ctx, uint32_t session_id,
 			       tDot11fIEExtCap *extracted_extcap, bool merge);
 
 QDF_STATUS lim_send_ies_per_band(tpAniSirGlobal mac_ctx,
-				 tpPESession session, uint8_t vdev_id);
+				 struct pe_session *session, uint8_t vdev_id);
 
 /**
  * lim_send_action_frm_tb_ppdu_cfg() - sets action frame in TB PPDU cfg to FW
@@ -784,7 +784,7 @@ void lim_merge_extcap_struct(tDot11fIEExtCap *dst, tDot11fIEExtCap *src,
  *
  * Return: none
  */
-void lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, tpPESession pe_session);
+void lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, struct pe_session *pe_session);
 #else
 /**
  * lim_del_pmf_sa_query_timer() - This function deletes SA query timer
@@ -796,7 +796,7 @@ void lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, tpPESession pe_session);
  * Return: none
  */
 static inline void
-lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, tpPESession pe_session)
+lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, struct pe_session *pe_session)
 {
 }
 #endif
@@ -819,9 +819,9 @@ QDF_STATUS lim_strip_supp_op_class_update_struct(tpAniSirGlobal mac_ctx,
 		tDot11fIESuppOperatingClasses *dst);
 
 uint8_t lim_get_80Mhz_center_channel(uint8_t primary_channel);
-void lim_update_obss_scanparams(tpPESession session,
+void lim_update_obss_scanparams(struct pe_session *session,
 			tDot11fIEOBSSScanParameters *scan_params);
-void lim_init_obss_params(tpAniSirGlobal mac_ctx, tpPESession session);
+void lim_init_obss_params(tpAniSirGlobal mac_ctx, struct pe_session *session);
 #ifdef WLAN_FEATURE_HOST_ROAM
 uint32_t lim_create_timers_host_roam(tpAniSirGlobal mac_ctx);
 /**
@@ -877,7 +877,7 @@ QDF_STATUS lim_p2p_action_cnf(void *mac_ctx, qdf_nbuf_t buf,
 void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx,
 			uint16_t *caps, uint16_t bss_caps);
 void lim_send_set_dtim_period(tpAniSirGlobal mac_ctx, uint8_t dtim_period,
-			      tpPESession session);
+			      struct pe_session *session);
 
 QDF_STATUS lim_strip_ie(tpAniSirGlobal mac_ctx,
 		uint8_t *addn_ie, uint16_t *addn_ielen,
@@ -899,7 +899,7 @@ QDF_STATUS lim_strip_ie(tpAniSirGlobal mac_ctx,
  *
  * Return: None
  */
-void lim_intersect_ap_he_caps(tpPESession session, tpAddBssParams add_bss,
+void lim_intersect_ap_he_caps(struct pe_session *session, tpAddBssParams add_bss,
 		tSchBeaconStruct *pBeaconStruct, tpSirAssocRsp assoc_rsp);
 
 /**
@@ -910,7 +910,7 @@ void lim_intersect_ap_he_caps(tpPESession session, tpAddBssParams add_bss,
  *
  * Return: None
  */
-void lim_intersect_sta_he_caps(tpSirAssocReq assoc_req, tpPESession session,
+void lim_intersect_sta_he_caps(tpSirAssocReq assoc_req, struct pe_session *session,
 		tpDphHashNode sta_ds);
 
 /**
@@ -929,7 +929,7 @@ void lim_add_he_cap(tpAddStaParams add_sta_params, tpSirAssocReq assoc_req);
  *
  * Return: None
  */
-void lim_add_self_he_cap(tpAddStaParams add_sta_params, tpPESession session);
+void lim_add_self_he_cap(tpAddStaParams add_sta_params, struct pe_session *session);
 
 /**
  * lim_add_bss_he_cap() - Copy HE capability into ADD BSS params
@@ -947,7 +947,7 @@ void lim_add_bss_he_cap(tpAddBssParams add_bss, tpSirAssocRsp assoc_rsp);
  *
  * Return: None
  */
-void lim_add_bss_he_cfg(tpAddBssParams add_bss, tpPESession session);
+void lim_add_bss_he_cfg(tpAddBssParams add_bss, struct pe_session *session);
 
 /**
  * lim_copy_bss_he_cap() - Copy HE capability into PE session from start bss
@@ -956,7 +956,7 @@ void lim_add_bss_he_cfg(tpAddBssParams add_bss, tpPESession session);
  *
  * Return: None
  */
-void lim_copy_bss_he_cap(tpPESession session,
+void lim_copy_bss_he_cap(struct pe_session *session,
 		tpSirSmeStartBssReq sme_start_bss_req);
 
 /**
@@ -967,7 +967,7 @@ void lim_copy_bss_he_cap(tpPESession session,
  *
  * Return: None
  */
-void lim_copy_join_req_he_cap(tpPESession session,
+void lim_copy_join_req_he_cap(struct pe_session *session,
 			tpSirSmeJoinReq sme_join_req);
 
 /**
@@ -1017,7 +1017,7 @@ void lim_log_he_cap(tpAniSirGlobal mac, tDot11fIEhe_cap *he_cap);
  * Return: None
  */
 void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
-			      tpPESession session_entry);
+			      struct pe_session *session_entry);
 
 /**
  * lim_update_usr_he_cap() - Update HE capability based on userspace
@@ -1027,7 +1027,7 @@ void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
  * Parse the HE Capability IE and populate the fields to be
  * sent to FW as part of add bss and update PE session.
  */
-void lim_update_usr_he_cap(tpAniSirGlobal mac_ctx, tpPESession session);
+void lim_update_usr_he_cap(tpAniSirGlobal mac_ctx, struct pe_session *session);
 
 /**
  * lim_decide_he_op() - Determine HE operation elements
@@ -1039,7 +1039,7 @@ void lim_update_usr_he_cap(tpAniSirGlobal mac_ctx, tpPESession session);
  * sent to FW as part of add bss.
  */
 void lim_decide_he_op(tpAniSirGlobal mac_ctx, tpAddBssParams add_bss,
-		tpPESession session);
+		struct pe_session *session);
 
 /**
  * lim_update_sta_he_capable(): Update he_capable in add sta params
@@ -1052,9 +1052,9 @@ void lim_decide_he_op(tpAniSirGlobal mac_ctx, tpAddBssParams add_bss,
  */
 void lim_update_sta_he_capable(tpAniSirGlobal mac,
 	tpAddStaParams add_sta_params, tpDphHashNode sta_ds,
-	tpPESession session_entry);
+	struct pe_session *session_entry);
 
-static inline bool lim_is_session_he_capable(tpPESession session)
+static inline bool lim_is_session_he_capable(struct pe_session *session)
 {
 	return session->he_capable;
 }
@@ -1065,7 +1065,7 @@ static inline bool lim_is_session_he_capable(tpPESession session)
  *
  * Return: HE fragmentation value
  */
-static inline uint8_t lim_get_session_he_frag_cap(tpPESession session)
+static inline uint8_t lim_get_session_he_frag_cap(struct pe_session *session)
 {
 	return session->he_config.fragmentation;
 }
@@ -1100,7 +1100,7 @@ void lim_update_stads_he_capable(tpDphHashNode sta_ds, tpSirAssocReq assoc_req);
  *
  * Return: None
  */
-void lim_update_session_he_capable(tpAniSirGlobal mac, tpPESession session);
+void lim_update_session_he_capable(tpAniSirGlobal mac, struct pe_session *session);
 
 /**
  * lim_update_chan_he_capable(): Update he_capable in chan switch params
@@ -1120,7 +1120,7 @@ void lim_update_chan_he_capable(tpAniSirGlobal mac, tpSwitchChannelParams chan);
  *
  * Return: None
  */
-void lim_set_he_caps(tpAniSirGlobal mac, tpPESession session,
+void lim_set_he_caps(tpAniSirGlobal mac, struct pe_session *session,
 		     uint8_t *ie_start, uint32_t num_bytes);
 
 /**
@@ -1133,7 +1133,7 @@ void lim_set_he_caps(tpAniSirGlobal mac, tpPESession session,
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS lim_send_he_caps_ie(tpAniSirGlobal mac_ctx, tpPESession session,
+QDF_STATUS lim_send_he_caps_ie(tpAniSirGlobal mac_ctx, struct pe_session *session,
 			       uint8_t vdev_id);
 
 /**
@@ -1149,7 +1149,7 @@ QDF_STATUS lim_send_he_caps_ie(tpAniSirGlobal mac_ctx, tpPESession session,
  */
 QDF_STATUS lim_populate_he_mcs_set(tpAniSirGlobal mac_ctx,
 		tpSirSupportedRates rates, tDot11fIEhe_cap *peer_he_caps,
-		tpPESession session_entry, uint8_t nss);
+		struct pe_session *session_entry, uint8_t nss);
 
 #else
 static inline void lim_add_he_cap(tpAddStaParams add_sta_params,
@@ -1158,7 +1158,7 @@ static inline void lim_add_he_cap(tpAddStaParams add_sta_params,
 }
 
 static inline void lim_add_self_he_cap(tpAddStaParams add_sta_params,
-				       tpPESession session)
+				       struct pe_session *session)
 {
 }
 
@@ -1169,11 +1169,11 @@ static inline void lim_add_bss_he_cap(tpAddBssParams add_bss,
 }
 
 static inline void lim_add_bss_he_cfg(tpAddBssParams add_bss,
-					 tpPESession session)
+					 struct pe_session *session)
 {
 }
 
-static inline void lim_intersect_ap_he_caps(tpPESession session,
+static inline void lim_intersect_ap_he_caps(struct pe_session *session,
 		tpAddBssParams add_bss,	tSchBeaconStruct *pBeaconStruct,
 		tpSirAssocRsp assoc_rsp)
 {
@@ -1181,32 +1181,32 @@ static inline void lim_intersect_ap_he_caps(tpPESession session,
 }
 
 static inline void lim_intersect_sta_he_caps(tpSirAssocReq assoc_req,
-		tpPESession session, tpDphHashNode sta_ds)
+		struct pe_session *session, tpDphHashNode sta_ds)
 {
 }
 
 static inline void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
-		tpPESession session_entry)
+		struct pe_session *session_entry)
 {
 	return;
 }
 
 static inline void lim_update_usr_he_cap(tpAniSirGlobal mac_ctx,
-			tpPESession session)
+			struct pe_session *session)
 {
 }
 
 static inline void lim_decide_he_op(tpAniSirGlobal mac_ctx,
-			tpAddBssParams add_bss, tpPESession session)
+			tpAddBssParams add_bss, struct pe_session *session)
 {
 }
 
-static inline void lim_copy_bss_he_cap(tpPESession session,
+static inline void lim_copy_bss_he_cap(struct pe_session *session,
 				tpSirSmeStartBssReq sme_start_bss_req)
 {
 }
 
-static inline void lim_copy_join_req_he_cap(tpPESession session,
+static inline void lim_copy_join_req_he_cap(struct pe_session *session,
 			tpSirSmeJoinReq sme_join_req)
 {
 }
@@ -1223,16 +1223,16 @@ static inline void lim_log_he_cap(tpAniSirGlobal mac,
 
 static inline void lim_update_sta_he_capable(tpAniSirGlobal mac,
 			tpAddStaParams add_sta_params,
-			tpDphHashNode sta_ds, tpPESession session_entry)
+			tpDphHashNode sta_ds, struct pe_session *session_entry)
 {
 }
 
-static inline bool lim_is_session_he_capable(tpPESession session)
+static inline bool lim_is_session_he_capable(struct pe_session *session)
 {
 	return false;
 }
 
-static inline uint8_t lim_get_session_he_frag_cap(tpPESession session)
+static inline uint8_t lim_get_session_he_frag_cap(struct pe_session *session)
 {
 	return 0;
 }
@@ -1253,7 +1253,7 @@ static inline void lim_update_stads_he_capable(tpDphHashNode sta_ds,
 }
 
 static inline void lim_update_session_he_capable(tpAniSirGlobal mac,
-			tpPESession session)
+			struct pe_session *session)
 {
 }
 
@@ -1262,13 +1262,13 @@ static inline void lim_update_chan_he_capable(tpAniSirGlobal mac,
 {
 }
 
-static inline void lim_set_he_caps(tpAniSirGlobal mac, tpPESession session,
+static inline void lim_set_he_caps(tpAniSirGlobal mac, struct pe_session *session,
 				   uint8_t *ie_start, uint32_t num_bytes)
 {
 }
 
 static inline QDF_STATUS lim_send_he_caps_ie(tpAniSirGlobal mac_ctx,
-					     tpPESession session,
+					     struct pe_session *session,
 					     uint8_t vdev_id)
 {
 	return QDF_STATUS_SUCCESS;
@@ -1277,7 +1277,7 @@ static inline QDF_STATUS lim_send_he_caps_ie(tpAniSirGlobal mac_ctx,
 static inline QDF_STATUS lim_populate_he_mcs_set(tpAniSirGlobal mac_ctx,
 				tpSirSupportedRates rates,
 				tDot11fIEhe_cap *peer_he_caps,
-				tpPESession session_entry, uint8_t nss)
+				struct pe_session *session_entry, uint8_t nss)
 {
 	return QDF_STATUS_SUCCESS;
 }
@@ -1340,7 +1340,7 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type,
  *
  * Return: enum rateid
  */
-enum rateid lim_get_min_session_txrate(tpPESession session);
+enum rateid lim_get_min_session_txrate(struct pe_session *session);
 
 /**
  * lim_send_dfs_chan_sw_ie_update() - updates the channel switch IE in beacon
@@ -1351,7 +1351,7 @@ enum rateid lim_get_min_session_txrate(tpPESession session);
  * Return None
  */
 void lim_send_dfs_chan_sw_ie_update(tpAniSirGlobal mac_ctx,
-				    tpPESession session);
+				    struct pe_session *session);
 
 /**
  * lim_process_ap_ecsa_timeout() -process ECSA timeout which decrement csa count
@@ -1370,7 +1370,7 @@ void lim_process_ap_ecsa_timeout(void *session);
  * Return None
  */
 void lim_send_stop_bss_failure_resp(tpAniSirGlobal mac_ctx,
-				    tpPESession session);
+				    struct pe_session *session);
 
 /**
  * lim_delete_all_peers() -delete all connected peers
@@ -1378,7 +1378,7 @@ void lim_send_stop_bss_failure_resp(tpAniSirGlobal mac_ctx,
  *
  * Return None
  */
-void lim_delete_all_peers(tpPESession session);
+void lim_delete_all_peers(struct pe_session *session);
 
 /**
  * lim_send_vdev_stop() -send delete bss/stop vdev req
@@ -1386,7 +1386,7 @@ void lim_delete_all_peers(tpPESession session);
  *
  * Return QDF_STATUS
  */
-QDF_STATUS lim_send_vdev_stop(tpPESession session);
+QDF_STATUS lim_send_vdev_stop(struct pe_session *session);
 
 /**
  * lim_send_vdev_stop() -send delete bss/stop vdev req for STA
@@ -1394,7 +1394,7 @@ QDF_STATUS lim_send_vdev_stop(tpPESession session);
  *
  * Return QDF_STATUS
  */
-QDF_STATUS lim_sta_send_del_bss(tpPESession session);
+QDF_STATUS lim_sta_send_del_bss(struct pe_session *session);
 
 /**
  * lim_send_start_bss_confirm() -send start bss confirm req
@@ -1421,7 +1421,7 @@ void lim_send_start_bss_confirm(tpAniSirGlobal mac_ctx,
 void lim_send_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
 				       uint16_t new_channel,
 				       uint8_t ch_bandwidth,
-				       tpPESession session_entry);
+				       struct pe_session *session_entry);
 
 /**
  * lim_process_obss_detection_ind() - Process obss detection indication
@@ -1449,7 +1449,7 @@ QDF_STATUS lim_process_obss_detection_ind(tpAniSirGlobal mac_ctx,
  * Return: QDF_STATUS
  */
 QDF_STATUS lim_obss_send_detection_cfg(tpAniSirGlobal mac_ctx,
-				       tpPESession session,
+				       struct pe_session *session,
 				       bool force);
 
 /**
@@ -1463,7 +1463,7 @@ QDF_STATUS lim_obss_send_detection_cfg(tpAniSirGlobal mac_ctx,
  * Return: QDF_STATUS
  */
 QDF_STATUS lim_obss_generate_detection_config(tpAniSirGlobal mac_ctx,
-					      tpPESession session,
+					      struct pe_session *session,
 					      struct obss_detection_cfg *cfg);
 
 /**
@@ -1477,12 +1477,12 @@ QDF_STATUS lim_obss_generate_detection_config(tpAniSirGlobal mac_ctx,
  * Return: None
  */
 void lim_enable_obss_detection_config(tpAniSirGlobal mac_ctx,
-				      tpPESession session);
+				      struct pe_session *session);
 
 #ifdef WLAN_SUPPORT_TWT
-void lim_set_peer_twt_cap(tpPESession session, struct s_ext_cap *ext_cap);
+void lim_set_peer_twt_cap(struct pe_session *session, struct s_ext_cap *ext_cap);
 #else
-static inline void lim_set_peer_twt_cap(tpPESession session,
+static inline void lim_set_peer_twt_cap(struct pe_session *session,
 					struct s_ext_cap *ext_cap)
 {
 }
@@ -1509,7 +1509,7 @@ void lim_rx_invalid_peer_process(tpAniSirGlobal mac_ctx,
  *
  * Return: None
  */
-void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session);
+void lim_send_beacon(tpAniSirGlobal mac_ctx, struct pe_session *session);
 
 /**
  * lim_ndi_mlme_vdev_up_transition() - Send event to transistion NDI VDEV to UP
@@ -1517,7 +1517,7 @@ void lim_send_beacon(tpAniSirGlobal mac_ctx, tpPESession session);
  *
  * Return: None
  */
-void lim_ndi_mlme_vdev_up_transition(tpPESession session);
+void lim_ndi_mlme_vdev_up_transition(struct pe_session *session);
 
 #ifdef CONFIG_VDEV_SM
 /**