From patchwork Mon Feb 18 21:35:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Danzberger X-Patchwork-Id: 1044342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=dd-wrt.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZkCFhfAP"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=dd-wrt.com header.i=@dd-wrt.com header.b="OZY0NhD/"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 443HGZ3lrFz9s1l for ; Tue, 19 Feb 2019 08:35:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UzdwjpZaz5ZKnFNDGob/g+T8jbwrCNwYFmgVVMr16l4=; b=ZkCFhfAPS8AYlb aVdG0g1xU2N4PIT8eYvM8i2p/swxTXZclq9VC9gY8Khj6FwvPa+TtvbqFg4AnxBlQ9jeisMykOrvC kpkte+xFID4vUOpZFNdjlCydrRHNCdUn9bSIUAA3uwYUe1X36CaDPUyaUoLA5Yq1zlNMg5s/rb2nK CZ0DbMYJPULvkzLF4bOex2Sqhc7KMmJUgZ95BUqkgA2J+v78Ra327srtnZZD0MPKg0kF+Cj1vDAal pmiLK2hUgNCzlCH3N20CWDZDQoye7kLB0t16vbbkyFTVGm3nGZm1LnInwG4eTG8asuNspkKhhnQBH FLosTXhIIKrPFTmi0eAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvqZS-00041N-VA; Mon, 18 Feb 2019 21:35:26 +0000 Received: from smtps.newmedia-net.de ([2a05:a1c0:0:de::167] helo=webmail.newmedia-net.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvqZI-0003rz-Dy for openwrt-devel@lists.openwrt.org; Mon, 18 Feb 2019 21:35:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dd-wrt.com; s=mikd; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To:From; bh=BkUOiaDC1RX5CNUivn935B0FnO12zmDj4TbeU75Ng0A=; b=OZY0NhD/hcq7xDNE34xHLHxL+/3S5/GZKYnvCbULGqCfLaS/uub8fPk7qHWzHfyvuG1nBwxfkDN+xMmvNKmd/rsFqbl1JDEEu2jh8jl3a/LKvg6GoIg1268Zz5LO/5S2XEWpcKlS2uBztTiLPjkNH78zq6pMIPykZkIR2eAEPjo=; From: Daniel Danzberger To: openwrt-devel@lists.openwrt.org Date: Mon, 18 Feb 2019 22:35:05 +0100 Message-Id: <20190218213507.12204-1-daniel@dd-wrt.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a02:908:261a:4fbc:5885:4b04:a1b4:98b5 X-SA-Exim-Mail-From: daniel@dd-wrt.com X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on webmail.newmedia-net.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.9, No X-SA-Exim-Version: 4.2.1 (built Thu, 26 May 2011 15:22:33 +0200) X-SA-Exim-Scanned: Yes (on webmail.newmedia-net.de) X-NMN-MailScanner-Information: Please contact the ISP for more information X-NMN-MailScanner-ID: 1gvqZG-00051T-Jf X-NMN-MailScanner: Found to be clean X-NMN-MailScanner-From: daniel@dd-wrt.com X-Received: from [2a02:908:261a:4fbc:5885:4b04:a1b4:98b5] (helo=localhost.localdomain) by webmail.newmedia-net.de with esmtpa (Exim 4.72) (envelope-from ) id 1gvqZG-00051T-Jf; Mon, 18 Feb 2019 22:35:14 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190218_133516_911889_B5B3C2F9 X-CRM114-Status: UNSURE ( 5.28 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH 1/3][rpcd] iwinfo: show more stats from assoclist. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Danzberger Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Daniel Danzberger --- iwinfo.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/iwinfo.c b/iwinfo.c index 1849196..d476ce3 100644 --- a/iwinfo.c +++ b/iwinfo.c @@ -458,10 +458,22 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_add_string(&buf, "mac", mac); blobmsg_add_u32(&buf, "signal", a->signal); + blobmsg_add_u32(&buf, "signal_avg", a->signal_avg); blobmsg_add_u32(&buf, "noise", a->noise); blobmsg_add_u32(&buf, "inactive", a->inactive); + blobmsg_add_u32(&buf, "connected_time", a->connected_time); + blobmsg_add_u32(&buf, "thr", a->thr); + blobmsg_add_u8(&buf, "authorized", a->is_authorized); + blobmsg_add_u8(&buf, "authenticated", a->is_authenticated); + blobmsg_add_string(&buf, "preamble", a->is_preamble_short ? "short" : "long"); + blobmsg_add_u8(&buf, "wme", a->is_wme); + blobmsg_add_u8(&buf, "mfp", a->is_mfp); + blobmsg_add_u8(&buf, "tdls", a->is_tdls); e = blobmsg_open_table(&buf, "rx"); + blobmsg_add_u64(&buf, "drop_misc", a->rx_drop_misc); + blobmsg_add_u32(&buf, "packets", a->rx_packets); + blobmsg_add_u32(&buf, "bytes", a->rx_bytes); blobmsg_add_u32(&buf, "rate", a->rx_rate.rate); blobmsg_add_u32(&buf, "mcs", a->rx_rate.mcs); blobmsg_add_u8(&buf, "40mhz", a->rx_rate.is_40mhz); @@ -469,6 +481,10 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_close_table(&buf, e); e = blobmsg_open_table(&buf, "tx"); + blobmsg_add_u32(&buf, "failed", a->tx_failed); + blobmsg_add_u32(&buf, "retries", a->tx_retries); + blobmsg_add_u32(&buf, "packets", a->tx_packets); + blobmsg_add_u32(&buf, "bytes", a->tx_bytes); blobmsg_add_u32(&buf, "rate", a->tx_rate.rate); blobmsg_add_u32(&buf, "mcs", a->tx_rate.mcs); blobmsg_add_u8(&buf, "40mhz", a->tx_rate.is_40mhz); From patchwork Mon Feb 18 21:35:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Danzberger X-Patchwork-Id: 1044343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=dd-wrt.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AzApzy8M"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=dd-wrt.com header.i=@dd-wrt.com header.b="H97RbNj3"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 443HGd5Jdlz9s1l for ; Tue, 19 Feb 2019 08:35:37 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wW/J5BpNeIs6pmjMtrbJJRvF7RUENMCl3quXRKkEmm4=; b=AzApzy8MAPKoId s2vZvVwUG+JTv9LehjbuDVTH08frsVgHX+tQMazR5PfV+OZQnjKLR+iXLvBALyGKWqMVW8Altc56N xh1lF6XZp6252XJ6QS8CivFd7PTRbTW5nXdJmlheDAP6TNio20KKAo4StR6gZqd5yxy+Hh4NXgINd zp4mVUl1CgCY/HJRjSCCY9dtqzLLWIObmxEhxsPhzO0Qug0O5be/bSAlVaQxFX7X6MU95UVBcZeIO DgkoPmj5+XZbzaZMZcl2400PfVAjye3tUJsUXsV2KpZz9VdXDBS27DyzS093k2j5ckx0+nSmT/X05 SNKKuZbjX3QLI5vIuGGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvqZM-0003sl-5W; Mon, 18 Feb 2019 21:35:20 +0000 Received: from smtps.newmedia-net.de ([2a05:a1c0:0:de::167] helo=webmail.newmedia-net.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvqZI-0003ry-Dy for openwrt-devel@lists.openwrt.org; Mon, 18 Feb 2019 21:35:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dd-wrt.com; s=mikd; h=Subject:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Cc:To:From; bh=zgFrndmHQC69STisUKFE6gGj7MSVQdawSBkGZp7KkXM=; b=H97RbNj3yirCzWes5BkkNpwQDIu2DiH8kv0Zo+PkRcmxf+OI9SVV5XHqhhRoHd+x1SHexGqNyWXL3qdVPBlkNSCQAM2D9aZR/FMSyGQpDABuSC+bu6O2ygdFoZwEwZyo4jrb8Wp6/VpzDgD2xzOnPsOvV6zJaAzQD5wMkXVZi04=; From: Daniel Danzberger To: openwrt-devel@lists.openwrt.org Date: Mon, 18 Feb 2019 22:35:06 +0100 Message-Id: <20190218213507.12204-2-daniel@dd-wrt.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218213507.12204-1-daniel@dd-wrt.com> References: <20190218213507.12204-1-daniel@dd-wrt.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a02:908:261a:4fbc:5885:4b04:a1b4:98b5 X-SA-Exim-Mail-From: daniel@dd-wrt.com X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on webmail.newmedia-net.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.9, No X-SA-Exim-Version: 4.2.1 (built Thu, 26 May 2011 15:22:33 +0200) X-SA-Exim-Scanned: Yes (on webmail.newmedia-net.de) X-NMN-MailScanner-Information: Please contact the ISP for more information X-NMN-MailScanner-ID: 1gvqZG-00051T-Ty X-NMN-MailScanner: Found to be clean X-NMN-MailScanner-From: daniel@dd-wrt.com X-Received: from [2a02:908:261a:4fbc:5885:4b04:a1b4:98b5] (helo=localhost.localdomain) by webmail.newmedia-net.de with esmtpa (Exim 4.72) (envelope-from ) id 1gvqZG-00051T-Ty; Mon, 18 Feb 2019 22:35:15 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190218_133516_911642_52FDC99A X-CRM114-Status: UNSURE ( 7.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH 2/3][rpcd] iwinfo: add survey. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Danzberger Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Daniel Danzberger --- iwinfo.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/iwinfo.c b/iwinfo.c index d476ce3..983001a 100644 --- a/iwinfo.c +++ b/iwinfo.c @@ -511,6 +511,45 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct ubus_object *obj, return UBUS_STATUS_OK; } +static int +rpc_iwinfo_survey(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, + struct blob_attr *msg) +{ + char res[IWINFO_BUFSIZE]; + struct iwinfo_survey_entry *e; + void *c, *d; + int i, rv, len; + + blob_buf_init(&buf, 0); + + rv = rpc_iwinfo_open(msg); + + c = blobmsg_open_array(&buf, "results"); + + if (rv || iw->survey(ifname, res, &len) || len < 0) + return UBUS_STATUS_OK; + + for (i = 0; i < len; i += sizeof(struct iwinfo_survey_entry)) { + e = (struct iwinfo_survey_entry *)&res[i]; + + d = blobmsg_open_table(&buf, NULL); + blobmsg_add_u32(&buf, "mhz", e->mhz); + blobmsg_add_u32(&buf, "noise", e->noise); + blobmsg_add_u64(&buf, "active_time", e->active_time); + blobmsg_add_u64(&buf, "busy_time", e->busy_time); + blobmsg_add_u64(&buf, "busy_time_ext", e->busy_time_ext); + blobmsg_add_u64(&buf, "rx_time", e->rxtime); + blobmsg_add_u64(&buf, "tx_time", e->txtime); + blobmsg_close_table(&buf, d); + } + + blobmsg_close_array(&buf, c); + ubus_send_reply(ctx, req, buf.head); + rpc_iwinfo_close(); + return UBUS_STATUS_OK; +} + static int rpc_iwinfo_freqlist(struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req, const char *method, @@ -791,6 +830,7 @@ rpc_iwinfo_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx) UBUS_METHOD("freqlist", rpc_iwinfo_freqlist, rpc_device_policy), UBUS_METHOD("txpowerlist", rpc_iwinfo_txpowerlist, rpc_device_policy), UBUS_METHOD("countrylist", rpc_iwinfo_countrylist, rpc_device_policy), + UBUS_METHOD("survey", rpc_iwinfo_survey, rpc_device_policy), UBUS_METHOD("phyname", rpc_iwinfo_phyname, rpc_uci_policy), }; From patchwork Mon Feb 18 21:35:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Danzberger X-Patchwork-Id: 1044344 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=dd-wrt.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iLTouDyy"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=dd-wrt.com header.i=@dd-wrt.com header.b="kDwvz3n9"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 443HGs4jVpz9s1l for ; Tue, 19 Feb 2019 08:35:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9n6WOAMPd1cM/eiPywMDM444GyHacOS4lUP6dScYv5Q=; b=iLTouDyysTZghi iHNmN7wp2s3hOvtlYbWak8VDW1MrM9qM43M+y7Uk5fqzp17Cf9OUKKh8lH3XaD+oWw19aAUfOp3KX o8JgoTIhduIQGDwn8mZKTQlseGztfCEn1EE9S1gOXtYTeUwODgzcNmxckk73ghEsnzXGPqt0UMOD5 p2SXbfWwTZbtDxt3KM1ysl71m1YRx3E5rDubjR6wqb8oIRrEawCqhb2HuO5qlbFIvcAk3goIezPIu Z7U5W6OopNXVFkAuacYdlqLFCcrUJHJ7Ase1W5NccCbYCrY3TQ5cBqGXZN2X1f5UlCrmNrfBjo7V1 WubCthK4wGXUUq7a2jmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvqZe-0004MH-3c; Mon, 18 Feb 2019 21:35:38 +0000 Received: from smtps.newmedia-net.de ([2a05:a1c0:0:de::167] helo=webmail.newmedia-net.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvqZI-0003s0-I6 for openwrt-devel@lists.openwrt.org; Mon, 18 Feb 2019 21:35:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dd-wrt.com; s=mikd; h=Subject:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Cc:To:From; bh=BdBNzflBDbIB53IF9MCklrbtNShqFN6u/Dn1SezvXEA=; b=kDwvz3n9JHM+XqkykvjIGunoQ0t0WBI7X05Tc+AWq4VVCHhLMHv6uO8bACqTdDwLQoSj1a8eo+tJDfYcPkcjn6oq1tSQ0VGiiCgCVcLresAp9EuUUEhvlsrUM/tDX43LOnwbw9MRkvODkbMHgSQH/+TSMk2Yx63VGPYxy9/2hgE=; From: Daniel Danzberger To: openwrt-devel@lists.openwrt.org Date: Mon, 18 Feb 2019 22:35:07 +0100 Message-Id: <20190218213507.12204-3-daniel@dd-wrt.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218213507.12204-1-daniel@dd-wrt.com> References: <20190218213507.12204-1-daniel@dd-wrt.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a02:908:261a:4fbc:5885:4b04:a1b4:98b5 X-SA-Exim-Mail-From: daniel@dd-wrt.com X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on webmail.newmedia-net.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.9, No X-SA-Exim-Version: 4.2.1 (built Thu, 26 May 2011 15:22:33 +0200) X-SA-Exim-Scanned: Yes (on webmail.newmedia-net.de) X-NMN-MailScanner-Information: Please contact the ISP for more information X-NMN-MailScanner-ID: 1gvqZH-00051T-JO X-NMN-MailScanner: Found to be clean X-NMN-MailScanner-From: daniel@dd-wrt.com X-Received: from [2a02:908:261a:4fbc:5885:4b04:a1b4:98b5] (helo=localhost.localdomain) by webmail.newmedia-net.de with esmtpa (Exim 4.72) (envelope-from ) id 1gvqZH-00051T-JO; Mon, 18 Feb 2019 22:35:15 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190218_133516_913307_4B401F5D X-CRM114-Status: UNSURE ( 5.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH 3/3][rpcd] iwinfo: add mesh infos in assoclist. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Danzberger Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Daniel Danzberger --- iwinfo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iwinfo.c b/iwinfo.c index 983001a..a76b72a 100644 --- a/iwinfo.c +++ b/iwinfo.c @@ -470,6 +470,13 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_add_u8(&buf, "mfp", a->is_mfp); blobmsg_add_u8(&buf, "tdls", a->is_tdls); + blobmsg_add_u16(&buf, "mesh llid", a->llid); + blobmsg_add_u16(&buf, "mesh plid", a->plid); + blobmsg_add_string(&buf, "mesh plink", a->plink_state); + blobmsg_add_string(&buf, "mesh local PS", a->local_ps); + blobmsg_add_string(&buf, "mesh peer PS", a->peer_ps); + blobmsg_add_string(&buf, "mesh non-peer PS", a->nonpeer_ps); + e = blobmsg_open_table(&buf, "rx"); blobmsg_add_u64(&buf, "drop_misc", a->rx_drop_misc); blobmsg_add_u32(&buf, "packets", a->rx_packets);