aboutsummaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-02-20 14:13:30 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-02-20 14:13:30 -0500
commit5a84d159061d914c8dd4aa372ac6e9529c2be453 (patch)
tree9b08af78085334af44414adafe0096276f8fe0ff /net/lapb/lapb_subr.c
parente80a0e6e7ccdf64575d4384cb4172860422f5b81 (diff)
parent7d477a04a619e90ee08724e8f2d8803c6bdfcef8 (diff)
Merge ARM fixes
Diffstat (limited to 'net/lapb/lapb_subr.c')
-rw-r--r--net/lapb/lapb_subr.c17
1 files changed, 8 insertions, 9 deletions
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
68void lapb_requeue_frames(struct lapb_cb *lapb) 67void 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 */