Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
gigaset.h File Reference
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/ppp_defs.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/list.h>
#include <linux/atomic.h>

Go to the source code of this file.

Data Structures

struct  reply_t
 
struct  inbuf_t
 
struct  isowbuf_t
 
struct  isow_urbctx_t
 
struct  at_state_t
 
struct  event_t
 
struct  bc_state
 
struct  cardstate
 
struct  gigaset_driver
 
struct  cmdbuf_t
 
struct  bas_bc_state
 
struct  gigaset_ops
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define GIG_VERSION   {0, 5, 0, 0}
 
#define GIG_COMPAT   {0, 4, 0, 0}
 
#define MAX_REC_PARAMS   10 /* Max. number of params in response string */
 
#define MAX_RESP_SIZE   511 /* Max. size of a response string */
 
#define MAX_EVENTS   64 /* size of event queue */
 
#define RBUFSIZE   8192
 
#define GIG_TICK   100 /* in milliseconds */
 
#define INIT_TIMEOUT   1
 
#define RING_TIMEOUT   3 /* for additional parameters to RING */
 
#define BAS_TIMEOUT   20 /* for response to Base USB ops */
 
#define ATRDY_TIMEOUT   3 /* for HD_READY_SEND_ATDATA */
 
#define BAS_RETRY   3 /* max. retries for base USB ops */
 
#define MAXACT   3
 
#define gig_dbg(level, format, arg...)   do {} while (0)
 
#define DEBUG_DEFAULT   0
 
#define ZSAU_NONE   0
 
#define ZSAU_DISCONNECT_IND   4
 
#define ZSAU_OUTGOING_CALL_PROCEEDING   1
 
#define ZSAU_PROCEEDING   1
 
#define ZSAU_CALL_DELIVERED   2
 
#define ZSAU_ACTIVE   3
 
#define ZSAU_NULL   5
 
#define ZSAU_DISCONNECT_REQ   6
 
#define ZSAU_UNKNOWN   -1
 
#define OUT_VENDOR_REQ   (USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT)
 
#define IN_VENDOR_REQ   (USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT)
 
#define HD_B1_FLOW_CONTROL   0x80
 
#define HD_B2_FLOW_CONTROL   0x81
 
#define HD_RECEIVEATDATA_ACK   (0x35) /* 3070 */
 
#define HD_READY_SEND_ATDATA   (0x36) /* 3070 */
 
#define HD_OPEN_ATCHANNEL_ACK   (0x37) /* 3070 */
 
#define HD_CLOSE_ATCHANNEL_ACK   (0x38) /* 3070 */
 
#define HD_DEVICE_INIT_OK   (0x11) /* ISurf USB + 3070 */
 
#define HD_OPEN_B1CHANNEL_ACK   (0x51) /* ISurf USB + 3070 */
 
#define HD_OPEN_B2CHANNEL_ACK   (0x52) /* ISurf USB + 3070 */
 
#define HD_CLOSE_B1CHANNEL_ACK   (0x53) /* ISurf USB + 3070 */
 
#define HD_CLOSE_B2CHANNEL_ACK   (0x54) /* ISurf USB + 3070 */
 
#define HD_SUSPEND_END   (0x61) /* ISurf USB */
 
#define HD_RESET_INTERRUPT_PIPE_ACK   (0xFF) /* ISurf USB + 3070 */
 
#define HD_OPEN_B1CHANNEL   (0x23) /* ISurf USB + 3070 */
 
#define HD_CLOSE_B1CHANNEL   (0x24) /* ISurf USB + 3070 */
 
#define HD_OPEN_B2CHANNEL   (0x25) /* ISurf USB + 3070 */
 
#define HD_CLOSE_B2CHANNEL   (0x26) /* ISurf USB + 3070 */
 
#define HD_RESET_INTERRUPT_PIPE   (0x27) /* ISurf USB + 3070 */
 
#define HD_DEVICE_INIT_ACK   (0x34) /* ISurf USB + 3070 */
 
#define HD_WRITE_ATMESSAGE   (0x12) /* 3070 */
 
#define HD_READ_ATMESSAGE   (0x13) /* 3070 */
 
#define HD_OPEN_ATCHANNEL   (0x28) /* 3070 */
 
#define HD_CLOSE_ATCHANNEL   (0x29) /* 3070 */
 
#define BAS_CHANNELS   2
 
#define BAS_FRAMETIME   1 /* number of milliseconds between frames */
 
#define BAS_NUMFRAMES   8 /* number of frames per URB */
 
#define BAS_MAXFRAME   16 /* allocated bytes per frame */
 
#define BAS_NORMFRAME   8 /* send size without flow control */
 
#define BAS_HIGHFRAME   10 /* " " with positive flow control */
 
#define BAS_LOWFRAME   5 /* " " with negative flow control */
 
#define BAS_CORRFRAMES   4 /* flow control multiplicator */
 
#define BAS_INBUFSIZE
 
