patch-2.1.22 linux/net/lapb/lapb_subr.c

Next file: linux/net/lapb/lapb_timer.c
Previous file: linux/net/lapb/lapb_out.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.21/linux/net/lapb/lapb_subr.c linux/net/lapb/lapb_subr.c
@@ -131,26 +131,26 @@
 
 	if (lapb->mode & LAPB_MLP) {
 		if (lapb->mode & LAPB_DCE) {
-			if (skb->data[0] == LAPB_ADDR_C)
-				*type = LAPB_COMMAND;
 			if (skb->data[0] == LAPB_ADDR_D)
+				*type = LAPB_COMMAND;
+			if (skb->data[0] == LAPB_ADDR_C)
 				*type = LAPB_RESPONSE;
 		} else {
-			if (skb->data[0] == LAPB_ADDR_D)
-				*type = LAPB_COMMAND;
 			if (skb->data[0] == LAPB_ADDR_C)
+				*type = LAPB_COMMAND;
+			if (skb->data[0] == LAPB_ADDR_D)
 				*type = LAPB_RESPONSE;
 		}
 	} else {
 		if (lapb->mode & LAPB_DCE) {
-			if (skb->data[0] == LAPB_ADDR_A)
-				*type = LAPB_COMMAND;
 			if (skb->data[0] == LAPB_ADDR_B)
+				*type = LAPB_COMMAND;
+			if (skb->data[0] == LAPB_ADDR_A)
 				*type = LAPB_RESPONSE;
 		} else {
-			if (skb->data[0] == LAPB_ADDR_B)
-				*type = LAPB_COMMAND;
 			if (skb->data[0] == LAPB_ADDR_A)
+				*type = LAPB_COMMAND;
+			if (skb->data[0] == LAPB_ADDR_B)
 				*type = LAPB_RESPONSE;
 		}
 	}
@@ -185,7 +185,7 @@
 			*nr = (skb->data[0] >> 5) & 0x07;
 			*pf = skb->data[0] & LAPB_SPF;
 		} else if ((skb->data[0] & LAPB_U) == 3) { 	/* U frame - take out PF */
-			frametype = skb->data[0] & ~PF;
+			frametype = skb->data[0] & ~LAPB_SPF;
 			*pf = skb->data[0] & LAPB_SPF;
 		}
 
@@ -204,7 +204,7 @@
 {
 	struct sk_buff *skb;
 	unsigned char  *dptr;
-	
+
 	if ((skb = alloc_skb(LAPB_HEADER_LEN + 3, GFP_ATOMIC)) == NULL)
 		return;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov