Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −268
Original line number Diff line number Diff line
@@ -205,40 +205,6 @@
#define		HFA384x_DLSTATE_FLASHWRITEPENDING	4
#define		HFA384x_DLSTATE_GENESIS 		5

/*--- Register I/O offsets --------------------------*/
#if ((WLAN_HOSTIF == WLAN_PCMCIA) || (WLAN_HOSTIF == WLAN_PLX))

#define		HFA384x_CMD_OFF			(0x00)
#define		HFA384x_PARAM0_OFF		(0x02)
#define		HFA384x_PARAM1_OFF		(0x04)
#define		HFA384x_PARAM2_OFF		(0x06)
#define		HFA384x_STATUS_OFF		(0x08)
#define		HFA384x_RESP0_OFF		(0x0A)
#define		HFA384x_RESP1_OFF		(0x0C)
#define		HFA384x_RESP2_OFF		(0x0E)
#define		HFA384x_INFOFID_OFF		(0x10)
#define		HFA384x_RXFID_OFF		(0x20)
#define		HFA384x_ALLOCFID_OFF		(0x22)
#define		HFA384x_TXCOMPLFID_OFF		(0x24)
#define		HFA384x_SELECT0_OFF		(0x18)
#define		HFA384x_OFFSET0_OFF		(0x1C)
#define		HFA384x_DATA0_OFF		(0x36)
#define		HFA384x_SELECT1_OFF		(0x1A)
#define		HFA384x_OFFSET1_OFF		(0x1E)
#define		HFA384x_DATA1_OFF		(0x38)
#define		HFA384x_EVSTAT_OFF		(0x30)
#define		HFA384x_INTEN_OFF		(0x32)
#define		HFA384x_EVACK_OFF		(0x34)
#define		HFA384x_CONTROL_OFF		(0x14)
#define		HFA384x_SWSUPPORT0_OFF		(0x28)
#define		HFA384x_SWSUPPORT1_OFF		(0x2A)
#define		HFA384x_SWSUPPORT2_OFF		(0x2C)
#define		HFA384x_AUXPAGE_OFF		(0x3A)
#define		HFA384x_AUXOFFSET_OFF		(0x3C)
#define		HFA384x_AUXDATA_OFF		(0x3E)

#elif (WLAN_HOSTIF == WLAN_PCI || WLAN_HOSTIF == WLAN_USB)

#define		HFA384x_CMD_OFF			(0x00)
#define		HFA384x_PARAM0_OFF		(0x04)
#define		HFA384x_PARAM1_OFF		(0x08)
@@ -279,8 +245,6 @@
#define		HFA384x_PCI_M1_LEN_OFF		(0xa8)
#define		HFA384x_PCI_M1_CTL_OFF		(0xac)

#endif

/*--- Register Field Masks --------------------------*/
#define		HFA384x_CMD_BUSY		((UINT16)BIT15)
#define		HFA384x_CMD_AINFO		((UINT16)(BIT14 | BIT13 | BIT12 | BIT11 | BIT10 | BIT9 | BIT8))
@@ -1986,7 +1950,6 @@ typedef struct hfa384x_InfFrame
	hfa384x_infodata_t	info;
} __WLAN_ATTRIB_PACK__ hfa384x_InfFrame_t;

#if (WLAN_HOSTIF == WLAN_USB)
/*--------------------------------------------------------------------
USB Packet structures and constants.
--------------------------------------------------------------------*/
@@ -2138,8 +2101,6 @@ typedef union hfa384x_usbin {
	UINT8			boguspad[3000];
} __WLAN_ATTRIB_PACK__ hfa384x_usbin_t;

#endif /* WLAN_USB */

/*--------------------------------------------------------------------
PD record structures.
--------------------------------------------------------------------*/
@@ -2397,8 +2358,6 @@ typedef struct hfa384x_statusresult
	UINT16	resp2;
} hfa384x_cmdresult_t;

