From patchwork Wed Jun 27 20:24:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Holden X-Patchwork-Id: 935687 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=none (p=none dis=none) header.from=corp.connectbit.io Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o1IHxGIz"; 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 41GDsj4hzVz9ryk for ; Thu, 28 Jun 2018 06:24:41 +1000 (AEST) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject: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=BKcUjOHSqByGJdzQJKoVDK874/ubUIOY3Bu6NscFXVA=; b=o1IHxGIzSfWJHI iF2PNs7tODy2bMLBPl3ZIdFB4Pzpf6d38xmTRoohvIS6VihZXg5a/pN9i8Qo2uavKHOMkZNF5PEx7 BjiAD9ZeCl3Nr1Zu4/lrPIFGVPRi/YtMTO8c52+qVErmyssv9ODr1fjUzWOeSHMnyRUKgvCPDSlrG i+rtpZycMqubvDBAYrF/xZIY0Xe+ehOn5URCjaf/a1+Ne3LCn30DlPrIO0tuOZsf3pHFtQLcZj3F4 7aRU3jaCedG1wU/Z/jc466fkLCPyFPg3upuDMxgX40drZ0PV7YPHNWjJT4aSbFtJeVg1sa1O6r6qw SRgC75PATY5fD0hc58xg==; 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 1fYGzW-0007nc-VH; Wed, 27 Jun 2018 20:24:38 +0000 Received: from mail.corp.connectbit.io ([185.100.248.219]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYGzU-0007mT-66 for openwrt-devel@lists.openwrt.org; Wed, 27 Jun 2018 20:24:37 +0000 From: jwh@corp.connectbit.io To: openwrt-devel@lists.openwrt.org Date: Wed, 27 Jun 2018 21:24:23 +0100 Message-Id: <20180627202424.26165-1-jwh@corp.connectbit.io> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180627_132436_423385_B73F84C0 X-CRM114-Status: UNSURE ( 5.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [OpenWrt-Devel] [PATCH v2 1/2 netifd] system-linux: add 2.5 and 10G interface speed definitions 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: Joe Holden MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Joe Holden --- system-linux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system-linux.c b/system-linux.c index 0127b01..1330ea1 100644 --- a/system-linux.c +++ b/system-linux.c @@ -1688,6 +1688,8 @@ static const struct { { ADVERTISED_100baseT_Full, "100F" }, { ADVERTISED_1000baseT_Half, "1000H" }, { ADVERTISED_1000baseT_Full, "1000F" }, + { ADVERTISED_2500baseX_Full, "2500F" }, + { ADVERTISED_10000baseT_Full, "10000F" }, }; static void system_add_link_modes(struct blob_buf *b, __u32 mask) From patchwork Wed Jun 27 20:24:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Holden X-Patchwork-Id: 935688 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=none (p=none dis=none) header.from=corp.connectbit.io Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TmA5V1Jn"; 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 41GDt14RXHz9ryk for ; Thu, 28 Jun 2018 06:24:57 +1000 (AEST) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject: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=lYm5yaVMrEbc7ANyhKCInYCwGrW+n+qq/6CK0UJfMRo=; b=TmA5V1JnfFWlSc I5l2hvsJwH3ibYk9A8+EsWOQ6MChr/6+dsZiyIA74ujcfENxFW2X6XNmJF7jmF/qnnXJEidacaL9C iWUOblB0K65z1TghqgS8m3VD2GM0b0UUC7WQfFbKCFBpbDx/e4UK1rE428BYio+XhonlYbp5QguIF siFJBub6bKI9tlzF7kGfWWmrNd7pVPsMba2iVnONcRmEpHqsuBaTzANdke7ikwVWsYZpwD6ZDs3B5 Z7y0RBu4ZdtqcuPIb9jOX2MBoqA6VjlV0U3DAkFkm8GpdQ8pIMO2y+t7TUPGVXsMUmyaYnni9gf03 fFN5uJfjIKJKG8XcNx9Q==; 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 1fYGzl-0007yW-ML; Wed, 27 Jun 2018 20:24:53 +0000 Received: from mail.corp.connectbit.io ([185.100.248.219]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYGzU-0007mS-65 for openwrt-devel@lists.openwrt.org; Wed, 27 Jun 2018 20:24:37 +0000 From: jwh@corp.connectbit.io To: openwrt-devel@lists.openwrt.org Date: Wed, 27 Jun 2018 21:24:24 +0100 Message-Id: <20180627202424.26165-2-jwh@corp.connectbit.io> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180627202424.26165-1-jwh@corp.connectbit.io> References: <20180627202424.26165-1-jwh@corp.connectbit.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180627_132436_452693_1E96EBB1 X-CRM114-Status: UNSURE ( 5.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [OpenWrt-Devel] [PATCH v2 2/2] system-linux: add autoneg and link-partner output 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: Joe Holden MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Joe Holden This adds an array that contains the link modes advertised by the other device and also indicates whether auto negotiation is true or false. link-partner may or may not be popualated depending on hardware, driver and/or settings. --- system-linux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system-linux.c b/system-linux.c index 1330ea1..362e06d 100644 --- a/system-linux.c +++ b/system-linux.c @@ -1730,6 +1730,10 @@ system_if_dump_info(struct device *dev, struct blob_buf *b) system_add_link_modes(b, ecmd.advertising); blobmsg_close_array(b, c); + c = blobmsg_open_array(b, "link-partner"); + system_add_link_modes(b, ecmd.lp_advertising); + blobmsg_close_array(b, c); + c = blobmsg_open_array(b, "link-supported"); system_add_link_modes(b, ecmd.supported); blobmsg_close_array(b, c); @@ -1738,6 +1742,8 @@ system_if_dump_info(struct device *dev, struct blob_buf *b) snprintf(s, 8, "%d%c", ethtool_cmd_speed(&ecmd), ecmd.duplex == DUPLEX_HALF ? 'H' : 'F'); blobmsg_add_string_buffer(b); + + blobmsg_add_u8(b, "autoneg", !!ecmd.autoneg); } return 0;