diff options
author | Omer Efrat <omer.efrat@tandemg.com> | 2018-06-17 13:07:13 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-06-27 19:07:39 +0300 |
commit | 22d0d2fafca93ba1d92a2fbd4a60463c919a12ad (patch) | |
tree | 09af6c9521af513cff70e0a406a442f671bd19c9 /drivers/net/wireless/ti | |
parent | ae636fb1554833ee5133ca47bf4b2791b6739c52 (diff) | |
download | linux-22d0d2fafca93ba1d92a2fbd4a60463c919a12ad.tar.bz2 |
wireless-drivers: 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 wireless-drivers by changing it to BIT_ULL instead. In addition, there are
some places which don't use BIT nor BIT_ULL macros so align those as well.
Signed-off-by: Omer Efrat <omer.efrat@tandemg.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 09c40e7f7701..37f785f601c1 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -5821,7 +5821,7 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw, if (ret < 0) goto out_sleep; - sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL); + sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL); sinfo->signal = rssi_dbm; out_sleep: |