patch-2.1.22 linux/net/rose/rose_in.c

Next file: linux/net/rose/rose_link.c
Previous file: linux/net/rose/rose_dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.21/linux/net/rose/rose_in.c linux/net/rose/rose_in.c
@@ -56,7 +56,7 @@
 		skb_queue_tail(&sk->protinfo.rose->frag_queue, skb);
 		return 0;
 	}
-	
+
 	if (!more && sk->protinfo.rose->fraglen > 0) {	/* End of fragment */
 		sk->protinfo.rose->fraglen += skb->len;
 		skb_queue_tail(&sk->protinfo.rose->frag_queue, skb);
@@ -190,9 +190,9 @@
 		case ROSE_RR:
 		case ROSE_RNR:
 			if (frametype == ROSE_RNR) {
-				sk->protinfo.rose->condition |= PEER_RX_BUSY_CONDITION;
+				sk->protinfo.rose->condition |= ROSE_COND_PEER_RX_BUSY;
 			} else {
-				sk->protinfo.rose->condition &= ~PEER_RX_BUSY_CONDITION;
+				sk->protinfo.rose->condition &= ~ROSE_COND_PEER_RX_BUSY;
 			}
 			if (!rose_validate_nr(sk, nr)) {
 				rose_clear_queues(sk);
@@ -205,16 +205,16 @@
 				sk->protinfo.rose->state     = ROSE_STATE_4;
 				sk->protinfo.rose->timer     = sk->protinfo.rose->t2;
 			} else {
-				if (sk->protinfo.rose->condition & PEER_RX_BUSY_CONDITION) {
-					rose_frames_acked(sk, nr);
+				if (sk->protinfo.rose->condition & ROSE_COND_PEER_RX_BUSY) {
+					sk->protinfo.rose->va = nr;
 				} else {
 					rose_check_iframes_acked(sk, nr);
 				}
 			}
 			break;
-			
+
 		case ROSE_DATA:	/* XXX */
-			sk->protinfo.rose->condition &= ~PEER_RX_BUSY_CONDITION;
+			sk->protinfo.rose->condition &= ~ROSE_COND_PEER_RX_BUSY;
 			if (!rose_validate_nr(sk, nr)) {
 				rose_clear_queues(sk);
 				rose_write_internal(sk, ROSE_RESET_REQUEST);
@@ -227,19 +227,19 @@
 				sk->protinfo.rose->timer     = sk->protinfo.rose->t2;
 				break;
 			}
-			if (sk->protinfo.rose->condition & PEER_RX_BUSY_CONDITION) {
-				rose_frames_acked(sk, nr);
+			if (sk->protinfo.rose->condition & ROSE_COND_PEER_RX_BUSY) {
+				sk->protinfo.rose->va = nr;
 			} else {
 				rose_check_iframes_acked(sk, nr);
 			}
-			if (sk->protinfo.rose->condition & OWN_RX_BUSY_CONDITION)
+			if (sk->protinfo.rose->condition & ROSE_COND_OWN_RX_BUSY)
 				break;
 			if (ns == sk->protinfo.rose->vr) {
 				if (rose_queue_rx_frame(sk, skb, m) == 0) {
 					sk->protinfo.rose->vr = (sk->protinfo.rose->vr + 1) % ROSE_MODULUS;
 					queued = 1;
 				} else {
-					sk->protinfo.rose->condition |= OWN_RX_BUSY_CONDITION;
+					sk->protinfo.rose->condition |= ROSE_COND_OWN_RX_BUSY;
 				}
 			}
 			/*
@@ -247,11 +247,11 @@
 			 * acknowledge hold back timer.
 			 */
 			if (((sk->protinfo.rose->vl + ROSE_DEFAULT_WINDOW) % ROSE_MODULUS) == sk->protinfo.rose->vr) {
-				sk->protinfo.rose->condition &= ~ACK_PENDING_CONDITION;
+				sk->protinfo.rose->condition &= ~ROSE_COND_ACK_PENDING;
 				sk->protinfo.rose->timer      = 0;
 				rose_enquiry_response(sk);
 			} else {
-				sk->protinfo.rose->condition |= ACK_PENDING_CONDITION;
+				sk->protinfo.rose->condition |= ROSE_COND_ACK_PENDING;
 				sk->protinfo.rose->timer      = sk->protinfo.rose->hb;
 			}
 			break;
@@ -309,7 +309,7 @@
 int rose_process_rx_frame(struct sock *sk, struct sk_buff *skb)
 {
 	int queued = 0, frametype, ns, nr, q, d, m;
-	
+
 	if (sk->protinfo.rose->state == ROSE_STATE_0)
 		return 0;
 

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