Explorar o código

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
Will Huang %!s(int64=6) %!d(string=hai) anos
pai
achega
cc571d4290
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/hdd/src/wlan_hdd_stats.c

+ 1 - 1
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];