#define BAS_OUTBUFSIZE   4096 /* size of common isoc out buffer */
 
#define BAS_OUTBUFPAD   BAS_MAXFRAME /* size of pad area for isoc out buf */
 
#define BAS_INURBS   3
 
#define BAS_OUTURBS   3
 
#define AT_ISO   0
 
#define AT_DIAL   1
 
#define AT_MSN   2
 
#define AT_BC   3
 
#define AT_PROTO   4
 
#define AT_TYPE   5
 
#define AT_CLIP   6
 
#define AT_NUM   7
 
#define VAR_ZSAU   0
 
#define VAR_ZDLE   1
 
#define VAR_ZCTP   2
 
#define VAR_NUM   3
 
#define STR_NMBR   0
 
#define STR_ZCPN   1
 
#define STR_ZCON   2
 
#define STR_ZBC   3
 
#define STR_ZHLC   4
 
#define STR_NUM   5
 
#define EV_TIMEOUT   -105
 
#define EV_IF_VER   -106
 
#define EV_PROC_CIDMODE   -107
 
#define EV_SHUTDOWN   -108
 
#define EV_START   -110
 
#define EV_STOP   -111
 
#define EV_IF_LOCK   -112
 
#define EV_ACCEPT   -114
 
#define EV_DIAL   -115
 
#define EV_HUP   -116
 
#define EV_BC_OPEN   -117
 
#define EV_BC_CLOSED   -118
 
#define INS_command   0x0001 /* receiving messages (not payload data) */
 
#define INS_DLE_char   0x0002 /* DLE flag received (in DLE mode) */
 
#define INS_byte_stuff   0x0004
 
#define INS_have_data   0x0008
 
#define INS_DLE_command   0x0020 /* DLE message start (<DLE> X) received */
 
#define INS_flag_hunt   0x0040
 
#define CHS_D_UP   0x01
 
#define CHS_B_UP   0x02
 
#define CHS_NOTIFY_LL   0x04
 
#define ICALL_REJECT   0
 
#define ICALL_ACCEPT   1
 
#define ICALL_IGNORE   2
 
#define MS_UNINITIALIZED   0
 
#define MS_INIT   1
 
#define MS_LOCKED   2
 
#define MS_SHUTDOWN   3
 
#define MS_RECOVER   4
 
#define MS_READY   5
 
#define M_UNKNOWN   0
 
#define M_CONFIG   1
 
#define M_UNIMODEM   2
 
#define M_CID   3
 
#define SM_LOCKED   0
 
#define SM_ISDN   1 /* default */
 
#define L2_BITSYNC   0
 
#define L2_HDLC   1
 
#define L2_VOICE   2
 
#define DLE_FLAG   0x10
 

Enumerations

enum  debuglevel {
  DEBUG_INTR = 0x00008, DEBUG_CMD = 0x00020, DEBUG_STREAM = 0x00040, DEBUG_STREAM_DUMP = 0x00080,
  DEBUG_LLDATA = 0x00100, DEBUG_EVENT = 0x00200, DEBUG_HDLC = 0x00800, DEBUG_CHANNEL = 0x01000,
  DEBUG_TRANSCMD = 0x02000, DEBUG_MCMD = 0x04000, DEBUG_INIT = 0x08000, DEBUG_SUSPEND = 0x10000,
  DEBUG_OUTPUT = 0x20000, DEBUG_ISO = 0x40000, DEBUG_IF = 0x80000, DEBUG_USBREQ = 0x100000,
  DEBUG_LOCKCMD = 0x200000, DEBUG_ANY = 0x3fffff
}
 

Functions

void gigaset_dbg_buffer (enum debuglevel level, const unsigned char *msg, size_t len, const unsigned char *buf)
 
int gigaset_m10x_send_skb (struct bc_state *bcs, struct sk_buff *skb)
 
void gigaset_m10x_input (struct inbuf_t *inbuf)
 
int gigaset_isoc_send_skb (struct bc_state *bcs, struct sk_buff *skb)
 
void gigaset_isoc_input (struct inbuf_t *inbuf)
 
void gigaset_isoc_receive (unsigned char *src, unsigned count, struct bc_state *bcs)
 
int gigaset_isoc_buildframe (struct bc_state *bcs, unsigned char *in, int len)
 
void gigaset_isowbuf_init (struct isowbuf_t *iwb, unsigned char idle)
 
int gigaset_isowbuf_getbytes (struct isowbuf_t *iwb, int size)
 
void gigaset_isdn_regdrv (void)
 
void gigaset_isdn_unregdrv (void)
 
int gigaset_isdn_regdev (struct cardstate *cs, const char *isdnid)
 
void gigaset_isdn_unregdev (struct cardstate *cs)
 
void gigaset_skb_sent (struct bc_state *bcs, struct sk_buff *skb)
 
void gigaset_skb_rcvd (struct bc_state *bcs, struct sk_buff *skb)
 
void gigaset_isdn_rcv_err (struct bc_state *bcs)
 
