From 3d680c57286a2f77b9cfba275756c711730c7fe2 Mon Sep 17 00:00:00 2001 From: Jasper Scholte Date: Sun, 14 Aug 2016 23:30:44 +0200 Subject: ramips: add support for Sitecom WLR-6000 The Sitecom firmware upgrade file has SENAO_FIRMWARE_TYPE 2 set. This looks rather wrong since SENAO_FIRMWARE_TYPE 2 is kernel only but the file is way to big for only including a kernel. The factory image need to have the dlf file extension. Otherwise the Sitecom firmware rejects the file. The stock firmware uses the following mac addresses: LAN: 00:0C:F6:AA:BB:D8 (u-boot env: ethaddr) 2,4: 00:0C:F6:AA:BB:D8 (EEPROM) 5: 00:0C:F6:AA:BB:DC (EEPROM) WAN: 00:0C:F6:AA:C8:43 (u-boot env: wanaddr) Assuming the mac address range :D8 to :DC is reserved for this device, the MAC addresses were reorder to have a unique MAC address for each interface: 2.4GHz: 00:0C:F6:AA:BB:D8 LAN: 00:0C:F6:AA:BB:D9 WAN: 00:0C:F6:AA:BB:DA 5 GHz: 00:0C:F6:AA:BB:DC The first MAC is assigned to the 2.4GHz WiFi interface to keep compatibility with the SSIDs printed on the case, which have the last three sextets of the MAC address appended. There are still issues with the rt2x00 driver. It is not possible to use both wireless interfaces at the same time. The 2.4 GHz wireless (PCIe) only works if the internal 5GHz wireless is/has been enabled or used for scanning. The internal 5GHz wireless only works if the 2.4GHz wireless (PCIe) was never enabled. Disabling the 2.4Ghz after it was enabled will result in stations seeing the 5Ghz AP but are unable to connect. Due to the not optimal working wifi the manufacture, backup and storage partitions of the OEM firmware are kept for now to allow an easy switch back to the Sitecom firmware. Signed-off-by: Jasper Scholte Signed-off-by: Mathias Kresin --- target/linux/ramips/base-files/etc/board.d/02_network | 6 +++++- target/linux/ramips/base-files/etc/diag.sh | 3 +++ target/linux/ramips/base-files/lib/ramips.sh | 3 +++ target/linux/ramips/base-files/lib/upgrade/platform.sh | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) (limited to 'target/linux/ramips/base-files') diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 537448ec9d..1e97c3b3c2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -226,7 +226,8 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0" ;; tew-691gr|\ - tew-692gr) + tew-692gr|\ + wlr-6000) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" ;; @@ -383,6 +384,9 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory 4) wan_mac=$(mtd_get_mac_binary factory 40) ;; + wlr-6000) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2) + ;; wsr-1166) local index="$(find_mtd_index "board_data")" wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)" diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index f3910c7cba..52baa0b23e 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -207,6 +207,9 @@ get_status_led() { status_led="$board:amber:power" ;; whr-g300n|\ + wlr-6000) + status_led="$board:red:power" + ;; wzr-agl300nh) status_led="$board:green:router" ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index ee9073238d..c62f5f6a93 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -508,6 +508,9 @@ ramips_board_detect() { *"WLI-TX4-AG300N") name="wli-tx4-ag300n" ;; + *"WLR-6000") + name="wlr-6000" + ;; *"WMR-300") name="wmr-300" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index d5d0463a60..fa108b6ce4 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -148,6 +148,7 @@ platform_check_image() { wl-351|\ wl-wn575a3|\ wli-tx4-ag300n|\ + wlr-6000|\ wmr-300|\ wnce2001|\ wndr3700v5|\ -- cgit v1.2.3