From fee20aa724c83ce2411535bb760f85be7d19d224 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 30 Oct 2017 21:33:14 -0700 Subject: [PATCH] qcacld-3.0: Remove obsolete roamingState Field roamingState in struct hdd_roaming_info is written but never read. Since this information is not used, remove it. Change-Id: If845658a3aa46843e6e558911ed8dee68ea592d1 CRs-Fixed: 2135912 --- core/hdd/inc/wlan_hdd_main.h | 15 --------------- core/hdd/src/wlan_hdd_assoc.c | 8 -------- core/hdd/src/wlan_hdd_cfg80211.c | 17 ++++------------- 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 55df24608a3d..0d91cc6cd19e 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -509,22 +509,8 @@ struct hdd_stats { #endif }; -enum hdd_roam_state { - HDD_ROAM_STATE_NONE, - - /* Issuing a disconnect due to transition into low power states */ - HDD_ROAM_STATE_DISCONNECTING_POWER, - - /* Move to this state when HDD sets a key with SME/CSR. Note this is - * an important state to get right because we will get calls into our - * SME callback routine for SetKey activity that we did not initiate! - */ - HDD_ROAM_STATE_SETTING_KEY, -}; - /** * struct hdd_roaming_info - HDD Internal Roaming Information - * @roamingState: Current state of roaming * @bssid: BSSID to which we are connected * @peerMac: Peer MAC address for IBSS connection * @roamId: Unique identifier for a roaming instance @@ -533,7 +519,6 @@ enum hdd_roam_state { * */ struct hdd_roaming_info { - enum hdd_roam_state roamingState; tSirMacAddr bssid; tSirMacAddr peerMac; uint32_t roamId; diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index a9c51ce86a92..4c97bc2e2fe1 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2449,8 +2449,6 @@ static void hdd_change_peer_state_after_set_key(struct hdd_adapter *adapter, hdd_sta_ctx->conn_info.gtk_installed = false; hdd_sta_ctx->conn_info.ptk_installed = false; } - - hdd_sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; } /** @@ -2494,12 +2492,6 @@ static QDF_STATUS hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter, if (fConnected) { hdd_change_peer_state_after_set_key(adapter, roam_info, roamResult); - } else { - /* - * possible disassoc after issuing set key and waiting - * set key complete. - */ - sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; } EXIT(); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 67f828bb232d..54cb92a97da7 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -13544,11 +13544,11 @@ void wlan_hdd_cfg80211_deregister_frames(struct hdd_adapter *adapter) } #ifdef FEATURE_WLAN_WAPI -void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter, uint8_t key_index, +void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter, + uint8_t key_index, const uint8_t *mac_addr, const uint8_t *key, int key_Len) { - struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); tCsrRoamSetKey setKey; bool isConnected = true; int status = 0; @@ -13575,14 +13575,11 @@ void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter, uint8_t key_ind hdd_debug("WAPI KEY LENGTH:0x%04x", key_Len); - sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY; if (isConnected) { status = sme_roam_set_key(WLAN_HDD_GET_HAL_CTX(adapter), adapter->sessionId, &setKey, &roamId); - } - if (status != 0) { - hdd_err("sme_roam_set_key failed status: %d", status); - sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; + if (status != 0) + hdd_err("sme_roam_set_key failed status: %d", status); } } #endif /* FEATURE_WLAN_WAPI */ @@ -14452,8 +14449,6 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, KeyMaterial[key_index][0], params->key, params->key_len); - sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY; - hdd_debug("Set key for peerMac "MAC_ADDRESS_STR" direction %d", MAC_ADDR_ARRAY(setKey.peerMac.bytes), setKey.keyDirection); @@ -14478,8 +14473,6 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, if (0 != status) { hdd_err("sme_roam_set_key failed, status: %d", status); - sta_ctx->roam_info.roamingState = - HDD_ROAM_STATE_NONE; return -EINVAL; } @@ -14513,8 +14506,6 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, if (0 != status) { hdd_err("sme_roam_set_key failed for group key (IBSS), returned %d", status); - sta_ctx->roam_info.roamingState = - HDD_ROAM_STATE_NONE; return -EINVAL; } }