From patchwork Sun Sep 6 16:45:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 1358338 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.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=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ki+JwuQl; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=JCIU4mxS; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bky433zy2z9sSn for ; Mon, 7 Sep 2020 02:46:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=Gvuv/GX8N6M1yLv6McpwcXYFyooyPnDLddlWWTERfL4=; b=ki+JwuQlCcaZ+yKwndLtidI+yT 56pbA5DKj5vOdh7/xlZr6KeJy/viw0OiVOf5sefYRV2v7EMBun8F1z1W1QcAV06XrfTrXCXW8JaR7 rBwn31IetWhvUemPjlZ5l0lZET3zSj1xHUNpcESRFIvJepXLde21r4QbExxyRstvEhMLzpvf5+TT4 r1OjyoJ3vgNA1ZfW1hqtzEU4vxhp6k8OyHYi3hnhjI3R2GHRl/Q53e7I9OOzuJPoN5ki3WF0zrUwe mSvkcSi3gp2GUAxfNMp93MoA9dgVfeFhU/yImOHDU6HVl3qDIMLll45Kqf/kCbx27m7yLysQw8P9j q/1IMHng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kExmq-0003kg-6J; Sun, 06 Sep 2020 16:45:04 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kExmn-0003k7-He for openwrt-devel@lists.openwrt.org; Sun, 06 Sep 2020 16:45:02 +0000 Received: by mail-lf1-x141.google.com with SMTP id x69so632810lff.3 for ; Sun, 06 Sep 2020 09:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8dOmmmVmyfrt+rA7VujyCW3eCZP9M2wDew52Ape5OIc=; b=JCIU4mxS9jPtAOY3HwzDqJtrbIsoJhIyp3AZY+gs4on65c1hx2I0igiX8yC4C/mi+t 2n/XuHn1sUdqi3K8nPEZtIllROuQQDDZhheJaTfNQaPdvizIVhXi04VQWr4f3FSfXF/j HsF5eiRHDUygES8iK9YrTzS4Z91UBp6O1hVHAi4OLqehNU1SiQb/6ylJYfW27BbBIB/n SDo4Os9zkTf875WhiszRdZXKBDerVxUZvi7cRFwMuNtwo7MkIi5qmVdHRFNSQ9SpMXJE l5hv78ZO4p/jOTCMXEp9HNlTwyJqL9Sx/DsaJDZ1/s2SzwLVEv+wVN+OFRnlufLLhcXP /alg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8dOmmmVmyfrt+rA7VujyCW3eCZP9M2wDew52Ape5OIc=; b=GHzM8N71nzQGpbPQyG/xOeiic6uGk/fGfCH+sANc+rM8BEMRugQWp6KNk0I2cOHIH7 kp51umT/AhD/YvdOcm+670YHUqzOOyTwCxb2XKtUS5tA25RV975SaJGQStecx/Eye9Hi ve9AeIoQyS2rkeRoVGEAC5btz1K7C4hWTMixY2BvXkDx/rx2AxplYX7opkiTkDEG8PdS Ei/DBEvJeEJT5jRNKFviGfBEVcFD00EzUCCbH+7JpfbwVH+/JSAbdw2d8zLRWgxmV4TM nMWleJp8ulReP4pA1f5/VKGVOI4fZD32KYEzm8j7wad32axo2idKrgIKL8jeArAV7iW2 I+ng== X-Gm-Message-State: AOAM533eiVPnbz9IerJGLXYlpVOf4SL4SuvEloJRosTnkDhR5YpMX1v4 EpEo9wvTZG1Fg57+tzsnz+BJsmlyiXz+kw== X-Google-Smtp-Source: ABdhPJz01YW8nRMxSlB9LepTCF6t2qpMcx+jOyQLEreQrhBjllxgrGxcSoFYPZg5lNM7TwW0+zD7SA== X-Received: by 2002:a19:cc43:: with SMTP id c64mr7999894lfg.123.1599410699628; Sun, 06 Sep 2020 09:44:59 -0700 (PDT) Received: from rsa-laptop.internal.lan ([217.25.229.52]) by smtp.gmail.com with ESMTPSA id l1sm4606732ljg.113.2020.09.06.09.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 09:44:59 -0700 (PDT) From: Sergey Ryazanov To: OpenWrt Development List Subject: [PATCH] ath25: fix preinit Ethernet port configuration Date: Sun, 6 Sep 2020 19:45:02 +0300 Message-Id: <20200906164502.1034-1-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200906_124501_608797_9DFA3A78 X-CRM114-Status: GOOD ( 12.05 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:141 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ryazanov.s.a[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org vconfig is no more installed by default to a firmware image. So, replace vconfig calls for VLAN subinterface configuration by coresponding ip-link commands. Also drop few useless comments from the preinit hook script, while we are at it. I have no chance to test this fix since I have no board with a subject switch IC, but this is still better then call an utility that is unavailable in the firmware for years. Signed-off-by: Sergey Ryazanov --- .../base-files/lib/preinit/15_preinit_iface_atheros | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros b/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros index 235ba4befc..87bc4abba5 100644 --- a/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros +++ b/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros @@ -1,12 +1,10 @@ -# reset button only supported on ar5315+ at the moment preinit_ip() { if [ -z "$pi_ifname" ]; then grep -q 'Atheros AR231[567]' /proc/cpuinfo && { if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then - vconfig set_name_type DEV_PLUS_VID_NO_PAD ip link set eth0 up - vconfig add eth0 1 + ip link add dev eth0.1 link eth0 type vlan id 1 ifname=eth0.1 else ifname=eth0 @@ -20,13 +18,10 @@ preinit_ip() { } } - -# reset button only supported on ar5315+ at the moment - preinit_ip_deconfig() { if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then - vconfig rem eth0.1 2>/dev/null + ip link del eth0.1 2>/dev/null ip link set $pi_ifname down elif [ -n "$pi_ifname" ]; then ip -4 addr flush dev $pi_ifname