Home
last modified time | relevance | path

Searched refs:nr (Results 1 – 25 of 56) sorted by relevance

123

/net/netrom/
Dnr_out.c84 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()
[all …]
Dnr_timer.c40 struct nr_sock *nr = nr_sk(sk); in nr_init_timers() local
42 setup_timer(&nr->t1timer, nr_t1timer_expiry, (unsigned long)sk); in nr_init_timers()
43 setup_timer(&nr->t2timer, nr_t2timer_expiry, (unsigned long)sk); in nr_init_timers()
44 setup_timer(&nr->t4timer, nr_t4timer_expiry, (unsigned long)sk); in nr_init_timers()
45 setup_timer(&nr->idletimer, nr_idletimer_expiry, (unsigned long)sk); in nr_init_timers()
54 struct nr_sock *nr = nr_sk(sk); in nr_start_t1timer() local
56 mod_timer(&nr->t1timer, jiffies + nr->t1); in nr_start_t1timer()
61 struct nr_sock *nr = nr_sk(sk); in nr_start_t2timer() local
63 mod_timer(&nr->t2timer, jiffies + nr->t2); in nr_start_t2timer()
68 struct nr_sock *nr = nr_sk(sk); in nr_start_t4timer() local
[all …]
Dnr_subr.c36 struct nr_sock *nr = nr_sk(sk); in nr_clear_queues() local
39 skb_queue_purge(&nr->ack_queue); in nr_clear_queues()
40 skb_queue_purge(&nr->reseq_queue); in nr_clear_queues()
41 skb_queue_purge(&nr->frag_queue); in nr_clear_queues()
49 void nr_frames_acked(struct sock *sk, unsigned short nr) in nr_frames_acked() argument
57 if (nrom->va != nr) { in nr_frames_acked()
58 while (skb_peek(&nrom->ack_queue) != NULL && nrom->va != nr) { in nr_frames_acked()
88 int nr_validate_nr(struct sock *sk, unsigned short nr) in nr_validate_nr() argument
94 if (nr == vc) return 1; in nr_validate_nr()
98 return nr == nrom->vs; in nr_validate_nr()
[all …]
Dnr_in.c35 struct nr_sock *nr = nr_sk(sk); in nr_queue_rx_frame() local
42 nr->fraglen += skb->len; in nr_queue_rx_frame()
43 skb_queue_tail(&nr->frag_queue, skb); in nr_queue_rx_frame()
47 if (!more && nr->fraglen > 0) { /* End of fragment */ in nr_queue_rx_frame()
48 nr->fraglen += skb->len; in nr_queue_rx_frame()
49 skb_queue_tail(&nr->frag_queue, skb); in nr_queue_rx_frame()
51 if ((skbn = alloc_skb(nr->fraglen, GFP_ATOMIC)) == NULL) in nr_queue_rx_frame()
56 while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) { in nr_queue_rx_frame()
63 nr->fraglen = 0; in nr_queue_rx_frame()
79 struct nr_sock *nr = nr_sk(sk); in nr_state1_machine() local
[all …]
Daf_netrom.c174 struct nr_sock *nr = nr_sk(s); in nr_find_socket() local
176 if (nr->my_index == index && nr->my_id == id) { in nr_find_socket()
197 struct nr_sock *nr = nr_sk(s); in nr_find_peer() local
199 if (nr->your_index == index && nr->your_id == id && in nr_find_peer()
200 !ax25cmp(&nr->dest_addr, dest)) { in nr_find_peer()
303 struct nr_sock *nr = nr_sk(sk); in nr_setsockopt() local
319 nr->t1 = opt * HZ; in nr_setsockopt()
325 nr->t2 = opt * HZ; in nr_setsockopt()
331 nr->n2 = opt; in nr_setsockopt()
337 nr->t4 = opt * HZ; in nr_setsockopt()
[all …]
/net/ncsi/
Dncsi-rsp.c23 static int ncsi_validate_rsp_pkt(struct ncsi_request *nr, in ncsi_validate_rsp_pkt() argument
34 h = (struct ncsi_rsp_pkt_hdr *)skb_network_header(nr->rsp); in ncsi_validate_rsp_pkt()
61 static int ncsi_rsp_handler_cis(struct ncsi_request *nr) in ncsi_rsp_handler_cis() argument
64 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_cis()
69 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_cis()
82 static int ncsi_rsp_handler_sp(struct ncsi_request *nr) in ncsi_rsp_handler_sp() argument
85 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_sp()
92 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_sp()
108 static int ncsi_rsp_handler_dp(struct ncsi_request *nr) in ncsi_rsp_handler_dp() argument
111 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_dp()
[all …]
Dncsi-cmd.c273 struct ncsi_request *nr; in ncsi_alloc_command() local
275 nr = ncsi_alloc_request(ndp, nca->req_flags); in ncsi_alloc_command()
276 if (!nr) in ncsi_alloc_command()
292 ncsi_free_request(nr); in ncsi_alloc_command()
296 nr->cmd = skb; in ncsi_alloc_command()
303 return nr; in ncsi_alloc_command()
308 struct ncsi_request *nr; in ncsi_xmit_cmd() local
333 nr = ncsi_alloc_command(nca); in ncsi_xmit_cmd()
334 if (!nr) in ncsi_xmit_cmd()
338 nca->id = nr->id; in ncsi_xmit_cmd()
[all …]
Dncsi-manage.c431 struct ncsi_request *nr = NULL; in ncsi_alloc_request() local
441 nr = &ndp->requests[i]; in ncsi_alloc_request()
442 nr->used = true; in ncsi_alloc_request()
443 nr->flags = req_flags; in ncsi_alloc_request()
453 nr = &ndp->requests[i]; in ncsi_alloc_request()
454 nr->used = true; in ncsi_alloc_request()
455 nr->flags = req_flags; in ncsi_alloc_request()
462 return nr; in ncsi_alloc_request()
465 void ncsi_free_request(struct ncsi_request *nr) in ncsi_free_request() argument
467 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_free_request()
[all …]
/net/ax25/
Dax25_std_in.c144 …state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type) in ax25_std_state3_machine() argument
187 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine()
188 ax25_check_iframes_acked(ax25, nr); in ax25_std_state3_machine()
199 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine()
200 ax25_frames_acked(ax25, nr); in ax25_std_state3_machine()
212 if (!ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine()
218 ax25_frames_acked(ax25, nr); in ax25_std_state3_machine()
220 ax25_check_iframes_acked(ax25, nr); in ax25_std_state3_machine()
269 …state4_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type) in ax25_std_state4_machine() argument
315 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state4_machine()
[all …]
Dax25_subr.c49 void ax25_frames_acked(ax25_cb *ax25, unsigned short nr) in ax25_frames_acked() argument
56 if (ax25->va != nr) { in ax25_frames_acked()
57 while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) { in ax25_frames_acked()
82 int ax25_validate_nr(ax25_cb *ax25, unsigned short nr) in ax25_validate_nr() argument
87 if (nr == vc) return 1; in ax25_validate_nr()
91 if (nr == ax25->vs) return 1; in ax25_validate_nr()
100 int ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf) in ax25_decode() argument
106 *ns = *nr = *pf = 0; in ax25_decode()
112 *nr = (frame[0] >> 5) & 0x07; in ax25_decode()
116 *nr = (frame[0] >> 5) & 0x07; in ax25_decode()
[all …]
Dax25_ds_in.c148 static int ax25_ds_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr in ax25_ds_state3_machine() argument
192 if (ax25_validate_nr(ax25, nr)) { in ax25_ds_state3_machine()
193 if (ax25_check_iframes_acked(ax25, nr)) in ax25_ds_state3_machine()
206 if (ax25_validate_nr(ax25, nr)) { in ax25_ds_state3_machine()
207 if (ax25->va != nr) in ax25_ds_state3_machine()
210 ax25_frames_acked(ax25, nr); in ax25_ds_state3_machine()
225 if (!ax25_validate_nr(ax25, nr)) { in ax25_ds_state3_machine()
231 ax25_frames_acked(ax25, nr); in ax25_ds_state3_machine()
234 if (ax25_check_iframes_acked(ax25, nr)) in ax25_ds_state3_machine()
284 int queued = 0, frametype, ns, nr, pf; in ax25_ds_frame_in() local
[all …]
/net/llc/
Dllc_pdu.c107 void llc_pdu_init_as_i_cmd(struct sk_buff *skb, u8 p_bit, u8 ns, u8 nr) in llc_pdu_init_as_i_cmd() argument
115 pdu->ctrl_2 |= (nr << 1) & 0xFE; /* set N(R) in bits 10..16 */ in llc_pdu_init_as_i_cmd()
126 void llc_pdu_init_as_rej_cmd(struct sk_buff *skb, u8 p_bit, u8 nr) in llc_pdu_init_as_rej_cmd() argument
135 pdu->ctrl_2 |= (nr << 1) & 0xFE; /* set N(R) in bits 10..16 */ in llc_pdu_init_as_rej_cmd()
146 void llc_pdu_init_as_rnr_cmd(struct sk_buff *skb, u8 p_bit, u8 nr) in llc_pdu_init_as_rnr_cmd() argument
155 pdu->ctrl_2 |= (nr << 1) & 0xFE; /* set N(R) in bits 10..16 */ in llc_pdu_init_as_rnr_cmd()
166 void llc_pdu_init_as_rr_cmd(struct sk_buff *skb, u8 p_bit, u8 nr) in llc_pdu_init_as_rr_cmd() argument
174 pdu->ctrl_2 |= (nr << 1) & 0xFE; /* set N(R) in bits 10..16 */ in llc_pdu_init_as_rr_cmd()
255 void llc_pdu_init_as_rr_rsp(struct sk_buff *skb, u8 f_bit, u8 nr) in llc_pdu_init_as_rr_rsp() argument
264 pdu->ctrl_2 |= (nr << 1) & 0xFE; /* set N(R) in bits 10..16 */ in llc_pdu_init_as_rr_rsp()
[all …]
/net/nfc/hci/
Dllc_shdlc.c61 int nr; /* next expected seq num for receive */ member
152 enum sframe_type sframe_type, int nr) in llc_shdlc_send_s_frame() argument
157 pr_debug("sframe_type=%d nr=%d\n", sframe_type, nr); in llc_shdlc_send_s_frame()
163 *skb_push(skb, 1) = SHDLC_CONTROL_HEAD_S | (sframe_type << 3) | nr; in llc_shdlc_send_s_frame()
235 struct sk_buff *skb, int ns, int nr) in llc_shdlc_rcv_i_frame() argument
238 int y_nr = nr; in llc_shdlc_rcv_i_frame()
240 pr_debug("recvd I-frame %d, remote waiting frame %d\n", ns, nr); in llc_shdlc_rcv_i_frame()
245 if (x_ns != shdlc->nr) { in llc_shdlc_rcv_i_frame()
246 llc_shdlc_send_s_frame(shdlc, S_FRAME_REJ, shdlc->nr); in llc_shdlc_rcv_i_frame()
262 shdlc->nr = (shdlc->nr + 1) % 8; in llc_shdlc_rcv_i_frame()
[all …]
/net/xfrm/
Dxfrm_replay.c199 unsigned int bitnr, nr; in xfrm_replay_check_bmp() local
226 nr = bitnr >> 5; in xfrm_replay_check_bmp()
228 if (replay_esn->bmp[nr] & (1U << bitnr)) in xfrm_replay_check_bmp()
242 unsigned int bitnr, nr, i; in xfrm_replay_advance_bmp() local
259 nr = bitnr >> 5; in xfrm_replay_advance_bmp()
261 replay_esn->bmp[nr] &= ~(1U << bitnr); in xfrm_replay_advance_bmp()
264 nr = (replay_esn->replay_window - 1) >> 5; in xfrm_replay_advance_bmp()
265 for (i = 0; i <= nr; i++) in xfrm_replay_advance_bmp()
280 nr = bitnr >> 5; in xfrm_replay_advance_bmp()
282 replay_esn->bmp[nr] |= (1U << bitnr); in xfrm_replay_advance_bmp()
[all …]
/net/x25/
Dx25_subr.c56 void x25_frames_acked(struct sock *sk, unsigned short nr) in x25_frames_acked() argument
65 if (x25->va != nr) in x25_frames_acked()
66 while (skb_peek(&x25->ack_queue) && x25->va != nr) { in x25_frames_acked()
95 int x25_validate_nr(struct sock *sk, unsigned short nr) in x25_validate_nr() argument
102 if (nr == vc) in x25_validate_nr()
107 return nr == x25->vs ? 1 : 0; in x25_validate_nr()
270 int x25_decode(struct sock *sk, struct sk_buff *skb, int *ns, int *nr, int *q, in x25_decode() argument
280 *ns = *nr = *q = *d = *m = 0; in x25_decode()
307 *nr = (frame[3] >> 1) & 0x7F; in x25_decode()
314 *nr = (frame[2] >> 5) & 0x07; in x25_decode()
[all …]
Dx25_in.c204 static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, … in x25_state3_machine() argument
235 if (!x25_validate_nr(sk, nr)) { in x25_state3_machine()
246 x25_frames_acked(sk, nr); in x25_state3_machine()
257 if ((ns != x25->vr) || !x25_validate_nr(sk, nr)) { in x25_state3_machine()
269 x25_frames_acked(sk, nr); in x25_state3_machine()
384 int queued = 0, frametype, ns, nr, q, d, m; in x25_process_rx_frame() local
389 frametype = x25_decode(sk, skb, &ns, &nr, &q, &d, &m); in x25_process_rx_frame()
399 queued = x25_state3_machine(sk, skb, frametype, ns, nr, q, d, m); in x25_process_rx_frame()
/net/lapb/
Dlapb_subr.c51 void lapb_frames_acked(struct lapb_cb *lapb, unsigned short nr) in lapb_frames_acked() argument
61 if (lapb->va != nr) in lapb_frames_acked()
62 while (skb_peek(&lapb->ack_queue) && lapb->va != nr) { in lapb_frames_acked()
91 int lapb_validate_nr(struct lapb_cb *lapb, unsigned short nr) in lapb_validate_nr() argument
99 if (nr == vc) in lapb_validate_nr()
104 return nr == lapb->vs; in lapb_validate_nr()
161 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode()
173 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode()
195 frame->nr = (skb->data[0] >> 5) & 0x07; in lapb_decode()
202 frame->nr = (skb->data[0] >> 5) & 0x07; in lapb_decode()
Dlapb_in.c328 lapb->dev, frame->pf, frame->nr); in lapb_state3_machine()
331 if (lapb_validate_nr(lapb, frame->nr)) { in lapb_state3_machine()
332 lapb_check_iframes_acked(lapb, frame->nr); in lapb_state3_machine()
347 lapb->dev, frame->pf, frame->nr); in lapb_state3_machine()
350 if (lapb_validate_nr(lapb, frame->nr)) { in lapb_state3_machine()
351 lapb_check_iframes_acked(lapb, frame->nr); in lapb_state3_machine()
366 lapb->dev, frame->pf, frame->nr); in lapb_state3_machine()
369 if (lapb_validate_nr(lapb, frame->nr)) { in lapb_state3_machine()
370 lapb_frames_acked(lapb, frame->nr); in lapb_state3_machine()
388 lapb->dev, frame->pf, frame->ns, frame->nr); in lapb_state3_machine()
[all …]
Dlapb_out.c193 void lapb_check_iframes_acked(struct lapb_cb *lapb, unsigned short nr) in lapb_check_iframes_acked() argument
195 if (lapb->vs == nr) { in lapb_check_iframes_acked()
196 lapb_frames_acked(lapb, nr); in lapb_check_iframes_acked()
199 } else if (lapb->va != nr) { in lapb_check_iframes_acked()
200 lapb_frames_acked(lapb, nr); in lapb_check_iframes_acked()
/net/rose/
Drose_in.c104 static int rose_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr,… in rose_state3_machine() argument
130 if (!rose_validate_nr(sk, nr)) { in rose_state3_machine()
141 rose_frames_acked(sk, nr); in rose_state3_machine()
152 if (!rose_validate_nr(sk, nr)) { in rose_state3_machine()
164 rose_frames_acked(sk, nr); in rose_state3_machine()
267 int queued = 0, frametype, ns, nr, q, d, m; in rose_process_rx_frame() local
272 frametype = rose_decode(skb, &ns, &nr, &q, &d, &m); in rose_process_rx_frame()
282 queued = rose_state3_machine(sk, skb, frametype, ns, nr, q, d, m); in rose_process_rx_frame()
Drose_subr.c46 void rose_frames_acked(struct sock *sk, unsigned short nr) in rose_frames_acked() argument
54 if (rose->va != nr) { in rose_frames_acked()
55 while (skb_peek(&rose->ack_queue) != NULL && rose->va != nr) { in rose_frames_acked()
85 int rose_validate_nr(struct sock *sk, unsigned short nr) in rose_validate_nr() argument
91 if (nr == vc) return 1; in rose_validate_nr()
95 return nr == rose->vs; in rose_validate_nr()
201 int rose_decode(struct sk_buff *skb, int *ns, int *nr, int *q, int *d, int *m) in rose_decode() argument
207 *ns = *nr = *q = *d = *m = 0; in rose_decode()
223 *nr = (frame[2] >> 5) & 0x07; in rose_decode()
231 *nr = (frame[2] >> 5) & 0x07; in rose_decode()
/net/irda/
Dirlap_event.c1221 nr_status = irlap_validate_nr_received(self, info->nr); in irlap_state_nrm_p()
1232 irlap_update_nr_received(self, info->nr); in irlap_state_nrm_p()
1282 irlap_update_nr_received(self, info->nr); in irlap_state_nrm_p()
1296 irlap_update_nr_received(self, info->nr); in irlap_state_nrm_p()
1317 irlap_update_nr_received(self, info->nr); in irlap_state_nrm_p()
1344 irlap_update_nr_received(self, info->nr); in irlap_state_nrm_p()
1434 ret = irlap_validate_nr_received(self, info->nr); in irlap_state_nrm_p()
1437 irlap_update_nr_received(self, info->nr); in irlap_state_nrm_p()
1458 irlap_update_nr_received(self, info->nr); in irlap_state_nrm_p()
1461 self->retry_count, info->nr, self->va, in irlap_state_nrm_p()
[all …]
/net/rds/
Dib_ring.c66 void rds_ib_ring_init(struct rds_ib_work_ring *ring, u32 nr) in rds_ib_ring_init() argument
69 ring->w_nr = nr; in rds_ib_ring_init()
84 void rds_ib_ring_resize(struct rds_ib_work_ring *ring, u32 nr) in rds_ib_ring_resize() argument
89 ring->w_nr = nr; in rds_ib_ring_resize()
Dstats.c82 uint64_t *values, const char *const *names, size_t nr) in rds_stats_info_copy() argument
87 for (i = 0; i < nr; i++) { in rds_stats_info_copy()
139 lens->nr = rds_trans_stats_info_copy(iter, avail) + in rds_stats_info()
/net/l2tp/
Dl2tp_core.c519 session->nr++; in l2tp_recv_dequeue_skb()
520 session->nr &= session->nr_max; in l2tp_recv_dequeue_skb()
523 session->name, session->nr); in l2tp_recv_dequeue_skb()
557 L2TP_SKB_CB(skb)->length, session->nr, in l2tp_recv_dequeue()
571 session->name, session->nr, in l2tp_recv_dequeue()
574 session->nr = L2TP_SKB_CB(skb)->ns; in l2tp_recv_dequeue()
576 if (L2TP_SKB_CB(skb)->ns != session->nr) { in l2tp_recv_dequeue()
580 L2TP_SKB_CB(skb)->length, session->nr, in l2tp_recv_dequeue()
599 static int l2tp_seq_check_rx_window(struct l2tp_session *session, u32 nr) in l2tp_seq_check_rx_window() argument
603 if (nr >= session->nr) in l2tp_seq_check_rx_window()
[all …]

123