From patchwork Tue Aug 27 19:27:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 2850284 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3B34FBF546 for ; Tue, 27 Aug 2013 19:27:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4582B2047B for ; Tue, 27 Aug 2013 19:27:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02ADB20451 for ; Tue, 27 Aug 2013 19:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753672Ab3H0T1w (ORCPT ); Tue, 27 Aug 2013 15:27:52 -0400 Received: from mail.candelatech.com ([208.74.158.172]:60914 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751521Ab3H0T1v (ORCPT ); Tue, 27 Aug 2013 15:27:51 -0400 Received: from localhost.localdomain (firewall.candelatech.com [70.89.124.249]) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id r7RJRiCf017301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Aug 2013 12:27:44 -0700 From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: Ben Greear Subject: [PATCH] iw: Print out HotSpot2 IE information. Date: Tue, 27 Aug 2013 12:27:41 -0700 Message-Id: <1377631661-26997-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.7.3.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear Example: HotSpot 2.0 Indication: DGAF: 0 Signed-off-by: Ben Greear --- :100644 100644 1a48509... c20c386... M scan.c scan.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/scan.c b/scan.c index 1a48509..c20c386 100644 --- a/scan.c +++ b/scan.c @@ -1388,8 +1388,21 @@ static inline void print_p2p(const uint8_t type, uint8_t len, const uint8_t *dat } } +static inline void print_hs20_ind(const uint8_t type, uint8_t len, const uint8_t *data) +{ + /* I can't find the spec for this...just going off what wireshark uses. */ + printf("\n"); + if (len > 0) { + printf("\t\tDGAF: %i\n", (int)(data[0] & 0x1)); + } + else { + printf("\t\tUnexpected length: %i\n", len); + } +} + static const struct ie_print wfa_printers[] = { [9] = { "P2P", print_p2p, 2, 255, BIT(PRINT_SCAN), }, + [16] = { "HotSpot 2.0 Indication", print_hs20_ind, 1, 255, BIT(PRINT_SCAN), }, }; static void print_vendor(unsigned char len, unsigned char *data,