qcacld-3.0: Replace typedef tSirSmeJoinReq

The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The tSirSmeJoinReq typedef does not
meet any of those criteria, so replace it (and the "tp" variant) with
a reference to the underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names
and so-called Hungarian notation, so in conjunction rename the
underlying struct to be in compliance.

Change-Id: Ie13a540223f8f08ad725b26cd55204f1221a4faa
CRs-Fixed: 2394996
diff --git a/core/mac/src/pe/include/lim_process_fils.h b/core/mac/src/pe/include/lim_process_fils.h
index afc28e8..d8f426b 100644
--- a/core/mac/src/pe/include/lim_process_fils.h
+++ b/core/mac/src/pe/include/lim_process_fils.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 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
@@ -88,7 +88,8 @@
  *
  * Return: None
  */
-void lim_update_fils_config(struct pe_session *session, tpSirSmeJoinReq sme_join_req);
+void lim_update_fils_config(struct pe_session *session,
+			    struct join_req *sme_join_req);
 
 /**
  * lim_create_fils_auth_data()- This API creates the fils auth data
@@ -231,8 +232,9 @@
 	return true;
 }
 
-static inline void
-lim_update_fils_config(struct pe_session *session, tpSirSmeJoinReq sme_join_req)
+static inline
+void lim_update_fils_config(struct pe_session *session,
+			    struct join_req *sme_join_req)
 { }
 
 static inline uint32_t lim_create_fils_auth_data(struct mac_context *mac_ctx,
diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h
index 0eda98a..358f42a 100644
--- a/core/mac/src/pe/include/lim_session.h
+++ b/core/mac/src/pe/include/lim_session.h
@@ -134,8 +134,8 @@
 	uint8_t operMode;       /* AP - 0; STA - 1 ; */
 	tSirNwType nwType;
 	struct start_bss_req *pLimStartBssReq; /* handle to start bss req */
-	tpSirSmeJoinReq pLimJoinReq;    /* handle to sme join req */
-	tpSirSmeJoinReq pLimReAssocReq; /* handle to sme reassoc req */
+	struct join_req *pLimJoinReq;    /* handle to sme join req */
+	struct join_req *pLimReAssocReq; /* handle to sme reassoc req */
 	tpLimMlmJoinReq pLimMlmJoinReq; /* handle to MLM join Req */
 	void *pLimMlmReassocRetryReq;   /* keep reasoc req for retry */
 	void *pLimMlmReassocReq;        /* handle to MLM reassoc Req */
diff --git a/core/mac/src/pe/include/rrm_api.h b/core/mac/src/pe/include/rrm_api.h
index 98cfffa..cb49d01 100644
--- a/core/mac/src/pe/include/rrm_api.h
+++ b/core/mac/src/pe/include/rrm_api.h
@@ -82,5 +82,5 @@
 			       tpSirBeaconReportXmitInd beacon_xmit_ind);
 
 void lim_update_rrm_capability(struct mac_context *mac_ctx,
-			       tpSirSmeJoinReq join_req);
+			       struct join_req *join_req);
 #endif
diff --git a/core/mac/src/pe/lim/lim_process_fils.c b/core/mac/src/pe/lim/lim_process_fils.c
index 680b6b9..51e8f5c 100644
--- a/core/mac/src/pe/lim/lim_process_fils.c
+++ b/core/mac/src/pe/lim/lim_process_fils.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 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
@@ -1106,16 +1106,8 @@
 	return true;
 }
 
-/**
- * lim_update_fils_config()- This API update fils session info to csr config
- * from join request.
- * @session: PE session
- * @sme_join_req: pointer to join request
- *
- * Return: None
- */
 void lim_update_fils_config(struct pe_session *session,
-		tpSirSmeJoinReq sme_join_req)
+			    struct join_req *sme_join_req)
 {
 	struct pe_fils_session *csr_fils_info;
 	struct cds_fils_connection_info *fils_config_info;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 3ccf0e4..8339018 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -1115,7 +1115,7 @@
  * Return: None
  */
 static void lim_update_sae_config(struct pe_session *session,
-		tpSirSmeJoinReq sme_join_req)
+				  struct join_req *sme_join_req)
 {
 	session->sae_pmk_cached = sme_join_req->sae_pmk_cached;
 
@@ -1125,7 +1125,7 @@
 }
 #else
 static inline void lim_update_sae_config(struct pe_session *session,
-		tpSirSmeJoinReq sme_join_req)
+					 struct join_req *sme_join_req)
 {}
 #endif
 
