ramips: add support for I-O DATA WN-AC733GR3
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / board.d / 02_network
1 #!/bin/sh
2
3 . /lib/functions.sh
4 . /lib/functions/uci-defaults.sh
5 . /lib/functions/system.sh
6
7 ramips_setup_rt3x5x_vlans()
8 {
9 if [ ! -x /sbin/swconfig ]; then
10 # legacy default
11 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
12 return
13 fi
14 local wanports=""
15 local lanports=""
16 for port in 5 4 3 2 1 0; do
17 if [ `swconfig dev rt305x port $port get disable` = "1" ]; then
18 continue
19 fi
20 if [ `swconfig dev rt305x port $port get lan` = "0" ]; then
21 wanports="$port:wan $wanports"
22 else
23 lanports="$port:lan $lanports"
24 fi
25 done
26 ucidef_add_switch "rt305x" $lanports $wanports "6t@eth0"
27 }
28
29 ramips_setup_interfaces()
30 {
31 local board="$1"
32
33 case $board in
34 11acnas|\
35 d-team,newifi-d2|\
36 dir-615-h1|\
37 w2914nsv2|\
38 zbt-we2026)
39 ucidef_add_switch "switch0" \
40 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
41 ;;
42 3g150b|\
43 3g300m|\
44 a5-v11|\
45 all0256n-4M|\
46 all0256n-8M|\
47 all5002|\
48 all5003|\
49 bocco|\
50 broadway|\
51 dcs-930|\
52 dcs-930l-b1|\
53 ht-tm02|\
54 kimax,u35wf|\
55 linkits7688 | \
56 m2m|\
57 microwrt|\
58 mikrotik,rbm11g|\
59 mpr-a2|\
60 ncs601w|\
61 omega2 | \
62 omega2p | \
63 timecloud|\
64 tplink,tl-wa801nd-v5|\
65 w150m|\
66 widora,neo-16m|\
67 widora,neo-32m|\
68 wnce2001|\
69 zbt-cpe102|\
70 zorlik,zl5900v2|\
71 zte-q7)
72 ucidef_add_switch "switch0"
73 ucidef_add_switch_attr "switch0" "enable" "false"
74 ucidef_set_interface_lan "eth0"
75 ;;
76 mlw221|\
77 mr-102n)
78 ucidef_set_interface_lan "eth0.2"
79 ;;
80 3g-6200n|\
81 ai-br100|\
82 alfa-network,ac1200rm|\
83 mediatek,ap-mt7621a-v60|\
84 xzwifi,creativebox-v1|\
85 d240|\
86 db-wrt01|\
87 dir-300-b7|\
88 dir-320-b1|\
89 dir-610-a1|\
90 dir-615-h1|\
91 dir-810l|\
92 dlink,dwr-116-a1|\
93 dlink,dwr-921-c1|\
94 dlink,dwr-922-e2|\
95 ew1200|\
96 firewrt|\
97 hc5661a|\
98 hc5962|\
99 hlk-rm04|\
100 k2p|\
101 kn|\
102 kn_rc|\
103 mac1200rv2|\
104 miwifi-mini|\
105 miwifi-nano|\
106 mt7621|\
107 mt7628|\
108 mtc,wr1201|\
109 mzk-750dhp|\
110 mzk-w300nh2|\
111 nixcore-x1-8M|\
112 nixcore-x1-16M|\
113 oy-0001|\
114 pbr-m1|\
115 psg1208|\
116 psg1218a|\
117 r6220|\
118 netgear,r6350|\
119 rt-n12p|\
120 sap-g3200u3|\
121 sk-wb8|\
122 unielec,u7621-06-256m-16m|\
123 unielec,u7621-06-512m-64m|\
124 vr500|\
125 wavlink,wl-wn570ha1|\
126 wavlink,wl-wn575a3|\
127 wf-2881|\
128 whr-g300n|\
129 mqmaker,witi-256m|\
130 mqmaker,witi-512m|\
131 wndr3700v5|\
132 youku-yk1|\
133 zbt-ape522ii|\
134 zbt-we1326|\
135 zbtlink,zbt-we3526|\
136 zbt-we826-16M|\
137 zbt-we826-32M|\
138 zbt-wg2626|\
139 zbt-wg3526-16M|\
140 zbt-wg3526-32M|\
141 zbt-wr8305rt)
142 ucidef_add_switch "switch0" \
143 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
144 ;;
145 gehua,ghl-r-001)
146 ucidef_add_switch "switch0" \
147 "0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
148 ;;
149 alfa-network,awusfree1|\
150 alfa-network,tube-e4g|\
151 cs-qr10|\
152 d105|\
153 dlink,dap-1522-a1|\
154 dch-m225|\
155 ex2700|\
156 ex3700|\
157 hpm|\
158 mzk-ex300np|\
159 mzk-ex750np|\
160 na930|\
161 pbr-d1|\
162 ravpower,wd03|\
163 tama,w06|\
164 tplink,tl-mr3020-v3|\
165 tplink,tl-wr802n-v4|\
166 u25awf-h1|\
167 wli-tx4-ag300n|\
168 wmdr-143n|\
169 wmr-300|\
170 wn3000rpv3|\
171 wrh-300cr)
172 ucidef_set_interface_lan "eth0"
173 ;;
174 dlink,dwr-118-a1)
175 ucidef_add_switch "switch0" \
176 "1:lan:2" "2:lan:3" "3:lan:1" "4:lan:0" "5:wan" "6@eth0"
177 ;;
178 dlink,dwr-118-a2)
179 ucidef_add_switch "switch0" \
180 "1:lan:2" "2:lan:1" "3:lan:3" "4:lan" "0:wan" "6@eth0"
181 ;;
182 mir3g)
183 ucidef_add_switch "switch0" \
184 "2:lan:2" "3:lan:1" "1:wan" "6t@eth0"
185 ;;
186 psg1218b)
187 ucidef_add_switch "switch0" \
188 "0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "6@eth0"
189 ;;
190 whr-300hp2|\
191 whr-600d|\
192 wsr-1166|\
193 wsr-600)
194 ucidef_add_switch "switch0" \
195 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan:5" "6@eth0"
196 ;;
197 ar670w|\
198 ar725w|\
199 rt-ac51u)
200 ucidef_add_switch "switch0" \
201 "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
202 ;;
203 belkin,f9k1109v1|\
204 rt-n15|\
205 wl-351)
206 ucidef_add_switch "switch0" \
207 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0"
208 ;;
209 asl26555-8M|\
210 asl26555-16M|\
211 rp-n53)
212 ucidef_add_switch "switch0" \
213 "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
214 ;;
215 atp-52b|\
216 awm002-evb-4M|\
217 awm002-evb-8M|\
218 bdcom,wap2100-sk|\
219 c20i|\
220 dir-645|\
221 gl-mt300a|\
222 gl-mt300n|\
223 gl-mt750|\
224 hiwifi,hc5861b|\
225 jhr-n805r|\
226 jhr-n825r|\
227 jhr-n926r|\
228 mikrotik,rb750gr3|\
229 mikrotik,rbm33g|\
230 mzk-wdpr|\
231 rt-n14u|\
232 skylab,skw92a|\
233 tplink,c20-v4|\
234 tplink,c50-v3|\
235 tplink,c50-v4|\
236 tplink,tl-mr3420-v5|\
237 tplink,tl-wr842n-v5|\
238 tl-wr840n-v4|\
239 tl-wr840n-v5|\
240 tl-wr841n-v13|\
241 u7628-01-128M-16M|\
242 ubnt-erx|\
243 ubnt-erx-sfp|\
244 ur-326n4g|\
245 wrtnode|\
246 wrtnode2p | \
247 wrtnode2r | \
248 youhua,wr1200js|\
249 zbt-wa05|\
250 zyxel,keenetic-extra-ii)
251 ucidef_add_switch "switch0" \
252 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
253 ;;
254 c50|\
255 tplink,c20-v1)
256 ucidef_add_switch "switch0" \
257 "1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6@eth0"
258 ;;
259 dir-860l-b1|\
260 elecom,wrc-1167ghbk2-s|\
261 elecom,wrc-2533gst|\
262 elecom,wrc-1900gst|\
263 hg255d|\
264 iodata,wn-ax1167gr|\
265 iodata,wn-gx300gr)
266 ucidef_add_switch "switch0" \
267 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
268 ;;
269 gnubee,gb-pc1|\
270 gnubee,gb-pc2)
271 ucidef_add_switch "switch0" \
272 "0:lan" "4:lan" "6@eth0"
273 ;;
274 gl-mt300n-v2)
275 ucidef_add_switch "switch0" \
276 "1:lan" "0:wan" "6@eth0"
277 ;;
278 awapn2403)
279 ucidef_add_switch "switch0" \
280 "0:lan" "1:wan" "6@eth0"
281 ;;
282 b2c|\
283 nw718|\
284 psr-680w|\
285 sl-r7205|\
286 ur-336un|\
287 w502u|\
288 wr6202)
289 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
290 ;;
291 br-6475nd)
292 ucidef_add_switch "switch0" \
293 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
294 ;;
295 c108|\
296 cf-wr800n)
297 ucidef_add_switch "switch0" \
298 "4:lan" "6t@eth0"
299 ;;
300 cy-swr1100)
301 ucidef_add_switch "switch0" \
302 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0"
303 ;;
304 duzun-dm06)
305 ucidef_add_switch "switch0" \
306 "1:lan" "0:wan" "6@eth0"
307 ;;
308 e1700|\
309 mt7620a_mt7530)
310 ucidef_add_switch "switch1" \
311 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
312 ;;
313 edimax,br-6478ac-v2|\
314 tplink,c2-v1)
315 ucidef_add_switch "switch1" \
316 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
317 ;;
318 hc5661|\
319 y1s)
320 ucidef_add_switch "switch0" \
321 "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0"
322 ;;
323 hc5861)
324 ucidef_add_switch "switch0" \
325 "0:lan" "1:lan" "5:wan" "6@eth0"
326 ;;
327 iodata,wn-ac1167gr|\
328 iodata,wn-ac733gr3)
329 ucidef_add_switch "switch1" \
330 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
331 ;;
332 kn_rf)
333 ucidef_add_switch "switch0" \
334 "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0"
335 ;;
336 kng_rc)
337 ucidef_add_switch "switch1" \
338 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "7t@eth0"
339 ;;
340 mlwg2|\
341 wizard8800|\
342 wl-330n)
343 ucidef_set_interface_lan "eth0.1"
344 ;;
345 mr200)
346 ucidef_add_switch "switch0" \
347 "0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0"
348 ucidef_set_interface_wan "usb0"
349 ;;
350 netgear,r6120)
351 ucidef_add_switch "switch0" \
352 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
353 ;;
354 hc5761)
355 ucidef_add_switch "switch0" \
356 "1:lan" "4:lan" "0:wan" "6@eth0"
357 ;;
358 mzk-dp150n|\
359 vocore-8M|\
360 vocore-16M)
361 ucidef_add_switch "switch0" \
362 "0:lan" "4:lan" "6t@eth0"
363 ;;
364 newifi-d1)
365 ucidef_add_switch "switch0" \
366 "1:lan:2" "2:lan:1" "4:wan" "6@eth0"
367 ;;
368 phicomm,k2g)
369 ucidef_add_switch "switch0" \
370 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5:wan" "6@eth0"
371 ;;
372 re350-v1)
373 ucidef_add_switch "switch0" \
374 "0:lan" "6@eth0"
375 ;;
376 re6500)
377 ucidef_add_switch "switch0" \
378 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "6@eth0"
379 ;;
380 rt-n56u)
381 ucidef_add_switch "switch0" \
382 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0"
383 ;;
384 tew-638apb-v2)
385 ucidef_add_switch "switch0" \
386 "4:lan" "6@eth0"
387 ;;
388 lava,lr-25g001|\
389 tew-691gr|\
390 tew-692gr|\
391 wlr-6000)
392 ucidef_add_switch "switch0" \
393 "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
394 ;;
395 tplink,tl-wr902ac-v3)
396 ucidef_add_switch "switch0" \
397 "4:lan" "6@eth0"
398 ;;
399 vonets,var11n-300|\
400 wt1520-4M|\
401 wt1520-8M)
402 ucidef_add_switch "switch0" \
403 "0:lan" "4:wan" "6@eth0"
404 ;;
405 vocore2|\
406 vocore2lite)
407 ucidef_add_switch "switch0" \
408 "0:lan" "2:lan" "6t@eth0"
409 ;;
410 f5d8235-v1|\
411 f5d8235-v2|\
412 tew-714tru|\
413 v11st-fe|\
414 wzr-agl300nh)
415 ucidef_add_switch "switch0" \
416 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
417 ;;
418 wcr-1166ds)
419 ucidef_add_switch "switch0" \
420 "3:lan" "4:wan" "6@eth0"
421 ;;
422 wcr-150gn|\
423 we1026-5g-16m)
424 ucidef_add_switch "switch0" \
425 "0:lan" "6t@eth0"
426 ;;
427 whr-1166d)
428 ucidef_add_switch "switch0" \
429 "0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6@eth0"
430 ;;
431 wizfi630a)
432 ucidef_add_switch "switch0" \
433 "0:lan" "1:lan" "2:wan" "6@eth0"
434 ;;
435 wt3020-4M|\
436 wt3020-8M)
437 ucidef_add_switch "switch0" \
438 "4:lan" "0:wan" "6@eth0"
439 ;;
440 xiaomi,mir3p)
441 ucidef_add_switch "switch0" \
442 "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
443 ;;
444 zbtlink,zbt-we1226|\
445 y1)
446 ucidef_add_switch "switch0" \
447 "0:lan:2" "1:lan:1" "4:wan" "6@eth0"
448 ;;
449 *)
450 RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
451 if [ -n "${RT3X5X}" ]; then
452 ramips_setup_rt3x5x_vlans
453 else
454 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
455 fi
456 ;;
457 esac
458 }
459
460 ramips_setup_macs()
461 {
462 local board="$1"
463 local lan_mac=""
464 local wan_mac=""
465
466 case $board in
467 a5-v11|\
468 ht-tm02|\
469 wmdr-143n)
470 lan_mac=$(cat /sys/class/net/eth0/address)
471 ;;
472 carambola|\
473 freestation5|\
474 w502u|\
475 wnce2001)
476 wan_mac=$(mtd_get_mac_binary factory 46)
477 ;;
478 bc2|\
479 broadway|\
480 d105|\
481 dir-300-b7|\
482 dir-320-b1|\
483 dir-620-a1|\
484 esr-9753|\
485 freestation5|\
486 hlk-rm04|\
487 mpr-a1|\
488 psr-680w|\
489 sl-r7205|\
490 y1|\
491 y1s)
492 lan_mac=$(cat /sys/class/net/eth0/address)
493 lan_mac=$(macaddr_setbit_la "$lan_mac")
494 wan_mac=$(macaddr_add "$lan_mac" 1)
495 ;;
496 belkin,f9k1109v1)
497 wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
498 lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
499 ;;
500 br-6475nd)
501 lan_mac=$(cat /sys/class/net/eth0/address)
502 wan_mac=$(mtd_get_mac_binary devdata 7)
503 ;;
504 cy-swr1100|\
505 dch-m225)
506 lan_mac=$(mtd_get_mac_ascii factory lanmac)
507 ;;
508 dir-645)
509 lan_mac=$(mtd_get_mac_ascii nvram lanmac)
510 wan_mac=$(mtd_get_mac_ascii nvram wanmac)
511 ;;
512 dir-860l-b1)
513 lan_mac=$(mtd_get_mac_ascii factory lanmac)
514 wan_mac=$(mtd_get_mac_ascii factory wanmac)
515 ;;
516 dlink,dwr-116-a1|\
517 dlink,dwr-118-a1|\
518 dlink,dwr-118-a2|\
519 dlink,dwr-921-c1|\
520 dlink,dwr-922-e2|\
521 lava,lr-25g001)
522 wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
523 lan_mac=$(macaddr_add "$wan_mac" 1)
524 ;;
525 e1700)
526 wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
527 ;;
528 edimax,br-6478ac-v2)
529 lan_mac=$(cat /sys/class/net/eth0/address)
530 wan_mac=$(macaddr_add "$lan_mac" 2)
531 ;;
532 elecom,wrc-1167ghbk2-s|\
533 elecom,wrc-2533gst|\
534 elecom,wrc-1900gst|\
535 sk-wb8)
536 wan_mac=$(mtd_get_mac_binary factory 57350)
537 ;;
538 gl-mt300n-v2|\
539 whr-g300n)
540 wan_mac=$(mtd_get_mac_binary factory 4)
541 ;;
542 hc5*61|\
543 hc5661a|\
544 hc5962|\
545 hiwifi,hc5861b)
546 lan_mac=`mtd_get_mac_ascii bdinfo "Vfac_mac "`
547 [ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
548 wan_mac=$(macaddr_add "$lan_mac" 1)
549 ;;
550 iodata,wn-ac1167gr|\
551 iodata,wn-ac733gr3)
552 wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" -1)
553 ;;
554 iodata,wn-ax1167gr|\
555 iodata,wn-gx300gr)
556 wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" 1)
557 ;;
558 kn_rc|\
559 kn_rf|\
560 kng_rc)
561 wan_mac=$(mtd_get_mac_binary factory 40)
562 ;;
563 linkits7688)
564 wan_mac=$(mtd_get_mac_binary factory 4)
565 lan_mac=$(mtd_get_mac_binary factory 46)
566 ;;
567 mac1200rv2)
568 lan_mac=$(mtd_get_mac_binary factory_info 13)
569 wan_mac=$(macaddr_add "$lan_mac" 1)
570 ;;
571 mir3g|\
572 xiaomi,mir3p)
573 lan_mac=$(mtd_get_mac_binary Factory 0xe006)
574 ;;
575 miwifi-mini)
576 wan_mac=$(cat /sys/class/net/eth0/address)
577 lan_mac=$(macaddr_setbit_la "$wan_mac")
578 ;;
579 m3|\
580 m4-4M|\
581 m4-8M|\
582 x5|\
583 x8)
584 lan_mac=$(cat /sys/class/net/eth0/address)
585 lan_mac=$(macaddr_add "$lan_mac" -2)
586 ;;
587 newifi-d1)
588 lan_mac=$(cat /sys/class/net/eth0/address)
589 lan_mac=$(macaddr_add "$lan_mac" 2)
590 ;;
591 omega2|\
592 omega2p)
593 wan_mac=$(mtd_get_mac_binary factory 4)
594 lan_mac=$(mtd_get_mac_binary factory 46)
595 ;;
596 oy-0001|\
597 phicomm,k2g)
598 lan_mac=$(mtd_get_mac_binary factory 40)
599 wan_mac=$(mtd_get_mac_binary factory 46)
600 ;;
601 r6220|\
602 netgear,r6350)
603 wan_mac=$(mtd_get_mac_binary factory 4)
604 lan_mac=$(macaddr_add "$wan_mac" 1)
605 ;;
606 rt-n56u)
607 lan_mac=$(cat /sys/class/net/eth0/address)
608 lan_mac=$(macaddr_setbit_la "$lan_mac")
609 wan_mac=$(mtd_get_mac_binary factory 32772)
610 ;;
611 skylab,skw92a)
612 lan_mac=$(mtd_get_mac_binary factory 40)
613 wan_mac=$(mtd_get_mac_binary factory 46)
614 ;;
615 tew-691gr)
616 wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 3)
617 ;;
618 tew-692gr)
619 wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 1)
620 ;;
621 tiny-ac)
622 lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
623 wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR)
624 ;;
625 vr500)
626 lan_mac=$(mtd_get_mac_binary factory 57344)
627 wan_mac=$(mtd_get_mac_binary factory 57350)
628 ;;
629 w306r-v20)
630 lan_mac=$(cat /sys/class/net/eth0/address)
631 wan_mac=$(macaddr_add "$lan_mac" 5)
632 ;;
633 wcr-1166ds|\
634 wsr-1166)
635 local index="$(find_mtd_index "board_data")"
636 wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
637 lan_mac=$wan_mac
638 ;;
639 wcr-150gn)
640 wan_mac=$(mtd_get_mac_binary factory 40)
641 ;;
642 whr-1166d|\
643 whr-300hp2|\
644 whr-600d|\
645 wsr-600)
646 wan_mac=$(mtd_get_mac_binary factory 4)
647 lan_mac=$wan_mac
648 ;;
649 wizfi630a)
650 lan_mac=$(mtd_get_mac_binary factory 4)
651 wan_mac=$(mtd_get_mac_binary factory 40)
652 ;;
653 wlr-6000)
654 wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2)
655 ;;
656 *)
657 lan_mac=$(cat /sys/class/net/eth0/address)
658 wan_mac=$(macaddr_add "$lan_mac" 1)
659 ;;
660 esac
661
662 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
663 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
664 }
665
666 board_config_update
667 board=$(board_name)
668 ramips_setup_interfaces $board
669 ramips_setup_macs $board
670 board_config_flush
671
672 exit 0