Opennet Firmware
 Alle Dateien Funktionen Variablen Gruppen Seiten
openwrt_backport_loco_xw.patch
gehe zur Dokumentation dieser Datei
1 add support for loco XW. This is a backport patch from OpenWRT trunk.
2 
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
5 @@ -1,6 +1,6 @@
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",
11  ubnt_uap_pro_setup);
12 
13 @@ -29,7 +29,7 @@
14  + },
15  +};
16  +
17 -+static void __init ubnt_nano_m_xw_setup(void)
18 ++static void __init ubnt_xw_init(void)
19  +{
20  + u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
21  +
22 @@ -44,26 +44,48 @@
23  + ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
24  + ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
25  +
26 -+ ath79_register_mdio(0, ~(BIT(0) | BIT(1) | BIT(5)));
27  +
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);
31  +
32 -+ /* GMAC0 is connected to an AR8326 switch */
33  + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
34 ++ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
35 ++}
36 ++
37 ++static void __init ubnt_nano_m_xw_setup(void)
38 ++{
39 ++ ubnt_xw_init();
40 ++
41 ++ /* GMAC0 is connected to an AR8326 switch */
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);
48 ++}
49 ++
50 ++static void __init ubnt_loco_m_xw_setup(void)
51 ++{
52 ++ ubnt_xw_init();
53 ++
54 ++ ath79_register_mdio(0, ~BIT(1));
55 ++ ath79_eth0_data.phy_mask = BIT(1);
56  + ath79_register_eth(0);
57  +}
58  +
59  +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, "UBNT-NM-XW", "Ubiquiti Nanostation M XW",
60  + ubnt_nano_m_xw_setup);
61 ++
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, /* TP-LINK TL-WR941ND */
69 + ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
70 + ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
71 ++ ATH79_MACH_UBNT_LOCO_M_XW, /* Ubiquiti Loco M XW */
72  ATH79_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
73  ATH79_MACH_UBNT_LSX, /* Ubiquiti LSX */
74  ATH79_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation 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() {
78  aw-nr580)
79  status_led="aw-nr580:green:ready"
80  ;;
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"
84  ;;
85  bxu2000n-2-a1)
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)
89  bullet-m | \
90  nanostation-m | \
91  rocket-m | \
92 -nanostation-m-xw)
93 +nanostation-m-xw | \
94 +loco-m-xw)
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 |\
101  cap4200ag |\
102  eap300v2 |\
103  eap7660d |\
104 +loco-m-xw |\
105  mr600 |\
106  mr600v2 |\
107  rb-411 |\
108 --- a/openwrt/target/linux/ar71xx/base-files/lib/ar71xx.sh
109 +++ b/openwrt/target/linux/ar71xx/base-files/lib/ar71xx.sh
110 @@ -352,6 +352,9 @@ ar71xx_board_detect() {
111  *"Bullet M")
112  name="bullet-m"
113  ;;
114 + *"Loco M XW")
115 + name="loco-m-xw"
116 + ;;
117  *"Nanostation M")
118  name="nanostation-m"
119  ;;
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() {
123  airgateway | \
124  airrouter | \
125  bullet-m | \
126 + loco-m-xw | \
127  nanostation-m | \
128  rocket-m | \
129  nanostation-m-xw | \
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))
138 
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
151 @@ -12,10 +12,10 @@
152  #include "dev-ap9x-pci.h"
153  #include "dev-eth.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,
157 
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);
162  +
163  +static struct gpio_led ubnt_airgateway_gpio_leds[] __initdata = {
164  + {
165 @@ -87,4 +87,4 @@
166  + ATH79_MACH_UBNT_AIRGW, /* Ubiquiti AirGateway */
167  ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
168  ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
169 - ATH79_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
170 + ATH79_MACH_UBNT_LOCO_M_XW, /* Ubiquiti Loco M XW */
171