aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/nand
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/nand')
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom4
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac18
2 files changed, 18 insertions, 4 deletions
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index d2f8bae1ca..f5fae46dfb 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -15,10 +15,6 @@ case "$FIRMWARE" in
netgear,wndr4500-v3)
caldata_extract "caldata" 0x1000 0x440
;;
- zyxel,nbg6716)
- caldata_extract "art" 0x1000 0x440
- ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
- ;;
*)
caldata_die "board $board is not supported yet"
;;
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
new file mode 100644
index 0000000000..6c61e5df00
--- /dev/null
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
@@ -0,0 +1,18 @@
+[ "$ACTION" = "add" ] || exit 0
+
+PHYNBR=${DEVPATH##*/phy}
+
+[ -n $PHYNBR ] || exit 0
+
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(board_name)
+
+case $board in
+ zyxel,nbg6716)
+ # Set mac address for 2.4g device
+ [ "$PHYNBR" -eq 1 ] && \
+ mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
+ ;;
+esac