@@ -1241,7 +1241,7 @@
 static void
 __lim_process_sme_join_req(struct mac_context *mac_ctx, uint32_t *msg_buf)
 {
-	tpSirSmeJoinReq sme_join_req = NULL;
+	struct join_req *sme_join_req = NULL;
 	tLimMlmJoinReq *mlm_join_req;
 	tSirResultCodes ret_code = eSIR_SME_SUCCESS;
 	uint32_t val = 0;
@@ -1756,11 +1756,11 @@
  */
 
 static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
-		uint32_t *msg_buf)
+					  uint32_t *msg_buf)
 {
 	uint16_t caps;
 	uint32_t val;
-	tpSirSmeJoinReq reassoc_req = NULL;
+	struct join_req *reassoc_req;
 	tLimMlmReassocReq *mlm_reassoc_req;
 	tSirResultCodes ret_code = eSIR_SME_SUCCESS;
 	struct pe_session *session_entry = NULL;
@@ -1778,10 +1778,9 @@
 		ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
 		goto end;
 	}
-	(void)qdf_mem_copy((void *)reassoc_req, (void *)msg_buf, size);
+	qdf_mem_copy(reassoc_req, msg_buf, size);
 
-	if (!lim_is_sme_join_req_valid(mac_ctx,
-				(tpSirSmeJoinReq)reassoc_req)) {
+	if (!lim_is_sme_join_req_valid(mac_ctx, reassoc_req)) {
 		/*
 		 * Received invalid eWNI_SME_REASSOC_REQ
 		 */
diff --git a/core/mac/src/pe/lim/lim_send_frames_host_roam.c b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
index 4d3b4e4..9647c94 100644
--- a/core/mac/src/pe/lim/lim_send_frames_host_roam.c
+++ b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
@@ -183,7 +183,7 @@
 	/*
 	 * The join request *should* contain zero or one of the WPA and RSN
 	 * IEs.  The payload send along with the request is a
-	 * 'tSirSmeJoinReq'; the IE portion is held inside a 'tSirRSNie':
+	 * 'struct join_req'; the IE portion is held inside a 'tSirRSNie':
 	 *
 	 *     typedef struct sSirRSNie
 	 *     {
@@ -636,7 +636,7 @@
 		populate_dot11f_rrm_ie(mac, &frm->RRMEnabledCap, pe_session);
 	/* The join request *should* contain zero or one of the WPA and RSN */
 	/* IEs.  The payload send along with the request is a */
-	/* 'tSirSmeJoinReq'; the IE portion is held inside a 'tSirRSNie': */
+	/* 'struct join_req'; the IE portion is held inside a 'tSirRSNie': */
 
 	/*     typedef struct sSirRSNie */
 	/*     { */
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index 2ddd0f9..8f7214b 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -1721,7 +1721,7 @@
 	/*
 	 * The join request *should* contain zero or one of the WPA and RSN
 	 * IEs.  The payload send along with the request is a
-	 * 'tSirSmeJoinReq'; the IE portion is held inside a 'tSirRSNie':
+	 * 'struct join_req'; the IE portion is held inside a 'tSirRSNie':
 	 *     typedef struct sSirRSNie
 	 *     {
 	 *         uint16_t       length;
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index afe0cfb..b03ed54 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -208,7 +208,7 @@
 	uint16_t bss_ie_len;
 	void *bss_ies;
 	bool is_vendor_ap_1_present;
-	tpSirSmeJoinReq join_reassoc_req = NULL;
+	struct join_req *join_reassoc_req = NULL;
 
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	struct ht_profile *ht_profile;
diff --git a/core/mac/src/pe/lim/lim_sme_req_utils.c b/core/mac/src/pe/lim/lim_sme_req_utils.c
index 79c0163..5e668f4 100644
--- a/core/mac/src/pe/lim/lim_sme_req_utils.c
+++ b/core/mac/src/pe/lim/lim_sme_req_utils.c
@@ -453,27 +453,8 @@
 	return true;
 }
 
-/**
- * lim_is_sme_join_req_valid()
- *
- ***FUNCTION:
- * This function is called by lim_process_sme_req_messages() upon
- * receiving SME_JOIN_REQ message from application.
- *
- ***LOGIC:
- * Message validity checks are performed in this function
- *
- ***ASSUMPTIONS:
- *
- ***NOTE:
- *
- * @param  mac       Pointer to Global MAC structure
- * @param  pJoinReq   Pointer to received SME_JOIN_REQ message
- * @return true  when received SME_JOIN_REQ is formatted correctly
- *         false otherwise
- */
-
-uint8_t lim_is_sme_join_req_valid(struct mac_context *mac, tpSirSmeJoinReq pJoinReq)
+uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
+				  struct join_req *pJoinReq)
 {
 	uint8_t valid = true;
 
diff --git a/core/mac/src/pe/lim/lim_sme_req_utils.h b/core/mac/src/pe/lim/lim_sme_req_utils.h
index b257424..c49bcb1 100644
--- a/core/mac/src/pe/lim/lim_sme_req_utils.h
+++ b/core/mac/src/pe/lim/lim_sme_req_utils.h
@@ -50,7 +50,21 @@
 
 uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *,
 							    tpSirRSNie, struct pe_session *);
-uint8_t lim_is_sme_join_req_valid(struct mac_context *, tpSirSmeJoinReq);
+
+/**
+ * lim_is_sme_join_req_valid() - Verify join request message is valid
+ * @mac: Pointer to Global MAC structure
+ * @pJoinReq: Pointer to received SME_JOIN_REQ message
+ *
+ * This function is called by lim_process_sme_req_messages() upon
+ * receiving SME_JOIN_REQ message from application.
+ *
+ * Return: true  when received SME_JOIN_REQ is formatted correctly
+ *         false otherwise
+ */
+uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
+				  struct join_req *pJoinReq);
+
 uint8_t lim_is_sme_disassoc_req_valid(struct mac_context *, tpSirSmeDisassocReq,
 				      struct pe_session *);
 uint8_t lim_is_sme_deauth_req_valid(struct mac_context *, tpSirSmeDeauthReq, struct pe_session *);
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index d6cb3dc..42b1552 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -6992,7 +6992,7 @@
 }
 
 void lim_copy_join_req_he_cap(struct pe_session *session,
-			      tpSirSmeJoinReq sme_join_req)
+			      struct join_req *sme_join_req)
 {
 	qdf_mem_copy(&(session->he_config), &(sme_join_req->he_config),
 		     sizeof(session->he_config));
diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h
index 80d0e17..bb7014c 100644
--- a/core/mac/src/pe/lim/lim_utils.h
+++ b/core/mac/src/pe/lim/lim_utils.h
@@ -957,7 +957,7 @@
  * Return: None
  */
 void lim_copy_join_req_he_cap(struct pe_session *session,
-			tpSirSmeJoinReq sme_join_req);
+			      struct join_req *sme_join_req);
 
 /**
  * lim_log_he_op() - Print HE Operation
@@ -1200,7 +1200,7 @@
 }
 
 static inline void lim_copy_join_req_he_cap(struct pe_session *session,
-			tpSirSmeJoinReq sme_join_req)
+			struct join_req *sme_join_req)
 {
 }
 
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index 2251a64..033f5e4 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -1349,7 +1349,7 @@
  * Return: None
  */
 void lim_update_rrm_capability(struct mac_context *mac_ctx,
-			       tpSirSmeJoinReq join_req)
+			       struct join_req *join_req)
 {
 	mac_ctx->rrm.rrmPEContext.rrmEnable = join_req->rrm_config.rrm_enabled;
 	qdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps,