[dahdi-commits] sruffell: linux/trunk r9447 - in /linux/trunk: drivers/dahdi/ include/dahdi/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed Oct 20 07:23:30 CDT 2010
Author: sruffell
Date: Wed Oct 20 07:23:28 2010
New Revision: 9447
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9447
Log:
dahdi: Remove CONFIG_OLD_HDLC_API since that is kernel 2.4 specific.
DAHDI does not support any kernels older than 2.6.9. No need
to keep the old HDLC interface support around.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/include/dahdi/dahdi_config.h
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9447&r1=9446&r2=9447
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Oct 20 07:23:28 2010
@@ -64,10 +64,6 @@
#define FAST_HDLC_NEED_TABLES
#include <dahdi/kernel.h>
#include "ecdis.h"
-
-#ifndef CONFIG_OLD_HDLC_API
-#define NEW_HDLC_INTERFACE
-#endif
#ifdef CONFIG_DAHDI_PPP
#include <linux/netdevice.h>
@@ -1707,7 +1703,6 @@
}
#endif
-#ifdef NEW_HDLC_INTERFACE
static int dahdi_net_open(struct net_device *dev)
{
int res = hdlc_open(dev);
@@ -1716,12 +1711,7 @@
/* if (!dev->hard_start_xmit) return res; is this really necessary? --byg */
if (res) /* this is necessary to avoid kernel panic when UNSPEC link encap, proven --byg */
return res;
-#else
-static int dahdi_net_open(hdlc_device *hdlc)
-{
- struct dahdi_chan *ms = hdlc_to_chan(hdlc);
- int res;
-#endif
+
if (!ms) {
module_printk(KERN_NOTICE, "dahdi_net_open: nothing??\n");
return -EINVAL;
@@ -1771,47 +1761,27 @@
return 0;
}
-#ifdef NEW_HDLC_INTERFACE
static int dahdi_net_stop(struct net_device *dev)
{
- hdlc_device *h = dev_to_hdlc(dev);
- struct dahdi_hdlc *hdlc = h->priv;
-
-#else
-static void dahdi_net_close(hdlc_device *hdlc)
-{
-#endif
+ hdlc_device *h = dev_to_hdlc(dev);
+ struct dahdi_hdlc *hdlc = h->priv;
+
struct dahdi_chan *ms = hdlc_to_chan(hdlc);
if (!ms) {
-#ifdef NEW_HDLC_INTERFACE
module_printk(KERN_NOTICE, "dahdi_net_stop: nothing??\n");
return 0;
-#else
- module_printk(KERN_NOTICE, "dahdi_net_close: nothing??\n");
- return;
-#endif
}
if (!dahdi_have_netdev(ms)) {
-#ifdef NEW_HDLC_INTERFACE
module_printk(KERN_NOTICE, "dahdi_net_stop: %s is not a net device!\n", ms->name);
return 0;
-#else
- module_printk(KERN_NOTICE, "dahdi_net_close: %s is not a net device!\n", ms->name);
- return;
-#endif
}
/* Not much to do here. Just deallocate the buffers */
- netif_stop_queue(chan_to_netdev(ms));
+ netif_stop_queue(chan_to_netdev(ms));
dahdi_reallocbufs(ms, 0, 0);
hdlc_close(dev);
-#ifdef NEW_HDLC_INTERFACE
return 0;
-#else
- return;
-#endif
-}
-
-#ifdef NEW_HDLC_INTERFACE
+}
+
/* kernel 2.4.20+ has introduced attach function, dunno what to do,
just copy sources from dscc4 to be sure and ready for further mastering,
NOOP right now (i.e. really a stub) --byg */
@@ -1839,28 +1809,20 @@
dpriv->parity = parity;*/
return 0;
}
-#endif
static struct dahdi_hdlc *dahdi_hdlc_alloc(void)
{
return kzalloc(sizeof(struct dahdi_hdlc), GFP_KERNEL);
}
-#ifdef NEW_HDLC_INTERFACE
static int dahdi_xmit(struct sk_buff *skb, struct net_device *dev)
{
- /* FIXME: this construction seems to be not very optimal for me but I could find nothing better at the moment (Friday, 10PM :( ) --byg */
-/* struct dahdi_chan *ss = hdlc_to_chan(list_entry(dev, struct dahdi_hdlc, netdev.netdev));*/
+ /* FIXME: this construction seems to be not very optimal for me but I
+ * could find nothing better at the moment (Friday, 10PM :( ) --byg
+ * */
struct dahdi_chan *ss = netdev_to_chan(dev);
struct net_device_stats *stats = hdlc_stats(dev);
-#else
-static int dahdi_xmit(hdlc_device *hdlc, struct sk_buff *skb)
-{
- struct dahdi_chan *ss = hdlc_to_chan(hdlc);
- struct net_device *dev = &ss->hdlcnetdev->netdev.netdev;
- struct net_device_stats *stats = &ss->hdlcnetdev->netdev.stats;
-#endif
int retval = 1;
int x,oldbuf;
unsigned int fcs;
@@ -1915,17 +1877,10 @@
return retval;
}
-#ifdef NEW_HDLC_INTERFACE
static int dahdi_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
return hdlc_ioctl(dev, ifr, cmd);
}
-#else
-static int dahdi_net_ioctl(hdlc_device *hdlc, struct ifreq *ifr, int cmd)
-{
- return -EIO;
-}
-#endif
#endif
@@ -7976,7 +7931,6 @@
break;
#ifdef CONFIG_DAHDI_NET
if (skb && dahdi_have_netdev(ms))
-#ifdef NEW_HDLC_INTERFACE
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
skb->mac.raw = skb->data;
@@ -7992,9 +7946,6 @@
#endif
netif_rx(skb);
}
-#else
- hdlc_netif_rx(&ms->hdlcnetdev->netdev, skb);
-#endif
#endif
#ifdef CONFIG_DAHDI_PPP
if (skb && (ms->flags & DAHDI_FLAG_PPP)) {
Modified: linux/trunk/include/dahdi/dahdi_config.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/dahdi_config.h?view=diff&rev=9447&r1=9446&r2=9447
==============================================================================
--- linux/trunk/include/dahdi/dahdi_config.h (original)
+++ linux/trunk/include/dahdi/dahdi_config.h Wed Oct 20 07:23:28 2010
@@ -80,13 +80,6 @@
* support.
*/
/* #define CONFIG_DAHDI_NET */
-
-/*
- * Uncomment CONFIG_OLD_HDLC_API if your are compiling with CONFIG_DAHDI_NET
- * defined and you are using the old kernel HDLC interface (or if you get
- * an error about ETH_P_HDLC while compiling).
- */
-/* #define CONFIG_OLD_HDLC_API */
/*
* Uncomment for Generic PPP support (i.e. DAHDIRAS)
More information about the dahdi-commits
mailing list