diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2019-05-29 08:25:29 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-06-14 09:46:33 -0400 |
commit | ebb3ca3b4477bbc118976c77fe1913507df718ec (patch) | |
tree | 152848b5c9fa27179b1a18cbe984440db35caf7c | |
parent | 563572340173865a9a356e6bb02579e6998a876d (diff) |
cfg80211: use BIT_ULL in cfg80211_parse_mbssid_data()
The seen_indices variable is u64 and in other parts of the code we
assume mbssid_index_ie[2] can be up to 45, so we should use the 64-bit
versions of BIT, namely, BIT_ULL().
Reported-by: Dan Carpented <dan.carpenter@oracle.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/scan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index c04f5451f89b..aa571d727903 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -1601,12 +1601,12 @@ static void cfg80211_parse_mbssid_data(struct wiphy *wiphy, | |||
1601 | continue; | 1601 | continue; |
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | if (seen_indices & BIT(mbssid_index_ie[2])) | 1604 | if (seen_indices & BIT_ULL(mbssid_index_ie[2])) |
1605 | /* We don't support legacy split of a profile */ | 1605 | /* We don't support legacy split of a profile */ |
1606 | net_dbg_ratelimited("Partial info for BSSID index %d\n", | 1606 | net_dbg_ratelimited("Partial info for BSSID index %d\n", |
1607 | mbssid_index_ie[2]); | 1607 | mbssid_index_ie[2]); |
1608 | 1608 | ||
1609 | seen_indices |= BIT(mbssid_index_ie[2]); | 1609 | seen_indices |= BIT_ULL(mbssid_index_ie[2]); |
1610 | 1610 | ||
1611 | non_tx_data->bssid_index = mbssid_index_ie[2]; | 1611 | non_tx_data->bssid_index = mbssid_index_ie[2]; |
1612 | non_tx_data->max_bssid_indicator = elem->data[0]; | 1612 | non_tx_data->max_bssid_indicator = elem->data[0]; |