From cc571d4290e42a3f689fe33e1c9fcaf02ba1eb26 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Mon, 1 Apr 2019 11:49:21 +0800 Subject: [PATCH] qcacld-3.0: Add missed checking in a loop function The condition check of for loop in hdd_get_max_rate_legacy() was not propagated properly, it was a dead loop. Add missed i checking. Change-Id: I7daf623e3bb70f6a691fd62cfd4e737f7e54a791 CRs-Fixed: 2425605 --- core/hdd/src/wlan_hdd_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 25adba04e897..2b38b24fe34a 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -3156,7 +3156,7 @@ static uint32_t hdd_get_max_rate_legacy(struct hdd_station_info *stainfo, maxidx < stainfo->max_ext_idx) maxidx = stainfo->max_ext_idx; - for (i = 0; QDF_ARRAY_SIZE(supported_data_rate); i++) { + for (i = 0; i < QDF_ARRAY_SIZE(supported_data_rate); i++) { if (supported_data_rate[i].beacon_rate_index == maxidx) maxrate = supported_data_rate[i].supported_rate[rssidx];