From patchwork Sun Mar 13 21:14:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1604854 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=b7qg9MzL; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=3e8.eu header.i=@3e8.eu header.a=rsa-sha256 header.s=mail20211217 header.b=kZxtSnfD; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KGsvM2z3dz9sGD for ; Mon, 14 Mar 2022 08:17:35 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7nDviE8G8mMEAozSfGAqDD8PiEfdSihHdW8sBiEO/L0=; b=b7qg9MzLcpWFey BJCd/1bnSwhd3iRPkCSBIBWDXN0BYyItaGYjVoGP4vovxqGC+TF64ZviaL+2l9JErMCHTudJSNkGU jjxGR0cHRhtoWE2ndUolO/8vzJ/2bFSc5JMRMwnlvjlE+xA/UX+TAdVDaw1IevqZ3OmFFbR3aiN32 juAkWo+1ZNsZgAwmILqp/SSbWET1O4Ovs+vPCSVrVadwqjtM86ypm236g/6mrO9NLRj/+9QW48YeA R4gKSlA0B7YLNLK2Y7bYCHhkujb7qSPGQ9M4reLCoTlD3TnHD5P6lvlhepJACM0ZafATDx1gsjB/z yNakq53X4k2Y70rn0+dQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTVYp-003NXY-8u; Sun, 13 Mar 2022 21:15:31 +0000 Received: from srv4.3e8.eu ([2001:67c:12a0:200::2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTVYL-003NTl-OV for openwrt-devel@lists.openwrt.org; Sun, 13 Mar 2022 21:15:04 +0000 Received: from localhost.localdomain (p200300c6cf1a2ca042ec7477250c65aa.dip0.t-ipconnect.de [IPv6:2003:c6:cf1a:2ca0:42ec:7477:250c:65aa]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits)) (No client certificate requested) by srv4.3e8.eu (Postfix) with ESMTPSA id 21839601E8; Sun, 13 Mar 2022 22:14:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1647206089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mxa2dF3T/jbMY4zjo64IstKslNA5tRAyzFbrTsllHIk=; b=kZxtSnfDEqpoaXIJLLUt/AfYwRWOrrjooc0Ml8GXfNGU/dV14Yaf5iuHBzmdcuO9P0thN1 P3InN07TfnjWmCH2ouJQPr/XO7yRwIp72so47ybmUW5sNyIJn30slvF2vNhVycGrYiweuD T0pZrgeB6mF9D2H5dGEY/RKyF74+itI7yyzSK8ZrDms3ShC4obfcFtf3/YcdBb53tzUn+f e5JMFDNuHdyUUXgnlLZMJtDp7t0eqPGAW9ZKwZlGMKw7H/P8GAk6l9bV9samEwt+2faKUQ 2/X+1zv0oxM93Zd/0+U4r0d1xe86BYrGSwq52STr2h9rFAEPLhlitWejacE4cQ== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Jan Hoffmann Subject: [PATCH 3/4] ltq-vdsl-app: set MAC address for vectoring error reports Date: Sun, 13 Mar 2022 22:14:37 +0100 Message-Id: <20220313211438.1302111-4-jan@3e8.eu> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220313211438.1302111-1-jan@3e8.eu> References: <20220313211438.1302111-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220313_141501_994845_AD2E6452 X-CRM114-Status: GOOD ( 11.89 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This tells the modem about the WAN MAC address, which is used as source address for vectoring error reports that are generated by the firmware. It needs to be set early, as the MEI driver only actually writes the value to the modem when is in reset state (i.e. the firmware has been loaded, but connection has not started yet). Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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_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.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This tells the modem about the WAN MAC address, which is used as source address for vectoring error reports that are generated by the firmware. It needs to be set early, as the MEI driver only actually writes the value to the modem when is in reset state (i.e. the firmware has been loaded, but connection has not started yet). Signed-off-by: Jan Hoffmann --- .../config/ltq-vdsl-app/files/dsl_control | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control index 54b739e2cd9d..34642dbda5aa 100644 --- a/package/network/config/ltq-vdsl-app/files/dsl_control +++ b/package/network/config/ltq-vdsl-app/files/dsl_control @@ -95,10 +95,11 @@ tone_vdsl_b="0x1" # B43 tone_adsl_bv="0x81" # B43 + B43c tone_vdsl_bv="0x5" # B43 + V43 -# create ADSL autoboot script. Used for SNR margin tweak +# create DSL autoboot script. Used for SNR margin tweak and to set MAC address for vectoring error reports autoboot_script() { echo "[WaitForConfiguration]={ locs 0 $1 +dsmmcs $2 } [WaitForLinkActivate]={ @@ -166,6 +167,12 @@ lowlevel_cfg() { 0" > /tmp/lowlevel.cfg } +get_macaddr() { + local name + config_get name $1 name + [ "$name" = "dsl0" ] && config_get $2 $1 macaddr +} + service_triggers() { procd_add_reload_trigger network } @@ -183,6 +190,7 @@ start_service() { local mode local lowlevel local snr + local macaddr config_load network config_get tone dsl tone @@ -191,6 +199,7 @@ start_service() { config_get xfer_mode dsl xfer_mode config_get line_mode dsl line_mode config_get snr dsl ds_snr_offset + config_foreach get_macaddr device macaddr eval "xtse=\"\${xtse_xdsl_$annex}\"" @@ -289,11 +298,10 @@ start_service() { lowlevel="-l /tmp/lowlevel.cfg" } - [ -z "${snr}" ] || { - # for SNR offset setting - autoboot_script "$snr" - autoboot="-a /tmp/dsl.scr -A /tmp/dsl.scr" - } + [ -z "${snr}" ] && snr=0 + [ -z "${macaddr}" ] && macaddr="00:00:00:00:00:00" + autoboot_script "$snr" "$macaddr" + autoboot="-a /tmp/dsl.scr -A /tmp/dsl.scr" procd_open_instance procd_set_param command /sbin/vdsl_cpe_control \