diff options
author | Florian Fainelli <florian@openwrt.org> | 2009-05-28 09:44:00 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2009-05-28 09:44:00 +0000 |
commit | 288c524195345d4638dbc034cd3403a1d82be2c5 (patch) | |
tree | e47b48aa60d7961f321736787b4c1207005f2291 /package | |
parent | 3051fca894999f0e443b1926b9410b3d09ae73cd (diff) | |
download | master-187ad058-288c524195345d4638dbc034cd3403a1d82be2c5.tar.gz master-187ad058-288c524195345d4638dbc034cd3403a1d82be2c5.tar.bz2 master-187ad058-288c524195345d4638dbc034cd3403a1d82be2c5.zip |
[package] remove the ar7-atm hotplug for the moment since it makes the driver oops
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16125 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/ar7-atm/patches/170-add-hotplug-status.patch | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/package/ar7-atm/patches/170-add-hotplug-status.patch b/package/ar7-atm/patches/170-add-hotplug-status.patch deleted file mode 100644 index 121a1e4c53..0000000000 --- a/package/ar7-atm/patches/170-add-hotplug-status.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff -urN sangam_atm-D7.03.01.00.orig/tn7dsl.c sangam_atm-D7.03.01.00/tn7dsl.c ---- sangam_atm-D7.03.01.00.orig/tn7dsl.c 2008-01-05 03:11:03.000000000 +0100 -+++ sangam_atm-D7.03.01.00/tn7dsl.c 2008-01-06 18:13:24.000000000 +0000 -@@ -109,6 +109,11 @@ - #include <linux/vmalloc.h> - #include <linux/file.h> - #include <linux/firmware.h> -+#include <linux/skbuff.h> -+#include <linux/netlink.h> -+#include <net/sock.h> -+#include <linux/kobject.h> -+#include <asm/uaccess.h> - - #include <asm/io.h> - #include <asm/ar7/ar7.h> -@@ -296,6 +301,8 @@ - /* externs */ - extern struct atm_dev *mydev; - extern unsigned int oamFarLBCount[4]; -+extern struct sock *uevent_sock; -+extern u64 uevent_next_seqnum(void); - - /* module wide declars */ - static PITIDSLHW_T pIhw; -@@ -333,6 +340,75 @@ - return 0; - } - -+static inline void add_msg(struct sk_buff *skb, char *msg) -+{ -+ char *scratch; -+ scratch = skb_put(skb, strlen(msg) + 1); -+ sprintf(scratch, msg); -+} -+ -+static void hotplug_dsl_status(void) -+{ -+ struct sk_buff *skb; -+ size_t len; -+ char *scratch, *dsl_status; -+ char buf[128]; -+ u64 seq; -+ -+ if (!uevent_sock) { -+ printk("avsar: unable to create netlink socket!\n"); -+ return; -+ } -+ -+ switch (pIhw->AppData.bState) -+ { -+ case RSTATE_TEST: -+ dsl_status="TEST"; -+ break; -+ case RSTATE_IDLE: -+ dsl_status="IDLE"; -+ break; -+ case RSTATE_INIT: -+ dsl_status="INIT"; -+ break; -+ case RSTATE_HS: -+ dsl_status="HANDSHAKE"; -+ break; -+ case RSTATE_RTDL: -+ dsl_status="RETRAIN"; -+ break; -+ case RSTATE_SHOWTIME: -+ dsl_status="SHOWTIME"; -+ break; -+ default: -+ dsl_status="UNKNOWN"; -+ } -+ -+ /* allocate message with the maximum possible size */ -+ len = strlen(dsl_status) +2; -+ skb = alloc_skb(len + 2048, GFP_KERNEL); -+ if (!skb) -+ return; -+ -+ /* add header */ -+ scratch = skb_put(skb, len); -+ sprintf(scratch, "%s@",dsl_status); -+ -+ /* copy keys to our continuous event payload buffer */ -+ add_msg(skb, "HOME=/"); -+ add_msg(skb, "PATH=/sbin:/bin:/usr/sbin:/usr/bin"); -+ add_msg(skb, "SUBSYSTEM=atm"); -+ add_msg(skb, "DEVICENAME=avsar0"); -+ snprintf(buf, 128, "ACTION=%s", dsl_status); -+ add_msg(skb, buf); -+ seq = uevent_next_seqnum(); -+ snprintf(buf, 128, "SEQNUM=%llu", (unsigned long long)seq); -+ add_msg(skb, buf); -+ -+ NETLINK_CB(skb).dst_group = 1; -+ netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL); -+} -+ - - int os_atoi(const char *pStr) - { -@@ -2558,7 +2634,7 @@ - - inline int tn7dsl_handle_interrupt(void) - { -- int intsrc; -+ int intsrc,curState; - unsigned char cMsgRa[6]; - short margin; - extern unsigned int def_sar_inter_pace; //Sorry -@@ -2573,7 +2649,7 @@ - - if (nohost_flag) return 0; - -- -+ curState=pIhw->AppData.bState; - dslhal_api_handleTrainingInterrupt(pIhw, intsrc); - - if(pIhw->lConnected == TC_SYNC) -@@ -2704,8 +2780,8 @@ - } - - #endif -- - } -+ if(pIhw->AppData.bState != curState) hotplug_dsl_status(); - - //UR8_MERGE_START CQ10442 Manjula K - if (pIhw->AppData.SRA) |