diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-08-31 11:10:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-10 08:54:21 +0200 |
commit | 4fa55f6d29fd1bc3fa366751cc7ac90975b07ca2 (patch) | |
tree | 968da0c86e1cfbcefc4a2503aa0655519fd98cac /net/mac80211 | |
parent | 43a01409ef4c401c955d4a3f55523a6a77fdee5d (diff) |
cfg80211: fix a type issue in ieee80211_chandef_to_operating_class()
[ Upstream commit 8442938c3a2177ba16043b3a935f2c78266ad399 ]
The "chandef->center_freq1" variable is a u32 but "freq" is a u16 so we
are truncating away the high bits. I noticed this bug because in commit
9cf0a0b4b64a ("cfg80211: Add support for 60GHz band channels 5 and 6")
we made "freq <= 56160 + 2160 * 6" a valid requency when before it was
only "freq <= 56160 + 2160 * 4" that was valid. It introduces a static
checker warning:
net/wireless/util.c:1571 ieee80211_chandef_to_operating_class()
warn: always true condition '(freq <= 56160 + 2160 * 6) => (0-u16max <= 69120)'
But really we probably shouldn't have been truncating the high bits
away to begin with.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
0 files changed, 0 insertions, 0 deletions