Jelajahi Sumber

qcacld-3.0: Remove unused code for defer key

As setFTPTKState is never set to true the code for defer
key is not been used

Change-Id: I8afcebf00b00bcf39ba7da999c55e5eacdf26aaa
CRs-Fixed: 2604329
Abhishek Singh 5 tahun lalu
induk
melakukan
bda14831fa

+ 1 - 10
core/hdd/inc/wlan_hdd_assoc.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2020 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
@@ -355,15 +355,6 @@ inline QDF_STATUS hdd_roam_deregister_tdlssta(struct hdd_adapter *adapter,
 }
 #endif
 
-
-/**
- * hdd_perform_roam_set_key_complete() - perform set key complete
- * @adapter: pointer to adapter
- *
- * Return: none
- */
-void hdd_perform_roam_set_key_complete(struct hdd_adapter *adapter);
-
 #ifdef FEATURE_WLAN_ESE
 /**
  * hdd_indicate_ese_bcn_report_no_results() - beacon report no scan results

+ 0 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -731,7 +731,6 @@ struct hdd_station_ctx {
 	struct qdf_mac_addr requested_bssid;
 	struct hdd_connection_info conn_info;
 	struct hdd_connection_info cache_conn_info;
-	struct hdd_roaming_info roam_info;
 	int ft_carrier_on;
 	int ibss_sta_generation;
 	bool ibss_enc_key_installed;

+ 0 - 59
core/hdd/src/wlan_hdd_assoc.c

@@ -2834,40 +2834,6 @@ hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * hdd_perform_roam_set_key_complete() - perform set key complete
- * @adapter: pointer to adapter
- *
- * Return: none
- */
-void hdd_perform_roam_set_key_complete(struct hdd_adapter *adapter)
-{
-	QDF_STATUS qdf_ret_status = QDF_STATUS_SUCCESS;
-	struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
-	struct csr_roam_info *roam_info;
-
-	roam_info = qdf_mem_malloc(sizeof(*roam_info));
-	if (!roam_info)
-		return;
-	roam_info->fAuthRequired = false;
-	qdf_mem_copy(roam_info->bssid.bytes,
-		     sta_ctx->roam_info.bssid, QDF_MAC_ADDR_SIZE);
-	qdf_mem_copy(roam_info->peerMac.bytes,
-		     sta_ctx->roam_info.peer_mac, QDF_MAC_ADDR_SIZE);
-
-	qdf_ret_status =
-			hdd_roam_set_key_complete_handler(adapter,
-					   roam_info,
-					   sta_ctx->roam_info.roam_id,
-					   sta_ctx->roam_info.roam_status,
-					   eCSR_ROAM_RESULT_AUTHENTICATED);
-	if (qdf_ret_status != QDF_STATUS_SUCCESS)
-		hdd_err("Set Key complete failure");
-
-	sta_ctx->roam_info.defer_key_complete = false;
-	qdf_mem_free(roam_info);
-}
-
 #if defined(WLAN_FEATURE_FILS_SK) && \
 	(defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \
 		 (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)))
@@ -3296,31 +3262,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 							assoc_rsp_len,
 							roam_info);
 					}
-					if (sme_get_ftptk_state
-						    (mac_handle,
-						    adapter->vdev_id)) {
-						sme_set_ftptk_state
-							(mac_handle,
-							adapter->vdev_id,
-							false);
-						roam_info->fAuthRequired =
-							false;
-
-						qdf_mem_copy(sta_ctx->
-							     roam_info.bssid,
-							     roam_info->bssid.bytes,
-							     QDF_MAC_ADDR_SIZE);
-						qdf_mem_copy(sta_ctx->
-							     roam_info.peer_mac,
-							     roam_info->peerMac.bytes,
-							     QDF_MAC_ADDR_SIZE);
-						sta_ctx->roam_info.roam_id =
-							roam_id;
-						sta_ctx->roam_info.roam_status =
-							roam_status;
-						sta_ctx->roam_info.
-						defer_key_complete = true;
-					}
 				} else if (!hddDisconInProgress) {
 					hdd_debug("ft_carrier_on is %d, sending connect indication",
 						 ft_carrier_on);

+ 0 - 9
core/hdd/src/wlan_hdd_cfg80211.c

@@ -16567,18 +16567,9 @@ static int wlan_hdd_add_key_sta(struct hdd_adapter *adapter,
 				mac_handle_t mac_handle, bool *ft_mode)
 {
 	struct wlan_objmgr_vdev *vdev;
-	struct hdd_station_ctx *sta_ctx =
-		WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	int errno;
 	QDF_STATUS status;
 
-	if (!pairwise) {
-		/* set group key */
-		if (sta_ctx->roam_info.defer_key_complete) {
-			hdd_debug("Perform Set key Complete");
-			hdd_perform_roam_set_key_complete(adapter);
-		}
-	}
 	/* The supplicant may attempt to set the PTK once
 	 * pre-authentication is done. Save the key in the
 	 * UMAC and include it in the ADD BSS request

+ 1 - 5
core/sme/inc/sme_ft_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2016, 2018, 2019 The Linux Foundation.
+ * Copyright (c) 2013-2016, 2018, 2019-2020 The Linux Foundation.
  * All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -59,7 +59,6 @@ typedef struct sFTSMEContext {
 	/* Saved pFTPreAuthRsp */
 	tpSirFTPreAuthRsp psavedFTPreAuthRsp;
 	bool setFTPreAuthState;
-	bool setFTPTKState;
 	/* Time to trigger reassoc once pre-auth is successful */
 	qdf_mc_timer_t preAuthReassocIntvlTimer;
 	bool addMDIE;
@@ -115,7 +114,4 @@ void sme_preauth_reassoc_intvl_timer_callback(void *context);
 void sme_set_ft_pre_auth_state(mac_handle_t mac_handle, uint32_t sessionId,
 			       bool state);
 bool sme_get_ft_pre_auth_state(mac_handle_t mac_handle, uint32_t sessionId);
-bool sme_get_ftptk_state(mac_handle_t mac_handle, uint32_t sessionId);
-void sme_set_ftptk_state(mac_handle_t mac_handle, uint32_t sessionId,
-			 bool state);
 #endif

+ 0 - 26
core/sme/src/common/sme_ft_api.c

@@ -221,31 +221,6 @@ void sme_set_ft_ies(mac_handle_t mac_handle, uint32_t session_id,
 	sme_release_global_lock(&mac_ctx->sme);
 }
 
-bool sme_get_ftptk_state(mac_handle_t mac_handle, uint32_t sessionId)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
-
-	if (!pSession) {
-		sme_err("pSession is NULL");
-		return false;
-	}
-	return pSession->ftSmeContext.setFTPTKState;
-}
-
-void sme_set_ftptk_state(mac_handle_t mac_handle, uint32_t sessionId,
-			 bool state)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
-
-	if (!pSession) {
-		sme_err("pSession is NULL");
-		return;
-	}
-	pSession->ftSmeContext.setFTPTKState = state;
-}
-
 QDF_STATUS sme_check_ft_status(mac_handle_t mac_handle, uint32_t session_id)
 {
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
@@ -454,7 +429,6 @@ void sme_ft_reset(mac_handle_t mac_handle, uint32_t sessionId)
 			pSession->ftSmeContext.psavedFTPreAuthRsp = NULL;
 		}
 		pSession->ftSmeContext.setFTPreAuthState = false;
-		pSession->ftSmeContext.setFTPTKState = false;
 
 		qdf_mem_zero(pSession->ftSmeContext.preAuthbssId,
 			     QDF_MAC_ADDR_SIZE);