aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/base-files')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/01_leds10
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/ar71xx/base-files/etc/diag.sh1
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom21
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh3
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh1
6 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 87f99ea9d8..d80efefc34 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -242,6 +242,16 @@ ens202ext)
f9k1115v2)
ucidef_set_led_usbdev "usb2" "USB2" "belkin:green:usb2" "1-1"
;;
+fritz300e)
+ ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
+ ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+ ucidef_set_rssimon "wlan0" "200000" "1"
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:green:rssi0" "wlan0" "1" "100"
+ ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$board:green:rssi1" "wlan0" "20" "100"
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$board:green:rssi2" "wlan0" "40" "100"
+ ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$board:green:rssi3" "wlan0" "60" "100"
+ ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:green:rssi4" "wlan0" "80" "100"
+ ;;
rb-750)
ucidef_set_led_default "act" "act" "rb750:green:act" "1"
ucidef_set_led_netdev "port1" "port1" "rb750:green:port1" "eth1"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 80355d6160..9ff6dddd32 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -75,6 +75,7 @@ ar71xx_setup_interfaces()
eap300v2|\
eap7660d|\
el-mini|\
+ fritz300e|\
hiveap-121|\
loco-m-xw|\
mr12|\
@@ -518,6 +519,9 @@ ar71xx_setup_macs()
lan_mac=$(mtd_get_mac_binary caldata 0)
wan_mac=$(mtd_get_mac_binary caldata 6)
;;
+ fritz300e)
+ lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
+ ;;
tl-wr1043nd-v4)
wan_mac=$(mtd_get_mac_binary config 0x1017c)
;;
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index dce5d8e3cf..936a1148d0 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -54,6 +54,7 @@ get_status_led() {
archer-c25-v1|\
archer-c59-v1|\
archer-c60-v1|\
+ fritz300e|\
mr12|\
mr16|\
nbg6616|\
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 4db1b148a2..b4d7817569 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -40,6 +40,24 @@ ath9k_ubi_eeprom_extract() {
ath9k_eeprom_die "failed to extract from $ubi"
}
+ath9k_eeprom_extract_reverse() {
+ local part=$1
+ local offset=$2
+ local count=$3
+ local mtd
+ local reversed
+ local caldata
+
+ mtd=$(find_mtd_chardev "$part")
+ reversed=$(hexdump -v -s $offset -n $count -e '/1 "%02x "' $mtd)
+
+ for byte in $reversed; do
+ caldata="\x${byte}${caldata}"
+ done
+
+ printf "%b" "$caldata" > /lib/firmware/$FIRMWARE
+}
+
ath9k_patch_firmware_mac() {
local mac=$1
@@ -99,6 +117,9 @@ case "$FIRMWARE" in
ath9k_eeprom_extract "art" 20480 2048
ath9k_patch_firmware_mac $(macaddr_add $(mtd_get_mac_binary art 0) +2)
;;
+ fritz300e)
+ ath9k_eeprom_extract_reverse "urloader" 5441 1088
+ ;;
mr18)
. /lib/upgrade/nand.sh
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a1abfa047d..ecc8dab36c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -640,6 +640,9 @@ ar71xx_board_detect() {
*"ESR900")
name="esr900"
;;
+ *"FRITZ!WLAN Repeater 300E")
+ name="fritz300e"
+ ;;
*"GL AR150")
name="gl-ar150"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 4ee467180d..60e41c862e 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -647,6 +647,7 @@ platform_check_image() {
return 0;
;;
# these boards use metadata images
+ fritz300e|\
rb-750-r2|\
rb-750up-r2|\
rb-941-2nd|\