|
@@ -10270,9 +10270,11 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev,
|
|
|
hyst = wdev->cqm_config->rssi_hyst;
|
|
hyst = wdev->cqm_config->rssi_hyst;
|
|
|
n = wdev->cqm_config->n_rssi_thresholds;
|
|
n = wdev->cqm_config->n_rssi_thresholds;
|
|
|
|
|
|
|
|
- for (i = 0; i < n; i++)
|
|
|
|
|
|
|
+ for (i = 0; i < n; i++) {
|
|
|
|
|
+ i = array_index_nospec(i, n);
|
|
|
if (last < wdev->cqm_config->rssi_thresholds[i])
|
|
if (last < wdev->cqm_config->rssi_thresholds[i])
|
|
|
break;
|
|
break;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
low_index = i - 1;
|
|
low_index = i - 1;
|
|
|
if (low_index >= 0) {
|
|
if (low_index >= 0) {
|