Lines Matching refs:nr
84 struct nr_sock *nr = nr_sk(sk); in nr_send_iframe() local
89 skb->data[2] = nr->vs; in nr_send_iframe()
90 skb->data[3] = nr->vr; in nr_send_iframe()
92 if (nr->condition & NR_COND_OWN_RX_BUSY) in nr_send_iframe()
103 struct nr_sock *nr = nr_sk(sk); in nr_send_nak_frame() local
105 if ((skb = skb_peek(&nr->ack_queue)) == NULL) in nr_send_nak_frame()
111 skbn->data[2] = nr->va; in nr_send_nak_frame()
112 skbn->data[3] = nr->vr; in nr_send_nak_frame()
114 if (nr->condition & NR_COND_OWN_RX_BUSY) in nr_send_nak_frame()
119 nr->condition &= ~NR_COND_ACK_PENDING; in nr_send_nak_frame()
120 nr->vl = nr->vr; in nr_send_nak_frame()
127 struct nr_sock *nr = nr_sk(sk); in nr_kick() local
131 if (nr->state != NR_STATE_3) in nr_kick()
134 if (nr->condition & NR_COND_PEER_RX_BUSY) in nr_kick()
140 start = (skb_peek(&nr->ack_queue) == NULL) ? nr->va : nr->vs; in nr_kick()
141 end = (nr->va + nr->window) % NR_MODULUS; in nr_kick()
146 nr->vs = start; in nr_kick()
171 nr->vs = (nr->vs + 1) % NR_MODULUS; in nr_kick()
176 skb_queue_tail(&nr->ack_queue, skb); in nr_kick()
178 } while (nr->vs != end && in nr_kick()
181 nr->vl = nr->vr; in nr_kick()
182 nr->condition &= ~NR_COND_ACK_PENDING; in nr_kick()
190 struct nr_sock *nr = nr_sk(sk); in nr_transmit_buffer() local
198 memcpy(dptr, &nr->source_addr, AX25_ADDR_LEN); in nr_transmit_buffer()
204 memcpy(dptr, &nr->dest_addr, AX25_ADDR_LEN); in nr_transmit_buffer()
225 struct nr_sock *nr = nr_sk(sk); in nr_establish_data_link() local
227 nr->condition = 0x00; in nr_establish_data_link()
228 nr->n2count = 0; in nr_establish_data_link()
243 struct nr_sock *nr = nr_sk(sk); in nr_enquiry_response() local
246 if (nr->condition & NR_COND_OWN_RX_BUSY) { in nr_enquiry_response()
249 if (skb_peek(&nr->reseq_queue) != NULL) in nr_enquiry_response()
255 nr->vl = nr->vr; in nr_enquiry_response()
256 nr->condition &= ~NR_COND_ACK_PENDING; in nr_enquiry_response()
259 void nr_check_iframes_acked(struct sock *sk, unsigned short nr) in nr_check_iframes_acked() argument
263 if (nrom->vs == nr) { in nr_check_iframes_acked()
264 nr_frames_acked(sk, nr); in nr_check_iframes_acked()
268 if (nrom->va != nr) { in nr_check_iframes_acked()
269 nr_frames_acked(sk, nr); in nr_check_iframes_acked()