From aa42a39ce2d192a50ebe6f7e6ebac51ba4107830 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 12 Mar 2020 19:12:38 +0100 Subject: [PATCH] fff-network: use static MAC address location for TL-WR1043ND v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the moment, the ETHMESHMAC for the TL-WR1043ND v4 is loaded from the config partition. The data there is written by the stock firmware, and thus is dependent on the version installed before and may even vary in position. Instead, this patch uses the product-info partition, which is not modified by stock firmware. While at it, update the sourced library files and the comment for both v4 and v5. ref: https://github.com/openwrt/openwrt/commit/53839da46e6fb21e68b3878b4a2187c7d32d688e Signed-off-by: Adrian Schmutzler Reviewed-by: Fabian Bläse --- src/packages/fff/fff-network/Makefile | 2 +- .../fff/fff-network/ar71xx/network.tl-wr1043n-v5 | 7 +++---- .../fff/fff-network/ar71xx/network.tl-wr1043nd-v4 | 9 ++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile index 49623632..010f49b3 100644 --- a/src/packages/fff/fff-network/Makefile +++ b/src/packages/fff/fff-network/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-network -PKG_RELEASE:=15 +PKG_RELEASE:=16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 index 2079fd55..ec6d6717 100644 --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" BATMAN_PORTS="3 4 0t" . /lib/functions/system.sh -. /lib/functions/uci-defaults.sh -. /lib/ar71xx.sh +. /lib/functions.sh -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 +# Load second MAC address from flash because we haven't any interface with this +# address where we can copy it from ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) ROUTERMAC=$(cat /sys/class/net/eth0/address) diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 index 4d220760..ec6d6717 100644 --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" BATMAN_PORTS="3 4 0t" . /lib/functions/system.sh -. /lib/functions/uci-defaults.sh -. /lib/ar71xx.sh +. /lib/functions.sh -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 +# Load second MAC address from flash because we haven't any interface with this +# address where we can copy it from -ETHMESHMAC=$(mtd_get_mac_binary config 0x1017c) +ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) ROUTERMAC=$(cat /sys/class/net/eth0/address)