aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h4
-rw-r--r--include/linux/bootmem.h1
-rw-r--r--include/linux/dma-mapping.h2
-rw-r--r--include/linux/fs.h19
-rw-r--r--include/linux/genhd.h1
-rw-r--r--include/linux/gfp.h2
-rw-r--r--include/linux/ide.h1
-rw-r--r--include/linux/init.h3
-rw-r--r--include/linux/jiffies.h6
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/kobject.h2
-rw-r--r--include/linux/leds.h51
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/memory_hotplug.h11
-rw-r--r--include/linux/mm.h5
-rw-r--r--include/linux/mv643xx.h2
-rw-r--r--include/linux/netfilter.h42
-rw-r--r--include/linux/netfilter_ipv4.h2
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_h323.h52
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h98
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h938
-rw-r--r--include/linux/netfilter_ipv6.h3
-rw-r--r--include/linux/numa.h8
-rw-r--r--include/linux/page-flags.h24
-rw-r--r--include/linux/pci.h33
-rw-r--r--include/linux/pci_ids.h7
-rw-r--r--include/linux/pipe_fs_i.h19
-rw-r--r--include/linux/pm.h8
-rw-r--r--include/linux/pm_legacy.h7
-rw-r--r--include/linux/proc_fs.h2
-rw-r--r--include/linux/raid/md_p.h2
-rw-r--r--include/linux/sched.h15
-rw-r--r--include/linux/screen_info.h3
-rw-r--r--include/linux/sdla_asy.h226
-rw-r--r--include/linux/sdla_chdlc.h813
-rw-r--r--include/linux/sdla_ppp.h575
-rw-r--r--include/linux/sdla_x25.h772
-rw-r--r--include/linux/sdladrv.h66
-rw-r--r--include/linux/sdlapci.h72
-rw-r--r--include/linux/sdlasfm.h104
-rw-r--r--include/linux/seqlock.h4
-rw-r--r--include/linux/skbuff.h7
-rw-r--r--include/linux/string.h17
-rw-r--r--include/linux/sunrpc/metrics.h12
-rw-r--r--include/linux/sunrpc/svc.h9
-rw-r--r--include/linux/sunrpc/xprt.h1
-rw-r--r--include/linux/swap.h1
-rw-r--r--include/linux/syscalls.h11
-rw-r--r--include/linux/sysfs.h6
-rw-r--r--include/linux/tty_flip.h25
-rw-r--r--include/linux/usb/net2280.h444
-rw-r--r--include/linux/vermagic.h7
-rw-r--r--include/linux/wanpipe.h483
53 files changed, 1790 insertions, 3241 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index d0cac8b58de7..59e1259b1c40 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -17,6 +17,8 @@
#include <asm/scatterlist.h>
+struct scsi_ioctl_command;
+
struct request_queue;
typedef struct request_queue request_queue_t;
struct elevator_queue;
@@ -611,6 +613,8 @@ extern void blk_plug_device(request_queue_t *);
extern int blk_remove_plug(request_queue_t *);
extern void blk_recount_segments(request_queue_t *, struct bio *);
extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *);
+extern int sg_scsi_ioctl(struct file *, struct request_queue *,
+ struct gendisk *, struct scsi_ioctl_command __user *);
extern void blk_start_queue(request_queue_t *q);
extern void blk_stop_queue(request_queue_t *q);
extern void blk_sync_queue(struct request_queue *q);
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index de3eb8d8ae26..da2d107fe2cf 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -45,6 +45,7 @@ extern unsigned long __init bootmem_bootmap_pages (unsigned long);
extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
extern void __init free_bootmem (unsigned long addr, unsigned long size);
extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal);
+extern void * __init __alloc_bootmem_nopanic (unsigned long size, unsigned long align, unsigned long goal);
extern void * __init __alloc_bootmem_low(unsigned long size,
unsigned long align,
unsigned long goal);
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 9b4751aecc23..ff61817082fa 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -21,7 +21,7 @@ enum dma_data_direction {
#define DMA_30BIT_MASK 0x000000003fffffffULL
#define DMA_29BIT_MASK 0x000000001fffffffULL
#define DMA_28BIT_MASK 0x000000000fffffffULL
-#define DMA_24BIT_MASK 0x0000000000ffffffULL
+#define DMA_24BIT_MASK 0x0000000000ffffffULL
#include <asm/dma-mapping.h>
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 16be62041bfe..ff56c0bec43c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -762,7 +762,7 @@ extern int fcntl_getlease(struct file *filp);
#define SYNC_FILE_RANGE_WRITE 2
#define SYNC_FILE_RANGE_WAIT_AFTER 4
extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
- int flags);
+ unsigned int flags);
/* fs/locks.c */
extern void locks_init_lock(struct file_lock *);
@@ -1039,8 +1039,8 @@ struct file_operations {
int (*check_flags)(int);
int (*dir_notify)(struct file *filp, unsigned long arg);
int (*flock) (struct file *, int, struct file_lock *);
- ssize_t (*splice_write)(struct inode *, struct file *, size_t, unsigned int);
- ssize_t (*splice_read)(struct file *, struct inode *, size_t, unsigned int);
+ ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
+ ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
};
struct inode_operations {
@@ -1614,8 +1614,17 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor
extern void do_generic_mapping_read(struct address_space *mapping,
struct file_ra_state *, struct file *,
loff_t *, read_descriptor_t *, read_actor_t);
-extern ssize_t generic_file_splice_read(struct file *, struct inode *, size_t, unsigned int);
-extern ssize_t generic_file_splice_write(struct inode *, struct file *, size_t, unsigned int);
+
+/* fs/splice.c */
+extern ssize_t generic_file_splice_read(struct file *, loff_t *,
+ struct pipe_inode_info *, size_t, unsigned int);
+extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
+ struct file *, loff_t *, size_t, unsigned int);
+extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
+ struct file *out, loff_t *, size_t len, unsigned int flags);
+extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
+ size_t len, unsigned int flags);
+
extern void
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 10a27f29d692..2ef845b35175 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -105,6 +105,7 @@ struct gendisk {
* disks that can't be partitioned. */
char disk_name[32]; /* name of major driver */
struct hd_struct **part; /* [indexed by minor] */
+ int part_uevent_suppress;
struct block_device_operations *fops;
struct request_queue *queue;
void *private_data;
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 7851e6b520cf..3ac452945a7d 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -57,6 +57,8 @@ struct vm_area_struct;
__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
__GFP_NOMEMALLOC|__GFP_HARDWALL)
+/* This equals 0, but use constants in case they ever change */
+#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
#define GFP_ATOMIC (__GFP_HIGH)
#define GFP_NOIO (__GFP_WAIT)
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 8d2db412ba9c..a8bef1d1371c 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1220,7 +1220,6 @@ typedef struct ide_pci_enablebit_s {
enum {
/* Uses ISA control ports not PCI ones. */
IDEPCI_FLAG_ISA_PORTS = (1 << 0),
- IDEPCI_FLAG_FORCE_PDC = (1 << 1),
};
typedef struct ide_pci_device_s {
diff --git a/include/linux/init.h b/include/linux/init.h
index ed0ac7c39fdc..93dcbe1abb4c 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -245,7 +245,8 @@ void __init parse_early_param(void);
#define __cpuexitdata __exitdata
#endif
-#ifdef CONFIG_MEMORY_HOTPLUG
+#if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
+ || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
#define __meminit
#define __meminitdata
#define __memexit
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 99905e180532..043376920f51 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -36,6 +36,8 @@
/* LATCH is used in the interval timer and ftape setup. */
#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
+#define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ)
+
/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can
* improve accuracy by shifting LSH bits, hence calculating:
* (NOM << LSH) / DEN
@@ -51,9 +53,13 @@
/* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
+#define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8))
+
/* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */
#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
+#define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8))
+
/* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */
#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index c73ed0b05591..2ae50277f581 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -177,7 +177,7 @@ static inline void console_verbose(void)
extern void bust_spinlocks(int yes);
extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */
-extern __deprecated_for_modules int panic_timeout;
+extern int panic_timeout;
extern int panic_on_oops;
extern int tainted;
extern const char *print_tainted(void);
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 4cb1214ec290..dcd0623be892 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -24,6 +24,7 @@
#include <linux/rwsem.h>
#include <linux/kref.h>
#include <linux/kernel.h>
+#include <linux/wait.h>
#include <asm/atomic.h>
#define KOBJ_NAME_LEN 20
@@ -56,6 +57,7 @@ struct kobject {
struct kset * kset;
struct kobj_type * ktype;
struct dentry * dentry;
+ wait_queue_head_t poll;
};
extern int kobject_set_name(struct kobject *, const char *, ...)
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 4617e75903b0..dc23c7c639f3 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -19,39 +19,38 @@ struct class_device;
*/
enum led_brightness {
- LED_OFF = 0,
- LED_HALF = 127,
- LED_FULL = 255,
+ LED_OFF = 0,
+ LED_HALF = 127,
+ LED_FULL = 255,
};
struct led_classdev {
- const char *name;
- int brightness;
- int flags;
-#define LED_SUSPENDED (1 << 0)
+ const char *name;
+ int brightness;
+ int flags;
- /* A function to set the brightness of the led */
- void (*brightness_set)(struct led_classdev *led_cdev,
- enum led_brightness brightness);
+#define LED_SUSPENDED (1 << 0)
- struct class_device *class_dev;
- /* LED Device linked list */
- struct list_head node;
+ /* Set LED brightness level */
+ void (*brightness_set)(struct led_classdev *led_cdev,
+ enum led_brightness brightness);
+
+ struct class_device *class_dev;
+ struct list_head node; /* LED Device list */
+ char *default_trigger; /* Trigger to use */
- /* Trigger data */
- char *default_trigger;
#ifdef CONFIG_LEDS_TRIGGERS
- rwlock_t trigger_lock;
/* Protects the trigger data below */
+ rwlock_t trigger_lock;
- struct led_trigger *trigger;
- struct list_head trig_list;
- void *trigger_data;
+ struct led_trigger *trigger;
+ struct list_head trig_list;
+ void *trigger_data;
#endif
};
extern int led_classdev_register(struct device *parent,
- struct led_classdev *led_cdev);
+ struct led_classdev *led_cdev);
extern void led_classdev_unregister(struct led_classdev *led_cdev);
extern void led_classdev_suspend(struct led_classdev *led_cdev);
extern void led_classdev_resume(struct led_classdev *led_cdev);
@@ -65,16 +64,16 @@ extern void led_classdev_resume(struct led_classdev *led_cdev);
struct led_trigger {
/* Trigger Properties */
- const char *name;
- void (*activate)(struct led_classdev *led_cdev);
- void (*deactivate)(struct led_classdev *led_cdev);
+ const char *name;
+ void (*activate)(struct led_classdev *led_cdev);
+ void (*deactivate)(struct led_classdev *led_cdev);
/* LEDs under control by this trigger (for simple triggers) */
- rwlock_t leddev_list_lock;
- struct list_head led_cdevs;
+ rwlock_t leddev_list_lock;
+ struct list_head led_cdevs;
/* Link to next registered trigger */
- struct list_head next_trig;
+ struct list_head next_trig;
};
/* Registration functions for complex triggers */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 0d61357604d5..b80d2e7fa6d2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -523,7 +523,6 @@ extern void ata_host_set_remove(struct ata_host_set *host_set);
extern int ata_scsi_detect(struct scsi_host_template *sht);
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
-extern int ata_scsi_error(struct Scsi_Host *host);
extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
extern int ata_scsi_release(struct Scsi_Host *host);
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 968b1aa3732c..911206386171 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -58,8 +58,6 @@ extern int add_one_highpage(struct page *page, int pfn, int bad_ppro);
/* need some defines for these for archs that don't support it */
extern void online_page(struct page *page);
/* VM interface that may be used by firmware interface */
-extern int add_memory(u64 start, u64 size);
-extern int remove_memory(u64 start, u64 size);
extern int online_pages(unsigned long, unsigned long);
/* reasonably generic interface to expand the physical pages in a zone */
@@ -92,11 +90,6 @@ static inline int mhp_notimplemented(const char *func)
return -ENOSYS;
}
-static inline int __add_pages(struct zone *zone, unsigned long start_pfn,
- unsigned long nr_pages)
-{
- return mhp_notimplemented(__FUNCTION__);
-}
#endif /* ! CONFIG_MEMORY_HOTPLUG */
static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
unsigned long nr_pages)
@@ -105,4 +98,8 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
dump_stack();
return -ENOSYS;
}
+
+extern int add_memory(u64 start, u64 size);
+extern int remove_memory(u64 start, u64 size);
+
#endif /* __LINUX_MEMORY_HOTPLUG_H */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 6aa016f1d3ae..1154684209a4 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -229,10 +229,9 @@ struct page {
unsigned long private; /* Mapping-private opaque data:
* usually used for buffer_heads
* if PagePrivate set; used for
- * swp_entry_t if PageSwapCache.
- * When page is free, this
+ * swp_entry_t if PageSwapCache;
* indicates order in the buddy
- * system.
+ * system if PG_buddy is set.
*/
struct address_space *mapping; /* If low bit clear, points to
* inode address_space, or NULL.
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h
index 955d3069d727..edfa012fad3a 100644
--- a/include/linux/mv643xx.h
+++ b/include/linux/mv643xx.h
@@ -13,7 +13,7 @@
#ifndef __ASM_MV643XX_H
#define __ASM_MV643XX_H
-#ifdef __MIPS__
+#ifdef __mips__
#include <asm/addrspace.h>
#include <asm/marvell.h>
#endif
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 412e52ca9720..b31a9bca9361 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -110,6 +110,8 @@ struct nf_info
/* Function to register/unregister hook points. */
int nf_register_hook(struct nf_hook_ops *reg);
void nf_unregister_hook(struct nf_hook_ops *reg);
+int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n);
+void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n);
/* Functions to register get/setsockopt ranges (non-inclusive). You
need to check permissions yourself! */
@@ -281,16 +283,42 @@ extern void nf_invalidate_cache(int pf);
Returns true or false. */
extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len);
-struct nf_queue_rerouter {
- void (*save)(const struct sk_buff *skb, struct nf_info *info);
- int (*reroute)(struct sk_buff **skb, const struct nf_info *info);
- int rer_size;
+struct nf_afinfo {
+ unsigned short family;
+ unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook,
+ unsigned int dataoff, u_int8_t protocol);
+ void (*saveroute)(const struct sk_buff *skb,
+ struct nf_info *info);
+ int (*reroute)(struct sk_buff **skb,
+ const struct nf_info *info);
+ int route_key_size;
};
-#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info))
+extern struct nf_afinfo *nf_afinfo[];
+static inline struct nf_afinfo *nf_get_afinfo(unsigned short family)
+{
+ return rcu_dereference(nf_afinfo[family]);
+}
+
+static inline unsigned int
+nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
+ u_int8_t protocol, unsigned short family)
+{
+ struct nf_afinfo *afinfo;
+ unsigned int csum = 0;
+
+ rcu_read_lock();
+ afinfo = nf_get_afinfo(family);
+ if (afinfo)
+ csum = afinfo->checksum(skb, hook, dataoff, protocol);
+ rcu_read_unlock();
+ return csum;
+}
-extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer);
-extern int nf_unregister_queue_rerouter(int pf);
+extern int nf_register_afinfo(struct nf_afinfo *afinfo);
+extern void nf_unregister_afinfo(struct nf_afinfo *afinfo);
+
+#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info))
#include <net/flow.h>
extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h
index 43c09d790b83..85301c5e8d24 100644
--- a/include/linux/netfilter_ipv4.h
+++ b/include/linux/netfilter_ipv4.h
@@ -80,6 +80,8 @@ enum nf_ip_hook_priorities {
#ifdef __KERNEL__
extern int ip_route_me_harder(struct sk_buff **pskb);
extern int ip_xfrm_me_harder(struct sk_buff **pskb);
+extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
+ unsigned int dataoff, u_int8_t protocol);
#endif /*__KERNEL__*/
#endif /*__LINUX_IP_NETFILTER_H*/
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h
index 0987cea53840..eace86bd2adb 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h
@@ -3,6 +3,8 @@
#ifdef __KERNEL__
+#include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h>
+
#define RAS_PORT 1719
#define Q931_PORT 1720
#define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */
@@ -25,6 +27,56 @@ struct ip_ct_h323_master {
};
};
+struct ip_conntrack_expect;
+
+extern int get_h225_addr(unsigned char *data, TransportAddress * addr,
+ u_int32_t * ip, u_int16_t * port);
+extern void ip_conntrack_h245_expect(struct ip_conntrack *new,
+ struct ip_conntrack_expect *this);
+extern void ip_conntrack_q931_expect(struct ip_conntrack *new,
+ struct ip_conntrack_expect *this);
+extern int (*set_h245_addr_hook) (struct sk_buff ** pskb,
+ unsigned char **data, int dataoff,
+ H245_TransportAddress * addr,
+ u_int32_t ip, u_int16_t port);
+extern int (*set_h225_addr_hook) (struct sk_buff ** pskb,
+ unsigned char **data, int dataoff,
+ TransportAddress * addr,
+ u_int32_t ip, u_int16_t port);
+extern int (*set_sig_addr_hook) (struct sk_buff ** pskb,
+ struct ip_conntrack * ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned char **data,
+ TransportAddress * addr, int count);
+extern int (*set_ras_addr_hook) (struct sk_buff ** pskb,
+ struct ip_conntrack * ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned char **data,
+ TransportAddress * addr, int count);
+extern int (*nat_rtp_rtcp_hook) (struct sk_buff ** pskb,
+ struct ip_conntrack * ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned char **data, int dataoff,
+ H245_TransportAddress * addr,
+ u_int16_t port, u_int16_t rtp_port,
+ struct ip_conntrack_expect * rtp_exp,
+ struct ip_conntrack_expect * rtcp_exp);
+extern int (*nat_t120_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned char **data, int dataoff,
+ H245_TransportAddress * addr, u_int16_t port,
+ struct ip_conntrack_expect * exp);
+extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned char **data, int dataoff,
+ TransportAddress * addr, u_int16_t port,
+ struct ip_conntrack_expect * exp);
+extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct,
+ enum ip_conntrack_info ctinfo,
+ unsigned char **data, TransportAddress * addr,
+ int idx, u_int16_t port,
+ struct ip_conntrack_expect * exp);
+
#endif
#endif
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h
new file mode 100644
index 000000000000..0bd828081c0c
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+ * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323
+ * conntrack/NAT module.
+ *
+ * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com>
+ *
+ * This source code is licensed under General Public License version 2.
+ *
+ *
+ * This library is based on H.225 version 4, H.235 version 2 and H.245
+ * version 7. It is extremely optimized to decode only the absolutely
+ * necessary objects in a signal for Linux kernel NAT module use, so don't
+ * expect it to be a full ASN.1 library.
+ *
+ * Features:
+ *
+ * 1. Small. The total size of code plus data is less than 20 KB (IA32).
+ * 2. Fast. Decoding Netmeeting's Setup signal 1 million times on a PIII 866
+ * takes only 3.9 seconds.
+ * 3. No memory allocation. It uses a static object. No need to initialize or
+ * cleanup.
+ * 4. Thread safe.
+ * 5. Support embedded architectures that has no misaligned memory access
+ * support.
+ *
+ * Limitations:
+ *
+ * 1. At most 30 faststart entries. Actually this is limited by ethernet's MTU.
+ * If a Setup signal contains more than 30 faststart, the packet size will
+ * very likely exceed the MTU size, then the TPKT will be fragmented. I
+ * don't know how to handle this in a Netfilter module. Anybody can help?
+ * Although I think 30 is enough for most of the cases.
+ * 2. IPv4 addresses only.
+ *
+ ****************************************************************************/
+
+#ifndef _IP_CONNTRACK_HELPER_H323_ASN1_H_
+#define _IP_CONNTRACK_HELPER_H323_ASN1_H_
+
+/*****************************************************************************
+ * H.323 Types
+ ****************************************************************************/
+#include "ip_conntrack_helper_h323_types.h"
+
+typedef struct {
+ enum {
+ Q931_NationalEscape = 0x00,
+ Q931_Alerting = 0x01,
+ Q931_CallProceeding = 0x02,
+ Q931_Connect = 0x07,
+ Q931_ConnectAck = 0x0F,
+ Q931_Progress = 0x03,
+ Q931_Setup = 0x05,
+ Q931_SetupAck = 0x0D,
+ Q931_Resume = 0x26,
+ Q931_ResumeAck = 0x2E,
+ Q931_ResumeReject = 0x22,
+ Q931_Suspend = 0x25,
+ Q931_SuspendAck = 0x2D,
+ Q931_SuspendReject = 0x21,
+ Q931_UserInformation = 0x20,
+ Q931_Disconnect = 0x45,
+ Q931_Release = 0x4D,
+ Q931_ReleaseComplete = 0x5A,
+ Q931_Restart = 0x46,
+ Q931_RestartAck = 0x4E,
+ Q931_Segment = 0x60,
+ Q931_CongestionCtrl = 0x79,
+ Q931_Information = 0x7B,
+ Q931_Notify = 0x6E,
+ Q931_Status = 0x7D,
+ Q931_StatusEnquiry = 0x75,
+ Q931_Facility = 0x62
+ } MessageType;
+ H323_UserInformation UUIE;
+} Q931;
+
+/*****************************************************************************
+ * Decode Functions Return Codes
+ ****************************************************************************/
+
+#define H323_ERROR_NONE 0 /* Decoded successfully */
+#define H323_ERROR_STOP 1 /* Decoding stopped, not really an error */
+#define H323_ERROR_BOUND -1
+#define H323_ERROR_RANGE -2
+
+
+/*****************************************************************************
+ * Decode Functions
+ ****************************************************************************/
+
+int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage * ras);
+int DecodeQ931(unsigned char *buf, size_t sz, Q931 * q931);
+int DecodeMultimediaSystemControlMessage(unsigned char *buf, size_t sz,
+ MultimediaSystemControlMessage *
+ mscm);
+
+#endif
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h
new file mode 100644
index 000000000000..cc98f7aa5abe
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h
@@ -0,0 +1,938 @@
+/* Generated by Jing Min Zhao's ASN.1 parser, Mar 15 2006
+ *
+ * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net>
+ *
+ * This source code is licensed under General Public License version 2.
+ */
+
+typedef struct TransportAddress_ipAddress { /* SEQUENCE */
+ int options; /* No use */
+ unsigned ip;
+} TransportAddress_ipAddress;
+
+typedef struct TransportAddress { /* CHOICE */
+ enum {
+ eTransportAddress_ipAddress,
+ eTransportAddress_ipSourceRoute,
+ eTransportAddress_ipxAddress,
+ eTransportAddress_ip6Address,
+ eTransportAddress_netBios,
+ eTransportAddress_nsap,
+ eTransportAddress_nonStandardAddress,
+ } choice;
+ union {
+ TransportAddress_ipAddress ipAddress;
+ };
+} TransportAddress;
+
+typedef struct DataProtocolCapability { /* CHOICE */
+ enum {
+ eDataProtocolCapability_nonStandard,
+ eDataProtocolCapability_v14buffered,
+ eDataProtocolCapability_v42lapm,
+ eDataProtocolCapability_hdlcFrameTunnelling,
+ eDataProtocolCapability_h310SeparateVCStack,
+ eDataProtocolCapability_h310SingleVCStack,
+ eDataProtocolCapability_transparent,
+ eDataProtocolCapability_segmentationAndReassembly,
+ eDataProtocolCapability_hdlcFrameTunnelingwSAR,
+ eDataProtocolCapability_v120,
+ eDataProtocolCapability_separateLANStack,
+ eDataProtocolCapability_v76wCompression,
+ eDataProtocolCapability_tcp,
+ eDataProtocolCapability_udp,
+ } choice;
+} DataProtocolCapability;
+
+typedef struct DataApplicationCapability_application { /* CHOICE */
+ enum {
+ eDataApplicationCapability_application_nonStandard,
+ eDataApplicationCapability_application_t120,
+ eDataApplicationCapability_application_dsm_cc,
+ eDataApplicationCapability_application_userData,
+ eDataApplicationCapability_application_t84,
+ eDataApplicationCapability_application_t434,
+ eDataApplicationCapability_application_h224,
+ eDataApplicationCapability_application_nlpid,
+ eDataApplicationCapability_application_dsvdControl,
+ eDataApplicationCapability_application_h222DataPartitioning,
+ eDataApplicationCapability_application_t30fax,
+ eDataApplicationCapability_application_t140,
+ eDataApplicationCapability_application_t38fax,
+ eDataApplicationCapability_application_genericDataCapability,
+ } choice;
+ union {
+ DataProtocolCapability t120;
+ };
+} DataApplicationCapability_application;
+
+typedef struct DataApplicationCapability { /* SEQUENCE */
+ int options; /* No use */
+ DataApplicationCapability_application application;
+} DataApplicationCapability;
+
+typedef struct DataType { /* CHOICE */
+ enum {
+ eDataType_nonStandard,
+ eDataType_nullData,
+ eDataType_videoData,
+ eDataType_audioData,
+ eDataType_data,
+ eDataType_encryptionData,
+ eDataType_h235Control,
+ eDataType_h235Media,
+ eDataType_multiplexedStream,
+ } choice;
+ union {
+ DataApplicationCapability data;
+ };
+} DataType;
+
+typedef struct UnicastAddress_iPAddress { /* SEQUENCE */
+ int options; /* No use */
+ unsigned network;
+} UnicastAddress_iPAddress;
+
+typedef struct UnicastAddress { /* CHOICE */
+ enum {
+ eUnicastAddress_iPAddress,
+ eUnicastAddress_iPXAddress,
+ eUnicastAddress_iP6Address,
+ eUnicastAddress_netBios,
+ eUnicastAddress_iPSourceRouteAddress,
+ eUnicastAddress_nsap,
+ eUnicastAddress_nonStandardAddress,
+ } choice;
+ union {
+ UnicastAddress_iPAddress iPAddress;
+ };
+} UnicastAddress;
+
+typedef struct H245_TransportAddress { /* CHOICE */
+ enum {
+ eH245_TransportAddress_unicastAddress,
+ eH245_TransportAddress_multicastAddress,
+ } choice;
+ union {
+ UnicastAddress unicastAddress;
+ };
+} H245_TransportAddress;
+
+typedef struct H2250LogicalChannelParameters { /* SEQUENCE */
+ enum {
+ eH2250LogicalChannelParameters_nonStandard = (1 << 31),
+ eH2250LogicalChannelParameters_associatedSessionID =
+ (1 << 30),
+ eH2250LogicalChannelParameters_mediaChannel = (1 << 29),
+ eH2250LogicalChannelParameters_mediaGuaranteedDelivery =
+ (1 << 28),
+ eH2250LogicalChannelParameters_mediaControlChannel =
+ (1 << 27),
+ eH2250LogicalChannelParameters_mediaControlGuaranteedDelivery
+ = (1 << 26),
+ eH2250LogicalChannelParameters_silenceSuppression = (1 << 25),
+ eH2250LogicalChannelParameters_destination = (1 << 24),
+ eH2250LogicalChannelParameters_dynamicRTPPayloadType =
+ (1 << 23),
+ eH2250LogicalChannelParameters_mediaPacketization = (1 << 22),
+ eH2250LogicalChannelParameters_transportCapability =
+ (1 << 21),
+ eH2250LogicalChannelParameters_redundancyEncoding = (1 << 20),
+ eH2250LogicalChannelParameters_source = (1 << 19),
+ } options;
+ H245_TransportAddress mediaChannel;
+ H245_TransportAddress mediaControlChannel;
+} H2250LogicalChannelParameters;
+
+typedef struct OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters { /* CHOICE */
+ enum {
+ eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters,
+ eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters,
+ eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters,
+ eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters,
+ eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_none,
+ } choice;
+ union {
+ H2250LogicalChannelParameters h2250LogicalChannelParameters;
+ };
+} OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters;
+
+typedef struct OpenLogicalChannel_forwardLogicalChannelParameters { /* SEQUENCE */
+ enum {
+ eOpenLogicalChannel_forwardLogicalChannelParameters_portNumber
+ = (1 << 31),
+ eOpenLogicalChannel_forwardLogicalChannelParameters_forwardLogicalChannelDependency
+ = (1 << 30),
+ eOpenLogicalChannel_forwardLogicalChannelParameters_replacementFor
+ = (1 << 29),
+ } options;
+ DataType dataType;
+ OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters
+ multiplexParameters;
+} OpenLogicalChannel_forwardLogicalChannelParameters;
+
+typedef struct OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */
+ enum {
+ eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters,
+ eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters,
+ eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters,
+ } choice;
+ union {
+ H2250LogicalChannelParameters h2250LogicalChannelParameters;
+ };
+} OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters;
+
+typedef struct OpenLogicalChannel_reverseLogicalChannelParameters { /* SEQUENCE */
+ enum {
+ eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters
+ = (1 << 31),
+ eOpenLogicalChannel_reverseLogicalChannelParameters_reverseLogicalChannelDependency
+ = (1 << 30),
+ eOpenLogicalChannel_reverseLogicalChannelParameters_replacementFor
+ = (1 << 29),
+ } options;
+ OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters
+ multiplexParameters;
+} OpenLogicalChannel_reverseLogicalChannelParameters;
+
+typedef struct NetworkAccessParameters_networkAddress { /* CHOICE */
+ enum {
+ eNetworkAccessParameters_networkAddress_q2931Address,
+ eNetworkAccessParameters_networkAddress_e164Address,
+ eNetworkAccessParameters_networkAddress_localAreaAddress,
+ } choice;
+ union {
+ H245_TransportAddress localAreaAddress;
+ };
+} NetworkAccessParameters_networkAddress;
+
+typedef struct NetworkAccessParameters { /* SEQUENCE */
+ enum {
+ eNetworkAccessParameters_distribution = (1 << 31),
+ eNetworkAccessParameters_externalReference = (1 << 30),
+ eNetworkAccessParameters_t120SetupProcedure = (1 << 29),
+ } options;
+ NetworkAccessParameters_networkAddress networkAddress;
+} NetworkAccessParameters;
+
+typedef struct OpenLogicalChannel { /* SEQUENCE */
+ enum {
+ eOpenLogicalChannel_reverseLogicalChannelParameters =
+ (1 << 31),
+ eOpenLogicalChannel_separateStack = (1 << 30),
+ eOpenLogicalChannel_encryptionSync = (1 << 29),
+ } options;
+ OpenLogicalChannel_forwardLogicalChannelParameters
+ forwardLogicalChannelParameters;
+ OpenLogicalChannel_reverseLogicalChannelParameters
+ reverseLogicalChannelParameters;
+ NetworkAccessParameters separateStack;
+} OpenLogicalChannel;
+
+typedef struct Setup_UUIE_fastStart { /* SEQUENCE OF */
+ int count;
+ OpenLogicalChannel item[30];
+} Setup_UUIE_fastStart;
+
+typedef struct Setup_UUIE { /* SEQUENCE */
+ enum {
+ eSetup_UUIE_h245Address = (1 << 31),
+ eSetup_UUIE_sourceAddress = (1 << 30),
+ eSetup_UUIE_destinationAddress = (1 << 29),
+ eSetup_UUIE_destCallSignalAddress = (1 << 28),
+ eSetup_UUIE_destExtraCallInfo = (1 << 27),
+ eSetup_UUIE_destExtraCRV = (1 << 26),
+ eSetup_UUIE_callServices = (1 << 25),
+ eSetup_UUIE_sourceCallSignalAddress = (1 << 24),
+ eSetup_UUIE_remoteExtensionAddress = (1 << 23),
+ eSetup_UUIE_callIdentifier = (1 << 22),
+ eSetup_UUIE_h245SecurityCapability = (1 << 21),
+ eSetup_UUIE_tokens = (1 << 20),
+ eSetup_UUIE_cryptoTokens = (1 << 19),
+ eSetup_UUIE_fastStart = (1 << 18),
+ eSetup_UUIE_mediaWaitForConnect = (1 << 17),
+ eSetup_UUIE_canOverlapSend = (1 << 16),
+ eSetup_UUIE_endpointIdentifier = (1 << 15),
+ eSetup_UUIE_multipleCalls = (1 << 14),
+ eSetup_UUIE_maintainConnection = (1 << 13),
+ eSetup_UUIE_connectionParameters = (1 << 12),
+ eSetup_UUIE_language = (1 << 11),
+ eSetup_UUIE_presentationIndicator = (1 << 10),
+ eSetup_UUIE_screeningIndicator = (1 << 9),
+ eSetup_UUIE_serviceControl = (1 << 8),
+ eSetup_UUIE_symmetricOperationRequired = (1 << 7),
+ eSetup_UUIE_capacity = (1 << 6),
+ eSetup_UUIE_circuitInfo = (1 << 5),
+ eSetup_UUIE_desiredProtocols = (1 << 4),
+ eSetup_UUIE_neededFeatures = (1 << 3),
+ eSetup_UUIE_desiredFeatures = (1 << 2),
+ eSetup_UUIE_supportedFeatures = (1 << 1),
+ eSetup_UUIE_parallelH245Control = (1 << 0),
+ } options;
+ TransportAddress h245Address;
+ TransportAddress destCallSignalAddress;
+ TransportAddress sourceCallSignalAddress;
+ Setup_UUIE_fastStart fastStart;
+} Setup_UUIE;
+
+typedef struct CallProceeding_UUIE_fastStart { /* SEQUENCE OF */
+ int count;
+ OpenLogicalChannel item[30];
+} CallProceeding_UUIE_fastStart;
+
+typedef struct CallProceeding_UUIE { /* SEQUENCE */
+ enum {
+ eCallProceeding_UUIE_h245Address = (1 << 31),
+ eCallProceeding_UUIE_callIdentifier = (1 << 30),
+ eCallProceeding_UUIE_h245SecurityMode = (1 << 29),
+ eCallProceeding_UUIE_tokens = (1 << 28),
+ eCallProceeding_UUIE_cryptoTokens = (1 << 27),
+ eCallProceeding_UUIE_fastStart = (1 << 26),
+ eCallProceeding_UUIE_multipleCalls = (1 << 25),
+ eCallProceeding_UUIE_maintainConnection = (1 << 24),
+ eCallProceeding_UUIE_fastConnectRefused = (1 << 23),
+ eCallProceeding_UUIE_featureSet = (1 << 22),
+ } options;
+ TransportAddress h245Address;
+ CallProceeding_UUIE_fastStart fastStart;
+} CallProceeding_UUIE;
+
+typedef struct Connect_UUIE_fastStart { /* SEQUENCE OF */
+ int count;
+ OpenLogicalChannel item[30];
+} Connect_UUIE_fastStart;
+
+typedef struct Connect_UUIE { /* SEQUENCE */
+ enum {
+ eConnect_UUIE_h245Address = (1 << 31),
+ eConnect_UUIE_callIdentifier = (1 << 30),
+ eConnect_UUIE_h245SecurityMode = (1 << 29),
+ eConnect_UUIE_tokens = (1 << 28),
+ eConnect_UUIE_cryptoTokens = (1 << 27),
+ eConnect_UUIE_fastStart = (1 << 26),
+ eConnect_UUIE_multipleCalls = (1 << 25),
+ eConnect_UUIE_maintainConnection = (1 << 24),
+ eConnect_UUIE_language = (1 << 23),
+ eConnect_UUIE_connectedAddress = (1 << 22),
+ eConnect_UUIE_presentationIndicator = (1 << 21),
+ eConnect_UUIE_screeningIndicator = (1 << 20),
+ eConnect_UUIE_fastConnectRefused = (1 << 19),
+ eConnect_UUIE_serviceControl = (1 << 18),
+ eConnect_UUIE_capacity = (1 << 17),
+ eConnect_UUIE_featureSet = (1 << 16),
+ } options;
+ TransportAddress h245Address;
+ Connect_UUIE_fastStart fastStart;
+} Connect_UUIE;
+
+typedef struct Alerting_UUIE_fastStart { /* SEQUENCE OF */
+ int count;
+ OpenLogicalChannel item[30];
+} Alerting_UUIE_fastStart;
+
+typedef struct Alerting_UUIE { /* SEQUENCE */
+ enum {
+ eAlerting_UUIE_h245Address = (1 << 31),
+ eAlerting_UUIE_callIdentifier = (1 << 30),
+ eAlerting_UUIE_h245SecurityMode = (1 << 29),
+ eAlerting_UUIE_tokens = (1 << 28),
+ eAlerting_UUIE_cryptoTokens = (1 << 27),
+ eAlerting_UUIE_fastStart = (1 << 26),
+ eAlerting_UUIE_multipleCalls = (1 << 25),
+ eAlerting_UUIE_maintainConnection = (1 << 24),
+ eAlerting_UUIE_alertingAddress = (1 << 23),
+ eAlerting_UUIE_presentationIndicator = (1 << 22),
+ eAlerting_UUIE_screeningIndicator = (1 << 21),
+ eAlerting_UUIE_fastConnectRefused = (1 << 20),
+ eAlerting_UUIE_serviceControl = (1 << 19),
+ eAlerting_UUIE_capacity = (1 << 18),
+ eAlerting_UUIE_featureSet = (1 << 17),
+ } options;
+ TransportAddress h245Address;
+ Alerting_UUIE_fastStart fastStart;
+} Alerting_UUIE;
+
+typedef struct Information_UUIE_fastStart { /* SEQUENCE OF */
+ int count;
+ OpenLogicalChannel item[30];
+} Information_UUIE_fastStart;
+
+typedef struct Information_UUIE { /* SEQUENCE */
+ enum {
+ eInformation_UUIE_callIdentifier = (1 << 31),
+ eInformation_UUIE_tokens = (1 << 30),
+ eInformation_UUIE_cryptoTokens = (1 << 29),
+ eInformation_UUIE_fastStart = (1 << 28),
+ eInformation_UUIE_fastConnectRefused = (1 << 27),
+ eInformation_UUIE_circuitInfo = (1 << 26),
+ } options;
+ Information_UUIE_fastStart fastStart;
+} Information_UUIE;
+
+typedef struct FacilityReason { /* CHOICE */
+ enum {
+ eFacilityReason_routeCallToGatekeeper,
+ eFacilityReason_callForwarded,
+ eFacilityReason_routeCallToMC,
+ eFacilityReason_undefinedReason,
+ eFacilityReason_conferenceListChoice,
+ eFacilityReason_startH245,
+ eFacilityReason_noH245,
+ eFacilityReason_newTokens,
+ eFacilityReason_featureSetUpdate,
+ eFacilityReason_forwardedElements,
+ eFacilityReason_transportedInformation,
+ } choice;
+} FacilityReason;
+
+typedef struct Facility_UUIE_fastStart { /* SEQUENCE OF */
+ int count;
+ OpenLogicalChannel item[30];
+} Facility_UUIE_fastStart;
+
+typedef struct Facility_UUIE { /* SEQUENCE */
+ enum {
+ eFacility_UUIE_alternativeAddress = (1 << 31),
+ eFacility_UUIE_alternativeAliasAddress = (1 << 30),
+ eFacility_UUIE_conferenceID = (1 << 29),
+ eFacility_UUIE_callIdentifier = (1 << 28),
+ eFacility_UUIE_destExtraCallInfo = (1 << 27),
+ eFacility_UUIE_remoteExtensionAddress = (1 << 26),
+ eFacility_UUIE_tokens = (1 << 25),
+ eFacility_UUIE_cryptoTokens = (1 << 24),
+ eFacility_UUIE_conferences = (1 << 23),
+ eFacility_UUIE_h245Address = (1 << 22),
+ eFacility_UUIE_fastStart = (1 << 21),
+ eFacility_UUIE_multipleCalls = (1 << 20),
+ eFacility_UUIE_maintainConnection = (1 << 19),
+ eFacility_UUIE_fastConnectRefused = (1 << 18),
+ eFacility_UUIE_serviceControl = (1 << 17),
+ eFacility_UUIE_circuitInfo = (1 << 16),
+ eFacility_UUIE_featureSet = (1 << 15),
+ eFacility_UUIE_destinationInfo = (1 << 14),
+ eFacility_UUIE_h245SecurityMode = (1 << 13),
+ } options;
+ FacilityReason reason;
+ TransportAddress h245Address;
+ Facility_UUIE_fastStart fastStart;
+} Facility_UUIE;
+
+typedef struct Progress_UUIE_fastStart { /* SEQUENCE OF */
+ int count;
+ OpenLogicalChannel item[30];
+} Progress_UUIE_fastStart;
+
+typedef struct Progress_UUIE { /* SEQUENCE */
+ enum {
+ eProgress_UUIE_h245Address = (1 << 31),
+ eProgress_UUIE_h245SecurityMode = (1 << 30),
+ eProgress_UUIE_tokens = (1 << 29),
+ eProgress_UUIE_cryptoTokens = (1 << 28),
+ eProgress_UUIE_fastStart = (1 << 27),
+ eProgress_UUIE_multipleCalls = (1 << 26),
+ eProgress_UUIE_maintainConnection = (1 << 25),
+ eProgress_UUIE_fastConnectRefused = (1 << 24),
+ } options;
+ TransportAddress h245Address;
+ Progress_UUIE_fastStart fastStart;
+} Progress_UUIE;
+
+typedef struct H323_UU_PDU_h323_message_body { /* CHOICE */
+ enum {
+ eH323_UU_PDU_h323_message_body_setup,
+ eH323_UU_PDU_h323_message_body_callProceeding,
+ eH323_UU_PDU_h323_message_body_connect,
+ eH323_UU_PDU_h323_message_body_alerting,
+ eH323_UU_PDU_h323_message_body_information,
+ eH323_UU_PDU_h323_message_body_releaseComplete,
+ eH323_UU_PDU_h323_message_body_facility,
+ eH323_UU_PDU_h323_message_body_progress,
+ eH323_UU_PDU_h323_message_body_empty,
+ eH323_UU_PDU_h323_message_body_status,
+ eH323_UU_PDU_h323_message_body_statusInquiry,
+ eH323_UU_PDU_h323_message_body_setupAcknowledge,
+ eH323_UU_PDU_h323_message_body_notify,
+ } choice;
+ union {
+ Setup_UUIE setup;
+ CallProceeding_UUIE callProceeding;
+ Connect_UUIE connect;
+ Alerting_UUIE alerting;
+ Information_UUIE information;
+ Facility_UUIE facility;
+ Progress_UUIE progress;
+ };
+} H323_UU_PDU_h323_message_body;
+
+typedef struct RequestMessage { /* CHOICE */
+ enum {
+ eRequestMessage_nonStandard,
+ eRequestMessage_masterSlaveDetermination,
+ eRequestMessage_terminalCapabilitySet,
+ eRequestMessage_openLogicalChannel,
+ eRequestMessage_closeLogicalChannel,
+ eRequestMessage_requestChannelClose,
+ eRequestMessage_multiplexEntrySend,
+ eRequestMessage_requestMultiplexEntry,
+ eRequestMessage_requestMode,
+ eRequestMessage_roundTripDelayRequest,
+ eRequestMessage_maintenanceLoopRequest,
+ eRequestMessage_communicationModeRequest,
+ eRequestMessage_conferenceRequest,
+ eRequestMessage_multilinkRequest,
+ eRequestMessage_logicalChannelRateRequest,
+ } choice;
+ union {
+ OpenLogicalChannel openLogicalChannel;
+ };
+} RequestMessage;
+
+typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */
+ enum {
+ eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters,
+ eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters,
+ } choice;
+ union {
+ H2250LogicalChannelParameters h2250LogicalChannelParameters;
+ };
+} OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters;
+
+typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters { /* SEQUENCE */
+ enum {
+ eOpenLogicalChannelAck_reverseLogicalChannelParameters_portNumber
+ = (1 << 31),
+ eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters
+ = (1 << 30),
+ eOpenLogicalChannelAck_reverseLogicalChannelParameters_replacementFor
+ = (1 << 29),
+ } options;
+ OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters
+ multiplexParameters;
+} OpenLogicalChannelAck_reverseLogicalChannelParameters;
+
+typedef struct H2250LogicalChannelAckParameters { /* SEQUENCE */
+ enum {
+ eH2250LogicalChannelAckParameters_nonStandard = (1 << 31),
+ eH2250LogicalChannelAckParameters_sessionID = (1 << 30),
+ eH2250LogicalChannelAckParameters_mediaChannel = (1 << 29),
+ eH2250LogicalChannelAckParameters_mediaControlChannel =
+ (1 << 28),
+ eH2250LogicalChannelAckParameters_dynamicRTPPayloadType =
+ (1 << 27),
+ eH2250LogicalChannelAckParameters_flowControlToZero =
+ (1 << 26),
+ eH2250LogicalChannelAckParameters_portNumber = (1 << 25),
+ } options;
+ H245_TransportAddress mediaChannel;
+ H245_TransportAddress mediaControlChannel;
+} H2250LogicalChannelAckParameters;
+
+typedef struct OpenLogicalChannelAck_forwardMultiplexAckParameters { /* CHOICE */
+ enum {
+ eOpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters,
+ } choice;
+ union {
+ H2250LogicalChannelAckParameters
+ h2250LogicalChannelAckParameters;
+ };
+} OpenLogicalChannelAck_forwardMultiplexAckParameters;
+
+typedef struct OpenLogicalChannelAck { /* SEQUENCE */
+ enum {
+ eOpenLogicalChannelAck_reverseLogicalChannelParameters =
+ (1 << 31),
+ eOpenLogicalChannelAck_separateStack = (1 << 30),
+ eOpenLogicalChannelAck_forwardMultiplexAckParameters =
+ (1 << 29),
+ eOpenLogicalChannelAck_encryptionSync = (1 << 28),
+ } options;
+ OpenLogicalChannelAck_reverseLogicalChannelParameters
+ reverseLogicalChannelParameters;
+ OpenLogicalChannelAck_forwardMultiplexAckParameters
+ forwardMultiplexAckParameters;
+} OpenLogicalChannelAck;
+
+typedef struct ResponseMessage { /* CHOICE */
+ enum {
+ eResponseMessage_nonStandard,
+ eResponseMessage_masterSlaveDeterminationAck,
+ eResponseMessage_masterSlaveDeterminationReject,
+ eResponseMessage_terminalCapabilitySetAck,
+ eResponseMessage_terminalCapabilitySetReject,
+ eResponseMessage_openLogicalChannelAck,
+ eResponseMessage_openLogicalChannelReject,
+ eResponseMessage_closeLogicalChannelAck,
+ eResponseMessage_requestChannelCloseAck,
+ eResponseMessage_requestChannelCloseReject,
+ eResponseMessage_multiplexEntrySendAck,
+ eResponseMessage_multiplexEntrySendReject,
+ eResponseMessage_requestMultiplexEntryAck,
+ eResponseMessage_requestMultiplexEntryReject,
+ eResponseMessage_requestModeAck,
+ eResponseMessage_requestModeReject,
+ eResponseMessage_roundTripDelayResponse,
+ eResponseMessage_maintenanceLoopAck,
+ eResponseMessage_maintenanceLoopReject,
+ eResponseMessage_communicationModeResponse,
+ eResponseMessage_conferenceResponse,
+ eResponseMessage_multilinkResponse,
+ eResponseMessage_logicalChannelRateAcknowledge,
+ eResponseMessage_logicalChannelRateReject,
+ } choice;
+ union {
+ OpenLogicalChannelAck openLogicalChannelAck;
+ };
+} ResponseMessage;
+
+typedef struct MultimediaSystemControlMessage { /* CHOICE */
+ enum {
+ eMultimediaSystemControlMessage_request,
+ eMultimediaSystemControlMessage_response,
+ eMultimediaSystemControlMessage_command,
+ eMultimediaSystemControlMessage_indication,
+ } choice;
+ union {
+ RequestMessage request;
+ ResponseMessage response;
+ };
+} MultimediaSystemControlMessage;
+
+typedef struct H323_UU_PDU_h245Control { /* SEQUENCE OF */
+ int count;
+ MultimediaSystemControlMessage item[4];
+} H323_UU_PDU_h245Control;
+
+typedef struct H323_UU_PDU { /* SEQUENCE */
+ enum {
+ eH323_UU_PDU_nonStandardData = (1 << 31),
+ eH323_UU_PDU_h4501SupplementaryService = (1 << 30),
+ eH323_UU_PDU_h245Tunneling = (1 << 29),
+ eH323_UU_PDU_h245Control = (1 << 28),
+ eH323_UU_PDU_nonStandardControl = (1 << 27),
+ eH323_UU_PDU_callLinkage = (1 << 26),
+ eH323_UU_PDU_tunnelledSignallingMessage = (1 << 25),
+ eH323_UU_PDU_provisionalRespToH245Tunneling = (1 << 24),
+ eH323_UU_PDU_stimulusControl = (1 << 23),
+ eH323_UU_PDU_genericData = (1 << 22),
+ } options;
+ H323_UU_PDU_h323_message_body h323_message_body;
+ H323_UU_PDU_h245Control h245Control;
+} H323_UU_PDU;
+
+typedef struct H323_UserInformation { /* SEQUENCE */
+ enum {
+ eH323_UserInformation_user_data = (1 << 31),
+ } options;
+ H323_UU_PDU h323_uu_pdu;
+} H323_UserInformation;
+
+typedef struct GatekeeperRequest { /* SEQUENCE */
+ enum {
+ eGatekeeperRequest_nonStandardData = (1 << 31),
+ eGatekeeperRequest_gatekeeperIdentifier = (1 << 30),
+ eGatekeeperRequest_callServices = (1 << 29),
+ eGatekeeperRequest_endpointAlias = (1 << 28),
+ eGatekeeperRequest_alternateEndpoints = (1 << 27),
+ eGatekeeperRequest_tokens = (1 << 26),
+ eGatekeeperRequest_cryptoTokens = (1 << 25),
+ eGatekeeperRequest_authenticationCapability = (1 << 24),
+ eGatekeeperRequest_algorithmOIDs = (1 << 23),
+ eGatekeeperRequest_integrity = (1 << 22),
+ eGatekeeperRequest_integrityCheckValue = (1 << 21),
+ eGatekeeperRequest_supportsAltGK = (1 << 20),
+ eGatekeeperRequest_featureSet = (1 << 19),
+ eGatekeeperRequest_genericData = (1 << 18),
+ } options;
+ TransportAddress rasAddress;
+} GatekeeperRequest;
+
+typedef struct GatekeeperConfirm { /* SEQUENCE */
+ enum {
+ eGatekeeperConfirm_nonStandardData = (1 << 31),
+ eGatekeeperConfirm_gatekeeperIdentifier = (1 << 30),
+ eGatekeeperConfirm_alternateGatekeeper = (1 << 29),
+ eGatekeeperConfirm_authenticationMode = (1 << 28),
+ eGatekeeperConfirm_tokens = (1 << 27),
+ eGatekeeperConfirm_cryptoTokens = (1 << 26),
+ eGatekeeperConfirm_algorithmOID = (1 << 25),
+ eGatekeeperConfirm_integrity = (1 << 24),
+ eGatekeeperConfirm_integrityCheckValue = (1 << 23),
+ eGatekeeperConfirm_featureSet = (1 << 22),
+ eGatekeeperConfirm_genericData = (1 << 21),
+ } options;
+ TransportAddress rasAddress;
+} GatekeeperConfirm;
+
+typedef struct RegistrationRequest_callSignalAddress { /* SEQUENCE OF */
+ int count;
+ TransportAddress item[10];
+} RegistrationRequest_callSignalAddress;
+
+typedef struct RegistrationRequest_rasAddress { /* SEQUENCE OF */
+ int count;
+ TransportAddress item[10];
+} RegistrationRequest_rasAddress;
+
+typedef struct RegistrationRequest { /* SEQUENCE */
+ enum {
+ eRegistrationRequest_nonStandardData = (1 << 31),
+ eRegistrationRequest_terminalAlias = (1 << 30),
+ eRegistrationRequest_gatekeeperIdentifier = (1 << 29),
+ eRegistrationRequest_alternateEndpoints = (1 << 28),
+ eRegistrationRequest_timeToLive = (1 << 27),
+ eRegistrationRequest_tokens = (1 << 26),
+ eRegistrationRequest_cryptoTokens = (1 << 25),
+ eRegistrationRequest_integrityCheckValue = (1 << 24),
+ eRegistrationRequest_keepAlive = (1 << 23),
+ eRegistrationRequest_endpointIdentifier = (1 << 22),
+ eRegistrationRequest_willSupplyUUIEs = (1 << 21),
+ eRegistrationRequest_maintainConnection = (1 << 20),
+ eRegistrationRequest_alternateTransportAddresses = (1 << 19),
+ eRegistrationRequest_additiveRegistration = (1 << 18),
+ eRegistrationRequest_terminalAliasPattern = (1 << 17),
+ eRegistrationRequest_supportsAltGK = (1 << 16),
+ eRegistrationRequest_usageReportingCapability = (1 << 15),
+ eRegistrationRequest_multipleCalls = (1 << 14),
+ eRegistrationRequest_supportedH248Packages = (1 << 13),
+ eRegistrationRequest_callCreditCapability = (1 << 12),
+ eRegistrationRequest_capacityReportingCapability = (1 << 11),
+ eRegistrationRequest_capacity = (1 << 10),
+ eRegistrationRequest_featureSet = (1 << 9),
+ eRegistrationRequest_genericData = (1 << 8),
+ } options;
+ RegistrationRequest_callSignalAddress callSignalAddress;
+ RegistrationRequest_rasAddress rasAddress;
+ unsigned timeToLive;
+} RegistrationRequest;
+
+typedef struct RegistrationConfirm_callSignalAddress { /* SEQUENCE OF */
+ int count;
+ TransportAddress item[10];
+} RegistrationConfirm_callSignalAddress;
+
+typedef struct RegistrationConfirm { /* SEQUENCE */
+ enum {
+ eRegistrationConfirm_nonStandardData = (1 << 31),
+ eRegistrationConfirm_terminalAlias = (1 << 30),
+ eRegistrationConfirm_gatekeeperIdentifier = (1 << 29),
+ eRegistrationConfirm_alternateGatekeeper = (1 << 28),
+ eRegistrationConfirm_timeToLive = (1 << 27),
+ eRegistrationConfirm_tokens = (1 << 26),
+ eRegistrationConfirm_cryptoTokens = (1 << 25),
+ eRegistrationConfirm_integrityCheckValue = (1 << 24),
+ eRegistrationConfirm_willRespondToIRR = (1 << 23),
+ eRegistrationConfirm_preGrantedARQ = (1 << 22),
+ eRegistrationConfirm_maintainConnection = (1 << 21),
+ eRegistrationConfirm_serviceControl = (1 << 20),
+ eRegistrationConfirm_supportsAdditiveRegistration = (1 << 19),
+ eRegistrationConfirm_terminalAliasPattern = (1 << 18),
+ eRegistrationConfirm_supportedPrefixes = (1 << 17),
+ eRegistrationConfirm_usageSpec = (1 << 16),
+ eRegistrationConfirm_featureServerAlias = (1 << 15),
+ eRegistrationConfirm_capacityReportingSpec = (1 << 14),
+ eRegistrationConfirm_featureSet = (1 << 13),
+ eRegistrationConfirm_genericData = (1 << 12),
+ } options;
+ RegistrationConfirm_callSignalAddress callSignalAddress;
+ unsigned timeToLive;
+} RegistrationConfirm;
+
+typedef struct UnregistrationRequest_callSignalAddress { /* SEQUENCE OF */
+ int count;
+ TransportAddress item[10];
+} UnregistrationRequest_callSignalAddress;
+
+typedef struct UnregistrationRequest { /* SEQUENCE */
+ enum {
+ eUnregistrationRequest_endpointAlias = (1 << 31),
+ eUnregistrationRequest_nonStandardData = (1 << 30),
+ eUnregistrationRequest_endpointIdentifier = (1 << 29),
+ eUnregistrationRequest_alternateEndpoints = (1 << 28),
+ eUnregistrationRequest_gatekeeperIdentifier = (1 << 27),
+ eUnregistrationRequest_tokens = (1 << 26),
+ eUnregistrationRequest_cryptoTokens = (1 << 25),
+ eUnregistrationRequest_integrityCheckValue = (1 << 24),
+ eUnregistrationRequest_reason = (1 << 23),
+ eUnregistrationRequest_endpointAliasPattern = (1 << 22),
+ eUnregistrationRequest_supportedPrefixes = (1 << 21),
+ eUnregistrationRequest_alternateGatekeeper = (1 << 20),
+ eUnregistrationRequest_genericData = (1 << 19),
+ } options;
+ UnregistrationRequest_callSignalAddress callSignalAddress;
+} UnregistrationRequest;
+
+typedef struct AdmissionRequest { /* SEQUENCE */
+ enum {
+ eAdmissionRequest_callModel = (1 << 31),
+ eAdmissionRequest_destinationInfo = (1 << 30),
+ eAdmissionRequest_destCallSignalAddress = (1 << 29),
+ eAdmissionRequest_destExtraCallInfo = (1 << 28),
+ eAdmissionRequest_srcCallSignalAddress = (1 << 27),
+ eAdmissionRequest_nonStandardData = (1 << 26),
+ eAdmissionRequest_callServices = (1 << 25),
+ eAdmissionRequest_canMapAlias = (1 << 24),
+ eAdmissionRequest_callIdentifier = (1 << 23),
+ eAdmissionRequest_srcAlternatives = (1 << 22),
+ eAdmissionRequest_destAlternatives = (1 << 21),
+ eAdmissionRequest_gatekeeperIdentifier = (1 << 20),
+ eAdmissionRequest_tokens = (1 << 19),
+ eAdmissionRequest_cryptoTokens = (1 << 18),
+ eAdmissionRequest_integrityCheckValue = (1 << 17),
+ eAdmissionRequest_transportQOS = (1 << 16),
+ eAdmissionRequest_willSupplyUUIEs = (1 << 15),
+ eAdmissionRequest_callLinkage = (1 << 14),
+ eAdmissionRequest_gatewayDataRate = (1 << 13),
+ eAdmissionRequest_capacity = (1 << 12),
+ eAdmissionRequest_circuitInfo = (1 << 11),
+ eAdmissionRequest_desiredProtocols = (1 << 10),
+ eAdmissionRequest_desiredTunnelledProtocol = (1 << 9),
+ eAdmissionRequest_featureSet = (1 << 8),
+ eAdmissionRequest_genericData = (1 << 7),
+ } options;
+ TransportAddress destCallSignalAddress;
+ TransportAddress srcCallSignalAddress;
+} AdmissionRequest;
+
+typedef struct AdmissionConfirm { /* SEQUENCE */
+ enum {
+ eAdmissionConfirm_irrFrequency = (1 << 31),
+ eAdmissionConfirm_nonStandardData = (1 << 30),
+ eAdmissionConfirm_destinationInfo = (1 << 29),
+ eAdmissionConfirm_destExtraCallInfo = (1 << 28),
+ eAdmissionConfirm_destinationType = (1 << 27),
+ eAdmissionConfirm_remoteExtensionAddress = (1 << 26),
+ eAdmissionConfirm_alternateEndpoints = (1 << 25),
+ eAdmissionConfirm_tokens = (1 << 24),
+ eAdmissionConfirm_cryptoTokens = (1 << 23),
+ eAdmissionConfirm_integrityCheckValue = (1 << 22),
+ eAdmissionConfirm_transportQOS = (1 << 21),
+ eAdmissionConfirm_willRespondToIRR = (1 << 20),
+ eAdmissionConfirm_uuiesRequested = (1 << 19),
+ eAdmissionConfirm_language = (1 << 18),
+ eAdmissionConfirm_alternateTransportAddresses = (1 << 17),
+ eAdmissionConfirm_useSpecifiedTransport = (1 << 16),
+ eAdmissionConfirm_circuitInfo = (1 << 15),
+ eAdmissionConfirm_usageSpec = (1 << 14),
+ eAdmissionConfirm_supportedProtocols = (1 << 13),
+ eAdmissionConfirm_serviceControl = (1 << 12),
+ eAdmissionConfirm_multipleCalls = (1 << 11),
+ eAdmissionConfirm_featureSet = (1 << 10),
+ eAdmissionConfirm_genericData = (1 << 9),
+ } options;
+ TransportAddress destCallSignalAddress;
+} AdmissionConfirm;
+
+typedef struct LocationRequest { /* SEQUENCE */
+ enum {
+ eLocationRequest_endpointIdentifier = (1 << 31),
+ eLocationRequest_nonStandardData = (1 << 30),
+ eLocationRequest_sourceInfo = (1 << 29),
+ eLocationRequest_canMapAlias = (1 << 28),
+ eLocationRequest_gatekeeperIdentifier = (1 << 27),
+ eLocationRequest_tokens = (1 << 26),
+ eLocationRequest_cryptoTokens = (1 << 25),
+ eLocationRequest_integrityCheckValue = (1 << 24),
+ eLocationRequest_desiredProtocols = (1 << 23),
+ eLocationRequest_desiredTunnelledProtocol = (1 << 22),
+ eLocationRequest_featureSet = (1 << 21),
+ eLocationRequest_genericData = (1 << 20),
+ eLocationRequest_hopCount = (1 << 19),
+ eLocationRequest_circuitInfo = (1 << 18),
+ } options;
+ TransportAddress replyAddress;
+} LocationRequest;
+
+typedef struct LocationConfirm { /* SEQUENCE */
+ enum {
+ eLocationConfirm_nonStandardData = (1 << 31),
+ eLocationConfirm_destinationInfo = (1 << 30),
+ eLocationConfirm_destExtraCallInfo = (1 << 29),
+ eLocationConfirm_destinationType = (1 << 28),
+ eLocationConfirm_remoteExtensionAddress = (1 << 27),
+ eLocationConfirm_alternateEndpoints = (1 << 26),
+ eLocationConfirm_tokens = (1 << 25),
+ eLocationConfirm_cryptoTokens = (1 << 24),
+ eLocationConfirm_integrityCheckValue = (1 << 23),
+ eLocationConfirm_alternateTransportAddresses = (1 << 22),
+ eLocationConfirm_supportedProtocols = (1 << 21),
+ eLocationConfirm_multipleCalls = (1 << 20),
+ eLocationConfirm_featureSet = (1 << 19),
+ eLocationConfirm_genericData = (1 << 18),
+ eLocationConfirm_circuitInfo = (1 << 17),
+ eLocationConfirm_serviceControl = (1 << 16),
+ } options;
+ TransportAddress callSignalAddress;
+ TransportAddress rasAddress;
+} LocationConfirm;
+
+typedef struct InfoRequestResponse_callSignalAddress { /* SEQUENCE OF */
+ int count;
+ TransportAddress item[10];
+} InfoRequestResponse_callSignalAddress;
+
+typedef struct InfoRequestResponse { /* SEQUENCE */
+ enum {
+ eInfoRequestResponse_nonStandardData = (1 << 31),
+ eInfoRequestResponse_endpointAlias = (1 << 30),
+ eInfoRequestResponse_perCallInfo = (1 << 29),
+ eInfoRequestResponse_tokens = (1 << 28),
+ eInfoRequestResponse_cryptoTokens = (1 << 27),
+ eInfoRequestResponse_integrityCheckValue = (1 << 26),
+ eInfoRequestResponse_needResponse = (1 << 25),
+ eInfoRequestResponse_capacity = (1 << 24),
+ eInfoRequestResponse_irrStatus = (1 << 23),
+ eInfoRequestResponse_unsolicited = (1 << 22),
+ eInfoRequestResponse_genericData = (1 << 21),
+ } options;
+ TransportAddress rasAddress;
+ InfoRequestResponse_callSignalAddress callSignalAddress;
+} InfoRequestResponse;
+
+typedef struct RasMessage { /* CHOICE */
+ enum {
+ eRasMessage_gatekeeperRequest,
+ eRasMessage_gatekeeperConfirm,
+ eRasMessage_gatekeeperReject,
+ eRasMessage_registrationRequest,
+ eRasMessage_registrationConfirm,
+ eRasMessage_registrationReject,
+ eRasMessage_unregistrationRequest,
+ eRasMessage_unregistrationConfirm,
+ eRasMessage_unregistrationReject,
+ eRasMessage_admissionRequest,
+ eRasMessage_admissionConfirm,
+ eRasMessage_admissionReject,
+ eRasMessage_bandwidthRequest,
+ eRasMessage_bandwidthConfirm,
+ eRasMessage_bandwidthReject,
+ eRasMessage_disengageRequest,
+ eRasMessage_disengageConfirm,
+ eRasMessage_disengageReject,
+ eRasMessage_locationRequest,
+ eRasMessage_locationConfirm,
+ eRasMessage_locationReject,
+ eRasMessage_infoRequest,
+ eRasMessage_infoRequestResponse,
+ eRasMessage_nonStandardMessage,
+ eRasMessage_unknownMessageResponse,
+ eRasMessage_requestInProgress,
+ eRasMessage_resourcesAvailableIndicate,
+ eRasMessage_resourcesAvailableConfirm,
+ eRasMessage_infoRequestAck,
+ eRasMessage_infoRequestNak,
+ eRasMessage_serviceControlIndication,
+ eRasMessage_serviceControlResponse,
+ } choice;
+ union {
+ GatekeeperRequest gatekeeperRequest;
+ GatekeeperConfirm gatekeeperConfirm;
+ RegistrationRequest registrationRequest;
+ RegistrationConfirm registrationConfirm;
+ UnregistrationRequest unregistrationRequest;
+ AdmissionRequest admissionRequest;
+ AdmissionConfirm admissionConfirm;
+ LocationRequest locationRequest;
+ LocationConfirm locationConfirm;
+ InfoRequestResponse infoRequestResponse;
+ };
+} RasMessage;
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index 14f2bd010884..52a7b9e76428 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -73,6 +73,9 @@ enum nf_ip6_hook_priorities {
};
#ifdef CONFIG_NETFILTER
+extern unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,
+ unsigned int dataoff, u_int8_t protocol);
+
extern int ipv6_netfilter_init(void);
extern void ipv6_netfilter_fini(void);
#else /* CONFIG_NETFILTER */
diff --git a/include/linux/numa.h b/include/linux/numa.h
index f0c539bd3cfc..e481feb1bfd8 100644
--- a/include/linux/numa.h
+++ b/include/linux/numa.h
@@ -3,11 +3,9 @@
#include <linux/config.h>
-#ifndef CONFIG_FLATMEM
-#include <asm/numnodes.h>
-#endif
-
-#ifndef NODES_SHIFT
+#ifdef CONFIG_NODES_SHIFT
+#define NODES_SHIFT CONFIG_NODES_SHIFT
+#else
#define NODES_SHIFT 0
#endif
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 9ea629c02a4b..d276a4e2f825 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -48,8 +48,20 @@
/*
* Don't use the *_dontuse flags. Use the macros. Otherwise you'll break
- * locked- and dirty-page accounting. The top eight bits of page->flags are
- * used for page->zone, so putting flag bits there doesn't work.
+ * locked- and dirty-page accounting.
+ *
+ * The page flags field is split into two parts, the main flags area
+ * which extends from the low bits upwards, and the fields area which
+ * extends from the high bits downwards.
+ *
+ * | FIELD | ... | FLAGS |
+ * N-1 ^ 0
+ * (N-FLAGS_RESERVED)
+ *
+ * The fields area is reserved for fields mapping zone, node and SPARSEMEM
+ * section. The boundry between these two areas is defined by
+ * FLAGS_RESERVED which defines the width of the fields section
+ * (see linux/mmzone.h). New flags must _not_ overlap with this area.
*/
#define PG_locked 0 /* Page is locked. Don't touch. */
#define PG_error 1
@@ -74,7 +86,9 @@
#define PG_mappedtodisk 16 /* Has blocks allocated on-disk */
#define PG_reclaim 17 /* To be reclaimed asap */
#define PG_nosave_free 18 /* Free, should not be written */
-#define PG_uncached 19 /* Page has been mapped as uncached */
+#define PG_buddy 19 /* Page is free, on buddy lists */
+
+#define PG_uncached 20 /* Page has been mapped as uncached */
/*
* Global page accounting. One instance per CPU. Only unsigned longs are
@@ -317,6 +331,10 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
#define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags)
#define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags)
+#define PageBuddy(page) test_bit(PG_buddy, &(page)->flags)
+#define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags)
+#define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags)
+
#define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags)
#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0aad5a378e95..3a6a4e37a482 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -97,7 +97,13 @@ enum pci_channel_state {
typedef unsigned short __bitwise pci_bus_flags_t;
enum pci_bus_flags {
- PCI_BUS_FLAGS_NO_MSI = (pci_bus_flags_t) 1,
+ PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
+};
+
+struct pci_cap_saved_state {
+ struct hlist_node next;
+ char cap_nr;
+ u32 data[0];
};
/*
@@ -159,6 +165,7 @@ struct pci_dev {
unsigned int block_ucfg_access:1; /* userspace config space access is blocked */
u32 saved_config_space[16]; /* config space saved at suspend time */
+ struct hlist_head saved_cap_space;
struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
int rom_attr_enabled; /* has display of the rom attribute been enabled? */
struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
@@ -169,6 +176,30 @@ struct pci_dev {
#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
+static inline struct pci_cap_saved_state *pci_find_saved_cap(
+ struct pci_dev *pci_dev,char cap)
+{
+ struct pci_cap_saved_state *tmp;
+ struct hlist_node *pos;
+
+ hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
+ if (tmp->cap_nr == cap)
+ return tmp;
+ }
+ return NULL;
+}
+
+static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
+ struct pci_cap_saved_state *new_cap)
+{
+ hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
+}
+
+static inline void pci_remove_saved_cap(struct pci_cap_saved_state *cap)
+{
+ hlist_del(&cap->next);
+}
+
/*
* For PCI devices, the region numbers are assigned this way:
*
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 870fe38378b1..d6fe048376ab 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -356,6 +356,10 @@
#define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e
#define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376
#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379
+#define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
+#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
+#define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381
+#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
#define PCI_VENDOR_ID_VLSI 0x1004
#define PCI_DEVICE_ID_VLSI_82C592 0x0005
@@ -497,7 +501,8 @@
#define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b
#define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d
#define PCI_DEVICE_ID_AMD_8151_0 0x7454
-#define PCI_DEVICE_ID_AMD_8131_APIC 0x7450
+#define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450
+#define PCI_DEVICE_ID_AMD_8131_APIC 0x7451
#define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090
#define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091
#define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index ec384958d509..ef7f33c0be19 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -21,6 +21,7 @@ struct pipe_buf_operations {
void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *);
void (*release)(struct pipe_inode_info *, struct pipe_buffer *);
int (*steal)(struct pipe_inode_info *, struct pipe_buffer *);
+ void (*get)(struct pipe_inode_info *, struct pipe_buffer *);
};
struct pipe_inode_info {
@@ -36,27 +37,19 @@ struct pipe_inode_info {
unsigned int w_counter;
struct fasync_struct *fasync_readers;
struct fasync_struct *fasync_writers;
+ struct inode *inode;
};
/* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual
memory allocation, whereas PIPE_BUF makes atomicity guarantees. */
#define PIPE_SIZE PAGE_SIZE
-#define PIPE_MUTEX(inode) (&(inode).i_mutex)
-#define PIPE_WAIT(inode) (&(inode).i_pipe->wait)
-#define PIPE_READERS(inode) ((inode).i_pipe->readers)
-#define PIPE_WRITERS(inode) ((inode).i_pipe->writers)
-#define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers)
-#define PIPE_RCOUNTER(inode) ((inode).i_pipe->r_counter)
-#define PIPE_WCOUNTER(inode) ((inode).i_pipe->w_counter)
-#define PIPE_FASYNC_READERS(inode) (&((inode).i_pipe->fasync_readers))
-#define PIPE_FASYNC_WRITERS(inode) (&((inode).i_pipe->fasync_writers))
-
/* Drop the inode semaphore and wait for a pipe event, atomically */
-void pipe_wait(struct inode * inode);
+void pipe_wait(struct pipe_inode_info *pipe);
-struct inode* pipe_new(struct inode* inode);
-void free_pipe_info(struct inode* inode);
+struct pipe_inode_info * alloc_pipe_info(struct inode * inode);
+void free_pipe_info(struct inode * inode);
+void __free_pipe_info(struct pipe_inode_info *);
/*
* splice is tied to pipes as a transport (at least for now), so we'll just
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 6df2585c0169..66be58902b17 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -199,6 +199,12 @@ extern int device_suspend(pm_message_t state);
extern int dpm_runtime_suspend(struct device *, pm_message_t);
extern void dpm_runtime_resume(struct device *);
+extern void __suspend_report_result(const char *function, void *fn, int ret);
+
+#define suspend_report_result(fn, ret) \
+ do { \
+ __suspend_report_result(__FUNCTION__, fn, ret); \
+ } while (0)
#else /* !CONFIG_PM */
@@ -219,6 +225,8 @@ static inline void dpm_runtime_resume(struct device * dev)
{
}
+#define suspend_report_result(fn, ret) do { } while (0)
+
#endif
/* changes to device_may_wakeup take effect on the next pm state change.
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h
index 1252b45face1..008932d73c35 100644
--- a/include/linux/pm_legacy.h
+++ b/include/linux/pm_legacy.h
@@ -16,11 +16,6 @@ struct pm_dev __deprecated *
pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
/*
- * Unregister a device with power management
- */
-void __deprecated pm_unregister(struct pm_dev *dev);
-
-/*
* Unregister all devices with matching callback
*/
void __deprecated pm_unregister_all(pm_callback callback);
@@ -41,8 +36,6 @@ static inline struct pm_dev *pm_register(pm_dev_t type,
return NULL;
}
-static inline void pm_unregister(struct pm_dev *dev) {}
-
static inline void pm_unregister_all(pm_callback callback) {}
static inline int pm_send_all(pm_request_t rqst, void *data)
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 135871df9911..4b47a0253425 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -79,7 +79,7 @@ struct kcore_list {
struct vmcore {
struct list_head list;
unsigned long long paddr;
- unsigned long size;
+ unsigned long long size;
loff_t offset;
};
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index 774e1acfb8c4..f1fbae7e390e 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -227,8 +227,8 @@ struct mdp_superblock_1 {
*/
/* These are only valid with feature bit '4' */
- __u64 reshape_position; /* next address in array-space for reshape */
__u32 new_level; /* new level we are reshaping to */
+ __u64 reshape_position; /* next address in array-space for reshape */
__u32 delta_disks; /* change in number of raid_disks */
__u32 new_layout; /* new layout */
__u32 new_chunk; /* new chunk size (bytes) */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 541f4828f5e7..29b7d4f87d20 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -684,6 +684,7 @@ static inline void prefetch_stack(struct task_struct *t) { }
struct audit_context; /* See audit.c */
struct mempolicy;
+struct pipe_inode_info;
enum sleep_type {
SLEEP_NORMAL,
@@ -882,6 +883,11 @@ struct task_struct {
atomic_t fs_excl; /* holding fs exclusive resources */
struct rcu_head rcu;
+
+ /*
+ * cache last used pipe for splice
+ */
+ struct pipe_inode_info *splice_pipe;
};
static inline pid_t process_group(struct task_struct *tsk)
@@ -905,7 +911,6 @@ static inline int pid_alive(struct task_struct *p)
extern void free_task(struct task_struct *tsk);
#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
-extern void __put_task_struct_cb(struct rcu_head *rhp);
extern void __put_task_struct(struct task_struct *t);
static inline void put_task_struct(struct task_struct *t)
@@ -1187,8 +1192,7 @@ extern void wait_task_inactive(task_t * p);
#define remove_parent(p) list_del_init(&(p)->sibling)
#define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children)
-#define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks)
-#define prev_task(p) list_entry((p)->tasks.prev, struct task_struct, tasks)
+#define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks)
#define for_each_process(p) \
for (p = &init_task ; (p = next_task(p)) != &init_task ; )
@@ -1203,9 +1207,10 @@ extern void wait_task_inactive(task_t * p);
#define while_each_thread(g, t) \
while ((t = next_thread(t)) != g)
-#define thread_group_leader(p) (p->pid == p->tgid)
+/* de_thread depends on thread_group_leader not being a pid based check */
+#define thread_group_leader(p) (p == p->group_leader)
-static inline task_t *next_thread(task_t *p)
+static inline task_t *next_thread(const task_t *p)
{
return list_entry(rcu_dereference(p->thread_group.next),
task_t, thread_group);
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
index 6336987dae62..2925e66a6732 100644
--- a/include/linux/screen_info.h
+++ b/include/linux/screen_info.h
@@ -41,7 +41,8 @@ struct screen_info {
u16 vesapm_off; /* 0x30 */
u16 pages; /* 0x32 */
u16 vesa_attributes; /* 0x34 */
- /* 0x36 -- 0x3f reserved for future expansion */
+ u32 capabilities; /* 0x36 */
+ /* 0x3a -- 0x3f reserved for future expansion */
};
extern struct screen_info screen_info;
diff --git a/include/linux/sdla_asy.h b/include/linux/sdla_asy.h
deleted file mode 100644
index f62242537c86..000000000000
--- a/include/linux/sdla_asy.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*****************************************************************************
-* sdla_asy.h Header file for the Sangoma S508/S514 asynchronous code API
-*
-* Author: Gideon Hack
-*
-* Copyright: (c) 2000 Sangoma Technologies Inc.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version
-* 2 of the License, or (at your option) any later version.
-* ============================================================================
-*
-* Jan 28, 2000 Gideon Hack Initial Version
-*
-*****************************************************************************/
-
-
-#ifndef _WANPIPE_ASYNC_H
-#define _WANPIPE_ASYNC_H
-
-/* ----------------------------------------------------------------------------
- * Interface commands
- * --------------------------------------------------------------------------*/
-
-#define SET_ASY_CONFIGURATION 0xE2 /* set the asychronous operational configuration */
-#define READ_ASY_CONFIGURATION 0xE3 /* read the current asychronous operational configuration */
-#define ENABLE_ASY_COMMUNICATIONS 0xE4 /* enable asychronous communications */
-#define DISABLE_ASY_COMMUNICATIONS 0xE5 /* disable asychronous communications */
-#define READ_ASY_OPERATIONAL_STATS 0xE7 /* retrieve the asychronous operational statistics */
-#define FLUSH_ASY_OPERATIONAL_STATS 0xE8 /* flush the asychronous operational statistics */
-#define TRANSMIT_ASY_BREAK_SIGNAL 0xEC /* transmit an asychronous break signal */
-
-
-
-/* ----------------------------------------------------------------------------
- * Return codes from interface commands
- * --------------------------------------------------------------------------*/
-
-#define COMMAND_INVALID_FOR_PORT 0x50 /* the command is invalid for the selected port */
-#define DISABLE_ASY_COMMS_BEFORE_CFG 0xE1 /* communications must be disabled before setting the configuration */
-#define ASY_COMMS_ENABLED 0xE1 /* communications are currently enabled */
-#define ASY_COMMS_DISABLED 0xE1 /* communications are currently disabled */
-#define ASY_CFG_BEFORE_COMMS_ENABLED 0xE2 /* perform a SET_ASY_CONFIGURATION before enabling comms */
-#define LGTH_ASY_CFG_DATA_INVALID 0xE2 /* the length of the passed configuration data is invalid */
-#define INVALID_ASY_CFG_DATA 0xE3 /* the passed configuration data is invalid */
-#define ASY_BREAK_SIGNAL_BUSY 0xEC /* a break signal is being transmitted */
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the SET_ASY_CONFIGURATION/READ_ASY_CONFIGURATION command
- * --------------------------------------------------------------------------*/
-
-/* the asynchronous configuration structure */
-typedef struct {
- unsigned long baud_rate PACKED; /* the baud rate */
- unsigned short line_config_options PACKED; /* line configuration options */
- unsigned short modem_config_options PACKED; /* modem configuration options */
- unsigned short asy_API_options PACKED; /* asynchronous API options */
- unsigned short asy_protocol_options PACKED; /* asynchronous protocol options */
- unsigned short Tx_bits_per_char PACKED; /* number of bits per tx character */
- unsigned short Rx_bits_per_char PACKED; /* number of bits per received character */
- unsigned short stop_bits PACKED; /* number of stop bits per character */
- unsigned short parity PACKED; /* parity definition */
- unsigned short break_timer PACKED; /* the break signal timer */
- unsigned short asy_Rx_inter_char_timer PACKED; /* the receive inter-character timer */
- unsigned short asy_Rx_complete_length PACKED; /* the receive 'buffer complete' length */
- unsigned short XON_char PACKED; /* the XON character */
- unsigned short XOFF_char PACKED; /* the XOFF character */
- unsigned short asy_statistics_options PACKED; /* async operational stat options */
- unsigned long ptr_shared_mem_info_struct PACKED;/* ptr to the shared memory area information structure */
- unsigned long ptr_asy_Tx_stat_el_cfg_struct PACKED;/* ptr to the transmit status element configuration structure */
- unsigned long ptr_asy_Rx_stat_el_cfg_struct PACKED;/* ptr to the receive status element configuration structure */
-} ASY_CONFIGURATION_STRUCT;
-
-/* permitted minimum and maximum values for setting the asynchronous configuration */
-#define MIN_ASY_BAUD_RATE 50 /* maximum baud rate */
-#define MAX_ASY_BAUD_RATE 250000 /* minimum baud rate */
-#define MIN_ASY_BITS_PER_CHAR 5 /* minimum number of bits per character */
-#define MAX_ASY_BITS_PER_CHAR 8 /* maximum number of bits per character */
-#define MIN_BREAK_TMR_VAL 0 /* minimum break signal timer */
-#define MAX_BREAK_TMR_VAL 5000 /* maximum break signal timer */
-#define MIN_ASY_RX_INTER_CHAR_TMR 0 /* minimum receive inter-character timer */
-#define MAX_ASY_RX_INTER_CHAR_TMR 30000 /* maximum receive inter-character timer */
-#define MIN_ASY_RX_CPLT_LENGTH 0 /* minimum receive 'length complete' value */
-#define MAX_ASY_RX_CPLT_LENGTH 2000 /* maximum receive 'length complete' value */
-
-/* bit settings for the 'asy_API_options' */
-#define ASY_RX_DATA_TRANSPARENT 0x0001 /* do not strip parity and unused bits from received characters */
-
-/* bit settings for the 'asy_protocol_options' */
-#define ASY_RTS_HS_FOR_RX 0x0001 /* RTS handshaking is used for reception control */
-#define ASY_XON_XOFF_HS_FOR_RX 0x0002 /* XON/XOFF handshaking is used for reception control */
-#define ASY_XON_XOFF_HS_FOR_TX 0x0004 /* XON/XOFF handshaking is used for transmission control */
-#define ASY_DCD_HS_FOR_TX 0x0008 /* DCD handshaking is used for transmission control */
-#define ASY_CTS_HS_FOR_TX 0x0020 /* CTS handshaking is used for transmission control */
-
-/* bit settings for the 'stop_bits' definition */
-#define ONE_STOP_BIT 1 /* representation for 1 stop bit */
-#define TWO_STOP_BITS 2 /* representation for 2 stop bits */
-#define ONE_AND_A_HALF_STOP_BITS 3 /* representation for 1.5 stop bits */
-
-/* bit settings for the 'parity' definition */
-#define NO_PARITY 0 /* representation for no parity */
-#define ODD_PARITY 1 /* representation for odd parity */
-#define EVEN_PARITY 2 /* representation for even parity */
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the READ_COMMS_ERROR_STATS command (asynchronous mode)
- * --------------------------------------------------------------------------*/
-
-/* the communications error statistics structure */
-typedef struct {
- unsigned short Rx_overrun_err_count PACKED; /* receiver overrun error count */
- unsigned short Rx_parity_err_count PACKED; /* parity errors received count */
- unsigned short Rx_framing_err_count PACKED; /* framing errors received count */
- unsigned short comms_err_stat_reserved_1 PACKED;/* reserved for later use */
- unsigned short comms_err_stat_reserved_2 PACKED;/* reserved for later use */
- unsigned short comms_err_stat_reserved_3 PACKED;/* reserved for later use */
- unsigned short comms_err_stat_reserved_4 PACKED;/* reserved for later use */
- unsigned short comms_err_stat_reserved_5 PACKED;/* reserved for later use */
- unsigned short DCD_state_change_count PACKED; /* DCD state change count */
- unsigned short CTS_state_change_count PACKED; /* CTS state change count */
-} ASY_COMMS_ERROR_STATS_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the READ_ASY_OPERATIONAL_STATS command
- * --------------------------------------------------------------------------*/
-
-/* the asynchronous operational statistics structure */
-typedef struct {
-
- /* Data transmission statistics */
- unsigned long Data_blocks_Tx_count PACKED;/* number of blocks transmitted */
- unsigned long Data_bytes_Tx_count PACKED;/* number of bytes transmitted */
- unsigned long Data_Tx_throughput PACKED;/* transmit throughput */
- unsigned long no_ms_for_Data_Tx_thruput_comp PACKED;/* millisecond time used for the Tx throughput computation */
- unsigned long Tx_Data_discard_lgth_err_count PACKED;/* number of Data blocks discarded (length error) */
- unsigned long reserved_Data_frm_Tx_stat1 PACKED;/* reserved for later use */
- unsigned long reserved_Data_frm_Tx_stat2 PACKED;/* reserved for later use */
- unsigned long reserved_Data_frm_Tx_stat3 PACKED;/* reserved for later use */
-
- /* Data reception statistics */
- unsigned long Data_blocks_Rx_count PACKED;/* number of blocks received */
- unsigned long Data_bytes_Rx_count PACKED;/* number of bytes received */
- unsigned long Data_Rx_throughput PACKED;/* receive throughput */
- unsigned long no_ms_for_Data_Rx_thruput_comp PACKED;/* millisecond time used for the Rx throughput computation */
- unsigned long Rx_Data_bytes_discard_count PACKED;/* received Data bytes discarded */
- unsigned long reserved_Data_frm_Rx_stat1 PACKED;/* reserved for later use */
-
- /* handshaking protocol statistics */
- unsigned short XON_chars_Tx_count PACKED; /* number of XON characters transmitted */
- unsigned short XOFF_chars_Tx_count PACKED; /* number of XOFF characters transmitted */
- unsigned short XON_chars_Rx_count PACKED; /* number of XON characters received */
- unsigned short XOFF_chars_Rx_count PACKED; /* number of XOFF characters received */
- unsigned short Tx_halt_modem_low_count PACKED; /* number of times Tx halted (modem line low) */
- unsigned short Rx_halt_RTS_low_count PACKED; /* number of times Rx halted by setting RTS low */
- unsigned long reserved_handshaking_stat1 PACKED;/* reserved for later use */
-
- /* break statistics */
- unsigned short break_Tx_count PACKED; /* number of break sequences transmitted */
- unsigned short break_Rx_count PACKED; /* number of break sequences received */
- unsigned long reserved_break_stat1 PACKED;/* reserved for later use */
-
- /* miscellaneous statistics */
- unsigned long reserved_misc_stat1 PACKED; /* reserved for later use */
- unsigned long reserved_misc_stat2 PACKED; /* reserved for later use */
-
-} ASY_OPERATIONAL_STATS_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for Data transmission
- * --------------------------------------------------------------------------*/
-
-/* the Data block transmit status element configuration structure */
-typedef struct {
- unsigned short number_Tx_status_elements PACKED; /* number of transmit status elements */
- unsigned long base_addr_Tx_status_elements PACKED; /* base address of the transmit element list */
- unsigned long next_Tx_status_element_to_use PACKED; /* pointer to the next transmit element to be used */
-} ASY_TX_STATUS_EL_CFG_STRUCT;
-
-
-/* the Data block transmit status element structure */
-typedef struct {
- unsigned char opp_flag PACKED; /* opp flag */
- unsigned short data_length PACKED; /* length of the block to be transmitted */
- unsigned char reserved_1 PACKED; /* reserved for internal use */
- unsigned long reserved_2 PACKED; /* reserved for internal use */
- unsigned long reserved_3 PACKED; /* reserved for internal use */
- unsigned long ptr_data_bfr PACKED; /* pointer to the data area */
-} ASY_DATA_TX_STATUS_EL_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for Data reception
- * --------------------------------------------------------------------------*/
-
-/* the Data block receive status element configuration structure */
-typedef struct {
- unsigned short number_Rx_status_elements PACKED;/* number of receive status elements */
- unsigned long base_addr_Rx_status_elements PACKED;/* base address of the receive element list */
- unsigned long next_Rx_status_element_to_use PACKED;/* pointer to the next receive element to be used */
- unsigned long base_addr_Rx_buffer PACKED;/* base address of the receive data buffer */
- unsigned long end_addr_Rx_buffer PACKED;/* end address of the receive data buffer */
-} ASY_RX_STATUS_EL_CFG_STRUCT;
-
-/* the Data block receive status element structure */
-typedef struct {
- unsigned char opp_flag PACKED; /* opp flag */
- unsigned short data_length PACKED; /* length of the received data block */
- unsigned char reserved_1 PACKED; /* reserved for internal use */
- unsigned short time_stamp PACKED; /* receive time stamp (HDLC_STREAMING_MODE) */
- unsigned short data_buffered PACKED; /* the number of data bytes still buffered */
- unsigned long reserved_2 PACKED; /* reserved for internal use */
- unsigned long ptr_data_bfr PACKED; /* pointer to the data area */
-} ASY_DATA_RX_STATUS_EL_STRUCT;
-
-#endif
diff --git a/include/linux/sdla_chdlc.h b/include/linux/sdla_chdlc.h
deleted file mode 100644
index d2e35a299034..000000000000
--- a/include/linux/sdla_chdlc.h
+++ /dev/null
@@ -1,813 +0,0 @@
-/*************************************************************************
- sdla_chdlc.h Sangoma Cisco HDLC firmware API definitions
-
- Author: Gideon Hack
- Nenad Corbic <ncorbic@sangoma.com>
-
- Copyright: (c) 1995-2000 Sangoma Technologies Inc.
-
- This program is free software; you can redistribute it and/or
- modify it under the term of the GNU General Public License
- as published by the Free Software Foundation; either version
- 2 of the License, or (at your option) any later version.
-
-===========================================================================
- Oct 04, 1999 Nenad Corbic Updated API support
- Jun 02, 1999 Gideon Hack Changes for S514 usage.
- Oct 28, 1998 Jaspreet Singh Made changes for Dual Port CHDLC.
- Jun 11, 1998 David Fong Initial version.
-===========================================================================
-
- Organization
- - Compatibility notes
- - Constants defining the shared memory control block (mailbox)
- - Interface commands
- - Return code from interface commands
- - Constants for the commands (structures for casting data)
- - UDP Management constants and structures
-
-*************************************************************************/
-
-#ifndef _SDLA_CHDLC_H
-# define _SDLC_CHDLC_H
-
-/*------------------------------------------------------------------------
- Notes:
-
- All structres defined in this file are byte-aligned.
-
- Compiler Platform
- ------------------------
- GNU C Linux
-
-------------------------------------------------------------------------*/
-
-#ifndef PACKED
-#define PACKED __attribute__((packed))
-#endif /* PACKED */
-
-
-/* ----------------------------------------------------------------------------
- * Constants defining the shared memory control block (mailbox)
- * --------------------------------------------------------------------------*/
-
-#define PRI_BASE_ADDR_MB_STRUCT 0xE000 /* the base address of the mailbox structure on the adapter */
-#define SEC_BASE_ADDR_MB_STRUCT 0xE800 /* the base address of the mailbox structure on the adapter */
-#define SIZEOF_MB_DATA_BFR 2032 /* the size of the actual mailbox data area */
-#define NUMBER_MB_RESERVED_BYTES 0x0B /* the number of reserved bytes in the mailbox header area */
-
-
-#define MIN_LGTH_CHDLC_DATA_CFG 300 /* min length of the CHDLC data field (for configuration purposes) */
-#define PRI_MAX_NO_DATA_BYTES_IN_FRAME 15354 /* PRIMARY - max length of the CHDLC data field */
-
-typedef struct {
- unsigned char opp_flag PACKED; /* the opp flag */
- unsigned char command PACKED; /* the user command */
- unsigned short buffer_length PACKED; /* the data length */
- unsigned char return_code PACKED; /* the return code */
- unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; /* reserved for later */
- unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; /* the data area */
-} CHDLC_MAILBOX_STRUCT;
-
-typedef struct {
- pid_t pid_num PACKED;
- CHDLC_MAILBOX_STRUCT cmdarea PACKED;
-
-} CMDBLOCK_STRUCT;
-
-
-
-
-/* ----------------------------------------------------------------------------
- * Interface commands
- * --------------------------------------------------------------------------*/
-
-/* global interface commands */
-#define READ_GLOBAL_EXCEPTION_CONDITION 0x01
-#define SET_GLOBAL_CONFIGURATION 0x02
-#define READ_GLOBAL_CONFIGURATION 0x03
-#define READ_GLOBAL_STATISTICS 0x04
-#define FLUSH_GLOBAL_STATISTICS 0x05
-#define SET_MODEM_STATUS 0x06 /* set status of DTR or RTS */
-#define READ_MODEM_STATUS 0x07 /* read status of CTS and DCD */
-#define READ_COMMS_ERROR_STATS 0x08
-#define FLUSH_COMMS_ERROR_STATS 0x09
-#define SET_TRACE_CONFIGURATION 0x0A /* set the line trace config */
-#define READ_TRACE_CONFIGURATION 0x0B /* read the line trace config */
-#define READ_TRACE_STATISTICS 0x0C /* read the trace statistics */
-#define FLUSH_TRACE_STATISTICS 0x0D /* flush the trace statistics */
-#define FT1_MONITOR_STATUS_CTRL 0x1C /* set the status of the S508/FT1 monitoring */
-#define SET_FT1_CONFIGURATION 0x18 /* set the FT1 configuration */
-#define READ_FT1_CONFIGURATION 0x19 /* read the FT1 configuration */
-#define TRANSMIT_ASYNC_DATA_TO_FT1 0x1A /* output asynchronous data to the FT1 */
-#define RECEIVE_ASYNC_DATA_FROM_FT1 0x1B /* receive asynchronous data from the FT1 */
-#define FT1_MONITOR_STATUS_CTRL 0x1C /* set the status of the FT1 monitoring */
-
-#define READ_FT1_OPERATIONAL_STATS 0x1D /* read the S508/FT1 operational statistics */
-#define SET_FT1_MODE 0x1E /* set the operational mode of the S508/FT1 module */
-
-/* CHDLC-level interface commands */
-#define READ_CHDLC_CODE_VERSION 0x20
-#define READ_CHDLC_EXCEPTION_CONDITION 0x21 /* read exception condition from the adapter */
-#define SET_CHDLC_CONFIGURATION 0x22
-#define READ_CHDLC_CONFIGURATION 0x23
-#define ENABLE_CHDLC_COMMUNICATIONS 0x24
-#define DISABLE_CHDLC_COMMUNICATIONS 0x25
-#define READ_CHDLC_LINK_STATUS 0x26
-#define READ_CHDLC_OPERATIONAL_STATS 0x27
-#define FLUSH_CHDLC_OPERATIONAL_STATS 0x28
-#define SET_CHDLC_INTERRUPT_TRIGGERS 0x30 /* set application interrupt triggers */
-#define READ_CHDLC_INTERRUPT_TRIGGERS 0x31 /* read application interrupt trigger configuration */
-
-/* Special UDP drivers management commands */
-#define CPIPE_ENABLE_TRACING 0x50
-#define CPIPE_DISABLE_TRACING 0x51
-#define CPIPE_GET_TRACE_INFO 0x52
-#define CPIPE_GET_IBA_DATA 0x53
-#define CPIPE_FT1_READ_STATUS 0x54
-#define CPIPE_DRIVER_STAT_IFSEND 0x55
-#define CPIPE_DRIVER_STAT_INTR 0x56
-#define CPIPE_DRIVER_STAT_GEN 0x57
-#define CPIPE_FLUSH_DRIVER_STATS 0x58
-#define CPIPE_ROUTER_UP_TIME 0x59
-
-/* Driver specific commands for API */
-#define CHDLC_READ_TRACE_DATA 0xE4 /* read trace data */
-#define TRACE_ALL 0x00
-#define TRACE_PROT 0x01
-#define TRACE_DATA 0x02
-
-#define DISCARD_RX_ERROR_FRAMES 0x0001
-
-/* ----------------------------------------------------------------------------
- * Return codes from interface commands
- * --------------------------------------------------------------------------*/
-
-#define COMMAND_OK 0x00
-
-/* return codes from global interface commands */
-#define NO_GLOBAL_EXCEP_COND_TO_REPORT 0x01 /* there is no CHDLC exception condition to report */
-#define LGTH_GLOBAL_CFG_DATA_INVALID 0x01 /* the length of the passed global configuration data is invalid */
-#define LGTH_TRACE_CFG_DATA_INVALID 0x01 /* the length of the passed trace configuration data is invalid */
-#define IRQ_TIMEOUT_VALUE_INVALID 0x02 /* an invalid application IRQ timeout value was selected */
-#define TRACE_CONFIG_INVALID 0x02 /* the passed line trace configuration is invalid */
-#define ADAPTER_OPERATING_FREQ_INVALID 0x03 /* an invalid adapter operating frequency was selected */
-#define TRC_DEAC_TMR_INVALID 0x03 /* the trace deactivation timer is invalid */
-#define S508_FT1_ADPTR_NOT_PRESENT 0x0C /* the S508/FT1 adapter is not present */
-#define INVALID_FT1_STATUS_SELECTION 0x0D /* the S508/FT1 status selection is invalid */
-#define FT1_OP_STATS_NOT_ENABLED 0x0D /* the FT1 operational statistics have not been enabled */
-#define FT1_OP_STATS_NOT_AVAILABLE 0x0E /* the FT1 operational statistics are not currently available */
-#define S508_FT1_MODE_SELECTION_BUSY 0x0E /* the S508/FT1 adapter is busy selecting the operational mode */
-
-/* return codes from command READ_GLOBAL_EXCEPTION_CONDITION */
-#define EXCEP_MODEM_STATUS_CHANGE 0x10 /* a modem status change occurred */
-#define EXCEP_TRC_DISABLED 0x11 /* the trace has been disabled */
-#define EXCEP_IRQ_TIMEOUT 0x12 /* IRQ timeout */
-
-/* return codes from CHDLC-level interface commands */
-#define NO_CHDLC_EXCEP_COND_TO_REPORT 0x21 /* there is no CHDLC exception condition to report */
-#define CHDLC_COMMS_DISABLED 0x21 /* communications are not currently enabled */
-#define CHDLC_COMMS_ENABLED 0x21 /* communications are currently enabled */
-#define DISABLE_CHDLC_COMMS_BEFORE_CFG 0x21 /* CHDLC communications must be disabled before setting the configuration */
-#define ENABLE_CHDLC_COMMS_BEFORE_CONN 0x21 /* communications must be enabled before using the CHDLC_CONNECT conmmand */
-#define CHDLC_CFG_BEFORE_COMMS_ENABLED 0x22 /* perform a SET_CHDLC_CONFIGURATION before enabling comms */
-#define LGTH_CHDLC_CFG_DATA_INVALID 0x22 /* the length of the passed CHDLC configuration data is invalid */
-#define LGTH_INT_TRIGGERS_DATA_INVALID 0x22 /* the length of the passed interrupt trigger data is invalid */
-#define INVALID_IRQ_SELECTED 0x23 /* in invalid IRQ was selected in the SET_CHDLC_INTERRUPT_TRIGGERS */
-#define INVALID_CHDLC_CFG_DATA 0x23 /* the passed CHDLC configuration data is invalid */
-#define IRQ_TMR_VALUE_INVALID 0x24 /* an invalid application IRQ timer value was selected */
-#define LARGER_PERCENT_TX_BFR_REQUIRED 0x24 /* a larger Tx buffer percentage is required */
-#define LARGER_PERCENT_RX_BFR_REQUIRED 0x25 /* a larger Rx buffer percentage is required */
-#define S514_BOTH_PORTS_SAME_CLK_MODE 0x26 /* S514 - both ports must have same clock mode */
-#define INVALID_CMND_HDLC_STREAM_MODE 0x4E /* the CHDLC interface command is invalid for HDLC streaming mode */
-#define INVALID_CHDLC_COMMAND 0x4F /* the defined CHDLC interface command is invalid */
-
-/* return codes from command READ_CHDLC_EXCEPTION_CONDITION */
-#define EXCEP_LINK_ACTIVE 0x30 /* the CHDLC link has become active */
-#define EXCEP_LINK_INACTIVE_MODEM 0x31 /* the CHDLC link has become inactive (modem status) */
-#define EXCEP_LINK_INACTIVE_KPALV 0x32 /* the CHDLC link has become inactive (keepalive status) */
-#define EXCEP_IP_ADDRESS_DISCOVERED 0x33 /* the IP address has been discovered */
-#define EXCEP_LOOPBACK_CONDITION 0x34 /* a loopback condition has occurred */
-
-
-/* return code from command CHDLC_SEND_WAIT and CHDLC_SEND_NO_WAIT */
-#define LINK_DISCONNECTED 0x21
-#define NO_TX_BFRS_AVAIL 0x24
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the SET_GLOBAL_CONFIGURATION/READ_GLOBAL_CONFIGURATION commands
- * --------------------------------------------------------------------------*/
-
-/* the global configuration structure */
-typedef struct {
- unsigned short adapter_config_options PACKED; /* adapter config options */
- unsigned short app_IRQ_timeout PACKED; /* application IRQ timeout */
- unsigned long adapter_operating_frequency PACKED; /* adapter operating frequency */
-} GLOBAL_CONFIGURATION_STRUCT;
-
-/* settings for the 'app_IRQ_timeout' */
-#define MAX_APP_IRQ_TIMEOUT_VALUE 5000 /* the maximum permitted IRQ timeout */
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the READ_GLOBAL_STATISTICS command
- * --------------------------------------------------------------------------*/
-
-/* the global statistics structure */
-typedef struct {
- unsigned short app_IRQ_timeout_count PACKED;
-} GLOBAL_STATS_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the READ_COMMS_ERROR_STATS command
- * --------------------------------------------------------------------------*/
-
-/* the communications error statistics structure */
-typedef struct {
- unsigned short Rx_overrun_err_count PACKED;
- unsigned short CRC_err_count PACKED; /* receiver CRC error count */
- unsigned short Rx_abort_count PACKED; /* abort frames recvd count */
- unsigned short Rx_dis_pri_bfrs_full_count PACKED;/* receiver disabled */
- unsigned short comms_err_stat_reserved_1 PACKED;/* reserved for later */
- unsigned short sec_Tx_abort_msd_Tx_int_count PACKED; /* secondary - abort frames transmitted count (missed Tx interrupt) */
- unsigned short missed_Tx_und_int_count PACKED; /* missed tx underrun interrupt count */
- unsigned short sec_Tx_abort_count PACKED; /*secondary-abort frames tx count */
- unsigned short DCD_state_change_count PACKED; /* DCD state change */
- unsigned short CTS_state_change_count PACKED; /* CTS state change */
-} COMMS_ERROR_STATS_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants used for line tracing
- * --------------------------------------------------------------------------*/
-
-/* the trace configuration structure (SET_TRACE_CONFIGURATION/READ_TRACE_CONFIGURATION commands) */
-typedef struct {
- unsigned char trace_config PACKED; /* trace configuration */
- unsigned short trace_deactivation_timer PACKED; /* trace deactivation timer */
- unsigned long ptr_trace_stat_el_cfg_struct PACKED; /* a pointer to the line trace element configuration structure */
-} LINE_TRACE_CONFIG_STRUCT;
-
-/* 'trace_config' bit settings */
-#define TRACE_INACTIVE 0x00 /* trace is inactive */
-#define TRACE_ACTIVE 0x01 /* trace is active */
-#define TRACE_DELAY_MODE 0x04 /* operate the trace in delay mode */
-#define TRACE_DATA_FRAMES 0x08 /* trace Data frames */
-#define TRACE_SLARP_FRAMES 0x10 /* trace SLARP frames */
-#define TRACE_CDP_FRAMES 0x20 /* trace CDP frames */
-
-/* the line trace status element configuration structure */
-typedef struct {
- unsigned short number_trace_status_elements PACKED; /* number of line trace elements */
- unsigned long base_addr_trace_status_elements PACKED; /* base address of the trace element list */
- unsigned long next_trace_element_to_use PACKED; /* pointer to the next trace element to be used */
- unsigned long base_addr_trace_buffer PACKED; /* base address of the trace data buffer */
- unsigned long end_addr_trace_buffer PACKED; /* end address of the trace data buffer */
-} TRACE_STATUS_EL_CFG_STRUCT;
-
-/* the line trace status element structure */
-typedef struct {
- unsigned char opp_flag PACKED; /* opp flag */
- unsigned short trace_length PACKED; /* trace length */
- unsigned char trace_type PACKED; /* trace type */
- unsigned short trace_time_stamp PACKED; /* time stamp */
- unsigned short trace_reserved_1 PACKED; /* reserved for later use */
- unsigned long trace_reserved_2 PACKED; /* reserved for later use */
- unsigned long ptr_data_bfr PACKED; /* ptr to the trace data buffer */
-} TRACE_STATUS_ELEMENT_STRUCT;
-
-/* "trace_type" bit settings */
-#define TRACE_INCOMING 0x00
-#define TRACE_OUTGOINGING 0x01
-#define TRACE_INCOMING_ABORTED 0x10
-#define TRACE_INCOMING_CRC_ERROR 0x20
-#define TRACE_INCOMING_OVERRUN_ERROR 0x40
-
-
-
-/* the line trace statistics structure */
-typedef struct {
- unsigned long frames_traced_count PACKED; /* number of frames traced */
- unsigned long trc_frms_not_recorded_count PACKED; /* number of trace frames discarded */
-} LINE_TRACE_STATS_STRUCT;
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the FT1_MONITOR_STATUS_CTRL command
- * --------------------------------------------------------------------------*/
-
-#define DISABLE_FT1_STATUS_STATISTICS 0x00 /* disable the FT1 status and statistics monitoring */
-#define ENABLE_READ_FT1_STATUS 0x01 /* read the FT1 operational status */
-#define ENABLE_READ_FT1_OP_STATS 0x02 /* read the FT1 operational statistics */
-#define FLUSH_FT1_OP_STATS 0x04 /* flush the FT1 operational statistics */
-
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the SET_CHDLC_CONFIGURATION command
- * --------------------------------------------------------------------------*/
-
-/* the CHDLC configuration structure */
-typedef struct {
- unsigned long baud_rate PACKED; /* the baud rate */
- unsigned short line_config_options PACKED; /* line configuration options */
- unsigned short modem_config_options PACKED; /* modem configration options */
- unsigned short modem_status_timer PACKED; /* timer for monitoring modem status changes */
- unsigned short CHDLC_API_options PACKED; /* CHDLC API options */
- unsigned short CHDLC_protocol_options PACKED; /* CHDLC protocol options */
- unsigned short percent_data_buffer_for_Tx PACKED; /* percentage data buffering used for Tx */
- unsigned short CHDLC_statistics_options PACKED; /* CHDLC operational statistics options */
- unsigned short max_CHDLC_data_field_length PACKED; /* the maximum length of the CHDLC Data field */
- unsigned short transmit_keepalive_timer PACKED; /* the transmit keepalive timer */
- unsigned short receive_keepalive_timer PACKED; /* the receive keepalive timer */
- unsigned short keepalive_error_tolerance PACKED; /* the receive keepalive error tolerance */
- unsigned short SLARP_request_timer PACKED; /* the SLARP request timer */
- unsigned long IP_address PACKED; /* the IP address */
- unsigned long IP_netmask PACKED; /* the IP netmask */
- unsigned long ptr_shared_mem_info_struct PACKED; /* a pointer to the shared memory area information structure */
- unsigned long ptr_CHDLC_Tx_stat_el_cfg_struct PACKED; /* a pointer to the transmit status element configuration structure */
- unsigned long ptr_CHDLC_Rx_stat_el_cfg_struct PACKED; /* a pointer to the receive status element configuration structure */
-} CHDLC_CONFIGURATION_STRUCT;
-
-/* settings for the 'line_config_options' */
-#define INTERFACE_LEVEL_V35 0x0000 /* V.35 interface level */
-#define INTERFACE_LEVEL_RS232 0x0001 /* RS-232 interface level */
-
-/* settings for the 'modem_config_options' */
-
-#define DONT_RAISE_DTR_RTS_ON_EN_COMMS 0x0001
-/* don't automatically raise DTR and RTS when performing an
- ENABLE_CHDLC_COMMUNICATIONS command */
-
-#define DONT_REPORT_CHG_IN_MODEM_STAT 0x0002
-/* don't report changes in modem status to the application */
-
-
-/* bit settings for the 'CHDLC_protocol_options' byte */
-
-#define IGNORE_DCD_FOR_LINK_STAT 0x0001
-/* ignore DCD in determining the CHDLC link status */
-
-#define IGNORE_CTS_FOR_LINK_STAT 0x0002
-/* ignore CTS in determining the CHDLC link status */
-
-#define IGNORE_KPALV_FOR_LINK_STAT 0x0004
-/* ignore keepalive frames in determining the CHDLC link status */
-
-#define SINGLE_TX_BUFFER 0x4000
-/* configure a single transmit buffer */
-
-#define HDLC_STREAMING_MODE 0x8000
-
-/* settings for the 'CHDLC_statistics_options' */
-
-#define CHDLC_TX_DATA_BYTE_COUNT_STAT 0x0001
-/* record the number of Data bytes transmitted */
-
-#define CHDLC_RX_DATA_BYTE_COUNT_STAT 0x0002
-/* record the number of Data bytes received */
-
-#define CHDLC_TX_THROUGHPUT_STAT 0x0004
-/* compute the Data frame transmit throughput */
-
-#define CHDLC_RX_THROUGHPUT_STAT 0x0008
-/* compute the Data frame receive throughput */
-
-
-/* permitted minimum and maximum values for setting the CHDLC configuration */
-#define PRI_MAX_BAUD_RATE_S508 2666666 /* PRIMARY - maximum baud rate (S508) */
-#define SEC_MAX_BAUD_RATE_S508 258064 /* SECONDARY - maximum baud rate (S508) */
-#define PRI_MAX_BAUD_RATE_S514 2750000 /* PRIMARY - maximum baud rate (S508) */
-#define SEC_MAX_BAUD_RATE_S514 515625 /* SECONDARY - maximum baud rate (S508) */
-
-#define MIN_MODEM_TIMER 0 /* minimum modem status timer */
-#define MAX_MODEM_TIMER 5000 /* maximum modem status timer */
-
-#define SEC_MAX_NO_DATA_BYTES_IN_FRAME 2048 /* SECONDARY - max length of the CHDLC data field */
-
-#define MIN_Tx_KPALV_TIMER 0 /* minimum transmit keepalive timer */
-#define MAX_Tx_KPALV_TIMER 60000 /* maximum transmit keepalive timer */
-#define DEFAULT_Tx_KPALV_TIMER 10000 /* default transmit keepalive timer */
-
-#define MIN_Rx_KPALV_TIMER 10 /* minimum receive keepalive timer */
-#define MAX_Rx_KPALV_TIMER 60000 /* maximum receive keepalive timer */
-#define DEFAULT_Rx_KPALV_TIMER 10000 /* default receive keepalive timer */
-
-#define MIN_KPALV_ERR_TOL 1 /* min kpalv error tolerance count */
-#define MAX_KPALV_ERR_TOL 20 /* max kpalv error tolerance count */
-#define DEFAULT_KPALV_ERR_TOL 3 /* default value */
-
-#define MIN_SLARP_REQ_TIMER 0 /* min transmit SLARP Request timer */
-#define MAX_SLARP_REQ_TIMER 60000 /* max transmit SLARP Request timer */
-#define DEFAULT_SLARP_REQ_TIMER 0 /* default value -- no SLARP */
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the READ_CHDLC_LINK_STATUS command
- * --------------------------------------------------------------------------*/
-
-/* the CHDLC status structure */
-typedef struct {
- unsigned char CHDLC_link_status PACKED; /* CHDLC link status */
- unsigned char no_Data_frms_for_app PACKED; /* number of Data frames available for the application */
- unsigned char receiver_status PACKED; /* enabled/disabled */
- unsigned char SLARP_state PACKED; /* internal SLARP state */
-} CHDLC_LINK_STATUS_STRUCT;
-
-/* settings for the 'CHDLC_link_status' variable */
-#define CHDLC_LINK_INACTIVE 0x00 /* the CHDLC link is inactive */
-#define CHDLC_LINK_ACTIVE 0x01 /* the CHDLC link is active */
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for the READ_CHDLC_OPERATIONAL_STATS command
- * --------------------------------------------------------------------------*/
-
-/* the CHDLC operational statistics structure */
-typedef struct {
-
- /* Data frame transmission statistics */
- unsigned long Data_frames_Tx_count PACKED; /* # of frames transmitted */
- unsigned long Data_bytes_Tx_count PACKED; /* # of bytes transmitted */
- unsigned long Data_Tx_throughput PACKED; /* transmit throughput */
- unsigned long no_ms_for_Data_Tx_thruput_comp PACKED; /* millisecond time used for the Tx throughput computation */
- unsigned long Tx_Data_discard_lgth_err_count PACKED; /* number of Data frames discarded (length error) */
- unsigned long reserved_Data_frm_Tx_stat1 PACKED; /* reserved for later */
- unsigned long reserved_Data_frm_Tx_stat2 PACKED; /* reserved for later */
- unsigned long reserved_Data_frm_Tx_stat3 PACKED; /* reserved for later */
-
- /* Data frame reception statistics */
- unsigned long Data_frames_Rx_count PACKED; /* number of frames received */
- unsigned long Data_bytes_Rx_count PACKED; /* number of bytes received */
- unsigned long Data_Rx_throughput PACKED; /* receive throughput */
- unsigned long no_ms_for_Data_Rx_thruput_comp PACKED; /* millisecond time used for the Rx throughput computation */
- unsigned long Rx_Data_discard_short_count PACKED; /* received Data frames discarded (too short) */
- unsigned long Rx_Data_discard_long_count PACKED; /* received Data frames discarded (too long) */
- unsigned long Rx_Data_discard_inactive_count PACKED; /* received Data frames discarded (link inactive) */
- unsigned long reserved_Data_frm_Rx_stat1 PACKED; /* reserved for later */
-
- /* SLARP frame transmission/reception statistics */
- unsigned long CHDLC_SLARP_REQ_Tx_count PACKED; /* number of SLARP Request frames transmitted */
- unsigned long CHDLC_SLARP_REQ_Rx_count PACKED; /* number of SLARP Request frames received */
- unsigned long CHDLC_SLARP_REPLY_Tx_count PACKED; /* number of SLARP Reply frames transmitted */
- unsigned long CHDLC_SLARP_REPLY_Rx_count PACKED; /* number of SLARP Reply frames received */
- unsigned long CHDLC_SLARP_KPALV_Tx_count PACKED; /* number of SLARP keepalive frames transmitted */
- unsigned long CHDLC_SLARP_KPALV_Rx_count PACKED; /* number of SLARP keepalive frames received */
- unsigned long reserved_SLARP_stat1 PACKED; /* reserved for later */
- unsigned long reserved_SLARP_stat2 PACKED; /* reserved for later */
-
- /* CDP frame transmission/reception statistics */
- unsigned long CHDLC_CDP_Tx_count PACKED; /* number of CDP frames transmitted */
- unsigned long CHDLC_CDP_Rx_count PACKED; /* number of CDP frames received */
- unsigned long reserved_CDP_stat1 PACKED; /* reserved for later */
- unsigned long reserved_CDP_stat2 PACKED; /* reserved for later */
- unsigned long reserved_CDP_stat3 PACKED; /* reserved for later */
- unsigned long reserved_CDP_stat4 PACKED; /* reserved for later */
- unsigned long reserved_CDP_stat5 PACKED; /* reserved for later */
- unsigned long reserved_CDP_stat6 PACKED; /* reserved for later */
-
- /* Incoming frames with a format error statistics */
- unsigned short Rx_frm_incomp_CHDLC_hdr_count PACKED; /* frames received of with incomplete Cisco HDLC header */
- unsigned short Rx_frms_too_long_count PACKED; /* frames received of excessive length count */
- unsigned short Rx_invalid_CHDLC_addr_count PACKED; /* frames received with an invalid CHDLC address count */
- unsigned short Rx_invalid_CHDLC_ctrl_count PACKED; /* frames received with an invalid CHDLC control field count */
- unsigned short Rx_invalid_CHDLC_type_count PACKED; /* frames received of an invalid CHDLC frame type count */
- unsigned short Rx_SLARP_invalid_code_count PACKED; /* SLARP frame received with an invalid packet code */
- unsigned short Rx_SLARP_Reply_bad_IP_addr PACKED; /* SLARP Reply received - bad IP address */
- unsigned short Rx_SLARP_Reply_bad_netmask PACKED; /* SLARP Reply received - bad netmask */
- unsigned long reserved_frm_format_err1 PACKED; /* reserved for later */
- unsigned long reserved_frm_format_err2 PACKED; /* reserved for later */
- unsigned long reserved_frm_format_err3 PACKED; /* reserved for later */
- unsigned long reserved_frm_format_err4 PACKED; /* reserved for later */
-
- /* CHDLC timeout/retry statistics */
- unsigned short SLARP_Rx_keepalive_TO_count PACKED; /* timeout count for incoming SLARP frames */
- unsigned short SLARP_Request_TO_count PACKED; /* timeout count for SLARP Request frames */
- unsigned long To_retry_reserved_stat1 PACKED; /* reserved for later */
- unsigned long To_retry_reserved_stat2 PACKED; /* reserved for later */
- unsigned long To_retry_reserved_stat3 PACKED; /* reserved for later */
-
- /* CHDLC link active/inactive and loopback statistics */
- unsigned short link_active_count PACKED; /* number of times that the link went active */
- unsigned short link_inactive_modem_count PACKED; /* number of times that the link went inactive (modem failure) */
- unsigned short link_inactive_keepalive_count PACKED; /* number of times that the link went inactive (keepalive failure) */
- unsigned short link_looped_count PACKED; /* link looped count */
- unsigned long link_status_reserved_stat1 PACKED; /* reserved for later use */
- unsigned long link_status_reserved_stat2 PACKED; /* reserved for later use */
-
- /* miscellaneous statistics */
- unsigned long reserved_misc_stat1 PACKED; /* reserved for later */
- unsigned long reserved_misc_stat2 PACKED; /* reserved for later */
- unsigned long reserved_misc_stat3 PACKED; /* reserved for later */
- unsigned long reserved_misc_stat4 PACKED; /* reserved for later */
-
-} CHDLC_OPERATIONAL_STATS_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for using application interrupts
- * --------------------------------------------------------------------------*/
-
-/* the structure used for the SET_CHDLC_INTERRUPT_TRIGGERS/READ_CHDLC_INTERRUPT_TRIGGERS command */
-typedef struct {
- unsigned char CHDLC_interrupt_triggers PACKED; /* CHDLC interrupt trigger configuration */
- unsigned char IRQ PACKED; /* IRQ to be used */
- unsigned short interrupt_timer PACKED; /* interrupt timer */
- unsigned short misc_interrupt_bits PACKED; /* miscellaneous bits */
-} CHDLC_INT_TRIGGERS_STRUCT;
-
-/* 'CHDLC_interrupt_triggers' bit settings */
-#define APP_INT_ON_RX_FRAME 0x01 /* interrupt on Data frame reception */
-#define APP_INT_ON_TX_FRAME 0x02 /* interrupt when an Data frame may be transmitted */
-#define APP_INT_ON_COMMAND_COMPLETE 0x04 /* interrupt when an interface command is complete */
-#define APP_INT_ON_TIMER 0x08 /* interrupt on a defined millisecond timeout */
-#define APP_INT_ON_GLOBAL_EXCEP_COND 0x10 /* interrupt on a global exception condition */
-#define APP_INT_ON_CHDLC_EXCEP_COND 0x20 /* interrupt on an CHDLC exception condition */
-#define APP_INT_ON_TRACE_DATA_AVAIL 0x80 /* interrupt when trace data is available */
-
-/* interrupt types indicated at 'interrupt_type' byte of the INTERRUPT_INFORMATION_STRUCT */
-#define NO_APP_INTS_PEND 0x00 /* no interrups are pending */
-#define RX_APP_INT_PEND 0x01 /* a receive interrupt is pending */
-#define TX_APP_INT_PEND 0x02 /* a transmit interrupt is pending */
-#define COMMAND_COMPLETE_APP_INT_PEND 0x04 /* a 'command complete' interrupt is pending */
-#define TIMER_APP_INT_PEND 0x08 /* a timer interrupt is pending */
-#define GLOBAL_EXCEP_COND_APP_INT_PEND 0x10 /* a global exception condition interrupt is pending */
-#define CHDLC_EXCEP_COND_APP_INT_PEND 0x20 /* an CHDLC exception condition interrupt is pending */
-#define TRACE_DATA_AVAIL_APP_INT_PEND 0x80 /* a trace data available interrupt is pending */
-
-
-/* modem status changes */
-#define DCD_HIGH 0x08
-#define CTS_HIGH 0x20
-
-
-/* ----------------------------------------------------------------------------
- * Constants for Data frame transmission
- * --------------------------------------------------------------------------*/
-
-/* the Data frame transmit status element configuration structure */
-typedef struct {
- unsigned short number_Tx_status_elements PACKED; /* number of transmit status elements */
- unsigned long base_addr_Tx_status_elements PACKED; /* base address of the transmit element list */
- unsigned long next_Tx_status_element_to_use PACKED; /* pointer to the next transmit element to be used */
-} CHDLC_TX_STATUS_EL_CFG_STRUCT;
-
-/* the Data frame transmit status element structure */
-typedef struct {
- unsigned char opp_flag PACKED; /* opp flag */
- unsigned short frame_length PACKED; /* length of the frame to be transmitted */
- unsigned char reserved_1 PACKED; /* reserved for internal use */
- unsigned long reserved_2 PACKED; /* reserved for internal use */
- unsigned long reserved_3 PACKED; /* reserved for internal use */
- unsigned long ptr_data_bfr PACKED; /* pointer to the data area */
-} CHDLC_DATA_TX_STATUS_EL_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants for Data frame reception
- * --------------------------------------------------------------------------*/
-
-/* the Data frame receive status element configuration structure */
-typedef struct {
- unsigned short number_Rx_status_elements PACKED; /* number of receive status elements */
- unsigned long base_addr_Rx_status_elements PACKED; /* base address of the receive element list */
- unsigned long next_Rx_status_element_to_use PACKED; /* pointer to the next receive element to be used */
- unsigned long base_addr_Rx_buffer PACKED; /* base address of the receive data buffer */
- unsigned long end_addr_Rx_buffer PACKED; /* end address of the receive data buffer */
-} CHDLC_RX_STATUS_EL_CFG_STRUCT;
-
-/* the Data frame receive status element structure */
-typedef struct {
- unsigned char opp_flag PACKED; /* opp flag */
- unsigned short frame_length PACKED; /* length of the received frame */
- unsigned char error_flag PACKED; /* frame errors (HDLC_STREAMING_MODE)*/
- unsigned short time_stamp PACKED; /* receive time stamp (HDLC_STREAMING_MODE) */
- unsigned long reserved_1 PACKED; /* reserved for internal use */
- unsigned short reserved_2 PACKED; /* reserved for internal use */
- unsigned long ptr_data_bfr PACKED; /* pointer to the data area */
-} CHDLC_DATA_RX_STATUS_EL_STRUCT;
-
-
-
-/* ----------------------------------------------------------------------------
- * Constants defining the shared memory information area
- * --------------------------------------------------------------------------*/
-
-/* the global information structure */
-typedef struct {
- unsigned char global_status PACKED; /* global status */
- unsigned char modem_status PACKED; /* current modem status */
- unsigned char global_excep_conditions PACKED; /* global exception conditions */
- unsigned char glob_info_reserved[5] PACKED; /* reserved */
- unsigned char codename[4] PACKED; /* Firmware name */
- unsigned char codeversion[4] PACKED; /* Firmware version */
-} GLOBAL_INFORMATION_STRUCT;
-
-/* the CHDLC information structure */
-typedef struct {
- unsigned char CHDLC_status PACKED; /* CHDLC status */
- unsigned char CHDLC_excep_conditions PACKED; /* CHDLC exception conditions */
- unsigned char CHDLC_info_reserved[14] PACKED; /* reserved */
-} CHDLC_INFORMATION_STRUCT;
-
-/* the interrupt information structure */
-typedef struct {
- unsigned char interrupt_type PACKED; /* type of interrupt triggered */
- unsigned char interrupt_permission PACKED; /* interrupt permission mask */
- unsigned char int_info_reserved[14] PACKED; /* reserved */
-} INTERRUPT_INFORMATION_STRUCT;
-
-/* the S508/FT1 information structure */
-typedef struct {
- unsigned char parallel_port_A_input PACKED; /* input - parallel port A */
- unsigned char parallel_port_B_input PACKED; /* input - parallel port B */
- unsigned char FT1_info_reserved[14] PACKED; /* reserved */
-} FT1_INFORMATION_STRUCT;
-
-/* the shared memory area information structure */
-typedef struct {
- GLOBAL_INFORMATION_STRUCT global_info_struct PACKED; /* the global information structure */
- CHDLC_INFORMATION_STRUCT CHDLC_info_struct PACKED; /* the CHDLC information structure */
- INTERRUPT_INFORMATION_STRUCT interrupt_info_struct PACKED; /* the interrupt information structure */
- FT1_INFORMATION_STRUCT FT1_info_struct PACKED; /* the S508/FT1 information structure */
-} SHARED_MEMORY_INFO_STRUCT;
-
-/* ----------------------------------------------------------------------------
- * UDP Management constants and structures
- * --------------------------------------------------------------------------*/
-
-/* The embedded control block for UDP mgmt
- This is essentially a mailbox structure, without the large data field */
-
-typedef struct {
- unsigned char opp_flag PACKED; /* the opp flag */
- unsigned char command PACKED; /* the user command */
- unsigned short buffer_length PACKED; /* the data length */
- unsigned char return_code PACKED; /* the return code */
- unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; /* reserved for later */
-} cblock_t;
-
-
-/* UDP management packet layout (data area of ip packet) */
-/*
-typedef struct {
- unsigned char signature[8] PACKED;
- unsigned char request_reply PACKED;
- unsigned char id PACKED;
- unsigned char reserved[6] PACKED;
- cblock_t cblock PACKED;
- unsigned char num_frames PACKED;
- unsigned char ismoredata PACKED;
- unsigned char data[SIZEOF_MB_DATA_BFR] PACKED;
-} udp_management_packet_t;
-
-*/
-
-typedef struct {
- unsigned char num_frames PACKED;
- unsigned char ismoredata PACKED;
-} trace_info_t;
-
-typedef struct {
- ip_pkt_t ip_pkt PACKED;
- udp_pkt_t udp_pkt PACKED;
- wp_mgmt_t wp_mgmt PACKED;
- cblock_t cblock PACKED;
- trace_info_t trace_info PACKED;
- unsigned char data[SIZEOF_MB_DATA_BFR] PACKED;
-} chdlc_udp_pkt_t;
-
-typedef struct ft1_exec_cmd{
- unsigned char command PACKED; /* the user command */
- unsigned short buffer_length PACKED; /* the data length */
- unsigned char return_code PACKED; /* the return code */
- unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED;
-} ft1_exec_cmd_t;
-
-typedef struct {
- unsigned char opp_flag PACKED;
- ft1_exec_cmd_t cmd PACKED;
- unsigned char data[SIZEOF_MB_DATA_BFR] PACKED;
-} ft1_exec_t;
-
-#define UDPMGMT_SIGNATURE "CTPIPEAB"
-
-
-/* UDP/IP packet (for UDP management) layout */
-/*
-typedef struct {
- unsigned char reserved[2] PACKED;
- unsigned short ip_length PACKED;
- unsigned char reserved2[4] PACKED;
- unsigned char ip_ttl PACKED;
- unsigned char ip_protocol PACKED;
- unsigned short ip_checksum PACKED;
- unsigned long ip_src_address PACKED;
- unsigned long ip_dst_address PACKED;
- unsigned short udp_src_port PACKED;
- unsigned short udp_dst_port PACKED;
- unsigned short udp_length PACKED;
- unsigned short udp_checksum PACKED;
- udp_management_packet_t um_packet PACKED;
-} ip_packet_t;
-*/
-
-/* valid ip_protocol for UDP management */
-#define UDPMGMT_UDP_PROTOCOL 0x11
-
-
-typedef struct {
- unsigned char status PACKED;
- unsigned char data_avail PACKED;
- unsigned short real_length PACKED;
- unsigned short time_stamp PACKED;
- unsigned char data[1] PACKED;
-} trace_pkt_t;
-
-typedef struct {
- unsigned char error_flag PACKED;
- unsigned short time_stamp PACKED;
- unsigned char reserved[13] PACKED;
-} api_rx_hdr_t;
-
-typedef struct {
- api_rx_hdr_t api_rx_hdr PACKED;
- void * data PACKED;
-} api_rx_element_t;
-
-typedef struct {
- unsigned char attr PACKED;
- unsigned char reserved[15] PACKED;
-} api_tx_hdr_t;
-
-typedef struct {
- api_tx_hdr_t api_tx_hdr PACKED;
- void * data PACKED;
-} api_tx_element_t;
-
-/* ----------------------------------------------------------------------------
- * Constants for the SET_FT1_CONFIGURATION/READ_FT1_CONFIGURATION command
- * --------------------------------------------------------------------------*/
-
-/* the FT1 configuration structure */
-typedef struct {
- unsigned short framing_mode;
- unsigned short encoding_mode;
- unsigned short line_build_out;
- unsigned short channel_base;
- unsigned short baud_rate_kbps; /* the baud rate (in kbps) */
- unsigned short clock_mode;
-} ft1_config_t;
-
-/* settings for the 'framing_mode' */
-#define ESF_FRAMING 0x00 /* ESF framing */
-#define D4_FRAMING 0x01 /* D4 framing */
-
-/* settings for the 'encoding_mode' */
-#define B8ZS_ENCODING 0x00 /* B8ZS encoding */
-#define AMI_ENCODING 0x01 /* AMI encoding */
-
-/* settings for the 'line_build_out' */
-#define LN_BLD_CSU_0dB_DSX1_0_to_133 0x00 /* set build out to CSU (0db) or DSX-1 (0-133ft) */
-#define LN_BLD_DSX1_133_to_266 0x01 /* set build out DSX-1 (133-266ft) */
-#define LN_BLD_DSX1_266_to_399 0x02 /* set build out DSX-1 (266-399ft) */
-#define LN_BLD_DSX1_399_to_533 0x03 /* set build out DSX-1 (399-533ft) */
-#define LN_BLD_DSX1_533_to_655 0x04 /* set build out DSX-1 (533-655ft) */
-#define LN_BLD_CSU_NEG_7dB 0x05 /* set build out to CSU (-7.5db) */
-#define LN_BLD_CSU_NEG_15dB 0x06 /* set build out to CSU (-15db) */
-#define LN_BLD_CSU_NEG_22dB 0x07 /* set build out to CSU (-22.5db) */
-
-/* settings for the 'channel_base' */
-#define MIN_CHANNEL_BASE_VALUE 1 /* the minimum permitted channel base value */
-#define MAX_CHANNEL_BASE_VALUE 24 /* the maximum permitted channel base value */
-
-/* settings for the 'baud_rate_kbps' */
-#define MIN_BAUD_RATE_KBPS 0 /* the minimum permitted baud rate (kbps) */
-#define MAX_BAUD_RATE_KBPS 1536 /* the maximum permitted baud rate (kbps) */
-#define BAUD_RATE_FT1_AUTO_CONFIG 0xFFFF /* the baud rate used to trigger an automatic FT1 configuration */
-
-/* settings for the 'clock_mode' */
-#define CLOCK_MODE_NORMAL 0x00 /* clock mode set to normal (slave) */
-#define CLOCK_MODE_MASTER 0x01 /* clock mode set to master */
-
-
-#define BAUD_RATE_FT1_AUTO_CONFIG 0xFFFF
-#define AUTO_FT1_CONFIG_NOT_COMPLETE 0x08
-#define AUTO_FT1_CFG_FAIL_OP_MODE 0x0C
-#define AUTO_FT1_CFG_FAIL_INVALID_LINE 0x0D
-
-
-#ifdef _MSC_
-# pragma pack()
-#endif
-#endif /* _SDLA_CHDLC_H */
diff --git a/include/linux/sdla_ppp.h b/include/linux/sdla_ppp.h
deleted file mode 100644
index 6f3923179c29..000000000000
--- a/include/linux/sdla_ppp.h
+++ /dev/null
@@ -1,575 +0,0 @@
-/*****************************************************************************
-* sdla_ppp.h Sangoma PPP firmware API definitions.
-*
-* Author: Nenad Corbic <ncorbic@sangoma.com>
-*
-* Copyright: (c) 1995-1997 Sangoma Technologies Inc.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version
-* 2 of the License, or (at your option) any later version.
-* ============================================================================
-* Feb 24, 2000 Nenad Corbic v2.1.2
-* Jan 06, 1997 Gene Kozin v2.0
-* Apr 11, 1996 Gene Kozin Initial version.
-*****************************************************************************/
-#ifndef _SDLA_PPP_H
-#define _SDLA_PPP_H
-
-/*----------------------------------------------------------------------------
- * Notes:
- * ------
- * 1. All structures defined in this file are byte-alined.
- *
- * Compiler Platform
- * -------- --------
- * GNU C Linux
- */
-
-#ifndef PACKED
-# define PACKED __attribute__((packed))
-#endif /* PACKED */
-
-/* Adapter memory layout and important constants */
-#define PPP508_MB_VECT 0xE000 /* mailbox window vector */
-#define PPP508_MB_OFFS 0 /* mailbox offset */
-#define PPP508_FLG_OFFS 0x1000 /* status flags offset */
-#define PPP508_BUF_OFFS 0x1100 /* buffer info block offset */
-#define PPP514_MB_OFFS 0xE000 /* mailbox offset */
-#define PPP514_FLG_OFFS 0xF000 /* status flags offset */
-#define PPP514_BUF_OFFS 0xF100 /* buffer info block offset */
-
-#define PPP_MAX_DATA 1008 /* command block data buffer length */
-
-/****** Data Structures *****************************************************/
-
-/*----------------------------------------------------------------------------
- * PPP Command Block.
- */
-typedef struct ppp_cmd{
- unsigned char command PACKED; /* command code */
- unsigned short length PACKED; /* length of data buffer */
- unsigned char result PACKED; /* return code */
- unsigned char rsrv[11] PACKED; /* reserved for future use */
-} ppp_cmd_t;
-
-typedef struct cblock{
- unsigned char opp_flag PACKED;
- unsigned char command PACKED; /* command code */
- unsigned short length PACKED; /* length of data buffer */
- unsigned char result PACKED; /* return code */
- unsigned char rsrv[11] PACKED; /* reserved for future use */
-} cblock_t;
-
-typedef struct ppp_udp_pkt{
- ip_pkt_t ip_pkt PACKED;
- udp_pkt_t udp_pkt PACKED;
- wp_mgmt_t wp_mgmt PACKED;
- cblock_t cblock PACKED;
- unsigned char data[MAX_LGTH_UDP_MGNT_PKT] PACKED;
-} ppp_udp_pkt_t;
-
-typedef struct {
- unsigned char status PACKED;
- unsigned char data_avail PACKED;
- unsigned short real_length PACKED;
- unsigned short time_stamp PACKED;
- unsigned char data[1] PACKED;
-} trace_pkt_t;
-
-
-typedef struct {
- unsigned char opp_flag PACKED;
- unsigned char trace_type PACKED;
- unsigned short trace_length PACKED;
- unsigned short trace_data_ptr PACKED;
- unsigned short trace_time_stamp PACKED;
-} trace_element_t;
-
-/* 'command' field defines */
-#define PPP_READ_CODE_VERSION 0x10 /* configuration commands */
-#define PPP_SET_CONFIG 0x05
-#define PPP_READ_CONFIG 0x06
-#define PPP_SET_INTR_FLAGS 0x20
-#define PPP_READ_INTR_FLAGS 0x21
-#define PPP_SET_INBOUND_AUTH 0x30
-#define PPP_SET_OUTBOUND_AUTH 0x31
-#define PPP_GET_CONNECTION_INFO 0x32
-
-#define PPP_COMM_ENABLE 0x03 /* operational commands */
-#define PPP_COMM_DISABLE 0x04
-#define PPP_SEND_SIGN_FRAME 0x23
-#define PPP_READ_SIGN_RESPONSE 0x24
-#define PPP_DATALINE_MONITOR 0x33
-
-#define PPP_READ_STATISTICS 0x07 /* statistics commands */
-#define PPP_FLUSH_STATISTICS 0x08
-#define PPP_READ_ERROR_STATS 0x09
-#define PPP_FLUSH_ERROR_STATS 0x0A
-#define PPP_READ_PACKET_STATS 0x12
-#define PPP_FLUSH_PACKET_STATS 0x13
-#define PPP_READ_LCP_STATS 0x14
-#define PPP_FLUSH_LCP_STATS 0x15
-#define PPP_READ_LPBK_STATS 0x16
-#define PPP_FLUSH_LPBK_STATS 0x17
-#define PPP_READ_IPCP_STATS 0x18
-#define PPP_FLUSH_IPCP_STATS 0x19
-#define PPP_READ_IPXCP_STATS 0x1A
-#define PPP_FLUSH_IPXCP_STATS 0x1B
-#define PPP_READ_PAP_STATS 0x1C
-#define PPP_FLUSH_PAP_STATS 0x1D
-#define PPP_READ_CHAP_STATS 0x1E
-#define PPP_FLUSH_CHAP_STATS 0x1F
-
-/* 'result' field defines */
-#define PPPRES_OK 0x00 /* command executed successfully */
-#define PPPRES_INVALID_STATE 0x09 /* invalid command in this context */
-
-/*----------------------------------------------------------------------------
- * PPP Mailbox.
- * This structure is located at offset PPP???_MB_OFFS into PPP???_MB_VECT
- */
-typedef struct ppp_mbox
-{
- unsigned char flag PACKED; /* 00h: command execution flag */
- ppp_cmd_t cmd PACKED; /* 01h: command block */
- unsigned char data[1] PACKED; /* 10h: variable length data buffer */
-} ppp_mbox_t;
-
-/*----------------------------------------------------------------------------
- * PPP Status Flags.
- * This structure is located at offset PPP???_FLG_OFFS into
- * PPP???_MB_VECT.
- */
-typedef struct ppp_flags
-{
- unsigned char iflag PACKED; /* 00: interrupt flag */
- unsigned char imask PACKED; /* 01: interrupt mask */
- unsigned char resrv PACKED;
- unsigned char mstatus PACKED; /* 03: modem status */
- unsigned char lcp_state PACKED; /* 04: LCP state */
- unsigned char ppp_phase PACKED; /* 05: PPP phase */
- unsigned char ip_state PACKED; /* 06: IPCP state */
- unsigned char ipx_state PACKED; /* 07: IPXCP state */
- unsigned char pap_state PACKED; /* 08: PAP state */
- unsigned char chap_state PACKED; /* 09: CHAP state */
- unsigned short disc_cause PACKED; /* 0A: disconnection cause */
-} ppp_flags_t;
-
-/* 'iflag' defines */
-#define PPP_INTR_RXRDY 0x01 /* Rx ready */
-#define PPP_INTR_TXRDY 0x02 /* Tx ready */
-#define PPP_INTR_MODEM 0x04 /* modem status change (DCD, CTS) */
-#define PPP_INTR_CMD 0x08 /* interface command completed */
-#define PPP_INTR_DISC 0x10 /* data link disconnected */
-#define PPP_INTR_OPEN 0x20 /* data link open */
-#define PPP_INTR_DROP_DTR 0x40 /* DTR drop timeout expired */
-#define PPP_INTR_TIMER 0x80 /* timer interrupt */
-
-
-/* 'mstatus' defines */
-#define PPP_MDM_DCD 0x08 /* mdm_status: DCD */
-#define PPP_MDM_CTS 0x20 /* mdm_status: CTS */
-
-/* 'disc_cause' defines */
-#define PPP_LOCAL_TERMINATION 0x0001 /* Local Request by PPP termination phase */
-#define PPP_DCD_CTS_DROP 0x0002 /* DCD and/or CTS dropped. Link down */
-#define PPP_REMOTE_TERMINATION 0x0800 /* Remote Request by PPP termination phase */
-
-/* 'misc_config_bits' defines */
-#define DONT_RE_TX_ABORTED_I_FRAMES 0x01
-#define TX_FRM_BYTE_COUNT_STATS 0x02
-#define RX_FRM_BYTE_COUNT_STATS 0x04
-#define TIME_STAMP_IN_RX_FRAMES 0x08
-#define NON_STD_ADPTR_FREQ 0x10
-#define INTERFACE_LEVEL_RS232 0x20
-#define AUTO_LINK_RECOVERY 0x100
-#define DONT_TERMINATE_LNK_MAX_CONFIG 0x200
-
-/* 'authentication options' defines */
-#define NO_AUTHENTICATION 0x00
-#define INBOUND_AUTH 0x80
-#define PAP_AUTH 0x01
-#define CHAP_AUTH 0x02
-
-/* 'ip options' defines */
-#define L_AND_R_IP_NO_ASSIG 0x00
-#define L_IP_LOCAL_ASSIG 0x01
-#define L_IP_REMOTE_ASSIG 0x02
-#define R_IP_LOCAL_ASSIG 0x04
-#define R_IP_REMOTE_ASSIG 0x08
-#define ENABLE_IP 0x80
-
-/* 'ipx options' defines */
-#define ROUTING_PROT_DEFAULT 0x20
-#define ENABLE_IPX 0x80
-#define DISABLE_IPX 0x00
-
-/*----------------------------------------------------------------------------
- * PPP Buffer Info.
- * This structure is located at offset PPP508_BUF_OFFS into
- * PPP508_MB_VECT.
- */
-typedef struct ppp508_buf_info
-{
- unsigned short txb_num PACKED; /* 00: number of transmit buffers */
- unsigned long txb_ptr PACKED; /* 02: pointer to the buffer ctl. */
- unsigned long txb_nxt PACKED;
- unsigned char rsrv1[22] PACKED;
- unsigned short rxb_num PACKED; /* 20: number of receive buffers */
- unsigned long rxb_ptr PACKED; /* 22: pointer to the buffer ctl. */
- unsigned long rxb1_ptr PACKED; /* 26: pointer to the first buf.ctl. */
- unsigned long rxb_base PACKED; /* 2A: pointer to the buffer base */
- unsigned char rsrv2[2] PACKED;
- unsigned long rxb_end PACKED; /* 30: pointer to the buffer end */
-} ppp508_buf_info_t;
-
-/*----------------------------------------------------------------------------
- * Transmit/Receive Buffer Control Block.
- */
-typedef struct ppp_buf_ctl
-{
- unsigned char flag PACKED; /* 00: 'buffer ready' flag */
- unsigned short length PACKED; /* 01: length of data */
- unsigned char reserved1[1] PACKED; /* 03: */
- unsigned char proto PACKED; /* 04: protocol */
- unsigned short timestamp PACKED; /* 05: time stamp (Rx only) */
- unsigned char reserved2[5] PACKED; /* 07: */
- union
- {
- unsigned short o_p[2]; /* 1C: buffer offset & page (S502) */
- unsigned long ptr; /* 1C: buffer pointer (S508) */
- } buf PACKED;
-} ppp_buf_ctl_t;
-
-/*----------------------------------------------------------------------------
- * S508 Adapter Configuration Block (passed to the PPP_SET_CONFIG command).
- */
-typedef struct ppp508_conf
-{
- unsigned long line_speed PACKED; /* 00: baud rate, bps */
- unsigned short txbuf_percent PACKED; /* 04: % of Tx buffer */
- unsigned short conf_flags PACKED; /* 06: configuration bits */
- unsigned short mtu_local PACKED; /* 08: local MTU */
- unsigned short mtu_remote PACKED; /* 0A: remote MTU */
- unsigned short restart_tmr PACKED; /* 0C: restart timer */
- unsigned short auth_rsrt_tmr PACKED; /* 0E: authentication timer */
- unsigned short auth_wait_tmr PACKED; /* 10: authentication timer */
- unsigned short mdm_fail_tmr PACKED; /* 12: modem failure timer */
- unsigned short dtr_drop_tmr PACKED; /* 14: DTR drop timer */
- unsigned short connect_tmout PACKED; /* 16: connection timeout */
- unsigned short conf_retry PACKED; /* 18: max. retry */
- unsigned short term_retry PACKED; /* 1A: max. retry */
- unsigned short fail_retry PACKED; /* 1C: max. retry */
- unsigned short auth_retry PACKED; /* 1E: max. retry */
- unsigned char auth_options PACKED; /* 20: authentication opt. */
- unsigned char ip_options PACKED; /* 21: IP options */
- unsigned long ip_local PACKED; /* 22: local IP address */
- unsigned long ip_remote PACKED; /* 26: remote IP address */
- unsigned char ipx_options PACKED; /* 2A: IPX options */
- unsigned char ipx_netno[4] PACKED; /* 2B: IPX net number */
- unsigned char ipx_local[6] PACKED; /* 2F: local IPX node number*/
- unsigned char ipx_remote[6] PACKED; /* 35: remote IPX node num.*/
- unsigned char ipx_router[48] PACKED; /* 3B: IPX router name*/
- unsigned long alt_cpu_clock PACKED; /* 6B: */
-} ppp508_conf_t;
-
-/*----------------------------------------------------------------------------
- * S508 Adapter Read Connection Information Block
- * Returned by the PPP_GET_CONNECTION_INFO command
- */
-typedef struct ppp508_connect_info
-{
- unsigned short mru PACKED; /* 00-01 Remote Max Rec' Unit */
- unsigned char ip_options PACKED; /* 02: Negotiated ip options */
- unsigned long ip_local PACKED; /* 03-06: local IP address */
- unsigned long ip_remote PACKED; /* 07-0A: remote IP address */
- unsigned char ipx_options PACKED; /* 0B: Negotiated ipx options */
- unsigned char ipx_netno[4] PACKED; /* 0C-0F: IPX net number */
- unsigned char ipx_local[6] PACKED; /* 10-1F: local IPX node # */
- unsigned char ipx_remote[6] PACKED; /* 16-1B: remote IPX node # */
- unsigned char ipx_router[48] PACKED; /* 1C-4B: IPX router name */
- unsigned char auth_status PACKED; /* 4C: Authentication Status */
- unsigned char inbd_auth_peerID[1] PACKED; /* 4D: variable length inbound authenticated peer ID */
-} ppp508_connect_info_t;
-
-/* 'line_speed' field */
-#define PPP_BITRATE_1200 0x01
-#define PPP_BITRATE_2400 0x02
-#define PPP_BITRATE_4800 0x03
-#define PPP_BITRATE_9600 0x04
-#define PPP_BITRATE_19200 0x05
-#define PPP_BITRATE_38400 0x06
-#define PPP_BITRATE_45000 0x07
-#define PPP_BITRATE_56000 0x08
-#define PPP_BITRATE_64000 0x09
-#define PPP_BITRATE_74000 0x0A
-#define PPP_BITRATE_112000 0x0B
-#define PPP_BITRATE_128000 0x0C
-#define PPP_BITRATE_156000 0x0D
-
-/* Defines for the 'conf_flags' field */
-#define PPP_IGNORE_TX_ABORT 0x01 /* don't re-transmit aborted frames */
-#define PPP_ENABLE_TX_STATS 0x02 /* enable Tx statistics */
-#define PPP_ENABLE_RX_STATS 0x04 /* enable Rx statistics */
-#define PPP_ENABLE_TIMESTAMP 0x08 /* enable timestamp */
-
-/* 'ip_options' defines */
-#define PPP_LOCAL_IP_LOCAL 0x01
-#define PPP_LOCAL_IP_REMOTE 0x02
-#define PPP_REMOTE_IP_LOCAL 0x04
-#define PPP_REMOTE_IP_REMOTE 0x08
-
-/* 'ipx_options' defines */
-#define PPP_REMOTE_IPX_NETNO 0x01
-#define PPP_REMOTE_IPX_LOCAL 0x02
-#define PPP_REMOTE_IPX_REMOTE 0x04
-#define PPP_IPX_ROUTE_RIP_SAP 0x08
-#define PPP_IPX_ROUTE_NLSP 0x10
-#define PPP_IPX_ROUTE_DEFAULT 0x20
-#define PPP_IPX_CONF_COMPLETE 0x40
-#define PPP_IPX_ENABLE 0x80
-
-/*----------------------------------------------------------------------------
- * S508 Adapter Configuration Block (returned by the PPP_READ_CONFIG command).
- */
-typedef struct ppp508_get_conf
-{
- unsigned long bps PACKED; /* 00: baud rate, bps */
- ppp508_conf_t conf PACKED; /* 04: requested config. */
- unsigned short txb_num PACKED; /* 6F: number of Tx buffers */
- unsigned short rxb_num PACKED; /* 71: number of Rx buffers */
-} ppp508_get_conf_t;
-
-/*----------------------------------------------------------------------------
- * S508 Operational Statistics (returned by the PPP_READ_STATISTIC command).
- */
-typedef struct ppp508_stats
-{
- unsigned short reserved1 PACKED; /* 00: */
- unsigned short rx_bad_len PACKED; /* 02: */
- unsigned short reserved2 PACKED; /* 04: */
- unsigned long tx_frames PACKED; /* 06: */
- unsigned long tx_bytes PACKED; /* 0A: */
- unsigned long rx_frames PACKED; /* 0E: */
- unsigned long rx_bytes PACKED; /* 12: */
-} ppp508_stats_t;
-
-/*----------------------------------------------------------------------------
- * Adapter Error Statistics (returned by the PPP_READ_ERROR_STATS command).
- */
-typedef struct ppp_err_stats
-{
- unsigned char rx_overrun PACKED; /* 00: Rx overrun errors */
- unsigned char rx_bad_crc PACKED; /* 01: Rx CRC errors */
- unsigned char rx_abort PACKED; /* 02: Rx aborted frames */
- unsigned char rx_lost PACKED; /* 03: Rx frames lost */
- unsigned char tx_abort PACKED; /* 04: Tx aborted frames */
- unsigned char tx_underrun PACKED; /* 05: Tx underrun errors */
- unsigned char tx_missed_intr PACKED; /* 06: Tx underruns missed */
- unsigned char reserved PACKED; /* 07: Tx underruns missed */
- unsigned char dcd_trans PACKED; /* 08: DCD transitions */
- unsigned char cts_trans PACKED; /* 09: CTS transitions */
-} ppp_err_stats_t;
-
-/*----------------------------------------------------------------------------
- * Packet Statistics (returned by the PPP_READ_PACKET_STATS command).
- */
-typedef struct ppp_pkt_stats
-{
- unsigned short rx_bad_header PACKED; /* 00: */
- unsigned short rx_prot_unknwn PACKED; /* 02: */
- unsigned short rx_too_large PACKED; /* 04: */
- unsigned short rx_lcp PACKED; /* 06: */
- unsigned short tx_lcp PACKED; /* 08: */
- unsigned short rx_ipcp PACKED; /* 0A: */
- unsigned short tx_ipcp PACKED; /* 0C: */
- unsigned short rx_ipxcp PACKED; /* 0E: */
- unsigned short tx_ipxcp PACKED; /* 10: */
- unsigned short rx_pap PACKED; /* 12: */
- unsigned short tx_pap PACKED; /* 14: */
- unsigned short rx_chap PACKED; /* 16: */
- unsigned short tx_chap PACKED; /* 18: */
- unsigned short rx_lqr PACKED; /* 1A: */
- unsigned short tx_lqr PACKED; /* 1C: */
- unsigned short rx_ip PACKED; /* 1E: */
- unsigned short tx_ip PACKED; /* 20: */
- unsigned short rx_ipx PACKED; /* 22: */
- unsigned short tx_ipx PACKED; /* 24: */
-} ppp_pkt_stats_t;
-
-/*----------------------------------------------------------------------------
- * LCP Statistics (returned by the PPP_READ_LCP_STATS command).
- */
-typedef struct ppp_lcp_stats
-{
- unsigned short rx_unknown PACKED; /* 00: unknown LCP type */
- unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */
- unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */
- unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */
- unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */
- unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */
- unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */
- unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */
- unsigned short rx_proto_rej PACKED; /* 10: Protocol-Reject */
- unsigned short rx_echo_rqst PACKED; /* 12: Echo-Request */
- unsigned short rx_echo_reply PACKED; /* 14: Echo-Reply */
- unsigned short rx_disc_rqst PACKED; /* 16: Discard-Request */
- unsigned short tx_conf_rqst PACKED; /* 18: Configure-Request */
- unsigned short tx_conf_ack PACKED; /* 1A: Configure-Ack */
- unsigned short tx_conf_nak PACKED; /* 1C: Configure-Nak */
- unsigned short tx_conf_rej PACKED; /* 1E: Configure-Reject */
- unsigned short tx_term_rqst PACKED; /* 20: Terminate-Request */
- unsigned short tx_term_ack PACKED; /* 22: Terminate-Ack */
- unsigned short tx_code_rej PACKED; /* 24: Code-Reject */
- unsigned short tx_proto_rej PACKED; /* 26: Protocol-Reject */
- unsigned short tx_echo_rqst PACKED; /* 28: Echo-Request */
- unsigned short tx_echo_reply PACKED; /* 2A: Echo-Reply */
- unsigned short tx_disc_rqst PACKED; /* 2E: Discard-Request */
- unsigned short rx_too_large PACKED; /* 30: packets too large */
- unsigned short rx_ack_inval PACKED; /* 32: invalid Conf-Ack */
- unsigned short rx_rej_inval PACKED; /* 34: invalid Conf-Reject */
- unsigned short rx_rej_badid PACKED; /* 36: Conf-Reject w/bad ID */
-} ppp_lcp_stats_t;
-
-/*----------------------------------------------------------------------------
- * Loopback Error Statistics (returned by the PPP_READ_LPBK_STATS command).
- */
-typedef struct ppp_lpbk_stats
-{
- unsigned short conf_magic PACKED; /* 00: */
- unsigned short loc_echo_rqst PACKED; /* 02: */
- unsigned short rem_echo_rqst PACKED; /* 04: */
- unsigned short loc_echo_reply PACKED; /* 06: */
- unsigned short rem_echo_reply PACKED; /* 08: */
- unsigned short loc_disc_rqst PACKED; /* 0A: */
- unsigned short rem_disc_rqst PACKED; /* 0C: */
- unsigned short echo_tx_collsn PACKED; /* 0E: */
- unsigned short echo_rx_collsn PACKED; /* 10: */
-} ppp_lpbk_stats_t;
-
-/*----------------------------------------------------------------------------
- * Protocol Statistics (returned by the PPP_READ_IPCP_STATS and
- * PPP_READ_IPXCP_STATS commands).
- */
-typedef struct ppp_prot_stats
-{
- unsigned short rx_unknown PACKED; /* 00: unknown type */
- unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */
- unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */
- unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */
- unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */
- unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */
- unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */
- unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */
- unsigned short reserved PACKED; /* 10: */
- unsigned short tx_conf_rqst PACKED; /* 12: Configure-Request */
- unsigned short tx_conf_ack PACKED; /* 14: Configure-Ack */
- unsigned short tx_conf_nak PACKED; /* 16: Configure-Nak */
- unsigned short tx_conf_rej PACKED; /* 18: Configure-Reject */
- unsigned short tx_term_rqst PACKED; /* 1A: Terminate-Request */
- unsigned short tx_term_ack PACKED; /* 1C: Terminate-Ack */
- unsigned short tx_code_rej PACKED; /* 1E: Code-Reject */
- unsigned short rx_too_large PACKED; /* 20: packets too large */
- unsigned short rx_ack_inval PACKED; /* 22: invalid Conf-Ack */
- unsigned short rx_rej_inval PACKED; /* 24: invalid Conf-Reject */
- unsigned short rx_rej_badid PACKED; /* 26: Conf-Reject w/bad ID */
-} ppp_prot_stats_t;
-
-/*----------------------------------------------------------------------------
- * PAP Statistics (returned by the PPP_READ_PAP_STATS command).
- */
-typedef struct ppp_pap_stats
-{
- unsigned short rx_unknown PACKED; /* 00: unknown type */
- unsigned short rx_auth_rqst PACKED; /* 02: Authenticate-Request */
- unsigned short rx_auth_ack PACKED; /* 04: Authenticate-Ack */
- unsigned short rx_auth_nak PACKED; /* 06: Authenticate-Nak */
- unsigned short reserved PACKED; /* 08: */
- unsigned short tx_auth_rqst PACKED; /* 0A: Authenticate-Request */
- unsigned short tx_auth_ack PACKED; /* 0C: Authenticate-Ack */
- unsigned short tx_auth_nak PACKED; /* 0E: Authenticate-Nak */
- unsigned short rx_too_large PACKED; /* 10: packets too large */
- unsigned short rx_bad_peerid PACKED; /* 12: invalid peer ID */
- unsigned short rx_bad_passwd PACKED; /* 14: invalid password */
-} ppp_pap_stats_t;
-
-/*----------------------------------------------------------------------------
- * CHAP Statistics (returned by the PPP_READ_CHAP_STATS command).
- */
-typedef struct ppp_chap_stats
-{
- unsigned short rx_unknown PACKED; /* 00: unknown type */
- unsigned short rx_challenge PACKED; /* 02: Authenticate-Request */
- unsigned short rx_response PACKED; /* 04: Authenticate-Ack */
- unsigned short rx_success PACKED; /* 06: Authenticate-Nak */
- unsigned short rx_failure PACKED; /* 08: Authenticate-Nak */
- unsigned short reserved PACKED; /* 0A: */
- unsigned short tx_challenge PACKED; /* 0C: Authenticate-Request */
- unsigned short tx_response PACKED; /* 0E: Authenticate-Ack */
- unsigned short tx_success PACKED; /* 10: Authenticate-Nak */
- unsigned short tx_failure PACKED; /* 12: Authenticate-Nak */
- unsigned short rx_too_large PACKED; /* 14: packets too large */
- unsigned short rx_bad_peerid PACKED; /* 16: invalid peer ID */
- unsigned short rx_bad_passwd PACKED; /* 18: invalid password */
- unsigned short rx_bad_md5 PACKED; /* 1A: invalid MD5 format */
- unsigned short rx_bad_resp PACKED; /* 1C: invalid response */
-} ppp_chap_stats_t;
-
-/*----------------------------------------------------------------------------
- * Connection Information (returned by the PPP_GET_CONNECTION_INFO command).
- */
-typedef struct ppp_conn_info
-{
- unsigned short remote_mru PACKED; /* 00: */
- unsigned char ip_options PACKED; /* 02: */
- unsigned char ip_local[4] PACKED; /* 03: */
- unsigned char ip_remote[4] PACKED; /* 07: */
- unsigned char ipx_options PACKED; /* 0B: */
- unsigned char ipx_network[4] PACKED; /* 0C: */
- unsigned char ipx_local[6] PACKED; /* 10: */
- unsigned char ipx_remote[6] PACKED; /* 16: */
- unsigned char ipx_router[48] PACKED; /* 1C: */
- unsigned char auth_status PACKED; /* 4C: */
- unsigned char peer_id[0] PACKED; /* 4D: */
-} ppp_conn_info_t;
-
-/* Data structure for SET_TRIGGER_INTR command
- */
-
-typedef struct ppp_intr_info{
- unsigned char i_enable PACKED; /* 0 Interrupt enable bits */
- unsigned char irq PACKED; /* 1 Irq number */
- unsigned short timer_len PACKED; /* 2 Timer delay */
-} ppp_intr_info_t;
-
-
-#define FT1_MONITOR_STATUS_CTRL 0x80
-#define SET_FT1_MODE 0x81
-
-
-
-/* Special UDP drivers management commands */
-#define PPIPE_ENABLE_TRACING 0x20
-#define PPIPE_DISABLE_TRACING 0x21
-#define PPIPE_GET_TRACE_INFO 0x22
-#define PPIPE_GET_IBA_DATA 0x23
-#define PPIPE_KILL_BOARD 0x24
-#define PPIPE_FT1_READ_STATUS 0x25
-#define PPIPE_DRIVER_STAT_IFSEND 0x26
-#define PPIPE_DRIVER_STAT_INTR 0x27
-#define PPIPE_DRIVER_STAT_GEN 0x28
-#define PPIPE_FLUSH_DRIVER_STATS 0x29
-#define PPIPE_ROUTER_UP_TIME 0x30
-
-#define DISABLE_TRACING 0x00
-#define TRACE_SIGNALLING_FRAMES 0x01
-#define TRACE_DATA_FRAMES 0x02
-
-
-
-#ifdef _MSC_
-# pragma pack()
-#endif
-#endif /* _SDLA_PPP_H */
diff --git a/include/linux/sdla_x25.h b/include/linux/sdla_x25.h
deleted file mode 100644
index 57db980e27ad..000000000000
--- a/include/linux/sdla_x25.h
+++ /dev/null
@@ -1,772 +0,0 @@
-/*****************************************************************************
-* sdla_x25.h Sangoma X.25 firmware API definitions.
-*
-* Author: Nenad Corbic <ncorbic@sangoma.com>
-*
-* Copyright: (c) 1995-2000 Sangoma Technologies Inc.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version
- 2 of the License, or (at your option) any later version.
-* ============================================================================
-* Feb 28, 2000 Nenad Corbic Updated for socket based x25api
-* Dec 13, 1996 Gene Kozin Initial version
-*****************************************************************************/
-#ifndef _SDLA_X25_H
-#define _SDLA_X25_H
-
-/*----------------------------------------------------------------------------
- * Notes:
- * ------
- * 1. All structures defined in this file are byte-alined.
- * Compiler Platform
- * -------- --------
- * GNU C Linux
- *
- */
-
-#ifndef PACKED
-# define PACKED __attribute__((packed))
-#endif /* PACKED */
-
-/****** CONSTANTS DEFINITIONS ***********************************************/
-
-#define X25_MAX_CHAN 255 /* max number of open X.25 circuits */
-#define X25_MAX_DATA 1024 /* max length of X.25 data buffer */
-/*
- * X.25 shared memory layout.
- */
-#define X25_MBOX_OFFS 0x16B0 /* general mailbox block */
-#define X25_RXMBOX_OFFS 0x1AD0 /* receive mailbox */
-#define X25_STATUS_OFFS 0x1EF0 /* X.25 status structure */
-#define X25_MB_VECTOR 0xE000 /* S514 mailbox window vecotr */
-#define X25_MISC_HDLC_BITS 0x1F00 /*X.25 miscallaneous HDLC bits */
-
-/* code levels */
-#define HDLC_LEVEL 0x01
-#define X25_LEVEL 0x02
-#define X25_AND_HDLC_LEVEL 0x03
-#define DO_HDLC_LEVEL_ERROR_CHECKING 0x04
-
-/****** DATA STRUCTURES *****************************************************/
-
-/*----------------------------------------------------------------------------
- * X.25 Command Block.
- */
-typedef struct X25Cmd
-{
- unsigned char command PACKED; /* command code */
- unsigned short length PACKED; /* transfer data length */
- unsigned char result PACKED; /* return code */
- unsigned char pf PACKED; /* P/F bit */
- unsigned short lcn PACKED; /* logical channel */
- unsigned char qdm PACKED; /* Q/D/M bits */
- unsigned char cause PACKED; /* cause field */
- unsigned char diagn PACKED; /* diagnostics */
- unsigned char pktType PACKED; /* packet type */
- unsigned char resrv[4] PACKED; /* reserved */
-} TX25Cmd;
-
-/*
- * Defines for the 'command' field.
- */
-/*----- General commands --------------*/
-#define X25_SET_GLOBAL_VARS 0x0B /* set global variables */
-#define X25_READ_MODEM_STATUS 0x0C /* read modem status */
-#define X25_READ_CODE_VERSION 0x15 /* read firmware version number */
-#define X25_TRACE_CONFIGURE 0x14 /* configure trace facility */
-#define X25_READ_TRACE_DATA 0x16 /* read trace data */
-#define X25_SET_INTERRUPT_MODE 0x17 /* set interrupt generation mode */
-#define X25_READ_INTERRUPT_MODE 0x18 /* read interrupt generation mode */
-/*----- HDLC-level commands -----------*/
-#define X25_HDLC_LINK_CONFIGURE 0x01 /* configure HDLC link level */
-#define X25_HDLC_LINK_OPEN 0x02 /* open HDLC link */
-#define X25_HDLC_LINK_CLOSE 0x03 /* close HDLC link */
-#define X25_HDLC_LINK_SETUP 0x04 /* set up HDLC link */
-#define X25_HDLC_LINK_DISC 0x05 /* disconnect DHLC link */
-#define X25_HDLC_LINK_STATUS 0x06 /* read DHLC link status */
-#define X25_HDLC_READ_STATS 0x07 /* read operational statistics */
-#define X25_HDLC_FLUSH_STATS 0x08 /* flush operational statistics */
-#define X25_HDLC_READ_COMM_ERR 0x09 /* read error statistics */
-#define X25_HDLC_FLUSH_COMM_ERR 0x0A /* flush error statistics */
-#define X25_HDLC_FLUSH_BUFFERS 0x0D /* flush HDLC-level data buffers */
-#define X25_HDLC_SPRVS_CNT_STAT 0x0F /* read surervisory count status */
-#define X25_HDLC_SEND_UI_FRAME 0x10 /* send unnumbered information frame */
-#define X25_HDLC_WRITE 0x11 /* send HDLC information frame */
-#define X25_HDLC_READ 0x21 /* read HDLC information frame */
-#define X25_HDLC_READ_CONFIG 0x12 /* read HDLC configuration */
-#define X25_HDLC_SET_CONFIG 0x13 /* set HDLC configuration */
-#define SET_PROTOCOL_LEVEL 0x1F /* set protocol level */
-/*----- X.25-level commands -----------*/
-#define X25_READ 0x22 /* read X.25 packet */
-#define X25_WRITE 0x23 /* send X.25 packet */
-#define X25_PLACE_CALL 0x30 /* place a call on SVC */
-#define X25_ACCEPT_CALL 0x31 /* accept incomming call */
-#define X25_CLEAR_CALL 0x32 /* clear call */
-#define X25_CLEAR_CONFRM 0x33 /* send clear confirmation packet */
-#define X25_RESET 0x34 /* send reset request packet */
-#define X25_RESET_CONFRM 0x35 /* send reset confirmation packet */
-#define X25_RESTART 0x36 /* send restart request packet */
-#define X25_RESTART_CONFRM 0x37 /* send restart confirmation packet */
-#define X25_INTERRUPT 0x38 /* send interrupt request packet */
-#define X25_INTERRUPT_CONFRM 0x39 /* send interrupt confirmation pkt */
-#define X25_REGISTRATION_RQST 0x3A /* send registration request packet */
-#define X25_REGISTRATION_CONFRM 0x3B /* send registration confirmation */
-#define X25_IS_DATA_AVAILABLE 0x40 /* querry receive queue */
-#define X25_INCOMMING_CALL_CTL 0x41 /* select incomming call options */
-#define X25_CONFIGURE_PVC 0x42 /* configure PVC */
-#define X25_GET_ACTIVE_CHANNELS 0x43 /* get a list of active circuits */
-#define X25_READ_CHANNEL_CONFIG 0x44 /* read virt. circuit configuration */
-#define X25_FLUSH_DATA_BUFFERS 0x45 /* flush X.25-level data buffers */
-#define X25_READ_HISTORY_TABLE 0x46 /* read asynchronous event log */
-#define X25_HISTORY_TABLE_CTL 0x47 /* control asynchronous event log */
-#define X25_GET_TX_D_BIT_STATUS 0x48 /* is packet with D-bit acknowleged */
-#define X25_READ_STATISTICS 0x49 /* read X.25-level statistics */
-#define X25_FLUSH_STATISTICS 0x4A /* flush X.25-level statistics */
-#define X25_READ_CONFIGURATION 0x50 /* read HDLC & X.25 configuration */
-#define X25_SET_CONFIGURATION 0x51 /* set HDLC & X.25 configuration */
-
-/*
- * Defines for the 'result' field.
- */
-/*----- General results ---------------*/
-#define X25RES_OK 0x00
-#define X25RES_ERROR 0x01
-#define X25RES_LINK_NOT_IN_ABM 0x02 /* link is not in ABM mode */
-#define X25RES_LINK_CLOSED 0x03
-#define X25RES_INVAL_LENGTH 0x04
-#define X25RES_INVAL_CMD 0x05
-#define X25RES_UNNUMBERED_FRAME 0x06 /* unnunbered frame received */
-#define X25RES_FRM_REJECT_MODE 0x07 /* link is in Frame Reject mode */
-#define X25RES_MODEM_FAILURE 0x08 /* DCD and/or CTS dropped */
-#define X25RES_N2_RETRY_LIMIT 0x09 /* N2 retry limit has been exceeded */
-#define X25RES_INVAL_LCN 0x30 /* invalid logical channel number */
-#define X25RES_INVAL_STATE 0x31 /* channel is not in data xfer mode */
-#define X25RES_INVAL_DATA_LEN 0x32 /* invalid data length */
-#define X25RES_NOT_READY 0x33 /* no data available / buffers full */
-#define X25RES_NETWORK_DOWN 0x34
-#define X25RES_CHANNEL_IN_USE 0x35 /* there is data queued on this LCN */
-#define X25RES_REGST_NOT_SUPPRT 0x36 /* registration not supported */
-#define X25RES_INVAL_FORMAT 0x37 /* invalid packet format */
-#define X25RES_D_BIT_NOT_SUPPRT 0x38 /* D-bit pragmatics not supported */
-#define X25RES_FACIL_NOT_SUPPRT 0x39 /* Call facility not supported */
-#define X25RES_INVAL_CALL_ARG 0x3A /* errorneous call arguments */
-#define X25RES_INVAL_CALL_DATA 0x3B /* errorneous call user data */
-#define X25RES_ASYNC_PACKET 0x40 /* asynchronous packet received */
-#define X25RES_PROTO_VIOLATION 0x41 /* protocol violation occurred */
-#define X25RES_PKT_TIMEOUT 0x42 /* X.25 packet time out */
-#define X25RES_PKT_RETRY_LIMIT 0x43 /* X.25 packet retry limit exceeded */
-/*----- Command-dependent results -----*/
-#define X25RES_LINK_DISC 0x00 /* HDLC_LINK_STATUS */
-#define X25RES_LINK_IN_ABM 0x01 /* HDLC_LINK_STATUS */
-#define X25RES_NO_DATA 0x01 /* HDLC_READ/READ_TRACE_DATA*/
-#define X25RES_TRACE_INACTIVE 0x02 /* READ_TRACE_DATA */
-#define X25RES_LINK_IS_OPEN 0x01 /* HDLC_LINK_OPEN */
-#define X25RES_LINK_IS_DISC 0x02 /* HDLC_LINK_DISC */
-#define X25RES_LINK_IS_CLOSED 0x03 /* HDLC_LINK_CLOSE */
-#define X25RES_INVAL_PARAM 0x31 /* INCOMMING_CALL_CTL */
-#define X25RES_INVAL_CONFIG 0x35 /* REGISTR_RQST/CONFRM */
-
-/*
- * Defines for the 'qdm_bits' field.
- */
-#define X25CMD_Q_BIT_MASK 0x04
-#define X25CMD_D_BIT_MASK 0x02
-#define X25CMD_M_BIT_MASK 0x01
-
-/*
- * Defines for the 'pkt_type' field.
- */
-/*----- Asynchronous events ------*/
-#define ASE_CLEAR_RQST 0x02
-#define ASE_RESET_RQST 0x04
-#define ASE_RESTART_RQST 0x08
-#define ASE_INTERRUPT 0x10
-#define ASE_DTE_REGISTR_RQST 0x20
-#define ASE_CALL_RQST 0x30
-#define ASE_CALL_ACCEPTED 0x31
-#define ASE_CLEAR_CONFRM 0x32
-#define ASE_RESET_CONFRM 0x33
-#define ASE_RESTART_CONFRM 0x34
-#define ASE_INTERRUPT_CONFRM 0x35
-#define ASE_DCE_REGISTR_CONFRM 0x36
-#define ASE_DIAGNOSTIC 0x37
-#define ASE_CALL_AUTO_CLEAR 0x38
-#define AUTO_RESPONSE_FLAG 0x80
-/*----- Time-Out events ----------*/
-#define TOE_RESTART_RQST 0x03
-#define TOE_CALL_RQST 0x05
-#define TOE_CLEAR_RQST 0x08
-#define TOE_RESET_RQST 0x0A
-/*----- Protocol Violation events */
-#define PVE_CLEAR_RQST 0x32
-#define PVE_RESET_RQST 0x33
-#define PVE_RESTART_RQST 0x34
-#define PVE_DIAGNOSTIC 0x37
-
-#define INTR_ON_RX_FRAME 0x01
-#define INTR_ON_TX_FRAME 0x02
-#define INTR_ON_MODEM_STATUS_CHANGE 0x04
-#define INTR_ON_COMMAND_COMPLETE 0x08
-#define INTR_ON_X25_ASY_TRANSACTION 0x10
-#define INTR_ON_TIMER 0x40
-#define DIRECT_RX_INTR_USAGE 0x80
-
-#define NO_INTR_PENDING 0x00
-#define RX_INTR_PENDING 0x01
-#define TX_INTR_PENDING 0x02
-#define MODEM_INTR_PENDING 0x04
-#define COMMAND_COMPLETE_INTR_PENDING 0x08
-#define X25_ASY_TRANS_INTR_PENDING 0x10
-#define TIMER_INTR_PENDING 0x40
-
-/*----------------------------------------------------------------------------
- * X.25 Mailbox.
- * This structure is located at offsets X25_MBOX_OFFS and X25_RXMBOX_OFFS
- * into shared memory window.
- */
-typedef struct X25Mbox
-{
- unsigned char opflag PACKED; /* 00h: execution flag */
- TX25Cmd cmd PACKED; /* 01h: command block */
- unsigned char data[1] PACKED; /* 10h: data buffer */
-} TX25Mbox;
-
-/*----------------------------------------------------------------------------
- * X.25 Time Stamp Structure.
- */
-typedef struct X25TimeStamp
-{
- unsigned char month PACKED;
- unsigned char date PACKED;
- unsigned char sec PACKED;
- unsigned char min PACKED;
- unsigned char hour PACKED;
-} TX25TimeStamp;
-
-/*----------------------------------------------------------------------------
- * X.25 Status Block.
- * This structure is located at offset X25_STATUS_OFF into shared memory
- * window.
- */
-typedef struct X25Status
-{
- unsigned short pvc_map PACKED; /* 00h: PVC map */
- unsigned short icc_map PACKED; /* 02h: Incomming Chan. map */
- unsigned short twc_map PACKED; /* 04h: Two-way Cnan. map */
- unsigned short ogc_map PACKED; /* 06h: Outgoing Chan. map */
- TX25TimeStamp tstamp PACKED; /* 08h: timestamp (BCD) */
- unsigned char iflags PACKED; /* 0Dh: interrupt flags */
- unsigned char imask PACKED; /* 0Eh: interrupt mask */
- unsigned char resrv PACKED; /* 0Eh: */
- unsigned char gflags PACKED; /* 10h: misc. HDLC/X25 flags */
- unsigned char cflags[X25_MAX_CHAN] PACKED; /* channel status bytes */
-} TX25Status;
-
-/*
- * Bitmasks for the 'iflags' field.
- */
-#define X25_RX_INTR 0x01 /* receive interrupt */
-#define X25_TX_INTR 0x02 /* transmit interrupt */
-#define X25_MODEM_INTR 0x04 /* modem status interrupt (CTS/DCD) */
-#define X25_EVENT_INTR 0x10 /* asyncronous event encountered */
-#define X25_CMD_INTR 0x08 /* interface command complete */
-
-/*
- * Bitmasks for the 'gflags' field.
- */
-#define X25_HDLC_ABM 0x01 /* HDLC is in ABM mode */
-#define X25_RX_READY 0x02 /* X.25 data available */
-#define X25_TRACE_READY 0x08 /* trace data available */
-#define X25_EVENT_IND 0x20 /* asynchronous event indicator */
-#define X25_TX_READY 0x40 /* space is available in Tx buf.*/
-
-/*
- * Bitmasks for the 'cflags' field.
- */
-#define X25_XFER_MODE 0x80 /* channel is in data transfer mode */
-#define X25_TXWIN_OPEN 0x40 /* transmit window open */
-#define X25_RXBUF_MASK 0x3F /* number of data buffers available */
-
-/*****************************************************************************
- * Following definitions structurize contents of the TX25Mbox.data field for
- * different X.25 interface commands.
- ****************************************************************************/
-
-/* ---------------------------------------------------------------------------
- * X25_SET_GLOBAL_VARS Command.
- */
-typedef struct X25GlobalVars
-{
- unsigned char resrv PACKED; /* 00h: reserved */
- unsigned char dtrCtl PACKED; /* 01h: DTR control code */
- unsigned char resErr PACKED; /* 01h: '1' - reset modem error */
-} TX25GlobalVars;
-
-/*
- * Defines for the 'dtrCtl' field.
- */
-#define X25_RAISE_DTR 0x01
-#define X25_DROP_DTR 0x02
-
-/* ---------------------------------------------------------------------------
- * X25_READ_MODEM_STATUS Command.
- */
-typedef struct X25ModemStatus
-{
- unsigned char status PACKED; /* 00h: modem status */
-} TX25ModemStatus;
-
-/*
- * Defines for the 'status' field.
- */
-#define X25_CTS_MASK 0x20
-#define X25_DCD_MASK 0x08
-
-/* ---------------------------------------------------------------------------
- * X25_HDLC_LINK_STATUS Command.
- */
-typedef struct X25LinkStatus
-{
- unsigned char txQueued PACKED; /* 00h: queued Tx I-frames*/
- unsigned char rxQueued PACKED; /* 01h: queued Rx I-frames*/
- unsigned char station PACKED; /* 02h: DTE/DCE config. */
- unsigned char reserved PACKED; /* 03h: reserved */
- unsigned char sfTally PACKED; /* 04h: supervisory frame tally */
-} TX25LinkStatus;
-
-/*
- * Defines for the 'station' field.
- */
-#define X25_STATION_DTE 0x01 /* station configured as DTE */
-#define X25_STATION_DCE 0x02 /* station configured as DCE */
-
-/* ---------------------------------------------------------------------------
- * X25_HDLC_READ_STATS Command.
- */
-typedef struct HdlcStats
-{ /* a number of ... */
- unsigned short rxIFrames PACKED; /* 00h: ready Rx I-frames */
- unsigned short rxNoseq PACKED; /* 02h: frms out-of-sequence */
- unsigned short rxNodata PACKED; /* 04h: I-frms without data */
- unsigned short rxDiscarded PACKED; /* 06h: discarded frames */
- unsigned short rxTooLong PACKED; /* 08h: frames too long */
- unsigned short rxBadAddr PACKED; /* 0Ah: frms with inval.addr*/
- unsigned short txAcked PACKED; /* 0Ch: acknowledged I-frms */
- unsigned short txRetransm PACKED; /* 0Eh: re-transmit. I-frms */
- unsigned short t1Timeout PACKED; /* 10h: T1 timeouts */
- unsigned short rxSABM PACKED; /* 12h: received SABM frames */
- unsigned short rxDISC PACKED; /* 14h: received DISC frames */
- unsigned short rxDM PACKED; /* 16h: received DM frames */
- unsigned short rxFRMR PACKED; /* 18h: FRMR frames received */
- unsigned short txSABM PACKED; /* 1Ah: transm. SABM frames*/
- unsigned short txDISC PACKED; /* 1Ch: transm. DISC frames*/
- unsigned short txDM PACKED; /* 1Eh: transm. DM frames */
- unsigned short txFRMR PACKED; /* 20h: transm. FRMR frames*/
-} THdlcStats;
-
-/* ---------------------------------------------------------------------------
- * X25_HDLC_READ_COMM_ERR Command.
- */
-typedef struct HdlcCommErr
-{ /* a number of ... */
- unsigned char rxOverrun PACKED; /* 00h: Rx overrun errors */
- unsigned char rxBadCrc PACKED; /* 01h: Rx CRC errors */
- unsigned char rxAborted PACKED; /* 02h: Rx aborted frames */
- unsigned char rxDropped PACKED; /* 03h: frames lost */
- unsigned char txAborted PACKED; /* 04h: Tx aborted frames */
- unsigned char txUnderrun PACKED; /* 05h: Tx underrun errors */
- unsigned char txMissIntr PACKED; /* 06h: missed underrun ints */
- unsigned char reserved PACKED; /* 07h: reserved */
- unsigned char droppedDCD PACKED; /* 08h: times DCD dropped */
- unsigned char droppedCTS PACKED; /* 09h: times CTS dropped */
-} THdlcCommErr;
-
-/* ---------------------------------------------------------------------------
- * X25_SET_CONFIGURATION & X25_READ_CONFIGURATION Commands.
- */
-typedef struct X25Config
-{
-unsigned char baudRate PACKED; /* 00h: */
- unsigned char t1 PACKED; /* 01h: */
- unsigned char t2 PACKED; /* 02h: */
- unsigned char n2 PACKED; /* 03h: */
- unsigned short hdlcMTU PACKED; /* 04h: */
- unsigned char hdlcWindow PACKED; /* 06h: */
- unsigned char t4 PACKED; /* 07h: */
- unsigned char autoModem PACKED; /* 08h: */
- unsigned char autoHdlc PACKED; /* 09h: */
- unsigned char hdlcOptions PACKED; /* 0Ah: */
- unsigned char station PACKED; /* 0Bh: */
- unsigned char pktWindow PACKED; /* 0Ch: */
- unsigned short defPktSize PACKED; /* 0Dh: */
- unsigned short pktMTU PACKED; /* 0Fh: */
- unsigned short loPVC PACKED; /* 11h: */
- unsigned short hiPVC PACKED; /* 13h: */
- unsigned short loIncommingSVC PACKED; /* 15h: */
- unsigned short hiIncommingSVC PACKED; /* 17h: */
- unsigned short loTwoWaySVC PACKED; /* 19h: */
- unsigned short hiTwoWaySVC PACKED; /* 1Bh: */
- unsigned short loOutgoingSVC PACKED; /* 1Dh: */
- unsigned short hiOutgoingSVC PACKED; /* 1Fh: */
- unsigned short options PACKED; /* 21h: */
- unsigned char responseOpt PACKED; /* 23h: */
- unsigned short facil1 PACKED; /* 24h: */
- unsigned short facil2 PACKED; /* 26h: */
- unsigned short ccittFacil PACKED; /* 28h: */
- unsigned short otherFacil PACKED; /* 2Ah: */
- unsigned short ccittCompat PACKED; /* 2Ch: */
- unsigned char t10t20 PACKED; /* 2Eh: */
- unsigned char t11t21 PACKED; /* 2Fh: */
- unsigned char t12t22 PACKED; /* 30h: */
- unsigned char t13t23 PACKED; /* 31h: */
- unsigned char t16t26 PACKED; /* 32H: */
- unsigned char t28 PACKED; /* 33h: */
- unsigned char r10r20 PACKED; /* 34h: */
- unsigned char r12r22 PACKED; /* 35h: */
- unsigned char r13r23 PACKED; /* 36h: */
-} TX25Config;
-
-/* ---------------------------------------------------------------------------
- * X25_READ_CHANNEL_CONFIG Command.
- */
-typedef struct X25ChanAlloc /*----- Channel allocation -*/
-{
- unsigned short loPVC PACKED; /* 00h: lowest PVC number */
- unsigned short hiPVC PACKED; /* 02h: highest PVC number */
- unsigned short loIncommingSVC PACKED; /* 04h: lowest incoming SVC */
- unsigned short hiIncommingSVC PACKED; /* 06h: highest incoming SVC */
- unsigned short loTwoWaySVC PACKED; /* 08h: lowest two-way SVC */
- unsigned short hiTwoWaySVC PACKED; /* 0Ah: highest two-way SVC */
- unsigned short loOutgoingSVC PACKED; /* 0Ch: lowest outgoing SVC */
- unsigned short hiOutgoingSVC PACKED; /* 0Eh: highest outgoing SVC */
-} TX25ChanAlloc;
-
-typedef struct X25ChanCfg /*------ Channel configuration -----*/
-{
- unsigned char type PACKED; /* 00h: channel type */
- unsigned char txConf PACKED; /* 01h: Tx packet and window sizes */
- unsigned char rxConf PACKED; /* 01h: Rx packet and window sizes */
-} TX25ChanCfg;
-
-/*
- * Defines for the 'type' field.
- */
-#define X25_PVC 0x01 /* PVC */
-#define X25_SVC_IN 0x03 /* Incoming SVC */
-#define X25_SVC_TWOWAY 0x07 /* Two-way SVC */
-#define X25_SVC_OUT 0x0B /* Outgoing SVC */
-
-/*----------------------------------------------------------------------------
- * X25_READ_STATISTICS Command.
- */
-typedef struct X25Stats
-{ /* number of packets Tx/Rx'ed */
- unsigned short txRestartRqst PACKED; /* 00h: Restart Request */
- unsigned short rxRestartRqst PACKED; /* 02h: Restart Request */
- unsigned short txRestartConf PACKED; /* 04h: Restart Confirmation */
- unsigned short rxRestartConf PACKED; /* 06h: Restart Confirmation */
- unsigned short txResetRqst PACKED; /* 08h: Reset Request */
- unsigned short rxResetRqst PACKED; /* 0Ah: Reset Request */
- unsigned short txResetConf PACKED; /* 0Ch: Reset Confirmation */
- unsigned short rxResetConf PACKED; /* 0Eh: Reset Confirmation */
- unsigned short txCallRequest PACKED; /* 10h: Call Request */
- unsigned short rxCallRequest PACKED; /* 12h: Call Request */
- unsigned short txCallAccept PACKED; /* 14h: Call Accept */
- unsigned short rxCallAccept PACKED; /* 16h: Call Accept */
- unsigned short txClearRqst PACKED; /* 18h: Clear Request */
- unsigned short rxClearRqst PACKED; /* 1Ah: Clear Request */
- unsigned short txClearConf PACKED; /* 1Ch: Clear Confirmation */
- unsigned short rxClearConf PACKED; /* 1Eh: Clear Confirmation */
- unsigned short txDiagnostic PACKED; /* 20h: Diagnostic */
- unsigned short rxDiagnostic PACKED; /* 22h: Diagnostic */
- unsigned short txRegRqst PACKED; /* 24h: Registration Request */
- unsigned short rxRegRqst PACKED; /* 26h: Registration Request */
- unsigned short txRegConf PACKED; /* 28h: Registration Confirm.*/
- unsigned short rxRegConf PACKED; /* 2Ah: Registration Confirm.*/
- unsigned short txInterrupt PACKED; /* 2Ch: Interrupt */
- unsigned short rxInterrupt PACKED; /* 2Eh: Interrupt */
- unsigned short txIntrConf PACKED; /* 30h: Interrupt Confirm. */
- unsigned short rxIntrConf PACKED; /* 32h: Interrupt Confirm. */
- unsigned short txData PACKED; /* 34h: Data */
- unsigned short rxData PACKED; /* 36h: Data */
- unsigned short txRR PACKED; /* 38h: RR */
- unsigned short rxRR PACKED; /* 3Ah: RR */
- unsigned short txRNR PACKED; /* 3Ch: RNR */
- unsigned short rxRNR PACKED; /* 3Eh: RNR */
-} TX25Stats;
-
-/*----------------------------------------------------------------------------
- * X25_READ_HISTORY_TABLE Command.
- */
-typedef struct X25EventLog
-{
- unsigned char type PACKED; /* 00h: transaction type */
- unsigned short lcn PACKED; /* 01h: logical channel num */
- unsigned char packet PACKED; /* 03h: async packet type */
- unsigned char cause PACKED; /* 04h: X.25 cause field */
- unsigned char diag PACKED; /* 05h: X.25 diag field */
- TX25TimeStamp ts PACKED; /* 06h: time stamp */
-} TX25EventLog;
-
-/*
- * Defines for the 'type' field.
- */
-#define X25LOG_INCOMMING 0x00
-#define X25LOG_APPLICATION 0x01
-#define X25LOG_AUTOMATIC 0x02
-#define X25LOG_ERROR 0x04
-#define X25LOG_TIMEOUT 0x08
-#define X25LOG_RECOVERY 0x10
-
-/*
- * Defines for the 'packet' field.
- */
-#define X25LOG_CALL_RQST 0x0B
-#define X25LOG_CALL_ACCEPTED 0x0F
-#define X25LOG_CLEAR_RQST 0x13
-#define X25LOG_CLEAR_CONFRM 0x17
-#define X25LOG_RESET_RQST 0x1B
-#define X25LOG_RESET_CONFRM 0x1F
-#define X25LOG_RESTART_RQST 0xFB
-#define X25LOG_RESTART_COMFRM 0xFF
-#define X25LOG_DIAGNOSTIC 0xF1
-#define X25LOG_DTE_REG_RQST 0xF3
-#define X25LOG_DTE_REG_COMFRM 0xF7
-
-/* ---------------------------------------------------------------------------
- * X25_TRACE_CONFIGURE Command.
- */
-typedef struct X25TraceCfg
-{
- unsigned char flags PACKED; /* 00h: trace configuration flags */
- unsigned char timeout PACKED; /* 01h: timeout for trace delay mode*/
-} TX25TraceCfg;
-
-/*
- * Defines for the 'flags' field.
- */
-#define X25_TRC_ENABLE 0x01 /* bit0: '1' - trace enabled */
-#define X25_TRC_TIMESTAMP 0x02 /* bit1: '1' - time stamping enabled*/
-#define X25_TRC_DELAY 0x04 /* bit2: '1' - trace delay enabled */
-#define X25_TRC_DATA 0x08 /* bit3: '1' - trace data packets */
-#define X25_TRC_SUPERVISORY 0x10 /* bit4: '1' - trace suprvisory pkts*/
-#define X25_TRC_ASYNCHRONOUS 0x20 /* bit5: '1' - trace asynch. packets*/
-#define X25_TRC_HDLC 0x40 /* bit6: '1' - trace all packets */
-#define X25_TRC_READ 0x80 /* bit7: '1' - get current config. */
-
-/* ---------------------------------------------------------------------------
- * X25_READ_TRACE_DATA Command.
- */
-typedef struct X25Trace /*----- Trace data structure -------*/
-{
- unsigned short length PACKED; /* 00h: trace data length */
- unsigned char type PACKED; /* 02h: trace type */
- unsigned char lost_cnt PACKED; /* 03h: N of traces lost */
- TX25TimeStamp tstamp PACKED; /* 04h: mon/date/sec/min/hour */
- unsigned short millisec PACKED; /* 09h: ms time stamp */
- unsigned char data[0] PACKED; /* 0Bh: traced frame */
-} TX25Trace;
-
-/*
- * Defines for the 'type' field.
- */
-#define X25_TRC_TYPE_MASK 0x0F /* bits 0..3: trace type */
-#define X25_TRC_TYPE_RX_FRAME 0x00 /* received frame trace */
-#define X25_TRC_TYPE_TX_FRAME 0x01 /* transmitted frame */
-#define X25_TRC_TYPE_ERR_FRAME 0x02 /* error frame */
-
-#define X25_TRC_ERROR_MASK 0xF0 /* bits 4..7: error code */
-#define X25_TRCERR_RX_ABORT 0x10 /* receive abort error */
-#define X25_TRCERR_RX_BADCRC 0x20 /* receive CRC error */
-#define X25_TRCERR_RX_OVERRUN 0x30 /* receiver overrun error */
-#define X25_TRCERR_RX_TOO_LONG 0x40 /* excessive frame length error */
-#define X25_TRCERR_TX_ABORT 0x70 /* aborted frame transmittion error */
-#define X25_TRCERR_TX_UNDERRUN 0x80 /* transmit underrun error */
-
-/*****************************************************************************
- * Following definitions describe HDLC frame and X.25 packet formats.
- ****************************************************************************/
-
-typedef struct HDLCFrame /*----- DHLC Frame Format ----------*/
-{
- unsigned char addr PACKED; /* address field */
- unsigned char cntl PACKED; /* control field */
- unsigned char data[0] PACKED;
-} THDLCFrame;
-
-typedef struct X25Pkt /*----- X.25 Paket Format ----------*/
-{
- unsigned char lcn_hi PACKED; /* 4 MSB of Logical Channel Number */
- unsigned char lcn_lo PACKED; /* 8 LSB of Logical Channel Number */
- unsigned char type PACKED;
- unsigned char data[0] PACKED;
-} TX25Pkt;
-
-/*
- * Defines for the 'lcn_hi' field.
- */
-#define X25_Q_BIT_MASK 0x80 /* Data Qualifier Bit mask */
-#define X25_D_BIT_MASK 0x40 /* Delivery Confirmation Bit mask */
-#define X25_M_BITS_MASK 0x30 /* Modulo Bits mask */
-#define X25_LCN_MSB_MASK 0x0F /* LCN most significant bits mask */
-
-/*
- * Defines for the 'type' field.
- */
-#define X25PKT_DATA 0x01 /* Data packet mask */
-#define X25PKT_SUPERVISORY 0x02 /* Supervisory packet mask */
-#define X25PKT_CALL_RQST 0x0B /* Call Request/Incoming */
-#define X25PKT_CALL_ACCEPTED 0x0F /* Call Accepted/Connected */
-#define X25PKT_CLEAR_RQST 0x13 /* Clear Request/Indication */
-#define X25PKT_CLEAR_CONFRM 0x17 /* Clear Confirmation */
-#define X25PKT_RESET_RQST 0x1B /* Reset Request/Indication */
-#define X25PKT_RESET_CONFRM 0x1F /* Reset Confirmation */
-#define X25PKT_RESTART_RQST 0xFB /* Restart Request/Indication */
-#define X25PKT_RESTART_CONFRM 0xFF /* Restart Confirmation */
-#define X25PKT_INTERRUPT 0x23 /* Interrupt */
-#define X25PKT_INTERRUPT_CONFRM 0x27 /* Interrupt Confirmation */
-#define X25PKT_DIAGNOSTIC 0xF1 /* Diagnostic */
-#define X25PKT_REGISTR_RQST 0xF3 /* Registration Request */
-#define X25PKT_REGISTR_CONFRM 0xF7 /* Registration Confirmation */
-#define X25PKT_RR_MASKED 0x01 /* Receive Ready packet after masking */
-#define X25PKT_RNR_MASKED 0x05 /* Receive Not Ready after masking */
-
-
-typedef struct {
- TX25Cmd cmd PACKED;
- char data[X25_MAX_DATA] PACKED;
-} mbox_cmd_t;
-
-
-typedef struct {
- unsigned char qdm PACKED; /* Q/D/M bits */
- unsigned char cause PACKED; /* cause field */
- unsigned char diagn PACKED; /* diagnostics */
- unsigned char pktType PACKED;
- unsigned short length PACKED;
- unsigned char result PACKED;
- unsigned short lcn PACKED;
- char reserved[7] PACKED;
-}x25api_hdr_t;
-
-
-typedef struct {
- x25api_hdr_t hdr PACKED;
- char data[X25_MAX_DATA] PACKED;
-}x25api_t;
-
-
-/*
- * XPIPEMON Definitions
- */
-
-/* valid ip_protocol for UDP management */
-#define UDPMGMT_UDP_PROTOCOL 0x11
-#define UDPMGMT_XPIPE_SIGNATURE "XLINK8ND"
-#define UDPMGMT_DRVRSTATS_SIGNATURE "DRVSTATS"
-
-/* values for request/reply byte */
-#define UDPMGMT_REQUEST 0x01
-#define UDPMGMT_REPLY 0x02
-#define UDP_OFFSET 12
-
-
-typedef struct {
- unsigned char opp_flag PACKED; /* the opp flag */
- unsigned char command PACKED; /* command code */
- unsigned short length PACKED; /* transfer data length */
- unsigned char result PACKED; /* return code */
- unsigned char pf PACKED; /* P/F bit */
- unsigned short lcn PACKED; /* logical channel */
- unsigned char qdm PACKED; /* Q/D/M bits */
- unsigned char cause PACKED; /* cause field */
- unsigned char diagn PACKED; /* diagnostics */
- unsigned char pktType PACKED; /* packet type */
- unsigned char resrv[4] PACKED; /* reserved */
-} cblock_t;
-
-typedef struct {
- ip_pkt_t ip_pkt PACKED;
- udp_pkt_t udp_pkt PACKED;
- wp_mgmt_t wp_mgmt PACKED;
- cblock_t cblock PACKED;
- unsigned char data[4080] PACKED;
-} x25_udp_pkt_t;
-
-
-typedef struct read_hdlc_stat {
- unsigned short inf_frames_rx_ok PACKED;
- unsigned short inf_frames_rx_out_of_seq PACKED;
- unsigned short inf_frames_rx_no_data PACKED;
- unsigned short inf_frames_rx_dropped PACKED;
- unsigned short inf_frames_rx_data_too_long PACKED;
- unsigned short inf_frames_rx_invalid_addr PACKED;
- unsigned short inf_frames_tx_ok PACKED;
- unsigned short inf_frames_tx_retransmit PACKED;
- unsigned short T1_timeouts PACKED;
- unsigned short SABM_frames_rx PACKED;
- unsigned short DISC_frames_rx PACKED;
- unsigned short DM_frames_rx PACKED;
- unsigned short FRMR_frames_rx PACKED;
- unsigned short SABM_frames_tx PACKED;
- unsigned short DISC_frames_tx PACKED;
- unsigned short DM_frames_tx PACKED;
- unsigned short FRMR_frames_tx PACKED;
-} read_hdlc_stat_t;
-
-typedef struct read_comms_err_stats{
- unsigned char overrun_err_rx PACKED;
- unsigned char CRC_err PACKED;
- unsigned char abort_frames_rx PACKED;
- unsigned char frames_dropped_buf_full PACKED;
- unsigned char abort_frames_tx PACKED;
- unsigned char transmit_underruns PACKED;
- unsigned char missed_tx_underruns_intr PACKED;
- unsigned char reserved PACKED;
- unsigned char DCD_drop PACKED;
- unsigned char CTS_drop PACKED;
-} read_comms_err_stats_t;
-
-typedef struct trace_data {
- unsigned short length PACKED;
- unsigned char type PACKED;
- unsigned char trace_dropped PACKED;
- unsigned char reserved[5] PACKED;
- unsigned short timestamp PACKED;
- unsigned char data PACKED;
-} trace_data_t;
-
-enum {UDP_XPIPE_TYPE};
-
-#define XPIPE_ENABLE_TRACING 0x14
-#define XPIPE_DISABLE_TRACING 0x14
-#define XPIPE_GET_TRACE_INFO 0x16
-#define XPIPE_FT1_READ_STATUS 0x74
-#define XPIPE_DRIVER_STAT_IFSEND 0x75
-#define XPIPE_DRIVER_STAT_INTR 0x76
-#define XPIPE_DRIVER_STAT_GEN 0x77
-#define XPIPE_FLUSH_DRIVER_STATS 0x78
-#define XPIPE_ROUTER_UP_TIME 0x79
-#define XPIPE_SET_FT1_MODE 0x81
-#define XPIPE_FT1_STATUS_CTRL 0x80
-
-
-/* error messages */
-#define NO_BUFFS_OR_CLOSED_WIN 0x33
-#define DATA_LENGTH_TOO_BIG 0x32
-#define NO_DATA_AVAILABLE 0x33
-#define Z80_TIMEOUT_ERROR 0x0a
-#define NO_BUFFS 0x08
-
-
-/* Trace options */
-#define TRACE_DEFAULT 0x03
-#define TRACE_SUPERVISOR_FRMS 0x10
-#define TRACE_ASYNC_FRMS 0x20
-#define TRACE_ALL_HDLC_FRMS 0x40
-#define TRACE_DATA_FRMS 0x08
-
-
-#endif /* _SDLA_X25_H */
diff --git a/include/linux/sdladrv.h b/include/linux/sdladrv.h
deleted file mode 100644
index c85e103d5e7b..000000000000
--- a/include/linux/sdladrv.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*****************************************************************************
-* sdladrv.h SDLA Support Module. Kernel API Definitions.
-*
-* Author: Gideon Hack
-*
-* Copyright: (c) 1995-2000 Sangoma Technologies Inc.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version
-* 2 of the License, or (at your option) any later version.
-* ============================================================================
-* Jun 02, 1999 Gideon Hack Added support for the S514 PCI adapter.
-* Dec 11, 1996 Gene Kozin Complete overhaul.
-* Oct 17, 1996 Gene Kozin Minor bug fixes.
-* Jun 12, 1996 Gene Kozin Added support for S503 card.
-* Dec 06, 1995 Gene Kozin Initial version.
-*****************************************************************************/
-#ifndef _SDLADRV_H
-#define _SDLADRV_H
-
-
-#define SDLA_MAXIORANGE 4 /* maximum I/O port range */
-#define SDLA_WINDOWSIZE 0x2000 /* default dual-port memory window size */
-/****** Data Structures *****************************************************/
-
-/*----------------------------------------------------------------------------
- * Adapter hardware configuration. Pointer to this structure is passed to all
- * APIs.
- */
-typedef struct sdlahw
-{
- unsigned type; /* adapter type */
- unsigned fwid; /* firmware ID */
- unsigned port; /* adapter I/O port base */
- int irq; /* interrupt request level */
- char S514_cpu_no[1]; /* PCI CPU Number */
- unsigned char S514_slot_no; /* PCI Slot Number */
- char auto_pci_cfg; /* Autodetect PCI Slot */
- struct pci_dev *pci_dev; /* PCI device */
- void * dpmbase; /* dual-port memory base */
- unsigned dpmsize; /* dual-port memory size */
- unsigned pclk; /* CPU clock rate, kHz */
- unsigned long memory; /* memory size */
- unsigned long vector; /* local offset of the DPM window */
- unsigned io_range; /* I/O port range */
- unsigned char regs[SDLA_MAXIORANGE]; /* was written to registers */
- unsigned reserved[5];
-} sdlahw_t;
-
-/****** Function Prototypes *************************************************/
-
-extern int sdla_setup (sdlahw_t* hw, void* sfm, unsigned len);
-extern int sdla_down (sdlahw_t* hw);
-extern void S514_intack (sdlahw_t* hw, u32 int_status);
-extern void read_S514_int_stat (sdlahw_t* hw, u32* int_status);
-extern int sdla_mapmem (sdlahw_t* hw, unsigned long addr);
-extern int sdla_peek (sdlahw_t* hw, unsigned long addr, void* buf,
- unsigned len);
-extern int sdla_poke (sdlahw_t* hw, unsigned long addr, void* buf,
- unsigned len);
-extern int sdla_exec (void* opflag);
-
-extern unsigned wanpipe_hw_probe(void);
-
-#endif /* _SDLADRV_H */
diff --git a/include/linux/sdlapci.h b/include/linux/sdlapci.h
deleted file mode 100644
index 6f7c904f188d..000000000000
--- a/include/linux/sdlapci.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
-* sdlapci.h WANPIPE(tm) Multiprotocol WAN Link Driver.
-* Definitions for the SDLA PCI adapter.
-*
-* Author: Gideon Hack <ghack@sangoma.com>
-*
-* Copyright: (c) 1999-2000 Sangoma Technologies Inc.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version
-* 2 of the License, or (at your option) any later version.
-* ============================================================================
-* Jun 02, 1999 Gideon Hack Initial version.
-*****************************************************************************/
-#ifndef _SDLAPCI_H
-#define _SDLAPCI_H
-
-/****** Defines *************************************************************/
-
-/* Definitions for identifying and finding S514 PCI adapters */
-#define V3_VENDOR_ID 0x11B0 /* V3 vendor ID number */
-#define V3_DEVICE_ID 0x0002 /* V3 device ID number */
-#define SANGOMA_SUBSYS_VENDOR 0x4753 /* ID for Sangoma */
-#define PCI_DEV_SLOT_MASK 0x1F /* mask for slot numbering */
-#define PCI_IRQ_NOT_ALLOCATED 0xFF /* interrupt line for no IRQ */
-
-/* Local PCI register offsets */
-#define PCI_VENDOR_ID_WORD 0x00 /* vendor ID */
-#define PCI_IO_BASE_DWORD 0x10 /* IO base */
-#define PCI_MEM_BASE0_DWORD 0x14 /* memory base - apperture 0 */
-#define PCI_MEM_BASE1_DWORD 0x18 /* memory base - apperture 1 */
-#define PCI_SUBSYS_VENDOR_WORD 0x2C /* subsystem vendor ID */
-#define PCI_INT_LINE_BYTE 0x3C /* interrupt line */
-#define PCI_INT_PIN_BYTE 0x3D /* interrupt pin */
-#define PCI_MAP0_DWORD 0x40 /* PCI to local bus address 0 */
-#define PCI_MAP1_DWORD 0x44 /* PCI to local bus address 1 */
-#define PCI_INT_STATUS 0x48 /* interrupt status */
-#define PCI_INT_CONFIG 0x4C /* interrupt configuration */
-
-/* Local PCI register usage */
-#define PCI_MEMORY_ENABLE 0x00000003 /* enable PCI memory */
-#define PCI_CPU_A_MEM_DISABLE 0x00000002 /* disable CPU A memory */
-#define PCI_CPU_B_MEM_DISABLE 0x00100002 /* disable CPU B memory */
-#define PCI_ENABLE_IRQ_CPU_A 0x005A0004 /* enable IRQ for CPU A */
-#define PCI_ENABLE_IRQ_CPU_B 0x005A0008 /* enable IRQ for CPU B */
-#define PCI_DISABLE_IRQ_CPU_A 0x00000004 /* disable IRQ for CPU A */
-#define PCI_DISABLE_IRQ_CPU_B 0x00000008 /* disable IRQ for CPU B */
-
-/* Setting for the Interrupt Status register */
-#define IRQ_CPU_A 0x04 /* IRQ for CPU A */
-#define IRQ_CPU_B 0x08 /* IRQ for CPU B */
-
-/* The maximum size of the S514 memory */
-#define MAX_SIZEOF_S514_MEMORY (256 * 1024)
-
-/* S514 control register offsets within the memory address space */
-#define S514_CTRL_REG_BYTE 0x80000
-
-/* S514 adapter control bytes */
-#define S514_CPU_HALT 0x00
-#define S514_CPU_START 0x01
-
-/* The maximum number of S514 adapters supported */
-#define MAX_S514_CARDS 20
-
-#define PCI_CARD_TYPE 0x2E
-#define S514_DUAL_CPU 0x12
-#define S514_SINGLE_CPU 0x11
-
-#endif /* _SDLAPCI_H */
-
diff --git a/include/linux/sdlasfm.h b/include/linux/sdlasfm.h
deleted file mode 100644
index 94aaa8ada667..000000000000
--- a/include/linux/sdlasfm.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*****************************************************************************
-* sdlasfm.h WANPIPE(tm) Multiprotocol WAN Link Driver.
-* Definitions for the SDLA Firmware Module (SFM).
-*
-* Author: Gideon Hack
-*
-* Copyright: (c) 1995-1999 Sangoma Technologies Inc.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version
-* 2 of the License, or (at your option) any later version.
-* ============================================================================
-* Jun 02, 1999 Gideon Hack Added support for the S514 adapter.
-* Dec 11, 1996 Gene Kozin Cosmetic changes
-* Apr 16, 1996 Gene Kozin Changed adapter & firmware IDs. Version 2
-* Dec 15, 1995 Gene Kozin Structures chaned
-* Nov 09, 1995 Gene Kozin Initial version.
-*****************************************************************************/
-#ifndef _SDLASFM_H
-#define _SDLASFM_H
-
-/****** Defines *************************************************************/
-
-#define SFM_VERSION 2
-#define SFM_SIGNATURE "SFM - Sangoma SDLA Firmware Module"
-
-/* min/max */
-#define SFM_IMAGE_SIZE 0x8000 /* max size of SDLA code image file */
-#define SFM_DESCR_LEN 256 /* max length of description string */
-#define SFM_MAX_SDLA 16 /* max number of compatible adapters */
-
-/* Adapter types */
-#define SDLA_S502A 5020
-#define SDLA_S502E 5021
-#define SDLA_S503 5030
-#define SDLA_S508 5080
-#define SDLA_S507 5070
-#define SDLA_S509 5090
-#define SDLA_S514 5140
-
-/* S514 PCI adapter CPU numbers */
-#define S514_CPU_A 'A'
-#define S514_CPU_B 'B'
-
-
-/* Firmware identification numbers:
- * 0 .. 999 Test & Diagnostics
- * 1000 .. 1999 Streaming HDLC
- * 2000 .. 2999 Bisync
- * 3000 .. 3999 SDLC
- * 4000 .. 4999 HDLC
- * 5000 .. 5999 X.25
- * 6000 .. 6999 Frame Relay
- * 7000 .. 7999 PPP
- * 8000 .. 8999 Cisco HDLC
- */
-#define SFID_CALIB502 200
-#define SFID_STRM502 1200
-#define SFID_STRM508 1800
-#define SFID_BSC502 2200
-#define SFID_SDLC502 3200
-#define SFID_HDLC502 4200
-#define SFID_HDLC508 4800
-#define SFID_X25_502 5200
-#define SFID_X25_508 5800
-#define SFID_FR502 6200
-#define SFID_FR508 6800
-#define SFID_PPP502 7200
-#define SFID_PPP508 7800
-#define SFID_PPP514 7140
-#define SFID_CHDLC508 8800
-#define SFID_CHDLC514 8140
-
-/****** Data Types **********************************************************/
-
-typedef struct sfm_info /* firmware module information */
-{
- unsigned short codeid; /* firmware ID */
- unsigned short version; /* firmaware version number */
- unsigned short adapter[SFM_MAX_SDLA]; /* compatible adapter types */
- unsigned long memsize; /* minimum memory size */
- unsigned short reserved[2]; /* reserved */
- unsigned short startoffs; /* entry point offset */
- unsigned short winoffs; /* dual-port memory window offset */
- unsigned short codeoffs; /* code load offset */
- unsigned short codesize; /* code size */
- unsigned short dataoffs; /* configuration data load offset */
- unsigned short datasize; /* configuration data size */
-} sfm_info_t;
-
-typedef struct sfm /* SDLA firmware file structire */
-{
- char signature[80]; /* SFM file signature */
- unsigned short version; /* file format version */
- unsigned short checksum; /* info + image */
- unsigned short reserved[6]; /* reserved */
- char descr[SFM_DESCR_LEN]; /* description string */
- sfm_info_t info; /* firmware module info */
- unsigned char image[1]; /* code image (variable size) */
-} sfm_t;
-
-#endif /* _SDLASFM_H */
-
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index fca9b0fb5b4e..5a095572881d 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -73,7 +73,7 @@ static inline int write_tryseqlock(seqlock_t *sl)
}
/* Start of read calculation -- fetch last complete writer token */
-static inline unsigned read_seqbegin(const seqlock_t *sl)
+static __always_inline unsigned read_seqbegin(const seqlock_t *sl)
{
unsigned ret = sl->sequence;
smp_rmb();
@@ -88,7 +88,7 @@ static inline unsigned read_seqbegin(const seqlock_t *sl)
*
* Using xor saves one conditional branch.
*/
-static inline int read_seqretry(const seqlock_t *sl, unsigned iv)
+static __always_inline int read_seqretry(const seqlock_t *sl, unsigned iv)
{
smp_rmb();
return (iv & 1) | (sl->sequence ^ iv);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index c4619a428d9b..f8f234708b98 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -344,6 +344,13 @@ extern void skb_over_panic(struct sk_buff *skb, int len,
void *here);
extern void skb_under_panic(struct sk_buff *skb, int len,
void *here);
+extern void skb_truesize_bug(struct sk_buff *skb);
+
+static inline void skb_truesize_check(struct sk_buff *skb)
+{
+ if (unlikely((int)skb->truesize < sizeof(struct sk_buff) + skb->len))
+ skb_truesize_bug(skb);
+}
extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
int getfrag(void *from, char *to, int offset,
diff --git a/include/linux/string.h b/include/linux/string.h
index dee221429ad0..c61306da8c52 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -13,11 +13,6 @@
extern "C" {
#endif
-extern char * strpbrk(const char *,const char *);
-extern char * strsep(char **,const char *);
-extern __kernel_size_t strspn(const char *,const char *);
-extern __kernel_size_t strcspn(const char *,const char *);
-
extern char *strndup_user(const char __user *, long);
/*
@@ -70,6 +65,18 @@ extern __kernel_size_t strlen(const char *);
#ifndef __HAVE_ARCH_STRNLEN
extern __kernel_size_t strnlen(const char *,__kernel_size_t);
#endif
+#ifndef __HAVE_ARCH_STRPBRK
+extern char * strpbrk(const char *,const char *);
+#endif
+#ifndef __HAVE_ARCH_STRSEP
+extern char * strsep(char **,const char *);
+#endif
+#ifndef __HAVE_ARCH_STRSPN
+extern __kernel_size_t strspn(const char *,const char *);
+#endif
+#ifndef __HAVE_ARCH_STRCSPN
+extern __kernel_size_t strcspn(const char *,const char *);
+#endif
#ifndef __HAVE_ARCH_MEMSET
extern void * memset(void *,int,__kernel_size_t);
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h
index 8f96e9dc369a..77f78e56c481 100644
--- a/include/linux/sunrpc/metrics.h
+++ b/include/linux/sunrpc/metrics.h
@@ -69,9 +69,21 @@ struct rpc_clnt;
/*
* EXPORTed functions for managing rpc_iostats structures
*/
+
+#ifdef CONFIG_PROC_FS
+
struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *);
void rpc_count_iostats(struct rpc_task *);
void rpc_print_iostats(struct seq_file *, struct rpc_clnt *);
void rpc_free_iostats(struct rpc_iostats *);
+#else /* CONFIG_PROC_FS */
+
+static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; }
+static inline void rpc_count_iostats(struct rpc_task *task) {}
+static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {}
+static inline void rpc_free_iostats(struct rpc_iostats *stats) {}
+
+#endif /* CONFIG_PROC_FS */
+
#endif /* _LINUX_SUNRPC_METRICS_H */
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 50cab2a09f28..503564384545 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -197,15 +197,16 @@ svc_take_res_page(struct svc_rqst *rqstp)
return rqstp->rq_respages[rqstp->rq_resused++];
}
-static inline int svc_take_page(struct svc_rqst *rqstp)
+static inline void svc_take_page(struct svc_rqst *rqstp)
{
- if (rqstp->rq_arghi <= rqstp->rq_argused)
- return -ENOMEM;
+ if (rqstp->rq_arghi <= rqstp->rq_argused) {
+ WARN_ON(1);
+ return;
+ }
rqstp->rq_arghi--;
rqstp->rq_respages[rqstp->rq_resused] =
rqstp->rq_argpages[rqstp->rq_arghi];
rqstp->rq_resused++;
- return 0;
}
static inline void svc_pushback_allpages(struct svc_rqst *rqstp)
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 7eebbab7160b..e8bbe8118de8 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -53,6 +53,7 @@ struct rpc_timeout {
struct rpc_task;
struct rpc_xprt;
+struct seq_file;
/*
* This describes a complete RPC request
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 54eac8a39a4c..5b1fdf1cff4f 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -155,6 +155,7 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *
/* linux/mm/page_alloc.c */
extern unsigned long totalram_pages;
extern unsigned long totalhigh_pages;
+extern unsigned long totalreserve_pages;
extern long nr_swap_pages;
extern unsigned int nr_free_pages(void);
extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 5717147596b6..d3ebc0e68b2b 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -569,9 +569,14 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
int flags, int mode);
asmlinkage long sys_unshare(unsigned long unshare_flags);
-asmlinkage long sys_splice(int fdin, int fdout, size_t len,
- unsigned int flags);
+
+asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
+ int fd_out, loff_t __user *off_out,
+ size_t len, unsigned int flags);
+
+asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags);
+
asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
- int flags);
+ unsigned int flags);
#endif
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 392da5a6dacb..1ea5d3cda6ae 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -74,6 +74,7 @@ struct sysfs_dirent {
umode_t s_mode;
struct dentry * s_dentry;
struct iattr * s_iattr;
+ atomic_t s_event;
};
#define SYSFS_ROOT 0x0001
@@ -117,6 +118,7 @@ int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr);
int sysfs_create_group(struct kobject *, const struct attribute_group *);
void sysfs_remove_group(struct kobject *, const struct attribute_group *);
+void sysfs_notify(struct kobject * k, char *dir, char *attr);
#else /* CONFIG_SYSFS */
@@ -185,6 +187,10 @@ static inline void sysfs_remove_group(struct kobject * k, const struct attribute
;
}
+static inline void sysfs_notify(struct kobject * k, char *dir, char *attr)
+{
+}
+
#endif /* CONFIG_SYSFS */
#endif /* _SYSFS_H_ */
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index 0976a163b459..31548303ee37 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -6,9 +6,10 @@ extern int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *c
extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size);
extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size);
extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size);
+void tty_schedule_flip(struct tty_struct *tty);
static inline int tty_insert_flip_char(struct tty_struct *tty,
- unsigned char ch, char flag)
+ unsigned char ch, char flag)
{
struct tty_buffer *tb = tty->buf.tail;
if (tb && tb->active && tb->used < tb->size) {
@@ -19,26 +20,4 @@ static inline int tty_insert_flip_char(struct tty_struct *tty,
return tty_insert_flip_string_flags(tty, &ch, &flag, 1);
}
-static inline void tty_schedule_flip(struct tty_struct *tty)
-{
- unsigned long flags;
- spin_lock_irqsave(&tty->buf.lock, flags);
- if (tty->buf.tail != NULL) {
- tty->buf.tail->active = 0;
- tty->buf.tail->commit = tty->buf.tail->used;
- }
- spin_unlock_irqrestore(&tty->buf.lock, flags);
- schedule_delayed_work(&tty->buf.work, 1);
-}
-
-#undef _INLINE_
-
-
#endif /* _LINUX_TTY_FLIP_H */
-
-
-
-
-
-
-
diff --git a/include/linux/usb/net2280.h b/include/linux/usb/net2280.h
new file mode 100644
index 000000000000..c602f884f182
--- /dev/null
+++ b/include/linux/usb/net2280.h
@@ -0,0 +1,444 @@
+/*
+ * NetChip 2280 high/full speed USB device controller.
+ * Unlike many such controllers, this one talks PCI.
+ */
+#ifndef __LINUX_USB_NET2280_H
+#define __LINUX_USB_NET2280_H
+
+/*
+ * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com)
+ * Copyright (C) 2003 David Brownell
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/* NET2280 MEMORY MAPPED REGISTERS
+ *
+ * The register layout came from the chip documentation, and the bit
+ * number definitions were extracted from chip specification.
+ *
+ * Use the shift operator ('<<') to build bit masks, with readl/writel
+ * to access the registers through PCI.
+ */
+
+/* main registers, BAR0 + 0x0000 */
+struct net2280_regs {
+ // offset 0x0000
+ u32 devinit;
+#define LOCAL_CLOCK_FREQUENCY 8
+#define FORCE_PCI_RESET 7
+#define PCI_ID 6
+#define PCI_ENABLE 5
+#define FIFO_SOFT_RESET 4
+#define CFG_SOFT_RESET 3
+#define PCI_SOFT_RESET 2
+#define USB_SOFT_RESET 1
+#define M8051_RESET 0
+ u32 eectl;
+#define EEPROM_ADDRESS_WIDTH 23
+#define EEPROM_CHIP_SELECT_ACTIVE 22
+#define EEPROM_PRESENT 21
+#define EEPROM_VALID 20
+#define EEPROM_BUSY 19
+#define EEPROM_CHIP_SELECT_ENABLE 18
+#define EEPROM_BYTE_READ_START 17
+#define EEPROM_BYTE_WRITE_START 16
+#define EEPROM_READ_DATA 8
+#define EEPROM_WRITE_DATA 0
+ u32 eeclkfreq;
+ u32 _unused0;
+ // offset 0x0010
+
+ u32 pciirqenb0; /* interrupt PCI master ... */
+#define SETUP_PACKET_INTERRUPT_ENABLE 7
+#define ENDPOINT_F_INTERRUPT_ENABLE 6
+#define ENDPOINT_E_INTERRUPT_ENABLE 5
+#define ENDPOINT_D_INTERRUPT_ENABLE 4
+#define ENDPOINT_C_INTERRUPT_ENABLE 3
+#define ENDPOINT_B_INTERRUPT_ENABLE 2
+#define ENDPOINT_A_INTERRUPT_ENABLE 1
+#define ENDPOINT_0_INTERRUPT_ENABLE 0
+ u32 pciirqenb1;
+#define PCI_INTERRUPT_ENABLE 31
+#define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
+#define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
+#define PCI_TARGET_ABORT_ASSERTED_INTERRUPT_ENABLE 18
+#define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
+#define GPIO_INTERRUPT_ENABLE 13
+#define DMA_D_INTERRUPT_ENABLE 12
+#define DMA_C_INTERRUPT_ENABLE 11
+#define DMA_B_INTERRUPT_ENABLE 10
+#define DMA_A_INTERRUPT_ENABLE 9
+#define EEPROM_DONE_INTERRUPT_ENABLE 8
+#define VBUS_INTERRUPT_ENABLE 7
+#define CONTROL_STATUS_INTERRUPT_ENABLE 6
+#define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
+#define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
+#define RESUME_INTERRUPT_ENABLE 1
+#define SOF_INTERRUPT_ENABLE 0
+ u32 cpu_irqenb0; /* ... or onboard 8051 */
+#define SETUP_PACKET_INTERRUPT_ENABLE 7
+#define ENDPOINT_F_INTERRUPT_ENABLE 6
+#define ENDPOINT_E_INTERRUPT_ENABLE 5
+#define ENDPOINT_D_INTERRUPT_ENABLE 4
+#define ENDPOINT_C_INTERRUPT_ENABLE 3
+#define ENDPOINT_B_INTERRUPT_ENABLE 2
+#define ENDPOINT_A_INTERRUPT_ENABLE 1
+#define ENDPOINT_0_INTERRUPT_ENABLE 0
+ u32 cpu_irqenb1;
+#define CPU_INTERRUPT_ENABLE 31
+#define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
+#define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
+#define PCI_INTA_INTERRUPT_ENABLE 24
+#define PCI_PME_INTERRUPT_ENABLE 23
+#define PCI_SERR_INTERRUPT_ENABLE 22
+#define PCI_PERR_INTERRUPT_ENABLE 21
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
+#define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
+#define GPIO_INTERRUPT_ENABLE 13
+#define DMA_D_INTERRUPT_ENABLE 12
+#define DMA_C_INTERRUPT_ENABLE 11
+#define DMA_B_INTERRUPT_ENABLE 10
+#define DMA_A_INTERRUPT_ENABLE 9
+#define EEPROM_DONE_INTERRUPT_ENABLE 8
+#define VBUS_INTERRUPT_ENABLE 7
+#define CONTROL_STATUS_INTERRUPT_ENABLE 6
+#define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
+#define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
+#define RESUME_INTERRUPT_ENABLE 1
+#define SOF_INTERRUPT_ENABLE 0
+
+ // offset 0x0020
+ u32 _unused1;
+ u32 usbirqenb1;
+#define USB_INTERRUPT_ENABLE 31
+#define POWER_STATE_CHANGE_INTERRUPT_ENABLE 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT_ENABLE 26
+#define PCI_PARITY_ERROR_INTERRUPT_ENABLE 25
+#define PCI_INTA_INTERRUPT_ENABLE 24
+#define PCI_PME_INTERRUPT_ENABLE 23
+#define PCI_SERR_INTERRUPT_ENABLE 22
+#define PCI_PERR_INTERRUPT_ENABLE 21
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT_ENABLE 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT_ENABLE 19
+#define PCI_RETRY_ABORT_INTERRUPT_ENABLE 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT_ENABLE 16
+#define GPIO_INTERRUPT_ENABLE 13
+#define DMA_D_INTERRUPT_ENABLE 12
+#define DMA_C_INTERRUPT_ENABLE 11
+#define DMA_B_INTERRUPT_ENABLE 10
+#define DMA_A_INTERRUPT_ENABLE 9
+#define EEPROM_DONE_INTERRUPT_ENABLE 8
+#define VBUS_INTERRUPT_ENABLE 7
+#define CONTROL_STATUS_INTERRUPT_ENABLE 6
+#define ROOT_PORT_RESET_INTERRUPT_ENABLE 4
+#define SUSPEND_REQUEST_INTERRUPT_ENABLE 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT_ENABLE 2
+#define RESUME_INTERRUPT_ENABLE 1
+#define SOF_INTERRUPT_ENABLE 0
+ u32 irqstat0;
+#define INTA_ASSERTED 12
+#define SETUP_PACKET_INTERRUPT 7
+#define ENDPOINT_F_INTERRUPT 6
+#define ENDPOINT_E_INTERRUPT 5
+#define ENDPOINT_D_INTERRUPT 4
+#define ENDPOINT_C_INTERRUPT 3
+#define ENDPOINT_B_INTERRUPT 2
+#define ENDPOINT_A_INTERRUPT 1
+#define ENDPOINT_0_INTERRUPT 0
+ u32 irqstat1;
+#define POWER_STATE_CHANGE_INTERRUPT 27
+#define PCI_ARBITER_TIMEOUT_INTERRUPT 26
+#define PCI_PARITY_ERROR_INTERRUPT 25
+#define PCI_INTA_INTERRUPT 24
+#define PCI_PME_INTERRUPT 23
+#define PCI_SERR_INTERRUPT 22
+#define PCI_PERR_INTERRUPT 21
+#define PCI_MASTER_ABORT_RECEIVED_INTERRUPT 20
+#define PCI_TARGET_ABORT_RECEIVED_INTERRUPT 19
+#define PCI_RETRY_ABORT_INTERRUPT 17
+#define PCI_MASTER_CYCLE_DONE_INTERRUPT 16
+#define SOF_DOWN_INTERRUPT 14
+#define GPIO_INTERRUPT 13
+#define DMA_D_INTERRUPT 12
+#define DMA_C_INTERRUPT 11
+#define DMA_B_INTERRUPT 10
+#define DMA_A_INTERRUPT 9
+#define EEPROM_DONE_INTERRUPT 8
+#define VBUS_INTERRUPT 7
+#define CONTROL_STATUS_INTERRUPT 6
+#define ROOT_PORT_RESET_INTERRUPT 4
+#define SUSPEND_REQUEST_INTERRUPT 3
+#define SUSPEND_REQUEST_CHANGE_INTERRUPT 2
+#define RESUME_INTERRUPT 1
+#define SOF_INTERRUPT 0
+ // offset 0x0030
+ u32 idxaddr;
+ u32 idxdata;
+ u32 fifoctl;
+#define PCI_BASE2_RANGE 16
+#define IGNORE_FIFO_AVAILABILITY 3
+#define PCI_BASE2_SELECT 2
+#define FIFO_CONFIGURATION_SELECT 0
+ u32 _unused2;
+ // offset 0x0040
+ u32 memaddr;
+#define START 28
+#define DIRECTION 27
+#define FIFO_DIAGNOSTIC_SELECT 24
+#define MEMORY_ADDRESS 0
+ u32 memdata0;
+ u32 memdata1;
+ u32 _unused3;
+ // offset 0x0050
+ u32 gpioctl;
+#define GPIO3_LED_SELECT 12
+#define GPIO3_INTERRUPT_ENABLE 11
+#define GPIO2_INTERRUPT_ENABLE 10
+#define GPIO1_INTERRUPT_ENABLE 9
+#define GPIO0_INTERRUPT_ENABLE 8
+#define GPIO3_OUTPUT_ENABLE 7
+#define GPIO2_OUTPUT_ENABLE 6
+#define GPIO1_OUTPUT_ENABLE 5
+#define GPIO0_OUTPUT_ENABLE 4
+#define GPIO3_DATA 3
+#define GPIO2_DATA 2
+#define GPIO1_DATA 1
+#define GPIO0_DATA 0
+ u32 gpiostat;
+#define GPIO3_INTERRUPT 3
+#define GPIO2_INTERRUPT 2
+#define GPIO1_INTERRUPT 1
+#define GPIO0_INTERRUPT 0
+} __attribute__ ((packed));
+
+/* usb control, BAR0 + 0x0080 */
+struct net2280_usb_regs {
+ // offset 0x0080
+ u32 stdrsp;
+#define STALL_UNSUPPORTED_REQUESTS 31
+#define SET_TEST_MODE 16
+#define GET_OTHER_SPEED_CONFIGURATION 15
+#define GET_DEVICE_QUALIFIER 14
+#define SET_ADDRESS 13
+#define ENDPOINT_SET_CLEAR_HALT 12
+#define DEVICE_SET_CLEAR_DEVICE_REMOTE_WAKEUP 11
+#define GET_STRING_DESCRIPTOR_2 10
+#define GET_STRING_DESCRIPTOR_1 9
+#define GET_STRING_DESCRIPTOR_0 8
+#define GET_SET_INTERFACE 6
+#define GET_SET_CONFIGURATION 5
+#define GET_CONFIGURATION_DESCRIPTOR 4
+#define GET_DEVICE_DESCRIPTOR 3
+#define GET_ENDPOINT_STATUS 2
+#define GET_INTERFACE_STATUS 1
+#define GET_DEVICE_STATUS 0
+ u32 prodvendid;
+#define PRODUCT_ID 16
+#define VENDOR_ID 0
+ u32 relnum;
+ u32 usbctl;
+#define SERIAL_NUMBER_INDEX 16
+#define PRODUCT_ID_STRING_ENABLE 13
+#define VENDOR_ID_STRING_ENABLE 12
+#define USB_ROOT_PORT_WAKEUP_ENABLE 11
+#define VBUS_PIN 10
+#define TIMED_DISCONNECT 9
+#define SUSPEND_IMMEDIATELY 7
+#define SELF_POWERED_USB_DEVICE 6
+#define REMOTE_WAKEUP_SUPPORT 5
+#define PME_POLARITY 4
+#define USB_DETECT_ENABLE 3
+#define PME_WAKEUP_ENABLE 2
+#define DEVICE_REMOTE_WAKEUP_ENABLE 1
+#define SELF_POWERED_STATUS 0
+ // offset 0x0090
+ u32 usbstat;
+#define HIGH_SPEED 7
+#define FULL_SPEED 6
+#define GENERATE_RESUME 5
+#define GENERATE_DEVICE_REMOTE_WAKEUP 4
+ u32 xcvrdiag;
+#define FORCE_HIGH_SPEED_MODE 31
+#define FORCE_FULL_SPEED_MODE 30
+#define USB_TEST_MODE 24
+#define LINE_STATE 16
+#define TRANSCEIVER_OPERATION_MODE 2
+#define TRANSCEIVER_SELECT 1
+#define TERMINATION_SELECT 0
+ u32 setup0123;
+ u32 setup4567;
+ // offset 0x0090
+ u32 _unused0;
+ u32 ouraddr;
+#define FORCE_IMMEDIATE 7
+#define OUR_USB_ADDRESS 0
+ u32 ourconfig;
+} __attribute__ ((packed));
+
+/* pci control, BAR0 + 0x0100 */
+struct net2280_pci_regs {
+ // offset 0x0100
+ u32 pcimstctl;
+#define PCI_ARBITER_PARK_SELECT 13
+#define PCI_MULTI LEVEL_ARBITER 12
+#define PCI_RETRY_ABORT_ENABLE 11
+#define DMA_MEMORY_WRITE_AND_INVALIDATE_ENABLE 10
+#define DMA_READ_MULTIPLE_ENABLE 9
+#define DMA_READ_LINE_ENABLE 8
+#define PCI_MASTER_COMMAND_SELECT 6
+#define MEM_READ_OR_WRITE 0
+#define IO_READ_OR_WRITE 1
+#define CFG_READ_OR_WRITE 2
+#define PCI_MASTER_START 5
+#define PCI_MASTER_READ_WRITE 4
+#define PCI_MASTER_WRITE 0
+#define PCI_MASTER_READ 1
+#define PCI_MASTER_BYTE_WRITE_ENABLES 0
+ u32 pcimstaddr;
+ u32 pcimstdata;
+ u32 pcimststat;
+#define PCI_ARBITER_CLEAR 2
+#define PCI_EXTERNAL_ARBITER 1
+#define PCI_HOST_MODE 0
+} __attribute__ ((packed));
+
+/* dma control, BAR0 + 0x0180 ... array of four structs like this,
+ * for channels 0..3. see also struct net2280_dma: descriptor
+ * that can be loaded into some of these registers.
+ */
+struct net2280_dma_regs { /* [11.7] */
+ // offset 0x0180, 0x01a0, 0x01c0, 0x01e0,
+ u32 dmactl;
+#define DMA_SCATTER_GATHER_DONE_INTERRUPT_ENABLE 25
+#define DMA_CLEAR_COUNT_ENABLE 21
+#define DESCRIPTOR_POLLING_RATE 19
+#define POLL_CONTINUOUS 0
+#define POLL_1_USEC 1
+#define POLL_100_USEC 2
+#define POLL_1_MSEC 3
+#define DMA_VALID_BIT_POLLING_ENABLE 18
+#define DMA_VALID_BIT_ENABLE 17
+#define DMA_SCATTER_GATHER_ENABLE 16
+#define DMA_OUT_AUTO_START_ENABLE 4
+#define DMA_PREEMPT_ENABLE 3
+#define DMA_FIFO_VALIDATE 2
+#define DMA_ENABLE 1
+#define DMA_ADDRESS_HOLD 0
+ u32 dmastat;
+#define DMA_ABORT_DONE_INTERRUPT 27
+#define DMA_SCATTER_GATHER_DONE_INTERRUPT 25
+#define DMA_TRANSACTION_DONE_INTERRUPT 24
+#define DMA_ABORT 1
+#define DMA_START 0
+ u32 _unused0 [2];
+ // offset 0x0190, 0x01b0, 0x01d0, 0x01f0,
+ u32 dmacount;
+#define VALID_BIT 31
+#define DMA_DIRECTION 30
+#define DMA_DONE_INTERRUPT_ENABLE 29
+#define END_OF_CHAIN 28
+#define DMA_BYTE_COUNT_MASK ((1<<24)-1)
+#define DMA_BYTE_COUNT 0
+ u32 dmaaddr;
+ u32 dmadesc;
+ u32 _unused1;
+} __attribute__ ((packed));
+
+/* dedicated endpoint registers, BAR0 + 0x0200 */
+
+struct net2280_dep_regs { /* [11.8] */
+ // offset 0x0200, 0x0210, 0x220, 0x230, 0x240
+ u32 dep_cfg;
+ // offset 0x0204, 0x0214, 0x224, 0x234, 0x244
+ u32 dep_rsp;
+ u32 _unused [2];
+} __attribute__ ((packed));
+
+/* configurable endpoint registers, BAR0 + 0x0300 ... array of seven structs
+ * like this, for ep0 then the configurable endpoints A..F
+ * ep0 reserved for control; E and F have only 64 bytes of fifo
+ */
+struct net2280_ep_regs { /* [11.9] */
+ // offset 0x0300, 0x0320, 0x0340, 0x0360, 0x0380, 0x03a0, 0x03c0
+ u32 ep_cfg;
+#define ENDPOINT_BYTE_COUNT 16
+#define ENDPOINT_ENABLE 10
+#define ENDPOINT_TYPE 8
+#define ENDPOINT_DIRECTION 7
+#define ENDPOINT_NUMBER 0
+ u32 ep_rsp;
+#define SET_NAK_OUT_PACKETS 15
+#define SET_EP_HIDE_STATUS_PHASE 14
+#define SET_EP_FORCE_CRC_ERROR 13
+#define SET_INTERRUPT_MODE 12
+#define SET_CONTROL_STATUS_PHASE_HANDSHAKE 11
+#define SET_NAK_OUT_PACKETS_MODE 10
+#define SET_ENDPOINT_TOGGLE 9
+#define SET_ENDPOINT_HALT 8
+#define CLEAR_NAK_OUT_PACKETS 7
+#define CLEAR_EP_HIDE_STATUS_PHASE 6
+#define CLEAR_EP_FORCE_CRC_ERROR 5
+#define CLEAR_INTERRUPT_MODE 4
+#define CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE 3
+#define CLEAR_NAK_OUT_PACKETS_MODE 2
+#define CLEAR_ENDPOINT_TOGGLE 1
+#define CLEAR_ENDPOINT_HALT 0
+ u32 ep_irqenb;
+#define SHORT_PACKET_OUT_DONE_INTERRUPT_ENABLE 6
+#define SHORT_PACKET_TRANSFERRED_INTERRUPT_ENABLE 5
+#define DATA_PACKET_RECEIVED_INTERRUPT_ENABLE 3
+#define DATA_PACKET_TRANSMITTED_INTERRUPT_ENABLE 2
+#define DATA_OUT_PING_TOKEN_INTERRUPT_ENABLE 1
+#define DATA_IN_TOKEN_INTERRUPT_ENABLE 0
+ u32 ep_stat;
+#define FIFO_VALID_COUNT 24
+#define HIGH_BANDWIDTH_OUT_TRANSACTION_PID 22
+#define TIMEOUT 21
+#define USB_STALL_SENT 20
+#define USB_IN_NAK_SENT 19
+#define USB_IN_ACK_RCVD 18
+#define USB_OUT_PING_NAK_SENT 17
+#define USB_OUT_ACK_SENT 16
+#define FIFO_OVERFLOW 13
+#define FIFO_UNDERFLOW 12
+#define FIFO_FULL 11
+#define FIFO_EMPTY 10
+#define FIFO_FLUSH 9
+#define SHORT_PACKET_OUT_DONE_INTERRUPT 6
+#define SHORT_PACKET_TRANSFERRED_INTERRUPT 5
+#define NAK_OUT_PACKETS 4
+#define DATA_PACKET_RECEIVED_INTERRUPT 3
+#define DATA_PACKET_TRANSMITTED_INTERRUPT 2
+#define DATA_OUT_PING_TOKEN_INTERRUPT 1
+#define DATA_IN_TOKEN_INTERRUPT 0
+ // offset 0x0310, 0x0330, 0x0350, 0x0370, 0x0390, 0x03b0, 0x03d0
+ u32 ep_avail;
+ u32 ep_data;
+ u32 _unused0 [2];
+} __attribute__ ((packed));
+
+#endif /* __LINUX_USB_NET2280_H */
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index fadc535e2925..dc7c621e4647 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
@@ -12,6 +12,11 @@
#else
#define MODULE_VERMAGIC_PREEMPT ""
#endif
+#ifdef CONFIG_MODULE_UNLOAD
+#define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
+#else
+#define MODULE_VERMAGIC_MODULE_UNLOAD ""
+#endif
#ifndef MODULE_ARCH_VERMAGIC
#define MODULE_ARCH_VERMAGIC ""
#endif
@@ -19,5 +24,5 @@
#define VERMAGIC_STRING \
UTS_RELEASE " " \
MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
- MODULE_ARCH_VERMAGIC \
+ MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC \
"gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
diff --git a/include/linux/wanpipe.h b/include/linux/wanpipe.h
deleted file mode 100644
index dae9860091dd..000000000000
--- a/include/linux/wanpipe.h
+++ /dev/null
@@ -1,483 +0,0 @@
-/*****************************************************************************
-* wanpipe.h WANPIPE(tm) Multiprotocol WAN Link Driver.
-* User-level API definitions.
-*
-* Author: Nenad Corbic <ncorbic@sangoma.com>
-* Gideon Hack
-*
-* Copyright: (c) 1995-2000 Sangoma Technologies Inc.
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version
-* 2 of the License, or (at your option) any later version.
-* ============================================================================
-* Nov 3, 2000 Nenad Corbic Added config_id to sdla_t structure.
-* Used to determine the protocol running.
-* Jul 13, 2000 Nenad Corbic Added SyncPPP Support
-* Feb 24, 2000 Nenad Corbic Added support for x25api driver
-* Oct 04, 1999 Nenad Corbic New CHDLC and FRAME RELAY code, SMP support
-* Jun 02, 1999 Gideon Hack Added 'update_call_count' for Cisco HDLC
-* support
-* Jun 26, 1998 David Fong Added 'ip_mode' in sdla_t.u.p for dynamic IP
-* routing mode configuration
-* Jun 12, 1998 David Fong Added Cisco HDLC union member in sdla_t
-* Dec 08, 1997 Jaspreet Singh Added 'authenticator' in union of 'sdla_t'
-* Nov 26, 1997 Jaspreet Singh Added 'load_sharing' structure. Also added
-* 'devs_struct','dev_to_devtint_next' to 'sdla_t'
-* Nov 24, 1997 Jaspreet Singh Added 'irq_dis_if_send_count',
-* 'irq_dis_poll_count' to 'sdla_t'.
-* Nov 06, 1997 Jaspreet Singh Added a define called 'INTR_TEST_MODE'
-* Oct 20, 1997 Jaspreet Singh Added 'buff_intr_mode_unbusy' and
-* 'dlci_intr_mode_unbusy' to 'sdla_t'
-* Oct 18, 1997 Jaspreet Singh Added structure to maintain global driver
-* statistics.
-* Jan 15, 1997 Gene Kozin Version 3.1.0
-* o added UDP management stuff
-* Jan 02, 1997 Gene Kozin Version 3.0.0
-*****************************************************************************/
-#ifndef _WANPIPE_H
-#define _WANPIPE_H
-
-#include <linux/wanrouter.h>
-
-/* Defines */
-
-#ifndef PACKED
-#define PACKED __attribute__((packed))
-#endif
-
-#define WANPIPE_MAGIC 0x414C4453L /* signature: 'SDLA' reversed */
-
-/* IOCTL numbers (up to 16) */
-#define WANPIPE_DUMP (ROUTER_USER+0) /* dump adapter's memory */
-#define WANPIPE_EXEC (ROUTER_USER+1) /* execute firmware command */
-
-#define TRACE_ALL 0x00
-#define TRACE_PROT 0x01
-#define TRACE_DATA 0x02
-
-/* values for request/reply byte */
-#define UDPMGMT_REQUEST 0x01
-#define UDPMGMT_REPLY 0x02
-#define UDP_OFFSET 12
-
-#define MAX_CMD_BUFF 10
-#define MAX_X25_LCN 255 /* Maximum number of x25 channels */
-#define MAX_LCN_NUM 4095 /* Maximum lcn number */
-#define MAX_FT1_RETRY 100
-
-#ifndef AF_WANPIPE
- #define AF_WANPIPE 25
- #ifndef PF_WANPIPE
- #define PF_WANPIPE AF_WANPIPE
- #endif
-#endif
-
-
-#define TX_TIMEOUT 5*HZ
-
-/* General Critical Flags */
-#define SEND_CRIT 0x00
-#define PERI_CRIT 0x01
-
-/* Chdlc and PPP polling critical flag */
-#define POLL_CRIT 0x03
-
-/* Frame Relay Tx IRQ send critical flag */
-#define SEND_TXIRQ_CRIT 0x02
-
-/* Frame Relay ARP critical flag */
-#define ARP_CRIT 0x03
-
-/* Bit maps for dynamic interface configuration
- * DYN_OPT_ON : turns this option on/off
- * DEV_DOWN : device was shutdown by the driver not
- * by user
- */
-#define DYN_OPT_ON 0x00
-#define DEV_DOWN 0x01
-
-/*
- * Data structures for IOCTL calls.
- */
-
-typedef struct sdla_dump /* WANPIPE_DUMP */
-{
- unsigned long magic; /* for verification */
- unsigned long offset; /* absolute adapter memory address */
- unsigned long length; /* block length */
- void* ptr; /* -> buffer */
-} sdla_dump_t;
-
-typedef struct sdla_exec /* WANPIPE_EXEC */
-{
- unsigned long magic; /* for verification */
- void* cmd; /* -> command structure */
- void* data; /* -> data buffer */
-} sdla_exec_t;
-
-/* UDP management stuff */
-
-typedef struct wum_header
-{
- unsigned char signature[8]; /* 00h: signature */
- unsigned char type; /* 08h: request/reply */
- unsigned char command; /* 09h: commnand */
- unsigned char reserved[6]; /* 0Ah: reserved */
-} wum_header_t;
-
-/*************************************************************************
- Data Structure for global statistics
-*************************************************************************/
-
-typedef struct global_stats
-{
- unsigned long isr_entry;
- unsigned long isr_already_critical;
- unsigned long isr_rx;
- unsigned long isr_tx;
- unsigned long isr_intr_test;
- unsigned long isr_spurious;
- unsigned long isr_enable_tx_int;
- unsigned long rx_intr_corrupt_rx_bfr;
- unsigned long rx_intr_on_orphaned_DLCI;
- unsigned long rx_intr_dev_not_started;
- unsigned long tx_intr_dev_not_started;
- unsigned long poll_entry;
- unsigned long poll_already_critical;
- unsigned long poll_processed;
- unsigned long poll_tbusy_bad_status;
- unsigned long poll_host_disable_irq;
- unsigned long poll_host_enable_irq;
-
-} global_stats_t;
-
-
-typedef struct{
- unsigned short udp_src_port PACKED;
- unsigned short udp_dst_port PACKED;
- unsigned short udp_length PACKED;
- unsigned short udp_checksum PACKED;
-} udp_pkt_t;
-
-
-typedef struct {
- unsigned char ver_inet_hdr_length PACKED;
- unsigned char service_type PACKED;
- unsigned short total_length PACKED;
- unsigned short identifier PACKED;
- unsigned short flags_frag_offset PACKED;
- unsigned char ttl PACKED;
- unsigned char protocol PACKED;
- unsigned short hdr_checksum PACKED;
- unsigned long ip_src_address PACKED;
- unsigned long ip_dst_address PACKED;
-} ip_pkt_t;
-
-
-typedef struct {
- unsigned char signature[8] PACKED;
- unsigned char request_reply PACKED;
- unsigned char id PACKED;
- unsigned char reserved[6] PACKED;
-} wp_mgmt_t;
-
-/*************************************************************************
- Data Structure for if_send statistics
-*************************************************************************/
-typedef struct if_send_stat{
- unsigned long if_send_entry;
- unsigned long if_send_skb_null;
- unsigned long if_send_broadcast;
- unsigned long if_send_multicast;
- unsigned long if_send_critical_ISR;
- unsigned long if_send_critical_non_ISR;
- unsigned long if_send_tbusy;
- unsigned long if_send_tbusy_timeout;
- unsigned long if_send_PIPE_request;
- unsigned long if_send_wan_disconnected;
- unsigned long if_send_dlci_disconnected;
- unsigned long if_send_no_bfrs;
- unsigned long if_send_adptr_bfrs_full;
- unsigned long if_send_bfr_passed_to_adptr;
- unsigned long if_send_protocol_error;
- unsigned long if_send_bfr_not_passed_to_adptr;
- unsigned long if_send_tx_int_enabled;
- unsigned long if_send_consec_send_fail;
-} if_send_stat_t;
-
-typedef struct rx_intr_stat{
- unsigned long rx_intr_no_socket;
- unsigned long rx_intr_dev_not_started;
- unsigned long rx_intr_PIPE_request;
- unsigned long rx_intr_bfr_not_passed_to_stack;
- unsigned long rx_intr_bfr_passed_to_stack;
-} rx_intr_stat_t;
-
-typedef struct pipe_mgmt_stat{
- unsigned long UDP_PIPE_mgmt_kmalloc_err;
- unsigned long UDP_PIPE_mgmt_direction_err;
- unsigned long UDP_PIPE_mgmt_adptr_type_err;
- unsigned long UDP_PIPE_mgmt_adptr_cmnd_OK;
- unsigned long UDP_PIPE_mgmt_adptr_cmnd_timeout;
- unsigned long UDP_PIPE_mgmt_adptr_send_passed;
- unsigned long UDP_PIPE_mgmt_adptr_send_failed;
- unsigned long UDP_PIPE_mgmt_not_passed_to_stack;
- unsigned long UDP_PIPE_mgmt_passed_to_stack;
- unsigned long UDP_PIPE_mgmt_no_socket;
- unsigned long UDP_PIPE_mgmt_passed_to_adptr;
-} pipe_mgmt_stat_t;
-
-
-typedef struct {
- struct sk_buff *skb;
-} bh_data_t, cmd_data_t;
-
-#define MAX_LGTH_UDP_MGNT_PKT 2000
-
-
-/* This is used for interrupt testing */
-#define INTR_TEST_MODE 0x02
-
-#define WUM_SIGNATURE_L 0x50495046
-#define WUM_SIGNATURE_H 0x444E3845
-
-#define WUM_KILL 0x50
-#define WUM_EXEC 0x51
-
-#define WANPIPE 0x00
-#define API 0x01
-#define BRIDGE 0x02
-#define BRIDGE_NODE 0x03
-
-#ifdef __KERNEL__
-/****** Kernel Interface ****************************************************/
-
-#include <linux/sdladrv.h> /* SDLA support module API definitions */
-#include <linux/sdlasfm.h> /* SDLA firmware module definitions */
-#include <linux/workqueue.h>
-#include <linux/serial.h>
-#include <linux/serialP.h>
-#include <linux/serial_reg.h>
-#include <asm/serial.h>
-#include <linux/tty.h>
-#include <linux/tty_driver.h>
-#include <linux/tty_flip.h>
-
-/****** Data Structures *****************************************************/
-
-/* Adapter Data Space.
- * This structure is needed because we handle multiple cards, otherwise
- * static data would do it.
- */
-typedef struct sdla
-{
- char devname[WAN_DRVNAME_SZ+1]; /* card name */
- sdlahw_t hw; /* hardware configuration */
- struct wan_device wandev; /* WAN device data space */
-
- unsigned open_cnt; /* number of open interfaces */
- unsigned long state_tick; /* link state timestamp */
- unsigned intr_mode; /* Type of Interrupt Mode */
- char in_isr; /* interrupt-in-service flag */
- char buff_int_mode_unbusy; /* flag for carrying out dev_tint */
- char dlci_int_mode_unbusy; /* flag for carrying out dev_tint */
- long configured; /* flag for previous configurations */
-
- unsigned short irq_dis_if_send_count; /* Disabling irqs in if_send*/
- unsigned short irq_dis_poll_count; /* Disabling irqs in poll routine*/
- unsigned short force_enable_irq;
- char TracingEnabled; /* flag for enabling trace */
- global_stats_t statistics; /* global statistics */
- void* mbox; /* -> mailbox */
- void* rxmb; /* -> receive mailbox */
- void* flags; /* -> adapter status flags */
- void (*isr)(struct sdla* card); /* interrupt service routine */
- void (*poll)(struct sdla* card); /* polling routine */
- int (*exec)(struct sdla* card, void* u_cmd, void* u_data);
- /* Used by the listen() system call */
- /* Wanpipe Socket Interface */
- int (*func) (struct sk_buff *, struct sock *);
- struct sock *sk;
-
- /* Shutdown function */
- void (*disable_comm) (struct sdla *card);
-
- /* Secondary Port Device: Piggibacking */
- struct sdla *next;
-
- /* TTY driver variables */
- unsigned char tty_opt;
- struct tty_struct *tty;
- unsigned int tty_minor;
- unsigned int tty_open;
- unsigned char *tty_buf;
- unsigned char *tty_rx;
- struct work_struct tty_work;
-
- union
- {
- struct
- { /****** X.25 specific data **********/
- u32 lo_pvc;
- u32 hi_pvc;
- u32 lo_svc;
- u32 hi_svc;
- struct net_device *svc_to_dev_map[MAX_X25_LCN];
- struct net_device *pvc_to_dev_map[MAX_X25_LCN];
- struct net_device *tx_dev;
- struct net_device *cmd_dev;
- u32 no_dev;
- volatile u8 *hdlc_buf_status;
- u32 tx_interrupts_pending;
- u16 timer_int_enabled;
- struct net_device *poll_device;
- atomic_t command_busy;
-
- u16 udp_pkt_lgth;
- u32 udp_type;
- u8 udp_pkt_src;
- u32 udp_lcn;
- struct net_device *udp_dev;
- s8 udp_pkt_data[MAX_LGTH_UDP_MGNT_PKT];
-
- u8 LAPB_hdlc; /* Option to turn off X25 and run only LAPB */
- u8 logging; /* Option to log call messages */
- u8 oob_on_modem; /* Option to send modem status to the api */
- u16 num_of_ch; /* Number of channels configured by the user */
-
- struct work_struct x25_poll_work;
- struct timer_list x25_timer;
- } x;
- struct
- { /****** frame relay specific data ***/
- void* rxmb_base; /* -> first Rx buffer */
- void* rxmb_last; /* -> last Rx buffer */
- unsigned rx_base; /* S508 receive buffer base */
- unsigned rx_top; /* S508 receive buffer end */
- unsigned short node_dlci[100];
- unsigned short dlci_num;
- struct net_device *dlci_to_dev_map[991 + 1];
- unsigned tx_interrupts_pending;
- unsigned short timer_int_enabled;
- unsigned short udp_pkt_lgth;
- int udp_type;
- char udp_pkt_src;
- unsigned udp_dlci;
- char udp_pkt_data[MAX_LGTH_UDP_MGNT_PKT];
- void* trc_el_base; /* first trace element */
- void* trc_el_last; /* last trace element */
- void *curr_trc_el; /* current trace element */
- unsigned short trc_bfr_space; /* trace buffer space */
- unsigned char update_comms_stats;
- struct net_device *arp_dev;
- spinlock_t if_send_lock;
- } f;
- struct /****** PPP-specific data ***********/
- {
- char if_name[WAN_IFNAME_SZ+1]; /* interface name */
- void* txbuf; /* -> current Tx buffer */
- void* txbuf_base; /* -> first Tx buffer */
- void* txbuf_last; /* -> last Tx buffer */
- void* rxbuf_base; /* -> first Rx buffer */
- void* rxbuf_last; /* -> last Rx buffer */
- unsigned rx_base; /* S508 receive buffer base */
- unsigned rx_top; /* S508 receive buffer end */
- char ip_mode; /* STATIC/HOST/PEER IP Mode */
- char authenticator; /* Authenticator for PAP/CHAP */
- unsigned char comm_enabled; /* Is comm enabled or not */
- unsigned char peer_route; /* Process Peer Route */
- unsigned long *txbuf_next; /* Next Tx buffer to use */
- unsigned long *rxbuf_next; /* Next Rx buffer to use */
- } p;
- struct /* Cisco HDLC-specific data */
- {
- char if_name[WAN_IFNAME_SZ+1]; /* interface name */
- unsigned char comm_port;/* Communication Port O or 1 */
- unsigned char usedby; /* Used by WANPIPE or API */
- void* rxmb; /* Receive mail box */
- void* flags; /* flags */
- void* tx_status; /* Tx status element */
- void* rx_status; /* Rx status element */
- void* txbuf; /* -> current Tx buffer */
- void* txbuf_base; /* -> first Tx buffer */
- void* txbuf_last; /* -> last Tx buffer */
- void* rxbuf_base; /* -> first Rx buffer */
- void* rxbuf_last; /* -> last Rx buffer */
- unsigned rx_base; /* S508 receive buffer base */
- unsigned rx_top; /* S508 receive buffer end */
- unsigned char receive_only; /* high speed receivers */
- unsigned short protocol_options;
- unsigned short kpalv_tx; /* Tx kpalv timer */
- unsigned short kpalv_rx; /* Rx kpalv timer */
- unsigned short kpalv_err; /* Error tolerance */
- unsigned short slarp_timer; /* SLARP req timer */
- unsigned state; /* state of the link */
- unsigned char api_status;
- unsigned char update_call_count;
- unsigned short api_options; /* for async config */
- unsigned char async_mode;
- unsigned short tx_bits_per_char;
- unsigned short rx_bits_per_char;
- unsigned short stop_bits;
- unsigned short parity;
- unsigned short break_timer;
- unsigned short inter_char_timer;
- unsigned short rx_complete_length;
- unsigned short xon_char;
- unsigned short xoff_char;
- unsigned char comm_enabled; /* Is comm enabled or not */
- unsigned char backup;
- } c;
- struct
- {
- void* tx_status; /* Tx status element */
- void* rx_status; /* Rx status element */
- void* trace_status; /* Trace status element */
- void* txbuf; /* -> current Tx buffer */
- void* txbuf_base; /* -> first Tx buffer */
- void* txbuf_last; /* -> last Tx buffer */
- void* rxbuf_base; /* -> first Rx buffer */
- void* rxbuf_last; /* -> last Rx buffer */
- void* tracebuf; /* -> current Trace buffer */
- void* tracebuf_base; /* -> current Trace buffer */
- void* tracebuf_last; /* -> current Trace buffer */
- unsigned rx_base; /* receive buffer base */
- unsigned rx_end; /* receive buffer end */
- unsigned trace_base; /* trace buffer base */
- unsigned trace_end; /* trace buffer end */
-
- } h;
- } u;
-} sdla_t;
-
-/****** Public Functions ****************************************************/
-
-void wanpipe_open (sdla_t* card); /* wpmain.c */
-void wanpipe_close (sdla_t* card); /* wpmain.c */
-void wanpipe_set_state (sdla_t* card, int state); /* wpmain.c */
-
-int wpx_init (sdla_t* card, wandev_conf_t* conf); /* wpx.c */
-int wpf_init (sdla_t* card, wandev_conf_t* conf); /* wpf.c */
-int wpp_init (sdla_t* card, wandev_conf_t* conf); /* wpp.c */
-int wpc_init (sdla_t* card, wandev_conf_t* conf); /* Cisco HDLC */
-int bsc_init (sdla_t* card, wandev_conf_t* conf); /* BSC streaming */
-int hdlc_init(sdla_t* card, wandev_conf_t* conf); /* HDLC support */
-int wpft1_init (sdla_t* card, wandev_conf_t* conf); /* FT1 Config support */
-int wsppp_init (sdla_t* card, wandev_conf_t* conf); /* Sync PPP on top of RAW CHDLC */
-
-extern sdla_t * wanpipe_find_card(char *);
-extern sdla_t * wanpipe_find_card_num (int);
-
-extern void wanpipe_queue_work (struct work_struct *);
-extern void wanpipe_mark_bh (void);
-extern void wakeup_sk_bh(struct net_device *dev);
-extern int change_dev_flags(struct net_device *dev, unsigned flags);
-extern unsigned long get_ip_address(struct net_device *dev, int option);
-extern void add_gateway(sdla_t *card, struct net_device *dev);
-
-
-#endif /* __KERNEL__ */
-#endif /* _WANPIPE_H */
-