From patchwork Tue Oct 27 06:26:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Fertser X-Patchwork-Id: 1388287 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=qR7cu9AC; 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=V37wDW0U; 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 4CL1wz6krWz9sSf for ; Tue, 27 Oct 2020 17:28:19 +1100 (AEDT) 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=5oD/0XkdBCrbU+Qi73nqGm6GwLGYKvc5P2C08KKNWgs=; b=qR7cu9ACeaN2VLUlmtItWwmJ/i YCLRIxezBgiXr1WanzYUIoZKedKG56ugcuNCepWCjzPxx7CJhGvecSLhVPgANElIzHlpq/0MmJVrh Y2zDmknC2/009BC8RaIHIqs7W/2PlPAeTVZ30tFgMP7gnrFTKYKLBU3H7LKqHHBITsvIrXg2I5qBK U7daDDA9DnOTTZnf8uzyHLrIbVCFcLjdIkbTlWrEFuXpi7WOM+nDrFjJ+i85IsCuQsVShLmaWHORm NaP+L68YOv4MciKh7CnokGeobb+ngqG8MN2oaL4mkNM/bAlZEDrXv0pYXmu4uZTgdTR1nEtZL3RPA rVyHEL2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXIR0-0004cz-UZ; Tue, 27 Oct 2020 06:26:18 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXIQy-0004cN-21 for openwrt-devel@lists.openwrt.org; Tue, 27 Oct 2020 06:26:16 +0000 Received: by mail-lf1-x142.google.com with SMTP id j30so863773lfp.4 for ; Mon, 26 Oct 2020 23:26:14 -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=ESmZIU+F25LccmIb48ytXfv4u2pKir1oIxvgax5MKJA=; b=V37wDW0UI+kWG8CnuLaWveoQpczxvXxy5d2NJpX2bNrvviUhF4N+rM0nqhLsZ2SWYZ 70XLJFDCS7I56We7MmFrtCwiBZfld8jNRXBonJp+D2WgJCTJHdoCJ8iZabbauPDKpEdS 1Kn0L1FnlmBUR0hq2ZB2gkD241VnNA/7rgkldz2/VzqWEZySc7deSmLy0xBo8cHKDZPf hE+WbbgD7x73rdxcQuqRMiwLYCJ5dIJxEs1+TNJWq7LgrwdGbMl+C9wqwoOsp9z/bT51 od/rstuLvToY0ATwPN0pbIActe5z2Kl5XIMGSgw3WPLXFLjn6U6/H5YhoOp+Z59iW1mf EQfw== 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=ESmZIU+F25LccmIb48ytXfv4u2pKir1oIxvgax5MKJA=; b=G4P2lqDdg8KosA9Z14I76wgpfNmvE7T58HEJasSI66V4NKmJoU7CQvcKP+cao4uXk2 /lCuPPfxN37xxVK0pJQBeGd1p3/PK4bttK6Ebec3w8lpqTPryF95v90tAnWj1jXoiCxB RGWXtPAeOo2/uZ8TebjxogGSVfOps05Ht4MX6VC1bicB9APD7T/cIqKvvJ9MhKgRJziA eemIP9A7uqZ5y9tV+6gzuSZ3jWDMZjhJ6Zdkp+lOhAXIG3lvo1BDhNXuaxfsy8jv8jXK 4C3AHZq/TuZcN3OhCq69Xaj71ehvyxftkPnFkixuev59yj4qKBWkltNkerGJ43rLSuKU wNCg== X-Gm-Message-State: AOAM5325yTXFXisI0QVU330SBl8LvmwdCmF9TigyUPof5004bduw0+g/ irHBNo8d3eIUqDZekVSEupisExEf9gs= X-Google-Smtp-Source: ABdhPJwv+WPknFsnsD1gLgWFygVXLP8f5GgbtofoVWrYjiJNwqA72UnTOLUVRZrkUt45pIePlw0PAw== X-Received: by 2002:a05:6512:3496:: with SMTP id v22mr262789lfr.230.1603779973288; Mon, 26 Oct 2020 23:26:13 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id m29sm53497ljb.111.2020.10.26.23.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 23:26:12 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 09R6Q9VH007498; Tue, 27 Oct 2020 09:26:10 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 09R6Q8f6007497; Tue, 27 Oct 2020 09:26:09 +0300 From: Paul Fertser To: openwrt-devel@lists.openwrt.org Subject: [PATCH] ath79: fix ath10k caldata extraction on some D-Link DIR-842 C3 devices Date: Tue, 27 Oct 2020 09:26:06 +0300 Message-Id: <20201027062606.7457-1-fercerpav@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_022616_132157_A6F5FFE4 X-CRM114-Status: GOOD ( 13.76 ) 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 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [fercerpav[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:142 listed in] [list.dnswl.org] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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_AU Message has a valid DKIM or DK signature from author's 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: Paul Fertser Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org According to forum threads [0][1] and a report on IRC by Doc-Saintly some of those boards have calibration data in a different place. Only one alternative location is known. Without proper board calibration data (board.bin having all 0xff bytes) ath10k firmware still tries to load but crashes on startup with a confusing error message. If you're applying this patch manually on your device do not forget to remove /lib/firmware/ath10k/pre-cal-pci-0000:00:00.0.bin and reboot to force caldata re-extraction. [0] https://forum.openwrt.org/t/support-for-d-link-dir842-rev-c3/41654 [1] https://forum.openwrt.org/t/d-link-dir-842-cant-access-firmware-upload-form/65454 Signed-off-by: Paul Fertser --- .../generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 25e864ba72..79003929df 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -170,6 +170,7 @@ case "$FIRMWARE" in dlink,dir-842-c3|\ nec,wg1200cr) caldata_extract "art" 0x5000 0x2f20 + caldata_valid "202f" || caldata_extract "reserved" 0x15000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac) ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin