qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeScanReq

Replace tSirMacAddr with cdf_mac_addr in sSirSmeScanReq.

Change-Id: I805e32462c89d72bd8a038eaef0379f7b58b33c3
CRs-Fixed: 898864
This commit is contained in:
Srinivas Girigowda 2015-09-24 11:43:31 -07:00 • committed by Satish Singh
commit 2c6bf00570
5 changed files with 19 additions and 24 deletions

View file

@ -189,7 +189,7 @@ CDF_INLINE_FN bool cdf_is_macaddr_group(struct cdf_mac_addr *pMacAddr)
* @pMacAddr: Pointer to the cdf MacAddress to check
*
* Return: true if the input MacAddress is a broadcast address
* flase if the input MacAddress is not a broadcast address
* false if the input MacAddress is not a broadcast address
*/
CDF_INLINE_FN bool cdf_is_macaddr_broadcast(struct cdf_mac_addr *pMacAddr)
{

View file

@ -745,9 +745,9 @@ typedef struct sSirSmeScanReq {
uint16_t length;
uint8_t sessionId; /* Session ID */
uint16_t transactionId; /* Transaction ID for cmd */
tSirMacAddr bssId;
struct cdf_mac_addr bssId;
tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
tSirMacAddr selfMacAddr; /* Added For BT-AMP Support */
struct cdf_mac_addr selfMacAddr; /* Added For BT-AMP Support */
tSirBssType bssType;
uint8_t dot11mode;
tSirScanType scanType;

View file

@ -1279,8 +1279,7 @@ static CDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
msg.bodyptr = pScanOffloadReq;
msg.bodyval = 0;
cdf_mem_copy((uint8_t *) pScanOffloadReq->bssId.bytes,
(uint8_t *) pScanReq->bssId, CDF_MAC_ADDR_SIZE);
cdf_copy_macaddr(&pScanOffloadReq->bssId, &pScanReq->bssId);
if (pScanReq->numSsid > SIR_SCAN_MAX_NUM_SSID) {
lim_log(pMac, LOGE,
@ -1299,8 +1298,7 @@ static CDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
}
pScanOffloadReq->hiddenSsid = pScanReq->hiddenSsid;
cdf_mem_copy((uint8_t *) pScanOffloadReq->selfMacAddr.bytes,
(uint8_t *) pScanReq->selfMacAddr, CDF_MAC_ADDR_SIZE);
cdf_copy_macaddr(&pScanOffloadReq->selfMacAddr, &pScanReq->selfMacAddr);
pScanOffloadReq->bssType = pScanReq->bssType;
pScanOffloadReq->dot11mode = pScanReq->dot11mode;
pScanOffloadReq->scanType = pScanReq->scanType;
@ -1424,7 +1422,8 @@ static void __lim_process_sme_scan_req(tpAniSirGlobal mac_ctx,
* copy the Self MAC address from SmeReq to the globalplace,
* used for sending probe req
*/
sir_copy_mac_addr(mac_ctx->lim.gSelfMacAddr, scan_req->selfMacAddr);
sir_copy_mac_addr(mac_ctx->lim.gSelfMacAddr,
scan_req->selfMacAddr.bytes);
valid_req = lim_is_sme_scan_req_valid(mac_ctx, scan_req);
if (!valid_req || mac_ctx->lim.scan_disabled) {

View file

@ -698,7 +698,8 @@ uint8_t lim_is_sme_scan_req_valid(tpAniSirGlobal pMac, tpSirSmeScanReq pScanReq)
lim_log(pMac, LOGE, FL("Invalid BSS Type"));
valid = false;
}
if (lim_is_group_addr(pScanReq->bssId) && !lim_is_addr_bc(pScanReq->bssId)) {
if (cdf_is_macaddr_group(&pScanReq->bssId) &&
!cdf_is_macaddr_broadcast(&pScanReq->bssId)) {
valid = false;
lim_log(pMac, LOGE,
FL("BSSID is group addr and is not Broadcast Addr"));

View file

@ -4856,8 +4856,7 @@ CDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
uint32_t minChnTime; /* in units of milliseconds */
uint32_t maxChnTime; /* in units of milliseconds */
uint32_t i;
uint8_t selfMacAddr[CDF_MAC_ADDR_SIZE];
uint8_t *pSelfMac = NULL;
struct cdf_mac_addr selfmac;
msgLen = (uint16_t) (sizeof(tSirSmeScanReq) -
sizeof(pMsg->channelList.channelNumber) +
@ -4904,8 +4903,8 @@ CDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
pMsg->bssType = csr_translate_bsstype_to_mac_type(pScanReq->BSSType);
if (CSR_IS_SESSION_VALID(pMac, sessionId)) {
pSelfMac = (uint8_t *)
&pMac->roam.roamSession[sessionId].selfMacAddr;
cdf_copy_macaddr(&selfmac,
&pMac->roam.roamSession[sessionId].selfMacAddr);
} else {
/*
* Since we don't have session for the scanning, we find a valid
@ -4913,16 +4912,15 @@ CDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
*/
for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
if (CSR_IS_SESSION_VALID(pMac, i)) {
pSelfMac = (uint8_t *)
&pMac->roam.roamSession[i].selfMacAddr;
cdf_copy_macaddr(&selfmac,
&pMac->roam.roamSession[i].selfMacAddr);
break;
}
}
if (CSR_ROAM_SESSION_MAX == i) {
uint32_t len = CDF_MAC_ADDR_SIZE;
pSelfMac = selfMacAddr;
status = wlan_cfg_get_str(pMac, WNI_CFG_STA_ID,
pSelfMac, &len);
selfmac.bytes, &len);
if (!CDF_IS_STATUS_SUCCESS(status)
|| (len < CDF_MAC_ADDR_SIZE)) {
sms_log(pMac, LOGE,
@ -4934,16 +4932,13 @@ CDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
}
}
}
cdf_mem_copy((uint8_t *) pMsg->selfMacAddr,
pSelfMac, sizeof(tSirMacAddr));
cdf_copy_macaddr(&pMsg->selfMacAddr, &selfmac);
/* sir_copy_mac_addr */
cdf_mem_copy(pMsg->bssId, &pScanReq->bssid, sizeof(tSirMacAddr));
cdf_copy_macaddr(&pMsg->bssId, &pScanReq->bssid);
if (cdf_is_macaddr_zero(&pScanReq->bssid))
cdf_mem_set(pMsg->bssId, sizeof(tSirMacAddr), 0xff);
cdf_set_macaddr_broadcast(&pMsg->bssId);
else
cdf_mem_copy(pMsg->bssId, pScanReq->bssid.bytes,
CDF_MAC_ADDR_SIZE);
cdf_copy_macaddr(&pMsg->bssId, &pScanReq->bssid);
minChnTime = pScanReq->minChnTime;
maxChnTime = pScanReq->maxChnTime;