brcm63xx: Add support for Comtrend WAP-5813n
[openwrt/openwrt.git] / target / linux / brcm63xx / base-files / lib / brcm63xx.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2007 OpenWrt.org
4 #
5 #
6
7 board_name=""
8 status_led=""
9 status_led2=""
10 sys_mtd_part=""
11 brcm63xx_has_reset_button=""
12 ifname=""
13
14 brcm63xx_detect() {
15 board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
16
17 if [ "$board_name" = "96358VW" ] && [ -n "$(swconfig dev eth1 help 2>/dev/null)" ]; then
18 board_name="DVAG3810BN"
19 fi
20
21 case "$board_name" in
22 96328avng)
23 status_led="96328avng::power"
24 ifname=eth0
25 ;;
26 96328A-1241N)
27 brcm63xx_has_reset_button="true"
28 status_led="96328A-1241N:green:power"
29 ifname=eth0
30 ;;
31 96369R-1231N)
32 brcm63xx_has_reset_button="true"
33 status_led="WAP-5813n:green:power"
34 ifname="eth0"
35 ;;
36 RTA770BW)
37 brcm63xx_has_reset_button="true"
38 status_led="RTA770BW:green:diag"
39 ifname=eth0
40 ;;
41 RTA770W)
42 brcm63xx_has_reset_button="true"
43 status_led="RTA770W:green:diag"
44 ifname=eth0
45 ;;
46 96328A-1441N1)
47 brcm63xx_has_reset_button="true"
48 status_led="96328A-1441N1:green:power"
49 ifname=eth0
50 ;;
51 963281TAN)
52 status_led="963281TAN::power"
53 ifname=eth0
54 ;;
55 963281T_TEF)
56 brcm63xx_has_reset_button="true"
57 status_led="963281T_TEF:green:power"
58 ifname=eth0
59 ;;
60 96348GW)
61 status_led="96348GW:green:power"
62 brcm63xx_has_reset_button="true"
63 ifname=eth1
64 ;;
65 AR1004G)
66 status_led="AR1004G:green:power"
67 brcm63xx_has_reset_button="true"
68 ;;
69 CVG834G_E15R3921)
70 status_led="CVG834G:green:power"
71 ifname=eth0
72 ;;
73 GW6000)
74 brcm63xx_has_reset_button="true"
75 ifname=eth1
76 ;;
77 GW6200)
78 status_led="GW6200:green:line1"
79 status_led2="GW6200:green:tel"
80 brcm63xx_has_reset_button="true"
81 ifname=eth1
82 ;;
83 HW556*)
84 status_led="HW556:red:power"
85 brcm63xx_has_reset_button="true"
86 ifname=eth0
87 ;;
88 96348GW-11)
89 status_led="96348GW-11:green:power"
90 brcm63xx_has_reset_button="true"
91 ifname=eth1
92 ;;
93 CT536_CT5621)
94 status_led="CT536_CT5621:green:power"
95 brcm63xx_has_reset_button="true"
96 ifname=eth0
97 ;;
98 SPW500V)
99 status_led="SPW500V:green:power"
100 brcm63xx_has_reset_button="true"
101 ifname=eth0
102 ;;
103 AW4139 |\
104 AW4339U)
105 status_led="dsl-274xb:green:power"
106 brcm63xx_has_reset_button="true"
107 ifname=eth0
108 ;;
109 96358-502V)
110 status_led="spw303v:green:power+adsl"
111 brcm63xx_has_reset_button="true"
112 ifname=eth0
113 ;;
114 V2110)
115 status_led="V2110:power:green"
116 brcm63xx_has_reset_button="true"
117 ifname=eth0
118 ;;
119 CPVA642)
120 status_led="CPVA642:green:power:"
121 brcm63xx_has_reset_button="true"
122 ifname=eth0
123 ;;
124 D-4P-W)
125 status_led="D-4P-W:green:power"
126 brcm63xx_has_reset_button="true"
127 ifname=eth0
128 ;;
129 NB6)
130 brcm63xx_has_reset_button="true"
131 ifname=eth0
132 ;;
133 "F@ST2504n")
134 status_led="fast2504n:green:ok"
135 brcm63xx_has_reset_button="true"
136 ifname=eth0
137 ;;
138 'F@ST2704V2')
139 status_led="F@ST2704V2:green:power"
140 brcm63xx_has_reset_button="true"
141 ifname=eth0
142 ;;
143 *)
144 ;;
145 esac
146 }
147
148 brcm63xx_detect