summaryrefslogtreecommitdiff
path: root/xpp/xpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/xpd.h')
-rw-r--r--xpp/xpd.h154
1 files changed, 0 insertions, 154 deletions
diff --git a/xpp/xpd.h b/xpp/xpd.h
index 3949adb..7c174f2 100644
--- a/xpp/xpd.h
+++ b/xpp/xpd.h
@@ -86,62 +86,6 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */
#endif
#endif // __KERNEL__
-
-typedef struct xbus_ops xbus_ops_t;
-
-typedef enum xbus_type {
- FIRMWARE_LOOPBACK = 1,
- FIRMWARE_XPP = 2,
-} xbus_type_t;
-
-#ifdef __KERNEL__
-
-struct xbus_ops {
- int (*xframe_send)(xbus_t *xbus, xframe_t *xframe);
- xframe_t *(*xframe_new)(xbus_t *xbus, gfp_t flags);
- void (*xframe_free)(xbus_t *xbus, xframe_t *p);
-};
-
-/*
- * XBUS statistics counters
- */
-enum {
- XBUS_N_DESC_REQ,
- XBUS_N_DEV_DESC_FULL,
- XBUS_N_DEV_DESC_EMPTY,
- XBUS_N_TX_XFRAME_PCM,
- XBUS_N_RX_XFRAME_PCM,
- XBUS_N_TX_PACK_PCM,
- XBUS_N_RX_PACK_PCM,
- XBUS_N_TX_BYTES,
- XBUS_N_RX_BYTES,
- XBUS_N_TX_PCM_FRAG,
-};
-
-#define XBUS_COUNTER(xbus, counter) ((xbus)->counters[XBUS_N_ ## counter])
-
-#define C_(x) [ XBUS_N_ ## x ] = { #x }
-
-/* yucky, make an instance so we can size it... */
-static struct xbus_counters {
- char *name;
-} xbus_counters[] = {
- C_(DESC_REQ),
- C_(DEV_DESC_FULL),
- C_(DEV_DESC_EMPTY),
- C_(TX_XFRAME_PCM),
- C_(RX_XFRAME_PCM),
- C_(TX_PACK_PCM),
- C_(RX_PACK_PCM),
- C_(TX_BYTES),
- C_(RX_BYTES),
- C_(TX_PCM_FRAG),
-};
-
-#undef C_
-
-#define XBUS_COUNTER_MAX ARRAY_SIZE(xbus_counters)
-
#define CARD_DESC_MAGIC 0xca9dde5c
struct card_desc_struct {
@@ -155,103 +99,6 @@ struct card_desc_struct {
xpp_line_t line_status; /* Initial line status (offhook) */
};
-#ifdef XPP_DEBUGFS
-/* definition in xbus-core.c */
-struct debugfs_data;
-#endif
-
-/*
- * Encapsulate all poll related data of a single xbus.
- */
-struct xbus_poller {
- /*
- * Bus scanning
- */
- xbus_t *xbus;
- struct workqueue_struct *wq;
- bool is_polling;
- atomic_t count_poll_answers;
- struct list_head poll_results;
- wait_queue_head_t wait_for_polls;
-
- struct work_struct xpds_init_work;
-
- atomic_t count_xpds_to_initialize;
- atomic_t count_xpds_initialized;
- wait_queue_head_t wait_for_xpd_initialization;
-};
-
-/*
- * An xbus is a transport layer for Xorcom Protocol commands
- */
-struct xbus {
- char busname[XBUS_NAMELEN]; /* set by xbus_new() */
-
- /* low-level bus drivers set these 2 fields */
- char busdesc[XBUS_DESCLEN];
- char serialnum[SERIALNUM_SIZE];
-
- int num;
- xbus_ops_t *ops;
- struct xpd *xpds[MAX_XPDS];
- int max_xframe_size;
-
- /* Device-Model */
- struct device astribank;
-#define dev_to_xbus(dev) container_of(dev, struct xbus, astribank)
-
- /* Simulator data */
- xbus_type_t bus_type;
-
- spinlock_t lock;
- atomic_t pcm_nesting;
-
- bool hardware_exists; /* Hardware is functional */
- int open_counter; /* Number of open channels */
- atomic_t packet_counter; /* Allocated packets */
- wait_queue_head_t packet_cache_empty;
-
- /* PCM metrics */
- struct timeval last_tx_sync;
- struct timeval last_rx_sync;
- unsigned long max_tx_sync;
- unsigned long min_tx_sync;
- unsigned long max_rx_sync;
- unsigned long min_rx_sync;
- unsigned long max_rx_process; /* packet processing time (usec) */
-
- struct xbus_poller *poller;
-
- /*
- * Sync adjustment
- */
- int sync_adjustment;
- int sync_adjustment_offset;
- long pll_updated_at;
-
- struct rw_semaphore in_use;
- int num_xpds;
- void *priv; /* Pointer to transport level data structures */
-
-#ifdef XPP_DEBUGFS
- struct dentry *debugfs_dir;
- struct dentry *debugfs_file;
- struct debugfs_data *debugfs_data;
-#endif
-#ifdef CONFIG_PROC_FS
- struct proc_dir_entry *proc_xbus_dir;
- struct proc_dir_entry *proc_xbus_summary;
- struct proc_dir_entry *proc_xbus_waitfor_xpds;
-#ifdef PROTOCOL_DEBUG
- struct proc_dir_entry *proc_xbus_command;
-#endif
-#endif
-
- /* statistics */
- int counters[XBUS_COUNTER_MAX];
-};
-#endif
-
typedef enum xpd_direction {
TO_PSTN = 0,
TO_PHONE = 1,
@@ -345,7 +192,6 @@ struct xpd {
struct xpd_addr addr;
struct list_head xpd_list;
unsigned int timer_count;
- volatile u_char *readchunk; /* Double-word aligned read memory */
/* Echo cancelation */
u_char ec_chunk1[CHANNELS_PERXPD][ZT_CHUNKSIZE];
u_char ec_chunk2[CHANNELS_PERXPD][ZT_CHUNKSIZE];