diff mbox series

[1/2] iw: scan: parse wps version2

Message ID 20200211012227.6907-1-markus.theil@tu-ilmenau.de (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series [1/2] iw: scan: parse wps version2 | expand

Commit Message

Markus Theil Feb. 11, 2020, 1:22 a.m. UTC
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 scan.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/scan.c b/scan.c
index 2dedd64..c03ca2a 100644
--- a/scan.c
+++ b/scan.c
@@ -1931,6 +1931,18 @@  static void print_wifi_wps(const uint8_t type, uint8_t len, const uint8_t *data,
 				data[12], data[13], data[14], data[15],
 				data[16], data[17], data[18], data[19]);
 			break;
+		case 0x1049:
+			tab_on_first(&first);
+			if (sublen == 6 && 
+			    data[4] == 0x00 &&
+			    data[5] == 0x37 &&
+			    data[6] == 0x2a &&
+			    data[7] == 0x00 &&
+			    data[8] == 0x01) {
+				uint8_t v2 = data[9];
+				printf("\t * Version2: %d.%d\n", v2 >> 4, v2 & 0xf);
+			}
+			break;
 		case 0x1054: {
 			tab_on_first(&first);
 			if (sublen != 8) {