Commit 575a8a5c authored by Solomon Peachy's avatar Solomon Peachy Committed by Greg Kroah-Hartman

Staging: wlan-ng: Eliminate all backwards-compatible kernel code.

It's not needed at all anymore now that we are in the kernel tree.
Signed-off-by: default avatarSolomon Peachy <pizza@shaftnet.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent aaad4303
...@@ -2607,8 +2607,6 @@ hfa384x_create( ...@@ -2607,8 +2607,6 @@ hfa384x_create(
void hfa384x_destroy(hfa384x_t *hw); void hfa384x_destroy(hfa384x_t *hw);
irqreturn_t
hfa384x_interrupt(int irq, void *dev_id PT_REGS);
int int
hfa384x_corereset( hfa384x_t *hw, int holdtime, int settletime, int genesis); hfa384x_corereset( hfa384x_t *hw, int holdtime, int settletime, int genesis);
int int
......
...@@ -198,21 +198,12 @@ submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t flags); ...@@ -198,21 +198,12 @@ submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t flags);
/*---------------------------------------------------*/ /*---------------------------------------------------*/
/* Callbacks */ /* Callbacks */
#ifdef URB_ONLY_CALLBACK
static void static void
hfa384x_usbout_callback(struct urb *urb); hfa384x_usbout_callback(struct urb *urb);
static void static void
hfa384x_ctlxout_callback(struct urb *urb); hfa384x_ctlxout_callback(struct urb *urb);
static void static void
hfa384x_usbin_callback(struct urb *urb); hfa384x_usbin_callback(struct urb *urb);
#else
static void
hfa384x_usbout_callback(struct urb *urb, struct pt_regs *regs);
static void
hfa384x_ctlxout_callback(struct urb *urb, struct pt_regs *regs);
static void
hfa384x_usbin_callback(struct urb *urb, struct pt_regs *regs);
#endif
static void static void
hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin); hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin);
...@@ -652,8 +643,8 @@ hfa384x_create( hfa384x_t *hw, struct usb_device *usb) ...@@ -652,8 +643,8 @@ hfa384x_create( hfa384x_t *hw, struct usb_device *usb)
tasklet_init(&hw->completion_bh, tasklet_init(&hw->completion_bh,
hfa384x_usbctlx_completion_task, hfa384x_usbctlx_completion_task,
(unsigned long)hw); (unsigned long)hw);
INIT_WORK2(&hw->link_bh, prism2sta_processing_defer); INIT_WORK(&hw->link_bh, prism2sta_processing_defer);
INIT_WORK2(&hw->usb_work, hfa384x_usb_defer); INIT_WORK(&hw->usb_work, hfa384x_usb_defer);
init_timer(&hw->throttle); init_timer(&hw->throttle);
hw->throttle.function = hfa384x_usb_throttlefn; hw->throttle.function = hfa384x_usb_throttlefn;
...@@ -674,7 +665,7 @@ hfa384x_create( hfa384x_t *hw, struct usb_device *usb) ...@@ -674,7 +665,7 @@ hfa384x_create( hfa384x_t *hw, struct usb_device *usb)
hw->link_status = HFA384x_LINK_NOTCONNECTED; hw->link_status = HFA384x_LINK_NOTCONNECTED;
hw->state = HFA384x_STATE_INIT; hw->state = HFA384x_STATE_INIT;
INIT_WORK2(&hw->commsqual_bh, prism2sta_commsqual_defer); INIT_WORK(&hw->commsqual_bh, prism2sta_commsqual_defer);
init_timer(&hw->commsqual_timer); init_timer(&hw->commsqual_timer);
hw->commsqual_timer.data = (unsigned long) hw; hw->commsqual_timer.data = (unsigned long) hw;
hw->commsqual_timer.function = prism2sta_commsqual_timer; hw->commsqual_timer.function = prism2sta_commsqual_timer;
...@@ -3722,11 +3713,7 @@ hfa384x_usbctlxq_run(hfa384x_t *hw) ...@@ -3722,11 +3713,7 @@ hfa384x_usbctlxq_run(hfa384x_t *hw)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
#ifdef URB_ONLY_CALLBACK
static void hfa384x_usbin_callback(struct urb *urb) static void hfa384x_usbin_callback(struct urb *urb)
#else
static void hfa384x_usbin_callback(struct urb *urb, struct pt_regs *regs)
#endif
{ {
wlandevice_t *wlandev = urb->context; wlandevice_t *wlandev = urb->context;
hfa384x_t *hw; hfa384x_t *hw;
...@@ -4381,11 +4368,7 @@ static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin) ...@@ -4381,11 +4368,7 @@ static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
#ifdef URB_ONLY_CALLBACK
static void hfa384x_usbout_callback(struct urb *urb) static void hfa384x_usbout_callback(struct urb *urb)
#else
static void hfa384x_usbout_callback(struct urb *urb, struct pt_regs *regs)
#endif
{ {
wlandevice_t *wlandev = urb->context; wlandevice_t *wlandev = urb->context;
hfa384x_usbout_t *usbout = urb->transfer_buffer; hfa384x_usbout_t *usbout = urb->transfer_buffer;
...@@ -4462,11 +4445,7 @@ static void hfa384x_usbout_callback(struct urb *urb, struct pt_regs *regs) ...@@ -4462,11 +4445,7 @@ static void hfa384x_usbout_callback(struct urb *urb, struct pt_regs *regs)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
#ifdef URB_ONLY_CALLBACK
static void hfa384x_ctlxout_callback(struct urb *urb) static void hfa384x_ctlxout_callback(struct urb *urb)
#else
static void hfa384x_ctlxout_callback(struct urb *urb, struct pt_regs *regs)
#endif
{ {
hfa384x_t *hw = urb->context; hfa384x_t *hw = urb->context;
int delete_resptimer = 0; int delete_resptimer = 0;
......
...@@ -132,9 +132,7 @@ static int prism2sta_probe_usb( ...@@ -132,9 +132,7 @@ static int prism2sta_probe_usb(
} }
} }
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
usb_get_dev(dev); usb_get_dev(dev);
#endif
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
...@@ -254,9 +252,7 @@ prism2sta_disconnect_usb(struct usb_interface *interface) ...@@ -254,9 +252,7 @@ prism2sta_disconnect_usb(struct usb_interface *interface)
unregister_wlandev(wlandev); unregister_wlandev(wlandev);
wlan_unsetup(wlandev); wlan_unsetup(wlandev);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
usb_put_dev(hw->usb); usb_put_dev(hw->usb);
#endif
hfa384x_destroy(hw); hfa384x_destroy(hw);
kfree(hw); kfree(hw);
...@@ -272,9 +268,6 @@ prism2sta_disconnect_usb(struct usb_interface *interface) ...@@ -272,9 +268,6 @@ prism2sta_disconnect_usb(struct usb_interface *interface)
static struct usb_driver prism2_usb_driver = { static struct usb_driver prism2_usb_driver = {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16))
.owner = THIS_MODULE,
#endif
.name = "prism2_usb", .name = "prism2_usb",
.probe = prism2sta_probe_usb, .probe = prism2sta_probe_usb,
.disconnect = prism2sta_disconnect_usb, .disconnect = prism2sta_disconnect_usb,
......
...@@ -48,14 +48,6 @@ ...@@ -48,14 +48,6 @@
#ifndef _WLAN_COMPAT_H #ifndef _WLAN_COMPAT_H
#define _WLAN_COMPAT_H #define _WLAN_COMPAT_H
#if defined(__KERNEL__)
#ifndef AUTOCONF_INCLUDED
#include <linux/config.h>
#endif
#endif
/*=============================================================*/ /*=============================================================*/
/*------ Bit settings -----------------------------------------*/ /*------ Bit settings -----------------------------------------*/
/*=============================================================*/ /*=============================================================*/
...@@ -102,10 +94,6 @@ ...@@ -102,10 +94,6 @@
/*------ OS Portability Macros --------------------------------*/ /*------ OS Portability Macros --------------------------------*/
/*=============================================================*/ /*=============================================================*/
#ifndef KERNEL_VERSION
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif
#ifndef WLAN_DBVAR #ifndef WLAN_DBVAR
#define WLAN_DBVAR wlan_debug #define WLAN_DBVAR wlan_debug
#endif #endif
...@@ -144,97 +132,12 @@ ...@@ -144,97 +132,12 @@
#define WLAN_LOG_DEBUG(l, s, args...) #define WLAN_LOG_DEBUG(l, s, args...)
#endif #endif
#ifdef CONFIG_SMP
#define __SMP__ 1
#endif
#if defined(__KERNEL__)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19))
#define URB_ONLY_CALLBACK
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
#define PT_REGS , struct pt_regs *regs
#else
#define PT_REGS
#endif
#define CONFIG_NETLINK 1
#ifndef wait_event_interruptible_timeout
// retval == 0; signal met; we're good.
// retval < 0; interrupted by signal.
// retval > 0; timed out.
#define __wait_event_interruptible_timeout(wq, condition, ret) \
do { \
wait_queue_t __wait; \
init_waitqueue_entry(&__wait, current); \
\
add_wait_queue(&wq, &__wait); \
for (;;) { \
set_current_state(TASK_intERRUPTIBLE); \
if (condition) \
break; \
if (!signal_pending(current)) { \
ret = schedule_timeout(ret) ; \
if (!ret) \
break; \
continue; \
} \
ret = -ERESTARTSYS; \
break; \
} \
set_current_state(TASK_RUNNING); \
remove_wait_queue(&wq, &__wait); \
} while (0)
#define wait_event_interruptible_timeout(wq, condition, timeout) \
({ \
long __ret = timeout; \
if (!(condition)) \
__wait_event_interruptible_timeout(wq, condition, __ret); \
__ret; \
})
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
#define INIT_WORK2(_wq, _routine) INIT_WORK(_wq, (void (*)(void *))_routine, _wq)
#else
#define INIT_WORK2(_wq, _routine) INIT_WORK(_wq, _routine)
#endif
#undef netdevice_t #undef netdevice_t
typedef struct net_device netdevice_t; typedef struct net_device netdevice_t;
/* TODO: Do we care about this? */
#ifndef MODULE_DEVICE_TABLE
#define MODULE_DEVICE_TABLE(foo,bar)
#endif
#define wlan_minutes2ticks(a) ((a)*(wlan_ticks_per_sec * 60))
#define wlan_seconds2ticks(a) ((a)*(wlan_ticks_per_sec))
#ifndef in_atomic
#define in_atomic() 0
#endif
#define URB_ASYNC_UNLINK 0 #define URB_ASYNC_UNLINK 0
#define USB_QUEUE_BULK 0 #define USB_QUEUE_BULK 0
#ifndef might_sleep
#define might_sleep(a) do { } while (0)
#endif
/* Apparently 2.4.2 ethtool is quite different, maybe newer too? */
#if (defined(SIOETHTOOL) && !defined(ETHTOOL_GDRVINFO))
#undef SIOETHTOOL
#endif
#endif /* __KERNEL__ */
/*=============================================================*/ /*=============================================================*/
/*------ Hardware Portability Macros --------------------------*/ /*------ Hardware Portability Macros --------------------------*/
/*=============================================================*/ /*=============================================================*/
......
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