prima: Error handling for WLANTL_updateSpoofMacAddr
Variables spoofMacAddr, selfMacAddr passed to WLANTL_updateSpoofMacAddr
are static arrays. Removed redundant check as those variables can never
be NULL. Also, if status returned by WLANTL_updateSpoofMacAddr is not
success, return with appropriate status and free the memory.
Change-Id: I2c34c96d85de13ff86ff5af635c024e1bfa43f35
CRs-Fixed: 813774
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 413a974..8977e8d 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -10729,8 +10729,15 @@
/* Updating SelfSta Mac Addr in TL which will be used to get staidx
* to fill TxBds for probe request during current scan
*/
- WLANTL_updateSpoofMacAddr(pHddCtx->pvosContext,
+ status = WLANTL_updateSpoofMacAddr(pHddCtx->pvosContext,
&pHddCtx->spoofMacAddr.randomMacAddr, &pAdapter->macAddressCurrent);
+
+ if(status != VOS_STATUS_SUCCESS)
+ {
+ hdd_allow_suspend();
+ status = -EFAULT;
+ goto free_mem;
+ }
}
status = sme_ScanRequest( WLAN_HDD_GET_HAL_CTX(pAdapter),
diff --git a/CORE/TL/src/wlan_qct_tl.c b/CORE/TL/src/wlan_qct_tl.c
index e6847b8..3366c58 100644
--- a/CORE/TL/src/wlan_qct_tl.c
+++ b/CORE/TL/src/wlan_qct_tl.c
@@ -3165,16 +3165,6 @@
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/*------------------------------------------------------------------------
- Sanity check
- ------------------------------------------------------------------------*/
- if ( NULL == spoofMacAddr || NULL == selfMacAddr)
- {
- VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,
- "WLAN TL:Invalid parameter sent on WLANTL_updateSpoofMacAddr");
- return VOS_STATUS_E_INVAL;
- }
-
- /*------------------------------------------------------------------------
Extract TL control block
------------------------------------------------------------------------*/
pTLCb = VOS_GET_TL_CB(pvosGCtx);