From d377dce17598ddcaaca4d1923250ed960ba6c745 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 4 Oct 2017 10:32:42 -0700 Subject: [PATCH] qcacld-3.0: Rename pHddStaCtx The Linux Coding Style frowns upon mixed-case names and so-called Hungarian notation, so rename pHddStaCtx to align with the Coding Style. Change-Id: I508816b354eb592305cb238f7604ef39586c19b2 CRs-Fixed: 2121162 --- core/hdd/inc/wlan_hdd_assoc.h | 8 +- core/hdd/inc/wlan_hdd_main.h | 1 + core/hdd/src/wlan_hdd_assoc.c | 354 +++++++++++++++---------------- core/hdd/src/wlan_hdd_cfg80211.c | 118 +++++------ core/hdd/src/wlan_hdd_hostapd.c | 8 +- core/hdd/src/wlan_hdd_ioctl.c | 72 +++---- core/hdd/src/wlan_hdd_ipa.c | 24 +-- core/hdd/src/wlan_hdd_main.c | 20 +- core/hdd/src/wlan_hdd_ocb.c | 10 +- core/hdd/src/wlan_hdd_stats.c | 46 ++-- core/hdd/src/wlan_hdd_tx_rx.c | 20 +- core/hdd/src/wlan_hdd_wext.c | 166 +++++++-------- 12 files changed, 424 insertions(+), 423 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_assoc.h b/core/hdd/inc/wlan_hdd_assoc.h index 5513516f75d1..7f5ba3fd353a 100644 --- a/core/hdd/inc/wlan_hdd_assoc.h +++ b/core/hdd/inc/wlan_hdd_assoc.h @@ -226,20 +226,20 @@ bool hdd_is_connecting(struct hdd_station_ctx *hdd_sta_ctx); /** * hdd_conn_is_connected() - Function to check connection status - * @pHddStaCtx: pointer to global HDD Station context + * @sta_ctx: pointer to global HDD Station context * * Return: false if any errors encountered, true otherwise */ -bool hdd_conn_is_connected(struct hdd_station_ctx *pHddStaCtx); +bool hdd_conn_is_connected(struct hdd_station_ctx *sta_ctx); /** * hdd_conn_get_connected_band() - get current connection radio band - * @pHddStaCtx: pointer to global HDD Station context + * @sta_ctx: pointer to global HDD Station context * * Return: BAND_2G or BAND_5G based on current AP connection * BAND_ALL if not connected */ -enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *pHddStaCtx); +enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *sta_ctx); /** * hdd_sme_roam_callback() - hdd sme roam callback diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 3ac3a8673233..5713132ad58f 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -43,6 +43,7 @@ #define pAdapter #define pHostapdAdapter #define pHddApCtx +#define pHddStaCtx #define pHostapdState /* diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index a56f966cbd2b..502107a6155e 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -164,13 +164,13 @@ static const int beacon_filter_table[] = { static void hdd_conn_set_authenticated(struct hdd_adapter *adapter, uint8_t authState) { - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); /* save the new connection state */ hdd_debug("Authenticated state Changed from oldState:%d to State:%d", - pHddStaCtx->conn_info.uIsAuthenticated, authState); - pHddStaCtx->conn_info.uIsAuthenticated = authState; + sta_ctx->conn_info.uIsAuthenticated, authState); + sta_ctx->conn_info.uIsAuthenticated = authState; /* Check is pending ROC request or not when auth state changed */ schedule_delayed_work(&hdd_ctx->roc_req_work, 0); @@ -215,14 +215,14 @@ void hdd_conn_set_connection_state(struct hdd_adapter *adapter, * and sets output parameter pConnState; * false otherwise */ -static inline bool hdd_conn_get_connection_state(struct hdd_station_ctx *pHddStaCtx, +static inline bool hdd_conn_get_connection_state(struct hdd_station_ctx *sta_ctx, eConnectionState *pConnState) { bool fConnected = false; eConnectionState connState; /* get the connection state. */ - connState = pHddStaCtx->conn_info.connState; + connState = sta_ctx->conn_info.connState; if (eConnectionState_Associated == connState || eConnectionState_IbssConnected == connState || @@ -250,28 +250,28 @@ bool hdd_is_connecting(struct hdd_station_ctx *hdd_sta_ctx) /** * hdd_conn_is_connected() - Function to check connection status - * @pHddStaCtx: pointer to global HDD Station context + * @sta_ctx: pointer to global HDD Station context * * Return: false if any errors encountered, true otherwise */ -bool hdd_conn_is_connected(struct hdd_station_ctx *pHddStaCtx) +bool hdd_conn_is_connected(struct hdd_station_ctx *sta_ctx) { - return hdd_conn_get_connection_state(pHddStaCtx, NULL); + return hdd_conn_get_connection_state(sta_ctx, NULL); } /** * hdd_conn_get_connected_band() - get current connection radio band - * @pHddStaCtx: pointer to global HDD Station context + * @sta_ctx: pointer to global HDD Station context * * Return: eCSR_BAND_24 or eCSR_BAND_5G based on current AP connection * eCSR_BAND_ALL if not connected */ -enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *pHddStaCtx) +enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *sta_ctx) { uint8_t staChannel = 0; - if (eConnectionState_Associated == pHddStaCtx->conn_info.connState) - staChannel = pHddStaCtx->conn_info.operationChannel; + if (eConnectionState_Associated == sta_ctx->conn_info.connState) + staChannel = sta_ctx->conn_info.operationChannel; if (staChannel > 0 && staChannel < 14) return BAND_2G; @@ -283,21 +283,21 @@ enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *pHddStaCtx) /** * hdd_conn_get_connected_cipher_algo() - get current connection cipher type - * @pHddStaCtx: pointer to global HDD Station context + * @sta_ctx: pointer to global HDD Station context * @pConnectedCipherAlgo: pointer to connected cipher algo * * Return: false if any errors encountered, true otherwise */ static inline bool -hdd_conn_get_connected_cipher_algo(struct hdd_station_ctx *pHddStaCtx, +hdd_conn_get_connected_cipher_algo(struct hdd_station_ctx *sta_ctx, eCsrEncryptionType *pConnectedCipherAlgo) { bool fConnected = false; - fConnected = hdd_conn_get_connection_state(pHddStaCtx, NULL); + fConnected = hdd_conn_get_connection_state(sta_ctx, NULL); if (pConnectedCipherAlgo) - *pConnectedCipherAlgo = pHddStaCtx->conn_info.ucEncryptionType; + *pConnectedCipherAlgo = sta_ctx->conn_info.ucEncryptionType; return fConnected; } @@ -856,7 +856,7 @@ static void hdd_conn_save_connect_info(struct hdd_adapter *adapter, tCsrRoamInfo *pRoamInfo, eCsrRoamBssType eBssType) { - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); eCsrEncryptionType encryptType = eCSR_ENCRYPT_TYPE_NONE; QDF_ASSERT(pRoamInfo); @@ -865,7 +865,7 @@ hdd_conn_save_connect_info(struct hdd_adapter *adapter, tCsrRoamInfo *pRoamInfo, /* Save the BSSID for the connection */ if (eCSR_BSS_TYPE_INFRASTRUCTURE == eBssType) { QDF_ASSERT(pRoamInfo->pBssDesc); - qdf_copy_macaddr(&pHddStaCtx->conn_info.bssId, + qdf_copy_macaddr(&sta_ctx->conn_info.bssId, &pRoamInfo->bssid); /* @@ -876,11 +876,11 @@ hdd_conn_save_connect_info(struct hdd_adapter *adapter, tCsrRoamInfo *pRoamInfo, * in this structure so no change here. */ if (!pRoamInfo->fReassocReq) { - pHddStaCtx->conn_info.staId[0] = + sta_ctx->conn_info.staId[0] = pRoamInfo->staId; } } else if (eCSR_BSS_TYPE_IBSS == eBssType) { - qdf_copy_macaddr(&pHddStaCtx->conn_info.bssId, + qdf_copy_macaddr(&sta_ctx->conn_info.bssId, &pRoamInfo->bssid); } else { /* @@ -899,38 +899,38 @@ hdd_conn_save_connect_info(struct hdd_adapter *adapter, tCsrRoamInfo *pRoamInfo, /* Get Multicast Encryption Type */ encryptType = pRoamInfo->u.pConnectedProfile->mcEncryptionType; - pHddStaCtx->conn_info.mcEncryptionType = encryptType; + sta_ctx->conn_info.mcEncryptionType = encryptType; /* Get Unicast Encryption Type */ encryptType = pRoamInfo->u.pConnectedProfile->EncryptionType; - pHddStaCtx->conn_info.ucEncryptionType = encryptType; + sta_ctx->conn_info.ucEncryptionType = encryptType; - pHddStaCtx->conn_info.authType = + sta_ctx->conn_info.authType = pRoamInfo->u.pConnectedProfile->AuthType; - pHddStaCtx->conn_info.last_auth_type = - pHddStaCtx->conn_info.authType; + sta_ctx->conn_info.last_auth_type = + sta_ctx->conn_info.authType; - pHddStaCtx->conn_info.operationChannel = + sta_ctx->conn_info.operationChannel = pRoamInfo->u.pConnectedProfile->operationChannel; /* Save the ssid for the connection */ - qdf_mem_copy(&pHddStaCtx->conn_info.SSID.SSID, + qdf_mem_copy(&sta_ctx->conn_info.SSID.SSID, &pRoamInfo->u.pConnectedProfile->SSID, sizeof(tSirMacSSid)); - qdf_mem_copy(&pHddStaCtx->conn_info.last_ssid.SSID, + qdf_mem_copy(&sta_ctx->conn_info.last_ssid.SSID, &pRoamInfo->u.pConnectedProfile->SSID, sizeof(tSirMacSSid)); /* Save dot11mode in which STA associated to AP */ - pHddStaCtx->conn_info.dot11Mode = + sta_ctx->conn_info.dot11Mode = pRoamInfo->u.pConnectedProfile->dot11Mode; - pHddStaCtx->conn_info.proxyARPService = + sta_ctx->conn_info.proxyARPService = pRoamInfo->u.pConnectedProfile->proxyARPService; - pHddStaCtx->conn_info.nss = pRoamInfo->chan_info.nss; + sta_ctx->conn_info.nss = pRoamInfo->chan_info.nss; - pHddStaCtx->conn_info.rate_flags = + sta_ctx->conn_info.rate_flags = pRoamInfo->chan_info.rate_flags; } hdd_save_bss_info(adapter, pRoamInfo); @@ -1229,7 +1229,7 @@ static void hdd_send_association_event(struct net_device *dev, int ret; struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); union iwreq_data wrqu; int we_event; char *msg; @@ -1254,7 +1254,7 @@ static void hdd_send_association_event(struct net_device *dev, true, adapter->hdd_vdev); } #endif - if (eConnectionState_Associated == pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated == sta_ctx->conn_info.connState) { tSirSmeChanInfo chan_info = {0}; if (!pCsrRoamInfo) { @@ -1309,7 +1309,7 @@ static void hdd_send_association_event(struct net_device *dev, hdd_send_ft_assoc_response(dev, adapter, pCsrRoamInfo); } qdf_copy_macaddr(&peerMacAddr, - &pHddStaCtx->conn_info.bssId); + &sta_ctx->conn_info.bssId); chan_info.chan_id = pCsrRoamInfo->chan_info.chan_id; chan_info.mhz = pCsrRoamInfo->chan_info.mhz; chan_info.info = pCsrRoamInfo->chan_info.info; @@ -1362,13 +1362,13 @@ static void hdd_send_association_event(struct net_device *dev, #endif #endif } else if (eConnectionState_IbssConnected == /* IBss Associated */ - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { policy_mgr_update_connection_info(hdd_ctx->hdd_psoc, adapter->sessionId); - memcpy(wrqu.ap_addr.sa_data, pHddStaCtx->conn_info.bssId.bytes, + memcpy(wrqu.ap_addr.sa_data, sta_ctx->conn_info.bssId.bytes, ETH_ALEN); hdd_debug("wlan: new IBSS connection to " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(pHddStaCtx->conn_info.bssId.bytes)); + MAC_ADDR_ARRAY(sta_ctx->conn_info.bssId.bytes)); ret = hdd_objmgr_add_peer_object(adapter->hdd_vdev, QDF_IBSS_MODE, @@ -1396,7 +1396,7 @@ static void hdd_send_association_event(struct net_device *dev, if ((adapter->device_mode == QDF_STA_MODE) || (adapter->device_mode == QDF_P2P_CLIENT_MODE)) { qdf_copy_macaddr(&peerMacAddr, - &pHddStaCtx->conn_info.bssId); + &sta_ctx->conn_info.bssId); /* send peer status indication to oem app */ hdd_send_peer_status_ind_to_app(&peerMacAddr, @@ -1441,7 +1441,7 @@ static void hdd_send_association_event(struct net_device *dev, wireless_send_event(dev, we_event, &wrqu, msg); #ifdef FEATURE_WLAN_ESE if (eConnectionState_Associated == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { if ((pRoamProfile->AuthType.authType[0] == eCSR_AUTH_TYPE_CCKM_RSN) || (pRoamProfile->AuthType.authType[0] == @@ -1455,30 +1455,30 @@ static void hdd_send_association_event(struct net_device *dev, /** * hdd_conn_remove_connect_info() - remove connection info - * @pHddStaCtx: pointer to global HDD station context + * @sta_ctx: pointer to global HDD station context * @pCsrRoamInfo: pointer to roam info * * Return: none */ -static void hdd_conn_remove_connect_info(struct hdd_station_ctx *pHddStaCtx) +static void hdd_conn_remove_connect_info(struct hdd_station_ctx *sta_ctx) { /* Remove staId, bssId and peerMacAddress */ - pHddStaCtx->conn_info.staId[0] = HDD_WLAN_INVALID_STA_ID; - qdf_mem_zero(&pHddStaCtx->conn_info.bssId, QDF_MAC_ADDR_SIZE); - qdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[0], + sta_ctx->conn_info.staId[0] = HDD_WLAN_INVALID_STA_ID; + qdf_mem_zero(&sta_ctx->conn_info.bssId, QDF_MAC_ADDR_SIZE); + qdf_mem_zero(&sta_ctx->conn_info.peerMacAddress[0], QDF_MAC_ADDR_SIZE); /* Clear all security settings */ - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; - pHddStaCtx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE; - pHddStaCtx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; + sta_ctx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE; + sta_ctx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE; - qdf_mem_zero(&pHddStaCtx->conn_info.Keys, sizeof(tCsrKeys)); - qdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&sta_ctx->conn_info.Keys, sizeof(tCsrKeys)); + qdf_mem_zero(&sta_ctx->ibss_enc_key, sizeof(tCsrRoamSetKey)); - pHddStaCtx->conn_info.proxyARPService = 0; + sta_ctx->conn_info.proxyARPService = 0; - qdf_mem_zero(&pHddStaCtx->conn_info.SSID, sizeof(tCsrSSIDInfo)); + qdf_mem_zero(&sta_ctx->conn_info.SSID, sizeof(tCsrSSIDInfo)); } /** @@ -1491,13 +1491,13 @@ static void hdd_conn_remove_connect_info(struct hdd_station_ctx *pHddStaCtx) QDF_STATUS hdd_roam_deregister_sta(struct hdd_adapter *adapter, uint8_t staid) { QDF_STATUS qdf_status; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); int ret = 0; uint8_t *peer_mac = NULL; struct qdf_mac_addr broadcastMacAddr = QDF_MAC_ADDR_BROADCAST_INITIALIZER; if (eConnectionState_IbssDisconnected == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { /* * Do not set the carrier off when the last peer leaves. * We will set the carrier off while stopping the IBSS. @@ -1513,12 +1513,12 @@ QDF_STATUS hdd_roam_deregister_sta(struct hdd_adapter *adapter, uint8_t staid) } if (adapter->device_mode == QDF_STA_MODE) { - peer_mac = pHddStaCtx->conn_info.bssId.bytes; + peer_mac = sta_ctx->conn_info.bssId.bytes; } else if (adapter->device_mode == QDF_IBSS_MODE) { - if (pHddStaCtx->broadcast_staid == staid) + if (sta_ctx->broadcast_staid == staid) peer_mac = broadcastMacAddr.bytes; else - peer_mac = pHddStaCtx->conn_info. + peer_mac = sta_ctx->conn_info. peerMacAddress[staid].bytes; } @@ -1600,7 +1600,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, QDF_STATUS vstatus; struct net_device *dev = adapter->dev; struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); uint8_t sta_id; bool sendDisconInd = true; @@ -1615,9 +1615,9 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, WLAN_CONTROL_PATH); if (hdd_ipa_is_enabled(hdd_ctx)) - hdd_ipa_wlan_evt(adapter, pHddStaCtx->conn_info.staId[0], + hdd_ipa_wlan_evt(adapter, sta_ctx->conn_info.staId[0], HDD_IPA_STA_DISCONNECT, - pHddStaCtx->conn_info.bssId.bytes); + sta_ctx->conn_info.bssId.bytes); #ifdef FEATURE_WLAN_AUTO_SHUTDOWN wlan_hdd_auto_shutdown_enable(hdd_ctx, true); @@ -1634,14 +1634,14 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, * to cfg80211_disconnected. */ if ((eConnectionState_Disconnecting == - pHddStaCtx->conn_info.connState) || + sta_ctx->conn_info.connState) || (eConnectionState_NotConnected == - pHddStaCtx->conn_info.connState)) { + sta_ctx->conn_info.connState)) { hdd_debug("HDD has initiated a disconnect, no need to send disconnect indication to kernel"); sendDisconInd = false; } - if (pHddStaCtx->conn_info.connState != eConnectionState_Disconnecting) { + if (sta_ctx->conn_info.connState != eConnectionState_Disconnecting) { INIT_COMPLETION(adapter->disconnect_comp_var); hdd_conn_set_connection_state(adapter, eConnectionState_Disconnecting); @@ -1717,7 +1717,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, if (eCSR_ROAM_IBSS_LEAVE == roamStatus) { uint8_t i; - sta_id = pHddStaCtx->broadcast_staid; + sta_id = sta_ctx->broadcast_staid; vstatus = hdd_roam_deregister_sta(adapter, sta_id); if (!QDF_IS_STATUS_SUCCESS(vstatus)) { hdd_err("hdd_roam_deregister_sta() failed for staID %d Status: %d [0x%x]", @@ -1728,9 +1728,9 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, /* Clear all the peer sta register with TL. */ for (i = 0; i < MAX_PEERS; i++) { if (HDD_WLAN_INVALID_STA_ID == - pHddStaCtx->conn_info.staId[i]) + sta_ctx->conn_info.staId[i]) continue; - sta_id = pHddStaCtx->conn_info.staId[i]; + sta_id = sta_ctx->conn_info.staId[i]; hdd_debug("Deregister StaID %d", sta_id); vstatus = hdd_roam_deregister_sta(adapter, sta_id); if (!QDF_IS_STATUS_SUCCESS(vstatus)) { @@ -1741,15 +1741,15 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, /* set the staid and peer mac as 0, all other * reset are done in hdd_connRemoveConnectInfo. */ - pHddStaCtx->conn_info.staId[i] = + sta_ctx->conn_info.staId[i] = HDD_WLAN_INVALID_STA_ID; - qdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[i], + qdf_mem_zero(&sta_ctx->conn_info.peerMacAddress[i], sizeof(struct qdf_mac_addr)); if (sta_id < (WLAN_MAX_STA_COUNT + 3)) hdd_ctx->sta_to_adapter[sta_id] = NULL; } } else { - sta_id = pHddStaCtx->conn_info.staId[0]; + sta_id = sta_ctx->conn_info.staId[0]; hdd_debug("roamResult: %d", roamResult); /* clear scan cache for Link Lost */ @@ -1757,14 +1757,14 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, eCSR_ROAM_RESULT_DISASSOC_IND == roamResult || eCSR_ROAM_LOSTLINK == roamStatus) { wlan_hdd_cfg80211_update_bss_list(adapter, - pHddStaCtx->conn_info.bssId.bytes); + sta_ctx->conn_info.bssId.bytes); sme_remove_bssid_from_scan_list(hdd_ctx->hHal, - pHddStaCtx->conn_info.bssId.bytes); + sta_ctx->conn_info.bssId.bytes); } hdd_ctx->sta_to_adapter[sta_id] = NULL; } /* Clear saved connection information in HDD */ - hdd_conn_remove_connect_info(pHddStaCtx); + hdd_conn_remove_connect_info(sta_ctx); hdd_conn_set_connection_state(adapter, eConnectionState_NotConnected); pmo_ucfg_flush_gtk_offload_req(adapter->hdd_vdev); @@ -1777,7 +1777,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, wlan_hdd_clear_link_layer_stats(adapter); /* Unblock anyone waiting for disconnect to complete */ complete(&adapter->disconnect_comp_var); - hdd_print_bss_info(pHddStaCtx); + hdd_print_bss_info(sta_ctx); return status; } @@ -1944,7 +1944,7 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter, { QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; struct ol_txrx_desc_type staDesc = { 0 }; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct ol_txrx_ops txrx_ops; void *soc = cds_get_context(QDF_MODULE_ID_SOC); void *pdev = cds_get_context(QDF_MODULE_ID_TXRX); @@ -2018,7 +2018,7 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter, hdd_objmgr_set_peer_mlme_auth_state(adapter->hdd_vdev, true); } else { hdd_debug("ULA auth StaId= %d. Changing TL state to CONNECTED at Join time", - pHddStaCtx->conn_info.staId[0]); + sta_ctx->conn_info.staId[0]); qdf_status = hdd_change_peer_state(adapter, staDesc.sta_id, OL_TXRX_PEER_STATE_CONN, @@ -2436,7 +2436,7 @@ static QDF_STATUS hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter, { eCsrEncryptionType connectedCipherAlgo; bool fConnected = false; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); ENTER(); @@ -2454,7 +2454,7 @@ static QDF_STATUS hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter, MAC_ADDRESS_STR, roamStatus, roamResult, MAC_ADDR_ARRAY(pRoamInfo->peerMac.bytes)); - fConnected = hdd_conn_get_connected_cipher_algo(pHddStaCtx, + fConnected = hdd_conn_get_connected_cipher_algo(sta_ctx, &connectedCipherAlgo); if (fConnected) { hdd_change_peer_state_after_set_key(adapter, pRoamInfo, @@ -2464,7 +2464,7 @@ static QDF_STATUS hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter, * possible disassoc after issuing set key and waiting * set key complete. */ - pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_NONE; + sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; } EXIT(); @@ -2480,25 +2480,25 @@ static QDF_STATUS hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter, void hdd_perform_roam_set_key_complete(struct hdd_adapter *adapter) { QDF_STATUS qdf_ret_status = QDF_STATUS_SUCCESS; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); tCsrRoamInfo roamInfo; roamInfo.fAuthRequired = false; qdf_mem_copy(roamInfo.bssid.bytes, - pHddStaCtx->roam_info.bssid, QDF_MAC_ADDR_SIZE); + sta_ctx->roam_info.bssid, QDF_MAC_ADDR_SIZE); qdf_mem_copy(roamInfo.peerMac.bytes, - pHddStaCtx->roam_info.peerMac, QDF_MAC_ADDR_SIZE); + sta_ctx->roam_info.peerMac, QDF_MAC_ADDR_SIZE); qdf_ret_status = hdd_roam_set_key_complete_handler(adapter, &roamInfo, - pHddStaCtx->roam_info.roamId, - pHddStaCtx->roam_info.roamStatus, + sta_ctx->roam_info.roamId, + sta_ctx->roam_info.roamStatus, eCSR_ROAM_RESULT_AUTHENTICATED); if (qdf_ret_status != QDF_STATUS_SUCCESS) hdd_err("Set Key complete failure"); - pHddStaCtx->roam_info.deferKeyComplete = false; + sta_ctx->roam_info.deferKeyComplete = false; } #if defined(WLAN_FEATURE_FILS_SK) && defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) @@ -2536,7 +2536,7 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter { struct net_device *dev = adapter->dev; struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; uint8_t reqRsnIe[DOT11F_IE_RSN_MAX_LEN]; uint32_t reqRsnLength = DOT11F_IE_RSN_MAX_LEN, ie_len; @@ -2560,13 +2560,13 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter * to kernel as it will be handled by __cfg80211_disconnect. */ if (((eConnectionState_Disconnecting == - pHddStaCtx->conn_info.connState) || + sta_ctx->conn_info.connState) || (eConnectionState_NotConnected == - pHddStaCtx->conn_info.connState)) && + sta_ctx->conn_info.connState)) && ((eCSR_ROAM_RESULT_ASSOCIATED == roamResult) || (eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus))) { hdd_info("hddDisconInProgress state=%d, result=%d, status=%d", - pHddStaCtx->conn_info.connState, + sta_ctx->conn_info.connState, roamResult, roamStatus); hddDisconInProgress = true; } @@ -2602,12 +2602,12 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter if ((QDF_STA_MODE == adapter->device_mode) && pRoamInfo->pBssDesc) { ie_len = GET_IE_LEN_IN_BSS(pRoamInfo->pBssDesc->length); - pHddStaCtx->ap_supports_immediate_power_save = + sta_ctx->ap_supports_immediate_power_save = wlan_hdd_is_ap_supports_immediate_power_save( (uint8_t *) pRoamInfo->pBssDesc->ieFields, ie_len); hdd_debug("ap_supports_immediate_power_save flag [%d]", - pHddStaCtx->ap_supports_immediate_power_save); + sta_ctx->ap_supports_immediate_power_save); } /* Indicate 'connect' status to user space */ @@ -2631,7 +2631,7 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter * will come to know that the device is getting * activated properly. */ - if (pHddStaCtx->ft_carrier_on == false) { + if (sta_ctx->ft_carrier_on == false) { /* * Enable Linkup Event Servicing which allows the net * device notifier to set the linkup event variable. @@ -2660,7 +2660,7 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter */ adapter->isLinkUpSvcNeeded = false; } else { - pHddStaCtx->ft_carrier_on = false; + sta_ctx->ft_carrier_on = false; ft_carrier_on = true; } if ((WLAN_MAX_STA_COUNT + 3) > pRoamInfo->staId) @@ -2681,16 +2681,16 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter hdd_debug("check if STA chan ok for DNBS"); if (policy_mgr_is_chan_ok_for_dnbs(hdd_ctx->hdd_psoc, - pHddStaCtx->conn_info.operationChannel, + sta_ctx->conn_info.operationChannel, &ok)) { hdd_err("Unable to check DNBS eligibility for chan:%d", - pHddStaCtx->conn_info.operationChannel); + sta_ctx->conn_info.operationChannel); return QDF_STATUS_E_FAILURE; } if (!ok) { hdd_err("Chan:%d not suitable for DNBS", - pHddStaCtx->conn_info.operationChannel); + sta_ctx->conn_info.operationChannel); wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_CARRIER_OFF, WLAN_CONTROL_PATH); @@ -2892,19 +2892,19 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter pRoamInfo->fAuthRequired = false; - qdf_mem_copy(pHddStaCtx-> + qdf_mem_copy(sta_ctx-> roam_info.bssid, pRoamInfo->bssid.bytes, QDF_MAC_ADDR_SIZE); - qdf_mem_copy(pHddStaCtx-> + qdf_mem_copy(sta_ctx-> roam_info.peerMac, pRoamInfo->peerMac.bytes, QDF_MAC_ADDR_SIZE); - pHddStaCtx->roam_info.roamId = + sta_ctx->roam_info.roamId = roamId; - pHddStaCtx->roam_info. + sta_ctx->roam_info. roamStatus = roamStatus; - pHddStaCtx->roam_info. + sta_ctx->roam_info. deferKeyComplete = true; } } else if (!hddDisconInProgress) { @@ -2987,7 +2987,7 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter */ qdf_status = hdd_roam_register_sta(adapter, pRoamInfo, - pHddStaCtx->conn_info.staId[0], + sta_ctx->conn_info.staId[0], NULL, pRoamInfo->pBssDesc); hdd_debug("Enabling queues"); wlan_hdd_netif_queue_control(adapter, @@ -3012,7 +3012,7 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter if (pRoamInfo->fAuthRequired) { qdf_status = hdd_change_peer_state(adapter, - pHddStaCtx->conn_info.staId[0], + sta_ctx->conn_info.staId[0], OL_TXRX_PEER_STATE_CONN, #ifdef WLAN_FEATURE_ROAM_OFFLOAD pRoamInfo->roamSynchInProgress @@ -3026,10 +3026,10 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter false); } else { hdd_debug("staId: %d Changing TL state to AUTHENTICATED", - pHddStaCtx->conn_info.staId[0]); + sta_ctx->conn_info.staId[0]); qdf_status = hdd_change_peer_state(adapter, - pHddStaCtx->conn_info.staId[0], + sta_ctx->conn_info.staId[0], OL_TXRX_PEER_STATE_AUTH, #ifdef WLAN_FEATURE_ROAM_OFFLOAD pRoamInfo->roamSynchInProgress @@ -3118,7 +3118,7 @@ static QDF_STATUS hdd_association_completion_handler(struct hdd_adapter *adapter MAC_ADDR_ARRAY(pRoamInfo->bssid.bytes), roamResult, roamStatus, pRoamInfo->reasonCode); - pHddStaCtx->conn_info.assoc_status_code = + sta_ctx->conn_info.assoc_status_code = pRoamInfo->statusCode; } else { hdd_err("connect failed: for bssid " @@ -3406,14 +3406,14 @@ static bool roam_remove_ibss_station(struct hdd_adapter *adapter, uint8_t staId) uint8_t valid_idx = 0; uint8_t del_idx = 0; uint8_t empty_slots = 0; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); for (idx = 0; idx < MAX_PEERS; idx++) { - if (staId == pHddStaCtx->conn_info.staId[idx]) { - pHddStaCtx->conn_info.staId[idx] = + if (staId == sta_ctx->conn_info.staId[idx]) { + sta_ctx->conn_info.staId[idx] = HDD_WLAN_INVALID_STA_ID; - qdf_zero_macaddr(&pHddStaCtx->conn_info. + qdf_zero_macaddr(&sta_ctx->conn_info. peerMacAddress[idx]); fSuccess = true; @@ -3426,7 +3426,7 @@ static bool roam_remove_ibss_station(struct hdd_adapter *adapter, uint8_t staId) empty_slots++; } else { - if (pHddStaCtx->conn_info.staId[idx] != + if (sta_ctx->conn_info.staId[idx] != HDD_WLAN_INVALID_STA_ID) { valid_idx = idx; } else { @@ -3445,18 +3445,18 @@ static bool roam_remove_ibss_station(struct hdd_adapter *adapter, uint8_t staId) /* Find next active staId, to have a valid sta trigger for TL. */ if (fSuccess == true) { if (del_idx == 0) { - if (pHddStaCtx->conn_info.staId[valid_idx] != + if (sta_ctx->conn_info.staId[valid_idx] != HDD_WLAN_INVALID_STA_ID) { - pHddStaCtx->conn_info.staId[0] = - pHddStaCtx->conn_info.staId[valid_idx]; - qdf_copy_macaddr(&pHddStaCtx->conn_info. + sta_ctx->conn_info.staId[0] = + sta_ctx->conn_info.staId[valid_idx]; + qdf_copy_macaddr(&sta_ctx->conn_info. peerMacAddress[0], - &pHddStaCtx->conn_info. + &sta_ctx->conn_info. peerMacAddress[valid_idx]); - pHddStaCtx->conn_info.staId[valid_idx] = + sta_ctx->conn_info.staId[valid_idx] = HDD_WLAN_INVALID_STA_ID; - qdf_zero_macaddr(&pHddStaCtx->conn_info. + qdf_zero_macaddr(&sta_ctx->conn_info. peerMacAddress[valid_idx]); } } @@ -3521,11 +3521,11 @@ hdd_roam_mic_error_indication_handler(struct hdd_adapter *adapter, eRoamCmdStatus roamStatus, eCsrRoamResult roamResult) { - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - if (eConnectionState_Associated == pHddStaCtx->conn_info.connState && + if (eConnectionState_Associated == sta_ctx->conn_info.connState && TKIP_COUNTER_MEASURE_STOPED == - pHddStaCtx->WextState.mTKIPCounterMeasures) { + sta_ctx->WextState.mTKIPCounterMeasures) { struct iw_michaelmicfailure msg; union iwreq_data wreq; @@ -3589,16 +3589,16 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter, switch (roamResult) { case eCSR_ROAM_RESULT_IBSS_NEW_PEER: { - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct station_info *stainfo; - eCsrEncryptionType encr_type = pHddStaCtx->ibss_enc_key.encType; + eCsrEncryptionType encr_type = sta_ctx->ibss_enc_key.encType; hdd_debug("IBSS New Peer indication from SME " "with peerMac " MAC_ADDRESS_STR " BSSID: " MAC_ADDRESS_STR " and stationID= %d", MAC_ADDR_ARRAY(pRoamInfo->peerMac.bytes), - MAC_ADDR_ARRAY(pHddStaCtx->conn_info.bssId.bytes), + MAC_ADDR_ARRAY(sta_ctx->conn_info.bssId.bytes), pRoamInfo->staId); if (!hdd_save_peer @@ -3624,14 +3624,14 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter, hdd_err("Cannot register STA with TL for IBSS. qdf_status: %d [%08X]", qdf_status, qdf_status); } - pHddStaCtx->ibss_sta_generation++; + sta_ctx->ibss_sta_generation++; stainfo = qdf_mem_malloc(sizeof(*stainfo)); if (stainfo == NULL) { hdd_err("memory allocation for station_info failed"); return QDF_STATUS_E_NOMEM; } stainfo->filled = 0; - stainfo->generation = pHddStaCtx->ibss_sta_generation; + stainfo->generation = sta_ctx->ibss_sta_generation; cfg80211_new_sta(adapter->dev, (const u8 *)pRoamInfo->peerMac.bytes, @@ -3639,9 +3639,9 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter, qdf_mem_free(stainfo); if (hdd_is_key_install_required_for_ibss(encr_type)) { - pHddStaCtx->ibss_enc_key.keyDirection = + sta_ctx->ibss_enc_key.keyDirection = eSIR_TX_RX; - qdf_copy_macaddr(&pHddStaCtx->ibss_enc_key.peerMac, + qdf_copy_macaddr(&sta_ctx->ibss_enc_key.peerMac, &pRoamInfo->peerMac); hdd_debug("New peer joined set PTK encType=%d", @@ -3651,7 +3651,7 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter, sme_roam_set_key(WLAN_HDD_GET_HAL_CTX (adapter), adapter->sessionId, - &pHddStaCtx->ibss_enc_key, + &sta_ctx->ibss_enc_key, &roamId); if (QDF_STATUS_SUCCESS != qdf_status) { @@ -3676,7 +3676,7 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter, } case eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED: { - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (!roam_remove_ibss_station(adapter, pRoamInfo->staId)) @@ -3686,13 +3686,13 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter, "with peerMac " MAC_ADDRESS_STR " BSSID: " MAC_ADDRESS_STR " and stationID= %d", MAC_ADDR_ARRAY(pRoamInfo->peerMac.bytes), - MAC_ADDR_ARRAY(pHddStaCtx->conn_info.bssId.bytes), + MAC_ADDR_ARRAY(sta_ctx->conn_info.bssId.bytes), pRoamInfo->staId); hdd_roam_deregister_sta(adapter, pRoamInfo->staId); hdd_ctx->sta_to_adapter[pRoamInfo->staId] = NULL; - pHddStaCtx->ibss_sta_generation++; + sta_ctx->ibss_sta_generation++; cfg80211_del_sta(adapter->dev, (const u8 *)&pRoamInfo->peerMac.bytes, @@ -4278,20 +4278,20 @@ hdd_indicate_ese_bcn_report_ind(const struct hdd_adapter *adapter, /** * hdd_is_8021x_sha256_auth_type() - check authentication type to 8021x_sha256 - * @pHddStaCtx: Station Context + * @sta_ctx: Station Context * * API to check if the connection authentication type is 8021x_sha256. * * Return: bool */ #ifdef WLAN_FEATURE_11W -static inline bool hdd_is_8021x_sha256_auth_type(struct hdd_station_ctx *pHddStaCtx) +static inline bool hdd_is_8021x_sha256_auth_type(struct hdd_station_ctx *sta_ctx) { return eCSR_AUTH_TYPE_RSN_8021X_SHA256 == - pHddStaCtx->conn_info.authType; + sta_ctx->conn_info.authType; } #else -static inline bool hdd_is_8021x_sha256_auth_type(struct hdd_station_ctx *pHddStaCtx) +static inline bool hdd_is_8021x_sha256_auth_type(struct hdd_station_ctx *sta_ctx) { return false; } @@ -4362,7 +4362,7 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, QDF_STATUS qdf_ret_status = QDF_STATUS_SUCCESS; struct hdd_adapter *adapter = (struct hdd_adapter *) pContext; struct hdd_wext_state *pWextState = NULL; - struct hdd_station_ctx *pHddStaCtx = NULL; + struct hdd_station_ctx *sta_ctx = NULL; QDF_STATUS status = QDF_STATUS_SUCCESS; struct cfg80211_bss *bss_status; struct hdd_context *hdd_ctx; @@ -4377,7 +4377,7 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, } pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); hdd_ctx = WLAN_HDD_GET_CTX(adapter); /* Omitting eCSR_ROAM_UPDATE_SCAN_RESULT as this is too frequent */ @@ -4404,10 +4404,10 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, qdf_ret_status = hdd_dis_connect_handler(adapter, pRoamInfo, roamId, roamStatus, roamResult); - pHddStaCtx->ft_carrier_on = false; - pHddStaCtx->hdd_ReassocScenario = false; + sta_ctx->ft_carrier_on = false; + sta_ctx->hdd_ReassocScenario = false; hdd_debug("hdd_ReassocScenario set to: %d, ReAssoc Failed, session: %d", - pHddStaCtx->hdd_ReassocScenario, adapter->sessionId); + sta_ctx->hdd_ReassocScenario, adapter->sessionId); break; case eCSR_ROAM_FT_START: @@ -4427,13 +4427,13 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, WLAN_STOP_ALL_NETIF_QUEUE, WLAN_CONTROL_PATH); status = hdd_roam_deregister_sta(adapter, - pHddStaCtx->conn_info.staId[0]); + sta_ctx->conn_info.staId[0]); if (!QDF_IS_STATUS_SUCCESS(status)) qdf_ret_status = QDF_STATUS_E_FAILURE; - pHddStaCtx->ft_carrier_on = true; - pHddStaCtx->hdd_ReassocScenario = true; + sta_ctx->ft_carrier_on = true; + sta_ctx->hdd_ReassocScenario = true; hdd_debug("hdd_ReassocScenario set to: %d, due to eCSR_ROAM_FT_START, session: %d", - pHddStaCtx->hdd_ReassocScenario, adapter->sessionId); + sta_ctx->hdd_ReassocScenario, adapter->sessionId); break; case eCSR_ROAM_NAPI_OFF: hdd_debug("After Roam Synch Comp: NAPI Serialize OFF"); @@ -4451,7 +4451,7 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, wlan_hdd_netif_queue_control(adapter, WLAN_STOP_ALL_NETIF_QUEUE, WLAN_CONTROL_PATH); - if (pHddStaCtx->ft_carrier_on == false) { + if (sta_ctx->ft_carrier_on == false) { wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_CARRIER_OFF, WLAN_CONTROL_PATH); @@ -4550,9 +4550,9 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, roamId, roamStatus, roamResult); if (eCSR_ROAM_RESULT_AUTHENTICATED == roamResult) { - pHddStaCtx->hdd_ReassocScenario = false; + sta_ctx->hdd_ReassocScenario = false; hdd_debug("hdd_ReassocScenario set to: %d, set key complete, session: %d", - pHddStaCtx->hdd_ReassocScenario, + sta_ctx->hdd_ReassocScenario, adapter->sessionId); } } @@ -4567,8 +4567,8 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, break; case eCSR_ROAM_PMK_NOTIFY: - if (eCSR_AUTH_TYPE_RSN == pHddStaCtx->conn_info.authType - || hdd_is_8021x_sha256_auth_type(pHddStaCtx)) { + if (eCSR_AUTH_TYPE_RSN == sta_ctx->conn_info.authType + || hdd_is_8021x_sha256_auth_type(sta_ctx)) { /* notify the supplicant of a new candidate */ qdf_ret_status = wlan_hdd_cfg80211_pmksa_candidate_notify( @@ -4637,9 +4637,9 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, case eCSR_ROAM_CCKM_PREAUTH_NOTIFY: { if (eCSR_AUTH_TYPE_CCKM_WPA == - pHddStaCtx->conn_info.authType + sta_ctx->conn_info.authType || eCSR_AUTH_TYPE_CCKM_RSN == - pHddStaCtx->conn_info.authType) { + sta_ctx->conn_info.authType) { hdd_indicate_cckm_pre_auth(adapter, pRoamInfo); } break; @@ -4698,7 +4698,7 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId, hdd_set_connection_in_progress(false); hdd_set_roaming_in_progress(false); adapter->roam_ho_fail = false; - pHddStaCtx->ft_carrier_on = false; + sta_ctx->ft_carrier_on = false; complete(&adapter->roaming_comp_var); break; @@ -5125,14 +5125,14 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter, struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); tCsrRoamProfile *pRoamProfile = &(pWextState->roamProfile); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); pRoamProfile->AuthType.numEntries = 1; - hdd_debug("pHddStaCtx->conn_info.authType = %d", - pHddStaCtx->conn_info.authType); + hdd_debug("sta_ctx->conn_info.authType = %d", + sta_ctx->conn_info.authType); - switch (pHddStaCtx->conn_info.authType) { + switch (sta_ctx->conn_info.authType) { case eCSR_AUTH_TYPE_OPEN_SYSTEM: #ifdef FEATURE_WLAN_ESE case eCSR_AUTH_TYPE_CCKM_WPA: @@ -5502,7 +5502,7 @@ static int __iw_get_essid(struct net_device *dev, struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx; struct hdd_wext_state *wextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); int ret; @@ -5517,14 +5517,14 @@ static int __iw_get_essid(struct net_device *dev, if (0 != ret) return ret; - if ((pHddStaCtx->conn_info.connState == eConnectionState_Associated && + if ((sta_ctx->conn_info.connState == eConnectionState_Associated && wextBuf->roamProfile.SSIDs.SSIDList->SSID.length > 0) || - ((pHddStaCtx->conn_info.connState == eConnectionState_IbssConnected - || pHddStaCtx->conn_info.connState == + ((sta_ctx->conn_info.connState == eConnectionState_IbssConnected + || sta_ctx->conn_info.connState == eConnectionState_IbssDisconnected) && wextBuf->roamProfile.SSIDs.SSIDList->SSID.length > 0)) { - dwrq->length = pHddStaCtx->conn_info.SSID.SSID.length; - memcpy(extra, pHddStaCtx->conn_info.SSID.SSID.ssId, + dwrq->length = sta_ctx->conn_info.SSID.SSID.length; + memcpy(extra, sta_ctx->conn_info.SSID.SSID.ssId, dwrq->length); dwrq->flags = 1; } else { @@ -5575,7 +5575,7 @@ static int __iw_set_auth(struct net_device *dev, struct iw_request_info *info, struct hdd_context *hdd_ctx; struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); tCsrRoamProfile *pRoamProfile = &pWextState->roamProfile; eCsrEncryptionType mcEncryptionType; @@ -5612,7 +5612,7 @@ static int __iw_set_auth(struct net_device *dev, struct iw_request_info *info, (pWextState-> authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)) && (eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType)) + sta_ctx->conn_info.authType)) /*Dynamic WEP key */ ucEncryptionType = eCSR_ENCRYPT_TYPE_WEP40; @@ -5626,7 +5626,7 @@ static int __iw_set_auth(struct net_device *dev, struct iw_request_info *info, (pWextState-> authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)) && (eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType)) + sta_ctx->conn_info.authType)) /*Dynamic WEP key */ ucEncryptionType = eCSR_ENCRYPT_TYPE_WEP104; @@ -5659,7 +5659,7 @@ static int __iw_set_auth(struct net_device *dev, struct iw_request_info *info, (pWextState-> authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)) && (eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType)) + sta_ctx->conn_info.authType)) mcEncryptionType = eCSR_ENCRYPT_TYPE_WEP40; else @@ -5672,7 +5672,7 @@ static int __iw_set_auth(struct net_device *dev, struct iw_request_info *info, (pWextState-> authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)) && (eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType)) { + sta_ctx->conn_info.authType)) { mcEncryptionType = eCSR_ENCRYPT_TYPE_WEP104; } else { @@ -5697,19 +5697,19 @@ static int __iw_set_auth(struct net_device *dev, struct iw_request_info *info, * Roam profile in the iw_set_ap_address */ if (wrqu->param.value & IW_AUTH_ALG_OPEN_SYSTEM) - pHddStaCtx->conn_info.authType = + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; else if (wrqu->param.value & IW_AUTH_ALG_SHARED_KEY) - pHddStaCtx->conn_info.authType = + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_SHARED_KEY; else if (wrqu->param.value & IW_AUTH_ALG_LEAP) /*Not supported */ - pHddStaCtx->conn_info.authType = + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; pWextState->roamProfile.AuthType.authType[0] = - pHddStaCtx->conn_info.authType; + sta_ctx->conn_info.authType; } break; @@ -5973,7 +5973,7 @@ static int __iw_set_ap_address(struct net_device *dev, struct hdd_adapter *adapter; struct hdd_context *hdd_ctx; - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(WLAN_HDD_GET_PRIV_PTR(dev)); uint8_t *pMacAddress = NULL; int ret; @@ -5993,7 +5993,7 @@ static int __iw_set_ap_address(struct net_device *dev, pMacAddress = (uint8_t *) wrqu->ap_addr.sa_data; hdd_debug(" " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pMacAddress)); - qdf_mem_copy(pHddStaCtx->conn_info.bssId.bytes, pMacAddress, + qdf_mem_copy(sta_ctx->conn_info.bssId.bytes, pMacAddress, sizeof(struct qdf_mac_addr)); EXIT(); @@ -6038,7 +6038,7 @@ static int __iw_get_ap_address(struct net_device *dev, { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx; - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); int ret; @@ -6053,10 +6053,10 @@ static int __iw_get_ap_address(struct net_device *dev, if (0 != ret) return ret; - if (pHddStaCtx->conn_info.connState == eConnectionState_Associated || - eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState) { + if (sta_ctx->conn_info.connState == eConnectionState_Associated || + eConnectionState_IbssConnected == sta_ctx->conn_info.connState) { qdf_mem_copy(wrqu->ap_addr.sa_data, - pHddStaCtx->conn_info.bssId.bytes, + sta_ctx->conn_info.bssId.bytes, QDF_MAC_ADDR_SIZE); } else { memset(wrqu->ap_addr.sa_data, 0, sizeof(wrqu->ap_addr.sa_data)); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 4679ccb13f0a..74a37e68dc7c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -13230,7 +13230,7 @@ void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter, uint8_t key_ind const uint8_t *mac_addr, const uint8_t *key, int key_Len) { - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); tCsrRoamSetKey setKey; bool isConnected = true; int status = 0; @@ -13257,14 +13257,14 @@ void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter, uint8_t key_ind hdd_debug("WAPI KEY LENGTH:0x%04x", key_Len); - pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY; + 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); - pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_NONE; + sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; } } #endif /* FEATURE_WLAN_WAPI */ @@ -13804,7 +13804,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, QDF_STATUS status = QDF_STATUS_SUCCESS; struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; struct qdf_mac_addr STAMacAddress; int ret; @@ -13829,7 +13829,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, if (0 != ret) return ret; - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); qdf_mem_copy(STAMacAddress.bytes, mac, QDF_MAC_ADDR_SIZE); @@ -14106,12 +14106,12 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, (adapter->device_mode == QDF_P2P_CLIENT_MODE)) { struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (!pairwise) { /* set group key */ - if (pHddStaCtx->roam_info.deferKeyComplete) { + if (sta_ctx->roam_info.deferKeyComplete) { hdd_debug("%s- %d: Perform Set key Complete", __func__, __LINE__); hdd_perform_roam_set_key_complete(adapter); @@ -14127,7 +14127,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, KeyMaterial[key_index][0], params->key, params->key_len); - pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY; + 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), @@ -14153,7 +14153,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, if (0 != status) { hdd_err("sme_roam_set_key failed, status: %d", status); - pHddStaCtx->roam_info.roamingState = + sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; return -EINVAL; } @@ -14169,7 +14169,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, !((IW_AUTH_KEY_MGMT_802_1X == (pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)) && (eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType) + sta_ctx->conn_info.authType) ) && ((WLAN_CIPHER_SUITE_WEP40 == params->cipher) || (WLAN_CIPHER_SUITE_WEP104 == params->cipher) @@ -14188,7 +14188,7 @@ 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); - pHddStaCtx->roam_info.roamingState = + sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; return -EINVAL; } @@ -14400,7 +14400,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy, struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(ndev); struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx; int status; @@ -14439,15 +14439,15 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy, if ((adapter->device_mode == QDF_STA_MODE) || (adapter->device_mode == QDF_P2P_CLIENT_MODE)) { if ((eCSR_ENCRYPT_TYPE_TKIP != - pHddStaCtx->conn_info.ucEncryptionType) && + sta_ctx->conn_info.ucEncryptionType) && !hdd_is_wapi_enc_type( - pHddStaCtx->conn_info.ucEncryptionType) && + sta_ctx->conn_info.ucEncryptionType) && (eCSR_ENCRYPT_TYPE_AES != - pHddStaCtx->conn_info.ucEncryptionType) && + sta_ctx->conn_info.ucEncryptionType) && (eCSR_ENCRYPT_TYPE_AES_GCMP != - pHddStaCtx->conn_info.ucEncryptionType) && + sta_ctx->conn_info.ucEncryptionType) && (eCSR_ENCRYPT_TYPE_AES_GCMP_256 != - pHddStaCtx->conn_info.ucEncryptionType)) { + sta_ctx->conn_info.ucEncryptionType)) { /* If default key index is not same as previous one, * then update the default key index */ @@ -14470,7 +14470,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy, setKey.keyDirection = eSIR_TX_RX; qdf_copy_macaddr(&setKey.peerMac, - &pHddStaCtx->conn_info.bssId); + &sta_ctx->conn_info.bssId); if (Keys->KeyLength[key_index] == CSR_WEP40_KEY_LEN && pWextState->roamProfile.EncryptionType. @@ -15386,9 +15386,9 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, sizeof(hdd_sta_ctx->conn_info.conn_flag)); if (pRoamProfile) { - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); /* Restart the opportunistic timer * @@ -15700,46 +15700,46 @@ static int wlan_hdd_cfg80211_set_auth_type(struct hdd_adapter *adapter, { struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); /*set authentication type */ switch (auth_type) { case NL80211_AUTHTYPE_AUTOMATIC: hdd_debug("set authentication type to AUTOSWITCH"); - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_AUTOSWITCH; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_AUTOSWITCH; break; case NL80211_AUTHTYPE_OPEN_SYSTEM: case NL80211_AUTHTYPE_FT: hdd_debug("set authentication type to OPEN"); - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; break; case NL80211_AUTHTYPE_SHARED_KEY: hdd_debug("set authentication type to SHARED"); - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_SHARED_KEY; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_SHARED_KEY; break; #ifdef FEATURE_WLAN_ESE case NL80211_AUTHTYPE_NETWORK_EAP: hdd_debug("set authentication type to CCKM WPA"); - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_CCKM_WPA; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_CCKM_WPA; break; #endif #if defined(WLAN_FEATURE_FILS_SK) && defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) case NL80211_AUTHTYPE_FILS_SK: hdd_notice("set authentication type to FILS SHARED"); - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; break; #endif default: hdd_err("Unsupported authentication type: %d", auth_type); - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_UNKNOWN; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_UNKNOWN; return -EINVAL; } pWextState->roamProfile.AuthType.authType[0] = - pHddStaCtx->conn_info.authType; + sta_ctx->conn_info.authType; return 0; } @@ -15890,7 +15890,7 @@ static int wlan_hdd_cfg80211_set_cipher(struct hdd_adapter *adapter, eCsrEncryptionType encryptionType = eCSR_ENCRYPT_TYPE_NONE; struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (!cipher) { @@ -15949,13 +15949,13 @@ static int wlan_hdd_cfg80211_set_cipher(struct hdd_adapter *adapter, if (ucast) { hdd_debug("setting unicast cipher type to %d", encryptionType); - pHddStaCtx->conn_info.ucEncryptionType = encryptionType; + sta_ctx->conn_info.ucEncryptionType = encryptionType; pWextState->roamProfile.EncryptionType.numEntries = 1; pWextState->roamProfile.EncryptionType.encryptionType[0] = encryptionType; } else { hdd_debug("setting mcast cipher type to %d", encryptionType); - pHddStaCtx->conn_info.mcEncryptionType = encryptionType; + sta_ctx->conn_info.mcEncryptionType = encryptionType; pWextState->roamProfile.mcEncryptionType.numEntries = 1; pWextState->roamProfile.mcEncryptionType.encryptionType[0] = encryptionType; @@ -16605,11 +16605,11 @@ static int wlan_hdd_cfg80211_set_privacy(struct hdd_adapter *adapter, int wlan_hdd_try_disconnect(struct hdd_adapter *adapter) { unsigned long rc; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; int status, result = 0; tHalHandle hal; - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); hal = WLAN_HDD_GET_HAL_CTX(adapter); if (adapter->device_mode == QDF_STA_MODE) { sme_indicate_disconnect_inprogress(hal, adapter->sessionId); @@ -16639,9 +16639,9 @@ int wlan_hdd_try_disconnect(struct hdd_adapter *adapter) } if ((QDF_IBSS_MODE == adapter->device_mode) || - (eConnectionState_Associated == pHddStaCtx->conn_info.connState) || - (eConnectionState_Connecting == pHddStaCtx->conn_info.connState) || - (eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState)) { + (eConnectionState_Associated == sta_ctx->conn_info.connState) || + (eConnectionState_Connecting == sta_ctx->conn_info.connState) || + (eConnectionState_IbssConnected == sta_ctx->conn_info.connState)) { hdd_conn_set_connection_state(adapter, eConnectionState_Disconnecting); /* Issue disconnect to CSR */ @@ -16661,7 +16661,7 @@ int wlan_hdd_try_disconnect(struct hdd_adapter *adapter) } else if (0 != status) { hdd_err("sme_roam_disconnect failure, status: %d", (int)status); - pHddStaCtx->staDebugState = status; + sta_ctx->staDebugState = status; result = -EINVAL; goto disconnected; } @@ -16671,16 +16671,16 @@ int wlan_hdd_try_disconnect(struct hdd_adapter *adapter) msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT)); if (!rc && (QDF_STATUS_CMD_NOT_QUEUED != status)) { hdd_err("Sme disconnect event timed out session Id: %d staDebugState: %d", - adapter->sessionId, pHddStaCtx->staDebugState); + adapter->sessionId, sta_ctx->staDebugState); result = -ETIMEDOUT; } } else if (eConnectionState_Disconnecting == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { rc = wait_for_completion_timeout(&adapter->disconnect_comp_var, msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT)); if (!rc) { hdd_err("Disconnect event timed out session Id: %d staDebugState: %d", - adapter->sessionId, pHddStaCtx->staDebugState); + adapter->sessionId, sta_ctx->staDebugState); result = -ETIMEDOUT; } } @@ -16997,7 +16997,7 @@ static int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason) { int status, result = 0; unsigned long rc; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); eConnectionState prev_conn_state; tHalHandle hal = WLAN_HDD_GET_HAL_CTX(adapter); @@ -17040,7 +17040,7 @@ static int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason) } } - prev_conn_state = pHddStaCtx->conn_info.connState; + prev_conn_state = sta_ctx->conn_info.connState; /*stop tx queues */ hdd_info("Disabling queues"); wlan_hdd_netif_queue_control(adapter, @@ -17069,7 +17069,7 @@ static int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason) hdd_debug("Already disconnected or connect was in sme/roam pending list and removed by disconnect"); } else if (0 != status) { hdd_err("csr_roam_disconnect failure, status: %d", (int)status); - pHddStaCtx->staDebugState = status; + sta_ctx->staDebugState = status; result = -EINVAL; goto disconnected; } @@ -17175,7 +17175,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); int status; - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); @@ -17204,8 +17204,8 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, return status; /* Issue disconnect request to SME, if station is in connected state */ - if ((pHddStaCtx->conn_info.connState == eConnectionState_Associated) || - (pHddStaCtx->conn_info.connState == eConnectionState_Connecting)) { + if ((sta_ctx->conn_info.connState == eConnectionState_Associated) || + (sta_ctx->conn_info.connState == eConnectionState_Connecting)) { eCsrRoamDisconnectReason reasonCode = eCSR_DISCONNECT_REASON_UNSPECIFIED; struct hdd_scan_info *pScanInfo; @@ -17265,7 +17265,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, } } else { hdd_err("Unexpected cfg disconnect called while in state: %d", - pHddStaCtx->conn_info.connState); + sta_ctx->conn_info.connState); } return status; @@ -17308,14 +17308,14 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(struct hdd_adapter *adapter, struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); eCsrEncryptionType encryptionType = eCSR_ENCRYPT_TYPE_NONE; - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); ENTER(); pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED; - qdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey)); - pHddStaCtx->ibss_enc_key_installed = 0; + qdf_mem_zero(&sta_ctx->ibss_enc_key, sizeof(tCsrRoamSetKey)); + sta_ctx->ibss_enc_key_installed = 0; if (params->ie_len && (NULL != params->ie)) { if (wlan_get_ie_ptr_from_eid(WLAN_EID_RSN, params->ie, @@ -17363,7 +17363,7 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(struct hdd_adapter *adapter, } pWextState->roamProfile.AuthType.authType[0] = - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; if (params->privacy) { /* Security enabled IBSS, At this time there is no information @@ -17377,7 +17377,7 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(struct hdd_adapter *adapter, encryptionType = eCSR_ENCRYPT_TYPE_WEP40_STATICKEY; } hdd_debug("encryptionType=%d", encryptionType); - pHddStaCtx->conn_info.ucEncryptionType = encryptionType; + sta_ctx->conn_info.ucEncryptionType = encryptionType; pWextState->roamProfile.EncryptionType.numEntries = 1; pWextState->roamProfile.EncryptionType.encryptionType[0] = encryptionType; @@ -17403,7 +17403,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy, WLAN_HDD_GET_WEXT_STATE_PTR(adapter); tCsrRoamProfile *pRoamProfile; int status; - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); struct qdf_mac_addr bssid; @@ -17544,9 +17544,9 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy, /* Set the Operational Channel */ hdd_debug("set channel %d", channelNum); pRoamProfile->ChannelInfo.numOfChannels = 1; - pHddStaCtx->conn_info.operationChannel = channelNum; + sta_ctx->conn_info.operationChannel = channelNum; pRoamProfile->ChannelInfo.ChannelList = - &pHddStaCtx->conn_info.operationChannel; + &sta_ctx->conn_info.operationChannel; } /* Initialize security parameters */ @@ -17560,7 +17560,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy, status = wlan_hdd_cfg80211_connect_start(adapter, params->ssid, params->ssid_len, bssid.bytes, NULL, - pHddStaCtx->conn_info. + sta_ctx->conn_info. operationChannel, params->chandef.width); @@ -18613,7 +18613,7 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy, { struct hdd_context *hdd_ctx = wiphy_priv(wiphy); struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); int status; ENTER(); @@ -18634,9 +18634,9 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy, MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_CFG80211_UPDATE_FT_IES, - adapter->sessionId, pHddStaCtx->conn_info.connState)); + adapter->sessionId, sta_ctx->conn_info.connState)); /* Added for debug on reception of Re-assoc Req. */ - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { hdd_err("Called with Ie of length = %zu when not associated", ftie->ie_len); hdd_err("Should be Re-assoc Req IEs"); diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 3b6f8b70a4a5..aeec8dc436dd 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -6546,20 +6546,20 @@ int wlan_hdd_set_channel(struct wiphy *wiphy, struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); tCsrRoamProfile *pRoamProfile = &pWextState->roamProfile; - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (eConnectionState_IbssConnected == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { /* Link is up then return cant set channel */ hdd_err("IBSS Associated, can't set the channel"); return -EINVAL; } num_ch = pRoamProfile->ChannelInfo.numOfChannels = 1; - pHddStaCtx->conn_info.operationChannel = channel; + sta_ctx->conn_info.operationChannel = channel; pRoamProfile->ChannelInfo.ChannelList = - &pHddStaCtx->conn_info.operationChannel; + &sta_ctx->conn_info.operationChannel; } else if ((adapter->device_mode == QDF_SAP_MODE) || (adapter->device_mode == QDF_P2P_GO_MODE) ) { diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 9fc093a3d737..47d421cb632d 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -830,7 +830,7 @@ void hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter, int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid, uint8_t channel, const handoff_src src) { - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); int ret = 0; @@ -846,10 +846,10 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); /* if not associated, no need to proceed with reassoc */ - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { hdd_warn("Not associated"); ret = -EINVAL; goto exit; @@ -859,10 +859,10 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid, * if the target bssid is same as currently associated AP, * use the current connections's channel. */ - if (!memcmp(bssid, pHddStaCtx->conn_info.bssId.bytes, + if (!memcmp(bssid, sta_ctx->conn_info.bssId.bytes, QDF_MAC_ADDR_SIZE)) { hdd_warn("Reassoc BSSID is same as currently associated AP bssid"); - channel = pHddStaCtx->conn_info.operationChannel; + channel = sta_ctx->conn_info.operationChannel; } /* Check channel number is a valid channel number */ @@ -1030,7 +1030,7 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid, uint8_t *frame; struct ieee80211_hdr_3addr *hdr; u64 cookie; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; struct hdd_context *hdd_ctx; tpSirMacVendorSpecificFrameHdr pVendorSpecific = (tpSirMacVendorSpecificFrameHdr) payload; @@ -1045,11 +1045,11 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); hdd_ctx = WLAN_HDD_GET_CTX(adapter); /* if not associated, no need to send action frame */ - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { hdd_warn("Not associated"); ret = -EINVAL; goto exit; @@ -1059,7 +1059,7 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid, * if the target bssid is different from currently associated AP, * then no need to send action frame */ - if (memcmp(bssid, pHddStaCtx->conn_info.bssId.bytes, + if (memcmp(bssid, sta_ctx->conn_info.bssId.bytes, QDF_MAC_ADDR_SIZE)) { hdd_warn("STA is not associated to this AP"); ret = -EINVAL; @@ -1079,10 +1079,10 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid, */ if (channel != 0) { if (channel != - pHddStaCtx->conn_info.operationChannel) { + sta_ctx->conn_info.operationChannel) { hdd_warn("channel(%d) is different from operating channel(%d)", channel, - pHddStaCtx->conn_info. + sta_ctx->conn_info. operationChannel); ret = -EINVAL; goto exit; @@ -1103,7 +1103,7 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid, * delayed transmission of action frame is ok. */ chan.center_freq = - sme_chn_to_freq(pHddStaCtx->conn_info. + sme_chn_to_freq(sta_ctx->conn_info. operationChannel); } } @@ -2376,7 +2376,7 @@ static void hdd_get_link_status_cb(uint8_t status, void *context) static int wlan_hdd_get_link_status(struct hdd_adapter *adapter) { - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); QDF_STATUS hstatus; int ret; @@ -2402,8 +2402,8 @@ static int wlan_hdd_get_link_status(struct hdd_adapter *adapter) return 0; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { /* If not associated, then expected link status return * value is 0 */ @@ -4361,7 +4361,7 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter, uint32_t roamId = INVALID_ROAM_ID; tCsrRoamModifyProfileFields modProfileFields; tCsrHandoffRequest handoffInfo; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; if (QDF_STA_MODE != adapter->device_mode) { hdd_warn("Unsupported in mode %s(%d)", @@ -4370,10 +4370,10 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); /* if not associated, no need to proceed with reassoc */ - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { hdd_warn("Not associated!"); ret = -EINVAL; goto exit; @@ -4391,13 +4391,13 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter, * issue reassoc to same AP */ if (!qdf_mem_cmp(targetApBssid, - pHddStaCtx->conn_info.bssId.bytes, + sta_ctx->conn_info.bssId.bytes, QDF_MAC_ADDR_SIZE)) { hdd_warn("Reassoc BSSID is same as currently associated AP bssid"); if (roaming_offload_enabled(hdd_ctx)) { hdd_wma_send_fastreassoc_cmd(adapter, targetApBssid, - pHddStaCtx->conn_info.operationChannel); + sta_ctx->conn_info.operationChannel); } else { sme_get_modify_profile_fields(hdd_ctx->hHal, adapter->sessionId, @@ -4969,7 +4969,7 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter, { int ret = 0; int status = QDF_STATUS_SUCCESS; - struct hdd_station_ctx *pHddStaCtx = NULL; + struct hdd_station_ctx *sta_ctx = NULL; char *extra = NULL; int idx = 0; int length = 0; @@ -4983,7 +4983,7 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); hdd_debug("Received GETIBSSPEERINFOALL Command"); /* Handle the command */ @@ -5005,26 +5005,26 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter, /* Copy number of stations */ length = scnprintf(extra, WLAN_MAX_BUF_SIZE, "%d ", - pHddStaCtx->ibss_peer_info.numPeers); + sta_ctx->ibss_peer_info.numPeers); numOfBytestoPrint = length; - for (idx = 0; idx < pHddStaCtx->ibss_peer_info.numPeers; + for (idx = 0; idx < sta_ctx->ibss_peer_info.numPeers; idx++) { int8_t rssi; uint32_t tx_rate; qdf_mem_copy(mac_addr, - pHddStaCtx->ibss_peer_info.peerInfoParams[idx]. + sta_ctx->ibss_peer_info.peerInfoParams[idx]. mac_addr, sizeof(mac_addr)); tx_rate = - pHddStaCtx->ibss_peer_info.peerInfoParams[idx]. + sta_ctx->ibss_peer_info.peerInfoParams[idx]. txRate; /* * Only lower 3 bytes are rate info. Mask of the MSByte */ tx_rate &= 0x00FFFFFF; - rssi = pHddStaCtx->ibss_peer_info.peerInfoParams[idx]. + rssi = sta_ctx->ibss_peer_info.peerInfoParams[idx]. rssi; length += scnprintf((extra + length), @@ -5097,7 +5097,7 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter, int ret = 0; uint8_t *value = command; QDF_STATUS status; - struct hdd_station_ctx *pHddStaCtx = NULL; + struct hdd_station_ctx *sta_ctx = NULL; char extra[128] = { 0 }; uint32_t length = 0; uint8_t staIdx = 0; @@ -5110,13 +5110,13 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); hdd_debug("Received GETIBSSPEERINFO Command"); /* if there are no peers, no need to continue with the command */ if (eConnectionState_IbssConnected != - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { hdd_err("No IBSS Peers coalesced"); ret = -EINVAL; goto exit; @@ -5131,7 +5131,7 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter, } /* Get station index for the peer mac address and sanitize it */ - hdd_get_peer_sta_id(pHddStaCtx, &peerMacAddr, &staIdx); + hdd_get_peer_sta_id(sta_ctx, &peerMacAddr, &staIdx); if (staIdx > MAX_PEERS) { hdd_err("Invalid StaIdx %d returned", staIdx); @@ -5143,13 +5143,13 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter, status = hdd_cfg80211_get_ibss_peer_info(adapter, staIdx); if (QDF_STATUS_SUCCESS == status) { uint32_t txRate = - pHddStaCtx->ibss_peer_info.peerInfoParams[0].txRate; + sta_ctx->ibss_peer_info.peerInfoParams[0].txRate; /* Only lower 3 bytes are rate info. Mask of the MSByte */ txRate &= 0x00FFFFFF; length = scnprintf(extra, sizeof(extra), "%d %d", (int)txRate, - (int)pHddStaCtx->ibss_peer_info. + (int)sta_ctx->ibss_peer_info. peerInfoParams[0].rssi); /* Copy the data back into buffer */ @@ -5328,7 +5328,7 @@ static int drv_cmd_get_tsm_stats(struct hdd_adapter *adapter, char extra[128] = { 0 }; int len = 0; uint8_t tid = 0; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; tAniTrafStrmMetrics tsm_metrics = {0}; if ((QDF_STA_MODE != adapter->device_mode) && @@ -5339,10 +5339,10 @@ static int drv_cmd_get_tsm_stats(struct hdd_adapter *adapter, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); /* if not associated, return error */ - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { hdd_err("Not associated!"); ret = -EINVAL; goto exit; diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 73a32043090d..cc87f50f6943 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -1323,7 +1323,7 @@ void hdd_ipa_set_tx_flow_info(void) hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL; QDF_STATUS status; struct hdd_adapter *adapter; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; struct hdd_ap_ctx *hdd_ap_ctx; struct hdd_hostapd_state *hostapd_state; struct qdf_mac_addr staBssid = QDF_MAC_ADDR_ZERO_INITIALIZER; @@ -1363,26 +1363,26 @@ void hdd_ipa_set_tx_flow_info(void) adapter = adapterNode->adapter; switch (adapter->device_mode) { case QDF_STA_MODE: - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (eConnectionState_Associated == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { staChannel = - pHddStaCtx->conn_info.operationChannel; + sta_ctx->conn_info.operationChannel; qdf_copy_macaddr(&staBssid, - &pHddStaCtx->conn_info.bssId); + &sta_ctx->conn_info.bssId); #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL targetChannel = staChannel; #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */ } break; case QDF_P2P_CLIENT_MODE: - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (eConnectionState_Associated == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { p2pChannel = - pHddStaCtx->conn_info.operationChannel; + sta_ctx->conn_info.operationChannel; qdf_copy_macaddr(&p2pBssid, - &pHddStaCtx->conn_info.bssId); + &sta_ctx->conn_info.bssId); p2pMode = "CLI"; #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL targetChannel = p2pChannel; @@ -3058,15 +3058,15 @@ static int hdd_ipa_uc_disconnect_ap(struct hdd_adapter *adapter) */ static int hdd_ipa_uc_disconnect_sta(struct hdd_adapter *adapter) { - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; struct hdd_ipa_priv *hdd_ipa = ghdd_ipa; int ret = 0; if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) && hdd_ipa->sta_connected) { - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); hdd_ipa_uc_send_evt(adapter, WLAN_STA_DISCONNECT, - pHddStaCtx->conn_info.bssId.bytes); + sta_ctx->conn_info.bssId.bytes); } return ret; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index bbeb134c5dff..809534b306c0 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3400,7 +3400,7 @@ hdd_vdev_destroy: QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter) { - struct hdd_station_ctx *pHddStaCtx = &adapter->sessionCtx.station; + struct hdd_station_ctx *sta_ctx = &adapter->sessionCtx.station; struct hdd_context *hdd_ctx; QDF_STATUS status; int ret_val; @@ -3424,18 +3424,18 @@ QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter) } hdd_conn_set_connection_state(adapter, eConnectionState_NotConnected); - qdf_mem_set(pHddStaCtx->conn_info.staId, - sizeof(pHddStaCtx->conn_info.staId), HDD_WLAN_INVALID_STA_ID); + qdf_mem_set(sta_ctx->conn_info.staId, + sizeof(sta_ctx->conn_info.staId), HDD_WLAN_INVALID_STA_ID); /* set fast roaming capability in sme session */ status = sme_config_fast_roaming(hdd_ctx->hHal, adapter->sessionId, adapter->fast_roaming_allowed); /* Set the default operation channel */ - pHddStaCtx->conn_info.operationChannel = + sta_ctx->conn_info.operationChannel = hdd_ctx->config->OperatingChannel; /* Make the default Auth Type as OPEN */ - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; status = hdd_init_tx_rx(adapter); if (QDF_STATUS_SUCCESS != status) { @@ -4234,9 +4234,9 @@ void wlan_hdd_reset_prob_rspies(struct hdd_adapter *adapter) case QDF_STA_MODE: case QDF_P2P_CLIENT_MODE: { - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - bssid = &pHddStaCtx->conn_info.bssId; + bssid = &sta_ctx->conn_info.bssId; break; } case QDF_SAP_MODE: @@ -4524,7 +4524,7 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx) hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL; QDF_STATUS status; struct hdd_adapter *adapter; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; struct qdf_mac_addr peerMacAddr; ENTER(); @@ -4589,9 +4589,9 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx) /* Delete peers if any for STA and P2P client modes */ if (adapter->device_mode == QDF_STA_MODE || adapter->device_mode == QDF_P2P_CLIENT_MODE) { - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); qdf_copy_macaddr(&peerMacAddr, - &pHddStaCtx->conn_info.bssId); + &sta_ctx->conn_info.bssId); hdd_objmgr_remove_peer_object(adapter->hdd_vdev, peerMacAddr.bytes); diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c index 8d7a8ec93cc8..d3551e3dca35 100644 --- a/core/hdd/src/wlan_hdd_ocb.c +++ b/core/hdd/src/wlan_hdd_ocb.c @@ -233,7 +233,7 @@ static int hdd_ocb_register_sta(struct hdd_adapter *adapter) QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; struct ol_txrx_desc_type sta_desc = {0}; struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); uint8_t peer_id; struct ol_txrx_ops txrx_ops; void *soc = cds_get_context(QDF_MODULE_ID_SOC); @@ -269,13 +269,13 @@ static int hdd_ocb_register_sta(struct hdd_adapter *adapter) return -EINVAL; } - if (pHddStaCtx->conn_info.staId[0] != HDD_WLAN_INVALID_STA_ID && - pHddStaCtx->conn_info.staId[0] != peer_id) { + if (sta_ctx->conn_info.staId[0] != HDD_WLAN_INVALID_STA_ID && + sta_ctx->conn_info.staId[0] != peer_id) { hdd_err("The ID for the OCB station has changed."); } - pHddStaCtx->conn_info.staId[0] = peer_id; - qdf_copy_macaddr(&pHddStaCtx->conn_info.peerMacAddress[0], + sta_ctx->conn_info.staId[0] = peer_id; + qdf_copy_macaddr(&sta_ctx->conn_info.peerMacAddress[0], &adapter->macAddressCurrent); return 0; diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 141c47d8120a..b34b8b4e826b 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -482,7 +482,7 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter, tpSirWifiInterfaceInfo pInfo) { uint8_t *staMac = NULL; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); tpAniSirGlobal pMac = PMAC_STRUCT(hHal); @@ -493,20 +493,20 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter, if (((QDF_STA_MODE == adapter->device_mode) || (QDF_P2P_CLIENT_MODE == adapter->device_mode) || (QDF_P2P_DEVICE_MODE == adapter->device_mode))) { - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (eConnectionState_NotConnected == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { pInfo->state = WIFI_DISCONNECTED; } if (eConnectionState_Connecting == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { hdd_err("Session ID %d, Connection is in progress", adapter->sessionId); pInfo->state = WIFI_ASSOCIATING; } if ((eConnectionState_Associated == - pHddStaCtx->conn_info.connState) - && (false == pHddStaCtx->conn_info.uIsAuthenticated)) { + sta_ctx->conn_info.connState) + && (false == sta_ctx->conn_info.uIsAuthenticated)) { staMac = (uint8_t *) &(adapter->macAddressCurrent. bytes[0]); @@ -516,17 +516,17 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter, pInfo->state = WIFI_AUTHENTICATING; } if (eConnectionState_Associated == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { pInfo->state = WIFI_ASSOCIATED; qdf_copy_macaddr(&pInfo->bssid, - &pHddStaCtx->conn_info.bssId); + &sta_ctx->conn_info.bssId); qdf_mem_copy(pInfo->ssid, - pHddStaCtx->conn_info.SSID.SSID.ssId, - pHddStaCtx->conn_info.SSID.SSID.length); + sta_ctx->conn_info.SSID.SSID.ssId, + sta_ctx->conn_info.SSID.SSID.length); /* * NULL Terminate the string */ - pInfo->ssid[pHddStaCtx->conn_info.SSID.SSID.length] = 0; + pInfo->ssid[sta_ctx->conn_info.SSID.SSID.length] = 0; } } @@ -3886,8 +3886,8 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct station_info *sinfo) { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - int ssidlen = pHddStaCtx->conn_info.SSID.SSID.length; + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + int ssidlen = sta_ctx->conn_info.SSID.SSID.length; uint8_t rate_flags; uint8_t mcs_index; @@ -3938,7 +3938,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, if (adapter->device_mode == QDF_SAP_MODE) return wlan_hdd_get_sap_stats(adapter, sinfo); - if ((eConnectionState_Associated != pHddStaCtx->conn_info.connState) || + if ((eConnectionState_Associated != sta_ctx->conn_info.connState) || (0 == ssidlen)) { hdd_debug("Not associated or Invalid ssidlen, %d", ssidlen); @@ -3946,7 +3946,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, return 0; } - if (true == pHddStaCtx->hdd_ReassocScenario) { + if (true == sta_ctx->hdd_ReassocScenario) { hdd_debug("Roaming is in progress, cannot continue with this request"); /* * supplicant reports very low rssi to upper layer @@ -3966,7 +3966,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, /* for new connection there might be no valid previous RSSI */ if (!adapter->rssi) { hdd_get_rssi_snr_by_bssid(adapter, - pHddStaCtx->conn_info.bssId.bytes, + sta_ctx->conn_info.bssId.bytes, &adapter->rssi, NULL); } @@ -3975,9 +3975,9 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, hdd_debug("snr: %d, rssi: %d", adapter->hdd_stats.summary_stat.snr, adapter->hdd_stats.summary_stat.rssi); - pHddStaCtx->conn_info.signal = sinfo->signal; - pHddStaCtx->conn_info.noise = - pHddStaCtx->conn_info.signal - snr; + sta_ctx->conn_info.signal = sinfo->signal; + sta_ctx->conn_info.noise = + sta_ctx->conn_info.signal - snr; wlan_hdd_fill_station_info_signal(sinfo); @@ -4332,7 +4332,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, sinfo->rx_bytes = adapter->stats.rx_bytes; sinfo->rx_packets = adapter->stats.rx_packets; - qdf_mem_copy(&pHddStaCtx->conn_info.txrate, + qdf_mem_copy(&sta_ctx->conn_info.txrate, &sinfo->txrate, sizeof(sinfo->txrate)); #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS) @@ -4600,7 +4600,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy, { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; int status; bool filled = false; @@ -4625,12 +4625,12 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (hdd_ctx->config->fEnableSNRMonitoring == 0) return -ENONET; - if (pHddStaCtx->hdd_ReassocScenario) { + if (sta_ctx->hdd_ReassocScenario) { hdd_info("Roaming in progress, hence return"); return -ENONET; } diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 5049f5410e7a..41ca4e459e23 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -564,7 +564,7 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); bool granted; uint8_t STAId; - struct hdd_station_ctx *pHddStaCtx = &adapter->sessionCtx.station; + struct hdd_station_ctx *sta_ctx = &adapter->sessionCtx.station; struct qdf_mac_addr *mac_addr; bool pkt_proto_logged = false; #ifdef QCA_PKT_PROTO_TRACE @@ -645,7 +645,7 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) if (((adapter->psbChanged & (1 << ac)) && likely(adapter->hddWmmStatus.wmmAcStatus[ac]. wmmAcAccessAllowed)) || - ((pHddStaCtx->conn_info.uIsAuthenticated == false) && + ((sta_ctx->conn_info.uIsAuthenticated == false) && (QDF_NBUF_CB_PACKET_TYPE_EAPOL == QDF_NBUF_CB_GET_PACKET_TYPE(skb) || QDF_NBUF_CB_PACKET_TYPE_WAPI == @@ -823,22 +823,22 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) /** * hdd_get_peer_sta_id() - Get the StationID using the Peer Mac address - * @pHddStaCtx: pointer to HDD Station Context + * @sta_ctx: pointer to HDD Station Context * @pMacAddress: pointer to Peer Mac address * @staID: pointer to returned Station Index * * Return: QDF_STATUS_SUCCESS/QDF_STATUS_E_FAILURE */ -QDF_STATUS hdd_get_peer_sta_id(struct hdd_station_ctx *pHddStaCtx, +QDF_STATUS hdd_get_peer_sta_id(struct hdd_station_ctx *sta_ctx, struct qdf_mac_addr *pMacAddress, uint8_t *staId) { uint8_t idx; for (idx = 0; idx < MAX_PEERS; idx++) { - if (!qdf_mem_cmp(&pHddStaCtx->conn_info.peerMacAddress[idx], + if (!qdf_mem_cmp(&sta_ctx->conn_info.peerMacAddress[idx], pMacAddress, QDF_MAC_ADDR_SIZE)) { - *staId = pHddStaCtx->conn_info.staId[idx]; + *staId = sta_ctx->conn_info.staId[idx]; return QDF_STATUS_SUCCESS; } } @@ -1167,7 +1167,7 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) int rxstat; struct sk_buff *skb = NULL; struct sk_buff *next = NULL; - struct hdd_station_ctx *pHddStaCtx = NULL; + struct hdd_station_ctx *sta_ctx = NULL; unsigned int cpu_index; struct qdf_mac_addr *mac_addr; bool wake_lock = false; @@ -1209,8 +1209,8 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) "%s: skb %pK skb->len %d\n", __func__, skb, skb->len); #endif - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - if ((pHddStaCtx->conn_info.proxyARPService) && + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + if ((sta_ctx->conn_info.proxyARPService) && cfg80211_is_gratuitous_arp_unsolicited_na(skb)) { uint32_t rx_dropped; @@ -1278,7 +1278,7 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) /* hold configurable wakelock for unicast traffic */ if (hdd_ctx->config->rx_wakelock_timeout && - pHddStaCtx->conn_info.uIsAuthenticated) + sta_ctx->conn_info.uIsAuthenticated) wake_lock = hdd_is_rx_wake_lock_needed(skb); if (wake_lock) { diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 1c206ef31e39..ddd02601041e 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -3311,13 +3311,13 @@ hdd_wlan_get_ibss_mac_addr_from_staid(struct hdd_adapter *adapter, uint8_t staIdx) { uint8_t idx; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); for (idx = 0; idx < MAX_PEERS; idx++) { if (HDD_WLAN_INVALID_STA_ID != - pHddStaCtx->conn_info.staId[idx] && - staIdx == pHddStaCtx->conn_info.staId[idx]) { - return &pHddStaCtx->conn_info.peerMacAddress[idx]; + sta_ctx->conn_info.staId[idx] && + staIdx == sta_ctx->conn_info.staId[idx]) { + return &sta_ctx->conn_info.peerMacAddress[idx]; } } return NULL; @@ -3554,7 +3554,7 @@ static void hdd_get_rssi_cb(int8_t rssi, uint32_t sta_id, void *context) QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value) { struct hdd_context *hdd_ctx; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; QDF_STATUS hstatus; int ret; void *cookie; @@ -3578,16 +3578,16 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value) } hdd_ctx = WLAN_HDD_GET_CTX(adapter); - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { hdd_debug("Not associated!, rssi on disconnect %d", adapter->rssi_on_disconnect); *rssi_value = adapter->rssi_on_disconnect; return QDF_STATUS_SUCCESS; } - if (pHddStaCtx->hdd_ReassocScenario) { + if (sta_ctx->hdd_ReassocScenario) { hdd_debug("Roaming in progress, return cached RSSI"); *rssi_value = adapter->rssi; return QDF_STATUS_SUCCESS; @@ -3602,8 +3602,8 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value) cookie = hdd_request_cookie(request); hstatus = sme_get_rssi(hdd_ctx->hHal, hdd_get_rssi_cb, - pHddStaCtx->conn_info.staId[0], - pHddStaCtx->conn_info.bssId, adapter->rssi, + sta_ctx->conn_info.staId[0], + sta_ctx->conn_info.bssId, adapter->rssi, cookie); if (QDF_STATUS_SUCCESS != hstatus) { hdd_err("Unable to retrieve RSSI"); @@ -3630,7 +3630,7 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value) */ if (!adapter->rssi) { hdd_get_rssi_snr_by_bssid(adapter, - pHddStaCtx->conn_info.bssId.bytes, + sta_ctx->conn_info.bssId.bytes, &adapter->rssi, NULL); } } @@ -3690,7 +3690,7 @@ static void hdd_get_snr_cb(int8_t snr, uint32_t sta_id, void *context) QDF_STATUS wlan_hdd_get_snr(struct hdd_adapter *adapter, int8_t *snr) { struct hdd_context *hdd_ctx; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; QDF_STATUS hstatus; int valid; int ret; @@ -3715,7 +3715,7 @@ QDF_STATUS wlan_hdd_get_snr(struct hdd_adapter *adapter, int8_t *snr) if (0 != valid) return QDF_STATUS_E_FAULT; - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); request = hdd_request_alloc(¶ms); if (!request) { @@ -3725,8 +3725,8 @@ QDF_STATUS wlan_hdd_get_snr(struct hdd_adapter *adapter, int8_t *snr) cookie = hdd_request_cookie(request); hstatus = sme_get_snr(hdd_ctx->hHal, hdd_get_snr_cb, - pHddStaCtx->conn_info.staId[0], - pHddStaCtx->conn_info.bssId, cookie); + sta_ctx->conn_info.staId[0], + sta_ctx->conn_info.bssId, cookie); if (QDF_STATUS_SUCCESS != hstatus) { hdd_err("Unable to retrieve RSSI"); /* we'll returned a cached value below */ @@ -4841,7 +4841,7 @@ static int __iw_set_freq(struct net_device *dev, struct iw_request_info *info, struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx; tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); tCsrRoamProfile *pRoamProfile; ENTER_DEV(dev); @@ -4860,8 +4860,8 @@ static int __iw_set_freq(struct net_device *dev, struct iw_request_info *info, pRoamProfile = &pWextState->roamProfile; /* Link is up then return cant set channel */ - if (eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState || - eConnectionState_Associated == pHddStaCtx->conn_info.connState) { + if (eConnectionState_IbssConnected == sta_ctx->conn_info.connState || + eConnectionState_Associated == sta_ctx->conn_info.connState) { hdd_debug("IBSS Associated"); return -EOPNOTSUPP; } @@ -4914,9 +4914,9 @@ static int __iw_set_freq(struct net_device *dev, struct iw_request_info *info, /* Set the Operational Channel */ numChans = pRoamProfile->ChannelInfo.numOfChannels = 1; - pHddStaCtx->conn_info.operationChannel = wrqu->freq.m; + sta_ctx->conn_info.operationChannel = wrqu->freq.m; pRoamProfile->ChannelInfo.ChannelList = - &pHddStaCtx->conn_info.operationChannel; + &sta_ctx->conn_info.operationChannel; hdd_debug("pRoamProfile->operationChannel = %d", wrqu->freq.m); @@ -4963,7 +4963,7 @@ static int __iw_get_freq(struct net_device *dev, struct iw_request_info *info, tHalHandle hHal; struct hdd_wext_state *pWextState; tCsrRoamProfile *pRoamProfile; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx; int ret; @@ -4983,7 +4983,7 @@ static int __iw_get_freq(struct net_device *dev, struct iw_request_info *info, pRoamProfile = &pWextState->roamProfile; - if (pHddStaCtx->conn_info.connState == eConnectionState_Associated) { + if (sta_ctx->conn_info.connState == eConnectionState_Associated) { if (sme_get_operation_channel(hHal, &channel, adapter->sessionId) != QDF_STATUS_SUCCESS) { hdd_err("failed to get operating channel %u", @@ -5049,7 +5049,7 @@ static int __iw_get_tx_power(struct net_device *dev, struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); int ret; ENTER_DEV(dev); @@ -5062,7 +5062,7 @@ static int __iw_get_tx_power(struct net_device *dev, if (0 != ret) return ret; - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { wrqu->txpower.value = 0; return 0; } @@ -5172,7 +5172,7 @@ static int __iw_get_bitrate(struct net_device *dev, QDF_STATUS status; struct hdd_wext_state *pWextState; struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx; int ret; @@ -5187,7 +5187,7 @@ static int __iw_get_bitrate(struct net_device *dev, if (0 != ret) return ret; - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { wrqu->bitrate.value = 0; } else { status = @@ -5197,7 +5197,7 @@ static int __iw_get_bitrate(struct net_device *dev, SME_GLOBAL_CLASSA_STATS | SME_GLOBAL_CLASSD_STATS, hdd_statistics_cb, - pHddStaCtx->conn_info.staId[0], + sta_ctx->conn_info.staId[0], adapter, adapter->sessionId); if (QDF_STATUS_SUCCESS != status) { @@ -5262,7 +5262,7 @@ static int __iw_set_bitrate(struct net_device *dev, { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_wext_state *pWextState; - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); uint8_t supp_rates[WNI_CFG_SUPPORTED_RATES_11A_LEN]; uint32_t a_len = WNI_CFG_SUPPORTED_RATES_11A_LEN; uint32_t b_len = WNI_CFG_SUPPORTED_RATES_11B_LEN; @@ -5284,7 +5284,7 @@ static int __iw_set_bitrate(struct net_device *dev, pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) + if (eConnectionState_Associated != sta_ctx->conn_info.connState) return -ENXIO; rate = wrqu->bitrate.value; @@ -5563,7 +5563,7 @@ static int __iw_get_genie(struct net_device *dev, { struct hdd_wext_state *pWextState; struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); QDF_STATUS status; uint32_t length = DOT11F_IE_RSN_MAX_LEN; uint8_t genIeBytes[DOT11F_IE_RSN_MAX_LEN]; @@ -5585,7 +5585,7 @@ static int __iw_get_genie(struct net_device *dev, pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - if (pHddStaCtx->conn_info.connState == eConnectionState_NotConnected) + if (sta_ctx->conn_info.connState == eConnectionState_NotConnected) return -ENXIO; /* Return something ONLY if we are associated with an RSN or @@ -6334,7 +6334,7 @@ static void hdd_get_class_a_statistics_cb(void *stats, void *context) */ QDF_STATUS wlan_hdd_get_class_astats(struct hdd_adapter *adapter) { - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); QDF_STATUS hstatus; int ret; void *cookie; @@ -6366,7 +6366,7 @@ QDF_STATUS wlan_hdd_get_class_astats(struct hdd_adapter *adapter) hstatus = sme_get_statistics(WLAN_HDD_GET_HAL_CTX(adapter), eCSR_HDD, SME_GLOBAL_CLASSA_STATS, hdd_get_class_a_statistics_cb, - pHddStaCtx->conn_info.staId[0], + sta_ctx->conn_info.staId[0], cookie, adapter->sessionId); if (QDF_STATUS_SUCCESS != hstatus) { hdd_warn("Unable to retrieve Class A statistics"); @@ -6452,7 +6452,7 @@ static void hdd_get_station_statistics_cb(void *stats, void *context) */ QDF_STATUS wlan_hdd_get_station_stats(struct hdd_adapter *adapter) { - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); QDF_STATUS status; int errno; void *cookie; @@ -6482,7 +6482,7 @@ QDF_STATUS wlan_hdd_get_station_stats(struct hdd_adapter *adapter) SME_GLOBAL_CLASSA_STATS | SME_PER_CHAIN_RSSI_STATS, hdd_get_station_statistics_cb, - pHddStaCtx->conn_info.staId[0], + sta_ctx->conn_info.staId[0], cookie, adapter->sessionId); if (QDF_IS_STATUS_ERROR(status)) { @@ -6723,7 +6723,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); @@ -6765,18 +6765,18 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, qdf_mem_zero(pWextState->roamProfile.Keys.KeyLength, CSR_MAX_NUM_KEY); } - pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; + sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM; pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED; pWextState->roamProfile.EncryptionType.encryptionType[0] = eCSR_ENCRYPT_TYPE_NONE; pWextState->roamProfile.mcEncryptionType.encryptionType[0] = eCSR_ENCRYPT_TYPE_NONE; - pHddStaCtx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE; - pHddStaCtx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE; + sta_ctx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE; + sta_ctx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE; if (eConnectionState_Associated == - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { INIT_COMPLETION(adapter->disconnect_comp_var); status = sme_roam_disconnect(WLAN_HDD_GET_HAL_CTX(adapter), @@ -6801,7 +6801,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, if (wrqu->data.flags & (IW_ENCODE_OPEN | IW_ENCODE_RESTRICTED)) { hdd_debug("iwconfig wlan0 key on"); - pHddStaCtx->conn_info.authType = + sta_ctx->conn_info.authType = (encoderq->flags & IW_ENCODE_RESTRICTED) ? eCSR_AUTH_TYPE_SHARED_KEY : eCSR_AUTH_TYPE_OPEN_SYSTEM; @@ -6824,7 +6824,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, if ((IW_AUTH_KEY_MGMT_802_1X == pWextState->authKeyMgmt) && (eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType)) { + sta_ctx->conn_info.authType)) { encryptionType = eCSR_ENCRYPT_TYPE_WEP40; } else { encryptionType = @@ -6836,7 +6836,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, if ((IW_AUTH_KEY_MGMT_802_1X == pWextState->authKeyMgmt) && (eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType)) { + sta_ctx->conn_info.authType)) { encryptionType = eCSR_ENCRYPT_TYPE_WEP104; } else { encryptionType = @@ -6847,8 +6847,8 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, return -EINVAL; } - pHddStaCtx->conn_info.ucEncryptionType = encryptionType; - pHddStaCtx->conn_info.mcEncryptionType = encryptionType; + sta_ctx->conn_info.ucEncryptionType = encryptionType; + sta_ctx->conn_info.mcEncryptionType = encryptionType; pWextState->roamProfile.EncryptionType.numEntries = 1; pWextState->roamProfile.EncryptionType.encryptionType[0] = encryptionType; @@ -6857,12 +6857,12 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, encryptionType; if ((eConnectionState_NotConnected == - pHddStaCtx->conn_info.connState) + sta_ctx->conn_info.connState) && ((eCSR_AUTH_TYPE_OPEN_SYSTEM == - pHddStaCtx->conn_info.authType) + sta_ctx->conn_info.authType) || (eCSR_AUTH_TYPE_SHARED_KEY == - pHddStaCtx->conn_info.authType))) { + sta_ctx->conn_info.authType))) { qdf_mem_copy(&pWextState->roamProfile.Keys. KeyMaterial[keyId][0], extra, key_length); @@ -7014,7 +7014,7 @@ static int __iw_set_encodeext(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_wext_state *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); @@ -7054,7 +7054,7 @@ static int __iw_set_encodeext(struct net_device *dev, return ret; } - if (eConnectionState_NotConnected == pHddStaCtx->conn_info.connState && + if (eConnectionState_NotConnected == sta_ctx->conn_info.connState && (IW_ENCODE_ALG_WEP == ext->alg)) { if (IW_AUTH_KEY_MGMT_802_1X == pWextState->authKeyMgmt) { @@ -7178,7 +7178,7 @@ static int __iw_set_encodeext(struct net_device *dev, return -EINVAL; } - pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY; + sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY; qdf_ret_status = sme_roam_set_key(WLAN_HDD_GET_HAL_CTX(adapter), adapter->sessionId, @@ -7188,7 +7188,7 @@ static int __iw_set_encodeext(struct net_device *dev, hdd_err("[%4d] sme_roam_set_key returned ERROR status= %d", __LINE__, qdf_ret_status); - pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_NONE; + sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE; } return qdf_ret_status; @@ -7397,7 +7397,7 @@ static int __iw_set_mlme(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct iw_mlme *mlme = (struct iw_mlme *)extra; QDF_STATUS status = QDF_STATUS_SUCCESS; struct hdd_context *hdd_ctx; @@ -7421,7 +7421,7 @@ static int __iw_set_mlme(struct net_device *dev, case IW_MLME_DISASSOC: case IW_MLME_DEAUTH: - if (pHddStaCtx->conn_info.connState == + if (sta_ctx->conn_info.connState == eConnectionState_Associated) { eCsrRoamDisconnectReason reason = eCSR_DISCONNECT_REASON_UNSPECIFIED; @@ -7918,7 +7918,7 @@ static int __iw_setint_getnone(struct net_device *dev, { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx; tSmeConfigParams *sme_config; int *value = (int *)extra; @@ -8098,7 +8098,7 @@ static int __iw_setint_getnone(struct net_device *dev, if (!hHal) return -EINVAL; - qdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId); + qdf_copy_macaddr(&bssid, &sta_ctx->conn_info.bssId); if (sme_set_tx_power (hHal, adapter->sessionId, bssid, adapter->device_mode, @@ -8119,8 +8119,8 @@ static int __iw_setint_getnone(struct net_device *dev, hdd_debug("Setting maximum tx power %d dBm", set_value); - qdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId); - qdf_copy_macaddr(&selfMac, &pHddStaCtx->conn_info.bssId); + qdf_copy_macaddr(&bssid, &sta_ctx->conn_info.bssId); + qdf_copy_macaddr(&selfMac, &sta_ctx->conn_info.bssId); if (sme_set_max_tx_power(hHal, bssid, selfMac, set_value) != QDF_STATUS_SUCCESS) { @@ -10196,7 +10196,7 @@ static int __iw_get_char_setnone(struct net_device *dev, tHalHandle hHal = NULL; tpAniSirGlobal pMac = NULL; - struct hdd_station_ctx *pHddStaCtx = NULL; + struct hdd_station_ctx *sta_ctx = NULL; struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); struct hdd_adapter *useAdapter = NULL; @@ -10265,7 +10265,7 @@ static int __iw_get_char_setnone(struct net_device *dev, len += buf; break; } - pHddStaCtx = + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(useAdapter); @@ -10277,7 +10277,7 @@ static int __iw_get_char_setnone(struct net_device *dev, "\n CSR State - %s" "\n CSR Substate - %s", hdd_connection_state_string - (pHddStaCtx->conn_info.connState), + (sta_ctx->conn_info.connState), mac_trace_get_neighbour_roam_state (sme_get_neighbor_roam_state (hHal, useAdapter->sessionId)), @@ -10488,30 +10488,30 @@ static int __iw_get_char_setnone(struct net_device *dev, #endif case WE_GET_IBSS_STA_INFO: { - struct hdd_station_ctx *pHddStaCtx = + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); int idx = 0; int length = 0, buf = 0; for (idx = 0; idx < MAX_PEERS; idx++) { if (HDD_WLAN_INVALID_STA_ID != - pHddStaCtx->conn_info.staId[idx]) { + sta_ctx->conn_info.staId[idx]) { buf = snprintf ((extra + length), WE_MAX_STR_LEN - length, "\n%d .%02x:%02x:%02x:%02x:%02x:%02x\n", - pHddStaCtx->conn_info.staId[idx], - pHddStaCtx->conn_info. + sta_ctx->conn_info.staId[idx], + sta_ctx->conn_info. peerMacAddress[idx].bytes[0], - pHddStaCtx->conn_info. + sta_ctx->conn_info. peerMacAddress[idx].bytes[1], - pHddStaCtx->conn_info. + sta_ctx->conn_info. peerMacAddress[idx].bytes[2], - pHddStaCtx->conn_info. + sta_ctx->conn_info. peerMacAddress[idx].bytes[3], - pHddStaCtx->conn_info. + sta_ctx->conn_info. peerMacAddress[idx].bytes[4], - pHddStaCtx->conn_info. + sta_ctx->conn_info. peerMacAddress[idx].bytes[5] ); length += buf; @@ -10644,20 +10644,20 @@ static int __iw_get_char_setnone(struct net_device *dev, int8_t s7snr = 0; int status = 0; struct hdd_context *hdd_ctx; - struct hdd_station_ctx *pHddStaCtx; + struct hdd_station_ctx *sta_ctx; hdd_ctx = WLAN_HDD_GET_CTX(adapter); status = wlan_hdd_validate_context(hdd_ctx); if (status) return status; - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if (0 == hdd_ctx->config->fEnableSNRMonitoring || eConnectionState_Associated != - pHddStaCtx->conn_info.connState) { + sta_ctx->conn_info.connState) { hdd_err("getSNR failed: Enable SNR Monitoring-%d, ConnectionState-%d", hdd_ctx->config->fEnableSNRMonitoring, - pHddStaCtx->conn_info.connState); + sta_ctx->conn_info.connState); return -ENONET; } wlan_hdd_get_snr(adapter, &s7snr); @@ -11352,7 +11352,7 @@ static int __iw_add_tspec(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); hdd_wlan_wmm_status_e *pStatus = (hdd_wlan_wmm_status_e *) extra; int params[HDD_WLAN_WMM_PARAM_COUNT]; struct sme_qos_wmmtspecinfo tSpec; @@ -11380,7 +11380,7 @@ static int __iw_add_tspec(struct net_device *dev, struct iw_request_info *info, return -EPERM; /* we must be associated in order to add a tspec */ - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { *pStatus = HDD_WLAN_WMM_STATUS_SETUP_FAILED_BAD_PARAM; return 0; } @@ -11660,7 +11660,7 @@ static int __iw_set_fties(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx; int ret; @@ -11684,7 +11684,7 @@ static int __iw_set_fties(struct net_device *dev, struct iw_request_info *info, return -EINVAL; } /* Added for debug on reception of Re-assoc Req. */ - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) { + if (eConnectionState_Associated != sta_ctx->conn_info.connState) { hdd_debug("Called with Ie of length = %d when not associated", wrqu->data.length); hdd_debug("Should be Re-assoc Req IEs"); @@ -14421,7 +14421,7 @@ const struct iw_handler_def we_handler_def = { static int hdd_set_wext(struct hdd_adapter *adapter) { struct hdd_wext_state *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); ENTER(); @@ -14430,17 +14430,17 @@ static int hdd_set_wext(struct hdd_adapter *adapter) return QDF_STATUS_E_FAILURE; } - if (!pHddStaCtx) { - hdd_err("ERROR: pHddStaCtx is NULL"); + if (!sta_ctx) { + hdd_err("ERROR: sta_ctx is NULL"); return QDF_STATUS_E_FAILURE; } /* Now configure the roaming profile links. To SSID and bssid. */ pwextBuf->roamProfile.SSIDs.numOfSSIDs = 0; - pwextBuf->roamProfile.SSIDs.SSIDList = &pHddStaCtx->conn_info.SSID; + pwextBuf->roamProfile.SSIDs.SSIDList = &sta_ctx->conn_info.SSID; pwextBuf->roamProfile.BSSIDs.numOfBSSIDs = 0; - pwextBuf->roamProfile.BSSIDs.bssid = &pHddStaCtx->conn_info.bssId; + pwextBuf->roamProfile.BSSIDs.bssid = &sta_ctx->conn_info.bssId; /*Set the numOfChannels to zero to scan all the channels */ pwextBuf->roamProfile.ChannelInfo.numOfChannels = 0;