void gigaset_isdn_start (struct cardstate *cs)
 
void gigaset_isdn_stop (struct cardstate *cs)
 
int gigaset_isdn_icall (struct at_state_t *at_state)
 
void gigaset_isdn_connD (struct bc_state *bcs)
 
void gigaset_isdn_hupD (struct bc_state *bcs)
 
void gigaset_isdn_connB (struct bc_state *bcs)
 
void gigaset_isdn_hupB (struct bc_state *bcs)
 
void gigaset_handle_event (unsigned long data)
 
void gigaset_handle_modem_response (struct cardstate *cs)
 
void gigaset_init_dev_sysfs (struct cardstate *cs)
 
void gigaset_free_dev_sysfs (struct cardstate *cs)
 
void gigaset_bcs_reinit (struct bc_state *bcs)
 
void gigaset_at_init (struct at_state_t *at_state, struct bc_state *bcs, struct cardstate *cs, int cid)
 
int gigaset_get_channel (struct bc_state *bcs)
 
struct bc_stategigaset_get_free_channel (struct cardstate *cs)
 
void gigaset_free_channel (struct bc_state *bcs)
 
int gigaset_get_channels (struct cardstate *cs)
 
void gigaset_free_channels (struct cardstate *cs)
 
void gigaset_block_channels (struct cardstate *cs)
 
struct gigaset_drivergigaset_initdriver (unsigned minor, unsigned minors, const char *procname, const char *devname, const struct gigaset_ops *ops, struct module *owner)
 
void gigaset_freedriver (struct gigaset_driver *drv)
 
struct cardstategigaset_get_cs_by_tty (struct tty_struct *tty)
 
struct cardstategigaset_get_cs_by_id (int id)
 
void gigaset_blockdriver (struct gigaset_driver *drv)
 
struct cardstategigaset_initcs (struct gigaset_driver *drv, int channels, int onechannel, int ignoreframes, int cidmode, const char *modulename)
 
void gigaset_freecs (struct cardstate *cs)
 
int gigaset_start (struct cardstate *cs)
 
void gigaset_stop (struct cardstate *cs)
 
int gigaset_shutdown (struct cardstate *cs)
 
struct event_tgigaset_add_event (struct cardstate *cs, struct at_state_t *at_state, int type, void *ptr, int parameter, void *arg)
 
int gigaset_enterconfigmode (struct cardstate *cs)
 
int gigaset_fill_inbuf (struct inbuf_t *inbuf, const unsigned char *src, unsigned numbytes)
 
void gigaset_if_initdriver (struct gigaset_driver *drv, const char *procname, const char *devname)
 
void gigaset_if_freedriver (struct gigaset_driver *drv)
 
void gigaset_if_init (struct cardstate *cs)
 
void gigaset_if_free (struct cardstate *cs)
 
void gigaset_if_receive (struct cardstate *cs, unsigned char *buffer, size_t len)
 

Variables

int gigaset_debuglevel
 
struct reply_t gigaset_tab_cid []
 
struct reply_t gigaset_tab_nocid []
 

Macro Definition Documentation

#define AT_BC   3

Definition at line 177 of file gigaset.h.

#define AT_CLIP   6

Definition at line 180 of file gigaset.h.

#define AT_DIAL   1

Definition at line 175 of file gigaset.h.

#define AT_ISO   0

Definition at line 174 of file gigaset.h.

#define AT_MSN   2

Definition at line 176 of file gigaset.h.

#define AT_NUM   7

Definition at line 182 of file gigaset.h.

#define AT_PROTO   4

Definition at line 178 of file gigaset.h.

#define AT_TYPE   5

Definition at line 179 of file gigaset.h.

#define ATRDY_TIMEOUT   3 /* for HD_READY_SEND_ATDATA */

Definition at line 57 of file gigaset.h.

#define BAS_CHANNELS   2

Definition at line 155 of file gigaset.h.

#define BAS_CORRFRAMES   4 /* flow control multiplicator */

Definition at line 164 of file gigaset.h.

#define BAS_FRAMETIME   1 /* number of milliseconds between frames */

Definition at line 158 of file gigaset.h.

#define BAS_HIGHFRAME   10 /* " " with positive flow control */

Definition at line 162 of file gigaset.h.

#define BAS_INBUFSIZE
Value:
(BAS_MAXFRAME * BAS_NUMFRAMES) /* size of isoc in buf
* per URB */

Definition at line 166 of file gigaset.h.

#define BAS_INURBS   3

Definition at line 170 of file gigaset.h.

#define BAS_LOWFRAME   5 /* " " with negative flow control */

Definition at line 163 of file gigaset.h.

#define BAS_MAXFRAME   16 /* allocated bytes per frame */

Definition at line 160 of file gigaset.h.

#define BAS_NORMFRAME   8 /* send size without flow control */

Definition at line 161 of file gigaset.h.

#define BAS_NUMFRAMES   8 /* number of frames per URB */

