Made 802.11 management frame IE parser aware of vendor HT Capab IE
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 4 Dec 2008 11:42:33 +0000 (13:42 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 4 Dec 2008 11:42:33 +0000 (13:42 +0200)
This IE is not (at least yet) actually used for anything, but parsing it
cleans up verbose debug log a bit since thie previously unknown, but
commonly used, vendor IE was being reported as unknown.

src/common/ieee802_11_common.c
src/common/ieee802_11_common.h
src/common/ieee802_11_defs.h

index 8d3fe1a..c9f4702 100644 (file)
@@ -89,6 +89,21 @@ static int ieee802_11_parse_vendor_specific(u8 *pos, size_t elen,
                }
                break;
 
+       case OUI_BROADCOM:
+               switch (pos[3]) {
+               case VENDOR_HT_CAPAB_OUI_TYPE:
+                       elems->vendor_ht_cap = pos;
+                       elems->vendor_ht_cap_len = elen;
+                       break;
+               default:
+                       wpa_printf(MSG_MSGDUMP, "Unknown Broadcom "
+                                  "information element ignored "
+                                  "(type=%d len=%lu)\n",
+                                  pos[3], (unsigned long) elen);
+                       return -1;
+               }
+               break;
+
        default:
                wpa_printf(MSG_MSGDUMP, "unknown vendor specific information "
                           "element ignored (vendor OUI %02x:%02x:%02x "
index 4f3f4be..566da96 100644 (file)
@@ -61,6 +61,8 @@ struct ieee802_11_elems {
        u8 ht_operation_len;
        u8 *assoc_comeback;
        u8 assoc_comeback_len;
+       u8 *vendor_ht_cap;
+       u8 vendor_ht_cap_len;
 };
 
 typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
index 611d1e0..49fe69d 100644 (file)
@@ -578,4 +578,9 @@ struct mimo_pwr_save_action {
 #define WME_TSPEC_DIRECTION_DOWNLINK 1
 #define WME_TSPEC_DIRECTION_BI_DIRECTIONAL 3
 
+
+#define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
+
+#define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */
+
 #endif /* IEEE802_11_DEFS_H */