summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2009-12-04 17:41:34 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-18 14:04:18 -0800
commitfb0f7048cfa072125c98dc11884a96d1e03c0f9a (patch)
tree3426f322684b98138b503646ef5ec48b9f7d3181 /net
parenta4b8b8eb2533da448fcaaef2467a1cc4489057b9 (diff)
mac80211: Fix bug in computing crc over dynamic IEs in beacon
commit 1814077fd12a9cdf478c10076e9c42094e9d9250 upstream. On a 32-bit machine, BIT() macro does not give the required bit value if the bit is mroe than 31. In ieee802_11_parse_elems_crc(), BIT() is suppossed to get the bit value more than 31 (42 (id of ERP_INFO_IE), 37 (CHANNEL_SWITCH_IE), (42), 32 (POWER_CONSTRAINT_IE), 45 (HT_CAP_IE), 61 (HT_INFO_IE)). As we do not get the required bit value for the above IEs, crc over these IEs are never calculated, so any dynamic change in these IEs after the association is not really handled on 32-bit platforms. This patch fixes this issue. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index e6c08da8da26..cbc5d2057dbf 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -579,7 +579,7 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
if (elen > left)
break;
- if (calc_crc && id < 64 && (filter & BIT(id)))
+ if (calc_crc && id < 64 && (filter & (1ULL << id)))
crc = crc32_be(crc, pos - 2, elen + 2);
switch (id) {