From d4c460648dc28a7e8f2082101159971f6858c743 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sat, 12 Nov 2022 12:13:46 +0000 Subject: ipq40xx: add support for Mikrotik wAP R ac / LTE / LTE6 The Mikrotik wAP R AC is an outdoor, dual band, dual radio (802.11ac) AP with a miniPCIe slot for a LTE modem. The wAP R AC is similar to the wAP AC but with the miniPCIe slot. The wAP R AC requires installing a LTE modem. The wAP LTE and wAP LTE6 comes with a LTE modem installed. See https://mikrotik.com/product/wap_r_ac for more info. Specifications: - SoC: Qualcomm Atheros IPQ4018 - CPU: 4x ARM Cortex A7 - RAM: 128MB - Storage: 16MB NOR flash - Wireless: - Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, internal antenna - Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, internal antenna - Ethernet: Built-in IPQ4018 (SoC, QCA8075) , 2x 1000/100/10 ports one with 802.3af/at PoE in - 1x Mini PCI-E port (USB2) Installation: Boot the initramfs image via TFTP, then flash the sysupgrade image using sysupgrade. Details at https://openwrt.org/toh/mikrotik/common. Signed-off-by: Alexander Couzens --- target/linux/ipq40xx/base-files/etc/board.d/02_network | 4 +++- .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 16 ++++++++++++---- .../base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh | 4 +++- target/linux/ipq40xx/base-files/lib/upgrade/platform.sh | 4 +++- 4 files changed, 21 insertions(+), 7 deletions(-) (limited to 'target/linux/ipq40xx/base-files') diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 24b59d6630..74f39ef6de 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -64,7 +64,9 @@ ipq40xx_setup_interfaces() mobipromo,cm520-79f) ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" ;; - mikrotik,wap-ac) + mikrotik,wap-ac|\ + mikrotik,wap-ac-lte|\ + mikrotik,wap-r-ac) ucidef_set_interface_lan "sw-eth1 sw-eth2" ;; netgear,rbr50|\ diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 7498e1c710..7f41bdcfcc 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -113,7 +113,9 @@ case "$FIRMWARE" in mikrotik,hap-ac2 |\ mikrotik,hap-ac3 |\ mikrotik,hap-ac3-lte6-kit |\ - mikrotik,wap-ac) + mikrotik,wap-ac |\ + mikrotik,wap-ac-lte |\ + mikrotik,wap-r-ac) wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x0 0x2f20 ) || \ ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_0" 0x0 0x2f20 ) @@ -207,7 +209,9 @@ case "$FIRMWARE" in mikrotik,hap-ac3 |\ mikrotik,hap-ac3-lte6-kit |\ mikrotik,sxtsq-5-ac |\ - mikrotik,wap-ac) + mikrotik,wap-ac |\ + mikrotik,wap-ac-lte |\ + mikrotik,wap-r-ac) wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x8000 0x2f20 ) || \ ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_2" 0x0 0x2f20 ) @@ -243,7 +247,9 @@ case "$FIRMWARE" in mikrotik,hap-ac2 |\ mikrotik,hap-ac3 |\ mikrotik,hap-ac3-lte6-kit |\ - mikrotik,wap-ac) + mikrotik,wap-ac |\ + mikrotik,wap-ac-lte |\ + mikrotik,wap-r-ac) wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x2f20 0x2f20 ) || \ ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_0" 0x2f20 0x2f20 ) @@ -257,7 +263,9 @@ case "$FIRMWARE" in mikrotik,hap-ac3 |\ mikrotik,hap-ac3-lte6-kit |\ mikrotik,sxtsq-5-ac |\ - mikrotik,wap-ac) + mikrotik,wap-ac |\ + mikrotik,wap-ac-lte |\ + mikrotik,wap-r-ac) wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0xaf20 0x2f20 ) || \ ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_2" 0x2f20 0x2f20 ) diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index ddfef1ab2d..ce0b55bb80 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -29,7 +29,9 @@ preinit_set_mac_address() { ip link set dev lan1 address $(macaddr_add "$base_mac" 1) ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) ;; - mikrotik,wap-ac) + mikrotik,wap-ac|\ + mikrotik,wap-ac-lte|\ + mikrotik,wap-r-ac) base_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) ip link set dev sw-eth1 address "$base_mac" ip link set dev sw-eth2 address $(macaddr_add "$base_mac" 1) diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 6b8f62d735..12fa9699c5 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -177,7 +177,9 @@ platform_do_upgrade() { mikrotik,hap-ac3-lte6-kit|\ mikrotik,lhgg-60ad|\ mikrotik,sxtsq-5-ac|\ - mikrotik,wap-ac) + mikrotik,wap-ac|\ + mikrotik,wap-ac-lte|\ + mikrotik,wap-r-ac) [ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware default_do_upgrade "$1" ;; -- cgit v1.2.3