diff options
-rw-r--r-- | net/mac80211/rate.c | 2 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 3fef26d8898a..22fc28e9026e 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -324,7 +324,7 @@ static bool rate_idx_match_mcs_mask(struct ieee80211_tx_rate *rate, | |||
324 | rbit = rate->idx % 8; | 324 | rbit = rate->idx % 8; |
325 | 325 | ||
326 | /* sanity check */ | 326 | /* sanity check */ |
327 | if (ridx < 0 || ridx > IEEE80211_HT_MCS_MASK_LEN) | 327 | if (ridx < 0 || ridx >= IEEE80211_HT_MCS_MASK_LEN) |
328 | return false; | 328 | return false; |
329 | 329 | ||
330 | /* See whether the selected rate or anything below it is allowed. */ | 330 | /* See whether the selected rate or anything below it is allowed. */ |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f1681e2c5949..fe2747653564 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -5410,7 +5410,7 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband, | |||
5410 | rbit = BIT(rates[i] % 8); | 5410 | rbit = BIT(rates[i] % 8); |
5411 | 5411 | ||
5412 | /* check validity */ | 5412 | /* check validity */ |
5413 | if ((ridx < 0) || (ridx > IEEE80211_HT_MCS_MASK_LEN)) | 5413 | if ((ridx < 0) || (ridx >= IEEE80211_HT_MCS_MASK_LEN)) |
5414 | return false; | 5414 | return false; |
5415 | 5415 | ||
5416 | /* check availability */ | 5416 | /* check availability */ |