0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __CAPILLI_H__
0013 #define __CAPILLI_H__
0014
0015 #include <linux/kernel.h>
0016 #include <linux/list.h>
0017 #include <linux/capi.h>
0018 #include <linux/kernelcapi.h>
0019
0020 typedef struct capiloaddatapart {
0021 int user;
0022 int len;
0023 unsigned char *data;
0024 } capiloaddatapart;
0025
0026 typedef struct capiloaddata {
0027 capiloaddatapart firmware;
0028 capiloaddatapart configuration;
0029 } capiloaddata;
0030
0031 typedef struct capicardparams {
0032 unsigned int port;
0033 unsigned irq;
0034 int cardtype;
0035 int cardnr;
0036 unsigned int membase;
0037 } capicardparams;
0038
0039 struct capi_ctr {
0040
0041 struct module *owner;
0042 void *driverdata;
0043 char name[32];
0044 char *driver_name;
0045 int (*load_firmware)(struct capi_ctr *, capiloaddata *);
0046 void (*reset_ctr)(struct capi_ctr *);
0047 void (*register_appl)(struct capi_ctr *, u16 appl,
0048 capi_register_params *);
0049 void (*release_appl)(struct capi_ctr *, u16 appl);
0050 u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb);
0051
0052 char *(*procinfo)(struct capi_ctr *);
0053 int (*proc_show)(struct seq_file *, void *);
0054
0055
0056 u8 manu[CAPI_MANUFACTURER_LEN];
0057 capi_version version;
0058 capi_profile profile;
0059 u8 serial[CAPI_SERIAL_LEN];
0060
0061
0062
0063 unsigned long nrecvctlpkt;
0064 unsigned long nrecvdatapkt;
0065 unsigned long nsentctlpkt;
0066 unsigned long nsentdatapkt;
0067
0068 int cnr;
0069 unsigned short state;
0070 int blocked;
0071 int traceflag;
0072
0073 struct proc_dir_entry *procent;
0074 char procfn[128];
0075 };
0076
0077 int attach_capi_ctr(struct capi_ctr *);
0078 int detach_capi_ctr(struct capi_ctr *);
0079
0080 void capi_ctr_ready(struct capi_ctr * card);
0081 void capi_ctr_down(struct capi_ctr * card);
0082 void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb);
0083
0084
0085
0086
0087 struct capi_driver {
0088 char name[32];
0089 char revision[32];
0090
0091
0092 struct list_head list;
0093 };
0094
0095 #endif