diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-03 21:00:17 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-03 21:00:17 -0700 |
commit | 6f41617bf23a17d9cb7cc6ca8161534f05f80293 (patch) | |
tree | 2844d8d197a61b0603e31f09613e3272635dd1cc /net/wireless/nl80211.c | |
parent | 7bdaae270cb55d40b7fb73744c7e00a7108ee5b6 (diff) | |
parent | cec4de302c5ff2c5eb3bfcb0c4845a095f5149b9 (diff) | |
download | linux-6f41617bf23a17d9cb7cc6ca8161534f05f80293.tar.gz linux-6f41617bf23a17d9cb7cc6ca8161534f05f80293.tar.bz2 linux-6f41617bf23a17d9cb7cc6ca8161534f05f80293.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor conflict in net/core/rtnetlink.c, David Ahern's bug fix in 'net'
overlapped the renaming of a netlink attribute in net-next.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index d5f9b5235cdd..a02bbdd1b192 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3756,6 +3756,7 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband, return false; /* check availability */ + ridx = array_index_nospec(ridx, IEEE80211_HT_MCS_MASK_LEN); if (sband->ht_cap.mcs.rx_mask[ridx] & rbit) mcs[ridx] |= rbit; else @@ -10234,7 +10235,7 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev = dev->ieee80211_ptr; s32 last, low, high; u32 hyst; - int i, n; + int i, n, low_index; int err; /* RSSI reporting disabled? */ @@ -10271,10 +10272,19 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev, if (last < wdev->cqm_config->rssi_thresholds[i]) break; - low = i > 0 ? - (wdev->cqm_config->rssi_thresholds[i - 1] - hyst) : S32_MIN; - high = i < n ? - (wdev->cqm_config->rssi_thresholds[i] + hyst - 1) : S32_MAX; + low_index = i - 1; + if (low_index >= 0) { + low_index = array_index_nospec(low_index, n); + low = wdev->cqm_config->rssi_thresholds[low_index] - hyst; + } else { + low = S32_MIN; + } + if (i < n) { + i = array_index_nospec(i, n); + high = wdev->cqm_config->rssi_thresholds[i] + hyst - 1; + } else { + high = S32_MAX; + } return rdev_set_cqm_rssi_range_config(rdev, dev, low, high); } |