Definition at line 159 of file gigaset.h.

#define BAS_OUTBUFPAD   BAS_MAXFRAME /* size of pad area for isoc out buf */

Definition at line 168 of file gigaset.h.

#define BAS_OUTBUFSIZE   4096 /* size of common isoc out buffer */

Definition at line 167 of file gigaset.h.

#define BAS_OUTURBS   3

Definition at line 171 of file gigaset.h.

#define BAS_RETRY   3 /* max. retries for base USB ops */

Definition at line 59 of file gigaset.h.

#define BAS_TIMEOUT   20 /* for response to Base USB ops */

Definition at line 56 of file gigaset.h.

#define CHS_B_UP   0x02

Definition at line 220 of file gigaset.h.

#define CHS_D_UP   0x01

Definition at line 219 of file gigaset.h.

#define CHS_NOTIFY_LL   0x04

Definition at line 221 of file gigaset.h.

#define DEBUG_DEFAULT   0

Definition at line 105 of file gigaset.h.

#define DLE_FLAG   0x10

Definition at line 622 of file gigaset.h.

#define EV_ACCEPT   -114

Definition at line 204 of file gigaset.h.

#define EV_BC_CLOSED   -118

Definition at line 208 of file gigaset.h.

#define EV_BC_OPEN   -117

Definition at line 207 of file gigaset.h.

#define EV_DIAL   -115

Definition at line 205 of file gigaset.h.

#define EV_HUP   -116

Definition at line 206 of file gigaset.h.

#define EV_IF_LOCK   -112

Definition at line 203 of file gigaset.h.

#define EV_IF_VER   -106

Definition at line 198 of file gigaset.h.

#define EV_PROC_CIDMODE   -107

Definition at line 199 of file gigaset.h.

#define EV_SHUTDOWN   -108

Definition at line 200 of file gigaset.h.

#define EV_START   -110

Definition at line 201 of file gigaset.h.

#define EV_STOP   -111

Definition at line 202 of file gigaset.h.

#define EV_TIMEOUT   -105

Definition at line 197 of file gigaset.h.

#define GIG_COMPAT   {0, 4, 0, 0}

Definition at line 40 of file gigaset.h.

#define gig_dbg (   level,
  format,
  arg... 
)    do {} while (0)

Definition at line 104 of file gigaset.h.

#define GIG_TICK   100 /* in milliseconds */

Definition at line 49 of file gigaset.h.

#define GIG_VERSION   {0, 5, 0, 0}

Definition at line 39 of file gigaset.h.

#define HD_B1_FLOW_CONTROL   0x80

Definition at line 128 of file gigaset.h.

#define HD_B2_FLOW_CONTROL   0x81

Definition at line 129 of file gigaset.h.

#define HD_CLOSE_ATCHANNEL   (0x29) /* 3070 */

Definition at line 152 of file gigaset.h.

#define HD_CLOSE_ATCHANNEL_ACK   (0x38) /* 3070 */

Definition at line 133 of file gigaset.h.

#define HD_CLOSE_B1CHANNEL   (0x24) /* ISurf USB + 3070 */

Definition at line 144 of file gigaset.h.

#define HD_CLOSE_B1CHANNEL_ACK   (0x53) /* ISurf USB + 3070 */

Definition at line 137 of file gigaset.h.

#define HD_CLOSE_B2CHANNEL   (0x26) /* ISurf USB + 3070 */

Definition at line 146 of file gigaset.h.

#define HD_CLOSE_B2CHANNEL_ACK   (0x54) /* ISurf USB + 3070 */

Definition at line 138 of file gigaset.h.

#define HD_DEVICE_INIT_ACK   (0x34) /* ISurf USB + 3070 */

Definition at line 148 of file gigaset.h.

#define HD_DEVICE_INIT_OK   (0x11) /* ISurf USB + 3070 */

Definition at line 134 of file gigaset.h.

#define HD_OPEN_ATCHANNEL   (0x28) /* 3070 */

Definition at line 151 of file gigaset.h.

#define HD_OPEN_ATCHANNEL_ACK   (0x37) /* 3070 */

Definition at line 132 of file gigaset.h.

#define HD_OPEN_B1CHANNEL   (0x23) /* ISurf USB + 3070 */

Definition at line 143 of file gigaset.h.

#define HD_OPEN_B1CHANNEL_ACK   (0x51) /* ISurf USB + 3070 */

Definition at line 135 of file gigaset.h.

#define HD_OPEN_B2CHANNEL   (0x25) /* ISurf USB + 3070 */

Definition at line 145 of file gigaset.h.

#define HD_OPEN_B2CHANNEL_ACK   (0x52) /* ISurf USB + 3070 */

Definition at line 136 of file gigaset.h.

#define HD_READ_ATMESSAGE   (0x13) /* 3070 */

Definition at line 150 of file gigaset.h.

#define HD_READY_SEND_ATDATA   (0x36) /* 3070 */

Definition at line 131 of file gigaset.h.

