Commit 8a1396ef authored by Solomon Peachy's avatar Solomon Peachy Committed by Greg Kroah-Hartman

Staging: wlan-ng: Eliminate all backwards-compatibility for <2.6.13 kernels.

Signed-off-by: default avatarSolomon Peachy <pizza@shaftnet.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 68a193e4
...@@ -136,41 +136,6 @@ ...@@ -136,41 +136,6 @@
#include "wlan_compat.h" #include "wlan_compat.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
static int
wait_for_completion_interruptible(struct completion *x)
{
int ret = 0;
might_sleep();
spin_lock_irq(&x->wait.lock);
if (!x->done) {
DECLARE_WAITQUEUE(wait, current);
wait.flags |= WQ_FLAG_EXCLUSIVE;
__add_wait_queue_tail(&x->wait, &wait);
do {
if (signal_pending(current)) {
ret = -ERESTARTSYS;
__remove_wait_queue(&x->wait, &wait);
goto out;
}
__set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&x->wait.lock);
schedule();
spin_lock_irq(&x->wait.lock);
} while (!x->done);
__remove_wait_queue(&x->wait, &wait);
}
x->done--;
out:
spin_unlock_irq(&x->wait.lock);
return ret;
}
#endif
#define SUBMIT_URB(u,f) usb_submit_urb(u,f) #define SUBMIT_URB(u,f) usb_submit_urb(u,f)
/*================================================================*/ /*================================================================*/
......
...@@ -97,9 +97,6 @@ ...@@ -97,9 +97,6 @@
/*================================================================*/ /*================================================================*/
/* Local Static Definitions */ /* Local Static Definitions */
static char *version = "p80211.o: " WLAN_RELEASE;
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/* --Module Parameters */ /* --Module Parameters */
...@@ -108,10 +105,8 @@ module_param(wlan_watchdog, int, 0644); ...@@ -108,10 +105,8 @@ module_param(wlan_watchdog, int, 0644);
MODULE_PARM_DESC(wlan_watchdog, "transmit timeout in milliseconds"); MODULE_PARM_DESC(wlan_watchdog, "transmit timeout in milliseconds");
int wlan_wext_write = 1; int wlan_wext_write = 1;
#if WIRELESS_EXT > 12
module_param(wlan_wext_write, int, 0644); module_param(wlan_wext_write, int, 0644);
MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions"); MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions");
#endif
#ifdef WLAN_INCLUDE_DEBUG #ifdef WLAN_INCLUDE_DEBUG
int wlan_debug=0; int wlan_debug=0;
......
...@@ -79,9 +79,7 @@ ...@@ -79,9 +79,7 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#endif #endif
#if WIRELESS_EXT > 12
#include <net/iw_handler.h> #include <net/iw_handler.h>
#endif
#include <net/net_namespace.h> #include <net/net_namespace.h>
/*================================================================*/ /*================================================================*/
...@@ -684,16 +682,6 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) ...@@ -684,16 +682,6 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len); WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len);
#if WIRELESS_EXT < 13
/* Is this a wireless extensions ioctl? */
if ((cmd >= SIOCIWFIRST) && (cmd <= SIOCIWLAST)) {
if ((result = p80211wext_support_ioctl(dev, ifr, cmd))
!= (-EOPNOTSUPP)) {
goto bail;
}
}
#endif
#ifdef SIOCETHTOOL #ifdef SIOCETHTOOL
if (cmd == SIOCETHTOOL) { if (cmd == SIOCETHTOOL) {
result = p80211netdev_ethtool(wlandev, (void __user *) ifr->ifr_data); result = p80211netdev_ethtool(wlandev, (void __user *) ifr->ifr_data);
...@@ -907,12 +895,10 @@ int wlan_setup(wlandevice_t *wlandev) ...@@ -907,12 +895,10 @@ int wlan_setup(wlandevice_t *wlandev)
dev->stop = p80211knetdev_stop; dev->stop = p80211knetdev_stop;
#ifdef CONFIG_NET_WIRELESS #ifdef CONFIG_NET_WIRELESS
#if ((WIRELESS_EXT < 17) && (WIRELESS_EXT < 21)) #if (WIRELESS_EXT < 21)
dev->get_wireless_stats = p80211wext_get_wireless_stats; dev->get_wireless_stats = p80211wext_get_wireless_stats;
#endif #endif
#if WIRELESS_EXT > 12
dev->wireless_handlers = &p80211wext_handler_def; dev->wireless_handlers = &p80211wext_handler_def;
#endif
#endif #endif
netif_stop_queue(dev); netif_stop_queue(dev);
......
...@@ -153,12 +153,8 @@ typedef struct p80211_frmrx_t ...@@ -153,12 +153,8 @@ typedef struct p80211_frmrx_t
struct iw_statistics* p80211wext_get_wireless_stats(netdevice_t *dev); struct iw_statistics* p80211wext_get_wireless_stats(netdevice_t *dev);
/* wireless extensions' ioctls */ /* wireless extensions' ioctls */
int p80211wext_support_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd); int p80211wext_support_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd);
#if WIRELESS_EXT > 12
extern struct iw_handler_def p80211wext_handler_def; extern struct iw_handler_def p80211wext_handler_def;
#endif
int p80211wext_event_associated(struct wlandevice *wlandev, int assoc); int p80211wext_event_associated(struct wlandevice *wlandev, int assoc);
#endif /* wireless extensions */ #endif /* wireless extensions */
/* WEP stuff */ /* WEP stuff */
......
This diff is collapsed.
...@@ -134,11 +134,7 @@ typedef int64_t INT64; ...@@ -134,11 +134,7 @@ typedef int64_t INT64;
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)) #include <linux/hardirq.h>
# include <linux/hardirq.h>
#else
# include <asm/hardirq.h>
#endif
#define WLAN_LOG_ERROR(x,args...) printk(KERN_ERR "%s: " x , __func__ , ##args); #define WLAN_LOG_ERROR(x,args...) printk(KERN_ERR "%s: " x , __func__ , ##args);
...@@ -186,10 +182,6 @@ typedef int64_t INT64; ...@@ -186,10 +182,6 @@ typedef int64_t INT64;
#define PT_REGS #define PT_REGS
#endif #endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7))
# define del_singleshot_timer_sync(a) del_timer_sync(a)
#endif
#define CONFIG_NETLINK 1 #define CONFIG_NETLINK 1
#ifndef wait_event_interruptible_timeout #ifndef wait_event_interruptible_timeout
...@@ -251,25 +243,8 @@ typedef struct net_device netdevice_t; ...@@ -251,25 +243,8 @@ typedef struct net_device netdevice_t;
#define in_atomic() 0 #define in_atomic() 0
#endif #endif
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13))
#define URB_ASYNC_UNLINK 0 #define URB_ASYNC_UNLINK 0
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7))
#define URB_ASYNC_UNLINK USB_ASYNC_UNLINK
#define usb_fill_bulk_urb FILL_BULK_URB
#define usb_kill_urb usb_unlink_urb
#else
#define USB_QUEUE_BULK 0 #define USB_QUEUE_BULK 0
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11))
typedef u32 pm_message_t;
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
#define eth_hdr(x) (x)->mac.ethernet
#endif
#ifndef might_sleep #ifndef might_sleep
#define might_sleep(a) do { } while (0) #define might_sleep(a) do { } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment