wlan: wda: Add host scan mac-spoofing support
Extend the functionality of spoofing of mac addr
in host initiated scans. Now both FW initiated
scans and host initiated scans will be spoofed.
- Send SPOOF REQ with spoof mac addr.
- Verify response status and update LIM about the
status of request sent to FW.
Change-Id: I5d687145d99dc0ee8256f09681e2d2245bd91d22
CRs-Fixed: 737889
diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c
index 2e0c168..4eeb04a 100644
--- a/CORE/WDA/src/wlan_qct_wda.c
+++ b/CORE/WDA/src/wlan_qct_wda.c
@@ -5002,30 +5002,31 @@
{
tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
tWDA_CbContext *pWDA;
- tSirSpoofMacAddrReq *spoofMacAddrReq;
+
VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
"<------ %s " ,__func__);
+
if(NULL == pWdaParams)
{
VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
"%s: pWdaParams received NULL", __func__);
- VOS_ASSERT(0) ;
+ VOS_ASSERT(0);
return ;
}
-
pWDA = (tWDA_CbContext *)pWdaParams->pWdaContext;
- spoofMacAddrReq = (tSirSpoofMacAddrReq *)pWdaParams->wdaMsgParam ;
- if(wdiRsp->wdiStatus != WDI_STATUS_SUCCESS )
- {
+ if (wdiRsp->wdiStatus != WDI_STATUS_SUCCESS) {
VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
- "%s: Unable to set Random Mac Addr in FW", __func__);
+ "%s:Spoofing with rsp status %d", __func__, wdiRsp->wdiStatus);
}
+ WDA_SendMsg(pWDA, WDA_SPOOF_MAC_ADDR_RSP, NULL,
+ CONVERT_WDI2SIR_STATUS(wdiRsp->wdiStatus));
- vos_mem_free(spoofMacAddrReq);
vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
+ vos_mem_free(pWdaParams->wdaMsgParam);
vos_mem_free(pWdaParams);
- return ;
+
+ return;
}
/*
@@ -12459,6 +12460,7 @@
if(NULL == pWdaParams) {
VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
"%s: VOS MEM Alloc Failure", __func__);
+ vos_mem_free(WDI_SpoofMacAddrInfoParams);
VOS_ASSERT(0);
return VOS_STATUS_E_NOMEM;
}
@@ -12468,13 +12470,17 @@
pWdaParams->pWdaContext = pWDA;
/* Store Upper layer req pointer, as this will be used for response */
- pWdaParams->wdaMsgParam = (void *)pReq ;
+ pWdaParams->wdaMsgParam = (void *)pReq;
+
+ VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, WDA_MAC_ADDRESS_STR,
+ WDA_MAC_ADDR_ARRAY(WDI_SpoofMacAddrInfoParams->macAddr));
+
/* store Params pass it to WDI */
pWdaParams->wdaWdiApiMsgParam = (void *)WDI_SpoofMacAddrInfoParams ;
wdiStatus = WDI_SetSpoofMacAddrReq(WDI_SpoofMacAddrInfoParams,
- (WDI_SetSpoofMacAddrRspCb) WDA_SpoofMacAddrRspCallback,
- pWdaParams );
+ (WDI_SetSpoofMacAddrRspCb) WDA_SpoofMacAddrRspCallback,
+ pWdaParams );
if(IS_WDI_STATUS_FAILURE(wdiStatus))
{