Lines Matching refs:nr
81 struct nr_sock *nr = nr_sk(sk); in nr_send_iframe() local
86 skb->data[2] = nr->vs; in nr_send_iframe()
87 skb->data[3] = nr->vr; in nr_send_iframe()
89 if (nr->condition & NR_COND_OWN_RX_BUSY) in nr_send_iframe()
100 struct nr_sock *nr = nr_sk(sk); in nr_send_nak_frame() local
102 if ((skb = skb_peek(&nr->ack_queue)) == NULL) in nr_send_nak_frame()
108 skbn->data[2] = nr->va; in nr_send_nak_frame()
109 skbn->data[3] = nr->vr; in nr_send_nak_frame()
111 if (nr->condition & NR_COND_OWN_RX_BUSY) in nr_send_nak_frame()
116 nr->condition &= ~NR_COND_ACK_PENDING; in nr_send_nak_frame()
117 nr->vl = nr->vr; in nr_send_nak_frame()
124 struct nr_sock *nr = nr_sk(sk); in nr_kick() local
128 if (nr->state != NR_STATE_3) in nr_kick()
131 if (nr->condition & NR_COND_PEER_RX_BUSY) in nr_kick()
137 start = (skb_peek(&nr->ack_queue) == NULL) ? nr->va : nr->vs; in nr_kick()
138 end = (nr->va + nr->window) % NR_MODULUS; in nr_kick()
143 nr->vs = start; in nr_kick()
168 nr->vs = (nr->vs + 1) % NR_MODULUS; in nr_kick()
173 skb_queue_tail(&nr->ack_queue, skb); in nr_kick()
175 } while (nr->vs != end && in nr_kick()
178 nr->vl = nr->vr; in nr_kick()
179 nr->condition &= ~NR_COND_ACK_PENDING; in nr_kick()
187 struct nr_sock *nr = nr_sk(sk); in nr_transmit_buffer() local
195 memcpy(dptr, &nr->source_addr, AX25_ADDR_LEN); in nr_transmit_buffer()
201 memcpy(dptr, &nr->dest_addr, AX25_ADDR_LEN); in nr_transmit_buffer()
222 struct nr_sock *nr = nr_sk(sk); in nr_establish_data_link() local
224 nr->condition = 0x00; in nr_establish_data_link()
225 nr->n2count = 0; in nr_establish_data_link()
240 struct nr_sock *nr = nr_sk(sk); in nr_enquiry_response() local
243 if (nr->condition & NR_COND_OWN_RX_BUSY) { in nr_enquiry_response()
246 if (skb_peek(&nr->reseq_queue) != NULL) in nr_enquiry_response()
252 nr->vl = nr->vr; in nr_enquiry_response()
253 nr->condition &= ~NR_COND_ACK_PENDING; in nr_enquiry_response()
256 void nr_check_iframes_acked(struct sock *sk, unsigned short nr) in nr_check_iframes_acked() argument
260 if (nrom->vs == nr) { in nr_check_iframes_acked()
261 nr_frames_acked(sk, nr); in nr_check_iframes_acked()
265 if (nrom->va != nr) { in nr_check_iframes_acked()
266 nr_frames_acked(sk, nr); in nr_check_iframes_acked()