updates and cleanups.
parent
cf38f98c1f
commit
f563fb744b
1
CHANGES
1
CHANGES
|
@ -41,6 +41,7 @@
|
|||
* Intersil Corporation as part of PRISM(R) chipset product development.
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
- hfa384x.h updates.
|
||||
- additions to the MIB.
|
||||
- Cleaned up wireless extension stuff a little bit.
|
||||
- Add the Microsoft MN510 device ID.
|
||||
|
|
|
@ -379,7 +379,7 @@ hfa384x_create( hfa384x_t *hw, struct usb_device *usb, void *usbcontext)
|
|||
hw->endp_out = -1;
|
||||
|
||||
/* Set up the waitq */
|
||||
init_waitqueue_head(&hw->waitq);
|
||||
init_waitqueue_head(&hw->cmdq);
|
||||
|
||||
/* Initialize the command queue */
|
||||
spin_lock_init(&hw->ctlxq.lock);
|
||||
|
@ -3415,7 +3415,7 @@ void hfa384x_usbctlx_complete(hfa384x_usbctlx_t *ctlx)
|
|||
*/
|
||||
if ( ! ctlx->is_async ) {
|
||||
ctlx->wanna_wakeup = 1;
|
||||
wake_up_interruptible(&hw->waitq);
|
||||
wake_up_interruptible(&hw->cmdq);
|
||||
} else {
|
||||
switch(hfa384x2host_16(ctlx->outbuf.type)) {
|
||||
case HFA384x_USB_CMDREQ:
|
||||
|
@ -4631,7 +4631,7 @@ hfa384x_usbctlx_submit_wait(
|
|||
while(!ctlx->wanna_wakeup)
|
||||
udelay(1000);
|
||||
} else {
|
||||
wait_event_interruptible(hw->waitq, ctlx->wanna_wakeup);
|
||||
wait_event_interruptible(hw->cmdq, ctlx->wanna_wakeup);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -980,16 +980,16 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
|
|||
if (!priv->ap) {
|
||||
/*** ADHOC IBSS ***/
|
||||
/* see if current f/w is less than 8c3 */
|
||||
if (KERNEL_VERSION(priv->ident_sta_fw.major,
|
||||
priv->ident_sta_fw.minor,
|
||||
priv->ident_sta_fw.variant) <
|
||||
KERNEL_VERSION(0,8,3)) {
|
||||
/* Ad-Hoc not quite supported on Prism2 */
|
||||
if (HFA384x_FIRMWARE_VERSION(priv->ident_sta_fw.major,
|
||||
priv->ident_sta_fw.minor,
|
||||
priv->ident_sta_fw.variant) <
|
||||
HFA384x_FIRMWARE_VERSION(0,8,3)) {
|
||||
/* Ad-Hoc not quite supported on Prism2 */
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
|
||||
/*** STATION ***/
|
||||
|
@ -2482,11 +2482,10 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
|
|||
#if 0
|
||||
/* we can use the new-fangled auto-unknown mode if the firmware
|
||||
is 1.3.3 or newer */
|
||||
if (KERNEL_VERSION(priv->ident_sta_fw.major,
|
||||
priv->ident_sta_fw.minor,
|
||||
priv->ident_sta_fw.variant) >=
|
||||
KERNEL_VERSION(1,3,3)) {
|
||||
|
||||
if (HFA384x_FIRMARE_VERSION(priv->ident_sta_fw.major,
|
||||
priv->ident_sta_fw.minor,
|
||||
priv->ident_sta_fw.variant) >=
|
||||
HFA384x_FIRMWARE_VERSION(1,3,3)) {
|
||||
/* Set up the IBSS options */
|
||||
reg = HFA384x_CREATEIBSS_JOINESS_JOINCREATEIBSS;
|
||||
hfa384x_drvr_setconfig16(hw, HFA384x_RID_CREATEIBSS, ®);
|
||||
|
|
|
@ -57,6 +57,8 @@
|
|||
#define _HFA384x_H
|
||||
|
||||
/*=============================================================*/
|
||||
#define HFA384x_FIRMWARE_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
||||
/*------ Constants --------------------------------------------*/
|
||||
/*--- Mins & Maxs -----------------------------------*/
|
||||
#define HFA384x_CMD_ALLOC_LEN_MIN ((UINT16)4)
|
||||
|
@ -97,6 +99,20 @@
|
|||
#define HFA384x_WEPFLAGS_IV_INTERVAL10 ((UINT16)BIT5)
|
||||
#define HFA384x_WEPFLAGS_IV_INTERVAL50 ((UINT16)BIT6)
|
||||
#define HFA384x_WEPFLAGS_IV_INTERVAL100 ((UINT16)(BIT5 | BIT6))
|
||||
#define HFA384x_ROAMMODE_FWSCAN_FWROAM ((UINT16)1)
|
||||
#define HFA384x_ROAMMODE_FWSCAN_HOSTROAM ((UINT16)2)
|
||||
#define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((UINT16)3)
|
||||
#define HFA384x_PORTSTATUS_DISABLED ((UINT16)1)
|
||||
#define HFA384x_PORTSTATUS_INITSRCH ((UINT16)2)
|
||||
#define HFA384x_PORTSTATUS_CONN_IBSS ((UINT16)3)
|
||||
#define HFA384x_PORTSTATUS_CONN_ESS ((UINT16)4)
|
||||
#define HFA384x_PORTSTATUS_OOR_ESS ((UINT16)5)
|
||||
#define HFA384x_PORTSTATUS_CONN_WDS ((UINT16)6)
|
||||
#define HFA384x_PORTSTATUS_HOSTAP ((UINT16)8)
|
||||
#define HFA384x_RATEBIT_1 ((UINT16)1)
|
||||
#define HFA384x_RATEBIT_2 ((UINT16)2)
|
||||
#define HFA384x_RATEBIT_5dot5 ((UINT16)4)
|
||||
#define HFA384x_RATEBIT_11 ((UINT16)8)
|
||||
|
||||
/*--- Just some symbolic names for legibility -------*/
|
||||
#define HFA384x_TXCMD_NORECL ((UINT16)0)
|
||||
|
@ -104,14 +120,16 @@
|
|||
|
||||
/*--- MAC Internal memory constants and macros ------*/
|
||||
/* masks and macros used to manipulate MAC internal memory addresses. */
|
||||
/* MAC internal memory addresses are 23 bit quantities. The MAC uses a paged address
|
||||
* space where the upper 16 bits are the page number and the lower 7 bits are the offset.
|
||||
* There are various Host API elements that require two 16-bit quantities to specify
|
||||
* a MAC internal memory address. Unfortunately, some of the API's use a page/offset
|
||||
* format where the offset value is JUST the lower seven bits and the page is
|
||||
* the remaining 16 bits. Some of the API's assume that the 23 bit address has been
|
||||
* split at the 16th bit. We refer to these two formats as AUX format and
|
||||
* CMD format. The macros below help handle some of this.
|
||||
/* MAC internal memory addresses are 23 bit quantities. The MAC uses
|
||||
* a paged address space where the upper 16 bits are the page number
|
||||
* and the lower 7 bits are the offset. There are various Host API
|
||||
* elements that require two 16-bit quantities to specify a MAC
|
||||
* internal memory address. Unfortunately, some of the API's use a
|
||||
* page/offset format where the offset value is JUST the lower seven
|
||||
* bits and the page is the remaining 16 bits. Some of the API's
|
||||
* assume that the 23 bit address has been split at the 16th bit. We
|
||||
* refer to these two formats as AUX format and CMD format. The
|
||||
* macros below help handle some of this.
|
||||
*/
|
||||
|
||||
/* Handy constant */
|
||||
|
@ -133,25 +151,25 @@
|
|||
|
||||
/* Make a 32-bit flat address from AUX format 16-bit page and offset */
|
||||
#define HFA384x_ADDR_AUX_MKFLAT(p,o) \
|
||||
(((UINT32)(((UINT16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) <<7) | \
|
||||
((UINT32)(((UINT16)(o))&HFA384x_ADDR_AUX_OFF_MASK))
|
||||
(((UINT32)(((UINT16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) <<7) | \
|
||||
((UINT32)(((UINT16)(o))&HFA384x_ADDR_AUX_OFF_MASK))
|
||||
|
||||
/* Make a 32-bit flat address from CMD format 16-bit page and offset */
|
||||
#define HFA384x_ADDR_CMD_MKFLAT(p,o) \
|
||||
(((UINT32)(((UINT16)(p))&HFA384x_ADDR_CMD_PAGE_MASK)) <<16) | \
|
||||
((UINT32)(((UINT16)(o))&HFA384x_ADDR_CMD_OFF_MASK))
|
||||
(((UINT32)(((UINT16)(p))&HFA384x_ADDR_CMD_PAGE_MASK)) <<16) | \
|
||||
((UINT32)(((UINT16)(o))&HFA384x_ADDR_CMD_OFF_MASK))
|
||||
|
||||
/* Make AUX format offset and page from a 32-bit flat address */
|
||||
#define HFA384x_ADDR_AUX_MKPAGE(f) \
|
||||
((UINT16)((((UINT32)(f))&HFA384x_ADDR_FLAT_AUX_PAGE_MASK)>>7))
|
||||
((UINT16)((((UINT32)(f))&HFA384x_ADDR_FLAT_AUX_PAGE_MASK)>>7))
|
||||
#define HFA384x_ADDR_AUX_MKOFF(f) \
|
||||
((UINT16)(((UINT32)(f))&HFA384x_ADDR_FLAT_AUX_OFF_MASK))
|
||||
((UINT16)(((UINT32)(f))&HFA384x_ADDR_FLAT_AUX_OFF_MASK))
|
||||
|
||||
/* Make CMD format offset and page from a 32-bit flat address */
|
||||
#define HFA384x_ADDR_CMD_MKPAGE(f) \
|
||||
((UINT16)((((UINT32)(f))&HFA384x_ADDR_FLAT_CMD_PAGE_MASK)>>16))
|
||||
((UINT16)((((UINT32)(f))&HFA384x_ADDR_FLAT_CMD_PAGE_MASK)>>16))
|
||||
#define HFA384x_ADDR_CMD_MKOFF(f) \
|
||||
((UINT16)(((UINT32)(f))&HFA384x_ADDR_FLAT_CMD_OFF_MASK))
|
||||
((UINT16)(((UINT32)(f))&HFA384x_ADDR_FLAT_CMD_OFF_MASK))
|
||||
|
||||
/*--- Aux register masks/tests ----------------------*/
|
||||
/* Some of the upper bits of the AUX offset register are used to */
|
||||
|
@ -162,7 +180,8 @@
|
|||
#define HFA384x_AUX_CTL_ICSRAM (0x03)
|
||||
|
||||
/* Make AUX register offset and page values from a flat address */
|
||||
#define HFA384x_AUX_MKOFF(f, c) (HFA384x_ADDR_AUX_MKOFF(f) | (((UINT16)(c))<<12))
|
||||
#define HFA384x_AUX_MKOFF(f, c) \
|
||||
(HFA384x_ADDR_AUX_MKOFF(f) | (((UINT16)(c))<<12))
|
||||
#define HFA384x_AUX_MKPAGE(f) HFA384x_ADDR_AUX_MKPAGE(f)
|
||||
|
||||
|
||||
|
@ -1081,6 +1100,14 @@ typedef struct hfa384x_ScanRequest_data
|
|||
UINT16 txRate __WLAN_ATTRIB_PACK__;
|
||||
} __WLAN_ATTRIB_PACK__ hfa384x_ScanRequest_data_t;
|
||||
|
||||
/*-- Configuration Record: HostScanRequest (data portion only) --*/
|
||||
typedef struct hfa384x_HostScanRequest_data
|
||||
{
|
||||
UINT16 channelList __WLAN_ATTRIB_PACK__;
|
||||
UINT16 txRate __WLAN_ATTRIB_PACK__;
|
||||
hfa384x_bytestr32_t ssid __WLAN_ATTRIB_PACK__;
|
||||
} __WLAN_ATTRIB_PACK__ hfa384x_HostScanRequest_data_t;
|
||||
|
||||
/*-- Configuration Record: JoinRequest (data portion only) --*/
|
||||
typedef struct hfa384x_JoinRequest_data
|
||||
{
|
||||
|
@ -2363,7 +2390,6 @@ typedef struct hfa384x
|
|||
hfa384x_usbout_t txbuff;
|
||||
UINT16 intbuff[4];
|
||||
int rxurb_posted;
|
||||
wait_queue_head_t waitq; /* Sleeper for sync callers */
|
||||
hfa384x_usbctlxq_t ctlxq;
|
||||
int endp_in;
|
||||
int endp_out;
|
||||
|
@ -2373,6 +2399,8 @@ typedef struct hfa384x
|
|||
int sniff_channel;
|
||||
int sniff_truncate;
|
||||
|
||||
wait_queue_head_t cmdq; /* wait queue itself */
|
||||
|
||||
/* Controller state */
|
||||
UINT32 state;
|
||||
UINT32 hwremoved;
|
||||
|
@ -2390,7 +2418,6 @@ typedef struct hfa384x
|
|||
#if (WLAN_HOSTIF != WLAN_USB)
|
||||
spinlock_t cmdlock;
|
||||
int cmdflag; /* wait queue flag */
|
||||
wait_queue_head_t cmdq; /* wait queue itself */
|
||||
hfa384x_metacmd_t *cmddata; /* for our async callback */
|
||||
|
||||
/* BAP support */
|
||||
|
|
Loading…
Reference in New Issue