#define HD_RECEIVEATDATA_ACK   (0x35) /* 3070 */

Definition at line 130 of file gigaset.h.

#define HD_RESET_INTERRUPT_PIPE   (0x27) /* ISurf USB + 3070 */

Definition at line 147 of file gigaset.h.

#define HD_RESET_INTERRUPT_PIPE_ACK   (0xFF) /* ISurf USB + 3070 */

Definition at line 140 of file gigaset.h.

#define HD_SUSPEND_END   (0x61) /* ISurf USB */

Definition at line 139 of file gigaset.h.

#define HD_WRITE_ATMESSAGE   (0x12) /* 3070 */

Definition at line 149 of file gigaset.h.

#define ICALL_ACCEPT   1

Definition at line 224 of file gigaset.h.

#define ICALL_IGNORE   2

Definition at line 225 of file gigaset.h.

#define ICALL_REJECT   0

Definition at line 223 of file gigaset.h.

#define IN_VENDOR_REQ   (USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT)

Definition at line 125 of file gigaset.h.

#define INIT_TIMEOUT   1

Definition at line 52 of file gigaset.h.

#define INS_byte_stuff   0x0004

Definition at line 213 of file gigaset.h.

#define INS_command   0x0001 /* receiving messages (not payload data) */

Definition at line 211 of file gigaset.h.

#define INS_DLE_char   0x0002 /* DLE flag received (in DLE mode) */

Definition at line 212 of file gigaset.h.

#define INS_DLE_command   0x0020 /* DLE message start (<DLE> X) received */

Definition at line 215 of file gigaset.h.

#define INS_flag_hunt   0x0040

Definition at line 216 of file gigaset.h.

#define INS_have_data   0x0008

Definition at line 214 of file gigaset.h.

#define L2_BITSYNC   0

Definition at line 246 of file gigaset.h.

#define L2_HDLC   1

Definition at line 247 of file gigaset.h.

#define L2_VOICE   2

Definition at line 248 of file gigaset.h.

#define M_CID   3

Definition at line 239 of file gigaset.h.

#define M_CONFIG   1

Definition at line 237 of file gigaset.h.

#define M_UNIMODEM   2

Definition at line 238 of file gigaset.h.

#define M_UNKNOWN   0

Definition at line 236 of file gigaset.h.

#define MAX_EVENTS   64 /* size of event queue */

Definition at line 45 of file gigaset.h.

#define MAX_REC_PARAMS   10 /* Max. number of params in response string */

Definition at line 42 of file gigaset.h.

#define MAX_RESP_SIZE   511 /* Max. size of a response string */

Definition at line 43 of file gigaset.h.

#define MAXACT   3

Definition at line 61 of file gigaset.h.

#define MS_INIT   1

Definition at line 229 of file gigaset.h.

#define MS_LOCKED   2

Definition at line 230 of file gigaset.h.

#define MS_READY   5

Definition at line 233 of file gigaset.h.

#define MS_RECOVER   4

Definition at line 232 of file gigaset.h.

#define MS_SHUTDOWN   3

Definition at line 231 of file gigaset.h.

#define MS_UNINITIALIZED   0

Definition at line 228 of file gigaset.h.

#define OUT_VENDOR_REQ   (USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT)

Definition at line 124 of file gigaset.h.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 20 of file gigaset.h.

#define RBUFSIZE   8192

Definition at line 47 of file gigaset.h.

#define RING_TIMEOUT   3 /* for additional parameters to RING */

Definition at line 55 of file gigaset.h.

#define SM_ISDN   1 /* default */

Definition at line 243 of file gigaset.h.

#define SM_LOCKED   0

Definition at line 242 of file gigaset.h.

#define STR_NMBR   0

Definition at line 190 of file gigaset.h.

#define STR_NUM   5

Definition at line 195 of file gigaset.h.

#define STR_ZBC   3

Definition at line 193 of file gigaset.h.

#define STR_ZCON   2

Definition at line 192 of file gigaset.h.

#define STR_ZCPN   1

Definition at line 191 of file gigaset.h.

#define STR_ZHLC   4

Definition at line 194 of file gigaset.h.

#define VAR_NUM   3

Definition at line 188 of file gigaset.h.

#define VAR_ZCTP   2

Definition at line 187 of file gigaset.h.

#define VAR_ZDLE   1

Definition at line 186 of file gigaset.h.

#define VAR_ZSAU   0

Definition at line 185 of file gigaset.h.

#define ZSAU_ACTIVE   3

Definition at line 118 of file gigaset.h.

#define ZSAU_CALL_DELIVERED   2

Definition at line 117 of file gigaset.h.

#define ZSAU_DISCONNECT_IND   4

Definition at line 114 of file gigaset.h.

#define ZSAU_DISCONNECT_REQ   6

Definition at line 120 of file gigaset.h.

#define ZSAU_NONE   0

Definition at line 113 of file gigaset.h.

#define ZSAU_NULL   5

