diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index e4d9fd3a12d2..6fe0b56bfbe8 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -2115,9 +2115,6 @@ bool hdd_is_valid_mac_address(const uint8_t *pMacAddr); QDF_STATUS hdd_issta_p2p_clientconnected(struct hdd_context *hdd_ctx); bool wlan_hdd_validate_modules_state(struct hdd_context *hdd_ctx); -struct qdf_mac_addr * -hdd_wlan_get_ibss_mac_addr_from_staid(struct hdd_adapter *adapter, - uint8_t staIdx); #ifdef MSM_PLATFORM /** * hdd_bus_bw_compute_timer_start() - start the bandwidth timer diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 73f444b8d71d..4902ecfeb290 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1600,6 +1600,31 @@ static void hdd_clear_roam_profile_ie(struct hdd_adapter *adapter) hdd_exit(); } +/** + * hdd_wlan_get_ibss_mac_addr_from_staid() - Get IBSS MAC address + * @adapter: Adapter upon which the IBSS client is active + * @staIdx: Station index of the IBSS peer + * + * Return: a pointer to the MAC address of the IBSS peer if the peer is + * found, otherwise %NULL. + */ +static struct qdf_mac_addr * +hdd_wlan_get_ibss_mac_addr_from_staid(struct hdd_adapter *adapter, + uint8_t staIdx) +{ + uint8_t idx; + 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 != + sta_ctx->conn_info.staId[idx] && + staIdx == sta_ctx->conn_info.staId[idx]) { + return &sta_ctx->conn_info.peerMacAddress[idx]; + } + } + return NULL; +} + /** * hdd_roam_deregister_sta() - deregister station * @adapter: pointer to adapter diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index accbb481c900..fae30973137c 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -3372,31 +3372,6 @@ error: return; } -/** - * hdd_wlan_get_ibss_mac_addr_from_staid() - Get IBSS MAC address - * @adapter: Adapter upon which the IBSS client is active - * @staIdx: Station index of the IBSS peer - * - * Return: a pointer to the MAC address of the IBSS peer if the peer is - * found, otherwise %NULL. - */ -struct qdf_mac_addr * -hdd_wlan_get_ibss_mac_addr_from_staid(struct hdd_adapter *adapter, - uint8_t staIdx) -{ - uint8_t idx; - 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 != - sta_ctx->conn_info.staId[idx] && - staIdx == sta_ctx->conn_info.staId[idx]) { - return &sta_ctx->conn_info.peerMacAddress[idx]; - } - } - return NULL; -} - /** * hdd_wlan_get_ibss_peer_info() - Print IBSS peer information * @adapter: Adapter upon which the IBSS client is active