From a6d668dc91f9326f3e618f57012c0834c7341fbc Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Thu, 19 Nov 2015 14:31:14 -0800 Subject: [PATCH] qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirLinkSpeedInfo Replace tSirMacAddr with cdf_mac_addr in sSirLinkSpeedInfo Change-Id: Ieaac1d3bb7f632eeaa848e19dadb4f3013a272e4 CRs-Fixed: 898864 --- core/hdd/inc/wlan_hdd_wext.h | 2 +- core/hdd/src/wlan_hdd_hostapd.c | 8 ++++---- core/hdd/src/wlan_hdd_wext.c | 10 ++++------ core/mac/inc/sir_api.h | 2 +- core/wma/src/wma_features.c | 4 ++-- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_wext.h b/core/hdd/inc/wlan_hdd_wext.h index 7bb8606eeac1..0636c3262fe4 100644 --- a/core/hdd/inc/wlan_hdd_wext.h +++ b/core/hdd/inc/wlan_hdd_wext.h @@ -345,7 +345,7 @@ extern int hdd_priv_get_data(struct iw_point *p_priv_data, extern void *mem_alloc_copy_from_user_helper(const void *wrqu_data, size_t len); extern CDF_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter, - tSirMacAddr macAddress); + struct cdf_mac_addr mac_address); void hdd_clear_roam_profile_ie(hdd_adapter_t *pAdapter); uint8_t *wlan_hdd_get_vendor_oui_ie_ptr(uint8_t *oui, uint8_t oui_size, diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index fadaeddce7f1..357c6be68f7e 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -5239,7 +5239,7 @@ int __iw_get_softap_linkspeed(struct net_device *dev, char *pLinkSpeed = (char *)extra; uint32_t link_speed = 0; int len = sizeof(uint32_t) + 1; - tSirMacAddr macAddress; + struct cdf_mac_addr macAddress; char pmacAddress[MAC_ADDRESS_STR_LEN + 1]; CDF_STATUS status = CDF_STATUS_E_FAILURE; int rc, valid, i; @@ -5261,7 +5261,7 @@ int __iw_get_softap_linkspeed(struct net_device *dev, } pmacAddress[MAC_ADDRESS_STR_LEN] = '\0'; - if (!mac_pton(pmacAddress, macAddress)) { + if (!mac_pton(pmacAddress, macAddress.bytes)) { hddLog(LOGE, FL("String to Hex conversion Failed")); return -EINVAL; } @@ -5275,8 +5275,8 @@ int __iw_get_softap_linkspeed(struct net_device *dev, (!cdf_is_macaddr_broadcast (&pHostapdAdapter->aStaInfo[i].macAddrSTA))) { cdf_copy_macaddr( - (struct cdf_mac_addr *) macAddress, - &pHostapdAdapter->aStaInfo[i]. + &macAddress, + &pHostapdAdapter->aStaInfo[i]. macAddrSTA); status = CDF_STATUS_SUCCESS; break; diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 2448ddf5605a..e1983bd8a1ff 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -1336,7 +1336,7 @@ hdd_get_link_speed_cb(tSirLinkSpeedInfo *pLinkSpeed, void *pContext) * otherwise a CDF_STATUS_E_* error. */ CDF_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter, - tSirMacAddr macAddress) { + struct cdf_mac_addr macAddress) { CDF_STATUS status; unsigned long rc; struct linkspeedContext context; @@ -1356,8 +1356,7 @@ CDF_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter, context.pAdapter = pAdapter; context.magic = LINK_CONTEXT_MAGIC; - cdf_mem_copy(linkspeed_req->peer_macaddr, macAddress, - sizeof(tSirMacAddr)); + cdf_copy_macaddr(&linkspeed_req->peer_macaddr, &macAddress); status = sme_get_link_speed(WLAN_HDD_GET_HAL_CTX(pAdapter), linkspeed_req, &context, hdd_get_link_speed_cb); @@ -1426,10 +1425,9 @@ int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed) *link_speed = 0; } else { CDF_STATUS status; - tSirMacAddr bssid; + struct cdf_mac_addr bssid; - cdf_mem_copy(bssid, hdd_stactx->conn_info.bssId.bytes, - CDF_MAC_ADDR_SIZE); + cdf_copy_macaddr(&bssid, &hdd_stactx->conn_info.bssId); status = wlan_hdd_get_linkspeed_for_peermac(sta_adapter, bssid); if (!CDF_IS_STATUS_SUCCESS(status)) { diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 5278c2b76e40..f4a48b6320d7 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3670,7 +3670,7 @@ typedef struct sSirChAvoidUpdateReq { typedef struct sSirLinkSpeedInfo { /* MAC Address for the peer */ - tSirMacAddr peer_macaddr; + struct cdf_mac_addr peer_macaddr; uint32_t estLinkSpeed; /* Linkspeed from firmware */ } tSirLinkSpeedInfo, *tpSirLinkSpeedInfo; diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 9c8e23917232..32b3bc4f356e 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -959,12 +959,12 @@ CDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed) (wmi_peer_get_estimated_linkspeed_cmd_fixed_param)); /* Copy the peer macaddress to the wma buffer */ - WMI_CHAR_ARRAY_TO_MAC_ADDR(pLinkSpeed->peer_macaddr, + WMI_CHAR_ARRAY_TO_MAC_ADDR(pLinkSpeed->peer_macaddr.bytes, &cmd->peer_macaddr); WMA_LOGD("%s: pLinkSpeed->peerMacAddr: %pM, " "peer_macaddr.mac_addr31to0: 0x%x, peer_macaddr.mac_addr47to32: 0x%x", - __func__, pLinkSpeed->peer_macaddr, + __func__, pLinkSpeed->peer_macaddr.bytes, cmd->peer_macaddr.mac_addr31to0, cmd->peer_macaddr.mac_addr47to32);