From: Matthias Schiffer Date: Fri, 13 May 2016 21:24:44 +0200 Subject: ar71xx: Rename unifiac to unifiac-lite To avoid confusion with different unifiac devices, rename existing target "unifiac" to "unifiac-lite", before "unifiac-pro" is introduced. Signed-off-by: P.Wassi Backport of LEDE c855e70491fbd5d432915c4cbeb3b80f3a117e30 diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 3adc449..924c116 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -310,7 +310,7 @@ get_status_led() { status_led="ubnt:green:dome" ;; uap-pro | \ - unifiac) + unifiac-lite) status_led="ubnt:white:dome" ;; unifi-outdoor-plus) diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index ab7d93c..7777734 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -81,7 +81,7 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; - unifiac) + unifiac-lite) ath10kcal_extract "EEPROM" 20480 2116 ;; esac diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index a79376a..2007042 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -369,7 +369,7 @@ tl-wa901nd-v3 |\ tl-wa901nd-v4 |\ tl-wr703n |\ tube2h |\ -unifiac |\ +unifiac-lite |\ wndap360 |\ mynet-rext |\ wp543) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index ecf584d..6bc0b86 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -902,8 +902,8 @@ ar71xx_board_detect() { *UniFi) name="unifi" ;; - *"UniFi-AC") - name="unifiac" + *"UniFi-AC-LITE") + name="unifiac-lite" ;; *"UniFi AP Pro") name="uap-pro" diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index fff1c3c..90f961f 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -252,7 +252,7 @@ platform_check_image() { wlae-ag300n | \ nbg460n_550n_550nh | \ unifi | \ - unifiac | \ + unifiac-lite | \ unifi-outdoor | \ carambola2 | \ weio ) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c index 072cf12..31cbe30 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c @@ -73,7 +73,7 @@ static struct gpio_keys_button ubnt_unifiac_gpio_keys[] __initdata = { } }; -static void __init ubnt_unifiac_setup(void) +static void __init ubnt_unifiac_lite_setup(void) { u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000); @@ -81,7 +81,7 @@ static void __init ubnt_unifiac_setup(void) ath79_init_mac(ath79_eth0_data.mac_addr, - eeprom + UNIFIAC_MAC0_OFFSET, 0); + eeprom + UNIFIAC_MAC0_OFFSET, 0); ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; @@ -99,12 +99,12 @@ static void __init ubnt_unifiac_setup(void) ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifiac_leds_gpio), - ubnt_unifiac_leds_gpio); + ubnt_unifiac_leds_gpio); ath79_register_gpio_keys_polled(-1, UNIFIAC_KEYS_POLL_INTERVAL, - ARRAY_SIZE(ubnt_unifiac_gpio_keys), - ubnt_unifiac_gpio_keys); + ARRAY_SIZE(ubnt_unifiac_gpio_keys), + ubnt_unifiac_gpio_keys); } -MIPS_MACHINE(ATH79_MACH_UBNT_UNIFIAC, "UBNT-UF-AC", "Ubiquiti UniFi-AC", - ubnt_unifiac_setup); +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFIAC_LITE, "UBNT-UF-AC-LITE", "Ubiquiti UniFi-AC-LITE", + ubnt_unifiac_lite_setup); diff --git a/target/linux/ar71xx/generic/profiles/ubnt.mk b/target/linux/ar71xx/generic/profiles/ubnt.mk index 94eff18..eac0240 100644 --- a/target/linux/ar71xx/generic/profiles/ubnt.mk +++ b/target/linux/ar71xx/generic/profiles/ubnt.mk @@ -38,16 +38,16 @@ endef $(eval $(call Profile,UBNTUNIFI)) -define Profile/UBNTUNIFIAC - NAME:=Ubiquiti UniFi AP AC +define Profile/UBNTUNIFIACLITE + NAME:=Ubiquiti UniFi AP AC LITE/LR PACKAGES:=kmod-ath10k ath10k-firmware-qca988x endef -define Profile/UBNTUNIFIAC/Description - Package set optimized for the Ubiquiti UniFi AP AC. +define Profile/UBNTUNIFIACLITE/Description + Package set optimized for the Ubiquiti UniFi AP AC LITE/LR. endef -$(eval $(call Profile,UBNTUNIFIAC)) +$(eval $(call Profile,UBNTUNIFIACLITE)) define Profile/UBNTUNIFIOUTDOOR NAME:=Ubiquiti UniFiAP Outdoor diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index aaaf89a..42ffc69 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -741,14 +741,19 @@ endef TARGET_DEVICES += oolite define Device/ubnt-unifiac - DEVICE_PROFILE := UBNT UBNTUNIFIAC + DEVICE_PROFILE := UBNT IMAGE_SIZE := 7744k MTDPARTS = spi0.0:384k(u-boot)ro,64k(u-boot-env)ro,7744k(firmware),7744k(ubnt-airos)ro,128k(bs)ro,256k(cfg)ro,64k(EEPROM)ro IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin = append-kernel $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) - BOARDNAME := UBNT-UF-AC endef -TARGET_DEVICES += ubnt-unifiac + +define Device/ubnt-unifiac-lite + $(Device/ubnt-unifiac) + DEVICE_PROFILE := UBNT UBNTUNIFIACLITE + BOARDNAME := UBNT-UF-AC-LITE +endef +TARGET_DEVICES += ubnt-unifiac-lite rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1))) diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch index 27dc73f..9a28f58 100644 --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch @@ -165,7 +165,7 @@ + ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */ ATH79_MACH_UBNT_UAP_PRO, /* Ubiquiti UniFi AP Pro */ ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */ -+ ATH79_MACH_UBNT_UNIFIAC, /* Ubiquiti Unifi AC */ ++ ATH79_MACH_UBNT_UNIFIAC_LITE, /* Ubiquiti Unifi AC LITE/LR */ ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */ + ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */ ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */ @@ -1369,7 +1369,7 @@ Ubiquiti Networks XM (rev 1.0) board. +config ATH79_MACH_UBNT_UNIFIAC -+ bool "Ubiquiti UniFi AC (LITE) support" ++ bool "Ubiquiti UniFi AC (LITE/LR) support" + select SOC_QCA956X + select ATH79_DEV_AP9X_PCI if PCI + select ATH79_DEV_ETH