Lines Matching refs:ns
49 int ns; /* next seq num for send */ member
224 struct sk_buff *skb, int ns, int nr) in llc_shdlc_rcv_i_frame() argument
226 int x_ns = ns; 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()
253 if (llc_shdlc_x_lt_y_lteq_z(shdlc->dnr, y_nr, shdlc->ns)) { in llc_shdlc_rcv_i_frame()
267 if (llc_shdlc_x_lt_y_lteq_z(shdlc->dnr, y_nr, shdlc->ns)) { in llc_shdlc_rcv_ack()
283 shdlc->ns = shdlc->dnr; in llc_shdlc_requeue_ack_pending()
292 if (llc_shdlc_x_lteq_y_lt_z(shdlc->dnr, y_nr, shdlc->ns)) { in llc_shdlc_rcv_rej()
350 shdlc->ns = 0; in llc_shdlc_connect_complete()
464 int ns; in llc_shdlc_handle_rcv_queue() local
480 ns = (control & SHDLC_CONTROL_NS_MASK) >> 3; in llc_shdlc_handle_rcv_queue()
482 llc_shdlc_rcv_i_frame(shdlc, skb, ns, nr); in llc_shdlc_handle_rcv_queue()
505 static int llc_shdlc_w_used(int ns, int dnr) in llc_shdlc_w_used() argument
509 if (dnr <= ns) in llc_shdlc_w_used()
510 unack_count = ns - dnr; in llc_shdlc_w_used()
512 unack_count = 8 - dnr + ns; in llc_shdlc_w_used()
527 shdlc->send_q.qlen, shdlc->ns, shdlc->dnr, in llc_shdlc_handle_send_queue()
529 shdlc->w - llc_shdlc_w_used(shdlc->ns, shdlc->dnr), in llc_shdlc_handle_send_queue()
543 *(u8 *)skb_push(skb, 1) = SHDLC_CONTROL_HEAD_I | (shdlc->ns << 3) | in llc_shdlc_handle_send_queue()
546 pr_debug("Sending I-Frame %d, waiting to rcv %d\n", shdlc->ns, in llc_shdlc_handle_send_queue()
556 shdlc->ns = (shdlc->ns + 1) % 8; in llc_shdlc_handle_send_queue()