diff options
author | merge <null@invalid> | 2009-01-22 13:55:32 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-01-22 13:55:32 +0000 |
commit | aa6f5ffbdba45aa8e19e5048648fc6c7b25376d3 (patch) | |
tree | fbb786d0ac6f8a774fd834e9ce951197e60fbffa /drivers/staging/otus/80211core/pub_usb.h | |
parent | f2d78193eae5dccd3d588d2c8ea0866efc368332 (diff) |
MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141
pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage:
From: merge <null@invalid>
MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040
stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage:
From: merge <null@invalid>
MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch
mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage:
From: Andy Green <andy@openmoko.com>
fix-stray-endmenu.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/staging/otus/80211core/pub_usb.h')
-rw-r--r-- | drivers/staging/otus/80211core/pub_usb.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/drivers/staging/otus/80211core/pub_usb.h b/drivers/staging/otus/80211core/pub_usb.h new file mode 100644 index 00000000000..c4b4bd25e82 --- /dev/null +++ b/drivers/staging/otus/80211core/pub_usb.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2007-2008 Atheros Communications Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _PUB_USB_H +#define _PUB_USB_H + +#include "../oal_dt.h" + +#define ZM_HAL_80211_MODE_AP 0 +#define ZM_HAL_80211_MODE_STA 1 +#define ZM_HAL_80211_MODE_IBSS_GENERAL 2 +#define ZM_HAL_80211_MODE_IBSS_WPA2PSK 3 + +/* USB module description */ +/* Queue Management */ +/* 80211core requires OAL to implement a transmission queue in OAL's */ +/* USB module. Because there is only limited on-chip memory, so USB */ +/* data transfer may be pending until on-chip memory is available. */ +/* 80211core also requires OAL's USB module to provide two functions */ +/* zfwUsbGetFreeTxQSize() and zfwUsbGetMaxTxQSize() for 80211core to */ +/* query the status of this transmission queue. The main purpose of */ +/* this queue is for QoS/WMM. Though there are hardware priority */ +/* queues on the chip, and also software priority queues in the */ +/* 80211core. There is still one and only one USB channel. So */ +/* 80211core will use the information that zfwUsbGetFreeTxQSize() */ +/* returned to schedule the traffic from the software priority */ +/* queues to the hardware priority queues. For example, if 80211core */ +/* found that USB transmission queue is going to be full, it will */ +/* not allow packets with lower priority to enter the USB channel. */ + + +/* Structure for USB call back functions */ +struct zfCbUsbFuncTbl { + void (*zfcbUsbRecv)(zdev_t *dev, zbuf_t *buf); + void (*zfcbUsbRegIn)(zdev_t* dev, u32_t* rsp, u16_t rspLen); + void (*zfcbUsbOutComplete)(zdev_t* dev, zbuf_t *buf, u8_t status, u8_t *hdr); + void (*zfcbUsbRegOutComplete)(zdev_t* dev); +}; + +/* Call back functions */ +/* Below are the functions that should be called by the OAL */ + +/* When data is available in endpoint 3, OAL shall embed the data in */ +/* zbuf_t and supply to 80211core by calling this function */ +/* void (*zfcbUsbRecv)(zdev_t *dev, zbuf_t *buf); */ + +/* When data is available in endpoint 2, OAL shall call this function */ +/* void (*zfcbUsbRegIn)(zdev_t* dev, u32_t* rsp, u16_t rspLen); */ + +/* When USB data transfer completed in endpoint 1, OAL shall call this function */ +/* void (*zfcbUsbOutComplete)(zdev_t* dev, zbuf_t *buf, u8_t status, u8_t *hdr); */ + + +/* Call out functions */ +/* Below are the functions that supply by the OAL for 80211core to */ +/* manipulate the USB */ + +/* Return OAL's USB TxQ size */ +extern u32_t zfwUsbGetMaxTxQSize(zdev_t* dev); + +/* Return OAL's TxQ available size */ +extern u32_t zfwUsbGetFreeTxQSize(zdev_t* dev); + +/* Register call back function */ +extern void zfwUsbRegisterCallBack(zdev_t* dev, struct zfCbUsbFuncTbl *zfUsbFunc); + +/* Enable USB interrupt endpoint */ +extern u32_t zfwUsbEnableIntEpt(zdev_t *dev, u8_t endpt); + +/* Enable USB Rx endpoint */ +extern int zfwUsbEnableRxEpt(zdev_t* dev, u8_t endpt); + +/* 80211core call this function to send a USB request over endpoint 0 */ +extern u32_t zfwUsbSubmitControl(zdev_t* dev, u8_t req, u16_t value, + u16_t index, void *data, u32_t size); +extern u32_t zfwUsbSubmitControlIo(zdev_t* dev, u8_t req, u8_t reqtype, + u16_t value, u16_t index, void *data, u32_t size); + +/* 80211core call this function to transfer data out over endpoint 1 */ +extern void zfwUsbCmd(zdev_t* dev, u8_t endpt, u32_t* cmd, u16_t cmdLen); + +/* 80211core call this function to transfer data out over endpoint 4 */ +extern u32_t zfwUsbSend(zdev_t* dev, u8_t endpt, u8_t *hdr, u16_t hdrlen, u8_t *snap, u16_t snapLen, + u8_t *tail, u16_t tailLen, zbuf_t *buf, u16_t offset); + +/* 80211core call this function to set USB configuration */ +extern u32_t zfwUsbSetConfiguration(zdev_t *dev, u16_t value); + +#endif |