wlan: Measurement Duration Validation
A value of Zero for measurement duration is acceptable when scan
mode is table type(2).
Change-Id: Iec77be6d5c4fa47b2caa40324ac8ef2d2dd18ccc
CRs-Fixed: 584869
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 83b9240..21151e6 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -3791,7 +3791,7 @@
break;
case 2: /* Scan mode */
- if ((tempInt < 0) || (tempInt > 2))
+ if ((tempInt < eSIR_PASSIVE_SCAN) || (tempInt > eSIR_BEACON_TABLE))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"Invalid Scan Mode(%d) Expected{0|1|2}", tempInt);
@@ -3801,7 +3801,8 @@
break;
case 3: /* Measurement duration */
- if (tempInt <= 0)
+ if (((tempInt <= 0) && (pCcxBcnReq->bcnReq[j].scanMode != eSIR_BEACON_TABLE)) ||
+ ((tempInt < 0) && (pCcxBcnReq->bcnReq[j].scanMode == eSIR_BEACON_TABLE)))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"Invalid Measurement Duration(%d)", tempInt);