Browse Source

qcacld-3.0: Check for valid vdev ID in SWBA event handler

After deriving the vdev_id from the vdev map in
wma_beacon_swba_handler check for the validity
of the vdev_id

Change-Id: Ifc4577d8a00f447e2bcfa4e01fce5ac2dbe96a4d
CRs-Fixed: 2120751
Varun Reddy Yeturu 7 years ago
parent
commit
4353e4f156
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/wma/src/wma_mgmt.c

+ 3 - 1
core/wma/src/wma_mgmt.c

@@ -272,7 +272,9 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len)
 		return -EINVAL;
 	}
 
-	for (; vdev_map; vdev_id++, vdev_map >>= 1) {
+	WMA_LOGD("vdev_map = %d", vdev_map);
+	for (; vdev_map && vdev_id < wma->max_bssid;
+			vdev_id++, vdev_map >>= 1) {
 		if (!(vdev_map & 0x1))
 			continue;
 		if (!cdp_cfg_is_high_latency(soc,