Definition at line 119 of file gigaset.h.

#define ZSAU_OUTGOING_CALL_PROCEEDING   1

Definition at line 115 of file gigaset.h.

#define ZSAU_PROCEEDING   1

Definition at line 116 of file gigaset.h.

#define ZSAU_UNKNOWN   -1

Definition at line 121 of file gigaset.h.

Enumeration Type Documentation

enum debuglevel
Enumerator:
DEBUG_INTR 
DEBUG_CMD 
DEBUG_STREAM 
DEBUG_STREAM_DUMP 
DEBUG_LLDATA 
DEBUG_EVENT 
DEBUG_HDLC 
DEBUG_CHANNEL 
DEBUG_TRANSCMD 
DEBUG_MCMD 
DEBUG_INIT 
DEBUG_SUSPEND 
DEBUG_OUTPUT 
DEBUG_ISO 
DEBUG_IF 
DEBUG_USBREQ 
DEBUG_LOCKCMD 
DEBUG_ANY 

Definition at line 66 of file gigaset.h.

Function Documentation

struct event_t* gigaset_add_event ( struct cardstate cs,
struct at_state_t at_state,
int  type,
void ptr,
int  parameter,
void arg 
)
read

gigaset_add_event() - add event to device event queue : device descriptor structure. : connection state structure. : event type. : pointer parameter for event. : integer parameter for event.

Allocate an event queue entry from the device's event queue, and set it up with the parameters given.

Return value: added event

Definition at line 332 of file common.c.

void gigaset_at_init ( struct at_state_t at_state,
struct bc_state bcs,
struct cardstate cs,
int  cid 
)

Definition at line 525 of file common.c.

void gigaset_bcs_reinit ( struct bc_state bcs)

Definition at line 798 of file common.c.

void gigaset_block_channels ( struct cardstate cs)

Definition at line 284 of file common.c.

void gigaset_blockdriver ( struct gigaset_driver drv)

gigaset_blockdriver() - block driver : driver descriptor structure.

Prevents the driver from attaching new devices, in preparation for deregistration.

Definition at line 1138 of file common.c.

void gigaset_dbg_buffer ( enum debuglevel  level,
const unsigned char msg,
size_t  len,
const unsigned char buf 
)

gigaset_dbg_buffer() - dump data in ASCII and hex for debugging : debugging level. : message prefix. : number of bytes to dump. : data to dump.

If the current debugging level includes one of the bits set in , bytes starting at are logged to dmesg at KERN_DEBUG prio, prefixed by the text .

Definition at line 51 of file common.c.

int gigaset_enterconfigmode ( struct cardstate cs)

Definition at line 106 of file common.c.

int gigaset_fill_inbuf ( struct inbuf_t inbuf,
const unsigned char src,
unsigned  numbytes 
)

gigaset_fill_inbuf() - append received data to input buffer : buffer structure. : received data. : number of bytes received.

Return value: !=0 if some data was appended

Definition at line 571 of file common.c.

void gigaset_free_channel ( struct bc_state bcs)

Definition at line 232 of file common.c.

void gigaset_free_channels ( struct cardstate cs)

Definition at line 272 of file common.c.

void gigaset_free_dev_sysfs ( struct cardstate cs)

Definition at line 62 of file proc.c.

void gigaset_freecs ( struct cardstate cs)

gigaset_freecs() - free all associated ressources of a device : device descriptor structure.

Stops all tasklets and timers, unregisters the device from all subsystems it was registered to, deallocates the device structure and all structures referenced from it. Operations on the device should be stopped before calling this.

Definition at line 460 of file common.c.

void gigaset_freedriver ( struct gigaset_driver drv)

gigaset_freedriver() - free all associated ressources of a driver : driver descriptor structure.

Unregisters the driver from the system and deallocates the driver structure and all structures referenced from it. All devices should be shut down before calling this.

Definition at line 1055 of file common.c.

int gigaset_get_channel ( struct bc_state bcs)

Definition at line 188 of file common.c.

int gigaset_get_channels ( struct cardstate cs)

Definition at line 250 of file common.c.

struct cardstate* gigaset_get_cs_by_id ( int  id)
read

Definition at line 993 of file common.c.

struct cardstate* gigaset_get_cs_by_tty ( struct tty_struct tty)
read

Definition at line 1042 of file common.c.

struct bc_state* gigaset_get_free_channel ( struct cardstate cs)
read

Definition at line 206 of file common.c.

void gigaset_handle_event ( unsigned long  data)

Definition at line 1840 of file ev-layer.c.

void gigaset_handle_modem_response ( struct cardstate cs)

gigaset_handle_modem_response() - process received modem response : device descriptor structure.

Called by asyncdata/isocdata if a block of data received from the device must be processed as a modem command response. The data is already in the cs structure.

Definition at line 416 of file ev-layer.c.

void gigaset_if_free ( struct cardstate cs)

Definition at line 539 of file interface.c.

void gigaset_if_freedriver ( struct gigaset_driver drv)

