capi.c (688d794c4c3f8b08c814381ee2edd3ede5856056) capi.c (6aad04f21374633bd8cecf25024553d1e11a9522)
1/* $Id: capi.c,v 1.1.2.7 2004/04/28 09:48:59 armin Exp $
2 *
3 * CAPI 2.0 Interface for Linux
4 *
5 * Copyright 1996 by Carsten Paeth <calle@calle.de>
6 *
7 * This software may be used and distributed according to the terms
8 * of the GNU General Public License, incorporated herein by reference.

--- 555 unchanged lines hidden (view full) ---

564
565#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
566/* -------- function called by lower level -------------------------- */
567
568static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
569{
570 struct capidev *cdev = ap->private;
571#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
1/* $Id: capi.c,v 1.1.2.7 2004/04/28 09:48:59 armin Exp $
2 *
3 * CAPI 2.0 Interface for Linux
4 *
5 * Copyright 1996 by Carsten Paeth <calle@calle.de>
6 *
7 * This software may be used and distributed according to the terms
8 * of the GNU General Public License, incorporated herein by reference.

--- 555 unchanged lines hidden (view full) ---

564
565#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
566/* -------- function called by lower level -------------------------- */
567
568static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
569{
570 struct capidev *cdev = ap->private;
571#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
572 struct tty_struct *tty;
573 struct capiminor *mp;
574 u16 datahandle;
575 struct capincci *np;
576#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
577
578 mutex_lock(&cdev->lock);
579
580 if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_CONF) {

--- 41 unchanged lines hidden (view full) ---

622 } else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
623
624 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4);
625 pr_debug("capi_signal: DATA_B3_CONF %u 0x%x\n",
626 datahandle,
627 CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 2));
628 kfree_skb(skb);
629 capiminor_del_ack(mp, datahandle);
572 struct capiminor *mp;
573 u16 datahandle;
574 struct capincci *np;
575#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
576
577 mutex_lock(&cdev->lock);
578
579 if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_CONF) {

--- 41 unchanged lines hidden (view full) ---

621 } else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
622
623 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4);
624 pr_debug("capi_signal: DATA_B3_CONF %u 0x%x\n",
625 datahandle,
626 CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 2));
627 kfree_skb(skb);
628 capiminor_del_ack(mp, datahandle);
630 tty = tty_port_tty_get(&mp->port);
631 if (tty) {
632 tty_wakeup(tty);
633 tty_kref_put(tty);
634 }
629 tty_port_tty_wakeup(&mp->port);
635 handle_minor_send(mp);
636
637 } else {
638 /* ups, let capi application handle it :-) */
639 skb_queue_tail(&cdev->recvqueue, skb);
640 wake_up_interruptible(&cdev->recvwait);
641 }
642#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */

--- 817 unchanged lines hidden ---
630 handle_minor_send(mp);
631
632 } else {
633 /* ups, let capi application handle it :-) */
634 skb_queue_tail(&cdev->recvqueue, skb);
635 wake_up_interruptible(&cdev->recvwait);
636 }
637#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */

--- 817 unchanged lines hidden ---