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 3adc449b23e9c590d57cdd914b6c8d990a50e0b0..924c1163e26eb84b71e4734b95221104674bfe3e 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 ab7d93c693f8422bbb518c6accd4ffed169398cd..7777734ae3899840c1c47e7b24373b4bceee0adc 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 a79376a8cff56b144268130a24a930ff2bee95cd..20070426fd033e4ff2e904f9247deed9eb48c3c3 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 ecf584d30ecae7a0e2601bed38c6cfad42cab124..6bc0b868423ef68fb83147c13b00163b29cf2aec 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 fff1c3c912cee678ea88e225958b28ceb4c4b742..90f961f3f0aaf3c76a0a8022258fbf5404165ca8 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 072cf12a31a0921a8e9b90689864f5d981cd2c32..31cbe30d3ff9b323cb336c62d6fe0d7a0c67ba42 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 94eff18318264de85ea459e94280c88726404888..eac02406bbbffebbcb20962929fb8254edba520e 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 aaaf89ac1a369431cf9bc15c13e774ba6826bbf3..42ffc69ca3f9b1cffa542fc2d06ead2ef224d6b2 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 27dc73ffa239979a799bbede72440907e9d0e187..9a28f58f67d5f98fcd4aa83dc09698705e2dfa3e 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