/net/netrom/ |
D | nr_timer.c | 37 struct nr_sock *nr = nr_sk(sk); in nr_init_timers() local 39 timer_setup(&nr->t1timer, nr_t1timer_expiry, 0); in nr_init_timers() 40 timer_setup(&nr->t2timer, nr_t2timer_expiry, 0); in nr_init_timers() 41 timer_setup(&nr->t4timer, nr_t4timer_expiry, 0); in nr_init_timers() 42 timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); in nr_init_timers() 50 struct nr_sock *nr = nr_sk(sk); in nr_start_t1timer() local 52 sk_reset_timer(sk, &nr->t1timer, jiffies + nr->t1); in nr_start_t1timer() 57 struct nr_sock *nr = nr_sk(sk); in nr_start_t2timer() local 59 sk_reset_timer(sk, &nr->t2timer, jiffies + nr->t2); in nr_start_t2timer() 64 struct nr_sock *nr = nr_sk(sk); in nr_start_t4timer() local [all …]
|
D | nr_out.c | 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() [all …]
|
D | nr_subr.c | 33 struct nr_sock *nr = nr_sk(sk); in nr_clear_queues() local 36 skb_queue_purge(&nr->ack_queue); in nr_clear_queues() 37 skb_queue_purge(&nr->reseq_queue); in nr_clear_queues() 38 skb_queue_purge(&nr->frag_queue); in nr_clear_queues() 46 void nr_frames_acked(struct sock *sk, unsigned short nr) in nr_frames_acked() argument 54 if (nrom->va != nr) { in nr_frames_acked() 55 while (skb_peek(&nrom->ack_queue) != NULL && nrom->va != nr) { in nr_frames_acked() 85 int nr_validate_nr(struct sock *sk, unsigned short nr) in nr_validate_nr() argument 91 if (nr == vc) return 1; in nr_validate_nr() 95 return nr == nrom->vs; in nr_validate_nr() [all …]
|
D | nr_in.c | 32 struct nr_sock *nr = nr_sk(sk); in nr_queue_rx_frame() local 39 nr->fraglen += skb->len; in nr_queue_rx_frame() 40 skb_queue_tail(&nr->frag_queue, skb); in nr_queue_rx_frame() 44 if (!more && nr->fraglen > 0) { /* End of fragment */ in nr_queue_rx_frame() 45 nr->fraglen += skb->len; in nr_queue_rx_frame() 46 skb_queue_tail(&nr->frag_queue, skb); in nr_queue_rx_frame() 48 if ((skbn = alloc_skb(nr->fraglen, GFP_ATOMIC)) == NULL) in nr_queue_rx_frame() 53 while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) { in nr_queue_rx_frame() 60 nr->fraglen = 0; in nr_queue_rx_frame() 76 struct nr_sock *nr = nr_sk(sk); in nr_state1_machine() local [all …]
|
D | af_netrom.c | 149 struct nr_sock *nr = nr_sk(s); in nr_find_socket() local 151 if (nr->my_index == index && nr->my_id == id) { in nr_find_socket() 172 struct nr_sock *nr = nr_sk(s); in nr_find_peer() local 174 if (nr->your_index == index && nr->your_id == id && in nr_find_peer() 175 !ax25cmp(&nr->dest_addr, dest)) { in nr_find_peer() 278 struct nr_sock *nr = nr_sk(sk); in nr_setsockopt() local 294 nr->t1 = opt * HZ; in nr_setsockopt() 300 nr->t2 = opt * HZ; in nr_setsockopt() 306 nr->n2 = opt; in nr_setsockopt() 312 nr->t4 = opt * HZ; in nr_setsockopt() [all …]
|
/net/ncsi/ |
D | ncsi-rsp.c | 35 static int ncsi_validate_rsp_pkt(struct ncsi_request *nr, in ncsi_validate_rsp_pkt() argument 46 h = (struct ncsi_rsp_pkt_hdr *)skb_network_header(nr->rsp); in ncsi_validate_rsp_pkt() 49 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt() 54 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt() 62 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt() 80 netdev_dbg(nr->ndp->ndev.dev, in ncsi_validate_rsp_pkt() 89 static int ncsi_rsp_handler_cis(struct ncsi_request *nr) in ncsi_rsp_handler_cis() argument 92 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_rsp_handler_cis() 97 rsp = (struct ncsi_rsp_pkt *)skb_network_header(nr->rsp); in ncsi_rsp_handler_cis() 110 static int ncsi_rsp_handler_sp(struct ncsi_request *nr) in ncsi_rsp_handler_sp() argument [all …]
|
D | ncsi-cmd.c | 285 struct ncsi_request *nr; in ncsi_alloc_command() local 287 nr = ncsi_alloc_request(ndp, nca->req_flags); in ncsi_alloc_command() 288 if (!nr) in ncsi_alloc_command() 304 ncsi_free_request(nr); in ncsi_alloc_command() 308 nr->cmd = skb; in ncsi_alloc_command() 315 return nr; in ncsi_alloc_command() 321 struct ncsi_request *nr; in ncsi_xmit_cmd() local 357 nr = ncsi_alloc_command(nca); in ncsi_xmit_cmd() 358 if (!nr) in ncsi_xmit_cmd() 363 nr->snd_seq = nca->info->snd_seq; in ncsi_xmit_cmd() [all …]
|
D | ncsi-manage.c | 354 struct ncsi_request *nr = NULL; in ncsi_alloc_request() local 364 nr = &ndp->requests[i]; in ncsi_alloc_request() 365 nr->used = true; in ncsi_alloc_request() 366 nr->flags = req_flags; in ncsi_alloc_request() 376 nr = &ndp->requests[i]; in ncsi_alloc_request() 377 nr->used = true; in ncsi_alloc_request() 378 nr->flags = req_flags; in ncsi_alloc_request() 385 return nr; in ncsi_alloc_request() 388 void ncsi_free_request(struct ncsi_request *nr) in ncsi_free_request() argument 390 struct ncsi_dev_priv *ndp = nr->ndp; in ncsi_free_request() [all …]
|
D | ncsi-netlink.c | 482 int ncsi_send_netlink_rsp(struct ncsi_request *nr, in ncsi_send_netlink_rsp() argument 491 net = dev_net(nr->rsp->dev); in ncsi_send_netlink_rsp() 497 hdr = genlmsg_put(skb, nr->snd_portid, nr->snd_seq, in ncsi_send_netlink_rsp() 504 nla_put_u32(skb, NCSI_ATTR_IFINDEX, nr->rsp->dev->ifindex); in ncsi_send_netlink_rsp() 512 rc = nla_put(skb, NCSI_ATTR_DATA, nr->rsp->len, (void *)nr->rsp->data); in ncsi_send_netlink_rsp() 517 return genlmsg_unicast(net, skb, nr->snd_portid); in ncsi_send_netlink_rsp() 524 int ncsi_send_netlink_timeout(struct ncsi_request *nr, in ncsi_send_netlink_timeout() argument 536 hdr = genlmsg_put(skb, nr->snd_portid, nr->snd_seq, in ncsi_send_netlink_timeout() 543 net = dev_net(nr->cmd->dev); in ncsi_send_netlink_timeout() 545 nla_put_u32(skb, NCSI_ATTR_IFINDEX, nr->cmd->dev->ifindex); in ncsi_send_netlink_timeout() [all …]
|
/net/ax25/ |
D | ax25_std_in.c | 141 …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 184 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine() 185 ax25_check_iframes_acked(ax25, nr); in ax25_std_state3_machine() 196 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine() 197 ax25_frames_acked(ax25, nr); in ax25_std_state3_machine() 209 if (!ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine() 215 ax25_frames_acked(ax25, nr); in ax25_std_state3_machine() 217 ax25_check_iframes_acked(ax25, nr); in ax25_std_state3_machine() 266 …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 312 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state4_machine() [all …]
|
D | ax25_ds_in.c | 145 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 189 if (ax25_validate_nr(ax25, nr)) { in ax25_ds_state3_machine() 190 if (ax25_check_iframes_acked(ax25, nr)) in ax25_ds_state3_machine() 203 if (ax25_validate_nr(ax25, nr)) { in ax25_ds_state3_machine() 204 if (ax25->va != nr) in ax25_ds_state3_machine() 207 ax25_frames_acked(ax25, nr); in ax25_ds_state3_machine() 222 if (!ax25_validate_nr(ax25, nr)) { in ax25_ds_state3_machine() 228 ax25_frames_acked(ax25, nr); in ax25_ds_state3_machine() 231 if (ax25_check_iframes_acked(ax25, nr)) in ax25_ds_state3_machine() 281 int queued = 0, frametype, ns, nr, pf; in ax25_ds_frame_in() local [all …]
|
D | ax25_subr.c | 46 void ax25_frames_acked(ax25_cb *ax25, unsigned short nr) in ax25_frames_acked() argument 53 if (ax25->va != nr) { in ax25_frames_acked() 54 while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) { in ax25_frames_acked() 79 int ax25_validate_nr(ax25_cb *ax25, unsigned short nr) in ax25_validate_nr() argument 84 if (nr == vc) return 1; in ax25_validate_nr() 88 if (nr == ax25->vs) return 1; in ax25_validate_nr() 97 int ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf) in ax25_decode() argument 103 *ns = *nr = *pf = 0; in ax25_decode() 109 *nr = (frame[0] >> 5) & 0x07; in ax25_decode() 113 *nr = (frame[0] >> 5) & 0x07; in ax25_decode() [all …]
|
/net/llc/ |
D | llc_pdu.c | 107 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/ |
D | llc_shdlc.c | 50 int nr; /* next expected seq num for receive */ member 141 enum sframe_type sframe_type, int nr) in llc_shdlc_send_s_frame() argument 146 pr_debug("sframe_type=%d nr=%d\n", sframe_type, nr); in llc_shdlc_send_s_frame() 152 *(u8 *)skb_push(skb, 1) = SHDLC_CONTROL_HEAD_S | (sframe_type << 3) | nr; in llc_shdlc_send_s_frame() 224 struct sk_buff *skb, int ns, int nr) in llc_shdlc_rcv_i_frame() argument 227 int y_nr = nr; in llc_shdlc_rcv_i_frame() 229 pr_debug("recvd I-frame %d, remote waiting frame %d\n", ns, nr); in llc_shdlc_rcv_i_frame() 234 if (x_ns != shdlc->nr) { in llc_shdlc_rcv_i_frame() 235 llc_shdlc_send_s_frame(shdlc, S_FRAME_REJ, shdlc->nr); in llc_shdlc_rcv_i_frame() 251 shdlc->nr = (shdlc->nr + 1) % 8; in llc_shdlc_rcv_i_frame() [all …]
|
/net/x25/ |
D | x25_subr.c | 51 void x25_frames_acked(struct sock *sk, unsigned short nr) in x25_frames_acked() argument 60 if (x25->va != nr) in x25_frames_acked() 61 while (skb_peek(&x25->ack_queue) && x25->va != nr) { in x25_frames_acked() 90 int x25_validate_nr(struct sock *sk, unsigned short nr) in x25_validate_nr() argument 97 if (nr == vc) in x25_validate_nr() 102 return nr == x25->vs ? 1 : 0; in x25_validate_nr() 260 int x25_decode(struct sock *sk, struct sk_buff *skb, int *ns, int *nr, int *q, in x25_decode() argument 270 *ns = *nr = *q = *d = *m = 0; in x25_decode() 297 *nr = (frame[3] >> 1) & 0x7F; in x25_decode() 304 *nr = (frame[2] >> 5) & 0x07; in x25_decode() [all …]
|
D | x25_in.c | 208 static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, … in x25_state3_machine() argument 239 if (!x25_validate_nr(sk, nr)) { in x25_state3_machine() 250 x25_frames_acked(sk, nr); in x25_state3_machine() 261 if ((ns != x25->vr) || !x25_validate_nr(sk, nr)) { in x25_state3_machine() 273 x25_frames_acked(sk, nr); in x25_state3_machine() 389 int queued = 0, frametype, ns, nr, q, d, m; in x25_process_rx_frame() local 394 frametype = x25_decode(sk, skb, &ns, &nr, &q, &d, &m); in x25_process_rx_frame() 404 queued = x25_state3_machine(sk, skb, frametype, ns, nr, q, d, m); in x25_process_rx_frame()
|
/net/lapb/ |
D | lapb_subr.c | 46 void lapb_frames_acked(struct lapb_cb *lapb, unsigned short nr) in lapb_frames_acked() argument 56 if (lapb->va != nr) in lapb_frames_acked() 57 while (skb_peek(&lapb->ack_queue) && lapb->va != nr) { in lapb_frames_acked() 86 int lapb_validate_nr(struct lapb_cb *lapb, unsigned short nr) in lapb_validate_nr() argument 94 if (nr == vc) in lapb_validate_nr() 99 return nr == lapb->vs; in lapb_validate_nr() 156 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode() 168 frame->nr = (skb->data[1] >> 1) & 0x7F; in lapb_decode() 190 frame->nr = (skb->data[0] >> 5) & 0x07; in lapb_decode() 197 frame->nr = (skb->data[0] >> 5) & 0x07; in lapb_decode()
|
D | lapb_in.c | 323 lapb->dev, frame->pf, frame->nr); in lapb_state3_machine() 326 if (lapb_validate_nr(lapb, frame->nr)) { in lapb_state3_machine() 327 lapb_check_iframes_acked(lapb, frame->nr); in lapb_state3_machine() 342 lapb->dev, frame->pf, frame->nr); in lapb_state3_machine() 345 if (lapb_validate_nr(lapb, frame->nr)) { in lapb_state3_machine() 346 lapb_check_iframes_acked(lapb, frame->nr); in lapb_state3_machine() 361 lapb->dev, frame->pf, frame->nr); in lapb_state3_machine() 364 if (lapb_validate_nr(lapb, frame->nr)) { in lapb_state3_machine() 365 lapb_frames_acked(lapb, frame->nr); in lapb_state3_machine() 383 lapb->dev, frame->pf, frame->ns, frame->nr); in lapb_state3_machine() [all …]
|
D | lapb_out.c | 189 void lapb_check_iframes_acked(struct lapb_cb *lapb, unsigned short nr) in lapb_check_iframes_acked() argument 191 if (lapb->vs == nr) { in lapb_check_iframes_acked() 192 lapb_frames_acked(lapb, nr); in lapb_check_iframes_acked() 195 } else if (lapb->va != nr) { in lapb_check_iframes_acked() 196 lapb_frames_acked(lapb, nr); in lapb_check_iframes_acked()
|
/net/xfrm/ |
D | xfrm_replay.c | 188 unsigned int bitnr, nr; in xfrm_replay_check_bmp() local 215 nr = bitnr >> 5; in xfrm_replay_check_bmp() 217 if (replay_esn->bmp[nr] & (1U << bitnr)) in xfrm_replay_check_bmp() 231 unsigned int bitnr, nr, i; in xfrm_replay_advance_bmp() local 248 nr = bitnr >> 5; in xfrm_replay_advance_bmp() 250 replay_esn->bmp[nr] &= ~(1U << bitnr); in xfrm_replay_advance_bmp() 253 nr = (replay_esn->replay_window - 1) >> 5; in xfrm_replay_advance_bmp() 254 for (i = 0; i <= nr; i++) in xfrm_replay_advance_bmp() 269 nr = bitnr >> 5; in xfrm_replay_advance_bmp() 271 replay_esn->bmp[nr] |= (1U << bitnr); in xfrm_replay_advance_bmp() [all …]
|
/net/rose/ |
D | rose_in.c | 101 static int rose_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr,… in rose_state3_machine() argument 127 if (!rose_validate_nr(sk, nr)) { in rose_state3_machine() 138 rose_frames_acked(sk, nr); in rose_state3_machine() 149 if (!rose_validate_nr(sk, nr)) { in rose_state3_machine() 161 rose_frames_acked(sk, nr); in rose_state3_machine() 265 int queued = 0, frametype, ns, nr, q, d, m; in rose_process_rx_frame() local 270 frametype = rose_decode(skb, &ns, &nr, &q, &d, &m); in rose_process_rx_frame() 280 queued = rose_state3_machine(sk, skb, frametype, ns, nr, q, d, m); in rose_process_rx_frame()
|
D | rose_subr.c | 43 void rose_frames_acked(struct sock *sk, unsigned short nr) in rose_frames_acked() argument 51 if (rose->va != nr) { in rose_frames_acked() 52 while (skb_peek(&rose->ack_queue) != NULL && rose->va != nr) { in rose_frames_acked() 82 int rose_validate_nr(struct sock *sk, unsigned short nr) in rose_validate_nr() argument 88 if (nr == vc) return 1; in rose_validate_nr() 92 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/l2tp/ |
D | l2tp_core.c | 409 session->nr++; in l2tp_recv_dequeue_skb() 410 session->nr &= session->nr_max; in l2tp_recv_dequeue_skb() 413 session->name, session->nr); in l2tp_recv_dequeue_skb() 444 L2TP_SKB_CB(skb)->length, session->nr, in l2tp_recv_dequeue() 456 session->name, session->nr, in l2tp_recv_dequeue() 459 session->nr = L2TP_SKB_CB(skb)->ns; in l2tp_recv_dequeue() 461 if (L2TP_SKB_CB(skb)->ns != session->nr) { in l2tp_recv_dequeue() 465 L2TP_SKB_CB(skb)->length, session->nr, in l2tp_recv_dequeue() 484 static int l2tp_seq_check_rx_window(struct l2tp_session *session, u32 nr) in l2tp_seq_check_rx_window() argument 488 if (nr >= session->nr) in l2tp_seq_check_rx_window() [all …]
|
/net/rds/ |
D | ib_ring.c | 66 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()
|
D | stats.c | 85 uint64_t *values, const char *const *names, size_t nr) in rds_stats_info_copy() argument 90 for (i = 0; i < nr; i++) { in rds_stats_info_copy() 142 lens->nr = rds_trans_stats_info_copy(iter, avail) + in rds_stats_info()
|