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

staging: vt6656: device.h Replace typedef struct _RCB

Replace with struct vnt_rcb
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8114c93e
...@@ -166,8 +166,7 @@ typedef enum _CONTEXT_TYPE { ...@@ -166,8 +166,7 @@ typedef enum _CONTEXT_TYPE {
} CONTEXT_TYPE; } CONTEXT_TYPE;
/* RCB (Receive Control Block) */ /* RCB (Receive Control Block) */
typedef struct _RCB struct vnt_rcb {
{
void *Next; void *Next;
signed long Ref; signed long Ref;
void *pDevice; void *pDevice;
...@@ -175,8 +174,7 @@ typedef struct _RCB ...@@ -175,8 +174,7 @@ typedef struct _RCB
struct vnt_rx_mgmt sMngPacket; struct vnt_rx_mgmt sMngPacket;
struct sk_buff *skb; struct sk_buff *skb;
int bBoolInUse; int bBoolInUse;
};
} RCB, *PRCB;
/* used to track bulk out irps */ /* used to track bulk out irps */
struct vnt_usb_send_context { struct vnt_usb_send_context {
...@@ -416,14 +414,14 @@ struct vnt_private { ...@@ -416,14 +414,14 @@ struct vnt_private {
u32 int_interval; u32 int_interval;
/* Variables to track resources for the BULK In Pipe */ /* Variables to track resources for the BULK In Pipe */
PRCB pRCBMem; struct vnt_rcb *pRCBMem;
PRCB apRCB[CB_MAX_RX_DESC]; struct vnt_rcb *apRCB[CB_MAX_RX_DESC];
u32 cbRD; u32 cbRD;
PRCB FirstRecvFreeList; struct vnt_rcb *FirstRecvFreeList;
PRCB LastRecvFreeList; struct vnt_rcb *LastRecvFreeList;
u32 NumRecvFreeList; u32 NumRecvFreeList;
PRCB FirstRecvMngList; struct vnt_rcb *FirstRecvMngList;
PRCB LastRecvMngList; struct vnt_rcb *LastRecvMngList;
u32 NumRecvMngList; u32 NumRecvMngList;
int bIsRxWorkItemQueued; int bIsRxWorkItemQueued;
int bIsRxMngWorkItemQueued; int bIsRxMngWorkItemQueued;
...@@ -774,7 +772,7 @@ struct vnt_private { ...@@ -774,7 +772,7 @@ struct vnt_private {
#define DequeueRCB(Head, Tail) \ #define DequeueRCB(Head, Tail) \
{ \ { \
PRCB RCB = Head; \ struct vnt_rcb *RCB = Head; \
if (!RCB->Next) { \ if (!RCB->Next) { \
Tail = NULL; \ Tail = NULL; \
} \ } \
......
...@@ -246,7 +246,7 @@ s_vGetDASA ( ...@@ -246,7 +246,7 @@ s_vGetDASA (
*pcbHeaderSize = cbHeaderSize; *pcbHeaderSize = cbHeaderSize;
} }
int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB,
unsigned long BytesToIndicate) unsigned long BytesToIndicate)
{ {
struct net_device_stats *pStats = &pDevice->stats; struct net_device_stats *pStats = &pDevice->stats;
...@@ -271,7 +271,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, ...@@ -271,7 +271,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
/* signed long ldBm = 0; */ /* signed long ldBm = 0; */
int bIsWEP = false; int bExtIV = false; int bIsWEP = false; int bExtIV = false;
u32 dwWbkStatus; u32 dwWbkStatus;
PRCB pRCBIndicate = pRCB; struct vnt_rcb *pRCBIndicate = pRCB;
u8 *pbyDAddress; u8 *pbyDAddress;
u16 *pwPLCP_Length; u16 *pwPLCP_Length;
u8 abyVaildRate[MAX_RATE] u8 abyVaildRate[MAX_RATE]
...@@ -1336,7 +1336,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, ...@@ -1336,7 +1336,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
void RXvWorkItem(struct vnt_private *pDevice) void RXvWorkItem(struct vnt_private *pDevice)
{ {
int ntStatus; int ntStatus;
PRCB pRCB = NULL; struct vnt_rcb *pRCB = NULL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
...@@ -1354,7 +1354,7 @@ void RXvWorkItem(struct vnt_private *pDevice) ...@@ -1354,7 +1354,7 @@ void RXvWorkItem(struct vnt_private *pDevice)
} }
void RXvFreeRCB(PRCB pRCB, int bReAllocSkb) void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb)
{ {
struct vnt_private *pDevice = pRCB->pDevice; struct vnt_private *pDevice = pRCB->pDevice;
...@@ -1391,7 +1391,7 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb) ...@@ -1391,7 +1391,7 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb)
void RXvMngWorkItem(struct vnt_private *pDevice) void RXvMngWorkItem(struct vnt_private *pDevice)
{ {
PRCB pRCB = NULL; struct vnt_rcb *pRCB = NULL;
struct vnt_rx_mgmt *pRxPacket; struct vnt_rx_mgmt *pRxPacket;
int bReAllocSkb = false; int bReAllocSkb = false;
......
...@@ -36,9 +36,9 @@ void RXvWorkItem(void *Context); ...@@ -36,9 +36,9 @@ void RXvWorkItem(void *Context);
void RXvMngWorkItem(void *Context); void RXvMngWorkItem(void *Context);
void RXvFreeRCB(PRCB pRCB, int bReAllocSkb); void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb);
int RXbBulkInProcessData(struct vnt_private *, PRCB pRCB, int RXbBulkInProcessData(struct vnt_private *, struct vnt_rcb *pRCB,
unsigned long BytesToIndicate); unsigned long BytesToIndicate);
#endif /* __RXTX_H__ */ #endif /* __RXTX_H__ */
...@@ -751,8 +751,8 @@ static void device_free_tx_bufs(struct vnt_private *pDevice) ...@@ -751,8 +751,8 @@ static void device_free_tx_bufs(struct vnt_private *pDevice)
static void device_free_rx_bufs(struct vnt_private *pDevice) static void device_free_rx_bufs(struct vnt_private *pDevice)
{ {
PRCB pRCB; struct vnt_rcb *pRCB;
int ii; int ii;
for (ii = 0; ii < pDevice->cbRD; ii++) { for (ii = 0; ii < pDevice->cbRD; ii++) {
...@@ -789,8 +789,8 @@ static void device_free_int_bufs(struct vnt_private *pDevice) ...@@ -789,8 +789,8 @@ 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; struct vnt_usb_send_context *pTxContext;
PRCB pRCB; struct vnt_rcb *pRCB;
int ii; int ii;
for (ii = 0; ii < pDevice->cbTD; ii++) { for (ii = 0; ii < pDevice->cbTD; ii++) {
...@@ -811,7 +811,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice) ...@@ -811,7 +811,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
} }
/* allocate RCB mem */ /* allocate RCB mem */
pDevice->pRCBMem = kzalloc((sizeof(RCB) * pDevice->cbRD), GFP_KERNEL); pDevice->pRCBMem = kzalloc((sizeof(struct vnt_rcb) * pDevice->cbRD),
GFP_KERNEL);
if (pDevice->pRCBMem == NULL) { if (pDevice->pRCBMem == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : alloc rx usb context failed\n", pDevice->dev->name); DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : alloc rx usb context failed\n", pDevice->dev->name);
goto free_tx; goto free_tx;
...@@ -822,7 +823,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice) ...@@ -822,7 +823,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
pDevice->FirstRecvMngList = NULL; pDevice->FirstRecvMngList = NULL;
pDevice->LastRecvMngList = NULL; pDevice->LastRecvMngList = NULL;
pDevice->NumRecvFreeList = 0; pDevice->NumRecvFreeList = 0;
pRCB = (PRCB) pDevice->pRCBMem;
pRCB = (struct vnt_rcb *)pDevice->pRCBMem;
for (ii = 0; ii < pDevice->cbRD; ii++) { for (ii = 0; ii < pDevice->cbRD; ii++) {
......
...@@ -421,7 +421,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb) ...@@ -421,7 +421,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
* *
*/ */
int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB) int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, struct vnt_rcb *pRCB)
{ {
int ntStatus = 0; int ntStatus = 0;
struct urb *pUrb; struct urb *pUrb;
...@@ -479,7 +479,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB) ...@@ -479,7 +479,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB)
static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
{ {
PRCB pRCB = (PRCB)urb->context; struct vnt_rcb *pRCB = (struct vnt_rcb *)urb->context;
struct vnt_private *pDevice = pRCB->pDevice; struct vnt_private *pDevice = pRCB->pDevice;
unsigned long bytesRead; unsigned long bytesRead;
int bIndicateReceive = false; int bIndicateReceive = false;
......
...@@ -40,7 +40,7 @@ int PIPEnsControlIn(struct vnt_private *, u8 byRequest, u16 wValue, ...@@ -40,7 +40,7 @@ int PIPEnsControlIn(struct vnt_private *, u8 byRequest, u16 wValue,
u16 wIndex, u16 wLength, u8 *pbyBuffer); u16 wIndex, u16 wLength, u8 *pbyBuffer);
int PIPEnsInterruptRead(struct vnt_private *); int PIPEnsInterruptRead(struct vnt_private *);
int PIPEnsBulkInUsbRead(struct vnt_private *, PRCB pRCB); int PIPEnsBulkInUsbRead(struct vnt_private *, struct vnt_rcb *pRCB);
int PIPEnsSendBulkOut(struct vnt_private *, int PIPEnsSendBulkOut(struct vnt_private *,
struct vnt_usb_send_context *pContext); struct vnt_usb_send_context *pContext);
......
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