ltq-xdsl-app: drop manual br2684ctl reload
[openwrt/openwrt.git] / package / network / config / ltq-adsl-app / files / 10_atm.sh
1 #!/bin/sh
2
3 [ "$DSL_NOTIFICATION_TYPE" = "DSL_STATUS" ] && \
4 [ "$DSL_TC_LAYER_STATUS" = "ATM" ] && \
5 ! grep -q "ltq_atm_ar9\|ltq_atm_ase\|ltq_atm_danube" /proc/modules || exit 0
6
7 logger -p daemon.notice -t "dsl-notify" "Switching to TC-Layer ATM"
8
9 if grep -q "ltq_ptm_ar9\|ltq_ptm_ase\|ltq_ptm_danube" /proc/modules ; then
10 logger -p daemon.notice -t "dsl-notify" "Loading ATM driver while EFM/PTM driver is loaded is not possible. Reboot is needed."
11 exit
12 fi
13
14 case "$(strings /proc/device-tree/compatible)" in
15 *lantiq,ar9*)
16 soc="ar9"
17 ;;
18 *lantiq,ase*)
19 soc="ase"
20 ;;
21 *lantiq,danube*)
22 soc="danube"
23 ;;
24 *)
25 logger -p daemon.notice -t "dsl-notify" "Unsupported SoC"
26 exit
27 esac
28
29 modprobe ltq_atm_${soc}