qcacld-3.0: Relocate hdd_wlan_get_ibss_mac_addr_from_staid()

Function hdd_wlan_get_ibss_mac_addr_from_staid() is currently located
in wlan_hdd_wext.c, but this function is independent of wireless
extensions, so relocate it as part of the plan to omit wlan_hdd_wext.c
from the build when wireless extensions is not enabled.

Change-Id: If005f7c2295a519b891d3718799f6f826d59e97f
CRs-Fixed: 2229490
This commit is contained in:
Jeff Johnson 2018-04-23 08:06:54 -07:00 • committed by nshrivas
commit d81ab0571c
3 changed files with 25 additions and 28 deletions

View file

@ -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

View file

@ -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

View file

@ -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