Commit dcdf1d03 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: device.h replace typedef struct _USB_SEND_CONTEXT.

Replace with struct vnt_usb_send_context.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6804f33
...@@ -179,7 +179,7 @@ typedef struct _RCB ...@@ -179,7 +179,7 @@ typedef struct _RCB
} RCB, *PRCB; } RCB, *PRCB;
/* used to track bulk out irps */ /* used to track bulk out irps */
typedef struct _USB_SEND_CONTEXT { struct vnt_usb_send_context {
void *pDevice; void *pDevice;
struct sk_buff *pPacket; struct sk_buff *pPacket;
struct urb *pUrb; struct urb *pUrb;
...@@ -189,7 +189,7 @@ typedef struct _USB_SEND_CONTEXT { ...@@ -189,7 +189,7 @@ typedef struct _USB_SEND_CONTEXT {
void *Next; void *Next;
bool bBoolInUse; bool bBoolInUse;
unsigned char Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS]; unsigned char Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
} USB_SEND_CONTEXT, *PUSB_SEND_CONTEXT; };
/* structure got from configuration file as user-desired default settings */ /* structure got from configuration file as user-desired default settings */
typedef struct _DEFAULT_CONFIG { typedef struct _DEFAULT_CONFIG {
...@@ -430,7 +430,7 @@ struct vnt_private { ...@@ -430,7 +430,7 @@ struct vnt_private {
unsigned long ulRcvRefCount; /* packets that have not returned back */ unsigned long ulRcvRefCount; /* packets that have not returned back */
/* Variables to track resources for the BULK Out Pipe */ /* Variables to track resources for the BULK Out Pipe */
PUSB_SEND_CONTEXT apTD[CB_MAX_TX_DESC]; struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC];
u32 cbTD; u32 cbTD;
/* Variables to track resources for the Interrupt In Pipe */ /* Variables to track resources for the Interrupt In Pipe */
......
...@@ -733,7 +733,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -733,7 +733,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
static void device_free_tx_bufs(struct vnt_private *pDevice) static void device_free_tx_bufs(struct vnt_private *pDevice)
{ {
PUSB_SEND_CONTEXT pTxContext; struct vnt_usb_send_context *pTxContext;
int ii; int ii;
for (ii = 0; ii < pDevice->cbTD; ii++) { for (ii = 0; ii < pDevice->cbTD; ii++) {
...@@ -788,14 +788,13 @@ static void device_free_int_bufs(struct vnt_private *pDevice) ...@@ -788,14 +788,13 @@ static void device_free_int_bufs(struct vnt_private *pDevice)
static bool device_alloc_bufs(struct vnt_private *pDevice) static bool device_alloc_bufs(struct vnt_private *pDevice)
{ {
struct vnt_usb_send_context *pTxContext;
PUSB_SEND_CONTEXT pTxContext;
PRCB pRCB; PRCB pRCB;
int ii; int ii;
for (ii = 0; ii < pDevice->cbTD; ii++) { for (ii = 0; ii < pDevice->cbTD; ii++) {
pTxContext = kmalloc(sizeof(USB_SEND_CONTEXT), GFP_KERNEL); pTxContext = kmalloc(sizeof(struct vnt_usb_send_context), GFP_KERNEL);
if (pTxContext == NULL) { if (pTxContext == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : allocate tx usb context failed\n", pDevice->dev->name); DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : allocate tx usb context failed\n", pDevice->dev->name);
goto free_tx; goto free_tx;
......
...@@ -141,8 +141,8 @@ static u16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, ...@@ -141,8 +141,8 @@ static u16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
static void *s_vGetFreeContext(struct vnt_private *pDevice) static void *s_vGetFreeContext(struct vnt_private *pDevice)
{ {
PUSB_SEND_CONTEXT pContext = NULL; struct vnt_usb_send_context *pContext = NULL;
PUSB_SEND_CONTEXT pReturnContext = NULL; struct vnt_usb_send_context *pReturnContext = NULL;
int ii; int ii;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");
...@@ -1468,7 +1468,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, ...@@ -1468,7 +1468,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice,
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
struct vnt_tx_buffer *pTX_Buffer; struct vnt_tx_buffer *pTX_Buffer;
PSTxBufHead pTxBufHead; PSTxBufHead pTxBufHead;
PUSB_SEND_CONTEXT pContext; struct vnt_usb_send_context *pContext;
struct ieee80211_hdr *pMACHeader; struct ieee80211_hdr *pMACHeader;
struct ethhdr sEthHeader; struct ethhdr sEthHeader;
u8 byPktType, *pbyTxBufferAddr; u8 byPktType, *pbyTxBufferAddr;
...@@ -1482,7 +1482,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, ...@@ -1482,7 +1482,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice,
u32 cbMacHdLen; u32 cbMacHdLen;
u16 wCurrentRate = RATE_1M; u16 wCurrentRate = RATE_1M;
pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); pContext = (struct vnt_usb_send_context *)s_vGetFreeContext(pDevice);
if (NULL == pContext) { if (NULL == pContext) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ManagementSend TX...NO CONTEXT!\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ManagementSend TX...NO CONTEXT!\n");
...@@ -1749,10 +1749,10 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, ...@@ -1749,10 +1749,10 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
u32 cbFrameBodySize; u32 cbFrameBodySize;
u32 cbReqCount; u32 cbReqCount;
u8 *pbyTxBufferAddr; u8 *pbyTxBufferAddr;
PUSB_SEND_CONTEXT pContext; struct vnt_usb_send_context *pContext;
CMD_STATUS status; CMD_STATUS status;
pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); pContext = (struct vnt_usb_send_context *)s_vGetFreeContext(pDevice);
if (NULL == pContext) { if (NULL == pContext) {
status = CMD_STATUS_RESOURCES; status = CMD_STATUS_RESOURCES;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ManagementSend TX...NO CONTEXT!\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ManagementSend TX...NO CONTEXT!\n");
...@@ -1851,7 +1851,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) ...@@ -1851,7 +1851,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb)
PSKeyItem pTransmitKey = NULL; PSKeyItem pTransmitKey = NULL;
u8 *pbyIVHead, *pbyPayloadHead, *pbyMacHdr; u8 *pbyIVHead, *pbyPayloadHead, *pbyMacHdr;
u32 cbExtSuppRate = 0; u32 cbExtSuppRate = 0;
PUSB_SEND_CONTEXT pContext; struct vnt_usb_send_context *pContext;
pvRrvTime = pMICHDR = pvTxDataHd = NULL; pvRrvTime = pMICHDR = pvTxDataHd = NULL;
...@@ -1863,7 +1863,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) ...@@ -1863,7 +1863,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb)
} }
p80211Header = (PUWLAN_80211HDR)skb->data; p80211Header = (PUWLAN_80211HDR)skb->data;
pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); pContext = (struct vnt_usb_send_context *)s_vGetFreeContext(pDevice);
if (NULL == pContext) { if (NULL == pContext) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0 TX...NO CONTEXT!\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0 TX...NO CONTEXT!\n");
...@@ -2225,7 +2225,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, ...@@ -2225,7 +2225,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice,
int bNeedDeAuth = false; int bNeedDeAuth = false;
u8 *pbyBSSID; u8 *pbyBSSID;
int bNodeExist = false; int bNodeExist = false;
PUSB_SEND_CONTEXT pContext; struct vnt_usb_send_context *pContext;
bool fConvertedPacket; bool fConvertedPacket;
u32 status; u32 status;
u16 wKeepRate = pDevice->wCurrentRate; u16 wKeepRate = pDevice->wCurrentRate;
...@@ -2296,7 +2296,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, ...@@ -2296,7 +2296,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice,
} }
} }
pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); pContext = (struct vnt_usb_send_context *)s_vGetFreeContext(pDevice);
if (pContext == NULL) { if (pContext == NULL) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG" pContext == NULL\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG" pContext == NULL\n");
...@@ -2612,13 +2612,13 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, ...@@ -2612,13 +2612,13 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen,
SKeyItem STempKey; SKeyItem STempKey;
PSKeyItem pTransmitKey = NULL; PSKeyItem pTransmitKey = NULL;
u8 *pbyBSSID; u8 *pbyBSSID;
PUSB_SEND_CONTEXT pContext; struct vnt_usb_send_context *pContext;
u8 byPktTyp; u8 byPktTyp;
int fConvertedPacket; int fConvertedPacket;
u32 status; u32 status;
u16 wKeepRate = pDevice->wCurrentRate; u16 wKeepRate = pDevice->wCurrentRate;
pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); pContext = (struct vnt_usb_send_context *)s_vGetFreeContext(pDevice);
if (NULL == pContext) { if (NULL == pContext) {
return false; return false;
......
...@@ -546,7 +546,8 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) ...@@ -546,7 +546,8 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
* *
*/ */
int PIPEnsSendBulkOut(struct vnt_private *pDevice, PUSB_SEND_CONTEXT pContext) int PIPEnsSendBulkOut(struct vnt_private *pDevice,
struct vnt_usb_send_context *pContext)
{ {
int status; int status;
struct urb *pUrb; struct urb *pUrb;
...@@ -628,13 +629,13 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) ...@@ -628,13 +629,13 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
int status; int status;
CONTEXT_TYPE ContextType; CONTEXT_TYPE ContextType;
unsigned long ulBufLen; unsigned long ulBufLen;
PUSB_SEND_CONTEXT pContext; struct vnt_usb_send_context *pContext;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n");
// //
// The context given to IoSetCompletionRoutine is an USB_CONTEXT struct // The context given to IoSetCompletionRoutine is an USB_CONTEXT struct
// //
pContext = (PUSB_SEND_CONTEXT) urb->context; pContext = (struct vnt_usb_send_context *)urb->context;
pDevice = pContext->pDevice; pDevice = pContext->pDevice;
ContextType = pContext->Type; ContextType = pContext->Type;
......
...@@ -41,6 +41,7 @@ int PIPEnsControlIn(struct vnt_private *, u8 byRequest, u16 wValue, ...@@ -41,6 +41,7 @@ int PIPEnsControlIn(struct vnt_private *, u8 byRequest, u16 wValue,
int PIPEnsInterruptRead(struct vnt_private *); int PIPEnsInterruptRead(struct vnt_private *);
int PIPEnsBulkInUsbRead(struct vnt_private *, PRCB pRCB); int PIPEnsBulkInUsbRead(struct vnt_private *, PRCB pRCB);
int PIPEnsSendBulkOut(struct vnt_private *, PUSB_SEND_CONTEXT pContext); int PIPEnsSendBulkOut(struct vnt_private *,
struct vnt_usb_send_context *pContext);
#endif /* __USBPIPE_H__ */ #endif /* __USBPIPE_H__ */
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