static void invoke_retransmission(struct PStack *st, unsigned int nr) { struct Layer2 *l2 = &st->l2; u_int p1; u_long flags; spin_lock_irqsave(&l2->lock, flags); if (l2->vs != nr) { while (l2->vs != nr) { (l2->vs)--; if(test_bit(FLG_MOD128, &l2->flag)) { l2->vs %= 128; p1 = (l2->vs - l2->va) % 128; } else { l2->vs %= 8; p1 = (l2->vs - l2->va) % 8; } p1 = (p1 + l2->sow) % l2->window; if (test_bit(FLG_LAPB, &l2->flag)) st->l1.bcs->tx_cnt += l2->windowar[p1]->len + l2headersize(l2, 0); skb_queue_head(&l2->i_queue, l2->windowar[p1]); l2->windowar[p1] = NULL; } spin_unlock_irqrestore(&l2->lock, flags); st->l2.l2l1(st, PH_PULL | REQUEST, NULL); return; } spin_unlock_irqrestore(&l2->lock, flags); }
static void l2_got_ui(struct FsmInst *fi, int event, void *arg) { struct PStack *st = fi->userdata; struct sk_buff *skb = arg; skb_pull(skb, l2headersize(&st->l2, 1)); st->l2.l2l3(st, DL_UNIT_DATA | INDICATION, skb); /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * in states 1-3 for broadcast */ }
static void l2_got_ui(struct FsmInst *fi, int event, void *arg) { layer2_t *l2 = fi->userdata; msg_t *msg = arg; msg_pull(msg, l2headersize(l2, 1)); /* * in states 1-3 for broadcast */ msg_push(msg, mISDNUSER_HEAD_SIZE); if (l2up(l2, DL_UNITDATA | INDICATION, CES(l2), msg)) free_msg(msg); }
static void l2_got_ui(struct FsmInst *fi, int event, void *arg) { struct layer2 *l2 = fi->userdata; struct sk_buff *skb = arg; skb_pull(skb, l2headersize(l2, 1)); /* * in states 1-3 for broadcast */ if (l2->tm) l2_tei(l2, MDL_STATUS_UI_IND, 0); l2up(l2, DL_UNITDATA_IND, skb); }