linux-old/drivers/usb/auerisdn_b.h
<<
>>
Prefs
   1/*****************************************************************************/
   2/*
   3 *      auerisdn_b.h  --  Auerswald PBX/System Telephone ISDN B channel interface.
   4 *
   5 *      Copyright (C) 2002  Wolfgang Mües (wolfgang@iksw-muees.de)
   6 *
   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.
  11 *
  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.
  16 *
  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.
  20 */
  21 /*****************************************************************************/
  22
  23#ifndef AUERISDN_B_H
  24#define AUERISDN_B_H
  25
  26#include <../drivers/isdn/hisax/hisax_if.h>
  27#include <linux/skbuff.h>
  28#include "auerbuf.h"
  29#include <../drivers/isdn/hisax/isdnhdlc.h>
  30
  31#define AUISDN_RXSIZE   4096    /* RX buffer size */
  32#define AUISDN_BCHANNELS   2    /* Number of supported B channels */
  33
  34/* states for intbo_state */
  35#define INTBOS_IDLE     0
  36#define INTBOS_RUNNING  1
  37#define INTBOS_CHANGE   2
  38#define INTBOS_RESTART  3
  39
  40/* ...................................................................*/
  41/* B channel state data */
  42struct auerswald;
  43struct auerisdnbc {
  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 */
  56};
  57
  58/* Function Prototypes */
  59void auerisdn_b_l2l1(struct hisax_if *ifc, int pr, void *arg,
  60                     unsigned int channel);
  61void auerisdn_b_l1l2(struct auerisdnbc *bc, int pr, void *arg);
  62
  63void auerisdn_intbi_complete(struct urb *urb);
  64unsigned int auerisdn_b_disconnect(struct auerswald *cp);
  65
  66#endif  /* AUERISDN_B_H */
  67
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.