[svn-commits] tzafrir: branch linux/2.5 r10392 - /linux/branches/2.5/drivers/dahdi/xpp/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Jan 3 08:42:24 CST 2012
Author: tzafrir
Date: Tue Jan 3 08:42:21 2012
New Revision: 10392
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10392
Log:
xpp: BRI: remove trivial BRISTUFF wrappers
Now that legacy BRISTUFF code is gone, some wrapper
functions became trivial. Removed these wrappers
and inlined their contents.
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/branches/2.5/drivers/dahdi/xpp/card_bri.c
Modified: linux/branches/2.5/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.5/drivers/dahdi/xpp/card_bri.c?view=diff&rev=10392&r1=10391&r2=10392
==============================================================================
--- linux/branches/2.5/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/branches/2.5/drivers/dahdi/xpp/card_bri.c Tue Jan 3 08:42:21 2012
@@ -422,15 +422,6 @@
/*
* D-Chan receive
*/
-static void bri_hdlc_abort(xpd_t *xpd, struct dahdi_chan *dchan, int event)
-{
- struct BRI_priv_data *priv;
-
- priv = xpd->priv;
- BUG_ON(!priv);
- dahdi_hdlc_abort(dchan, event);
-}
-
static int bri_check_stat(xpd_t *xpd, struct dahdi_chan *dchan, byte *buf, int len)
{
struct BRI_priv_data *priv;
@@ -440,7 +431,7 @@
BUG_ON(!priv);
if(len <= 0) {
XPD_NOTICE(xpd, "D-Chan RX DROP: short frame (len=%d)\n", len);
- bri_hdlc_abort(xpd, dchan, DAHDI_EVENT_ABORT);
+ dahdi_hdlc_abort(dchan, DAHDI_EVENT_ABORT);
return -EPROTO;
}
status = buf[len-1];
@@ -454,26 +445,10 @@
event = DAHDI_EVENT_BADFCS;
}
dump_hex_buf(xpd, "D-Chan RX: current packet", buf, len);
- bri_hdlc_abort(xpd, dchan, event);
+ dahdi_hdlc_abort(dchan, event);
return -EPROTO;
}
return 0;
-}
-
-static int bri_hdlc_putbuf(xpd_t *xpd, struct dahdi_chan *dchan,
- unsigned char *buf, int len)
-{
- dahdi_hdlc_putbuf(dchan, buf, len);
- return 0;
-}
-
-static void bri_hdlc_finish(xpd_t *xpd, struct dahdi_chan *dchan)
-{
- struct BRI_priv_data *priv;
-
- priv = xpd->priv;
- BUG_ON(!priv);
- dahdi_hdlc_finish(dchan);
}
static int rx_dchan(xpd_t *xpd, reg_cmd_t *regcmd)
@@ -504,9 +479,7 @@
goto out;
}
XPD_DBG(GENERAL, xpd, "D-Chan RX: eoframe=%d len=%d\n", eoframe, len);
- ret = bri_hdlc_putbuf(xpd, dchan, src, (eoframe) ? len - 1 : len);
- if(ret < 0)
- goto out;
+ dahdi_hdlc_putbuf(dchan, src, (eoframe) ? len - 1 : len);
if(!eoframe)
goto out;
if((ret = bri_check_stat(xpd, dchan, src, len)) < 0)
@@ -516,7 +489,7 @@
* The last byte (that we don't pass on) is 0 if the checksum is correct. If it were wrong,
* we would drop the packet in the "if(src[len-1])" above.
*/
- bri_hdlc_finish(xpd, dchan);
+ dahdi_hdlc_finish(dchan);
priv->dchan_rx_counter++;
priv->dchan_norx_ticks = 0;
out:
@@ -539,17 +512,6 @@
if (dchan == chan) {
atomic_inc(&priv->hdlc_pending);
}
-}
-
-static int bri_hdlc_getbuf(struct dahdi_chan *dchan, unsigned char *buf,
- unsigned int *size)
-{
- int len = *size;
- int eoframe;
-
- eoframe = dahdi_hdlc_getbuf(dchan, buf, &len);
- *size = len;
- return eoframe;
}
static int tx_dchan(xpd_t *xpd)
@@ -570,7 +532,7 @@
len = ARRAY_SIZE(priv->dchan_tbuf);
if(len > MULTIBYTE_MAX_LEN)
len = MULTIBYTE_MAX_LEN;
- eoframe = bri_hdlc_getbuf(dchan, priv->dchan_tbuf, &len);
+ eoframe = dahdi_hdlc_getbuf(dchan, priv->dchan_tbuf, &len);
if(len <= 0)
return 0; /* Nothing to transmit on D channel */
if(len > MULTIBYTE_MAX_LEN) {
More information about the svn-commits
mailing list