From 3d731362e104f262367b4bed279141b91771a558 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 27 Oct 2017 19:06:41 -0700 Subject: [PATCH] qcacld-3.0: Rename hdd_ap_ctx wepKey field Per the Linux coding style "mixed-case names are frowned upon" so rename field wepKey in struct hdd_ap_ctx. Change-Id: I8964d07ebaf77c9ff14ec0a055c800f3923a9b55 CRs-Fixed: 2134927 --- core/hdd/inc/wlan_hdd_main.h | 10 ++++------ core/hdd/src/wlan_hdd_cfg80211.c | 4 ++-- core/hdd/src/wlan_hdd_hostapd.c | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 4666845352ec..c02d45a8a1d7 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -814,6 +814,8 @@ struct hdd_station_info { * @privacy: The privacy bits of configuration * @encryption_type: The encryption being used * @group_key: Group Encryption Key + * @wep_key: WEP key array + * @wep_def_key_idx: WEP default key index */ struct hdd_ap_ctx { struct hdd_hostapd_state hostapd_state; @@ -822,6 +824,8 @@ struct hdd_ap_ctx { uint8_t privacy; eCsrEncryptionType encryption_type; tCsrRoamSetKey group_key; + tCsrRoamSetKey wep_key[CSR_MAX_NUM_KEY]; + uint8_t wep_def_key_idx; tSirWPSPBCProbeReq WPSPBCProbeReq; @@ -833,12 +837,6 @@ struct hdd_ap_ctx { uint8_t operatingChannel; - /* This will have WEP key data, if it is received before start bss */ - tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY]; - - /* WEP default key index */ - uint8_t wep_def_key_idx; - struct hdd_beacon_data *beacon; bool bApActive; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 08fc9ea0de17..558ff3c79f85 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14413,7 +14413,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, if (pairwise || eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == setKey.encType || eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == setKey.encType) - qdf_mem_copy(&ap_ctx->wepKey[key_index], &setKey, + qdf_mem_copy(&ap_ctx->wep_key[key_index], &setKey, sizeof(tCsrRoamSetKey)); else qdf_mem_copy(&ap_ctx->group_key, &setKey, @@ -14835,7 +14835,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy, /* Saving key direction for default key index to TX default */ struct hdd_ap_ctx *pAPCtx = WLAN_HDD_GET_AP_CTX_PTR(adapter); - pAPCtx->wepKey[key_index].keyDirection = + pAPCtx->wep_key[key_index].keyDirection = eSIR_TX_DEFAULT; hdd_debug("WEP default key index set to SAP context %d", key_index); diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 14d5796eafb0..a99e23f6207e 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1597,13 +1597,13 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, hdd_err("wlansap_set_key_sta failed"); } else { for (i = 0; i < CSR_MAX_NUM_KEY; i++) { - if (!ap_ctx->wepKey[i].keyLength) + if (!ap_ctx->wep_key[i].keyLength) continue; status = wlansap_set_key_sta( WLAN_HDD_GET_SAP_CTX_PTR (adapter), - &ap_ctx->wepKey[i]); + &ap_ctx->wep_key[i]); if (!QDF_IS_STATUS_SUCCESS(status)) hdd_err("set_key failed idx: %d", i); } @@ -1705,7 +1705,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, */ ap_ctx->group_key.keyLength = 0; for (i = 0; i < CSR_MAX_NUM_KEY; i++) - ap_ctx->wepKey[i].keyLength = 0; + ap_ctx->wep_key[i].keyLength = 0; } /* clear the reason code in case BSS is stopped