Browse Source

qcacld-3.0: Move unused code under CM disable macro

Move unused code under CM disable macro.

Change-Id: Icee35a07a0275b218c453502f503f063dbfec782
CRs-Fixed: 2913566
Utkarsh Bhatnagar 4 years ago
parent
commit
302e1f68b9

+ 4 - 1
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3460,6 +3460,8 @@ lim_cm_handle_join_req(struct cm_vdev_join_req *req)
 	if (!mac_ctx)
 		return QDF_STATUS_E_INVAL;
 
+	lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_JOIN_REQ_EVENT, NULL, 0, 0);
+
 	pe_session = lim_cm_create_session(mac_ctx, req);
 
 	if (!pe_session)
@@ -4374,6 +4376,7 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
 	}
 	qdf_mem_copy(reassoc_req, in_req, in_req->length);
 
+#ifndef FEATURE_CM_ENABLE
 	if (!lim_is_sme_join_req_valid(mac_ctx, reassoc_req)) {
 		/*
 		 * Received invalid eWNI_SME_REASSOC_REQ
@@ -4383,7 +4386,7 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
 		ret_code = eSIR_SME_INVALID_PARAMETERS;
 		goto end;
 	}
-
+#endif
 	session_entry = pe_find_session_by_bssid(mac_ctx,
 			reassoc_req->bssDescription.bssId,
 			&session_id);

+ 10 - 6
core/mac/src/pe/lim/lim_sme_req_utils.c

@@ -57,21 +57,19 @@ static uint8_t
 lim_is_rsn_ie_valid_in_sme_req_message(struct mac_context *mac_ctx,
 				       tpSirRSNie rsn_ie)
 {
-	uint8_t start = 0, privacy;
+	uint8_t start = 0;
 	uint32_t val;
 	int len;
 
-	privacy = mac_ctx->mlme_cfg->wep_params.is_privacy_enabled;
-
 	val = mac_ctx->mlme_cfg->feature_flags.enable_rsn;
-	if (rsn_ie->length && (!privacy || !val)) {
+	if (rsn_ie->length && !val) {
 		/* Privacy & RSN not enabled in CFG.
 		 * In order to allow mixed mode for Guest access
 		 * allow BSS creation/join with no Privacy capability
 		 * yet advertising WPA IE
 		 */
-		pe_debug("RSN ie len: %d PRIVACY: %d RSN: %d",
-			       rsn_ie->length, privacy, val);
+		pe_debug("RSN ie len: %d RSN: %d",
+			       rsn_ie->length, val);
 	}
 
 	if (!rsn_ie->length) {
@@ -154,6 +152,7 @@ lim_is_rsn_ie_valid_in_sme_req_message(struct mac_context *mac_ctx,
 	return true;
 } /*** end lim_is_rs_nie_valid_in_sme_req_message() ***/
 
+#ifndef FEATURE_CM_ENABLE
 /**
  * lim_is_addie_valid_in_sme_req_message()
  *
@@ -200,6 +199,7 @@ lim_is_addie_valid_in_sme_req_message(struct mac_context *mac, tpSirAddie pAddie
 
 	return true;
 } /*** end lim_is_addie_valid_in_sme_req_message() ***/
+#endif
 
 /**
  * lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message() - to set rsnie/wpaie
@@ -323,6 +323,7 @@ lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *mac_ctx,
 	return true;
 }
 
+#ifndef FEATURE_CM_ENABLE
 /**
  * lim_is_bss_descr_valid_in_sme_req_message()
  *
@@ -353,6 +354,7 @@ lim_is_bss_descr_valid_in_sme_req_message(struct mac_context *mac,
 
 	return valid;
 } /*** end lim_is_bss_descr_valid_in_sme_req_message() ***/
+#endif
 
 bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
 				    struct start_bss_req *start_bss_req)
@@ -437,6 +439,7 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
 	return true;
 }
 
+#ifndef FEATURE_CM_ENABLE
 uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
 				  struct join_req *pJoinReq)
 {
@@ -478,6 +481,7 @@ uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
 end:
 	return valid;
 } /*** end lim_is_sme_join_req_valid() ***/
+#endif
 
 bool lim_is_sme_disassoc_req_valid(struct mac_context *mac,
 				   struct disassoc_req *disassoc_req,

+ 3 - 2
core/mac/src/pe/lim/lim_sme_req_utils.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012,2014-2015,2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012,2014-2015,2018-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -51,6 +51,7 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
 uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *,
 							    tpSirRSNie, struct pe_session *);
 
+#ifndef FEATURE_CM_ENABLE
 /**
  * lim_is_sme_join_req_valid() - Verify join request message is valid
  * @mac: Pointer to Global MAC structure
@@ -64,7 +65,7 @@ uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *
  */
 uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
 				  struct join_req *pJoinReq);
-
+#endif
 /**
  * lim_is_sme_disassoc_req_valid() - Validate disassoc req message
  * @mac: Pointer to Global MAC structure