1 /*****************************************************************************/
3 * auerisdn_b.h -- Auerswald PBX/System Telephone ISDN B channel interface.
5 * Copyright (C) 2002 Wolfgang Mües (wolfgang@iksw-muees.de)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 /*****************************************************************************/
26 #include <../drivers/isdn/hisax/hisax_if.h>
27 #include <linux/skbuff.h>
29 #include <../drivers/isdn/hisax/isdnhdlc.h>
31 #define AUISDN_RXSIZE 4096 /* RX buffer size */
32 #define AUISDN_BCHANNELS 2 /* Number of supported B channels */
34 /* states for intbo_state */
36 #define INTBOS_RUNNING 1
37 #define INTBOS_CHANGE 2
38 #define INTBOS_RESTART 3
40 /* ...................................................................*/
41 /* B channel state data */
44 struct auerswald *cp; /* Context to usb device */
45 struct sk_buff *txskb; /* sk buff to transmitt */
46 spinlock_t txskb_lock; /* protect against races */
47 unsigned int mode; /* B-channel mode */
48 unsigned int channel; /* Number of this B-channel */
49 unsigned int ofsize; /* Size of device OUT fifo in Bytes */
50 int txfree; /* free bytes in tx buffer of device */
51 unsigned int txsize; /* size of data paket for this channel */
52 unsigned char *rxbuf; /* Receiver input buffer */
53 struct isdnhdlc_vars inp_hdlc_state; /* state for RX software HDLC */
54 struct isdnhdlc_vars outp_hdlc_state; /* state for TX software HDLC */
55 unsigned int lastbyte; /* last byte sent out to trans. B channel */
58 /* Function Prototypes */
59 void auerisdn_b_l2l1(struct hisax_if *ifc, int pr, void *arg,
60 unsigned int channel);
61 void auerisdn_b_l1l2(struct auerisdnbc *bc, int pr, void *arg);
63 void auerisdn_intbi_complete(struct urb *urb);
64 unsigned int auerisdn_b_disconnect(struct auerswald *cp);
66 #endif /* AUERISDN_B_H */