Ejemplo n.º 1
0
static void
confirm_Dsend(struct dchannel *dch)
{
	struct sk_buff	*skb;

	skb = _alloc_mISDN_skb(PH_DATA_CNF, mISDN_HEAD_ID(dch->tx_skb),
	    0, NULL, GFP_ATOMIC);
	if (!skb) {
		printk(KERN_ERR "%s: no skb id %x\n", __func__,
		    mISDN_HEAD_ID(dch->tx_skb));
		return;
	}
	skb_queue_tail(&dch->rqueue, skb);
	schedule_event(dch, FLG_RECVQUEUE);
}
Ejemplo n.º 2
0
static void
dsp_tone_hw_message(struct dsp *dsp, u8 *sample, int len)
{
	struct sk_buff *nskb;

	/* unlocking is not required, because we don't expect a response */
	nskb = _alloc_mISDN_skb(PH_CONTROL_REQ,
				(len) ? HFC_SPL_LOOP_ON : HFC_SPL_LOOP_OFF, len, sample,
				GFP_ATOMIC);
	if (nskb) {
		if (dsp->ch.peer) {
			if (dsp->ch.recv(dsp->ch.peer, nskb))
				dev_kfree_skb(nskb);
		} else
			dev_kfree_skb(nskb);
	}
}
Ejemplo n.º 3
0
void
confirm_Bsend(struct bchannel *bch)
{
	struct sk_buff	*skb;

	if (bch->rcount >= 64) {
		printk(KERN_WARNING "B-channel %p receive queue overflow, "
			"flushing!\n", bch);
		skb_queue_purge(&bch->rqueue);
		bch->rcount = 0;
	}
	skb = _alloc_mISDN_skb(PH_DATA_CNF, mISDN_HEAD_ID(bch->tx_skb),
	    0, NULL, GFP_ATOMIC);
	if (!skb) {
		printk(KERN_ERR "%s: no skb id %x\n", __func__,
		    mISDN_HEAD_ID(bch->tx_skb));
		return;
	}
	bch->rcount++;
	skb_queue_tail(&bch->rqueue, skb);
	schedule_event(bch, FLG_RECVQUEUE);
}