aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mpc85xx/base-files/etc/hotplug.d
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-09-22 11:57:14 +0200
committerDavid Bauer <mail@david-bauer.net>2019-10-14 12:36:02 +0200
commit2c60de0e3f8cbe088fe8e495697cb9e98380710d (patch)
treea632a507208870d4b589dd7ee63d184ba6e2d0f3 /target/linux/mpc85xx/base-files/etc/hotplug.d
parent5b6a80909280cafcb1e28ca120eed6922d68dc5a (diff)
downloadupstream-2c60de0e3f8cbe088fe8e495697cb9e98380710d.tar.gz
upstream-2c60de0e3f8cbe088fe8e495697cb9e98380710d.tar.bz2
upstream-2c60de0e3f8cbe088fe8e495697cb9e98380710d.zip
treewide: move MAC address patch functions to common library
This unifies MAC address patch functions and moves them to a common script. While those were implemented differently for different targets, they all seem to do the same. The number of different variants is significantly reduced by this patch. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/mpc85xx/base-files/etc/hotplug.d')
-rw-r--r--target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom15
1 files changed, 2 insertions, 13 deletions
diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index bcde02593a..be6ee40389 100644
--- a/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -4,17 +4,6 @@
. /lib/functions/caldata.sh
-tpl_set_wireless_mac()
-{
- local offset=$1
- local mac
-
- mac=$(mtd_get_mac_binary u-boot 0x4fc00)
- mac=$(macaddr_add $mac $offset)
-
- macaddr_2bin $mac | dd bs=1 count=6 seek=2 conv=notrunc of=/lib/firmware/$FIRMWARE 2>/dev/null
-}
-
board=$(board_name)
case "$FIRMWARE" in
@@ -22,7 +11,7 @@ case "$FIRMWARE" in
case $board in
tplink,tl-wdr4900-v1)
caldata_extract "caldata" 0x1000 0x800
- tpl_set_wireless_mac 0
+ ath9k_patch_mac $(mtd_get_mac_binary u-boot 0x4fc00)
;;
*)
caldata_die "board $board is not supported yet"
@@ -34,7 +23,7 @@ case "$FIRMWARE" in
case $board in
tplink,tl-wdr4900-v1)
caldata_extract "caldata" 0x5000 0x800
- tpl_set_wireless_mac -1
+ ath9k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x4fc00) -1)
;;
*)
caldata_die "board $board is not supported yet"