#if (WLAN_HOSTIF == WLAN_USB)

/* USB Control Exchange (CTLX):
 *  A queue of the structure below is maintained for all of the
 *  Request/Response type USB packets supported by Prism2.
@@ -2467,7 +2426,6 @@ typedef struct hfa384x_usbctlxq
	struct list_head	completing;
	struct list_head	reapable;
} hfa384x_usbctlxq_t;
#endif

typedef struct hfa484x_metacmd
{
@@ -2477,12 +2435,6 @@ typedef struct hfa484x_metacmd
	UINT16          parm1;
	UINT16          parm2;

#if 0 //XXX cmd irq stuff
	UINT16          bulkid;         /* what RID/FID to copy down. */
	int             bulklen;        /* how much to copy from BAP */
        char            *bulkdata;      /* And to where? */
#endif

	hfa384x_cmdresult_t result;
} hfa384x_metacmd_t;

@@ -2523,12 +2475,6 @@ typedef struct prism2sta_accesslist

typedef struct hfa384x
{
#if (WLAN_HOSTIF != WLAN_USB)
	/* Resource config */
	UINT32			iobase;
	char			__iomem *membase;
	UINT32			irq;
#else
	/* USB support data */
	struct usb_device	*usb;
	struct urb		rx_urb;
@@ -2560,16 +2506,6 @@ typedef struct hfa384x

	int                     endp_in;
	int                     endp_out;
#endif /* !USB */

#if (WLAN_HOSTIF == WLAN_PCMCIA)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)
	struct pcmcia_device *pdev;
#else
	dev_link_t	*link;
#endif
	dev_node_t	node;
#endif

	int                     sniff_fcs;
	int                     sniff_channel;
@@ -2582,34 +2518,12 @@ typedef struct hfa384x
	UINT32		state;
	UINT32		isap;
	UINT8		port_enabled[HFA384x_NUMPORTS_MAX];
#if (WLAN_HOSTIF != WLAN_USB)
	UINT		auxen;
	UINT            isram16;
#endif /* !USB */

	/* Download support */
	UINT				dlstate;
	hfa384x_downloadbuffer_t	bufinfo;
	UINT16				dltimeout;

#if (WLAN_HOSTIF != WLAN_USB)
	spinlock_t	cmdlock;
	volatile int    cmdflag;        /* wait queue flag */
	hfa384x_metacmd_t *cmddata;      /* for our async callback */

	/* BAP support */
	spinlock_t	baplock;
	struct tasklet_struct   bap_tasklet;

	/* MAC buffer ids */
        UINT16          txfid_head;
        UINT16          txfid_tail;
        UINT            txfid_N;
        UINT16          txfid_queue[HFA384x_DRVR_FIDSTACKLEN_MAX];
	UINT16			infofid;
	struct semaphore	infofid_sem;
#endif /* !USB */

	int                          scanflag;    /* to signal scan comlete */
	int                          join_ap;        /* are we joined to a specific ap */
	int                          join_retries;   /* number of join retries till we fail */
@@ -2687,19 +2601,10 @@ typedef struct hfa384x
/*=============================================================*/
/*--- Function Declarations -----------------------------------*/
/*=============================================================*/
#if (WLAN_HOSTIF == WLAN_USB)
void
hfa384x_create(
	hfa384x_t *hw,
	struct usb_device *usb);
#else
void
hfa384x_create(
	hfa384x_t *hw,
	UINT irq,
	UINT32 iobase,
	UINT8 __iomem *membase);
#endif

void hfa384x_destroy(hfa384x_t *hw);

@@ -2785,7 +2690,6 @@ hfa384x_drvr_setconfig32(hfa384x_t *hw, UINT16 rid, UINT32 val)
	return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
}

