summaryrefslogtreecommitdiff
path: root/xhfc/xhfc.h
diff options
context:
space:
mode:
authorNoe Rubinstein <nrubinstein@proformatique.com>2010-08-25 11:11:45 +0200
committerNoe Rubinstein <nrubinstein@proformatique.com>2010-08-25 11:11:45 +0200
commit70c459545852ad454e236a2b21586c53f959e18c (patch)
tree9e3ebd3bd9948f0e54c3dce79c808a5ea203d5ef /xhfc/xhfc.h
parent0fae154047797caee7ecd7e9fdbfdb752c2fe933 (diff)
Mainly cosmetic.
Diffstat (limited to 'xhfc/xhfc.h')
-rw-r--r--xhfc/xhfc.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/xhfc/xhfc.h b/xhfc/xhfc.h
index ebc87c2..0d69588 100644
--- a/xhfc/xhfc.h
+++ b/xhfc/xhfc.h
@@ -29,10 +29,7 @@
#define XHFC_FMIN 0x00
#define XHFC_FMAX 0x07
-#define XHFC_T1 0
-#define XHFC_T2 1
-#define XHFC_T3 2
-#define XHFC_T4 3
+enum { XHFC_T1, XHFC_T2, XHFC_T3, XHFC_T4 };
#if (DAHDI_CHUNKSIZE != 8)
#error Sorry, the XHFC driver module does not support chunksize != 8
@@ -40,10 +37,8 @@
/* general debug messages */
#define DEBUG_GENERAL (1 << 0)
-/* emit DTMF detector messages */
-#define DEBUG_DTMF (1 << 1) //XXX not used
/* emit register read/write, but only if the kernel's DEBUG is defined */
-#define DEBUG_REGS (1 << 2) //XXX wut
+#define DEBUG_REGS (1 << 2) // not used
/* emit file operation messages */
#define DEBUG_FOPS (1 << 3)
#define DEBUG_ECHOCAN (1 << 4)
@@ -53,7 +48,7 @@
#define DEBUG_HDLC (1 << 6)
#define DEBUG_VERBOSE_HDLC (1 << 7)
/* Timing related changes */
-#define DEBUG_TIMING (1 << 8) //XXX not used?
+#define DEBUG_TIMING (1 << 8)
/* alarm changes */
#define DEBUG_ALARM (1 << 9)
@@ -102,7 +97,7 @@ struct xhfc_span {
struct dahdi_chan _chans[CHANS_PER_SPAN]; /* B1, B2, D, E */
unsigned char writechunk[CHANS_PER_SPAN * DAHDI_CHUNKSIZE];
unsigned char readchunk[CHANS_PER_SPAN * DAHDI_CHUNKSIZE];
- // Same as in DAHDI's for sameness reasons
+ /* Same as in DAHDI's for sameness reasons */
struct dahdi_span span;
int ts; /* PCM timeslot */
@@ -111,9 +106,6 @@ struct xhfc_span {
int port; /* (physical) S/T port number */
int nt; /* 1 if the port is nt, 0 if it's TE */
-// int rcv; /* number of received frames */
-// int crpt; /* number of corrupted reveived frames */
-
int running;
int shutdown;
@@ -123,8 +115,8 @@ struct xhfc_span {
unsigned long alarmtimer;
struct dahdi_chan* sigchan;
int sigactive;
- unsigned long hfc_timers[CHANS_PER_SPAN+1]; /* T1, T2, T3 */ //XXX WTF with this length?
- int hfc_timer_on[CHANS_PER_SPAN+1]; /* 1=timer active */
+ unsigned long hfc_timers[4]; /* T1, T2, T3, T4 */
+ int hfc_timer_on[4]; /* 1=timer active */
unsigned long non_rx_cnt;
};
@@ -136,8 +128,6 @@ struct xhfc {
struct xhfc_span spans[SPANS_PER_CHIP];
- //struct semaphore fifosem;
-
u8 r_pcm_md0;
/* from DAHDI */
@@ -162,8 +152,6 @@ struct xhfc_pi {
#define dchan_fifo(span) (span->port * 4 + 2)
void xhfc_config_d_chan_on_fifo(struct xhfc_span*);
-//void xhfc_hdlc_write_buf(struct xhfc* x, int fifo, u8* buf, int len);
-//int xhfc_hdlc_read_buf(struct xhfc* x, int fifo, u8* buf, int *len);
void xhfc_flush_fifo(struct xhfc* x, int fifo);
int xhfc_hdlc_init(struct xhfc* x);
int xhfc_hdlc_interrupt(struct xhfc* x);
@@ -185,4 +173,4 @@ void xhfc_shutdown(struct pci_dev *pdev);
extern uint debug;
extern uint dbg_spanfilter;
-#endif // __XHFC_HWTD_H__
+#endif