From patchwork Fri Feb 22 12:30:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Tunin X-Patchwork-Id: 1046790 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L5S5njnS"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="i2kiQJm8"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KOvCCeZS"; 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 445WGQ2ZGwz9s2R for ; Fri, 22 Feb 2019 23:43:10 +1100 (AEDT) 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=ifiSlJ8WhTNeHB9H23uyvzBvKNskkQo/UzgWKJZz9p4=; b=L5S5njnS3lS0z+ +MHbDnSMUMuziSUa8t/PNJ8BB1DqZgr+FuxyKJVQkuLbvuWCnM12uJXfaRQmkTXqwd8LbE2dnOldH rhfX7cMfX2fLcUnV+bTaOYzmQ4CtXGLQln/5Nl8LrjsPWO3U2vEZccOywOHlFEkbYeZpWDHYesDu2 CCSaSAqthj/g24CKM1ETbw6p/0rXrfkxSUxJMnilan3spej+Lx1Cn1Sx3kNvnxz7pgn41X3/4IMLv ojjnZco+mSD1b3CbL8LtpZN2NFjddnziqFmyArPZhTCZIttfIDQr+xYayWA9PLUXIksz2Qa+RXEdG mXQVp9lHTLdq64wPsgSA==; 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 1gxAAO-00023v-3B; Fri, 22 Feb 2019 12:43:00 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gxAAM-00021a-O4 for openwrt-devel@bombadil.infradead.org; Fri, 22 Feb 2019 12:42:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=fPOXbAkuIFwvIgITQdP0jsBng0pIFckTQJoMXwm8aQA=; b=i2kiQJm8JlV+ttJ89ToIDPX+E WBqfG/XLWGhi0oYXMAolWS7HeV6JbLFgWfGqVxxJiJxyDa/IwtuvysFlJbO55RMoxEhjc6hrWB9eX ps09ptvX8czub8VMcfw21dSJCiQo73dGQoEQSNzgQSvIj0TOgUbiwxVUGluQBRbHyf20ZMwxOkUf2 p9o8foDPAY4PLuk18a6W2CxbsLQGLhwH+IPAr5XZFm+H+NvIpDE8LZm1CD4HbOlXCtIxYFEecIPPW WxCu63BIpwpxQ7Y62T00Z5tdK6GzXBHa31rMRzUlr/rt5WEvNRyCN7XzBfsP/mDPtLh0p5+B33cPi cXigkiQrw==; Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gx9yp-0006Oy-0S for openwrt-devel@lists.openwrt.org; Fri, 22 Feb 2019 12:31:04 +0000 Received: by mail-lj1-x241.google.com with SMTP id j19so1577520ljg.5 for ; Fri, 22 Feb 2019 04:31:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=fPOXbAkuIFwvIgITQdP0jsBng0pIFckTQJoMXwm8aQA=; b=KOvCCeZSoT4LNJoM/15YrnI6dGnbvybSnG/Z2FDejLO+zKn9rqITQAFnpSFIWvSli+ sMnzr99XzOfHWj8WN8ZGoQ1DwI9L0ZvnP+KRBfx7pUU3N9sahoEM20BUrvfz59HxP26P lk1sIKhiuD6yO+nDcFvu9j6ezYxujS84H3oe7Asqkz1sLyhTjMponXw4iIRD2SjP6Fjr 5/jdkKWSA5MssGnjZ6HqMD5zmlpfo7EfC8Kw8+cUYR6sbv6ZMcdjJOOpVX72lFqhevPj jDoSY/AWbznXlM9RCQBJcQ93qRISjcpNNVZbHHZmxHB3yCFSHsf1LKRxok9+v0cSQyNl E+Ug== 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; bh=fPOXbAkuIFwvIgITQdP0jsBng0pIFckTQJoMXwm8aQA=; b=kaLrD8lQnUlrrM3Gs+RqTsV7+6Lm8LpiydgyofJIVNgHvAGnBt+S+i1aIN/lau1HlE LuxgodL+JdLskSMcQr+6kBotG30XCChRZcNGJflDfsiRxP7p4zkSihDVX6dKg7qgMyce Wo0TAvbPD4cr+rmH8Cn4q07y4WRjB/BAJsBnq1l+7kI+2eRe22l+4CJYcz4VRCfwngKN paB9s75dCDH3ldsTIlv3R3S/70eBYTpBdSVgVsBWaFuM/pHgr+2bgOs8Na7LizXTLcaF QYOzA/sZ71J5gQzqMMiEJfGGGWHi9YnIHJUQLy8EuxjwKYS0fgpgcR0s40XttLtCAu6+ ZHpg== X-Gm-Message-State: AHQUAuaTzWFqvgt4QH5sbFwcguf61CPxG2HdPAJLt/Iwn04wYf4XnIFX Sl4hiH8wMxHPSSWPIBbXQCvkdN+tr5E= X-Google-Smtp-Source: AHgI3IZDMxPndrCi1q4fiJCRpyZxRza68C6xSo2z1R/LzTVUDJPbAWosrpNTXgnIuhORGMYt3StZDw== X-Received: by 2002:a2e:8644:: with SMTP id i4mr2219618ljj.192.1550838657536; Fri, 22 Feb 2019 04:30:57 -0800 (PST) Received: from localhost.localdomain ([2001:470:dc6e:0:34f7:1822:81cd:6c00]) by smtp.gmail.com with ESMTPSA id p22sm457345ljb.93.2019.02.22.04.30.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Feb 2019 04:30:56 -0800 (PST) From: Dmitry Tunin To: openwrt-devel@lists.openwrt.org Date: Fri, 22 Feb 2019 15:30:39 +0300 Message-Id: <1550838639-32232-1-git-send-email-hanipouspilot@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190222_123103_123226_1059EE11 X-CRM114-Status: GOOD ( 11.63 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on casper.infradead.org summary: Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (hanipouspilot[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH] ath79: speed up ath9k-eeprom extraction 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: Dmitry Tunin , Christian Lamparter MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This is a simple copy of ipq40xx: speed up ath10k-caldata extraction commit /a69e101ed1169f562fc030a783cd997d3f066b16 Tested on DIR-825-B1 3768+0 records in 3768+0 records out real 0m 11.90s user 0m 0.03s sys 0m 9.94s 1+0 records in 1+0 records out real 0m 0.03s user 0m 0.00s sys 0m 0.03s With this change eeprom extraction is fast enough to get working Wi-Fi after initial install. Signed-off-by: Dmitry Tunin --- target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 8b217d1..84e4d07 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -20,7 +20,7 @@ ath9k_eeprom_extract() { [ -n "$mtd" ] || \ ath9k_eeprom_die "no mtd device found for partition $part" - dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \ ath9k_eeprom_die "failed to extract from $mtd" }