From 5a6268c078425a6c0452202000948251f14fa632 Mon Sep 17 00:00:00 2001
From: John Crispin <john@openwrt.org>
Date: Sun, 30 Mar 2014 09:16:43 +0000
Subject: [PATCH] lantiq: add esi

http://patchwork.openwrt.org/patch/3703/

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40326
---
 target/linux/lantiq/base-files/etc/init.d/esi | 7 +++++++
 target/linux/lantiq/xway/target.mk            | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100755 target/linux/lantiq/base-files/etc/init.d/esi

diff --git a/target/linux/lantiq/base-files/etc/init.d/esi b/target/linux/lantiq/base-files/etc/init.d/esi
new file mode 100755
index 0000000000..5635b5361b
--- /dev/null
+++ b/target/linux/lantiq/base-files/etc/init.d/esi
@@ -0,0 +1,7 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+START=19
+start() {
+	esi $(printf '%X' $((1+0x$(tr -d : </sys/class/net/eth0/address)))) 2>/dev/null || :
+}
diff --git a/target/linux/lantiq/xway/target.mk b/target/linux/lantiq/xway/target.mk
index 3da4638da3..1a8bbb4bc0 100644
--- a/target/linux/lantiq/xway/target.mk
+++ b/target/linux/lantiq/xway/target.mk
@@ -5,7 +5,7 @@ FEATURES:=squashfs atm mips16
 CPU_TYPE:=34kc
 CPU_SUBTYPE:=dsp
 
-DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug
+DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug atm-esi
 
 define Target/Description
 	Lantiq XWAY
-- 
2.30.2