From patchwork Sun Jun 10 22:37:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 927444 X-Patchwork-Delegate: blogic@openwrt.org 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=david-bauer.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sJE0YaH0"; 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 413rfG4W4Gz9ryk for ; Mon, 11 Jun 2018 08:38:46 +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:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:Date:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Myvk8AAZKT4aRE5kjh34PrClQY8bG//umyYnSXBaeQU=; b=sJE0YaH06belSa XILkd6jJN5vvyi0f7tkckhBL35C0TVkvAB6bEnGizPONpf+7fgyCxEBeN2+9bDyO9/2jVkQyUl681 WWO749N2iYXMta0HOePjJ4x1fxOGMSTc1KOeI1yrm1g4Ox7F6Q+XZQcAauMQ+MuMsleMgi7q36mxN IsbnCenarcfdEWa62NL0gTuuIEKFknllSTog/XCsKMynj6n82jv1OtszeEa7WURoimijZbXhjO/C1 ZTqrCj7Edxb6N1rSW2Oif3jdMIBOb2El7E4+8IppB8+BjzNqELAbEF0hZtiPMRsWV+z9ONi4ldHXj 6Od0a4DJ7aeMCMvsWOiA==; 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 1fS8yf-0002hG-15; Sun, 10 Jun 2018 22:38:25 +0000 Received: from mars.blocktrron.ovh ([51.254.112.43] helo=mail.blocktrron.ovh) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fS8ya-0002a0-5a for openwrt-devel@lists.openwrt.org; Sun, 10 Jun 2018 22:38:22 +0000 Received: from localhost.localdomain (p20030071CF30350049E80073C4EEA46A.dip0.t-ipconnect.de [IPv6:2003:71:cf30:3500:49e8:73:c4ee:a46a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id A3D8C1FAEC for ; Mon, 11 Jun 2018 00:38:03 +0200 (CEST) From: David Bauer To: openwrt-devel@lists.openwrt.org Date: Mon, 11 Jun 2018 00:37:38 +0200 Message-Id: <20180610223738.17152-1-mail@david-bauer.net> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180610_153820_367145_1FDBC660 X-CRM114-Status: UNSURE ( 8.42 ) 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 ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record Subject: [OpenWrt-Devel] [PATCH] ramips: change LED trigger 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: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This commit changes the trigger for the WiFi-LED from netdev to the wireless PHY device. With this change, the LEDs illuminate, even when the wireless interface is not named wifi{0,1}. This change is (for now) applied only to MT7628 devices from TP-Link, as we had the possibility to test this change against two of those devices, namely a TL-WR841 v13 and a Archer C50 v3. Signed-off-by: David Bauer --- target/linux/ramips/base-files/etc/board.d/01_leds | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index ae5ac77b5e..73e3f22418 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -384,12 +384,12 @@ tiny-ac) set_usb_led "$boardname:green:usb" ;; tl-wr840n-v4) - set_wifi_led "$boardname:green:wlan" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ;; tl-wr841n-v13) - set_wifi_led "$boardname:green:wlan" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x2" ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x4" ucidef_set_led_switch "lan3" "lan3" "$boardname:green:lan3" "switch0" "0x8" @@ -415,13 +415,13 @@ tplink,c50-v3) ;; tplink,tl-mr3420-v5) set_usb_led "$boardname:green:usb" - set_wifi_led "$boardname:green:wlan" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ;; tplink,tl-wr902ac-v3) set_usb_led "$boardname:green:usb" - ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan" "wlan0" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x10" ;; u25awf-h1)