aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng/cfg80211.c
diff options
context:
space:
mode:
authorOmer Efrat <omer.efrat@tandemg.com>2018-06-18 17:18:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-28 22:08:56 +0900
commit5c6a5eb3aa86ecde00fe45410fc384363ee9bc92 (patch)
treeefc7bdad1997ab245bf0e98f74d55ad6015bfee1 /drivers/staging/wlan-ng/cfg80211.c
parentstaging: most: fix sparse warning Using plain integer as NULL pointer (diff)
downloadlinux-dev-5c6a5eb3aa86ecde00fe45410fc384363ee9bc92.tar.xz
linux-dev-5c6a5eb3aa86ecde00fe45410fc384363ee9bc92.zip
staging: use BIT_ULL for NL80211_STA_INFO_* attribute types
The BIT macro uses unsigned long which some architectures handle as 32 bit and therefore might cause macro's shift to overflow when used on a value equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and afterwards). Since 'filled' member in station_info changed to u64, BIT_ULL macro should be used with all NL80211_STA_INFO_* attribute types instead of BIT to prevent future possible bugs when one will use BIT macro for higher attributes by mistake. This commit cleans up all usages of BIT macro with the above field in cfg80211 by changing it to BIT_ULL instead. Signed-off-by: Omer Efrat <omer.efrat@tandemg.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng/cfg80211.c')
-rw-r--r--drivers/staging/wlan-ng/cfg80211.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 42912257e2b9..07c52e396387 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -282,9 +282,9 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
if (result == 0) {
sinfo->txrate.legacy = quality.txrate.data;
- sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
sinfo->signal = quality.level.data;
- sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
}
return result;