Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8949244ybi; Fri, 7 Jun 2019 00:29:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeaiupxkyW3ppg00hFhs3AyrZWGdCQNimvKLYLhL7j92qS+gev9iL6vB5iUR8LMYKfr1iQ X-Received: by 2002:a62:764d:: with SMTP id r74mr34196331pfc.110.1559892569564; Fri, 07 Jun 2019 00:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559892569; cv=none; d=google.com; s=arc-20160816; b=QcbBth0/HkWKKK1XIsz9sTbSX34RMJDB72bGSGK9eUemSPe4dEf7v/7bn4e7jB+6We grZWH1t2wmD8MOJ9sR8gHggA8p16WlHgg1oxvd/CI3RXaeQn7oubKZzKydKDhmv9aVDm Ay88A5aOcFpSMC7oK79nzww9PbxHecSzzRvy8+UqhXndjm+fATP4AoP2mzo1w2L/MAvJ od0SkslrAwZvGxIC9mquGoQaZJZ/UO0wNd3VMOrrXBMQ+mG6N2j0Bdj7YweArD4NR1R2 P7Ku2kv83a7EY/RbfbAJy25cA6XyLQ2e4kNa6MCEeDV3ubIKM5Awxjh/rrAWHE252TKW RJXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=WIWHcUlruIXuWb7Q4ynz/R9GRZd3PnDUIIzWnxLGnbU=; b=RgqI7QvsZH44mqVk/efKRvaJuT/uakEoUsqD8K0DAxtTpIh8Zv6Kziis2pMPmtBtok YalHpaY5ct4ZPd2o4iCyffTv9rNK3DOP+ptbArJBcQg39eIdf8eIqVzv2qj9Ovh/nM8m YMasLZGB2PCdogMJDygD93PB/qtcqKkQsRermDp3wSr6fqt9qm7HrkiJBpM24gP1/9Xc DgEEsxUmuBLVuJBesH9Im8RX/hYU/bSJv5vvglkGLe3Cw6hXtfwNXSC3VQv9YLUc9KC4 cDeIOkEb08AIx+gVUd4K+jqsgFcYRLPtItwl4qWYeiLOic937sg1Y/AL7uB4dvSOQwoH ksTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=BcQFPhHf; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si1032325pjx.106.2019.06.07.00.29.03; Fri, 07 Jun 2019 00:29:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=BcQFPhHf; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727606AbfFGHWX (ORCPT + 99 others); Fri, 7 Jun 2019 03:22:23 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:39587 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbfFGHWX (ORCPT ); Fri, 7 Jun 2019 03:22:23 -0400 Received: by mail-ed1-f66.google.com with SMTP id m10so1575302edv.6 for ; Fri, 07 Jun 2019 00:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WIWHcUlruIXuWb7Q4ynz/R9GRZd3PnDUIIzWnxLGnbU=; b=BcQFPhHfhwVZRgOVFwRt7Mkx1+kpvZItpmQh3BEcF5Wh8/aNgVD684++hWYf45IZUD K1pZ8g8NshAfFZi2WTU9qqRdOjeNl5xZlrIULYk62STnWAW1U9wcUlcdX0lIri2maVz6 o7nEWrowl89M+LYQtOD+G3wNpNuabb640WkrY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WIWHcUlruIXuWb7Q4ynz/R9GRZd3PnDUIIzWnxLGnbU=; b=RMpD7u9fS9K6NY/CeaRMaZk4w7y8OOOOpmVUzf02qy2dEda72IzagoOL8xeFw3x+AM RyuQaQ9zpj9NhXIc01GDqZOW6riHRgPToGEsuaA5ta91YeDBViMIK4QznLYWHhe2wt60 ReGd6hqkqfDA8mw5QRd9e4T1wKZsg4tbipcMGmDoovJx8xHN9cnyXKyWqleRAYyn44No dj+ibMLf7UjFBGtYOwLN/Er7XOQ6W8yNGfXPpUe9jZYdwzN/HLP4j4DLTxyNlMj+ZON0 IxHgE4AGaolDOr8D1IzxkONZ5nKNcjD19h/bp3bgGhT2AlsxYTVhqaT7HS3AkXtj0nnd xS4g== X-Gm-Message-State: APjAAAVtTAgkQOzOSOG67gFUInPfnOD+wGwnG/qKcdubf+iUKgnwpCXp YCCS24jgVOO7IIqHeJQZovtOyA== X-Received: by 2002:a50:bdc5:: with SMTP id z5mr39004669edh.61.1559892141432; Fri, 07 Jun 2019 00:22:21 -0700 (PDT) Received: from [10.176.68.125] ([192.19.248.250]) by smtp.gmail.com with ESMTPSA id c10sm302513edk.80.2019.06.07.00.22.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jun 2019 00:22:20 -0700 (PDT) Subject: Re: [PATCH V2] iw: print HE capabilities To: Joe Perches , John Crispin , Johannes Berg Cc: linux-wireless@vger.kernel.org, Shashidhar Lakkavalli References: <20190528065828.25356-1-john@phrozen.org> From: Arend Van Spriel Message-ID: Date: Fri, 7 Jun 2019 09:22:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 6/7/2019 4:11 AM, Joe Perches wrote: > On Tue, 2019-05-28 at 08:58 +0200, John Crispin wrote: >> Print the HE MAC/PHY capabilities and MCS/NSS sets. > > trivia: > >> diff --git a/util.c b/util.c > [] >> +void print_he_info(struct nlattr *nl_iftype) >> +{ >> + struct nlattr *tb[NL80211_BAND_IFTYPE_ATTR_MAX + 1]; >> + struct nlattr *tb_flags[NL80211_IFTYPE_MAX + 1]; >> + char *iftypes[NUM_NL80211_IFTYPES] = { >> + "Unspec", "Adhoc", "Station", "AP", "AP/VLAN", "WDS", "Monitor", >> + "Mesh", "P2P/Client", "P2P/Go", "P2P/Device", "OCB", "NAN", >> + }; > > Should probably be > const char * const iftypes[...] We are doing this iftype string mapping in several places so a helper function may be warranted. Gr. AvS