wlan: Cap cache size properly
Cap cache size properly. We need to insure that no accesses exceed the
cache size.
Change-Id: I91b118316ab46e8862449da8bad6dd8063dfdc93
CR-Fixed: 411177
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 0e13df2..44cfa83 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -5777,6 +5777,9 @@
}
}
+ /* Check we compared all entries,if then take the first slot now */
+ if(j == MAX_PMKSAIDS_IN_CACHE) i=0;
+
if (!BSSIDMatched)
{
// Now, we DON'T have a BSSID match, so take a new entry in the cache.