aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2018-01-06 17:30:38 +0100
committerMathias Kresin <dev@kresin.me>2018-01-10 08:08:53 +0100
commitd3fd38637febad007bcc692bd79d5af08a17689d (patch)
treef6aa0b689a07605a4366057c6a3b44cbb4a115a6 /target/linux/lantiq
parente4936a957d1af8b905107396b1a9057101e63abb (diff)
downloadupstream-d3fd38637febad007bcc692bd79d5af08a17689d.tar.gz
upstream-d3fd38637febad007bcc692bd79d5af08a17689d.tar.bz2
upstream-d3fd38637febad007bcc692bd79d5af08a17689d.zip
lantiq: create ATM/PTM interfaces with dsl as netdev name
Renaming an atm etherbride using 'ip link' (via hotplug) is racy since the original netdev might disappear before br2684ctl has finished appling it's setting: local2.notice br2684ctl[1667]: Interface "nas0" created sucessfully local2.notice br2684ctl[1667]: Communicating over ATM 0.8.35, encapsulation: LLC kern.info kernel: dsl0: renamed from nas0 kern.err kernel: br2684:br2684_regvcc: tried to attach to non-existent device local2.err br2684ctl[1667]: Could not configure interface:No such device or address By passing the final used netdev name to br2684ctl_wrap another race condition workaround will be enabled again. Change the lantiq ptm driver to create a netdev with the name dsl as well. Albeit the rename via 'ip link' works fine so far, using a different approach for ptm then atm could be confusing. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/02_network2
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface12
2 files changed, 13 insertions, 1 deletions
diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network
index efe631c99e..ca974b071e 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -229,7 +229,7 @@ buffalo,wbmr-300hpd)
esac
ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \
- ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload"
+ ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload" "dsl"
if lantiq_is_vdsl_system; then
ucidef_add_vdsl_modem "$annex" "$tone" "$xfer_mode"
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface
index 292d407c30..3b0313d1aa 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface
@@ -29,6 +29,17 @@ rename_xdsl_ifname()
IFNAME_CHANGED=1
}
+add_atm_bridge_nameprefix()
+{
+ local cfg="$1"
+
+ config_get nameprefix "$cfg" nameprefix
+ [ -z "$nameprefix" ] || return
+
+ uci set network.${cfg}.nameprefix="dsl"
+ IFNAME_CHANGED=1
+}
+
migrate_network_xdsl_ifname()
{
rename_xdsl_ifname network "$1" ifname
@@ -42,6 +53,7 @@ migrate_led_xdsl_ifname()
config_load network
config_foreach migrate_network_xdsl_ifname
+config_foreach add_atm_bridge_nameprefix atm-bridge
[ "$IFNAME_CHANGED" = "1" ] && uci commit network