Commit 8a10a546 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt28x0: remove typedefs (part two)

Remove typedefs from rt_linux.h and rtmp_usb.h.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 51126deb
...@@ -198,7 +198,7 @@ typedef struct _RX_CONTEXT { ...@@ -198,7 +198,7 @@ typedef struct _RX_CONTEXT {
BOOLEAN Readable; /* Receive Complete back. OK for driver to indicate receiving packet. */ BOOLEAN Readable; /* Receive Complete back. OK for driver to indicate receiving packet. */
BOOLEAN IRPPending; /* TODO: To be removed */ BOOLEAN IRPPending; /* TODO: To be removed */
atomic_t IrpLock; atomic_t IrpLock;
NDIS_SPIN_LOCK RxContextLock; spinlock_t RxContextLock;
dma_addr_t data_dma; /* urb dma on linux */ dma_addr_t data_dma; /* urb dma on linux */
} RX_CONTEXT, *PRX_CONTEXT; } RX_CONTEXT, *PRX_CONTEXT;
......
...@@ -100,7 +100,7 @@ void BA_MaxWinSizeReasign(IN PRTMP_ADAPTER pAd, ...@@ -100,7 +100,7 @@ void BA_MaxWinSizeReasign(IN PRTMP_ADAPTER pAd,
void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd, void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd,
IN struct reordering_mpdu *mpdu) IN struct reordering_mpdu *mpdu)
{ {
PNDIS_PACKET pPacket; void *pPacket;
pPacket = mpdu->pPacket; pPacket = mpdu->pPacket;
...@@ -1388,7 +1388,7 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(IN PRTMP_ADAPTER pAd, ...@@ -1388,7 +1388,7 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(IN PRTMP_ADAPTER pAd,
u8 u8
FromWhichBSSID) FromWhichBSSID)
{ {
PNDIS_PACKET pRxPkt; void *pRxPkt;
u8 Header802_3[LENGTH_802_3]; u8 Header802_3[LENGTH_802_3];
/* 1. get 802.3 Header */ /* 1. get 802.3 Header */
......
...@@ -107,7 +107,7 @@ QID_AC_VO, QID_AC_VO }; ...@@ -107,7 +107,7 @@ QID_AC_VO, QID_AC_VO };
int MiniportMMRequest(IN PRTMP_ADAPTER pAd, int MiniportMMRequest(IN PRTMP_ADAPTER pAd,
u8 QueIdx, u8 *pData, u32 Length) u8 QueIdx, u8 *pData, u32 Length)
{ {
PNDIS_PACKET pPacket; void *pPacket;
int Status = NDIS_STATUS_SUCCESS; int Status = NDIS_STATUS_SUCCESS;
unsigned long FreeNum; unsigned long FreeNum;
u8 rtmpHwHdr[TXINFO_SIZE + TXWI_SIZE]; /*RTMP_HW_HDR_LEN]; */ u8 rtmpHwHdr[TXINFO_SIZE + TXWI_SIZE]; /*RTMP_HW_HDR_LEN]; */
...@@ -243,7 +243,7 @@ int MiniportMMRequest(IN PRTMP_ADAPTER pAd, ...@@ -243,7 +243,7 @@ int MiniportMMRequest(IN PRTMP_ADAPTER pAd,
======================================================================== ========================================================================
*/ */
int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, int MlmeHardTransmit(IN PRTMP_ADAPTER pAd,
u8 QueIdx, IN PNDIS_PACKET pPacket) u8 QueIdx, void *pPacket)
{ {
PACKET_INFO PacketInfo; PACKET_INFO PacketInfo;
u8 *pSrcBufVA; u8 *pSrcBufVA;
...@@ -271,7 +271,7 @@ int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, ...@@ -271,7 +271,7 @@ int MlmeHardTransmit(IN PRTMP_ADAPTER pAd,
} }
int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd,
u8 QueIdx, IN PNDIS_PACKET pPacket) u8 QueIdx, void *pPacket)
{ {
PACKET_INFO PacketInfo; PACKET_INFO PacketInfo;
u8 *pSrcBufVA; u8 *pSrcBufVA;
...@@ -506,7 +506,7 @@ int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, ...@@ -506,7 +506,7 @@ int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd,
(2).Normal (2).Normal
======================================================================== ========================================================================
*/ */
static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, IN PNDIS_PACKET pPacket) static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, void *pPacket)
{ {
u8 TxFrameType = TX_UNKOWN_FRAME; u8 TxFrameType = TX_UNKOWN_FRAME;
u8 Wcid; u8 Wcid;
...@@ -557,7 +557,7 @@ static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, IN PNDIS_PACKET pPacket) ...@@ -557,7 +557,7 @@ static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, IN PNDIS_PACKET pPacket)
BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk)
{ {
PACKET_INFO PacketInfo; PACKET_INFO PacketInfo;
PNDIS_PACKET pPacket; void *pPacket;
PMAC_TABLE_ENTRY pMacEntry = NULL; PMAC_TABLE_ENTRY pMacEntry = NULL;
pPacket = pTxBlk->pPacket; pPacket = pTxBlk->pPacket;
...@@ -663,7 +663,7 @@ BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) ...@@ -663,7 +663,7 @@ BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk)
} }
BOOLEAN CanDoAggregateTransmit(IN RTMP_ADAPTER * pAd, BOOLEAN CanDoAggregateTransmit(IN RTMP_ADAPTER * pAd,
IN NDIS_PACKET * pPacket, IN TX_BLK * pTxBlk) char * pPacket, IN TX_BLK * pTxBlk)
{ {
/*DBGPRINT(RT_DEBUG_TRACE, ("Check if can do aggregation! TxFrameType=%d!\n", pTxBlk->TxFrameType)); */ /*DBGPRINT(RT_DEBUG_TRACE, ("Check if can do aggregation! TxFrameType=%d!\n", pTxBlk->TxFrameType)); */
...@@ -716,7 +716,7 @@ void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /* ...@@ -716,7 +716,7 @@ void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /*
u8 Max_Tx_Packets) u8 Max_Tx_Packets)
{ {
PQUEUE_ENTRY pEntry = NULL; PQUEUE_ENTRY pEntry = NULL;
PNDIS_PACKET pPacket; void *pPacket;
int Status = NDIS_STATUS_SUCCESS; int Status = NDIS_STATUS_SUCCESS;
u8 Count = 0; u8 Count = 0;
PQUEUE_HEADER pQueue; PQUEUE_HEADER pQueue;
...@@ -1380,7 +1380,7 @@ void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd) ...@@ -1380,7 +1380,7 @@ void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd)
} }
u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd,
PNDIS_PACKET pPacket, void *pPacket,
u8 *pData, unsigned long DataSize) u8 *pData, unsigned long DataSize)
{ {
u16 PayloadSize; u16 PayloadSize;
...@@ -1390,7 +1390,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, ...@@ -1390,7 +1390,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd,
u8 Header802_3[14]; u8 Header802_3[14];
u8 *pPayload, *pDA, *pSA, *pRemovedLLCSNAP; u8 *pPayload, *pDA, *pSA, *pRemovedLLCSNAP;
PNDIS_PACKET pClonePacket; void *pClonePacket;
nMSDU = 0; nMSDU = 0;
...@@ -1479,7 +1479,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, ...@@ -1479,7 +1479,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd,
return nMSDU; return nMSDU;
} }
u32 BA_Reorder_AMSDU_Annnounce(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket) u32 BA_Reorder_AMSDU_Annnounce(IN PRTMP_ADAPTER pAd, void *pPacket)
{ {
u8 *pData; u8 *pData;
u16 DataSize; u16 DataSize;
...@@ -1853,7 +1853,7 @@ void DisassocParmFill(IN PRTMP_ADAPTER pAd, ...@@ -1853,7 +1853,7 @@ void DisassocParmFill(IN PRTMP_ADAPTER pAd,
======================================================================== ========================================================================
*/ */
BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket) BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, void *pPacket)
{ {
PACKET_INFO PacketInfo; PACKET_INFO PacketInfo;
unsigned long NumberOfBytesRead = 0; unsigned long NumberOfBytesRead = 0;
...@@ -1908,7 +1908,7 @@ BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket) ...@@ -1908,7 +1908,7 @@ BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket)
return TRUE; return TRUE;
} }
BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket) BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, void *pPacket)
{ {
u16 TypeLen; u16 TypeLen;
u8 Byte0, Byte1; u8 Byte0, Byte1;
...@@ -1938,7 +1938,7 @@ BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket) ...@@ -1938,7 +1938,7 @@ BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket)
*/ */
if (pSrcBuf[0] == 0xAA && pSrcBuf[1] == 0xAA if (pSrcBuf[0] == 0xAA && pSrcBuf[1] == 0xAA
&& pSrcBuf[2] == 0x03) { && pSrcBuf[2] == 0x03) {
Sniff2BytesFromNdisBuffer((PNDIS_BUFFER) pSrcBuf, 6, Sniff2BytesFromNdisBuffer((char *)pSrcBuf, 6,
&Byte0, &Byte1); &Byte0, &Byte1);
RTMP_SET_PACKET_LLCSNAP(pPacket, 1); RTMP_SET_PACKET_LLCSNAP(pPacket, 1);
TypeLen = (u16)((Byte0 << 8) + Byte1); TypeLen = (u16)((Byte0 << 8) + Byte1);
...@@ -1961,7 +1961,7 @@ BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket) ...@@ -1961,7 +1961,7 @@ BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket)
Frame Check Sequence (4-bytes) */ Frame Check Sequence (4-bytes) */
RTMP_SET_PACKET_VLAN(pPacket, 1); RTMP_SET_PACKET_VLAN(pPacket, 1);
Sniff2BytesFromNdisBuffer((PNDIS_BUFFER) pSrcBuf, 2, &Byte0, Sniff2BytesFromNdisBuffer((char *)pSrcBuf, 2, &Byte0,
&Byte1); &Byte1);
TypeLen = (u16)((Byte0 << 8) + Byte1); TypeLen = (u16)((Byte0 << 8) + Byte1);
...@@ -2043,7 +2043,7 @@ void Update_Rssi_Sample(IN PRTMP_ADAPTER pAd, ...@@ -2043,7 +2043,7 @@ void Update_Rssi_Sample(IN PRTMP_ADAPTER pAd,
void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd,
IN RX_BLK * pRxBlk, u8 FromWhichBSSID) IN RX_BLK * pRxBlk, u8 FromWhichBSSID)
{ {
PNDIS_PACKET pRxPacket = pRxBlk->pRxPacket; void *pRxPacket = pRxBlk->pRxPacket;
u8 Header802_3[LENGTH_802_3]; u8 Header802_3[LENGTH_802_3];
/* 1. get 802.3 Header */ /* 1. get 802.3 Header */
...@@ -2135,7 +2135,7 @@ void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, ...@@ -2135,7 +2135,7 @@ void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd,
u16 Msdu2Size; u16 Msdu2Size;
u16 Payload1Size, Payload2Size; u16 Payload1Size, Payload2Size;
u8 *pData2; u8 *pData2;
PNDIS_PACKET pPacket2 = NULL; void *pPacket2 = NULL;
Msdu2Size = *(pRxBlk->pData) + (*(pRxBlk->pData + 1) << 8); Msdu2Size = *(pRxBlk->pData) + (*(pRxBlk->pData + 1) << 8);
...@@ -2192,13 +2192,13 @@ void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, ...@@ -2192,13 +2192,13 @@ void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd,
_fragFrame.Flags = 0; \ _fragFrame.Flags = 0; \
} }
PNDIS_PACKET RTMPDeFragmentDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) void *RTMPDeFragmentDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk)
{ {
PHEADER_802_11 pHeader = pRxBlk->pHeader; PHEADER_802_11 pHeader = pRxBlk->pHeader;
PNDIS_PACKET pRxPacket = pRxBlk->pRxPacket; void *pRxPacket = pRxBlk->pRxPacket;
u8 *pData = pRxBlk->pData; u8 *pData = pRxBlk->pData;
u16 DataSize = pRxBlk->DataSize; u16 DataSize = pRxBlk->DataSize;
PNDIS_PACKET pRetPacket = NULL; void *pRetPacket = NULL;
u8 *pFragBuffer = NULL; u8 *pFragBuffer = NULL;
BOOLEAN bReassDone = FALSE; BOOLEAN bReassDone = FALSE;
u8 HeaderRoom = 0; u8 HeaderRoom = 0;
...@@ -2273,7 +2273,7 @@ done: ...@@ -2273,7 +2273,7 @@ done:
/* return defragmented packet if packet is reassembled completely */ /* return defragmented packet if packet is reassembled completely */
/* otherwise return NULL */ /* otherwise return NULL */
if (bReassDone) { if (bReassDone) {
PNDIS_PACKET pNewFragPacket; void *pNewFragPacket;
/* allocate a new packet buffer for fragment */ /* allocate a new packet buffer for fragment */
pNewFragPacket = pNewFragPacket =
......
...@@ -343,7 +343,7 @@ u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, ...@@ -343,7 +343,7 @@ u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd,
*/ */
int RtmpPCIMgmtKickOut(IN RTMP_ADAPTER * pAd, int RtmpPCIMgmtKickOut(IN RTMP_ADAPTER * pAd,
u8 QueIdx, u8 QueIdx,
IN PNDIS_PACKET pPacket, void *pPacket,
u8 *pSrcBufVA, u32 SrcBufLen) u8 *pSrcBufVA, u32 SrcBufLen)
{ {
PTXD_STRUC pTxD; PTXD_STRUC pTxD;
...@@ -520,7 +520,7 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) ...@@ -520,7 +520,7 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx)
{ {
PRTMP_TX_RING pTxRing; PRTMP_TX_RING pTxRing;
PTXD_STRUC pTxD; PTXD_STRUC pTxD;
PNDIS_PACKET pPacket; void *pPacket;
u8 FREE = 0; u8 FREE = 0;
TXD_STRUC TxD, *pOriTxD; TXD_STRUC TxD, *pOriTxD;
/*unsigned long IrqFlags; */ /*unsigned long IrqFlags; */
...@@ -664,7 +664,7 @@ BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd, ...@@ -664,7 +664,7 @@ BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd,
void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd) void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd)
{ {
PTXD_STRUC pTxD; PTXD_STRUC pTxD;
PNDIS_PACKET pPacket; void *pPacket;
/* int i; */ /* int i; */
u8 FREE = 0; u8 FREE = 0;
PRTMP_MGMT_RING pMgmtRing = &pAd->MgmtRing; PRTMP_MGMT_RING pMgmtRing = &pAd->MgmtRing;
...@@ -773,16 +773,16 @@ void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd) ...@@ -773,16 +773,16 @@ void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd)
DBGPRINT(RT_DEBUG_TRACE, ("<== RTMPHandleRxCoherentInterrupt \n")); DBGPRINT(RT_DEBUG_TRACE, ("<== RTMPHandleRxCoherentInterrupt \n"));
} }
PNDIS_PACKET GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd,
OUT PRT28XX_RXD_STRUC pSaveRxD, OUT PRT28XX_RXD_STRUC pSaveRxD,
OUT BOOLEAN * pbReschedule, OUT BOOLEAN * pbReschedule,
IN u32 * pRxPending) IN u32 * pRxPending)
{ {
PRXD_STRUC pRxD; PRXD_STRUC pRxD;
PNDIS_PACKET pRxPacket = NULL; void *pRxPacket = NULL;
PNDIS_PACKET pNewPacket; void *pNewPacket;
void *AllocVa; void *AllocVa;
NDIS_PHYSICAL_ADDRESS AllocPa; dma_addr_t AllocPa;
BOOLEAN bReschedule = FALSE; BOOLEAN bReschedule = FALSE;
RTMP_DMACB *pRxCell; RTMP_DMACB *pRxCell;
...@@ -834,7 +834,7 @@ PNDIS_PACKET GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, ...@@ -834,7 +834,7 @@ PNDIS_PACKET GetPacketFromRxRing(IN PRTMP_ADAPTER pAd,
pRxPacket = pRxCell->pNdisPacket; pRxPacket = pRxCell->pNdisPacket;
pRxCell->DmaBuf.AllocSize = RX_BUFFER_AGGRESIZE; pRxCell->DmaBuf.AllocSize = RX_BUFFER_AGGRESIZE;
pRxCell->pNdisPacket = (PNDIS_PACKET) pNewPacket; pRxCell->pNdisPacket = (void *)pNewPacket;
pRxCell->DmaBuf.AllocVa = AllocVa; pRxCell->DmaBuf.AllocVa = AllocVa;
pRxCell->DmaBuf.AllocPa = AllocPa; pRxCell->DmaBuf.AllocPa = AllocPa;
/* update SDP0 to new buffer of rx packet */ /* update SDP0 to new buffer of rx packet */
...@@ -865,7 +865,7 @@ done: ...@@ -865,7 +865,7 @@ done:
} }
int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd,
u8 QueIdx, IN PNDIS_PACKET pPacket) u8 QueIdx, void *pPacket)
{ {
PACKET_INFO PacketInfo; PACKET_INFO PacketInfo;
u8 *pSrcBufVA; u8 *pSrcBufVA;
...@@ -1041,7 +1041,7 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, ...@@ -1041,7 +1041,7 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd,
} }
int MlmeDataHardTransmit(IN PRTMP_ADAPTER pAd, int MlmeDataHardTransmit(IN PRTMP_ADAPTER pAd,
u8 QueIdx, IN PNDIS_PACKET pPacket) u8 QueIdx, void *pPacket)
{ {
if ((pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE) if ((pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE)
) { ) {
......
...@@ -575,7 +575,7 @@ void RtmpUSBDataKickOut(IN PRTMP_ADAPTER pAd, ...@@ -575,7 +575,7 @@ void RtmpUSBDataKickOut(IN PRTMP_ADAPTER pAd,
*/ */
int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd,
u8 QueIdx, u8 QueIdx,
IN PNDIS_PACKET pPacket, void *pPacket,
u8 *pSrcBufVA, u32 SrcBufLen) u8 *pSrcBufVA, u32 SrcBufLen)
{ {
PTXINFO_STRUC pTxInfo; PTXINFO_STRUC pTxInfo;
...@@ -707,13 +707,13 @@ Return Value: ...@@ -707,13 +707,13 @@ Return Value:
Note: Note:
======================================================================== ========================================================================
*/ */
PNDIS_PACKET GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd,
OUT PRT28XX_RXD_STRUC pSaveRxD, OUT PRT28XX_RXD_STRUC pSaveRxD,
OUT BOOLEAN * pbReschedule, OUT BOOLEAN * pbReschedule,
IN u32 * pRxPending) IN u32 * pRxPending)
{ {
PRX_CONTEXT pRxContext; PRX_CONTEXT pRxContext;
PNDIS_PACKET pSkb; void *pSkb;
u8 *pData; u8 *pData;
unsigned long ThisFrameLen; unsigned long ThisFrameLen;
unsigned long RxBufferLength; unsigned long RxBufferLength;
......
...@@ -60,7 +60,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) ...@@ -60,7 +60,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd)
unsigned long ErrorValue = 0; unsigned long ErrorValue = 0;
PRTMP_TX_RING pTxRing; PRTMP_TX_RING pTxRing;
PRTMP_DMABUF pDmaBuf; PRTMP_DMABUF pDmaBuf;
PNDIS_PACKET pPacket; void *pPacket;
/* PRTMP_REORDERBUF pReorderBuf; */ /* PRTMP_REORDERBUF pReorderBuf; */
DBGPRINT(RT_DEBUG_TRACE, ("--> RTMPAllocTxRxRingMemory\n")); DBGPRINT(RT_DEBUG_TRACE, ("--> RTMPAllocTxRxRingMemory\n"));
...@@ -405,7 +405,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) ...@@ -405,7 +405,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType)
PTXD_STRUC pTxD; PTXD_STRUC pTxD;
PRXD_STRUC pRxD; PRXD_STRUC pRxD;
PQUEUE_ENTRY pEntry; PQUEUE_ENTRY pEntry;
PNDIS_PACKET pPacket; void *pPacket;
int i; int i;
PRTMP_TX_RING pTxRing; PRTMP_TX_RING pTxRing;
unsigned long IrqFlags; unsigned long IrqFlags;
...@@ -428,8 +428,8 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) ...@@ -428,8 +428,8 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType)
{ {
pTxD = (PTXD_STRUC) pTxRing->Cell[i].AllocVa; pTxD = (PTXD_STRUC) pTxRing->Cell[i].AllocVa;
pPacket = (PNDIS_PACKET) pTxRing->Cell[i].pNdisPacket; pPacket = (void *)pTxRing->Cell[i].pNdisPacket;
/* release scatter-and-gather NDIS_PACKET */ /* release scatter-and-gather char */
if (pPacket) { if (pPacket) {
RELEASE_NDIS_PACKET(pAd, pPacket, RELEASE_NDIS_PACKET(pAd, pPacket,
NDIS_STATUS_FAILURE); NDIS_STATUS_FAILURE);
...@@ -437,8 +437,8 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) ...@@ -437,8 +437,8 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType)
} }
pPacket = pPacket =
(PNDIS_PACKET) pTxRing->Cell[i].pNextNdisPacket; (void *)pTxRing->Cell[i].pNextNdisPacket;
/* release scatter-and-gather NDIS_PACKET */ /* release scatter-and-gather char */
if (pPacket) { if (pPacket) {
RELEASE_NDIS_PACKET(pAd, pPacket, RELEASE_NDIS_PACKET(pAd, pPacket,
NDIS_STATUS_FAILURE); NDIS_STATUS_FAILURE);
...@@ -474,8 +474,8 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) ...@@ -474,8 +474,8 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType)
pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[i].AllocVa; pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[i].AllocVa;
pPacket = pPacket =
(PNDIS_PACKET) pAd->MgmtRing.Cell[i].pNdisPacket; (void *)pAd->MgmtRing.Cell[i].pNdisPacket;
/* rlease scatter-and-gather NDIS_PACKET */ /* rlease scatter-and-gather char */
if (pPacket) { if (pPacket) {
PCI_UNMAP_SINGLE(pAd, pTxD->SDPtr0, PCI_UNMAP_SINGLE(pAd, pTxD->SDPtr0,
pTxD->SDLen0, pTxD->SDLen0,
...@@ -486,9 +486,9 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) ...@@ -486,9 +486,9 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType)
pAd->MgmtRing.Cell[i].pNdisPacket = NULL; pAd->MgmtRing.Cell[i].pNdisPacket = NULL;
pPacket = pPacket =
(PNDIS_PACKET) pAd->MgmtRing.Cell[i]. (void *)pAd->MgmtRing.Cell[i].
pNextNdisPacket; pNextNdisPacket;
/* release scatter-and-gather NDIS_PACKET */ /* release scatter-and-gather char */
if (pPacket) { if (pPacket) {
PCI_UNMAP_SINGLE(pAd, pTxD->SDPtr1, PCI_UNMAP_SINGLE(pAd, pTxD->SDPtr1,
pTxD->SDLen1, pTxD->SDLen1,
...@@ -538,17 +538,17 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) ...@@ -538,17 +538,17 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd)
int index, num, j; int index, num, j;
PRTMP_TX_RING pTxRing; PRTMP_TX_RING pTxRing;
PTXD_STRUC pTxD; PTXD_STRUC pTxD;
PNDIS_PACKET pPacket; void *pPacket;
unsigned int IrqFlags; unsigned int IrqFlags;
/*POS_COOKIE pObj =(POS_COOKIE) pAd->OS_Cookie; */ /*struct os_cookie *pObj =(struct os_cookie *)pAd->OS_Cookie; */
DBGPRINT(RT_DEBUG_TRACE, ("--> RTMPFreeTxRxRingMemory\n")); DBGPRINT(RT_DEBUG_TRACE, ("--> RTMPFreeTxRxRingMemory\n"));
/* Free TxSwQueue Packet */ /* Free TxSwQueue Packet */
for (index = 0; index < NUM_OF_TX_RING; index++) { for (index = 0; index < NUM_OF_TX_RING; index++) {
PQUEUE_ENTRY pEntry; PQUEUE_ENTRY pEntry;
PNDIS_PACKET pPacket; void *pPacket;
PQUEUE_HEADER pQueue; PQUEUE_HEADER pQueue;
RTMP_IRQ_LOCK(&pAd->irq_lock, IrqFlags); RTMP_IRQ_LOCK(&pAd->irq_lock, IrqFlags);
......
...@@ -52,7 +52,7 @@ int NICInitRecv(IN PRTMP_ADAPTER pAd) ...@@ -52,7 +52,7 @@ int NICInitRecv(IN PRTMP_ADAPTER pAd)
{ {
u8 i; u8 i;
int Status = NDIS_STATUS_SUCCESS; int Status = NDIS_STATUS_SUCCESS;
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
DBGPRINT(RT_DEBUG_TRACE, ("--> NICInitRecv\n")); DBGPRINT(RT_DEBUG_TRACE, ("--> NICInitRecv\n"));
pObj = pObj; pObj = pObj;
...@@ -166,7 +166,7 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) ...@@ -166,7 +166,7 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd)
PTX_CONTEXT pRTSContext = &(pAd->RTSContext); PTX_CONTEXT pRTSContext = &(pAd->RTSContext);
PTX_CONTEXT pMLMEContext = NULL; PTX_CONTEXT pMLMEContext = NULL;
/* PHT_TX_CONTEXT pHTTXContext = NULL; */ /* PHT_TX_CONTEXT pHTTXContext = NULL; */
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
void *RingBaseVa; void *RingBaseVa;
/* RTMP_TX_RING *pTxRing; */ /* RTMP_TX_RING *pTxRing; */
RTMP_MGMT_RING *pMgmtRing; RTMP_MGMT_RING *pMgmtRing;
...@@ -538,7 +538,7 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) ...@@ -538,7 +538,7 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd)
PTX_CONTEXT pRTSContext = &pAd->RTSContext; PTX_CONTEXT pRTSContext = &pAd->RTSContext;
/* PHT_TX_CONTEXT pHTTXContext; */ /* PHT_TX_CONTEXT pHTTXContext; */
/*PRTMP_REORDERBUF pReorderBuf; */ /*PRTMP_REORDERBUF pReorderBuf; */
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
/* RTMP_TX_RING *pTxRing; */ /* RTMP_TX_RING *pTxRing; */
DBGPRINT(RT_DEBUG_ERROR, ("---> RTMPFreeTxRxRingMemory\n")); DBGPRINT(RT_DEBUG_ERROR, ("---> RTMPFreeTxRxRingMemory\n"));
......
...@@ -487,7 +487,7 @@ BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd, ...@@ -487,7 +487,7 @@ BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd,
Arguments: Arguments:
pAd Pointer to our adapter pAd Pointer to our adapter
PNDIS_PACKET Pointer to Ndis Packet for MIC calculation void * Pointer to Ndis Packet for MIC calculation
pEncap Pointer to LLC encap data pEncap Pointer to LLC encap data
LenEncap Total encap length, might be 0 which indicates no encap LenEncap Total encap length, might be 0 which indicates no encap
...@@ -501,7 +501,7 @@ BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd, ...@@ -501,7 +501,7 @@ BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd,
======================================================================== ========================================================================
*/ */
void RTMPCalculateMICValue(IN PRTMP_ADAPTER pAd, void RTMPCalculateMICValue(IN PRTMP_ADAPTER pAd,
IN PNDIS_PACKET pPacket, void *pPacket,
u8 *pEncap, u8 *pEncap,
IN PCIPHER_KEY pKey, u8 apidx) IN PCIPHER_KEY pKey, u8 apidx)
{ {
......
...@@ -347,7 +347,7 @@ void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ...@@ -347,7 +347,7 @@ void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem)
Arguments: Arguments:
pAd Pointer to our adapter pAd Pointer to our adapter
PNDIS_PACKET Pointer to outgoing Ndis frame void * Pointer to outgoing Ndis frame
NumberOfFrag Number of fragment required NumberOfFrag Number of fragment required
Return Value: Return Value:
...@@ -363,7 +363,7 @@ void RTMPToWirelessSta(IN PRTMP_ADAPTER pAd, ...@@ -363,7 +363,7 @@ void RTMPToWirelessSta(IN PRTMP_ADAPTER pAd,
u32 HdrLen, u32 HdrLen,
u8 *pData, u32 DataLen, IN BOOLEAN bClearFrame) u8 *pData, u32 DataLen, IN BOOLEAN bClearFrame)
{ {
PNDIS_PACKET pPacket; void *pPacket;
int Status; int Status;
if ((!pEntry) || ((!pEntry->ValidAsCLI) && (!pEntry->ValidAsApCli))) if ((!pEntry) || ((!pEntry->ValidAsCLI) && (!pEntry->ValidAsApCli)))
......
...@@ -651,7 +651,7 @@ void RTMPReadChannelPwr(IN PRTMP_ADAPTER pAd) ...@@ -651,7 +651,7 @@ void RTMPReadChannelPwr(IN PRTMP_ADAPTER pAd)
======================================================================== ========================================================================
*/ */
int NICReadRegParameters(IN PRTMP_ADAPTER pAd, int NICReadRegParameters(IN PRTMP_ADAPTER pAd,
IN NDIS_HANDLE WrapperConfigurationContext) void *WrapperConfigurationContext)
{ {
int Status = NDIS_STATUS_SUCCESS; int Status = NDIS_STATUS_SUCCESS;
DBGPRINT_S(Status, ("<-- NICReadRegParameters, Status=%x\n", Status)); DBGPRINT_S(Status, ("<-- NICReadRegParameters, Status=%x\n", Status));
...@@ -3544,9 +3544,9 @@ BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd) ...@@ -3544,9 +3544,9 @@ BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd)
} }
/* not yet support MBSS */ /* not yet support MBSS */
PNET_DEV get_netdev_from_bssid(IN PRTMP_ADAPTER pAd, u8 FromWhichBSSID) struct net_device *get_netdev_from_bssid(IN PRTMP_ADAPTER pAd, u8 FromWhichBSSID)
{ {
PNET_DEV dev_p = NULL; struct net_device *dev_p = NULL;
{ {
dev_p = pAd->net_dev; dev_p = pAd->net_dev;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define __RTMP_PCI_H__ #define __RTMP_PCI_H__
#define RT28XX_HANDLE_DEV_ASSIGN(handle, dev_p) \ #define RT28XX_HANDLE_DEV_ASSIGN(handle, dev_p) \
((POS_COOKIE)handle)->pci_dev = dev_p; ((struct os_cookie *)handle)->pci_dev = dev_p;
#ifdef LINUX #ifdef LINUX
// set driver data // set driver data
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
#ifdef PCI_MSI_SUPPORT #ifdef PCI_MSI_SUPPORT
#define RTMP_MSI_ENABLE(_pAd) \ #define RTMP_MSI_ENABLE(_pAd) \
{ POS_COOKIE _pObj = (POS_COOKIE)(_pAd->OS_Cookie); \ { struct os_cookie *_pObj = (struct os_cookie *)(_pAd->OS_Cookie); \
(_pAd)->HaveMsi = pci_enable_msi(_pObj->pci_dev) == 0 ? TRUE : FALSE; \ (_pAd)->HaveMsi = pci_enable_msi(_pObj->pci_dev) == 0 ? TRUE : FALSE; \
} }
#define RTMP_MSI_DISABLE(_pAd) \ #define RTMP_MSI_DISABLE(_pAd) \
{ POS_COOKIE _pObj = (POS_COOKIE)(_pAd->OS_Cookie); \ { struct os_cookie *_pObj = (struct os_cookie *)(_pAd->OS_Cookie); \
if (_pAd->HaveMsi == TRUE) \ if (_pAd->HaveMsi == TRUE) \
pci_disable_msi(_pObj->pci_dev); \ pci_disable_msi(_pObj->pci_dev); \
_pAd->HaveMsi = FALSE; \ _pAd->HaveMsi = FALSE; \
......
...@@ -32,10 +32,6 @@ ...@@ -32,10 +32,6 @@
#ifdef LINUX #ifdef LINUX
#include <linux/usb.h> #include <linux/usb.h>
typedef struct usb_device *PUSB_DEV;
typedef struct urb *purbb_t;
typedef struct usb_ctrlrequest devctrlrequest;
#endif // LINUX // #endif // LINUX //
extern u8 EpToQueue[6]; extern u8 EpToQueue[6];
...@@ -108,7 +104,7 @@ extern void dump_urb(struct urb *purb); ...@@ -108,7 +104,7 @@ extern void dump_urb(struct urb *purb);
#define USBD_TRANSFER_DIRECTION_OUT 0 #define USBD_TRANSFER_DIRECTION_OUT 0
#define USBD_TRANSFER_DIRECTION_IN 0 #define USBD_TRANSFER_DIRECTION_IN 0
#define USBD_SHORT_TRANSFER_OK 0 #define USBD_SHORT_TRANSFER_OK 0
#define PURB purbb_t #define PURB struct urb *
#define PIRP void * #define PIRP void *
#define NDIS_OID u32 #define NDIS_OID u32
...@@ -120,12 +116,12 @@ extern void dump_urb(struct urb *purb); ...@@ -120,12 +116,12 @@ extern void dump_urb(struct urb *purb);
#define CONTROL_TIMEOUT_JIFFIES ( (100 * OS_HZ) / 1000) #define CONTROL_TIMEOUT_JIFFIES ( (100 * OS_HZ) / 1000)
#define UNLINK_TIMEOUT_MS 3 #define UNLINK_TIMEOUT_MS 3
void RTUSBBulkOutDataPacketComplete(purbb_t purb, struct pt_regs *pt_regs); void RTUSBBulkOutDataPacketComplete(struct urb *purb, struct pt_regs *pt_regs);
void RTUSBBulkOutMLMEPacketComplete(purbb_t pUrb, struct pt_regs *pt_regs); void RTUSBBulkOutMLMEPacketComplete(struct urb *pUrb, struct pt_regs *pt_regs);
void RTUSBBulkOutNullFrameComplete(purbb_t pUrb, struct pt_regs *pt_regs); void RTUSBBulkOutNullFrameComplete(struct urb *pUrb, struct pt_regs *pt_regs);
void RTUSBBulkOutRTSFrameComplete(purbb_t pUrb, struct pt_regs *pt_regs); void RTUSBBulkOutRTSFrameComplete(struct urb *pUrb, struct pt_regs *pt_regs);
void RTUSBBulkOutPsPollComplete(purbb_t pUrb, struct pt_regs *pt_regs); void RTUSBBulkOutPsPollComplete(struct urb *pUrb, struct pt_regs *pt_regs);
void RTUSBBulkRxComplete(purbb_t pUrb, struct pt_regs *pt_regs); void RTUSBBulkRxComplete(struct urb *pUrb, struct pt_regs *pt_regs);
#ifdef KTHREAD_SUPPORT #ifdef KTHREAD_SUPPORT
#define RTUSBMlmeUp(pAd) \ #define RTUSBMlmeUp(pAd) \
......
...@@ -843,7 +843,7 @@ typedef struct _MLME_QUEUE { ...@@ -843,7 +843,7 @@ typedef struct _MLME_QUEUE {
unsigned long Num; unsigned long Num;
unsigned long Head; unsigned long Head;
unsigned long Tail; unsigned long Tail;
NDIS_SPIN_LOCK Lock; spinlock_t Lock;
MLME_QUEUE_ELEM Entry[MAX_LEN_OF_MLME_QUEUE]; MLME_QUEUE_ELEM Entry[MAX_LEN_OF_MLME_QUEUE];
} MLME_QUEUE, *PMLME_QUEUE; } MLME_QUEUE, *PMLME_QUEUE;
......
...@@ -160,7 +160,7 @@ static int rt2860_suspend(struct pci_dev *pci_dev, pm_message_t state) ...@@ -160,7 +160,7 @@ static int rt2860_suspend(struct pci_dev *pci_dev, pm_message_t state)
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF); RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
/* take down the device */ /* take down the device */
rt28xx_close((PNET_DEV) net_dev); rt28xx_close((struct net_device *)net_dev);
RT_MOD_DEC_USE_COUNT(); RT_MOD_DEC_USE_COUNT();
} }
...@@ -223,7 +223,7 @@ static int rt2860_resume(struct pci_dev *pci_dev) ...@@ -223,7 +223,7 @@ static int rt2860_resume(struct pci_dev *pci_dev)
/* mark device as attached from system and restart if needed */ /* mark device as attached from system and restart if needed */
netif_device_attach(net_dev); netif_device_attach(net_dev);
if (rt28xx_open((PNET_DEV) net_dev) != 0) { if (rt28xx_open((struct net_device *)net_dev) != 0) {
/* open fail */ /* open fail */
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("<=== rt2860_resume()\n")); ("<=== rt2860_resume()\n"));
...@@ -323,7 +323,7 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev, ...@@ -323,7 +323,7 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev,
goto err_out_iounmap; goto err_out_iounmap;
} }
((POS_COOKIE) handle)->pci_dev = pci_dev; ((struct os_cookie *)handle)->pci_dev = pci_dev;
rv = RTMPAllocAdapterBlock(handle, &pAd); /*shiang: we may need the pci_dev for allocate structure of "RTMP_ADAPTER" */ rv = RTMPAllocAdapterBlock(handle, &pAd); /*shiang: we may need the pci_dev for allocate structure of "RTMP_ADAPTER" */
if (rv != NDIS_STATUS_SUCCESS) if (rv != NDIS_STATUS_SUCCESS)
...@@ -391,7 +391,7 @@ err_out: ...@@ -391,7 +391,7 @@ err_out:
static void __devexit rt2860_remove_one(IN struct pci_dev *pci_dev) static void __devexit rt2860_remove_one(IN struct pci_dev *pci_dev)
{ {
PNET_DEV net_dev = pci_get_drvdata(pci_dev); struct net_device *net_dev = pci_get_drvdata(pci_dev);
RTMP_ADAPTER *pAd = NULL; RTMP_ADAPTER *pAd = NULL;
unsigned long csr_addr = net_dev->base_addr; /* pAd->CSRBaseAddress; */ unsigned long csr_addr = net_dev->base_addr; /* pAd->CSRBaseAddress; */
...@@ -459,9 +459,9 @@ BOOLEAN RT28XXChipsetCheck(IN void *_dev_p) ...@@ -459,9 +459,9 @@ BOOLEAN RT28XXChipsetCheck(IN void *_dev_p)
static void RTMPInitPCIeDevice(IN struct pci_dev *pci_dev, IN PRTMP_ADAPTER pAd) static void RTMPInitPCIeDevice(IN struct pci_dev *pci_dev, IN PRTMP_ADAPTER pAd)
{ {
u16 device_id; u16 device_id;
POS_COOKIE pObj; struct os_cookie *pObj;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
pci_read_config_word(pci_dev, PCI_DEVICE_ID, &device_id); pci_read_config_word(pci_dev, PCI_DEVICE_ID, &device_id);
device_id = le2cpu16(device_id); device_id = le2cpu16(device_id);
pObj->DeviceID = device_id; pObj->DeviceID = device_id;
...@@ -501,9 +501,9 @@ void RTMPInitPCIeLinkCtrlValue(IN PRTMP_ADAPTER pAd) ...@@ -501,9 +501,9 @@ void RTMPInitPCIeLinkCtrlValue(IN PRTMP_ADAPTER pAd)
u16 reg16, data2, PCIePowerSaveLevel, Configuration; u16 reg16, data2, PCIePowerSaveLevel, Configuration;
u32 MacValue; u32 MacValue;
BOOLEAN bFindIntel = FALSE; BOOLEAN bFindIntel = FALSE;
POS_COOKIE pObj; struct os_cookie *pObj;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE)) if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE))
return; return;
...@@ -815,10 +815,10 @@ void RTMPFindHostPCIDev(IN PRTMP_ADAPTER pAd) ...@@ -815,10 +815,10 @@ void RTMPFindHostPCIDev(IN PRTMP_ADAPTER pAd)
u16 reg16; u16 reg16;
u8 reg8; u8 reg8;
u32 DevFn; u32 DevFn;
PPCI_DEV pPci_dev; struct pci_dev *pPci_dev;
POS_COOKIE pObj; struct os_cookie *pObj;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE)) if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE))
return; return;
...@@ -860,9 +860,9 @@ void RTMPPCIeLinkCtrlValueRestore(IN PRTMP_ADAPTER pAd, u8 Level) ...@@ -860,9 +860,9 @@ void RTMPPCIeLinkCtrlValueRestore(IN PRTMP_ADAPTER pAd, u8 Level)
{ {
u16 PCIePowerSaveLevel, reg16; u16 PCIePowerSaveLevel, reg16;
u16 Configuration; u16 Configuration;
POS_COOKIE pObj; struct os_cookie *pObj;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE)) if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE))
return; return;
...@@ -954,9 +954,9 @@ void RTMPPCIeLinkCtrlSetting(IN PRTMP_ADAPTER pAd, u16 Max) ...@@ -954,9 +954,9 @@ void RTMPPCIeLinkCtrlSetting(IN PRTMP_ADAPTER pAd, u16 Max)
{ {
u16 PCIePowerSaveLevel, reg16; u16 PCIePowerSaveLevel, reg16;
u16 Configuration; u16 Configuration;
POS_COOKIE pObj; struct os_cookie *pObj;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE)) if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE))
return; return;
...@@ -1081,11 +1081,11 @@ void RTMPrt3xSetPCIePowerLinkCtrl(IN PRTMP_ADAPTER pAd) ...@@ -1081,11 +1081,11 @@ void RTMPrt3xSetPCIePowerLinkCtrl(IN PRTMP_ADAPTER pAd)
unsigned long HostConfiguration = 0; unsigned long HostConfiguration = 0;
unsigned long Configuration; unsigned long Configuration;
POS_COOKIE pObj; struct os_cookie *pObj;
int pos; int pos;
u16 reg16; u16 reg16;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
DBGPRINT(RT_DEBUG_INFO, DBGPRINT(RT_DEBUG_INFO,
("RTMPrt3xSetPCIePowerLinkCtrl.===> %lx\n", ("RTMPrt3xSetPCIePowerLinkCtrl.===> %lx\n",
......
This diff is collapsed.
...@@ -103,18 +103,6 @@ extern const struct iw_handler_def rt28xx_iw_handler_def; ...@@ -103,18 +103,6 @@ extern const struct iw_handler_def rt28xx_iw_handler_def;
/*********************************************************************************** /***********************************************************************************
* OS Specific definitions and data structures * OS Specific definitions and data structures
***********************************************************************************/ ***********************************************************************************/
typedef struct pci_dev *PPCI_DEV;
typedef struct net_device *PNET_DEV;
typedef void *PNDIS_PACKET;
typedef char NDIS_PACKET;
typedef PNDIS_PACKET *PPNDIS_PACKET;
typedef dma_addr_t NDIS_PHYSICAL_ADDRESS;
typedef dma_addr_t *PNDIS_PHYSICAL_ADDRESS;
typedef void *NDIS_HANDLE;
typedef char *PNDIS_BUFFER;
typedef struct pid *RTMP_OS_PID;
typedef struct semaphore RTMP_OS_SEM;
typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb, typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb,
struct net_device * net_dev); struct net_device * net_dev);
...@@ -196,8 +184,6 @@ struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev); ...@@ -196,8 +184,6 @@ struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev);
/*********************************************************************************** /***********************************************************************************
* OS file operation related data structure definitions * OS file operation related data structure definitions
***********************************************************************************/ ***********************************************************************************/
typedef struct file *RTMP_OS_FD;
typedef struct _RTMP_OS_FS_INFO_ { typedef struct _RTMP_OS_FS_INFO_ {
int fsuid; int fsuid;
int fsgid; int fsgid;
...@@ -214,8 +200,6 @@ struct os_lock { ...@@ -214,8 +200,6 @@ struct os_lock {
unsigned long flags; unsigned long flags;
}; };
typedef spinlock_t NDIS_SPIN_LOCK;
/* */ /* */
/* spin_lock enhanced for Nested spin lock */ /* spin_lock enhanced for Nested spin lock */
/* */ /* */
...@@ -349,23 +333,17 @@ do { \ ...@@ -349,23 +333,17 @@ do { \
***********************************************************************************/ ***********************************************************************************/
#define RTMP_OS_MGMT_TASK_FLAGS CLONE_VM #define RTMP_OS_MGMT_TASK_FLAGS CLONE_VM
typedef struct pid *THREAD_PID;
#define THREAD_PID_INIT_VALUE NULL #define THREAD_PID_INIT_VALUE NULL
#define GET_PID(_v) find_get_pid((_v)) #define GET_PID(_v) find_get_pid((_v))
#define GET_PID_NUMBER(_v) pid_nr((_v)) #define GET_PID_NUMBER(_v) pid_nr((_v))
#define CHECK_PID_LEGALITY(_pid) if (pid_nr((_pid)) > 0) #define CHECK_PID_LEGALITY(_pid) if (pid_nr((_pid)) > 0)
#define KILL_THREAD_PID(_A, _B, _C) kill_pid((_A), (_B), (_C)) #define KILL_THREAD_PID(_A, _B, _C) kill_pid((_A), (_B), (_C))
typedef struct tasklet_struct RTMP_NET_TASK_STRUCT;
typedef struct tasklet_struct *PRTMP_NET_TASK_STRUCT;
/*********************************************************************************** /***********************************************************************************
* Timer related definitions and data structures. * Timer related definitions and data structures.
**********************************************************************************/ **********************************************************************************/
#define OS_HZ HZ #define OS_HZ HZ
typedef struct timer_list NDIS_MINIPORT_TIMER;
typedef struct timer_list RTMP_OS_TIMER;
typedef void (*TIMER_FUNCTION) (unsigned long); typedef void (*TIMER_FUNCTION) (unsigned long);
#define OS_WAIT(_time) \ #define OS_WAIT(_time) \
...@@ -409,20 +387,20 @@ struct os_cookie { ...@@ -409,20 +387,20 @@ struct os_cookie {
struct usb_device *pUsb_Dev; struct usb_device *pUsb_Dev;
#endif /* RTMP_MAC_USB // */ #endif /* RTMP_MAC_USB // */
RTMP_NET_TASK_STRUCT rx_done_task; struct tasklet_struct rx_done_task;
RTMP_NET_TASK_STRUCT mgmt_dma_done_task; struct tasklet_struct mgmt_dma_done_task;
RTMP_NET_TASK_STRUCT ac0_dma_done_task; struct tasklet_struct ac0_dma_done_task;
RTMP_NET_TASK_STRUCT ac1_dma_done_task; struct tasklet_struct ac1_dma_done_task;
RTMP_NET_TASK_STRUCT ac2_dma_done_task; struct tasklet_struct ac2_dma_done_task;
RTMP_NET_TASK_STRUCT ac3_dma_done_task; struct tasklet_struct ac3_dma_done_task;
RTMP_NET_TASK_STRUCT tbtt_task; struct tasklet_struct tbtt_task;
#ifdef RTMP_MAC_PCI #ifdef RTMP_MAC_PCI
RTMP_NET_TASK_STRUCT fifo_statistic_full_task; struct tasklet_struct fifo_statistic_full_task;
#endif /* RTMP_MAC_PCI // */ #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
RTMP_NET_TASK_STRUCT null_frame_complete_task; struct tasklet_struct null_frame_complete_task;
RTMP_NET_TASK_STRUCT rts_frame_complete_task; struct tasklet_struct rts_frame_complete_task;
RTMP_NET_TASK_STRUCT pspoll_frame_complete_task; struct tasklet_struct pspoll_frame_complete_task;
#endif /* RTMP_MAC_USB // */ #endif /* RTMP_MAC_USB // */
unsigned long apd_pid; /*802.1x daemon pid */ unsigned long apd_pid; /*802.1x daemon pid */
...@@ -430,8 +408,6 @@ struct os_cookie { ...@@ -430,8 +408,6 @@ struct os_cookie {
int ioctl_if; int ioctl_if;
}; };
typedef struct os_cookie *POS_COOKIE;
/*********************************************************************************** /***********************************************************************************
* OS debugging and printing related definitions and data structure * OS debugging and printing related definitions and data structure
***********************************************************************************/ ***********************************************************************************/
...@@ -510,21 +486,21 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -510,21 +486,21 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
/* /*
* unsigned long * unsigned long
* RTMP_GetPhysicalAddressLow( * RTMP_GetPhysicalAddressLow(
* IN NDIS_PHYSICAL_ADDRESS PhysicalAddress); * dma_addr_t PhysicalAddress);
*/ */
#define RTMP_GetPhysicalAddressLow(PhysicalAddress) (PhysicalAddress) #define RTMP_GetPhysicalAddressLow(PhysicalAddress) (PhysicalAddress)
/* /*
* unsigned long * unsigned long
* RTMP_GetPhysicalAddressHigh( * RTMP_GetPhysicalAddressHigh(
* IN NDIS_PHYSICAL_ADDRESS PhysicalAddress); * dma_addr_t PhysicalAddress);
*/ */
#define RTMP_GetPhysicalAddressHigh(PhysicalAddress) (0) #define RTMP_GetPhysicalAddressHigh(PhysicalAddress) (0)
/* /*
* void * void
* RTMP_SetPhysicalAddressLow( * RTMP_SetPhysicalAddressLow(
* IN NDIS_PHYSICAL_ADDRESS PhysicalAddress, * dma_addr_t PhysicalAddress,
* unsigned long Value); * unsigned long Value);
*/ */
#define RTMP_SetPhysicalAddressLow(PhysicalAddress, Value) \ #define RTMP_SetPhysicalAddressLow(PhysicalAddress, Value) \
...@@ -533,7 +509,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -533,7 +509,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
/* /*
* void * void
* RTMP_SetPhysicalAddressHigh( * RTMP_SetPhysicalAddressHigh(
* IN NDIS_PHYSICAL_ADDRESS PhysicalAddress, * dma_addr_t PhysicalAddress,
* unsigned long Value); * unsigned long Value);
*/ */
#define RTMP_SetPhysicalAddressHigh(PhysicalAddress, Value) #define RTMP_SetPhysicalAddressHigh(PhysicalAddress, Value)
...@@ -652,7 +628,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -652,7 +628,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
#define RTMP_OS_NETDEV_CARRIER_OFF(_pNetDev) netif_carrier_off((_pNetDev)) #define RTMP_OS_NETDEV_CARRIER_OFF(_pNetDev) netif_carrier_off((_pNetDev))
#define QUEUE_ENTRY_TO_PACKET(pEntry) \ #define QUEUE_ENTRY_TO_PACKET(pEntry) \
(PNDIS_PACKET)(pEntry) (void *)(pEntry)
#define PACKET_TO_QUEUE_ENTRY(pPacket) \ #define PACKET_TO_QUEUE_ENTRY(pPacket) \
(PQUEUE_ENTRY)(pPacket) (PQUEUE_ENTRY)(pPacket)
...@@ -671,7 +647,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -671,7 +647,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
* os packet to rt packet * os packet to rt packet
*/ */
#define RTPKT_TO_OSPKT(_p) ((struct sk_buff *)(_p)) #define RTPKT_TO_OSPKT(_p) ((struct sk_buff *)(_p))
#define OSPKT_TO_RTPKT(_p) ((PNDIS_PACKET)(_p)) #define OSPKT_TO_RTPKT(_p) ((void *)(_p))
#define GET_OS_PKT_DATAPTR(_pkt) \ #define GET_OS_PKT_DATAPTR(_pkt) \
(RTPKT_TO_OSPKT(_pkt)->data) (RTPKT_TO_OSPKT(_pkt)->data)
...@@ -861,7 +837,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb); ...@@ -861,7 +837,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb);
IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance); IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance);
#endif /* RTMP_MAC_PCI // */ #endif /* RTMP_MAC_PCI // */
int rt28xx_sta_ioctl(IN PNET_DEV net_dev, IN OUT struct ifreq *rq, int cmd); int rt28xx_sta_ioctl(struct net_device *net_dev, IN OUT struct ifreq *rq, int cmd);
extern int ra_mtd_write(int num, loff_t to, size_t len, const u_char * buf); extern int ra_mtd_write(int num, loff_t to, size_t len, const u_char * buf);
extern int ra_mtd_read(int num, loff_t from, size_t len, u_char * buf); extern int ra_mtd_read(int num, loff_t from, size_t len, u_char * buf);
......
...@@ -208,7 +208,7 @@ Note: ...@@ -208,7 +208,7 @@ Note:
(3) BA Reordering: ba_reordering_resource_release() (3) BA Reordering: ba_reordering_resource_release()
======================================================================== ========================================================================
*/ */
int rt28xx_close(IN PNET_DEV dev) int rt28xx_close(struct net_device *dev)
{ {
struct net_device *net_dev = (struct net_device *)dev; struct net_device *net_dev = (struct net_device *)dev;
RTMP_ADAPTER *pAd = NULL; RTMP_ADAPTER *pAd = NULL;
...@@ -378,12 +378,12 @@ Return Value: ...@@ -378,12 +378,12 @@ Return Value:
Note: Note:
======================================================================== ========================================================================
*/ */
int rt28xx_open(IN PNET_DEV dev) int rt28xx_open(struct net_device *dev)
{ {
struct net_device *net_dev = (struct net_device *)dev; struct net_device *net_dev = (struct net_device *)dev;
PRTMP_ADAPTER pAd = NULL; PRTMP_ADAPTER pAd = NULL;
int retval = 0; int retval = 0;
/*POS_COOKIE pObj; */ /*struct os_cookie *pObj; */
GET_PAD_FROM_NET_DEV(pAd, net_dev); GET_PAD_FROM_NET_DEV(pAd, net_dev);
...@@ -459,7 +459,7 @@ static const struct net_device_ops rt2860_netdev_ops = { ...@@ -459,7 +459,7 @@ static const struct net_device_ops rt2860_netdev_ops = {
.ndo_start_xmit = rt28xx_send_packets, .ndo_start_xmit = rt28xx_send_packets,
}; };
PNET_DEV RtmpPhyNetDevInit(IN RTMP_ADAPTER * pAd, struct net_device *RtmpPhyNetDevInit(IN RTMP_ADAPTER * pAd,
IN RTMP_OS_NETDEV_OP_HOOK * pNetDevHook) IN RTMP_OS_NETDEV_OP_HOOK * pNetDevHook)
{ {
struct net_device *net_dev = NULL; struct net_device *net_dev = NULL;
...@@ -511,7 +511,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb) ...@@ -511,7 +511,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
struct net_device *net_dev = skb->dev; struct net_device *net_dev = skb->dev;
PRTMP_ADAPTER pAd = NULL; PRTMP_ADAPTER pAd = NULL;
int status = NETDEV_TX_OK; int status = NETDEV_TX_OK;
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb; void *pPacket = (void *)skb;
GET_PAD_FROM_NET_DEV(pAd, net_dev); GET_PAD_FROM_NET_DEV(pAd, net_dev);
...@@ -534,7 +534,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb) ...@@ -534,7 +534,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
} }
RTMP_SET_PACKET_5VT(pPacket, 0); RTMP_SET_PACKET_5VT(pPacket, 0);
STASendPackets((NDIS_HANDLE) pAd, (PPNDIS_PACKET) & pPacket, 1); STASendPackets((void *)pAd, (void **)& pPacket, 1);
status = NETDEV_TX_OK; status = NETDEV_TX_OK;
done: done:
...@@ -566,7 +566,7 @@ static int rt28xx_send_packets(IN struct sk_buff *skb_p, ...@@ -566,7 +566,7 @@ static int rt28xx_send_packets(IN struct sk_buff *skb_p,
GET_PAD_FROM_NET_DEV(pAd, net_dev); GET_PAD_FROM_NET_DEV(pAd, net_dev);
if (!(net_dev->flags & IFF_UP)) { if (!(net_dev->flags & IFF_UP)) {
RELEASE_NDIS_PACKET(pAd, (PNDIS_PACKET) skb_p, RELEASE_NDIS_PACKET(pAd, (void *)skb_p,
NDIS_STATUS_FAILURE); NDIS_STATUS_FAILURE);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -690,7 +690,7 @@ static struct net_device_stats *RT28xx_get_ether_stats(IN struct net_device ...@@ -690,7 +690,7 @@ static struct net_device_stats *RT28xx_get_ether_stats(IN struct net_device
return NULL; return NULL;
} }
BOOLEAN RtmpPhyNetDevExit(IN RTMP_ADAPTER * pAd, IN PNET_DEV net_dev) BOOLEAN RtmpPhyNetDevExit(IN RTMP_ADAPTER * pAd, struct net_device *net_dev)
{ {
/* Unregister network device */ /* Unregister network device */
......
This diff is collapsed.
...@@ -198,17 +198,17 @@ void RtmpMgmtTaskExit(IN RTMP_ADAPTER * pAd) ...@@ -198,17 +198,17 @@ void RtmpMgmtTaskExit(IN RTMP_ADAPTER * pAd)
static void rtusb_dataout_complete(unsigned long data) static void rtusb_dataout_complete(unsigned long data)
{ {
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
purbb_t pUrb; struct urb *pUrb;
POS_COOKIE pObj; struct os_cookie *pObj;
PHT_TX_CONTEXT pHTTXContext; PHT_TX_CONTEXT pHTTXContext;
u8 BulkOutPipeId; u8 BulkOutPipeId;
int Status; int Status;
unsigned long IrqFlags; unsigned long IrqFlags;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; pHTTXContext = (PHT_TX_CONTEXT) pUrb->context;
pAd = pHTTXContext->pAd; pAd = pHTTXContext->pAd;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
Status = pUrb->status; Status = pUrb->status;
/* Store BulkOut PipeId */ /* Store BulkOut PipeId */
...@@ -296,11 +296,11 @@ static void rtusb_null_frame_done_tasklet(unsigned long data) ...@@ -296,11 +296,11 @@ static void rtusb_null_frame_done_tasklet(unsigned long data)
{ {
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PTX_CONTEXT pNullContext; PTX_CONTEXT pNullContext;
purbb_t pUrb; struct urb *pUrb;
int Status; int Status;
unsigned long irqFlag; unsigned long irqFlag;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pNullContext = (PTX_CONTEXT) pUrb->context; pNullContext = (PTX_CONTEXT) pUrb->context;
pAd = pNullContext->pAd; pAd = pNullContext->pAd;
Status = pUrb->status; Status = pUrb->status;
...@@ -345,11 +345,11 @@ static void rtusb_rts_frame_done_tasklet(unsigned long data) ...@@ -345,11 +345,11 @@ static void rtusb_rts_frame_done_tasklet(unsigned long data)
{ {
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PTX_CONTEXT pRTSContext; PTX_CONTEXT pRTSContext;
purbb_t pUrb; struct urb *pUrb;
int Status; int Status;
unsigned long irqFlag; unsigned long irqFlag;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pRTSContext = (PTX_CONTEXT) pUrb->context; pRTSContext = (PTX_CONTEXT) pUrb->context;
pAd = pRTSContext->pAd; pAd = pRTSContext->pAd;
Status = pUrb->status; Status = pUrb->status;
...@@ -395,10 +395,10 @@ static void rtusb_pspoll_frame_done_tasklet(unsigned long data) ...@@ -395,10 +395,10 @@ static void rtusb_pspoll_frame_done_tasklet(unsigned long data)
{ {
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PTX_CONTEXT pPsPollContext; PTX_CONTEXT pPsPollContext;
purbb_t pUrb; struct urb *pUrb;
int Status; int Status;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pPsPollContext = (PTX_CONTEXT) pUrb->context; pPsPollContext = (PTX_CONTEXT) pUrb->context;
pAd = pPsPollContext->pAd; pAd = pPsPollContext->pAd;
Status = pUrb->status; Status = pUrb->status;
...@@ -452,13 +452,13 @@ Note: ...@@ -452,13 +452,13 @@ Note:
*/ */
static void rx_done_tasklet(unsigned long data) static void rx_done_tasklet(unsigned long data)
{ {
purbb_t pUrb; struct urb *pUrb;
PRX_CONTEXT pRxContext; PRX_CONTEXT pRxContext;
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
int Status; int Status;
unsigned int IrqFlags; unsigned int IrqFlags;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pRxContext = (PRX_CONTEXT) pUrb->context; pRxContext = (PRX_CONTEXT) pUrb->context;
pAd = pRxContext->pAd; pAd = pRxContext->pAd;
Status = pUrb->status; Status = pUrb->status;
...@@ -517,12 +517,12 @@ static void rtusb_mgmt_dma_done_tasklet(unsigned long data) ...@@ -517,12 +517,12 @@ static void rtusb_mgmt_dma_done_tasklet(unsigned long data)
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PTX_CONTEXT pMLMEContext; PTX_CONTEXT pMLMEContext;
int index; int index;
PNDIS_PACKET pPacket; void *pPacket;
purbb_t pUrb; struct urb *pUrb;
int Status; int Status;
unsigned long IrqFlags; unsigned long IrqFlags;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pMLMEContext = (PTX_CONTEXT) pUrb->context; pMLMEContext = (PTX_CONTEXT) pUrb->context;
pAd = pMLMEContext->pAd; pAd = pMLMEContext->pAd;
Status = pUrb->status; Status = pUrb->status;
...@@ -598,9 +598,9 @@ static void rtusb_ac3_dma_done_tasklet(unsigned long data) ...@@ -598,9 +598,9 @@ static void rtusb_ac3_dma_done_tasklet(unsigned long data)
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PHT_TX_CONTEXT pHTTXContext; PHT_TX_CONTEXT pHTTXContext;
u8 BulkOutPipeId = 3; u8 BulkOutPipeId = 3;
purbb_t pUrb; struct urb *pUrb;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; pHTTXContext = (PHT_TX_CONTEXT) pUrb->context;
pAd = pHTTXContext->pAd; pAd = pHTTXContext->pAd;
...@@ -638,9 +638,9 @@ static void rtusb_ac2_dma_done_tasklet(unsigned long data) ...@@ -638,9 +638,9 @@ static void rtusb_ac2_dma_done_tasklet(unsigned long data)
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PHT_TX_CONTEXT pHTTXContext; PHT_TX_CONTEXT pHTTXContext;
u8 BulkOutPipeId = 2; u8 BulkOutPipeId = 2;
purbb_t pUrb; struct urb *pUrb;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; pHTTXContext = (PHT_TX_CONTEXT) pUrb->context;
pAd = pHTTXContext->pAd; pAd = pHTTXContext->pAd;
...@@ -678,9 +678,9 @@ static void rtusb_ac1_dma_done_tasklet(unsigned long data) ...@@ -678,9 +678,9 @@ static void rtusb_ac1_dma_done_tasklet(unsigned long data)
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PHT_TX_CONTEXT pHTTXContext; PHT_TX_CONTEXT pHTTXContext;
u8 BulkOutPipeId = 1; u8 BulkOutPipeId = 1;
purbb_t pUrb; struct urb *pUrb;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; pHTTXContext = (PHT_TX_CONTEXT) pUrb->context;
pAd = pHTTXContext->pAd; pAd = pHTTXContext->pAd;
...@@ -718,9 +718,9 @@ static void rtusb_ac0_dma_done_tasklet(unsigned long data) ...@@ -718,9 +718,9 @@ static void rtusb_ac0_dma_done_tasklet(unsigned long data)
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PHT_TX_CONTEXT pHTTXContext; PHT_TX_CONTEXT pHTTXContext;
u8 BulkOutPipeId = 0; u8 BulkOutPipeId = 0;
purbb_t pUrb; struct urb *pUrb;
pUrb = (purbb_t) data; pUrb = (struct urb *)data;
pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; pHTTXContext = (PHT_TX_CONTEXT) pUrb->context;
pAd = pHTTXContext->pAd; pAd = pHTTXContext->pAd;
...@@ -755,7 +755,7 @@ static void rtusb_ac0_dma_done_tasklet(unsigned long data) ...@@ -755,7 +755,7 @@ static void rtusb_ac0_dma_done_tasklet(unsigned long data)
int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd) int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd)
{ {
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
/* Create receive tasklet */ /* Create receive tasklet */
tasklet_init(&pObj->rx_done_task, rx_done_tasklet, (unsigned long)pAd); tasklet_init(&pObj->rx_done_task, rx_done_tasklet, (unsigned long)pAd);
...@@ -782,9 +782,9 @@ int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd) ...@@ -782,9 +782,9 @@ int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd)
void RtmpNetTaskExit(IN RTMP_ADAPTER * pAd) void RtmpNetTaskExit(IN RTMP_ADAPTER * pAd)
{ {
POS_COOKIE pObj; struct os_cookie *pObj;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
tasklet_kill(&pObj->rx_done_task); tasklet_kill(&pObj->rx_done_task);
tasklet_kill(&pObj->mgmt_dma_done_task); tasklet_kill(&pObj->mgmt_dma_done_task);
......
This diff is collapsed.
...@@ -72,8 +72,8 @@ typedef struct _RTMP_OS_TASK_ { ...@@ -72,8 +72,8 @@ typedef struct _RTMP_OS_TASK_ {
/*unsigned long taskFlags; */ /*unsigned long taskFlags; */
RTMP_TASK_STATUS taskStatus; RTMP_TASK_STATUS taskStatus;
#ifndef KTHREAD_SUPPORT #ifndef KTHREAD_SUPPORT
RTMP_OS_SEM taskSema; struct semaphore taskSema;
RTMP_OS_PID taskPID; struct pid *taskPID;
struct completion taskComplete; struct completion taskComplete;
#endif #endif
unsigned char task_killed; unsigned char task_killed;
...@@ -84,7 +84,7 @@ typedef struct _RTMP_OS_TASK_ { ...@@ -84,7 +84,7 @@ typedef struct _RTMP_OS_TASK_ {
#endif #endif
} RTMP_OS_TASK; } RTMP_OS_TASK;
int RtmpOSIRQRequest(IN PNET_DEV pNetDev); int RtmpOSIRQRequest(struct net_device *pNetDev);
int RtmpOSIRQRelease(IN PNET_DEV pNetDev); int RtmpOSIRQRelease(struct net_device *pNetDev);
#endif /* __RMTP_OS_H__ // */ #endif /* __RMTP_OS_H__ // */
...@@ -62,7 +62,7 @@ typedef void(*RTMP_TIMER_TASK_HANDLE) (void *SystemSpecific1, ...@@ -62,7 +62,7 @@ typedef void(*RTMP_TIMER_TASK_HANDLE) (void *SystemSpecific1,
#endif /* RTMP_TIMER_TASK_SUPPORT // */ #endif /* RTMP_TIMER_TASK_SUPPORT // */
typedef struct _RALINK_TIMER_STRUCT { typedef struct _RALINK_TIMER_STRUCT {
RTMP_OS_TIMER TimerObj; /* Ndis Timer object */ struct timer_list TimerObj; /* Ndis Timer object */
BOOLEAN Valid; /* Set to True when call RTMPInitTimer */ BOOLEAN Valid; /* Set to True when call RTMPInitTimer */
BOOLEAN State; /* True if timer cancelled */ BOOLEAN State; /* True if timer cancelled */
BOOLEAN PeriodicType; /* True if timer is periodic timer */ BOOLEAN PeriodicType; /* True if timer is periodic timer */
......
...@@ -323,7 +323,7 @@ void STAHandleRxDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) ...@@ -323,7 +323,7 @@ void STAHandleRxDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk)
PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD); PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD);
PRXWI_STRUC pRxWI = pRxBlk->pRxWI; PRXWI_STRUC pRxWI = pRxBlk->pRxWI;
PHEADER_802_11 pHeader = pRxBlk->pHeader; PHEADER_802_11 pHeader = pRxBlk->pHeader;
PNDIS_PACKET pRxPacket = pRxBlk->pRxPacket; void *pRxPacket = pRxBlk->pRxPacket;
BOOLEAN bFragment = FALSE; BOOLEAN bFragment = FALSE;
MAC_TABLE_ENTRY *pEntry = NULL; MAC_TABLE_ENTRY *pEntry = NULL;
u8 FromWhichBSSID = BSS0; u8 FromWhichBSSID = BSS0;
...@@ -615,7 +615,7 @@ void STAHandleRxMgmtFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) ...@@ -615,7 +615,7 @@ void STAHandleRxMgmtFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk)
PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD); PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD);
PRXWI_STRUC pRxWI = pRxBlk->pRxWI; PRXWI_STRUC pRxWI = pRxBlk->pRxWI;
PHEADER_802_11 pHeader = pRxBlk->pHeader; PHEADER_802_11 pHeader = pRxBlk->pHeader;
PNDIS_PACKET pRxPacket = pRxBlk->pRxPacket; void *pRxPacket = pRxBlk->pRxPacket;
do { do {
...@@ -660,7 +660,7 @@ void STAHandleRxControlFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) ...@@ -660,7 +660,7 @@ void STAHandleRxControlFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk)
{ {
PRXWI_STRUC pRxWI = pRxBlk->pRxWI; PRXWI_STRUC pRxWI = pRxBlk->pRxWI;
PHEADER_802_11 pHeader = pRxBlk->pHeader; PHEADER_802_11 pHeader = pRxBlk->pHeader;
PNDIS_PACKET pRxPacket = pRxBlk->pRxPacket; void *pRxPacket = pRxBlk->pRxPacket;
switch (pHeader->FC.SubType) { switch (pHeader->FC.SubType) {
case SUBTYPE_BLOCK_ACK_REQ: case SUBTYPE_BLOCK_ACK_REQ:
...@@ -706,7 +706,7 @@ BOOLEAN STARxDoneInterruptHandle(IN PRTMP_ADAPTER pAd, IN BOOLEAN argc) ...@@ -706,7 +706,7 @@ BOOLEAN STARxDoneInterruptHandle(IN PRTMP_ADAPTER pAd, IN BOOLEAN argc)
RT28XX_RXD_STRUC *pRxD; RT28XX_RXD_STRUC *pRxD;
u8 *pData; u8 *pData;
PRXWI_STRUC pRxWI; PRXWI_STRUC pRxWI;
PNDIS_PACKET pRxPacket; void *pRxPacket;
PHEADER_802_11 pHeader; PHEADER_802_11 pHeader;
RX_BLK RxCell; RX_BLK RxCell;
...@@ -844,8 +844,8 @@ Routine Description: ...@@ -844,8 +844,8 @@ Routine Description:
Early checking and OS-depened parsing for Tx packet send to our STA driver. Early checking and OS-depened parsing for Tx packet send to our STA driver.
Arguments: Arguments:
NDIS_HANDLE MiniportAdapterContext Pointer refer to the device handle, i.e., the pAd. void * MiniportAdapterContext Pointer refer to the device handle, i.e., the pAd.
PPNDIS_PACKET ppPacketArray The packet array need to do transmission. void ** ppPacketArray The packet array need to do transmission.
u32 NumberOfPackets Number of packet in packet array. u32 NumberOfPackets Number of packet in packet array.
Return Value: Return Value:
...@@ -856,12 +856,12 @@ Note: ...@@ -856,12 +856,12 @@ Note:
You only can put OS-depened & STA related code in here. You only can put OS-depened & STA related code in here.
======================================================================== ========================================================================
*/ */
void STASendPackets(IN NDIS_HANDLE MiniportAdapterContext, void STASendPackets(void *MiniportAdapterContext,
IN PPNDIS_PACKET ppPacketArray, u32 NumberOfPackets) void **ppPacketArray, u32 NumberOfPackets)
{ {
u32 Index; u32 Index;
PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) MiniportAdapterContext; PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) MiniportAdapterContext;
PNDIS_PACKET pPacket; void *pPacket;
BOOLEAN allowToSend = FALSE; BOOLEAN allowToSend = FALSE;
for (Index = 0; Index < NumberOfPackets; Index++) { for (Index = 0; Index < NumberOfPackets; Index++) {
...@@ -920,7 +920,7 @@ Note: ...@@ -920,7 +920,7 @@ Note:
You only can put OS-indepened & STA related code in here. You only can put OS-indepened & STA related code in here.
======================================================================== ========================================================================
*/ */
int STASendPacket(IN PRTMP_ADAPTER pAd, IN PNDIS_PACKET pPacket) int STASendPacket(IN PRTMP_ADAPTER pAd, void *pPacket)
{ {
PACKET_INFO PacketInfo; PACKET_INFO PacketInfo;
u8 *pSrcBufVA; u8 *pSrcBufVA;
...@@ -1561,7 +1561,7 @@ static inline u8 *STA_Build_ARalink_Frame_Header(IN RTMP_ADAPTER * pAd, ...@@ -1561,7 +1561,7 @@ static inline u8 *STA_Build_ARalink_Frame_Header(IN RTMP_ADAPTER * pAd,
{ {
u8 *pHeaderBufPtr; u8 *pHeaderBufPtr;
HEADER_802_11 *pHeader_802_11; HEADER_802_11 *pHeader_802_11;
PNDIS_PACKET pNextPacket; void *pNextPacket;
u32 nextBufLen; u32 nextBufLen;
PQUEUE_ENTRY pQEntry; PQUEUE_ENTRY pQEntry;
...@@ -2422,7 +2422,7 @@ void STA_Fragment_Frame_Tx(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) ...@@ -2422,7 +2422,7 @@ void STA_Fragment_Frame_Tx(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk)
Arguments: Arguments:
pAd Pointer to our adapter pAd Pointer to our adapter
PNDIS_PACKET Pointer to outgoing Ndis frame void * Pointer to outgoing Ndis frame
NumberOfFrag Number of fragment required NumberOfFrag Number of fragment required
Return Value: Return Value:
...@@ -2437,7 +2437,7 @@ void STA_Fragment_Frame_Tx(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) ...@@ -2437,7 +2437,7 @@ void STA_Fragment_Frame_Tx(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk)
int STAHardTransmit(IN PRTMP_ADAPTER pAd, int STAHardTransmit(IN PRTMP_ADAPTER pAd,
IN TX_BLK * pTxBlk, u8 QueIdx) IN TX_BLK * pTxBlk, u8 QueIdx)
{ {
NDIS_PACKET *pPacket; char *pPacket;
PQUEUE_ENTRY pQEntry; PQUEUE_ENTRY pQEntry;
/* --------------------------------------------- */ /* --------------------------------------------- */
...@@ -2538,7 +2538,7 @@ unsigned long HashBytesPolynomial(u8 * value, unsigned int len) ...@@ -2538,7 +2538,7 @@ unsigned long HashBytesPolynomial(u8 * value, unsigned int len)
} }
void Sta_Announce_or_Forward_802_3_Packet(IN PRTMP_ADAPTER pAd, void Sta_Announce_or_Forward_802_3_Packet(IN PRTMP_ADAPTER pAd,
IN PNDIS_PACKET pPacket, void *pPacket,
u8 FromWhichBSSID) u8 FromWhichBSSID)
{ {
if (TRUE) { if (TRUE) {
......
...@@ -2450,7 +2450,7 @@ const struct iw_handler_def rt28xx_iw_handler_def = { ...@@ -2450,7 +2450,7 @@ const struct iw_handler_def rt28xx_iw_handler_def = {
int rt28xx_sta_ioctl(IN struct net_device *net_dev, int rt28xx_sta_ioctl(IN struct net_device *net_dev,
IN OUT struct ifreq *rq, int cmd) IN OUT struct ifreq *rq, int cmd)
{ {
POS_COOKIE pObj; struct os_cookie *pObj;
RTMP_ADAPTER *pAd = NULL; RTMP_ADAPTER *pAd = NULL;
struct iwreq *wrq = (struct iwreq *)rq; struct iwreq *wrq = (struct iwreq *)rq;
BOOLEAN StateMachineTouched = FALSE; BOOLEAN StateMachineTouched = FALSE;
...@@ -2458,7 +2458,7 @@ int rt28xx_sta_ioctl(IN struct net_device *net_dev, ...@@ -2458,7 +2458,7 @@ int rt28xx_sta_ioctl(IN struct net_device *net_dev,
GET_PAD_FROM_NET_DEV(pAd, net_dev); GET_PAD_FROM_NET_DEV(pAd, net_dev);
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
/*check if the interface is down */ /*check if the interface is down */
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) { if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) {
......
...@@ -827,7 +827,7 @@ static int __devinit rt2870_probe(IN struct usb_interface *intf, ...@@ -827,7 +827,7 @@ static int __devinit rt2870_probe(IN struct usb_interface *intf,
("rt2870_probe(): Allocate memory for os handle failed!\n"); ("rt2870_probe(): Allocate memory for os handle failed!\n");
return -ENOMEM; return -ENOMEM;
} }
((POS_COOKIE) handle)->pUsb_Dev = usb_dev; ((struct os_cookie *)handle)->pUsb_Dev = usb_dev;
rv = RTMPAllocAdapterBlock(handle, &pAd); rv = RTMPAllocAdapterBlock(handle, &pAd);
if (rv != NDIS_STATUS_SUCCESS) { if (rv != NDIS_STATUS_SUCCESS) {
......
...@@ -64,7 +64,7 @@ void RTUSBInitTxDesc(IN PRTMP_ADAPTER pAd, ...@@ -64,7 +64,7 @@ void RTUSBInitTxDesc(IN PRTMP_ADAPTER pAd,
{ {
PURB pUrb; PURB pUrb;
u8 *pSrc = NULL; u8 *pSrc = NULL;
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
pUrb = pTxContext->pUrb; pUrb = pTxContext->pUrb;
ASSERT(pUrb); ASSERT(pUrb);
...@@ -103,7 +103,7 @@ void RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd, ...@@ -103,7 +103,7 @@ void RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd,
{ {
PURB pUrb; PURB pUrb;
u8 *pSrc = NULL; u8 *pSrc = NULL;
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
pUrb = pTxContext->pUrb; pUrb = pTxContext->pUrb;
ASSERT(pUrb); ASSERT(pUrb);
...@@ -131,7 +131,7 @@ void RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd, ...@@ -131,7 +131,7 @@ void RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd,
void RTUSBInitRxDesc(IN PRTMP_ADAPTER pAd, IN PRX_CONTEXT pRxContext) void RTUSBInitRxDesc(IN PRTMP_ADAPTER pAd, IN PRX_CONTEXT pRxContext)
{ {
PURB pUrb; PURB pUrb;
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
unsigned long RX_bulk_size; unsigned long RX_bulk_size;
pUrb = pRxContext->pUrb; pUrb = pRxContext->pUrb;
...@@ -495,16 +495,16 @@ void RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd, ...@@ -495,16 +495,16 @@ void RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd,
} }
void RTUSBBulkOutDataPacketComplete(purbb_t pUrb, struct pt_regs * pt_regs) void RTUSBBulkOutDataPacketComplete(struct urb *pUrb, struct pt_regs * pt_regs)
{ {
PHT_TX_CONTEXT pHTTXContext; PHT_TX_CONTEXT pHTTXContext;
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
POS_COOKIE pObj; struct os_cookie *pObj;
u8 BulkOutPipeId; u8 BulkOutPipeId;
pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; pHTTXContext = (PHT_TX_CONTEXT) pUrb->context;
pAd = pHTTXContext->pAd; pAd = pHTTXContext->pAd;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
/* Store BulkOut PipeId */ /* Store BulkOut PipeId */
BulkOutPipeId = pHTTXContext->BulkOutPipeId; BulkOutPipeId = pHTTXContext->BulkOutPipeId;
...@@ -589,18 +589,18 @@ void RTUSBBulkOutNullFrame(IN PRTMP_ADAPTER pAd) ...@@ -589,18 +589,18 @@ void RTUSBBulkOutNullFrame(IN PRTMP_ADAPTER pAd)
} }
/* NULL frame use BulkOutPipeId = 0 */ /* NULL frame use BulkOutPipeId = 0 */
void RTUSBBulkOutNullFrameComplete(purbb_t pUrb, struct pt_regs * pt_regs) void RTUSBBulkOutNullFrameComplete(struct urb *pUrb, struct pt_regs * pt_regs)
{ {
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PTX_CONTEXT pNullContext; PTX_CONTEXT pNullContext;
int Status; int Status;
POS_COOKIE pObj; struct os_cookie *pObj;
pNullContext = (PTX_CONTEXT) pUrb->context; pNullContext = (PTX_CONTEXT) pUrb->context;
pAd = pNullContext->pAd; pAd = pNullContext->pAd;
Status = pUrb->status; Status = pUrb->status;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
pObj->null_frame_complete_task.data = (unsigned long)pUrb; pObj->null_frame_complete_task.data = (unsigned long)pUrb;
tasklet_hi_schedule(&pObj->null_frame_complete_task); tasklet_hi_schedule(&pObj->null_frame_complete_task);
} }
...@@ -684,18 +684,18 @@ void RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, u8 Index) ...@@ -684,18 +684,18 @@ void RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, u8 Index)
/* printk("<---RTUSBBulkOutMLMEPacket,Cpu=%d!, Dma=%d, SwIdx=%d!\n", pAd->MgmtRing.TxCpuIdx, pAd->MgmtRing.TxDmaIdx, pAd->MgmtRing.TxSwFreeIdx); */ /* printk("<---RTUSBBulkOutMLMEPacket,Cpu=%d!, Dma=%d, SwIdx=%d!\n", pAd->MgmtRing.TxCpuIdx, pAd->MgmtRing.TxDmaIdx, pAd->MgmtRing.TxSwFreeIdx); */
} }
void RTUSBBulkOutMLMEPacketComplete(purbb_t pUrb, struct pt_regs * pt_regs) void RTUSBBulkOutMLMEPacketComplete(struct urb *pUrb, struct pt_regs * pt_regs)
{ {
PTX_CONTEXT pMLMEContext; PTX_CONTEXT pMLMEContext;
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
int Status; int Status;
POS_COOKIE pObj; struct os_cookie *pObj;
int index; int index;
/*DBGPRINT_RAW(RT_DEBUG_INFO, ("--->RTUSBBulkOutMLMEPacketComplete\n")); */ /*DBGPRINT_RAW(RT_DEBUG_INFO, ("--->RTUSBBulkOutMLMEPacketComplete\n")); */
pMLMEContext = (PTX_CONTEXT) pUrb->context; pMLMEContext = (PTX_CONTEXT) pUrb->context;
pAd = pMLMEContext->pAd; pAd = pMLMEContext->pAd;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
Status = pUrb->status; Status = pUrb->status;
index = pMLMEContext->SelfIdx; index = pMLMEContext->SelfIdx;
...@@ -758,18 +758,18 @@ void RTUSBBulkOutPsPoll(IN PRTMP_ADAPTER pAd) ...@@ -758,18 +758,18 @@ void RTUSBBulkOutPsPoll(IN PRTMP_ADAPTER pAd)
} }
/* PS-Poll frame use BulkOutPipeId = 0 */ /* PS-Poll frame use BulkOutPipeId = 0 */
void RTUSBBulkOutPsPollComplete(purbb_t pUrb, struct pt_regs * pt_regs) void RTUSBBulkOutPsPollComplete(struct urb *pUrb, struct pt_regs * pt_regs)
{ {
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
PTX_CONTEXT pPsPollContext; PTX_CONTEXT pPsPollContext;
int Status; int Status;
POS_COOKIE pObj; struct os_cookie *pObj;
pPsPollContext = (PTX_CONTEXT) pUrb->context; pPsPollContext = (PTX_CONTEXT) pUrb->context;
pAd = pPsPollContext->pAd; pAd = pPsPollContext->pAd;
Status = pUrb->status; Status = pUrb->status;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
pObj->pspoll_frame_complete_task.data = (unsigned long)pUrb; pObj->pspoll_frame_complete_task.data = (unsigned long)pUrb;
tasklet_hi_schedule(&pObj->pspoll_frame_complete_task); tasklet_hi_schedule(&pObj->pspoll_frame_complete_task);
} }
...@@ -912,18 +912,18 @@ void RTUSBBulkReceive(IN PRTMP_ADAPTER pAd) ...@@ -912,18 +912,18 @@ void RTUSBBulkReceive(IN PRTMP_ADAPTER pAd)
Always returns STATUS_MORE_PROCESSING_REQUIRED Always returns STATUS_MORE_PROCESSING_REQUIRED
======================================================================== ========================================================================
*/ */
void RTUSBBulkRxComplete(purbb_t pUrb, struct pt_regs *pt_regs) void RTUSBBulkRxComplete(struct urb *pUrb, struct pt_regs *pt_regs)
{ {
/* use a receive tasklet to handle received packets; */ /* use a receive tasklet to handle received packets; */
/* or sometimes hardware IRQ will be disabled here, so we can not */ /* or sometimes hardware IRQ will be disabled here, so we can not */
/* use spin_lock_bh()/spin_unlock_bh() after IRQ is disabled. :< */ /* use spin_lock_bh()/spin_unlock_bh() after IRQ is disabled. :< */
PRX_CONTEXT pRxContext; PRX_CONTEXT pRxContext;
PRTMP_ADAPTER pAd; PRTMP_ADAPTER pAd;
POS_COOKIE pObj; struct os_cookie *pObj;
pRxContext = (PRX_CONTEXT) pUrb->context; pRxContext = (PRX_CONTEXT) pUrb->context;
pAd = pRxContext->pAd; pAd = pRxContext->pAd;
pObj = (POS_COOKIE) pAd->OS_Cookie; pObj = (struct os_cookie *)pAd->OS_Cookie;
pObj->rx_done_task.data = (unsigned long)pUrb; pObj->rx_done_task.data = (unsigned long)pUrb;
tasklet_hi_schedule(&pObj->rx_done_task); tasklet_hi_schedule(&pObj->rx_done_task);
...@@ -1146,7 +1146,7 @@ void RTUSBCancelPendingBulkOutIRP(IN PRTMP_ADAPTER pAd) ...@@ -1146,7 +1146,7 @@ void RTUSBCancelPendingBulkOutIRP(IN PRTMP_ADAPTER pAd)
PTX_CONTEXT pRTSContext; PTX_CONTEXT pRTSContext;
u32 i, Idx; u32 i, Idx;
/* unsigned int IrqFlags; */ /* unsigned int IrqFlags; */
/* NDIS_SPIN_LOCK *pLock; */ /* spinlock_t *pLock; */
/* BOOLEAN *pPending; */ /* BOOLEAN *pPending; */
/* pLock = &pAd->BulkOutLock[MGMTPIPEIDX]; */ /* pLock = &pAd->BulkOutLock[MGMTPIPEIDX]; */
......
...@@ -47,14 +47,14 @@ extern u8 EpToQueue[]; ...@@ -47,14 +47,14 @@ extern u8 EpToQueue[];
void REPORT_AMSDU_FRAMES_TO_LLC(IN PRTMP_ADAPTER pAd, void REPORT_AMSDU_FRAMES_TO_LLC(IN PRTMP_ADAPTER pAd,
u8 *pData, unsigned long DataSize) u8 *pData, unsigned long DataSize)
{ {
PNDIS_PACKET pPacket; void *pPacket;
u32 nMSDU; u32 nMSDU;
struct sk_buff *pSkb; struct sk_buff *pSkb;
nMSDU = 0; nMSDU = 0;
/* allocate a rx packet */ /* allocate a rx packet */
pSkb = dev_alloc_skb(RX_BUFFER_AGGRESIZE); pSkb = dev_alloc_skb(RX_BUFFER_AGGRESIZE);
pPacket = (PNDIS_PACKET) OSPKT_TO_RTPKT(pSkb); pPacket = (void *)OSPKT_TO_RTPKT(pSkb);
if (pSkb) { if (pSkb) {
/* convert 802.11 to 802.3 packet */ /* convert 802.11 to 802.3 packet */
...@@ -195,7 +195,7 @@ void RTUSBRejectPendingPackets(IN PRTMP_ADAPTER pAd) ...@@ -195,7 +195,7 @@ void RTUSBRejectPendingPackets(IN PRTMP_ADAPTER pAd)
{ {
u8 Index; u8 Index;
PQUEUE_ENTRY pEntry; PQUEUE_ENTRY pEntry;
PNDIS_PACKET pPacket; void *pPacket;
PQUEUE_HEADER pQueue; PQUEUE_HEADER pQueue;
for (Index = 0; Index < 4; Index++) { for (Index = 0; Index < 4; Index++) {
......
...@@ -843,7 +843,7 @@ int RTUSB_VendorRequest(IN PRTMP_ADAPTER pAd, ...@@ -843,7 +843,7 @@ int RTUSB_VendorRequest(IN PRTMP_ADAPTER pAd,
u32 TransferBufferLength) u32 TransferBufferLength)
{ {
int ret = 0; int ret = 0;
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) { if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) {
DBGPRINT(RT_DEBUG_ERROR, ("device disconnected\n")); DBGPRINT(RT_DEBUG_ERROR, ("device disconnected\n"));
......
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