Definition at line 625 of file interface.c.

void gigaset_if_init ( struct cardstate cs)

Definition at line 516 of file interface.c.

void gigaset_if_initdriver ( struct gigaset_driver drv,
const char procname,
const char devname 
)

Definition at line 585 of file interface.c.

void gigaset_if_receive ( struct cardstate cs,
unsigned char buffer,
size_t  len 
)

gigaset_if_receive() - pass a received block of data to the tty device : device descriptor structure. : received data. : number of bytes received.

Called by asyncdata/isocdata if a block of data received from the device must be sent to userspace through the ttyG* device.

Definition at line 562 of file interface.c.

void gigaset_init_dev_sysfs ( struct cardstate cs)

Definition at line 72 of file proc.c.

struct cardstate* gigaset_initcs ( struct gigaset_driver drv,
int  channels,
int  onechannel,
int  ignoreframes,
int  cidmode,
const char modulename 
)
read

gigaset_initcs() - initialize device structure : hardware driver the device belongs to : number of B channels supported by device : !=0 if B channel data and AT commands share one communication channel (M10x), ==0 if B channels have separate communication channels (base) : number of frames to ignore after setting up B channel : !=0: start in CallID mode : name of driver module for LL registration

Allocate and initialize cardstate structure for Gigaset driver Calls hardware dependent gigaset_initcshw() function Calls B channel initialization function gigaset_initbcs() for each B channel

Return value: pointer to cardstate structure

Definition at line 674 of file common.c.

struct gigaset_driver* gigaset_initdriver ( unsigned  minor,
unsigned  minors,
const char procname,
const char devname,
const struct gigaset_ops ops,
struct module owner 
)
read

gigaset_initdriver() - initialize driver structure : First minor number : Number of minors this driver can handle : Name of the driver : Name of the device files (prefix without minor number)

Allocate and initialize gigaset_driver structure. Initialize interface.

Return value: Pointer to the gigaset_driver structure on success, NULL on failure.

Definition at line 1082 of file common.c.

void gigaset_isdn_connB ( struct bc_state bcs)

gigaset_isdn_connB() - signal B channel connect : B channel descriptor structure.

Called by main module at tasklet level to notify the LL that the B channel connection has been established.

gigaset_isdn_connB() - signal B channel connect : B channel descriptor structure.

Called by main module to notify the LL that the B channel connection has been established.

Definition at line 830 of file capi.c.

void gigaset_isdn_connD ( struct bc_state bcs)

gigaset_isdn_connD() - signal D channel connect : B channel descriptor structure.

Called by main module at tasklet level to notify the LL that the D channel connection has been established.

gigaset_isdn_connD() - signal D channel connect : B channel descriptor structure.

Called by main module to notify the LL that the D channel connection has been established.

Definition at line 735 of file capi.c.

void gigaset_isdn_hupB ( struct bc_state bcs)

gigaset_isdn_hupB() - signal B channel hangup : B channel descriptor structure.

Called by main module to notify the LL that the B channel connection has been shut down.

Definition at line 900 of file capi.c.

void gigaset_isdn_hupD ( struct bc_state bcs)

gigaset_isdn_hupD() - signal D channel hangup : B channel descriptor structure.

Called by main module at tasklet level to notify the LL that the D channel connection has been shut down.

gigaset_isdn_hupD() - signal D channel hangup : B channel descriptor structure.

Called by main module to notify the LL that the D channel connection has been shut down.

Definition at line 800 of file capi.c.

int gigaset_isdn_icall ( struct at_state_t at_state)

gigaset_isdn_icall() - signal incoming call : connection state structure.

Called by main module at tasklet level to notify the LL that an incoming call has been received. contains the parameters of the call.

Return value: call disposition (ICALL_*)

gigaset_isdn_icall() - signal incoming call : connection state structure.

Called by main module to notify the LL that an incoming call has been received. contains the parameters of the call.

Return value: call disposition (ICALL_*)

Definition at line 491 of file capi.c.

void gigaset_isdn_rcv_err ( struct bc_state bcs)

gigaset_isdn_rcv_err() - signal receive error : B channel descriptor structure.

Called by hardware module {bas,ser,usb}_gigaset when a receive error has occurred, for signalling to the LL.

Definition at line 467 of file capi.c.

int gigaset_isdn_regdev ( struct cardstate cs,
const char isdnid 
)

gigaset_isdn_regdev() - register device to LL : device descriptor structure. : device name.

Return value: 0 on success, error code < 0 on failure

gigaset_isdn_regdev() - register to LL : device descriptor structure. : device name.

Return value: 0 on success, error code < 0 on failure

Definition at line 2353 of file capi.c.

void gigaset_isdn_regdrv ( void  )

gigaset_isdn_regdrv() - register driver to LL

Definition at line 2414 of file capi.c.

void gigaset_isdn_start ( struct cardstate cs)

gigaset_isdn_start() - signal device availability : device descriptor structure.

