From b105d05c8d49d6556586415e4e6db88fd726d5d7 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 21 Oct 2017 12:07:29 -0700 Subject: [PATCH] qcacld-3.0: Rename hdd_station_info isUsed field Per the Linux coding style "mixed-case names are frowned upon" so rename field isUsed in struct hdd_station_info. Change-Id: I60265fd3b6ac5bb8d98aa916b87ebf73a6c231f6 CRs-Fixed: 2131085 --- core/hdd/inc/wlan_hdd_main.h | 4 ++-- core/hdd/src/wlan_hdd_cfg80211.c | 4 ++-- core/hdd/src/wlan_hdd_hostapd.c | 16 ++++++++-------- core/hdd/src/wlan_hdd_ipa.c | 2 +- core/hdd/src/wlan_hdd_main.c | 2 +- core/hdd/src/wlan_hdd_softap_tx_rx.c | 18 +++++++++--------- core/hdd/src/wlan_hdd_wext.c | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index b9ae53ee699e..c26f27e09e19 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -769,7 +769,7 @@ struct hdd_fw_txrx_stats { /** * struct hdd_station_info - Per station structure kept in HDD for * multiple station support for SoftAP - * @isUsed: The station entry is used or not + * @in_use: Is the station entry in use? * @ucSTAId: Station ID reported back from HAL (through SAP). * Broadcast uses station ID zero by default. * @staType: Type of station i.e. p2p client or infrastructure station @@ -803,7 +803,7 @@ struct hdd_fw_txrx_stats { * @tx_mcs_map: VHT Tx mcs map */ struct hdd_station_info { - bool isUsed; + bool in_use; uint8_t ucSTAId; eStationType staType; struct qdf_mac_addr macAddrSTA; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 1e0c6a30ebdf..035ad4875af8 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -7894,7 +7894,7 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy, adapter->device_mode == QDF_SAP_MODE) { for (sta_id = 0; sta_id < WLAN_MAX_STA_COUNT; sta_id++) { - if (adapter->aStaInfo[sta_id].isUsed && + if (adapter->aStaInfo[sta_id].in_use && !qdf_is_macaddr_broadcast( &adapter->aStaInfo[sta_id].macAddrSTA) && !qdf_mem_cmp( @@ -18250,7 +18250,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, uint16_t i; for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { - if ((adapter->aStaInfo[i].isUsed) && + if ((adapter->aStaInfo[i].in_use) && (!adapter->aStaInfo[i]. isDeauthInProgress)) { qdf_mem_copy( diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 027cf8ee3bc3..8397311f5688 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -671,7 +671,7 @@ static void hdd_clear_all_sta(struct hdd_adapter *adapter, hdd_debug("Clearing all the STA entry...."); for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++) { - if (adapter->aStaInfo[staId].isUsed && + if (adapter->aStaInfo[staId].in_use && (staId != (WLAN_HDD_GET_AP_CTX_PTR(adapter))->uBCStaId)) { wlansap_populate_del_sta_params( @@ -2077,7 +2077,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, ap_ctx->bApActive = false; spin_lock_bh(&adapter->staInfo_lock); for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { - if (adapter->aStaInfo[i].isUsed + if (adapter->aStaInfo[i].in_use && i != (WLAN_HDD_GET_AP_CTX_PTR(adapter))-> uBCStaId) { @@ -4489,7 +4489,7 @@ static __iw_softap_getassoc_stamacaddr(struct net_device *dev, spin_lock_bh(&adapter->staInfo_lock); while ((cnt < WLAN_MAX_STA_COUNT) && (left >= QDF_MAC_ADDR_SIZE)) { - if ((pStaInfo[cnt].isUsed) && + if ((pStaInfo[cnt].in_use) && (!IS_BROADCAST_MAC(pStaInfo[cnt].macAddrSTA.bytes))) { memcpy(&buf[maclist_index], &(pStaInfo[cnt].macAddrSTA), QDF_MAC_ADDR_SIZE); @@ -5129,7 +5129,7 @@ static int hdd_softap_get_sta_info(struct hdd_adapter *adapter, if (written >= size - 1) break; - if (!sta->isUsed) + if (!sta->in_use) continue; if (i == bc_sta_id) @@ -5258,7 +5258,7 @@ int __iw_get_softap_linkspeed(struct net_device *dev, */ if (wrqu->data.length < 17 || !QDF_IS_STATUS_SUCCESS(status)) { for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { - if (adapter->aStaInfo[i].isUsed && + if (adapter->aStaInfo[i].in_use && (!qdf_is_macaddr_broadcast (&adapter->aStaInfo[i].macAddrSTA))) { qdf_copy_macaddr( @@ -8834,9 +8834,9 @@ void hdd_sap_indicate_disconnect_for_sta(struct hdd_adapter *adapter) } for (sta_id = 0; sta_id < WLAN_MAX_STA_COUNT; sta_id++) { - if (adapter->aStaInfo[sta_id].isUsed) { - hdd_debug("sta_id: %d isUsed: %d %pK", - sta_id, adapter->aStaInfo[sta_id].isUsed, + if (adapter->aStaInfo[sta_id].in_use) { + hdd_debug("sta_id: %d in_use: %d %pK", + sta_id, adapter->aStaInfo[sta_id].in_use, adapter); if (qdf_is_macaddr_broadcast( diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 815277d225a2..5c10f37fbbcf 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -3062,7 +3062,7 @@ static int hdd_ipa_uc_disconnect_client(struct hdd_adapter *adapter) for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { if (qdf_is_macaddr_broadcast(&adapter->aStaInfo[i].macAddrSTA)) continue; - if ((adapter->aStaInfo[i].isUsed) && + if ((adapter->aStaInfo[i].in_use) && (!adapter->aStaInfo[i].isDeauthInProgress) && hdd_ipa->sap_num_connected_sta) { hdd_ipa_uc_send_evt(adapter, WLAN_CLIENT_DISCONNECT, diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0a177e624e54..c754f4873f6d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12417,7 +12417,7 @@ bool hdd_is_connection_in_progress(uint8_t *session_id, (QDF_P2P_GO_MODE == adapter->device_mode)) { for (sta_id = 0; sta_id < WLAN_MAX_STA_COUNT; sta_id++) { - if (!((adapter->aStaInfo[sta_id].isUsed) + if (!((adapter->aStaInfo[sta_id].in_use) && (OL_TXRX_PEER_STATE_CONN == adapter->aStaInfo[sta_id].tlSTAState))) continue; diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 96a1731be5e0..3829fa0520ae 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -354,7 +354,7 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb, QDF_TRACE_LEVEL_INFO_HIGH, "%s: Failed to find right station", __func__); goto drop_pkt; - } else if (false == adapter->aStaInfo[STAId].isUsed) { + } else if (false == adapter->aStaInfo[STAId].in_use) { QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_INFO_HIGH, "%s: STA %d is unregistered", __func__, @@ -644,7 +644,7 @@ QDF_STATUS hdd_softap_init_tx_rx_sta(struct hdd_adapter *adapter, struct qdf_mac_addr *pmacAddrSTA) { spin_lock_bh(&adapter->staInfo_lock); - if (adapter->aStaInfo[STAId].isUsed) { + if (adapter->aStaInfo[STAId].in_use) { spin_unlock_bh(&adapter->staInfo_lock); hdd_err("Reinit of in use station %d", STAId); return QDF_STATUS_E_FAILURE; @@ -653,7 +653,7 @@ QDF_STATUS hdd_softap_init_tx_rx_sta(struct hdd_adapter *adapter, qdf_mem_zero(&adapter->aStaInfo[STAId], sizeof(struct hdd_station_info)); - adapter->aStaInfo[STAId].isUsed = true; + adapter->aStaInfo[STAId].in_use = true; adapter->aStaInfo[STAId].isDeauthInProgress = false; qdf_copy_macaddr(&adapter->aStaInfo[STAId].macAddrSTA, pmacAddrSTA); @@ -679,13 +679,13 @@ QDF_STATUS hdd_softap_deinit_tx_rx_sta(struct hdd_adapter *adapter, spin_lock_bh(&adapter->staInfo_lock); - if (false == adapter->aStaInfo[STAId].isUsed) { + if (false == adapter->aStaInfo[STAId].in_use) { spin_unlock_bh(&adapter->staInfo_lock); hdd_err("Deinit station not inited %d", STAId); return QDF_STATUS_E_FAILURE; } - adapter->aStaInfo[STAId].isUsed = false; + adapter->aStaInfo[STAId].in_use = false; adapter->aStaInfo[STAId].isDeauthInProgress = false; spin_unlock_bh(&adapter->staInfo_lock); @@ -877,7 +877,7 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter, hdd_err("Peer obj %pM delete fails", adapter->aStaInfo[staId].macAddrSTA.bytes); - if (adapter->aStaInfo[staId].isUsed) { + if (adapter->aStaInfo[staId].in_use) { spin_lock_bh(&adapter->staInfo_lock); qdf_mem_zero(&adapter->aStaInfo[staId], sizeof(struct hdd_station_info)); @@ -924,7 +924,7 @@ QDF_STATUS hdd_softap_register_sta(struct hdd_adapter *adapter, /* * Clean up old entry if it is not cleaned up properly */ - if (adapter->aStaInfo[staId].isUsed) { + if (adapter->aStaInfo[staId].in_use) { hdd_info("clean up old entry for STA %d", staId); hdd_softap_deregister_sta(adapter, staId); } @@ -1076,7 +1076,7 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter) for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++) { /* This excludes BC sta as it is already deregistered */ - if (adapter->aStaInfo[staId].isUsed) { + if (adapter->aStaInfo[staId].in_use) { qdf_status = hdd_softap_deregister_sta(adapter, staId); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Failed to deregister sta Id %d", @@ -1150,7 +1150,7 @@ QDF_STATUS hdd_softap_get_sta_id(struct hdd_adapter *adapter, for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { if (!qdf_mem_cmp (&adapter->aStaInfo[i].macAddrSTA, pMacAddress, - QDF_MAC_ADDR_SIZE) && adapter->aStaInfo[i].isUsed) { + QDF_MAC_ADDR_SIZE) && adapter->aStaInfo[i].in_use) { *staId = i; return QDF_STATUS_SUCCESS; } diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 27143fb34ce1..f6defe3f764d 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -4491,7 +4491,7 @@ int hdd_set_peer_rate(struct hdd_adapter *adapter, int set_value) hdd_get_aid_rc(&aid, &rc, set_value); - if ((adapter->aStaInfo[aid].isUsed) && + if ((adapter->aStaInfo[aid].in_use) && (OL_TXRX_PEER_STATE_CONN == adapter->aStaInfo[aid].tlSTAState)) { peer_mac = (uint8_t *)&(adapter->aStaInfo[aid].macAddrSTA.bytes[0]);