summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/nl80211.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0c7fa6004ffb..d21b1581a665 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10805,9 +10805,11 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev,
10805 hyst = wdev->cqm_config->rssi_hyst; 10805 hyst = wdev->cqm_config->rssi_hyst;
10806 n = wdev->cqm_config->n_rssi_thresholds; 10806 n = wdev->cqm_config->n_rssi_thresholds;
10807 10807
10808 for (i = 0; i < n; i++) 10808 for (i = 0; i < n; i++) {
10809 i = array_index_nospec(i, n);
10809 if (last < wdev->cqm_config->rssi_thresholds[i]) 10810 if (last < wdev->cqm_config->rssi_thresholds[i])
10810 break; 10811 break;
10812 }
10811 10813
10812 low_index = i - 1; 10814 low_index = i - 1;
10813 if (low_index >= 0) { 10815 if (low_index >= 0) {