From patchwork Tue Feb 11 01:22:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 11374665 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 539EE1395 for ; Tue, 11 Feb 2020 01:22:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F51520838 for ; Tue, 11 Feb 2020 01:22:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727540AbgBKBWd (ORCPT ); Mon, 10 Feb 2020 20:22:33 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:56111 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727523AbgBKBWd (ORCPT ); Mon, 10 Feb 2020 20:22:33 -0500 Received: from isengard.fritz.box (unknown [93.209.10.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 83ADE580065; Tue, 11 Feb 2020 02:22:31 +0100 (CET) From: Markus Theil To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Markus Theil Subject: [PATCH 1/2] iw: scan: parse wps version2 Date: Tue, 11 Feb 2020 02:22:26 +0100 Message-Id: <20200211012227.6907-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Markus Theil --- scan.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) { From patchwork Tue Feb 11 01:22:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 11374663 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0EB0D109A for ; Tue, 11 Feb 2020 01:22:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EDAA520838 for ; Tue, 11 Feb 2020 01:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727546AbgBKBWe (ORCPT ); Mon, 10 Feb 2020 20:22:34 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:56116 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727530AbgBKBWd (ORCPT ); Mon, 10 Feb 2020 20:22:33 -0500 Received: from isengard.fritz.box (unknown [93.209.10.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id EC5B0580068; Tue, 11 Feb 2020 02:22:31 +0100 (CET) From: Markus Theil To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Markus Theil Subject: [PATCH 2/2] iw: scan: parse AP Channel Report Date: Tue, 11 Feb 2020 02:22:27 +0100 Message-Id: <20200211012227.6907-2-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200211012227.6907-1-markus.theil@tu-ilmenau.de> References: <20200211012227.6907-1-markus.theil@tu-ilmenau.de> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Markus Theil --- scan.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scan.c b/scan.c index c03ca2a..e6c3736 100644 --- a/scan.c +++ b/scan.c @@ -732,6 +732,21 @@ static void print_erp(const uint8_t type, uint8_t len, const uint8_t *data, printf("\n"); } +static void print_ap_channel_report(const uint8_t type, uint8_t len, const uint8_t *data, + const struct print_ies_data *ie_buffer) +{ + uint8_t oper_class = data[0]; + int i; + + printf("\n"); + printf("\t\t * operating class: %d\n", oper_class); + printf("\t\t * channel(s):"); + for (i = 1; i < len; ++i) { + printf(" %d", data[i]); + } + printf("\n"); +} + static void print_cipher(const uint8_t *data) { if (memcmp(data, ms_oui, 3) == 0) { @@ -1697,6 +1712,7 @@ static const struct ie_print ieprinters[] = { [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), }, [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), }, [47] = { "ERP D4.0", print_erp, 1, 255, BIT(PRINT_SCAN), }, + [51] = { "AP Channel Report", print_ap_channel_report, 1, 255, BIT(PRINT_SCAN), }, [59] = { "Supported operating classes", print_supp_op_classes, 1, 255, BIT(PRINT_SCAN), }, [66] = { "Measurement Pilot Transmission", print_measurement_pilot_tx, 1, 255, BIT(PRINT_SCAN), }, [74] = { "Overlapping BSS scan params", print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), },