Lines Matching refs:ns
60 int ns; /* next seq num for send */ member
235 struct sk_buff *skb, int ns, int nr) in llc_shdlc_rcv_i_frame() argument
237 int x_ns = ns; 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()
264 if (llc_shdlc_x_lt_y_lteq_z(shdlc->dnr, y_nr, shdlc->ns)) { in llc_shdlc_rcv_i_frame()
278 if (llc_shdlc_x_lt_y_lteq_z(shdlc->dnr, y_nr, shdlc->ns)) { in llc_shdlc_rcv_ack()
294 shdlc->ns = shdlc->dnr; in llc_shdlc_requeue_ack_pending()
303 if (llc_shdlc_x_lteq_y_lt_z(shdlc->dnr, y_nr, shdlc->ns)) { in llc_shdlc_rcv_rej()
361 shdlc->ns = 0; in llc_shdlc_connect_complete()
475 int ns; in llc_shdlc_handle_rcv_queue() local
491 ns = (control & SHDLC_CONTROL_NS_MASK) >> 3; in llc_shdlc_handle_rcv_queue()
493 llc_shdlc_rcv_i_frame(shdlc, skb, ns, nr); in llc_shdlc_handle_rcv_queue()
516 static int llc_shdlc_w_used(int ns, int dnr) in llc_shdlc_w_used() argument
520 if (dnr <= ns) in llc_shdlc_w_used()
521 unack_count = ns - dnr; in llc_shdlc_w_used()
523 unack_count = 8 - dnr + ns; in llc_shdlc_w_used()
538 shdlc->send_q.qlen, shdlc->ns, shdlc->dnr, in llc_shdlc_handle_send_queue()
540 shdlc->w - llc_shdlc_w_used(shdlc->ns, shdlc->dnr), in llc_shdlc_handle_send_queue()
554 *skb_push(skb, 1) = SHDLC_CONTROL_HEAD_I | (shdlc->ns << 3) | in llc_shdlc_handle_send_queue()
557 pr_debug("Sending I-Frame %d, waiting to rcv %d\n", shdlc->ns, in llc_shdlc_handle_send_queue()
567 shdlc->ns = (shdlc->ns + 1) % 8; in llc_shdlc_handle_send_queue()