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/board.d/02_network6
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom44
2 files changed, 49 insertions, 1 deletions
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index 243c5bb7aa..60f085d378 100644
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -8,7 +8,8 @@ ath79_setup_interfaces()
case "$board" in
aerohive,hiveap-121|\
- glinet,gl-e750)
+ glinet,gl-e750|\
+ meraki,mr18)
ucidef_set_interface_lan "eth0"
;;
domywifi,dw33d)
@@ -102,6 +103,9 @@ ath79_setup_macs()
wan_mac=$(mtd_get_mac_binary art 0x0)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
+ meraki,mr18)
+ lan_mac=$(mtd_get_mac_binary_ubi board-config 102)
+ ;;
netgear,wndr3700-v4|\
netgear,wndr4300|\
netgear,wndr4300sw|\
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 36ab24e2df..c4ccb04f5b 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
@@ -12,6 +12,50 @@ case "$FIRMWARE" in
8dev,rambutan)
caldata_extract "caldata" 0x1000 0x800
;;
+ meraki,mr18)
+ . /lib/upgrade/nand.sh
+
+ if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
+ caldata_extract_ubi "caldata" 0x1000 0x440
+ else
+ caldata_extract "odm-caldata" 0x1000 0x440
+ fi
+ ath9k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi board-config 102) 1)
+ ;;
+ *)
+ caldata_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+"ath9k-eeprom-pci-0000:00:00.0.bin")
+ case $board in
+ meraki,mr18)
+ . /lib/upgrade/nand.sh
+
+ if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
+ caldata_extract_ubi "caldata" 0x5000 0x440
+ else
+ caldata_extract "odm-caldata" 0x5000 0x440
+ fi
+ ath9k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi board-config 102) 2)
+ ;;
+ *)
+ caldata_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+"ath9k-eeprom-pci-0000:01:00.0.bin")
+ case $board in
+ meraki,mr18)
+ . /lib/upgrade/nand.sh
+
+ if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
+ caldata_extract_ubi "caldata" 0x9000 0x440
+ else
+ caldata_extract "odm-caldata" 0x9000 0x440
+ fi
+ ath9k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi board-config 102) 3)
+ ;;
*)
caldata_die "board $board is not supported yet"
;;