diff options
Diffstat (limited to 'net/lapb')
-rw-r--r-- | net/lapb/lapb_iface.c | 6 | ||||
-rw-r--r-- | net/lapb/lapb_in.c | 1 | ||||
-rw-r--r-- | net/lapb/lapb_out.c | 5 | ||||
-rw-r--r-- | net/lapb/lapb_subr.c | 17 | ||||
-rw-r--r-- | net/lapb/lapb_timer.c | 2 |
5 files changed, 14 insertions, 17 deletions
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 7e6bc41eeb21..a2e7aa63fd8a 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * LAPB 002 Jonathan Naylor New timer architecture. | 14 | * LAPB 002 Jonathan Naylor New timer architecture. |
15 | * 2000-10-29 Henner Eisen lapb_data_indication() return status. | 15 | * 2000-10-29 Henner Eisen lapb_data_indication() return status. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
@@ -43,7 +43,7 @@ static struct list_head lapb_list = LIST_HEAD_INIT(lapb_list); | |||
43 | static DEFINE_RWLOCK(lapb_list_lock); | 43 | static DEFINE_RWLOCK(lapb_list_lock); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Free an allocated lapb control block. | 46 | * Free an allocated lapb control block. |
47 | */ | 47 | */ |
48 | static void lapb_free_cb(struct lapb_cb *lapb) | 48 | static void lapb_free_cb(struct lapb_cb *lapb) |
49 | { | 49 | { |
@@ -407,7 +407,7 @@ int lapb_data_indication(struct lapb_cb *lapb, struct sk_buff *skb) | |||
407 | return lapb->callbacks.data_indication(lapb->dev, skb); | 407 | return lapb->callbacks.data_indication(lapb->dev, skb); |
408 | 408 | ||
409 | kfree_skb(skb); | 409 | kfree_skb(skb); |
410 | return NET_RX_CN_HIGH; /* For now; must be != NET_RX_DROP */ | 410 | return NET_RX_CN_HIGH; /* For now; must be != NET_RX_DROP */ |
411 | } | 411 | } |
412 | 412 | ||
413 | int lapb_data_transmit(struct lapb_cb *lapb, struct sk_buff *skb) | 413 | int lapb_data_transmit(struct lapb_cb *lapb, struct sk_buff *skb) |
diff --git a/net/lapb/lapb_in.c b/net/lapb/lapb_in.c index b0f8713f66ca..6762e7c751eb 100644 --- a/net/lapb/lapb_in.c +++ b/net/lapb/lapb_in.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/socket.h> | 20 | #include <linux/socket.h> |
21 | #include <linux/in.h> | 21 | #include <linux/in.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched.h> | ||
24 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
25 | #include <linux/string.h> | 24 | #include <linux/string.h> |
26 | #include <linux/sockios.h> | 25 | #include <linux/sockios.h> |
diff --git a/net/lapb/lapb_out.c b/net/lapb/lapb_out.c index 49a761bd9314..339cc5f2684f 100644 --- a/net/lapb/lapb_out.c +++ b/net/lapb/lapb_out.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/socket.h> | 19 | #include <linux/socket.h> |
20 | #include <linux/in.h> | 20 | #include <linux/in.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/sched.h> | ||
23 | #include <linux/timer.h> | 22 | #include <linux/timer.h> |
24 | #include <linux/string.h> | 23 | #include <linux/string.h> |
25 | #include <linux/sockios.h> | 24 | #include <linux/sockios.h> |
@@ -34,7 +33,7 @@ | |||
34 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
35 | #include <net/lapb.h> | 34 | #include <net/lapb.h> |
36 | 35 | ||
37 | /* | 36 | /* |
38 | * This procedure is passed a buffer descriptor for an iframe. It builds | 37 | * This procedure is passed a buffer descriptor for an iframe. It builds |
39 | * the rest of the control part of the frame and then writes it out. | 38 | * the rest of the control part of the frame and then writes it out. |
40 | */ | 39 | */ |
@@ -66,7 +65,7 @@ static void lapb_send_iframe(struct lapb_cb *lapb, struct sk_buff *skb, int poll | |||
66 | lapb->dev, lapb->state, poll_bit, lapb->vs, lapb->vr); | 65 | lapb->dev, lapb->state, poll_bit, lapb->vs, lapb->vr); |
67 | #endif | 66 | #endif |
68 | 67 | ||
69 | lapb_transmit_buffer(lapb, skb, LAPB_COMMAND); | 68 | lapb_transmit_buffer(lapb, skb, LAPB_COMMAND); |
70 | } | 69 | } |
71 | 70 | ||
72 | void lapb_kick(struct lapb_cb *lapb) | 71 | void lapb_kick(struct lapb_cb *lapb) |
diff --git a/net/lapb/lapb_subr.c b/net/lapb/lapb_subr.c index 8b5eefd70f03..b827f47ac133 100644 --- a/net/lapb/lapb_subr.c +++ b/net/lapb/lapb_subr.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/socket.h> | 18 | #include <linux/socket.h> |
19 | #include <linux/in.h> | 19 | #include <linux/in.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/timer.h> | 21 | #include <linux/timer.h> |
23 | #include <linux/string.h> | 22 | #include <linux/string.h> |
24 | #include <linux/sockios.h> | 23 | #include <linux/sockios.h> |
@@ -59,7 +58,7 @@ void lapb_frames_acked(struct lapb_cb *lapb, unsigned short nr) | |||
59 | */ | 58 | */ |
60 | if (lapb->va != nr) | 59 | if (lapb->va != nr) |
61 | while (skb_peek(&lapb->ack_queue) && lapb->va != nr) { | 60 | while (skb_peek(&lapb->ack_queue) && lapb->va != nr) { |
62 | skb = skb_dequeue(&lapb->ack_queue); | 61 | skb = skb_dequeue(&lapb->ack_queue); |
63 | kfree_skb(skb); | 62 | kfree_skb(skb); |
64 | lapb->va = (lapb->va + 1) % modulus; | 63 | lapb->va = (lapb->va + 1) % modulus; |
65 | } | 64 | } |
@@ -67,7 +66,7 @@ void lapb_frames_acked(struct lapb_cb *lapb, unsigned short nr) | |||
67 | 66 | ||
68 | void lapb_requeue_frames(struct lapb_cb *lapb) | 67 | void lapb_requeue_frames(struct lapb_cb *lapb) |
69 | { | 68 | { |
70 | struct sk_buff *skb, *skb_prev = NULL; | 69 | struct sk_buff *skb, *skb_prev = NULL; |
71 | 70 | ||
72 | /* | 71 | /* |
73 | * Requeue all the un-ack-ed frames on the output queue to be picked | 72 | * Requeue all the un-ack-ed frames on the output queue to be picked |
@@ -91,7 +90,7 @@ int lapb_validate_nr(struct lapb_cb *lapb, unsigned short nr) | |||
91 | { | 90 | { |
92 | unsigned short vc = lapb->va; | 91 | unsigned short vc = lapb->va; |
93 | int modulus; | 92 | int modulus; |
94 | 93 | ||
95 | modulus = (lapb->mode & LAPB_EXTENDED) ? LAPB_EMODULUS : LAPB_SMODULUS; | 94 | modulus = (lapb->mode & LAPB_EXTENDED) ? LAPB_EMODULUS : LAPB_SMODULUS; |
96 | 95 | ||
97 | while (vc != lapb->vs) { | 96 | while (vc != lapb->vs) { |
@@ -99,7 +98,7 @@ int lapb_validate_nr(struct lapb_cb *lapb, unsigned short nr) | |||
99 | return 1; | 98 | return 1; |
100 | vc = (vc + 1) % modulus; | 99 | vc = (vc + 1) % modulus; |
101 | } | 100 | } |
102 | 101 | ||
103 | return nr == lapb->vs; | 102 | return nr == lapb->vs; |
104 | } | 103 | } |
105 | 104 | ||
@@ -149,7 +148,7 @@ int lapb_decode(struct lapb_cb *lapb, struct sk_buff *skb, | |||
149 | frame->cr = LAPB_RESPONSE; | 148 | frame->cr = LAPB_RESPONSE; |
150 | } | 149 | } |
151 | } | 150 | } |
152 | 151 | ||
153 | skb_pull(skb, 1); | 152 | skb_pull(skb, 1); |
154 | 153 | ||
155 | if (lapb->mode & LAPB_EXTENDED) { | 154 | if (lapb->mode & LAPB_EXTENDED) { |
@@ -220,9 +219,9 @@ int lapb_decode(struct lapb_cb *lapb, struct sk_buff *skb, | |||
220 | return 0; | 219 | return 0; |
221 | } | 220 | } |
222 | 221 | ||
223 | /* | 222 | /* |
224 | * This routine is called when the HDLC layer internally generates a | 223 | * This routine is called when the HDLC layer internally generates a |
225 | * command or response for the remote machine ( eg. RR, UA etc. ). | 224 | * command or response for the remote machine ( eg. RR, UA etc. ). |
226 | * Only supervisory or unnumbered frames are processed, FRMRs are handled | 225 | * Only supervisory or unnumbered frames are processed, FRMRs are handled |
227 | * by lapb_transmit_frmr below. | 226 | * by lapb_transmit_frmr below. |
228 | */ | 227 | */ |
@@ -259,7 +258,7 @@ void lapb_send_control(struct lapb_cb *lapb, int frametype, | |||
259 | lapb_transmit_buffer(lapb, skb, type); | 258 | lapb_transmit_buffer(lapb, skb, type); |
260 | } | 259 | } |
261 | 260 | ||
262 | /* | 261 | /* |
263 | * This routine generates FRMRs based on information previously stored in | 262 | * This routine generates FRMRs based on information previously stored in |
264 | * the LAPB control block. | 263 | * the LAPB control block. |
265 | */ | 264 | */ |
diff --git a/net/lapb/lapb_timer.c b/net/lapb/lapb_timer.c index 2c8f0f809220..af6d14b44e2e 100644 --- a/net/lapb/lapb_timer.c +++ b/net/lapb/lapb_timer.c | |||
@@ -101,7 +101,7 @@ static void lapb_t1timer_expiry(unsigned long param) | |||
101 | /* | 101 | /* |
102 | * Awaiting connection state, send SABM(E), up to N2 times. | 102 | * Awaiting connection state, send SABM(E), up to N2 times. |
103 | */ | 103 | */ |
104 | case LAPB_STATE_1: | 104 | case LAPB_STATE_1: |
105 | if (lapb->n2count == lapb->n2) { | 105 | if (lapb->n2count == lapb->n2) { |
106 | lapb_clear_queues(lapb); | 106 | lapb_clear_queues(lapb); |
107 | lapb->state = LAPB_STATE_0; | 107 | lapb->state = LAPB_STATE_0; |