Called by main module to notify the LL that the device is available for use.

Definition at line 921 of file capi.c.

void gigaset_isdn_stop ( struct cardstate cs)

gigaset_isdn_stop() - signal device unavailability : device descriptor structure.

Called by main module to notify the LL that the device is no longer available for use.

Definition at line 956 of file capi.c.

void gigaset_isdn_unregdev ( struct cardstate cs)

gigaset_isdn_unregdev() - unregister device from LL : device descriptor structure.

Definition at line 2397 of file capi.c.

void gigaset_isdn_unregdrv ( void  )

gigaset_isdn_unregdrv() - unregister driver from LL

Definition at line 2423 of file capi.c.

int gigaset_isoc_buildframe ( struct bc_state bcs,
unsigned char in,
int  len 
)

Definition at line 480 of file isocdata.c.

void gigaset_isoc_input ( struct inbuf_t inbuf)

Definition at line 941 of file isocdata.c.

void gigaset_isoc_receive ( unsigned char src,
unsigned  count,
struct bc_state bcs 
)

Definition at line 874 of file isocdata.c.

int gigaset_isoc_send_skb ( struct bc_state bcs,
struct sk_buff skb 
)

gigaset_isoc_send_skb() - queue an skb for sending : B channel descriptor structure. : data to send.

Called by LL to queue an skb for sending, and start transmission if necessary. Once the payload data has been transmitted completely, gigaset_skb_sent() will be called with the skb's link layer header preserved.

Return value: number of bytes accepted for sending (skb->len) if ok, error code < 0 (eg. -ENODEV) on error

Definition at line 989 of file isocdata.c.

int gigaset_isowbuf_getbytes ( struct isowbuf_t iwb,
int  size 
)

Definition at line 134 of file isocdata.c.

void gigaset_isowbuf_init ( struct isowbuf_t iwb,
unsigned char  idle 
)

Definition at line 24 of file isocdata.c.

void gigaset_m10x_input ( struct inbuf_t inbuf)

gigaset_m10x_input() - process a block of data received from the device : received data and device descriptor structure.

Called by hardware module {ser,usb}_gigaset with a block of received bytes. Separates the bytes received over the serial data channel into user data and command replies (locked/unlocked) according to the current state of the interface.

Definition at line 407 of file asyncdata.c.

int gigaset_m10x_send_skb ( struct bc_state bcs,
struct sk_buff skb 
)

gigaset_m10x_send_skb() - queue an skb for sending : B channel descriptor structure. : data to send.

Called by LL to encode and queue an skb for sending, and start transmission if necessary. Once the payload data has been transmitted completely, gigaset_skb_sent() will be called with the skb's link layer header preserved.

Return value: number of bytes accepted for sending (skb->len) if ok, error code < 0 (eg. -ENOMEM) on error

Definition at line 585 of file asyncdata.c.

int gigaset_shutdown ( struct cardstate cs)

gigaset_shutdown() - shut down device operations : device descriptor structure.

Deactivates the device by scheduling an EV_SHUTDOWN event and waiting for completion of the shutdown.

Return value: 0 - success, -ENODEV - error (no device associated)

Definition at line 939 of file common.c.

void gigaset_skb_rcvd ( struct bc_state bcs,
struct sk_buff skb 
)

gigaset_skb_rcvd() - pass received skb to LL : B channel descriptor structure. : received data.

Called by hardware module {bas,ser,usb}_gigaset when user data has been successfully received, for passing to the LL. Warning: skb must not be accessed anymore!

Definition at line 411 of file capi.c.

void gigaset_skb_sent ( struct bc_state bcs,
struct sk_buff skb 
)

gigaset_skb_sent() - acknowledge transmission of outgoing skb : B channel descriptor structure. : sent data.

Called by hardware module {bas,ser,usb}_gigaset when the data in a skb has been successfully sent, for signalling completion to the LL.

gigaset_skb_sent() - acknowledge sending an skb : B channel descriptor structure. : sent data.

Called by hardware module {bas,ser,usb}_gigaset when the data in a skb has been successfully sent, for signalling completion to the LL.

Definition at line 366 of file capi.c.

int gigaset_start ( struct cardstate cs)

gigaset_start() - start device operations : device descriptor structure.

Prepares the device for use by setting up communication parameters, scheduling an EV_START event to initiate device initialization, and waiting for completion of the initialization.

Return value: 0 on success, error code < 0 on failure

Definition at line 892 of file common.c.

void gigaset_stop ( struct cardstate cs)

gigaset_stop() - stop device operations : device descriptor structure.

Stops operations on the device by scheduling an EV_STOP event and waiting for completion of the shutdown.

Definition at line 971 of file common.c.

Variable Documentation

int gigaset_debuglevel

Definition at line 31 of file common.c.

struct reply_t gigaset_tab_cid[]

Definition at line 259 of file ev-layer.c.

struct reply_t gigaset_tab_nocid[]

Definition at line 150 of file ev-layer.c.