} CONTEXT_TYPE;
/* RCB (Receive Control Block) */
-typedef struct _RCB
-{
+struct vnt_rcb {
void *Next;
signed long Ref;
void *pDevice;
struct vnt_rx_mgmt sMngPacket;
struct sk_buff *skb;
int bBoolInUse;
-
-} RCB, *PRCB;
+};
/* used to track bulk out irps */
struct vnt_usb_send_context {
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;
#define DequeueRCB(Head, Tail) \
{ \
- PRCB RCB = Head; \
+ struct vnt_rcb *RCB = Head; \
if (!RCB->Next) { \
Tail = NULL; \
} \
*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;
/* 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]
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);
}
-void RXvFreeRCB(PRCB pRCB, int bReAllocSkb)
+void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb)
{
struct vnt_private *pDevice = pRCB->pDevice;
void RXvMngWorkItem(struct vnt_private *pDevice)
{
- PRCB pRCB = NULL;
+ struct vnt_rcb *pRCB = NULL;
struct vnt_rx_mgmt *pRxPacket;
int bReAllocSkb = false;
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__ */
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++) {
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++) {
}
/* 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;
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++) {
*
*/
-int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB)
+int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, struct vnt_rcb *pRCB)
{
int ntStatus = 0;
struct urb *pUrb;
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;
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);