[svn-commits] mattf: linux/trunk r7639 - /linux/trunk/drivers/dahdi/wcb4xxp/base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Nov 23 13:39:13 CST 2009
Author: mattf
Date: Mon Nov 23 13:39:11 2009
New Revision: 7639
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7639
Log: (empty)
Modified:
linux/trunk/drivers/dahdi/wcb4xxp/base.c
Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=7639&r1=7638&r2=7639
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Mon Nov 23 13:39:11 2009
@@ -1617,7 +1617,6 @@
char debugbuf[256];
unsigned long irq_flags;
struct b4xxp *b4 = bspan->parent;
- unsigned char stat;
fifo = bspan->fifos[2];
@@ -1645,14 +1644,10 @@
zleft = zlen + 1; /* include STAT byte that the HFC injects after FCS */
do {
- int truncated;
- if (zleft > WCB4XXP_HDLC_BUF_LEN) {
- truncated = 1;
+ if (zleft > WCB4XXP_HDLC_BUF_LEN)
j = WCB4XXP_HDLC_BUF_LEN;
- } else {
- truncated = 0;
+ else
j = zleft;
- }
spin_lock_irqsave(&b4->fifolock, irq_flags);
hfc_setreg_waitbusy(b4, R_FIFO, (fifo << V_FIFO_NUM_SHIFT) | V_FIFO_DIR);
@@ -1661,8 +1656,8 @@
spin_unlock_irqrestore(&b4->fifolock, irq_flags);
/* don't send STAT byte to DAHDI */
- if ((bspan->sigchan) && (j > 1))
- dahdi_hdlc_putbuf(bspan->sigchan, buf, truncated ? j : j - 1);
+ if (bspan->sigchan)
+ dahdi_hdlc_putbuf(bspan->sigchan, buf, (j == WCB4XXP_HDLC_BUF_LEN) ? j : j - 1);
zleft -= j;
if (DBG_HDLC && DBG_SPANFILTER) {
@@ -1671,7 +1666,6 @@
for (i=0; i < j; i++) printk("%02x%c", buf[i], (i < ( j - 1)) ? ' ':'\n');
}
} while (zleft > 0);
- stat = buf[j - 1];
/* Frame received, increment F2 and get an updated count of frames left */
spin_lock_irqsave(&b4->fifolock, irq_flags);
@@ -1690,6 +1684,7 @@
dev_notice(b4->dev, "odd, zlen less then 3?\n");
dahdi_hdlc_abort(bspan->sigchan, DAHDI_EVENT_ABORT);
} else {
+ unsigned char stat = buf[i - 1];
/* if STAT != 0, indicates bad frame */
if (stat != 0x00) {
More information about the svn-commits
mailing list