aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 725af7a468d2..3c61060a4d2b 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -3,6 +3,7 @@
3 * Copyright 2005-2006, Devicescape Software, Inc. 3 * Copyright 2005-2006, Devicescape Software, Inc.
4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2014 Intel Mobile Communications GmbH
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
@@ -1014,6 +1015,31 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
1014 } 1015 }
1015 elems->pwr_constr_elem = pos; 1016 elems->pwr_constr_elem = pos;
1016 break; 1017 break;
1018 case WLAN_EID_CISCO_VENDOR_SPECIFIC:
1019 /* Lots of different options exist, but we only care
1020 * about the Dynamic Transmit Power Control element.
1021 * First check for the Cisco OUI, then for the DTPC
1022 * tag (0x00).
1023 */
1024 if (elen < 4) {
1025 elem_parse_failed = true;
1026 break;
1027 }
1028
1029 if (pos[0] != 0x00 || pos[1] != 0x40 ||
1030 pos[2] != 0x96 || pos[3] != 0x00)
1031 break;
1032
1033 if (elen != 6) {
1034 elem_parse_failed = true;
1035 break;
1036 }
1037
1038 if (calc_crc)
1039 crc = crc32_be(crc, pos - 2, elen + 2);
1040
1041 elems->cisco_dtpc_elem = pos;
1042 break;
1017 case WLAN_EID_TIMEOUT_INTERVAL: 1043 case WLAN_EID_TIMEOUT_INTERVAL:
1018 if (elen >= sizeof(struct ieee80211_timeout_interval_ie)) 1044 if (elen >= sizeof(struct ieee80211_timeout_interval_ie))
1019 elems->timeout_int = (void *)pos; 1045 elems->timeout_int = (void *)pos;