From patchwork Fri May 8 21:04:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spencer Thomason X-Patchwork-Id: 470187 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1DFFB140077 for ; Sat, 9 May 2015 07:05:19 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id AAC5028BDB1; Fri, 8 May 2015 23:03:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 35C2C28424A for ; Fri, 8 May 2015 23:03:48 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .cleanrouter. - helo: .p3plsmtpa09-02.prod.phx3.secureserver. - helo-domain: .secureserver.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from p3plsmtpa09-02.prod.phx3.secureserver.net (p3plsmtpa09-02.prod.phx3.secureserver.net [173.201.193.231]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 8 May 2015 23:03:42 +0200 (CEST) Received: from mail-ie0-f169.google.com ([209.85.223.169]) by p3plsmtpa09-02.prod.phx3.secureserver.net with id RZ4q1q00C3fuNmh01Z4qJc; Fri, 08 May 2015 14:04:51 -0700 Received: by iepj10 with SMTP id j10so69788140iep.0 for ; Fri, 08 May 2015 14:04:50 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.178.230 with SMTP id db6mr111280igc.26.1431119090160; Fri, 08 May 2015 14:04:50 -0700 (PDT) Received: by 10.36.112.131 with HTTP; Fri, 8 May 2015 14:04:50 -0700 (PDT) Date: Fri, 8 May 2015 14:04:50 -0700 Message-ID: From: Spencer Thomason To: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH] TP-LINK Archer C7 () JFFS2 only 5GHz fix X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" If you select a JFFS2 only build for the TP-Link Archer C7 then the ath10k drivers blob doesn't load and the 5GHz band doesn't work at all. It looks like the partitions were hard-coded for sqashfs. This patch allows both squashfs and JFFS2 to work. Signed-off-by: Spencer Thomason diff --git a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin index 9a32dfc..6ab8023 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin +++ b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin @@ -14,13 +14,15 @@ do_load_ath10k_board_bin() { archer-c5 | \ archer-c7) local mac + local mtdpart mac=$(macaddr_add $(cat /sys/class/net/eth1/address) -2) + mtdpart=$(find_mtd_part "art") - dd if=/dev/mtdblock4 \ + dd if=$mtdpart \ bs=1 skip=20480 count=6 \ of=/tmp/ath10k-board.bin macaddr_2bin $mac >> /tmp/ath10k-board.bin - dd if=/dev/mtdblock4 \ + dd if=$mtdpart \ bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin ;; mc-mac1200r)