Lines Matching refs:nr
59 sk->protinfo.nr->fraglen += skb->len; in nr_queue_rx_frame()
60 skb_queue_tail(&sk->protinfo.nr->frag_queue, skb); in nr_queue_rx_frame()
64 if (!more && sk->protinfo.nr->fraglen > 0) { /* End of fragment */ in nr_queue_rx_frame()
65 sk->protinfo.nr->fraglen += skb->len; in nr_queue_rx_frame()
66 skb_queue_tail(&sk->protinfo.nr->frag_queue, skb); in nr_queue_rx_frame()
68 if ((skbn = alloc_skb(sk->protinfo.nr->fraglen, GFP_ATOMIC)) == NULL) in nr_queue_rx_frame()
73 while ((skbo = skb_dequeue(&sk->protinfo.nr->frag_queue)) != NULL) { in nr_queue_rx_frame()
78 sk->protinfo.nr->fraglen = 0; in nr_queue_rx_frame()
96 sk->protinfo.nr->your_index = skb->data[17]; in nr_state1_machine()
97 sk->protinfo.nr->your_id = skb->data[18]; in nr_state1_machine()
98 sk->protinfo.nr->vs = 0; in nr_state1_machine()
99 sk->protinfo.nr->va = 0; in nr_state1_machine()
100 sk->protinfo.nr->vr = 0; in nr_state1_machine()
101 sk->protinfo.nr->vl = 0; in nr_state1_machine()
102 sk->protinfo.nr->state = NR_STATE_3; in nr_state1_machine()
103 sk->protinfo.nr->n2count = 0; in nr_state1_machine()
104 sk->protinfo.nr->window = skb->data[20]; in nr_state1_machine()
158 unsigned short nr, ns; in nr_state3_machine() local
161 nr = skb->data[18]; in nr_state3_machine()
185 sk->protinfo.nr->condition |= NR_COND_PEER_RX_BUSY; in nr_state3_machine()
188 sk->protinfo.nr->condition &= ~NR_COND_PEER_RX_BUSY; in nr_state3_machine()
191 if (!nr_validate_nr(sk, nr)) { in nr_state3_machine()
195 nr_frames_acked(sk, nr); in nr_state3_machine()
198 if (sk->protinfo.nr->condition & NR_COND_PEER_RX_BUSY) { in nr_state3_machine()
199 nr_frames_acked(sk, nr); in nr_state3_machine()
201 nr_check_iframes_acked(sk, nr); in nr_state3_machine()
215 sk->protinfo.nr->condition |= NR_COND_PEER_RX_BUSY; in nr_state3_machine()
218 sk->protinfo.nr->condition &= ~NR_COND_PEER_RX_BUSY; in nr_state3_machine()
221 if (nr_validate_nr(sk, nr)) { in nr_state3_machine()
223 nr_frames_acked(sk, nr); in nr_state3_machine()
226 if (sk->protinfo.nr->condition & NR_COND_PEER_RX_BUSY) { in nr_state3_machine()
227 nr_frames_acked(sk, nr); in nr_state3_machine()
229 nr_check_iframes_acked(sk, nr); in nr_state3_machine()
234 skb_queue_head(&sk->protinfo.nr->reseq_queue, skb); in nr_state3_machine()
235 if (sk->protinfo.nr->condition & NR_COND_OWN_RX_BUSY) in nr_state3_machine()
239 save_vr = sk->protinfo.nr->vr; in nr_state3_machine()
240 while ((skbn = skb_dequeue(&sk->protinfo.nr->reseq_queue)) != NULL) { in nr_state3_machine()
242 if (ns == sk->protinfo.nr->vr) { in nr_state3_machine()
244 sk->protinfo.nr->vr = (sk->protinfo.nr->vr + 1) % NR_MODULUS; in nr_state3_machine()
246 sk->protinfo.nr->condition |= NR_COND_OWN_RX_BUSY; in nr_state3_machine()
256 skb_queue_tail(&sk->protinfo.nr->reseq_queue, skbn); in nr_state3_machine()
258 } while (save_vr != sk->protinfo.nr->vr); in nr_state3_machine()
262 if (((sk->protinfo.nr->vl + sk->protinfo.nr->window) % NR_MODULUS) == sk->protinfo.nr->vr) { in nr_state3_machine()
265 if (!(sk->protinfo.nr->condition & NR_COND_ACK_PENDING)) { in nr_state3_machine()
266 sk->protinfo.nr->condition |= NR_COND_ACK_PENDING; in nr_state3_machine()
284 if (sk->protinfo.nr->state == NR_STATE_0) in nr_process_rx_frame()
289 switch (sk->protinfo.nr->state) { in nr_process_rx_frame()