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