staging: vt6656: device.h Replace typedef struct _RCB
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 28 Aug 2013 20:12:35 +0000 (21:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Aug 2013 22:28:43 +0000 (15:28 -0700)
Replace with struct vnt_rcb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/device.h
drivers/staging/vt6656/dpc.c
drivers/staging/vt6656/dpc.h
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/usbpipe.c
drivers/staging/vt6656/usbpipe.h

index 3151c8f..8e39634 100644 (file)
@@ -166,8 +166,7 @@ typedef enum _CONTEXT_TYPE {
 } CONTEXT_TYPE;
 
 /* RCB (Receive Control Block) */
-typedef struct _RCB
-{
+struct vnt_rcb {
        void *Next;
        signed long Ref;
        void *pDevice;
@@ -175,8 +174,7 @@ typedef struct _RCB
        struct vnt_rx_mgmt sMngPacket;
        struct sk_buff *skb;
        int bBoolInUse;
-
-} RCB, *PRCB;
+};
 
 /* used to track bulk out irps */
 struct vnt_usb_send_context {
@@ -416,14 +414,14 @@ struct vnt_private {
        u32 int_interval;
 
        /* Variables to track resources for the BULK In Pipe */
-       PRCB pRCBMem;
-       PRCB apRCB[CB_MAX_RX_DESC];
+       struct vnt_rcb *pRCBMem;
+       struct vnt_rcb *apRCB[CB_MAX_RX_DESC];
        u32 cbRD;
-       PRCB FirstRecvFreeList;
-       PRCB LastRecvFreeList;
+       struct vnt_rcb *FirstRecvFreeList;
+       struct vnt_rcb *LastRecvFreeList;
        u32 NumRecvFreeList;
-       PRCB FirstRecvMngList;
-       PRCB LastRecvMngList;
+       struct vnt_rcb *FirstRecvMngList;
+       struct vnt_rcb *LastRecvMngList;
        u32 NumRecvMngList;
        int bIsRxWorkItemQueued;
        int bIsRxMngWorkItemQueued;
@@ -774,7 +772,7 @@ struct vnt_private {
 
 #define DequeueRCB(Head, Tail)                          \
 {                                                       \
-    PRCB   RCB = Head;                                  \
+    struct vnt_rcb *RCB = Head;                         \
     if (!RCB->Next) {                                   \
         Tail = NULL;                                    \
     }                                                   \
index 4bc362f..ea7d443 100644 (file)
@@ -246,7 +246,7 @@ s_vGetDASA (
     *pcbHeaderSize = cbHeaderSize;
 }
 
-int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
+int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB,
        unsigned long BytesToIndicate)
 {
        struct net_device_stats *pStats = &pDevice->stats;
@@ -271,7 +271,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
        /* signed long ldBm = 0; */
        int bIsWEP = false; int bExtIV = false;
        u32 dwWbkStatus;
-       PRCB pRCBIndicate = pRCB;
+       struct vnt_rcb *pRCBIndicate = pRCB;
        u8 *pbyDAddress;
        u16 *pwPLCP_Length;
        u8 abyVaildRate[MAX_RATE]
@@ -1336,7 +1336,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
 void RXvWorkItem(struct vnt_private *pDevice)
 {
        int ntStatus;
-       PRCB pRCB = NULL;
+       struct vnt_rcb *pRCB = NULL;
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
     spin_lock_irq(&pDevice->lock);
@@ -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;
 
@@ -1391,7 +1391,7 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb)
 
 void RXvMngWorkItem(struct vnt_private *pDevice)
 {
-       PRCB pRCB = NULL;
+       struct vnt_rcb *pRCB = NULL;
        struct vnt_rx_mgmt *pRxPacket;
        int bReAllocSkb = false;
 
index 876468f..95388dc 100644 (file)
@@ -36,9 +36,9 @@ void RXvWorkItem(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);
 
 #endif /* __RXTX_H__ */
index 37d66a3..5369717 100644 (file)
@@ -751,8 +751,8 @@ static void device_free_tx_bufs(struct vnt_private *pDevice)
 
 static void device_free_rx_bufs(struct vnt_private *pDevice)
 {
-    PRCB pRCB;
-    int ii;
+       struct vnt_rcb *pRCB;
+       int ii;
 
     for (ii = 0; ii < pDevice->cbRD; ii++) {
 
@@ -789,8 +789,8 @@ static void device_free_int_bufs(struct vnt_private *pDevice)
 static bool device_alloc_bufs(struct vnt_private *pDevice)
 {
        struct vnt_usb_send_context *pTxContext;
-    PRCB pRCB;
-    int ii;
+       struct vnt_rcb *pRCB;
+       int ii;
 
     for (ii = 0; ii < pDevice->cbTD; ii++) {
 
@@ -811,7 +811,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
     }
 
     /* 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) {
         DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : alloc rx usb context failed\n", pDevice->dev->name);
         goto free_tx;
@@ -822,7 +823,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
     pDevice->FirstRecvMngList = NULL;
     pDevice->LastRecvMngList = NULL;
     pDevice->NumRecvFreeList = 0;
-    pRCB = (PRCB) pDevice->pRCBMem;
+
+       pRCB = (struct vnt_rcb *)pDevice->pRCBMem;
 
     for (ii = 0; ii < pDevice->cbRD; ii++) {
 
index 78749ef..3a03f1d 100644 (file)
@@ -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;
        struct urb *pUrb;
@@ -479,7 +479,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB)
 
 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;
        unsigned long   bytesRead;
        int bIndicateReceive = false;
index e2a2bce..f537703 100644 (file)
@@ -40,7 +40,7 @@ int PIPEnsControlIn(struct vnt_private *, u8 byRequest, u16 wValue,
        u16 wIndex, u16 wLength,  u8 *pbyBuffer);
 
 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 *,
                                struct vnt_usb_send_context *pContext);