···1414 * LAPB 002 Jonathan Naylor New timer architecture.1515 * 2000-10-29 Henner Eisen lapb_data_indication() return status.1616 */1717-1717+1818#include <linux/module.h>1919#include <linux/errno.h>2020#include <linux/types.h>···4343static DEFINE_RWLOCK(lapb_list_lock);44444545/*4646- * Free an allocated lapb control block. 4646+ * Free an allocated lapb control block.4747 */4848static void lapb_free_cb(struct lapb_cb *lapb)4949{···407407 return lapb->callbacks.data_indication(lapb->dev, skb);408408409409 kfree_skb(skb);410410- return NET_RX_CN_HIGH; /* For now; must be != NET_RX_DROP */ 410410+ return NET_RX_CN_HIGH; /* For now; must be != NET_RX_DROP */411411}412412413413int lapb_data_transmit(struct lapb_cb *lapb, struct sk_buff *skb)
+2-2
net/lapb/lapb_out.c
···3434#include <linux/interrupt.h>3535#include <net/lapb.h>36363737-/* 3737+/*3838 * This procedure is passed a buffer descriptor for an iframe. It builds3939 * the rest of the control part of the frame and then writes it out.4040 */···6666 lapb->dev, lapb->state, poll_bit, lapb->vs, lapb->vr);6767#endif68686969- lapb_transmit_buffer(lapb, skb, LAPB_COMMAND); 6969+ lapb_transmit_buffer(lapb, skb, LAPB_COMMAND);7070}71717272void lapb_kick(struct lapb_cb *lapb)
+8-8
net/lapb/lapb_subr.c
···5959 */6060 if (lapb->va != nr)6161 while (skb_peek(&lapb->ack_queue) && lapb->va != nr) {6262- skb = skb_dequeue(&lapb->ack_queue);6262+ skb = skb_dequeue(&lapb->ack_queue);6363 kfree_skb(skb);6464 lapb->va = (lapb->va + 1) % modulus;6565 }···67676868void lapb_requeue_frames(struct lapb_cb *lapb)6969{7070- struct sk_buff *skb, *skb_prev = NULL;7070+ struct sk_buff *skb, *skb_prev = NULL;71717272 /*7373 * Requeue all the un-ack-ed frames on the output queue to be picked···9191{9292 unsigned short vc = lapb->va;9393 int modulus;9494-9494+9595 modulus = (lapb->mode & LAPB_EXTENDED) ? LAPB_EMODULUS : LAPB_SMODULUS;96969797 while (vc != lapb->vs) {···9999 return 1;100100 vc = (vc + 1) % modulus;101101 }102102-102102+103103 return nr == lapb->vs;104104}105105···149149 frame->cr = LAPB_RESPONSE;150150 }151151 }152152-152152+153153 skb_pull(skb, 1);154154155155 if (lapb->mode & LAPB_EXTENDED) {···220220 return 0;221221}222222223223-/* 223223+/*224224 * This routine is called when the HDLC layer internally generates a225225- * command or response for the remote machine ( eg. RR, UA etc. ). 225225+ * command or response for the remote machine ( eg. RR, UA etc. ).226226 * Only supervisory or unnumbered frames are processed, FRMRs are handled227227 * by lapb_transmit_frmr below.228228 */···259259 lapb_transmit_buffer(lapb, skb, type);260260}261261262262-/* 262262+/*263263 * This routine generates FRMRs based on information previously stored in264264 * the LAPB control block.265265 */
+1-1
net/lapb/lapb_timer.c
···101101 /*102102 * Awaiting connection state, send SABM(E), up to N2 times.103103 */104104- case LAPB_STATE_1: 104104+ case LAPB_STATE_1:105105 if (lapb->n2count == lapb->n2) {106106 lapb_clear_queues(lapb);107107 lapb->state = LAPB_STATE_0;