From e774d83652cf24eca973410f6786dc1298bf4a5e Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 27 Dec 2017 13:21:44 +0100 Subject: [PATCH] ar71xx: fix Archer C7 5GHz MAC-address The TP-Link firmware uses (primary_mac-1) as MAC-address for the 5GHz WiFi. This applies the same behaviour to LEDE. Currently, the MAC-address is retrieved from eth1, which does not exist on the Archer C7 v4. As a result from this, every C7 v4 with LEDE carries the same MAC-Address on the 5GHz WiFi. --- ...r71xx-fix-Archer-C7-5GHz-MAC-address.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 patches/lede/0048-ar71xx-fix-Archer-C7-5GHz-MAC-address.patch diff --git a/patches/lede/0048-ar71xx-fix-Archer-C7-5GHz-MAC-address.patch b/patches/lede/0048-ar71xx-fix-Archer-C7-5GHz-MAC-address.patch new file mode 100644 index 00000000..3ae0b9c8 --- /dev/null +++ b/patches/lede/0048-ar71xx-fix-Archer-C7-5GHz-MAC-address.patch @@ -0,0 +1,36 @@ +From: David Bauer +Date: Tue, 19 Dec 2017 02:32:47 +0100 +Subject: ar71xx: fix Archer C7 5GHz MAC-address + +The TP-Link firmware uses (primary_mac-1) as MAC-address +for the 5GHz WiFi. This applies the same behaviour to LEDE. + +Currently, the MAC-address is retrieved from eth1, which +does not exist on the Archer C7 v4. As a result from this, +every C7 v4 with LEDE carries the same MAC-Address on the 5GHz WiFi. + +Signed-off-by: David Bauer + +diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +index 96b8f6b9a4bdd6a1609a819e72ade315bccfb3c0..607bbd2c0ec4b59ba569550e9e0e87b80c7ddddb 100644 +--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata ++++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +@@ -47,6 +47,10 @@ board=$(ar71xx_board_name) + case "$FIRMWARE" in + "ath10k/cal-pci-0000:00:00.0.bin") + case $board in ++ archer-c7-v4) ++ ath10kcal_extract "art" 20480 2116 ++ ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) ++ ;; + cf-e380ac-v1|\ + cf-e380ac-v2|\ + dlan-pro-1200-ac|\ +@@ -92,7 +96,6 @@ case "$FIRMWARE" in + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2) + ;; +- archer-c7-v4|\ + archer-c25-v1|\ + tl-wdr6500-v2) + ath10kcal_extract "art" 20480 2116