]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
add support for parsing ERP information element
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 4 May 2009 08:48:42 +0000 (01:48 -0700)
committerJohannes Berg <johannes@sipsolutions.net>
Mon, 4 May 2009 11:00:41 +0000 (13:00 +0200)
scan.c

diff --git a/scan.c b/scan.c
index 91e94ed482d7af4bdc2636a8233dba3faf6e5fa3..d4a4832d4b9c79f2085d85288c4bd8d59d91fd39 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -80,11 +80,27 @@ static void print_ign(unsigned char type, unsigned char len, unsigned char *data
        /* ignore for now, not too useful */
 }
 
+static void print_erp(unsigned char type, unsigned char len, unsigned char *data)
+{
+       if (data[0] == 0x00)
+               return;
+
+       printf("\tERP:");
+       if (data[0] & 0x01)
+               printf(" NonERP_Present");
+       if (data[0] & 0x02)
+               printf(" Use_Protection");
+       if (data[0] & 0x04)
+               printf(" Barker_Preamble_Mode");
+       printf("\n");
+}
+
 static const printfn ieprinters[] = {
        [0] = print_ssid,
        [1] = print_supprates,
        [3] = print_ds,
        [5] = print_ign,
+       [42] = print_erp,
        [50] = print_supprates,
 };