diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-06 10:46:18 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-06 10:46:18 -0500 |
commit | 330f28f691e9b349e34adcaf82b273cf061bb491 (patch) | |
tree | fca3bfe41eff25ef19f576cef1979c68f6521af5 /drivers/net/wan | |
parent | fe3e78e073d25308756f38019956061153267769 (diff) | |
parent | 6fc786d5034ed7ce2d43c459211137de6d99dd28 (diff) |
Merge branch 'for-2.6.32' into for-2.6.33
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/c101.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/cosa.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/cycx_x25.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/dscc4.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/farsync.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_cisco.c | 18 | ||||
-rw-r--r-- | drivers/net/wan/n2.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/pci200syn.c | 1 |
8 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index 9693b0fd323d..0bd898c94759 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/capability.h> | ||
19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
20 | #include <linux/types.h> | 21 | #include <linux/types.h> |
21 | #include <linux/string.h> | 22 | #include <linux/string.h> |
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 66360a2a14c2..e2c33c06190b 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c | |||
@@ -76,6 +76,7 @@ | |||
76 | 76 | ||
77 | #include <linux/module.h> | 77 | #include <linux/module.h> |
78 | #include <linux/kernel.h> | 78 | #include <linux/kernel.h> |
79 | #include <linux/sched.h> | ||
79 | #include <linux/slab.h> | 80 | #include <linux/slab.h> |
80 | #include <linux/poll.h> | 81 | #include <linux/poll.h> |
81 | #include <linux/fs.h> | 82 | #include <linux/fs.h> |
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c index 2573c18b6aa5..cd8cb95c5bd7 100644 --- a/drivers/net/wan/cycx_x25.c +++ b/drivers/net/wan/cycx_x25.c | |||
@@ -84,6 +84,7 @@ | |||
84 | #include <linux/kernel.h> /* printk(), and other useful stuff */ | 84 | #include <linux/kernel.h> /* printk(), and other useful stuff */ |
85 | #include <linux/module.h> | 85 | #include <linux/module.h> |
86 | #include <linux/string.h> /* inline memset(), etc. */ | 86 | #include <linux/string.h> /* inline memset(), etc. */ |
87 | #include <linux/sched.h> | ||
87 | #include <linux/slab.h> /* kmalloc(), kfree() */ | 88 | #include <linux/slab.h> /* kmalloc(), kfree() */ |
88 | #include <linux/stddef.h> /* offsetof(), etc. */ | 89 | #include <linux/stddef.h> /* offsetof(), etc. */ |
89 | #include <linux/wanrouter.h> /* WAN router definitions */ | 90 | #include <linux/wanrouter.h> /* WAN router definitions */ |
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 81c8aec9df92..07d00b4cf48a 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -81,6 +81,7 @@ | |||
81 | */ | 81 | */ |
82 | 82 | ||
83 | #include <linux/module.h> | 83 | #include <linux/module.h> |
84 | #include <linux/sched.h> | ||
84 | #include <linux/types.h> | 85 | #include <linux/types.h> |
85 | #include <linux/errno.h> | 86 | #include <linux/errno.h> |
86 | #include <linux/list.h> | 87 | #include <linux/list.h> |
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 3e90eb816181..beda387f2fc7 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/version.h> | 20 | #include <linux/version.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/sched.h> | ||
22 | #include <linux/ioport.h> | 23 | #include <linux/ioport.h> |
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/if.h> | 25 | #include <linux/if.h> |
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index cf5fd17ad707..f1bff98acd1f 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -58,8 +58,7 @@ struct cisco_state { | |||
58 | spinlock_t lock; | 58 | spinlock_t lock; |
59 | unsigned long last_poll; | 59 | unsigned long last_poll; |
60 | int up; | 60 | int up; |
61 | int request_sent; | 61 | u32 txseq; /* TX sequence number, 0 = none */ |
62 | u32 txseq; /* TX sequence number */ | ||
63 | u32 rxseq; /* RX sequence number */ | 62 | u32 rxseq; /* RX sequence number */ |
64 | }; | 63 | }; |
65 | 64 | ||
@@ -163,6 +162,7 @@ static int cisco_rx(struct sk_buff *skb) | |||
163 | struct cisco_packet *cisco_data; | 162 | struct cisco_packet *cisco_data; |
164 | struct in_device *in_dev; | 163 | struct in_device *in_dev; |
165 | __be32 addr, mask; | 164 | __be32 addr, mask; |
165 | u32 ack; | ||
166 | 166 | ||
167 | if (skb->len < sizeof(struct hdlc_header)) | 167 | if (skb->len < sizeof(struct hdlc_header)) |
168 | goto rx_error; | 168 | goto rx_error; |
@@ -223,8 +223,10 @@ static int cisco_rx(struct sk_buff *skb) | |||
223 | case CISCO_KEEPALIVE_REQ: | 223 | case CISCO_KEEPALIVE_REQ: |
224 | spin_lock(&st->lock); | 224 | spin_lock(&st->lock); |
225 | st->rxseq = ntohl(cisco_data->par1); | 225 | st->rxseq = ntohl(cisco_data->par1); |
226 | if (st->request_sent && | 226 | ack = ntohl(cisco_data->par2); |
227 | ntohl(cisco_data->par2) == st->txseq) { | 227 | if (ack && (ack == st->txseq || |
228 | /* our current REQ may be in transit */ | ||
229 | ack == st->txseq - 1)) { | ||
228 | st->last_poll = jiffies; | 230 | st->last_poll = jiffies; |
229 | if (!st->up) { | 231 | if (!st->up) { |
230 | u32 sec, min, hrs, days; | 232 | u32 sec, min, hrs, days; |
@@ -275,7 +277,6 @@ static void cisco_timer(unsigned long arg) | |||
275 | 277 | ||
276 | cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, htonl(++st->txseq), | 278 | cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, htonl(++st->txseq), |
277 | htonl(st->rxseq)); | 279 | htonl(st->rxseq)); |
278 | st->request_sent = 1; | ||
279 | spin_unlock(&st->lock); | 280 | spin_unlock(&st->lock); |
280 | 281 | ||
281 | st->timer.expires = jiffies + st->settings.interval * HZ; | 282 | st->timer.expires = jiffies + st->settings.interval * HZ; |
@@ -293,9 +294,7 @@ static void cisco_start(struct net_device *dev) | |||
293 | unsigned long flags; | 294 | unsigned long flags; |
294 | 295 | ||
295 | spin_lock_irqsave(&st->lock, flags); | 296 | spin_lock_irqsave(&st->lock, flags); |
296 | st->up = 0; | 297 | st->up = st->txseq = st->rxseq = 0; |
297 | st->request_sent = 0; | ||
298 | st->txseq = st->rxseq = 0; | ||
299 | spin_unlock_irqrestore(&st->lock, flags); | 298 | spin_unlock_irqrestore(&st->lock, flags); |
300 | 299 | ||
301 | init_timer(&st->timer); | 300 | init_timer(&st->timer); |
@@ -317,8 +316,7 @@ static void cisco_stop(struct net_device *dev) | |||
317 | 316 | ||
318 | spin_lock_irqsave(&st->lock, flags); | 317 | spin_lock_irqsave(&st->lock, flags); |
319 | netif_dormant_on(dev); | 318 | netif_dormant_on(dev); |
320 | st->up = 0; | 319 | st->up = st->txseq = 0; |
321 | st->request_sent = 0; | ||
322 | spin_unlock_irqrestore(&st->lock, flags); | 320 | spin_unlock_irqrestore(&st->lock, flags); |
323 | } | 321 | } |
324 | 322 | ||
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 83da596e2052..58c66819f39b 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/capability.h> | ||
21 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
22 | #include <linux/types.h> | 23 | #include <linux/types.h> |
23 | #include <linux/fcntl.h> | 24 | #include <linux/fcntl.h> |
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index a52f29c72c33..f1340faaf022 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/capability.h> | ||
19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
20 | #include <linux/types.h> | 21 | #include <linux/types.h> |
21 | #include <linux/fcntl.h> | 22 | #include <linux/fcntl.h> |