Deleted Added
full compact
ieee802_11_common.c (189261) ieee802_11_common.c (209158)
1/*
2 * IEEE 802.11 Common routines
3 * Copyright (c) 2002-2008, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 35 unchanged lines hidden (view full) ---

44 * subtyped */
45 switch (pos[3]) {
46 case 1:
47 /* Microsoft OUI (00:50:F2) with OUI Type 1:
48 * real WPA information element */
49 elems->wpa_ie = pos;
50 elems->wpa_ie_len = elen;
51 break;
1/*
2 * IEEE 802.11 Common routines
3 * Copyright (c) 2002-2008, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 35 unchanged lines hidden (view full) ---

44 * subtyped */
45 switch (pos[3]) {
46 case 1:
47 /* Microsoft OUI (00:50:F2) with OUI Type 1:
48 * real WPA information element */
49 elems->wpa_ie = pos;
50 elems->wpa_ie_len = elen;
51 break;
52 case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
52 case WMM_OUI_TYPE:
53 /* WMM information element */
53 if (elen < 5) {
54 if (elen < 5) {
54 wpa_printf(MSG_MSGDUMP, "short WME "
55 wpa_printf(MSG_MSGDUMP, "short WMM "
55 "information element ignored "
56 "(len=%lu)",
57 (unsigned long) elen);
58 return -1;
59 }
60 switch (pos[4]) {
56 "information element ignored "
57 "(len=%lu)",
58 (unsigned long) elen);
59 return -1;
60 }
61 switch (pos[4]) {
61 case WME_OUI_SUBTYPE_INFORMATION_ELEMENT:
62 case WME_OUI_SUBTYPE_PARAMETER_ELEMENT:
63 elems->wme = pos;
64 elems->wme_len = elen;
62 case WMM_OUI_SUBTYPE_INFORMATION_ELEMENT:
63 case WMM_OUI_SUBTYPE_PARAMETER_ELEMENT:
64 /*
65 * Share same pointer since only one of these
66 * is used and they start with same data.
67 * Length field can be used to distinguish the
68 * IEs.
69 */
70 elems->wmm = pos;
71 elems->wmm_len = elen;
65 break;
72 break;
66 case WME_OUI_SUBTYPE_TSPEC_ELEMENT:
67 elems->wme_tspec = pos;
68 elems->wme_tspec_len = elen;
73 case WMM_OUI_SUBTYPE_TSPEC_ELEMENT:
74 elems->wmm_tspec = pos;
75 elems->wmm_tspec_len = elen;
69 break;
70 default:
76 break;
77 default:
71 wpa_printf(MSG_MSGDUMP, "unknown WME "
78 wpa_printf(MSG_MSGDUMP, "unknown WMM "
72 "information element ignored "
73 "(subtype=%d len=%lu)",
74 pos[4], (unsigned long) elen);
75 return -1;
76 }
77 break;
78 case 4:
79 /* Wi-Fi Protected Setup (WPS) IE */

--- 173 unchanged lines hidden ---
79 "information element ignored "
80 "(subtype=%d len=%lu)",
81 pos[4], (unsigned long) elen);
82 return -1;
83 }
84 break;
85 case 4:
86 /* Wi-Fi Protected Setup (WPS) IE */

--- 173 unchanged lines hidden ---