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

Staging: wlan-ng: Delete PCI/PLX/PCMCIA-specific code.

Also delete a large pile of code that existed to support <2.6 kernels.
Signed-off-by: default avatarSolomon Peachy <pizza@shaftnet.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent fe5755f6
This diff is collapsed.
...@@ -136,11 +136,6 @@ ...@@ -136,11 +136,6 @@
#include "wlan_compat.h" #include "wlan_compat.h"
#if (WLAN_HOSTIF != WLAN_USB)
#error "This file is specific to USB"
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
static int static int
wait_for_completion_interruptible(struct completion *x) wait_for_completion_interruptible(struct completion *x)
......
#define WLAN_HOSTIF WLAN_USB
#include "hfa384x_usb.c" #include "hfa384x_usb.c"
#include "prism2mgmt.c" #include "prism2mgmt.c"
#include "prism2mib.c" #include "prism2mib.c"
#include "prism2sta.c" #include "prism2sta.c"
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
#error "prism2_usb requires at least a 2.4.x kernel!"
#endif
#define PRISM_USB_DEVICE(vid, pid, name) \ #define PRISM_USB_DEVICE(vid, pid, name) \
USB_DEVICE(vid, pid), \ USB_DEVICE(vid, pid), \
.driver_info = (unsigned long) name .driver_info = (unsigned long) name
...@@ -80,23 +75,11 @@ MODULE_DEVICE_TABLE(usb, usb_prism_tbl); ...@@ -80,23 +75,11 @@ MODULE_DEVICE_TABLE(usb, usb_prism_tbl);
* I'm not sure, assume it's interrupt. * I'm not sure, assume it's interrupt.
* *
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
static void __devinit *prism2sta_probe_usb(
struct usb_device *dev,
unsigned int ifnum,
const struct usb_device_id *id)
#else
static int prism2sta_probe_usb( static int prism2sta_probe_usb(
struct usb_interface *interface, struct usb_interface *interface,
const struct usb_device_id *id) const struct usb_device_id *id)
#endif
{ {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
struct usb_interface *interface;
#else
struct usb_device *dev; struct usb_device *dev;
#endif
wlandevice_t *wlandev = NULL; wlandevice_t *wlandev = NULL;
hfa384x_t *hw = NULL; hfa384x_t *hw = NULL;
...@@ -104,12 +87,7 @@ static int prism2sta_probe_usb( ...@@ -104,12 +87,7 @@ static int prism2sta_probe_usb(
DBFENTER; DBFENTER;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
interface = &dev->actconfig->interface[ifnum];
#else
dev = interface_to_usbdev(interface); dev = interface_to_usbdev(interface);
#endif
if ((wlandev = create_wlan()) == NULL) { if ((wlandev = create_wlan()) == NULL) {
WLAN_LOG_ERROR("%s: Memory allocation failure.\n", dev_info); WLAN_LOG_ERROR("%s: Memory allocation failure.\n", dev_info);
...@@ -131,9 +109,7 @@ static int prism2sta_probe_usb( ...@@ -131,9 +109,7 @@ static int prism2sta_probe_usb(
/* Register the wlandev, this gets us a name and registers the /* Register the wlandev, this gets us a name and registers the
* linux netdevice. * linux netdevice.
*/ */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
SET_NETDEV_DEV(wlandev->netdev, &(interface->dev)); SET_NETDEV_DEV(wlandev->netdev, &(interface->dev));
#endif
if ( register_wlandev(wlandev) != 0 ) { if ( register_wlandev(wlandev) != 0 ) {
WLAN_LOG_ERROR("%s: register_wlandev() failed.\n", dev_info); WLAN_LOG_ERROR("%s: register_wlandev() failed.\n", dev_info);
result = -EIO; result = -EIO;
...@@ -156,9 +132,6 @@ static int prism2sta_probe_usb( ...@@ -156,9 +132,6 @@ static int prism2sta_probe_usb(
} }
} }
#ifndef NEW_MODULE_CODE
usb_inc_dev_use(dev);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
usb_get_dev(dev); usb_get_dev(dev);
#endif #endif
...@@ -175,12 +148,8 @@ static int prism2sta_probe_usb( ...@@ -175,12 +148,8 @@ static int prism2sta_probe_usb(
done: done:
DBFEXIT; DBFEXIT;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
return wlandev;
#else
usb_set_intfdata(interface, wlandev); usb_set_intfdata(interface, wlandev);
return result; return result;
#endif
} }
...@@ -203,25 +172,14 @@ static int prism2sta_probe_usb( ...@@ -203,25 +172,14 @@ static int prism2sta_probe_usb(
* Call context: * Call context:
* process * process
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
static void __devexit
prism2sta_disconnect_usb(struct usb_device *dev, void *ptr)
#else
static void static void
prism2sta_disconnect_usb(struct usb_interface *interface) prism2sta_disconnect_usb(struct usb_interface *interface)
#endif
{ {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
wlandevice_t *wlandev; wlandevice_t *wlandev;
#else
wlandevice_t *wlandev = (wlandevice_t*)ptr;
#endif
DBFENTER; DBFENTER;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
wlandev = (wlandevice_t *) usb_get_intfdata(interface); wlandev = (wlandevice_t *) usb_get_intfdata(interface);
#endif
if ( wlandev != NULL ) { if ( wlandev != NULL ) {
LIST_HEAD(cleanlist); LIST_HEAD(cleanlist);
...@@ -296,9 +254,6 @@ prism2sta_disconnect_usb(struct usb_interface *interface) ...@@ -296,9 +254,6 @@ prism2sta_disconnect_usb(struct usb_interface *interface)
unregister_wlandev(wlandev); unregister_wlandev(wlandev);
wlan_unsetup(wlandev); wlan_unsetup(wlandev);
#ifndef NEW_MODULE_CODE
usb_dec_dev_use(hw->usb);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
usb_put_dev(hw->usb); usb_put_dev(hw->usb);
#endif #endif
...@@ -311,15 +266,13 @@ prism2sta_disconnect_usb(struct usb_interface *interface) ...@@ -311,15 +266,13 @@ prism2sta_disconnect_usb(struct usb_interface *interface)
exit: exit:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
usb_set_intfdata(interface, NULL); usb_set_intfdata(interface, NULL);
#endif
DBFEXIT; DBFEXIT;
} }
static struct usb_driver prism2_usb_driver = { static struct usb_driver prism2_usb_driver = {
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16))
.owner = THIS_MODULE, .owner = THIS_MODULE,
#endif #endif
.name = "prism2_usb", .name = "prism2_usb",
...@@ -329,15 +282,10 @@ static struct usb_driver prism2_usb_driver = { ...@@ -329,15 +282,10 @@ static struct usb_driver prism2_usb_driver = {
/* fops, minor? */ /* fops, minor? */
}; };
#ifdef MODULE
static int __init prism2usb_init(void) static int __init prism2usb_init(void)
{ {
DBFENTER; DBFENTER;
WLAN_LOG_NOTICE("%s Loaded\n", version);
WLAN_LOG_NOTICE("dev_info is: %s\n", dev_info);
/* This call will result in calls to prism2sta_probe_usb. */ /* This call will result in calls to prism2sta_probe_usb. */
return usb_register(&prism2_usb_driver); return usb_register(&prism2_usb_driver);
...@@ -350,12 +298,8 @@ static void __exit prism2usb_cleanup(void) ...@@ -350,12 +298,8 @@ static void __exit prism2usb_cleanup(void)
usb_deregister(&prism2_usb_driver); usb_deregister(&prism2_usb_driver);
printk(KERN_NOTICE "%s Unloaded\n", version);
DBFEXIT; DBFEXIT;
}; };
module_init(prism2usb_init); module_init(prism2usb_init);
module_exit(prism2usb_cleanup); module_exit(prism2usb_cleanup);
#endif // module
...@@ -79,19 +79,7 @@ ...@@ -79,19 +79,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/random.h> #include <linux/random.h>
#if (WLAN_HOSTIF == WLAN_USB)
#include <linux/usb.h> #include <linux/usb.h>
#endif
#if (WLAN_HOSTIF == WLAN_PCMCIA)
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
#endif
#include "wlan_compat.h" #include "wlan_compat.h"
...@@ -1766,30 +1754,11 @@ int prism2mgmt_auxport_state(wlandevice_t *wlandev, void *msgp) ...@@ -1766,30 +1754,11 @@ int prism2mgmt_auxport_state(wlandevice_t *wlandev, void *msgp)
{ {
p80211msg_p2req_auxport_state_t *msg = msgp; p80211msg_p2req_auxport_state_t *msg = msgp;
#if (WLAN_HOSTIF != WLAN_USB)
hfa384x_t *hw = wlandev->priv;
DBFENTER;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
if (msg->enable.data == P80211ENUM_truth_true) {
if ( hfa384x_cmd_aux_enable(hw, 0) ) {
msg->resultcode.data = P80211ENUM_resultcode_implementation_failure;
} else {
msg->resultcode.data = P80211ENUM_resultcode_success;
}
} else {
hfa384x_cmd_aux_disable(hw);
msg->resultcode.data = P80211ENUM_resultcode_success;
}
#else /* !USB */
DBFENTER; DBFENTER;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.data = P80211ENUM_resultcode_not_supported; msg->resultcode.data = P80211ENUM_resultcode_not_supported;
#endif /* WLAN_HOSTIF != WLAN_USB */
DBFEXIT; DBFEXIT;
return 0; return 0;
} }
...@@ -1817,43 +1786,12 @@ int prism2mgmt_auxport_state(wlandevice_t *wlandev, void *msgp) ...@@ -1817,43 +1786,12 @@ int prism2mgmt_auxport_state(wlandevice_t *wlandev, void *msgp)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_auxport_read(wlandevice_t *wlandev, void *msgp) int prism2mgmt_auxport_read(wlandevice_t *wlandev, void *msgp)
{ {
#if (WLAN_HOSTIF != WLAN_USB)
hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_auxport_read_t *msg = msgp;
UINT32 addr;
UINT32 len;
UINT8* buf;
UINT32 maxlen = sizeof(msg->data.data);
DBFENTER;
if ( hw->auxen ) {
addr = msg->addr.data;
len = msg->len.data;
buf = msg->data.data;
if ( len <= maxlen ) { /* max read/write size */
hfa384x_copy_from_aux(hw, addr, HFA384x_AUX_CTL_EXTDS, buf, len);
msg->resultcode.data = P80211ENUM_resultcode_success;
} else {
WLAN_LOG_DEBUG(1,"Attempt to read > maxlen from auxport.\n");
msg->resultcode.data = P80211ENUM_resultcode_refused;
}
} else {
msg->resultcode.data = P80211ENUM_resultcode_refused;
}
msg->data.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
DBFEXIT;
return 0;
#else
DBFENTER; DBFENTER;
WLAN_LOG_ERROR("prism2mgmt_auxport_read: Not supported on USB.\n"); WLAN_LOG_ERROR("prism2mgmt_auxport_read: Not supported on USB.\n");
DBFEXIT; DBFEXIT;
return 0; return 0;
#endif
} }
...@@ -1879,40 +1817,10 @@ int prism2mgmt_auxport_read(wlandevice_t *wlandev, void *msgp) ...@@ -1879,40 +1817,10 @@ int prism2mgmt_auxport_read(wlandevice_t *wlandev, void *msgp)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int prism2mgmt_auxport_write(wlandevice_t *wlandev, void *msgp) int prism2mgmt_auxport_write(wlandevice_t *wlandev, void *msgp)
{ {
#if (WLAN_HOSTIF != WLAN_USB)
hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_auxport_write_t *msg = msgp;
UINT32 addr;
UINT32 len;
UINT8* buf;
UINT32 maxlen = sizeof(msg->data.data);
DBFENTER;
if ( hw->auxen ) {
addr = msg->addr.data;
len = msg->len.data;
buf = msg->data.data;
if ( len <= maxlen ) { /* max read/write size */
hfa384x_copy_to_aux(hw, addr, HFA384x_AUX_CTL_EXTDS, buf, len);
} else {
WLAN_LOG_DEBUG(1,"Attempt to write > maxlen from auxport.\n");
msg->resultcode.data = P80211ENUM_resultcode_refused;
}
} else {
msg->resultcode.data = P80211ENUM_resultcode_refused;
}
msg->data.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
DBFEXIT;
return 0;
#else
DBFENTER; DBFENTER;
WLAN_LOG_ERROR("prism2mgmt_auxport_read: Not supported on USB.\n"); WLAN_LOG_ERROR("prism2mgmt_auxport_read: Not supported on USB.\n");
DBFEXIT; DBFEXIT;
return 0; return 0;
#endif
} }
/*---------------------------------------------------------------- /*----------------------------------------------------------------
...@@ -2386,48 +2294,12 @@ int prism2mgmt_dump_state(wlandevice_t *wlandev, void *msgp) ...@@ -2386,48 +2294,12 @@ int prism2mgmt_dump_state(wlandevice_t *wlandev, void *msgp)
p80211msg_p2req_dump_state_t *msg = msgp; p80211msg_p2req_dump_state_t *msg = msgp;
int result = 0; int result = 0;
#if (WLAN_HOSTIF != WLAN_USB)
hfa384x_t *hw = wlandev->priv;
UINT16 auxbuf[15];
DBFENTER;
WLAN_LOG_NOTICE("prism2 driver and hardware state:\n");
if ( (result = hfa384x_cmd_aux_enable(hw, 0)) ) {
WLAN_LOG_ERROR("aux_enable failed, result=%d\n", result);
goto failed;
}
hfa384x_copy_from_aux(hw,
0x01e2,
HFA384x_AUX_CTL_EXTDS,
auxbuf,
sizeof(auxbuf));
hfa384x_cmd_aux_disable(hw);
WLAN_LOG_NOTICE(" cmac: FreeBlocks=%d\n", auxbuf[5]);
WLAN_LOG_NOTICE(" cmac: IntEn=0x%02x EvStat=0x%02x\n",
hfa384x_getreg(hw, HFA384x_INTEN),
hfa384x_getreg(hw, HFA384x_EVSTAT));
#ifdef USE_FID_STACK
WLAN_LOG_NOTICE(" drvr: txfid_top=%d stacksize=%d\n",
hw->txfid_top,HFA384x_DRVR_FIDSTACKLEN_MAX);
#else
WLAN_LOG_NOTICE(" drvr: txfid_head=%d txfid_tail=%d txfid_N=%d\n",
hw->txfid_head, hw->txfid_tail, hw->txfid_N);
#endif
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.data = P80211ENUM_resultcode_success;
#else /* (WLAN_HOSTIF == WLAN_USB) */
DBFENTER; DBFENTER;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.data = P80211ENUM_resultcode_not_supported; msg->resultcode.data = P80211ENUM_resultcode_not_supported;
goto failed; goto failed;
#endif /* (WLAN_HOSTIF != WLAN_USB) */
failed: failed:
DBFEXIT; DBFEXIT;
return result; return result;
......
...@@ -73,10 +73,6 @@ ...@@ -73,10 +73,6 @@
/*=============================================================*/ /*=============================================================*/
/*------ Static variable externs ------------------------------*/ /*------ Static variable externs ------------------------------*/
#if (WLAN_HOSTIF != WLAN_USB)
extern int prism2_bap_timeout;
extern int prism2_irq_evread_max;
#endif
extern int prism2_debug; extern int prism2_debug;
extern int prism2_reset_holdtime; extern int prism2_reset_holdtime;
extern int prism2_reset_settletime; extern int prism2_reset_settletime;
......
...@@ -69,26 +69,7 @@ ...@@ -69,26 +69,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include "wlan_compat.h"
//#if (WLAN_HOSTIF == WLAN_PCMCIA)
//#include <pcmcia/version.h>
//#include <pcmcia/cs_types.h>
//#include <pcmcia/cs.h>
//#include <pcmcia/cistpl.h>
//#include <pcmcia/ds.h>
//#include <pcmcia/cisreg.h>
//#endif
//
//#if ((WLAN_HOSTIF == WLAN_PLX) || (WLAN_HOSTIF == WLAN_PCI))
//#include <linux/ioport.h>
//#include <linux/pci.h>
//endif
//#if (WLAN_HOSTIF == WLAN_USB)
#include <linux/usb.h> #include <linux/usb.h>
//#endif
/*================================================================*/ /*================================================================*/
/* Project Includes */ /* Project Includes */
......
...@@ -83,22 +83,8 @@ ...@@ -83,22 +83,8 @@
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
#if (WLAN_HOSTIF == WLAN_PCMCIA)
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
#endif
#include "wlan_compat.h" #include "wlan_compat.h"
#if ((WLAN_HOSTIF == WLAN_PLX) || (WLAN_HOSTIF == WLAN_PCI))
#include <linux/ioport.h>
#include <linux/pci.h>
#endif
/*================================================================*/ /*================================================================*/
/* Project Includes */ /* Project Includes */
...@@ -126,34 +112,9 @@ ...@@ -126,34 +112,9 @@
/*================================================================*/ /*================================================================*/
/* Local Static Definitions */ /* Local Static Definitions */
#if (WLAN_HOSTIF == WLAN_PCMCIA)
#define DRIVER_SUFFIX "_cs"
#elif (WLAN_HOSTIF == WLAN_PLX)
#define DRIVER_SUFFIX "_plx"
typedef char* dev_info_t; typedef char* dev_info_t;
#elif (WLAN_HOSTIF == WLAN_PCI)
#define DRIVER_SUFFIX "_pci"
typedef char* dev_info_t;
#elif (WLAN_HOSTIF == WLAN_USB)
#define DRIVER_SUFFIX "_usb"
typedef char* dev_info_t;
#else
#error "HOSTIF unsupported or undefined!"
#endif
static char *version = "prism2" DRIVER_SUFFIX ".o: " WLAN_RELEASE;
static dev_info_t dev_info = "prism2" DRIVER_SUFFIX;
#if (WLAN_HOSTIF == WLAN_PLX || WLAN_HOSTIF == WLAN_PCI)
#ifdef CONFIG_PM
static int prism2sta_suspend_pci(struct pci_dev *pdev, pm_message_t state);
static int prism2sta_resume_pci(struct pci_dev *pdev);
#endif
#endif
#if (WLAN_HOSTIF == WLAN_PCI)
#endif /* WLAN_PCI */ static dev_info_t dev_info = "prism2_usb";
static wlandevice_t *create_wlan(void); static wlandevice_t *create_wlan(void);
...@@ -163,16 +124,7 @@ static wlandevice_t *create_wlan(void); ...@@ -163,16 +124,7 @@ static wlandevice_t *create_wlan(void);
int prism2_reset_holdtime=30; /* Reset hold time in ms */ int prism2_reset_holdtime=30; /* Reset hold time in ms */
int prism2_reset_settletime=100; /* Reset settle time in ms */ int prism2_reset_settletime=100; /* Reset settle time in ms */
#if (WLAN_HOSTIF == WLAN_USB)
static int prism2_doreset=0; /* Do a reset at init? */ static int prism2_doreset=0; /* Do a reset at init? */
#else
static int prism2_doreset=1; /* Do a reset at init? */
int prism2_bap_timeout=1000; /* BAP timeout */
int prism2_irq_evread_max=20; /* Maximum number of
* ev_reads (loops)
* in irq handler
*/
#endif
#ifdef WLAN_INCLUDE_DEBUG #ifdef WLAN_INCLUDE_DEBUG
int prism2_debug=0; int prism2_debug=0;
...@@ -188,13 +140,6 @@ MODULE_PARM_DESC( prism2_reset_holdtime, "reset hold time in ms"); ...@@ -188,13 +140,6 @@ MODULE_PARM_DESC( prism2_reset_holdtime, "reset hold time in ms");
module_param( prism2_reset_settletime, int, 0644); module_param( prism2_reset_settletime, int, 0644);
MODULE_PARM_DESC( prism2_reset_settletime, "reset settle time in ms"); MODULE_PARM_DESC( prism2_reset_settletime, "reset settle time in ms");
#if (WLAN_HOSTIF != WLAN_USB)
module_param( prism2_bap_timeout, int, 0644);
MODULE_PARM_DESC(prism2_bap_timeout, "BufferAccessPath Timeout in 10*n us");
module_param( prism2_irq_evread_max, int, 0644);
MODULE_PARM_DESC( prism2_irq_evread_max, "Maximim number of event reads in interrupt handler");
#endif
MODULE_LICENSE("Dual MPL/GPL"); MODULE_LICENSE("Dual MPL/GPL");
/*================================================================*/ /*================================================================*/
...@@ -299,10 +244,6 @@ static int prism2sta_open(wlandevice_t *wlandev) ...@@ -299,10 +244,6 @@ static int prism2sta_open(wlandevice_t *wlandev)
{ {
DBFENTER; DBFENTER;
#ifdef ANCIENT_MODULE_CODE
MOD_INC_USE_COUNT;
#endif
/* We don't currently have to do anything else. /* We don't currently have to do anything else.
* The setup of the MAC should be subsequently completed via * The setup of the MAC should be subsequently completed via
* the mlme commands. * the mlme commands.
...@@ -341,10 +282,6 @@ static int prism2sta_close(wlandevice_t *wlandev) ...@@ -341,10 +282,6 @@ static int prism2sta_close(wlandevice_t *wlandev)
{ {
DBFENTER; DBFENTER;
#ifdef ANCIENT_MODULE_CODE
MOD_DEC_USE_COUNT;
#endif
/* We don't currently have to do anything else. /* We don't currently have to do anything else.
* Higher layers know we're not ready from dev->start==0 and * Higher layers know we're not ready from dev->start==0 and
* dev->tbusy==1. Our rx path knows to not pass up received * dev->tbusy==1. Our rx path knows to not pass up received
...@@ -679,9 +616,6 @@ UINT32 prism2sta_ifstate(wlandevice_t *wlandev, UINT32 ifstate) ...@@ -679,9 +616,6 @@ UINT32 prism2sta_ifstate(wlandevice_t *wlandev, UINT32 ifstate)
* Initialize the device+driver sufficiently * Initialize the device+driver sufficiently
* for firmware loading. * for firmware loading.
*/ */
#if (WLAN_HOSTIF != WLAN_USB)
result=hfa384x_cmd_initialize(hw);
#else
if ((result=hfa384x_drvr_start(hw))) { if ((result=hfa384x_drvr_start(hw))) {
WLAN_LOG_ERROR( WLAN_LOG_ERROR(
"hfa384x_drvr_start() failed," "hfa384x_drvr_start() failed,"
...@@ -691,7 +625,6 @@ UINT32 prism2sta_ifstate(wlandevice_t *wlandev, UINT32 ifstate) ...@@ -691,7 +625,6 @@ UINT32 prism2sta_ifstate(wlandevice_t *wlandev, UINT32 ifstate)
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
break; break;
} }
#endif
wlandev->msdstate = WLAN_MSD_FWLOAD; wlandev->msdstate = WLAN_MSD_FWLOAD;
result = P80211ENUM_resultcode_success; result = P80211ENUM_resultcode_success;
break; break;
...@@ -2253,41 +2186,6 @@ void prism2sta_ev_alloc(wlandevice_t *wlandev) ...@@ -2253,41 +2186,6 @@ void prism2sta_ev_alloc(wlandevice_t *wlandev)
return; return;
} }
#if (WLAN_HOSTIF == WLAN_PLX || WLAN_HOSTIF == WLAN_PCI)
#ifdef CONFIG_PM
static int prism2sta_suspend_pci(struct pci_dev *pdev, pm_message_t state)
{
wlandevice_t *wlandev;
wlandev = (wlandevice_t *) pci_get_drvdata(pdev);
/* reset hardware */
if (wlandev) {
prism2sta_ifstate(wlandev, P80211ENUM_ifstate_disable);
p80211_suspend(wlandev);
}
// call a netif_device_detach(wlandev->netdev) ?
return 0;
}
static int prism2sta_resume_pci (struct pci_dev *pdev)
{
wlandevice_t *wlandev;
wlandev = (wlandevice_t *) pci_get_drvdata(pdev);
if (wlandev) {
prism2sta_ifstate(wlandev, P80211ENUM_ifstate_disable);
p80211_resume(wlandev);
}
return 0;
}
#endif
#endif
/*---------------------------------------------------------------- /*----------------------------------------------------------------
* create_wlan * create_wlan
* *
...@@ -2376,20 +2274,9 @@ prism2sta_proc_read( ...@@ -2376,20 +2274,9 @@ prism2sta_proc_read(
// XXX 0x0001 for prism2.5/3, 0x0000 for prism2. // XXX 0x0001 for prism2.5/3, 0x0000 for prism2.
hwtype = BIT0; hwtype = BIT0;
#if (WLAN_HOSTIF != WLAN_USB) p += sprintf(p, "# %s version %s (%s)\n\n",
if (hw->isram16)
hwtype |= BIT1;
#endif
#if (WLAN_HOSTIF == WLAN_PCI)
hwtype |= BIT2;
#endif
#define PRISM2_CVS_ID "$Id: prism2sta.c 1826 2007-03-19 15:37:00Z pizza $"
p += sprintf(p, "# %s version %s (%s) '%s'\n\n",
dev_info, dev_info,
WLAN_RELEASE, WLAN_BUILD_DATE, PRISM2_CVS_ID); WLAN_RELEASE, WLAN_BUILD_DATE);
p += sprintf(p, "# nic h/w: id=0x%02x %d.%d.%d\n", p += sprintf(p, "# nic h/w: id=0x%02x %d.%d.%d\n",
hw->ident_nic.id, hw->ident_nic.major, hw->ident_nic.id, hw->ident_nic.major,
...@@ -2409,11 +2296,6 @@ prism2sta_proc_read( ...@@ -2409,11 +2296,6 @@ prism2sta_proc_read(
hw->ident_sta_fw.minor, hw->ident_sta_fw.variant); hw->ident_sta_fw.minor, hw->ident_sta_fw.variant);
} }
#if (WLAN_HOSTIF != WLAN_USB)
p += sprintf(p, "# initial nic hw type, needed for SSF ramdl\n");
p += sprintf(p, "initnichw=%04x\n", hwtype);
#endif
exit: exit:
DBFEXIT; DBFEXIT;
return (p - page); return (p - page);
......
...@@ -49,14 +49,6 @@ ...@@ -49,14 +49,6 @@
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
/* WLAN_HOSTIF (generally set on the command line, not detected) */
#define WLAN_NONE 0
#define WLAN_PCMCIA 1
#define WLAN_ISA 2
#define WLAN_PCI 3
#define WLAN_USB 4
#define WLAN_PLX 5
#define WLAN_SLAVE 6
#define WLAN_RELEASE "0.2.8" #define WLAN_RELEASE "0.2.8"
#define WLAN_RELEASE_CODE 0x000208 #define WLAN_RELEASE_CODE 0x000208
#define WLAN_BUILD_DATE "Thu Oct 2 11:04:42 PDT 2008" #define WLAN_BUILD_DATE "Thu Oct 2 11:04:42 PDT 2008"
......
This diff is collapsed.
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