1 add support
for loco XW. This is a backport
patch from OpenWRT trunk.
3 --- a/openwrt/target/linux/ar71xx/patches-3.10/616-MIPS-ath79-
ubnt-xw.patch
4 +++ b/openwrt/target/linux/ar71xx/patches-3.10/616-MIPS-ath79-
ubnt-xw.patch
6 --- a/arch/mips/ath79/mach-
ubnt-xm.c
7 +++ b/arch/mips/ath79/mach-
ubnt-xm.c
8 -@@ -332,3 +332,60 @@
static void __init ubnt_uap_pro_setup(vo
9 +@@ -332,3 +332,78 @@
static void __init ubnt_uap_pro_setup(vo
10 MIPS_MACHINE(ATH79_MACH_UBNT_UAP_PRO,
"UAP-PRO",
"Ubiquiti UniFi AP Pro",
17 -+
static void __init ubnt_nano_m_xw_setup(
void)
18 ++
static void __init ubnt_xw_init(
void)
20 + u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
23 + ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
24 + ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
26 -+ ath79_register_mdio(0, ~(BIT(0) | BIT(1) | BIT(5)));
28 + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_MII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0_SLAVE);
29 + ath79_init_mac(ath79_eth0_data.mac_addr,
30 + eeprom + UAP_PRO_MAC0_OFFSET, 0);
33 + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
34 ++ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
37 ++
static void __init ubnt_nano_m_xw_setup(
void)
42 ++ ath79_register_mdio(0, ~(BIT(0) | BIT(1) | BIT(5)));
43 + ath79_eth0_data.phy_mask = (BIT(0) | BIT(1) | BIT(5));
44 + ath79_eth0_data.speed = SPEED_100;
45 + ath79_eth0_data.duplex = DUPLEX_FULL;
46 -+ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
47 ++ ath79_register_eth(0);
50 ++
static void __init ubnt_loco_m_xw_setup(
void)
54 ++ ath79_register_mdio(0, ~BIT(1));
55 ++ ath79_eth0_data.phy_mask = BIT(1);
56 + ath79_register_eth(0);
59 +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
"UBNT-NM-XW",
"Ubiquiti Nanostation M XW",
60 + ubnt_nano_m_xw_setup);
62 ++MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW,
"UBNT-LOCO-XW",
"Ubiquiti Loco M XW",
63 ++ ubnt_loco_m_xw_setup);
64 --- a/arch/mips/ath79/machtypes.h
65 +++ b/arch/mips/ath79/machtypes.h
66 -@@ -124,6 +124,7 @@
enum ath79_mach_type {
67 +@@ -121,9 +121,11 @@
enum ath79_mach_type {
68 + ATH79_MACH_TL_WR941ND,
69 + ATH79_MACH_UBNT_AIRROUTER,
70 + ATH79_MACH_UBNT_BULLET_M,
71 ++ ATH79_MACH_UBNT_LOCO_M_XW,
72 ATH79_MACH_UBNT_LSSR71,
74 ATH79_MACH_UBNT_NANO_M,
75 --- a/openwrt/target/linux/ar71xx/base-files/etc/diag.sh
76 +++ b/openwrt/target/linux/ar71xx/base-files/etc/diag.sh
77 @@ -34,7 +34,7 @@ get_status_led() {
79 status_led=
"aw-nr580:green:ready"
81 - bullet-m | rocket-m | nano-m | nanostation-m | nanostation-m-xw)
82 + bullet-m | rocket-m | nano-m | nanostation-m | nanostation-m-xw | loco-m-xw)
83 status_led="
ubnt:green:link4"
86 --- a/openwrt/target/linux/ar71xx/base-files/etc/uci-
defaults/01_leds
87 +++ b/openwrt/target/linux/ar71xx/base-files/etc/uci-
defaults/01_leds
88 @@ -38,7 +38,8 @@ ap113)
95 ucidef_set_led_rssi "rssilow" "RSSILOW" "
ubnt:red:link1" "wlan0" "1" "100" "0" "13"
96 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "
ubnt:orange:link2" "wlan0" "26" "100" "-25" "13"
97 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "
ubnt:green:link3" "wlan0" "51" "100" "-50" "13"
98 --- a/openwrt/target/linux/ar71xx/base-files/etc/uci-
defaults/02_network
99 +++ b/openwrt/target/linux/ar71xx/base-files/etc/uci-
defaults/02_network
100 @@ -286,6 +286,7 @@ bullet-m |\
108 --- a/openwrt/target/linux/ar71xx/base-files/lib/ar71xx.
sh
109 +++ b/openwrt/target/linux/ar71xx/base-files/lib/ar71xx.
sh
120 --- a/openwrt/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
121 +++ b/openwrt/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
122 @@ -190,6 +190,7 @@ platform_check_image() {
130 --- a/openwrt/target/linux/ar71xx/image/
Makefile
131 +++ b/openwrt/target/linux/ar71xx/image/
Makefile
132 @@ -1246,6 +1246,7 @@ $(eval $(call SingleProfile,UBNTXM,64kra
133 $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTUNIFI,
ubnt-unifi,UBNT-UF,ttyS0,115200,XM,BZ,ar7240))
134 $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTUNIFIOUTDOOR,
ubnt-unifi-outdoor,UBNT-U20,ttyS0,115200,XM,BZ,ar7240))
135 $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTNANOMXW,
ubnt-nano-m-xw,UBNT-NM-XW,ttyS0,115200,XM,XW,ar934x))
136 +$(eval $(call SingleProfile,UBNTXM,64kraw,UBNTLOCOXW,
ubnt-loco-m-xw,UBNT-LOCO-XW,ttyS0,115200,XM,XW,ar934x))
137 $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTAIRGW,
ubnt-air-gateway,UBNT-AGW,ttyATH0,115200,XM,AirGW,ar933x))
139 $(eval $(call SingleProfile,WHRHPG300N,64kraw,WHRG301N,whr-g301n,WHR-G301N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-G301N))
140 @@ -1291,7 +1292,7 @@ $(eval $(call MultiProfile,TLWR941,TLWR9
141 $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
142 $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
143 $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
144 -$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTUNIFI UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW))
145 +$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW))
146 $(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDR3800CH WNDRMAC WNDRMACV2))
147 $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
148 $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
149 --- a/openwrt/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
150 +++ b/openwrt/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
152 #include
"dev-ap9x-pci.h"
154 #include
"dev-gpio-buttons.h"
155 -@@ -389,3 +391,65 @@
static void __init ubnt_nano_m_xw_setup(
156 +@@ -406,3 +408,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
158 - MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
"UBNT-NM-XW",
"Ubiquiti Nanostation M XW",
159 - ubnt_nano_m_xw_setup);
160 + MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW,
"UBNT-LOCO-XW",
"Ubiquiti Loco M XW",
161 + ubnt_loco_m_xw_setup);
163 +
static struct gpio_led ubnt_airgateway_gpio_leds[] __initdata = {
166 + ATH79_MACH_UBNT_AIRGW,
167 ATH79_MACH_UBNT_AIRROUTER,
168 ATH79_MACH_UBNT_BULLET_M,
169 - ATH79_MACH_UBNT_LSSR71,
170 + ATH79_MACH_UBNT_LOCO_M_XW,