From 68300d2badd62c9477ae1c0badce1c0c6c348d69 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 6 Mar 2003 01:42:12 -0800 Subject: [PATCH] [PATCH] remove 2.0/2.2 stuff from wanrouter --- include/linux/wanpipe.h | 76 ++++----------------------------------- include/linux/wanrouter.h | 29 ++------------- 2 files changed, 8 insertions(+), 97 deletions(-) diff --git a/include/linux/wanpipe.h b/include/linux/wanpipe.h index cbb0df8bf700d..a4c4e89191ee4 100644 --- a/include/linux/wanpipe.h +++ b/include/linux/wanpipe.h @@ -39,59 +39,7 @@ #ifndef _WANPIPE_H #define _WANPIPE_H -#include - -#ifndef KERNEL_VERSION - #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0) - - #define LINUX_2_4 - #define netdevice_t struct net_device - - #define FREE_READ 1 - #define FREE_WRITE 0 - - #define stop_net_queue(a) netif_stop_queue(a) - #define start_net_queue(a) netif_start_queue(a) - #define is_queue_stopped(a) netif_queue_stopped(a) - #define wake_net_dev(a) netif_wake_queue(a) - #define is_dev_running(a) netif_running(a) - #define wan_dev_kfree_skb(a,b) dev_kfree_skb_any(a) - - -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0) - - #define LINUX_2_1 - #define netdevice_t struct device - #define FREE_READ 1 - #define FREE_WRITE 0 - - #define stop_net_queue(a) (set_bit(0, &##a->tbusy)) - #define start_net_queue(a) (clear_bit(0,&##a->tbusy)) - #define is_queue_stopped(a) (##a->tbusy) - #define wake_net_dev(a) {clear_bit(0,&##a->tbusy);mark_bh(NET_BH);} - #define is_dev_running(a) (test_bit(0,&##a->start)) - #define wan_dev_kfree_skb(a,b) dev_kfree_skb(a) - -#else - #define LINUX_2_0 - #define netdevice_t struct device - - #define test_and_set_bit set_bit - #define net_ratelimit() 1 - - #define stop_net_queue(a) (set_bit(0, &##a->tbusy)) - #define start_net_queue(a) (clear_bit(0,&##a->tbusy)) - #define is_queue_stopped(a) (##a->tbusy) - #define wake_net_dev(a) {clear_bit(0,&##a->tbusy);mark_bh(NET_BH);} - #define is_dev_running(a) (test_bit(0,(void*)&##a->start)) - #define wan_dev_kfree_skb(a,b) dev_kfree_skb(a,b) - #define spin_lock_init(a) - #define spin_lock(a) - #define spin_unlock(a) -#endif +#define netdevice_t struct net_device #include @@ -121,21 +69,11 @@ #define MAX_LCN_NUM 4095 /* Maximum lcn number */ #define MAX_FT1_RETRY 100 -#ifdef LINUX_2_4 - #ifndef AF_WANPIPE +#ifndef AF_WANPIPE #define AF_WANPIPE 25 #ifndef PF_WANPIPE #define PF_WANPIPE AF_WANPIPE #endif - #endif - -#else - #ifndef AF_WANPIPE - #define AF_WANPIPE 24 - #ifndef PF_WANPIPE - #define PF_WANPIPE AF_WANPIPE - #endif - #endif #endif @@ -321,12 +259,10 @@ typedef struct { #include /* SDLA support module API definitions */ #include /* SDLA firmware module definitions */ #include -#ifdef LINUX_2_4 - #include - #include - #include - #include -#endif +#include +#include +#include +#include #include #include #include diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 54b0966cb1acf..0879f677eca65 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h @@ -43,27 +43,10 @@ * Jan 16, 1997 Gene Kozin router_devlist made public * Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h). *****************************************************************************/ -#include -#ifndef KERNEL_VERSION - #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -#endif +#define netdevice_t struct net_device -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0) - #define LINUX_2_4 - #define netdevice_t struct net_device - #include /* Support for SMP Locking */ - -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0) - #define LINUX_2_1 - #define netdevice_t struct device - #include /* Support for SMP Locking */ - -#else - #define LINUX_2_0 - #define netdevice_t struct device - #define spinlock_t int -#endif +#include /* Support for SMP Locking */ #ifndef _ROUTER_H #define _ROUTER_H @@ -512,11 +495,7 @@ typedef struct wan_device /****** status and statistics *******/ char state; /* device state */ char api_status; /* device api status */ -#if defined(LINUX_2_1) || defined(LINUX_2_4) struct net_device_stats stats; /* interface statistics */ -#else - struct enet_statistics stats; /* interface statistics */ -#endif unsigned reserved[16]; /* reserved for future use */ unsigned long critical; /* critical section flag */ spinlock_t lock; /* Support for SMP Locking */ @@ -534,11 +513,7 @@ typedef struct wan_device struct wan_device* next; /* -> next device */ netdevice_t* dev; /* list of network interfaces */ unsigned ndev; /* number of interfaces */ -#ifdef LINUX_2_4 struct proc_dir_entry *dent; /* proc filesystem entry */ -#else - struct proc_dir_entry dent; /* proc filesystem entry */ -#endif } wan_device_t; /* Public functions available for device drivers */ -- 2.53.0