#if (WLAN_HOSTIF == WLAN_USB)
int
hfa384x_drvr_getconfig_async(hfa384x_t     *hw,
                              UINT16        rid,
@@ -2799,16 +2703,6 @@ hfa384x_drvr_setconfig_async(hfa384x_t *hw,
                              UINT16 len,
                              ctlx_usercb_t usercb,
                              void *usercb_data);
#else
static inline int
hfa384x_drvr_setconfig_async(hfa384x_t *hw, UINT16 rid, void *buf, UINT16 len,
			     void *ptr1, void *ptr2)
{
         (void)ptr1;
         (void)ptr2;
         return hfa384x_drvr_setconfig(hw, rid, buf, len);
}
#endif

static inline int
hfa384x_drvr_setconfig16_async(hfa384x_t *hw, UINT16 rid, UINT16 val)
@@ -2900,168 +2794,6 @@ hfa384x_copy_to_aux(
	void	*buf,
	UINT	len);

#if (WLAN_HOSTIF != WLAN_USB)

/*
   HFA384x is a LITTLE ENDIAN part.

   the get/setreg functions implicitly byte-swap the data to LE.
   the _noswap variants do not perform a byte-swap on the data.
*/

static inline UINT16
__hfa384x_getreg(hfa384x_t *hw, UINT reg);

static inline void
__hfa384x_setreg(hfa384x_t *hw, UINT16 val, UINT reg);

static inline UINT16
__hfa384x_getreg_noswap(hfa384x_t *hw, UINT reg);

static inline void
__hfa384x_setreg_noswap(hfa384x_t *hw, UINT16 val, UINT reg);

#ifdef REVERSE_ENDIAN
#define hfa384x_getreg __hfa384x_getreg_noswap
#define hfa384x_setreg __hfa384x_setreg_noswap
#define hfa384x_getreg_noswap __hfa384x_getreg
#define hfa384x_setreg_noswap __hfa384x_setreg
#else
#define hfa384x_getreg __hfa384x_getreg
#define hfa384x_setreg __hfa384x_setreg
#define hfa384x_getreg_noswap __hfa384x_getreg_noswap
#define hfa384x_setreg_noswap __hfa384x_setreg_noswap
#endif

/*----------------------------------------------------------------
* hfa384x_getreg
*
* Retrieve the value of one of the MAC registers.  Done here
* because different PRISM2 MAC parts use different buses and such.
* NOTE: This function returns the value in HOST ORDER!!!!!!
*
* Arguments:
*       hw         MAC part structure
*       reg        Register identifier (offset for I/O based i/f)
*
* Returns:
*       Value from the register in HOST ORDER!!!!
----------------------------------------------------------------*/
static inline UINT16
__hfa384x_getreg(hfa384x_t *hw, UINT reg)
{
/*	printk(KERN_DEBUG "Reading from 0x%0x\n", hw->membase + reg); */
#if ((WLAN_HOSTIF == WLAN_PCMCIA) || (WLAN_HOSTIF == WLAN_PLX))
	return wlan_inw_le16_to_cpu(hw->iobase+reg);
#elif (WLAN_HOSTIF == WLAN_PCI)
	return __le16_to_cpu(readw(hw->membase + reg));
#endif
}

/*----------------------------------------------------------------
* hfa384x_setreg
*
* Set the value of one of the MAC registers.  Done here
* because different PRISM2 MAC parts use different buses and such.
* NOTE: This function assumes the value is in HOST ORDER!!!!!!
*
* Arguments:
*       hw	MAC part structure
*	val	Value, in HOST ORDER!!, to put in the register
*       reg	Register identifier (offset for I/O based i/f)
*
* Returns:
*       Nothing
----------------------------------------------------------------*/
static inline void
__hfa384x_setreg(hfa384x_t *hw, UINT16 val, UINT reg)
{
#if ((WLAN_HOSTIF == WLAN_PCMCIA) || (WLAN_HOSTIF == WLAN_PLX))
	wlan_outw_cpu_to_le16( val, hw->iobase + reg);
	return;
#elif (WLAN_HOSTIF == WLAN_PCI)
	writew(__cpu_to_le16(val), hw->membase + reg);
	return;
#endif
}


/*----------------------------------------------------------------
* hfa384x_getreg_noswap
*
* Retrieve the value of one of the MAC registers.  Done here
* because different PRISM2 MAC parts use different buses and such.
*
* Arguments:
*       hw         MAC part structure
*       reg        Register identifier (offset for I/O based i/f)
*
* Returns:
*       Value from the register.
----------------------------------------------------------------*/
static inline UINT16
__hfa384x_getreg_noswap(hfa384x_t *hw, UINT reg)
{
#if ((WLAN_HOSTIF == WLAN_PCMCIA) || (WLAN_HOSTIF == WLAN_PLX))
	return wlan_inw(hw->iobase+reg);
#elif (WLAN_HOSTIF == WLAN_PCI)
	return readw(hw->membase + reg);
#endif
}


/*----------------------------------------------------------------
* hfa384x_setreg_noswap
*
* Set the value of one of the MAC registers.  Done here
* because different PRISM2 MAC parts use different buses and such.
*
* Arguments:
*       hw	MAC part structure
*	val	Value to put in the register
*       reg	Register identifier (offset for I/O based i/f)
*
* Returns:
*       Nothing
----------------------------------------------------------------*/
static inline void
__hfa384x_setreg_noswap(hfa384x_t *hw, UINT16 val, UINT reg)
{
#if ((WLAN_HOSTIF == WLAN_PCMCIA) || (WLAN_HOSTIF == WLAN_PLX))
	wlan_outw( val, hw->iobase + reg);
	return;
#elif (WLAN_HOSTIF == WLAN_PCI)
	writew(val, hw->membase + reg);
	return;
#endif
}


static inline void hfa384x_events_all(hfa384x_t *hw)
{
	hfa384x_setreg(hw,
		       HFA384x_INT_NORMAL
#ifdef CMD_IRQ
		       | HFA384x_INTEN_CMD_SET(1)
#endif
		       ,
		       HFA384x_INTEN);

}

static inline void hfa384x_events_nobap(hfa384x_t *hw)
{
	hfa384x_setreg(hw,
		        (HFA384x_INT_NORMAL & ~HFA384x_INT_BAP_OP)
#ifdef CMD_IRQ
		       | HFA384x_INTEN_CMD_SET(1)
#endif
		       ,
		       HFA384x_INTEN);

}

#endif /* WLAN_HOSTIF != WLAN_USB */
#endif /* __KERNEL__ */

#endif  /* _HFA384x_H */
+0 −5
Original line number Diff line number Diff line
@@ -136,11 +136,6 @@

#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)
static int
wait_for_completion_interruptible(struct completion *x)
+1 −57
Original line number Diff line number Diff line
#define WLAN_HOSTIF WLAN_USB
#include "hfa384x_usb.c"
#include "prism2mgmt.c"
#include "prism2mib.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) \
           USB_DEVICE(vid, pid),  \
           .driver_info = (unsigned long) name
@@ -80,23 +75,11 @@ MODULE_DEVICE_TABLE(usb, usb_prism_tbl);
*	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(
	struct usb_interface *interface,
	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;
#endif

	wlandevice_t	*wlandev = NULL;
	hfa384x_t	*hw = NULL;
@@ -104,12 +87,7 @@ static int prism2sta_probe_usb(

	DBFENTER;

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
	interface = &dev->actconfig->interface[ifnum];
#else
	dev = interface_to_usbdev(interface);
#endif


	if ((wlandev = create_wlan()) == NULL) {
		WLAN_LOG_ERROR("%s: Memory allocation failure.\n", dev_info);
@@ -131,9 +109,7 @@ static int prism2sta_probe_usb(
	/* Register the wlandev, this gets us a name and registers the
	 * linux netdevice.
	 */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
	SET_NETDEV_DEV(wlandev->netdev, &(interface->dev));
#endif
        if ( register_wlandev(wlandev) != 0 ) {
		WLAN_LOG_ERROR("%s: register_wlandev() failed.\n", dev_info);
		result = -EIO;
@@ -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))
	usb_get_dev(dev);
#endif
@@ -175,12 +148,8 @@ static int prism2sta_probe_usb(
 done:
	DBFEXIT;

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
	return wlandev;
#else
	usb_set_intfdata(interface, wlandev);
	return result;
#endif
}


@@ -203,25 +172,14 @@ static int prism2sta_probe_usb(
* Call context:
*	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
prism2sta_disconnect_usb(struct usb_interface *interface)
#endif
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
	wlandevice_t		*wlandev;
#else
	wlandevice_t		*wlandev = (wlandevice_t*)ptr;
#endif

        DBFENTER;

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
	wlandev = (wlandevice_t *) usb_get_intfdata(interface);
#endif

	if ( wlandev != NULL ) {
		LIST_HEAD(cleanlist);
@@ -296,9 +254,6 @@ prism2sta_disconnect_usb(struct usb_interface *interface)
		unregister_wlandev(wlandev);
		wlan_unsetup(wlandev);

#ifndef NEW_MODULE_CODE
		usb_dec_dev_use(hw->usb);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
		usb_put_dev(hw->usb);
#endif
@@ -311,15 +266,13 @@ prism2sta_disconnect_usb(struct usb_interface *interface)

 exit:

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
	usb_set_intfdata(interface, NULL);
#endif
	DBFEXIT;
}


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,
#endif
	.name = "prism2_usb",
@@ -329,15 +282,10 @@ static struct usb_driver prism2_usb_driver = {
	/* fops, minor? */
};

#ifdef MODULE

static int __init prism2usb_init(void)
{
        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. */
	return usb_register(&prism2_usb_driver);

@@ -350,12 +298,8 @@ static void __exit prism2usb_cleanup(void)

	usb_deregister(&prism2_usb_driver);

        printk(KERN_NOTICE "%s Unloaded\n", version);

	DBFEXIT;
};

module_init(prism2usb_init);
module_exit(prism2usb_cleanup);

#endif // module
+0 −128
Original line number Diff line number Diff line
@@ -79,19 +79,7 @@
#include <asm/io.h>
#include <asm/byteorder.h>
#include <linux/random.h>

#if (WLAN_HOSTIF == WLAN_USB)
#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"

@@ -1766,30 +1754,11 @@ int prism2mgmt_auxport_state(wlandevice_t *wlandev, void *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;

	msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
	msg->resultcode.data = P80211ENUM_resultcode_not_supported;

#endif /* WLAN_HOSTIF != WLAN_USB */

	DBFEXIT;
	return 0;
}
@@ -1817,43 +1786,12 @@ int prism2mgmt_auxport_state(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;

	WLAN_LOG_ERROR("prism2mgmt_auxport_read: Not supported on USB.\n");

	DBFEXIT;
	return 0;
#endif
}


@@ -1879,40 +1817,10 @@ int prism2mgmt_auxport_read(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;
	WLAN_LOG_ERROR("prism2mgmt_auxport_read: Not supported on USB.\n");
	DBFEXIT;
	return 0;
#endif
}

/*----------------------------------------------------------------
@@ -2386,48 +2294,12 @@ int prism2mgmt_dump_state(wlandevice_t *wlandev, void *msgp)
	p80211msg_p2req_dump_state_t	*msg = msgp;
	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;

	msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
	msg->resultcode.data = P80211ENUM_resultcode_not_supported;
	goto failed;

#endif /* (WLAN_HOSTIF != WLAN_USB) */

failed:
	DBFEXIT;
	return result;
+0 −4
Original line number Diff line number Diff line
@@ -73,10 +73,6 @@
/*=============================================================*/
/*------ 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_reset_holdtime;
extern int      prism2_reset_settletime;
Loading