Browse Source

qcacld-3.0: Remove lim_is_sme_set_context_req_valid()

The use of lim_is_sme_set_context_req_valid() was removed with:
  qcacld-3.0: Remove deprecated code in MAC layer
  Change-Id I65bc90b457cdd642d64d6ab0e6829856ee93e472

Since this function is now obsolete, remove it.

Change-Id: Ib60ae088401faa503db7201456c1c0ba1ab4917b
CRs-Fixed: 3429893
Jeff Johnson 2 years ago
parent
commit
f092753821
2 changed files with 2 additions and 116 deletions
  1. 1 101
      core/mac/src/pe/lim/lim_sme_req_utils.c
  2. 1 15
      core/mac/src/pe/lim/lim_sme_req_utils.h

+ 1 - 101
core/mac/src/pe/lim/lim_sme_req_utils.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -390,103 +390,3 @@ bool lim_is_sme_deauth_req_valid(struct mac_context *mac,
 
 	return true;
 } /*** end lim_is_sme_deauth_req_valid() ***/
-
-bool lim_is_sme_set_context_req_valid(struct mac_context *mac,
-				      struct set_context_req *set_context_req)
-{
-	uint8_t i = 0;
-	uint8_t valid = true;
-	tpSirKeys key = set_context_req->keyMaterial.key;
-
-	if ((set_context_req->keyMaterial.edType != eSIR_ED_WEP40) &&
-	    (set_context_req->keyMaterial.edType != eSIR_ED_WEP104) &&
-	    (set_context_req->keyMaterial.edType != eSIR_ED_NONE) &&
-#ifdef FEATURE_WLAN_WAPI
-	    (set_context_req->keyMaterial.edType != eSIR_ED_WPI) &&
-#endif
-	    !set_context_req->keyMaterial.numKeys) {
-		/**
-		 * No keys present in case of TKIP or CCMP
-		 * Log error.
-		 */
-		pe_warn("No keys present in SME_SETCONTEXT_REQ for edType: %d",
-			set_context_req->keyMaterial.edType);
-
-		valid = false;
-		goto end;
-	}
-
-	if (set_context_req->keyMaterial.numKeys &&
-	    (set_context_req->keyMaterial.edType == eSIR_ED_NONE)) {
-		/**
-		 * Keys present in case of no ED policy
-		 * Log error.
-		 */
-		pe_warn("Keys present in SME_SETCONTEXT_REQ for edType: %d",
-			set_context_req->keyMaterial.edType);
-
-		valid = false;
-		goto end;
-	}
-
-	if (set_context_req->keyMaterial.edType >= eSIR_ED_NOT_IMPLEMENTED) {
-		/**
-		 * Invalid edType in the message
-		 * Log error.
-		 */
-		pe_warn("Invalid edType: %d in SME_SETCONTEXT_REQ",
-			set_context_req->keyMaterial.edType);
-
-		valid = false;
-		goto end;
-	} else if (set_context_req->keyMaterial.edType > eSIR_ED_NONE) {
-		bool privacy;
-
-		privacy = mac->mlme_cfg->wep_params.is_privacy_enabled;
-
-		if (!privacy) {
-			/**
-			 * Privacy is not enabled
-			 * In order to allow mixed mode for Guest access
-			 * allow BSS creation/join with no Privacy capability
-			 * yet advertising WPA IE
-			 */
-			pe_debug("Privacy is not enabled, yet non-None EDtype: %d in SME_SETCONTEXT_REQ",
-				       set_context_req->keyMaterial.edType);
-		}
-	}
-
-	for (i = 0; i < set_context_req->keyMaterial.numKeys; i++) {
-		if (((set_context_req->keyMaterial.edType == eSIR_ED_WEP40) &&
-		     (key->keyLength != 5)) ||
-		    ((set_context_req->keyMaterial.edType == eSIR_ED_WEP104) &&
-		     (key->keyLength != 13)) ||
-		    ((set_context_req->keyMaterial.edType == eSIR_ED_TKIP) &&
-		     (key->keyLength != 32)) ||
-#ifdef FEATURE_WLAN_WAPI
-		    ((set_context_req->keyMaterial.edType == eSIR_ED_WPI) &&
-		     (key->keyLength != 32)) ||
-#endif
-		    ((set_context_req->keyMaterial.edType == eSIR_ED_GCMP) &&
-		     (key->keyLength != 16)) ||
-		    ((set_context_req->keyMaterial.edType == eSIR_ED_GCMP_256) &&
-		     (key->keyLength != 32)) ||
-		    ((set_context_req->keyMaterial.edType == eSIR_ED_CCMP) &&
-		     (key->keyLength != 16))) {
-			/**
-			 * Invalid key length for a given ED type
-			 * Log error.
-			 */
-			pe_warn("Invalid keyLength: %d for edType: %d in SME_SETCONTEXT_REQ",
-				key->keyLength,
-				set_context_req->keyMaterial.edType);
-
-			valid = false;
-			goto end;
-		}
-		key++;
-	}
-
-end:
-	return valid;
-} /*** end lim_is_sme_set_context_req_valid() ***/

+ 1 - 15
core/mac/src/pe/lim/lim_sme_req_utils.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2012,2014-2015,2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@@ -85,20 +85,6 @@ bool lim_is_sme_deauth_req_valid(struct mac_context *mac,
 				 struct deauth_req *deauth_req,
 				 struct pe_session *pe_session);
 
-/**
- * lim_is_sme_set_context_req_valid() - Validate set context req message
- * @mac: Pointer to Global MAC structure
- * @dset_context_req: Pointer to received SME_SET_CONTEXT_REQ message
- *
- * This function is called by lim_process_sme_req_messages() upon
- * receiving SME_SET_CONTEXT_REQ message from application.
- *
- * Return: true  when received SME_SET_CONTEXT_REQ is formatted correctly
- *         false otherwise
- */
-bool lim_is_sme_set_context_req_valid(struct mac_context *,
-				      struct set_context_req *set_context_req);
-
 /**
  * lim_is_sme_disassoc_cnf_valid() - Validate disassoc cnf message
  * @mac: Pointer to Global MAC structure