wlan : Division by zero in kernel
2nd argument of function "csrCalculateMCCBeaconInterval"
should be non-zero value. If its zero then assign default
beacon interval 100.
CRs-fixed: 601214
Change-Id: I9307c8cffde042319ec4dd5edb5edd2c2b9dd4a9
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.c b/CORE/MAC/src/pe/lim/limScanResultUtils.c
index f5f7963..63a4f4f 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -165,7 +165,13 @@
pBssDescr->beaconInterval = pBPR->beaconInterval;
pBssDescr->capabilityInfo = limGetU16((tANI_U8 *) &pBPR->capabilityInfo);
-
+ if(!pBssDescr->beaconInterval )
+ {
+ limLog(pMac, LOGW,
+ FL("Beacon Interval is ZERO, making it to default 100 "
+ MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->bssId));
+ pBssDescr->beaconInterval= 100;
+ }
/*
* There is a narrow window after Channel Switch msg is sent to HAL and before the AGC is shut
* down and beacons/Probe Rsps can trickle in and we may report the incorrect channel in 5Ghz