diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-09-22 11:57:14 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2019-10-14 12:36:02 +0200 |
commit | 2c60de0e3f8cbe088fe8e495697cb9e98380710d (patch) | |
tree | a632a507208870d4b589dd7ee63d184ba6e2d0f3 /target/linux/apm821xx/base-files | |
parent | 5b6a80909280cafcb1e28ca120eed6922d68dc5a (diff) | |
download | upstream-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/apm821xx/base-files')
-rw-r--r-- | target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 07100b1856..ee58901d18 100644 --- a/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -4,14 +4,6 @@ . /lib/functions/caldata.sh -ath9k_patch_firmware_mac() { - local mac=$1 - - [ -z "$mac" ] && return - - macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6 -} - board=$(board_name) case "$FIRMWARE" in @@ -24,7 +16,7 @@ case "$FIRMWARE" in caldata_extract_ubi "caldata" 0x5000 0x1000 else caldata_extract "wifi_data" 0x5000 0x1000 - ath9k_patch_firmware_mac $(mtd_get_mac_binary wifi_data 0xc) + ath9k_patch_mac $(mtd_get_mac_binary wifi_data 0xc) fi ;; *) @@ -42,7 +34,7 @@ case "$FIRMWARE" in caldata_extract_ubi "caldata" 0x1000 0x1000 else caldata_extract "wifi_data" 0x1000 0x1000 - ath9k_patch_firmware_mac $(mtd_get_mac_binary wifi_data 0x0) + ath9k_patch_mac $(mtd_get_mac_binary wifi_data 0x0) fi ;; *) |