]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: use BIT_ULL for NL80211_STA_INFO_* attribute types
authorOmer Efrat <omer.efrat@tandemg.com>
Sun, 17 Jun 2018 10:06:14 +0000 (13:06 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 29 Jun 2018 07:52:23 +0000 (09:52 +0200)
commit871909cc4e2147283259b6d2c3a2bfe315a24047
tree54ea0597e0fa0384a1ed4abc539468e025f371a7
parent54e0ea5ddd73216fda35b4e64d94cc3dfc36ca81
cfg80211: 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. 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: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c
net/wireless/wext-compat.c