Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2414793pxb; Fri, 29 Oct 2021 00:30:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrWDzrIOTk4yh8iNNBoVtJM+Bbe1QppEhJzCP74G28XjG9fDQtXdToTrAml36ph15f5f3S X-Received: by 2002:a17:902:9a91:b0:138:efd5:7302 with SMTP id w17-20020a1709029a9100b00138efd57302mr8211280plp.35.1635492618556; Fri, 29 Oct 2021 00:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635492618; cv=none; d=google.com; s=arc-20160816; b=d32eOcOXt0sxQNpvvBgBPG5JgbztijwEMSfcQK4acid9Agzw3Av+l98e9nKTStQopc fgGSPDnMG0K/IHIPfw1jDEW5uFYX8qAa87GvTdP2jl69E1dlRuwGmAbVuroBWxgWIIh+ fTTaVFfUdgbHhrF4mhWXnQjdkFuDl3bW3GQsT7eyEgjH0YOuA9dFIO7AjOfaKACb427Q CCenYXUpvPxK4pQcpKQdXiRp9kAr7iqxORmG5LQ2z0y+jN1nd/NL1d/QDg5McpNf9q1m JWd8jA5Sj+xpegFMHaYgbDyeno5IIzzk12PanQRJGUjgulXSxfU9lqYNKWsiW9cvSy0N qogw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ARxIJzW356E9l6hj64UJy7UfiqSqNpS18R/Is3uU7wk=; b=jjoToFht2tw0bEBOZS2qO10eZpfsFAfa1ymdYeAnHKV45QBzNPD2e/dYaM9T053m2G F2OFhUZQvo4f05Xqx+tLrrmEO5XD8lBe+vUKuk1z/xfxpP4VYBcohElZ/9rxW8pkUaph O3XJhsqqlwnfCAw2OcCYo1HiWv09DCNknfBC0pkvXqjg908ZcFppLHIAlYhenlQeUrC7 G1pfrkpAsBD4/OElVU9iXiwNB2wgr/MYgdQKj9JSOq7csI+IBAwHyAIr84MQ3MTmIGtv 92t5vfPnk8qMtXx5jH8jWPAQ1Nd5WH+y/9fxkc2nwnZLQbGQLf3C8w25AGZYSDKArbBN fGmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="uFnN/h3Q"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si4379691plr.333.2021.10.29.00.30.05; Fri, 29 Oct 2021 00:30:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="uFnN/h3Q"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232169AbhJ2HcM (ORCPT + 67 others); Fri, 29 Oct 2021 03:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbhJ2HcL (ORCPT ); Fri, 29 Oct 2021 03:32:11 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D625BC061570 for ; Fri, 29 Oct 2021 00:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=ARxIJzW356E9l6hj64UJy7UfiqSqNpS18R/Is3uU7wk=; t=1635492583; x=1636702183; b=uFnN/h3QAaTVh6hHrs/WZLilU6FJu7ZSNZPkVgEGEkrNqtg/xJWyNf8NswxqEV358F6CRv1YiZ5 2ycVRuf17zUeIS1LT1mgt+G/ho5Mc6cprib6oWvQUzR2fCx19YSUj9+t23l4sXn2UacVwuBNnE1Ki /nvi6ZQmjceisfpDlDL8e9i/NjtDr+GmkVUfScbWEmsTFDWheNfPrKYU4chCX5JFS6gc5YrYQO5k2 t2pBM3qkoD5eTHyRYf+45mkGeiX8E+eNJp+sHvqLXHONC5rwqKmOWoIcysfdoJUg74qWTh4+9wTsI HlXq1Q2hPq/J9iit/wziZdh1rQ5Mm05Hpx7A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1mgMKb-008Euf-MX; Fri, 29 Oct 2021 09:29:41 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Jan Fuchs , Johannes Berg Subject: [PATCH] iw: survey: add support for radio stats Date: Fri, 29 Oct 2021 09:29:39 +0200 Message-Id: <20211029072939.15767-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg Add a --radio argument to "survey dump" to support the global radio statistics. Change-Id: I16e615434607d982e9cf690f03148738eca25cde Signed-off-by: Johannes Berg --- survey.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/survey.c b/survey.c index 9325353e4ba1..7f5385e30ba5 100644 --- a/survey.c +++ b/survey.c @@ -71,10 +71,20 @@ static int handle_survey_dump(struct nl80211_state *state, int argc, char **argv, enum id_input id) { + if (argc > 1) + return HANDLER_RET_USAGE; + + if (argc) { + if (!strcmp(argv[0], "--radio")) + nla_put_flag(msg, NL80211_ATTR_SURVEY_RADIO_STATS); + else + return HANDLER_RET_USAGE; + } + register_handler(print_survey_handler, NULL); return 0; } -COMMAND(survey, dump, NULL, +COMMAND(survey, dump, "[--radio]", NL80211_CMD_GET_SURVEY, NLM_F_DUMP, CIB_NETDEV, handle_survey_dump, "List all gathered channel survey data"); -- 2.31.1