From: Bartlomiej Zolnierkiewicz Date: Fri, 11 Dec 2009 20:23:16 +0000 (-0800) Subject: Staging: rt28x0: remove typedefs (part three) X-Git-Tag: MMI-PSA29.97-13-9~25324^2~86 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62eb734b490c3851deb5cdba99e477f102549b68;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: rt28x0: remove typedefs (part three) Remove misc typedefs. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rt2860/ap.h b/drivers/staging/rt2860/ap.h index fb6ab69af2ba..3f744a52aac7 100644 --- a/drivers/staging/rt2860/ap.h +++ b/drivers/staging/rt2860/ap.h @@ -41,8 +41,8 @@ #define __AP_H__ /* ap_wpa.c */ -void WpaStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]); +void WpaStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *Sm, OUT STATE_MACHINE_FUNC Trans[]); #ifdef RTMP_MAC_USB void BeaconUpdateExec(void *SystemSpecific1, @@ -50,17 +50,17 @@ void BeaconUpdateExec(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3); #endif /* RTMP_MAC_USB // */ -void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack); +void RTMPSetPiggyBack(struct rt_rtmp_adapter *pAd, IN BOOLEAN bPiggyBack); -void MacTableReset(IN PRTMP_ADAPTER pAd); +void MacTableReset(struct rt_rtmp_adapter *pAd); -MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd, +struct rt_mac_table_entry *MacTableInsertEntry(struct rt_rtmp_adapter *pAd, u8 *pAddr, u8 apidx, IN BOOLEAN CleanAll); -BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, +BOOLEAN MacTableDeleteEntry(struct rt_rtmp_adapter *pAd, u16 wcid, u8 *pAddr); -MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, u8 *pAddr); +struct rt_mac_table_entry *MacTableLookup(struct rt_rtmp_adapter *pAd, u8 *pAddr); #endif /* __AP_H__ */ diff --git a/drivers/staging/rt2860/chip/mac_pci.h b/drivers/staging/rt2860/chip/mac_pci.h index 2d553275caa3..8dbadd033859 100644 --- a/drivers/staging/rt2860/chip/mac_pci.h +++ b/drivers/staging/rt2860/chip/mac_pci.h @@ -69,7 +69,7 @@ // // TX descriptor format, Tx ring, Mgmt Ring // -typedef struct PACKED _TXD_STRUC { +struct PACKED rt_txd { // Word 0 u32 SDPtr0; // Word 1 @@ -89,12 +89,12 @@ typedef struct PACKED _TXD_STRUC { u32 TCO:1; /* */ u32 UCO:1; /* */ u32 ICO:1; /* */ -} TXD_STRUC, *PTXD_STRUC; +}; // // Rx descriptor format, Rx Ring // -typedef struct PACKED _RXD_STRUC { +typedef struct PACKED rt_rxd { // Word 0 u32 SDP0; // Word 1 @@ -125,7 +125,7 @@ typedef struct PACKED _RXD_STRUC { u32 PlcpSignal:1; /* To be moved */ u32 PlcpRssil:1; /* To be moved */ u32 Rsv1:13; -} RXD_STRUC, *PRXD_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC; +} RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC; typedef union _TX_ATTENUATION_CTRL_STRUC { struct { diff --git a/drivers/staging/rt2860/chip/mac_usb.h b/drivers/staging/rt2860/chip/mac_usb.h index f146232bf157..0b67c0b1de03 100644 --- a/drivers/staging/rt2860/chip/mac_usb.h +++ b/drivers/staging/rt2860/chip/mac_usb.h @@ -61,7 +61,7 @@ #define RXINFO_SIZE 4 #define RT2870_RXDMALEN_FIELD_SIZE 4 -typedef struct PACKED _RXINFO_STRUC { +typedef struct PACKED rt_rxinfo { u32 BA:1; u32 DATA:1; u32 NULLDATA:1; @@ -82,14 +82,14 @@ typedef struct PACKED _RXINFO_STRUC { u32 CipherAlg:1; u32 LastAMSDU:1; u32 PlcpSignal:12; -} RXINFO_STRUC, *PRXINFO_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC; +} RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC; /* */ /* TXINFO */ /* */ #define TXINFO_SIZE 4 -typedef struct _TXINFO_STRUC { +struct rt_txinfo { /* Word 0 */ u32 USBDMATxPktLen:16; /*used ONLY in USB bulk Aggregation, Total byte counts of all sub-frame. */ u32 rsv:8; @@ -99,47 +99,47 @@ typedef struct _TXINFO_STRUC { u32 rsv2:2; /* Software use. */ u32 USBDMANextVLD:1; /*used ONLY in USB bulk Aggregation, NextValid */ u32 USBDMATxburst:1; /*used ONLY in USB bulk Aggre. Force USB DMA transmit frame from current selected endpoint */ -} TXINFO_STRUC, *PTXINFO_STRUC; +}; /* */ /* Management ring buffer format */ /* */ -typedef struct _MGMT_STRUC { +struct rt_mgmt { BOOLEAN Valid; u8 *pBuffer; unsigned long Length; -} MGMT_STRUC, *PMGMT_STRUC; +}; /*////////////////////////////////////////////////////////////////////////// */ -/* The TX_BUFFER structure forms the transmitted USB packet to the device */ +/* The struct rt_tx_buffer structure forms the transmitted USB packet to the device */ /*////////////////////////////////////////////////////////////////////////// */ -typedef struct __TX_BUFFER { +struct rt_tx_buffer { union { u8 WirelessPacket[TX_BUFFER_NORMSIZE]; - HEADER_802_11 NullFrame; - PSPOLL_FRAME PsPollPacket; - RTS_FRAME RTSFrame; + struct rt_header_802_11 NullFrame; + struct rt_pspoll_frame PsPollPacket; + struct rt_rts_frame RTSFrame; } field; u8 Aggregation[4]; /*Buffer for save Aggregation size. */ -} TX_BUFFER, *PTX_BUFFER; +}; -typedef struct __HTTX_BUFFER { +struct rt_httx_buffer { union { u8 WirelessPacket[MAX_TXBULK_SIZE]; - HEADER_802_11 NullFrame; - PSPOLL_FRAME PsPollPacket; - RTS_FRAME RTSFrame; + struct rt_header_802_11 NullFrame; + struct rt_pspoll_frame PsPollPacket; + struct rt_rts_frame RTSFrame; } field; u8 Aggregation[4]; /*Buffer for save Aggregation size. */ -} HTTX_BUFFER, *PHTTX_BUFFER; +}; /* used to track driver-generated write irps */ -typedef struct _TX_CONTEXT { +struct rt_tx_context { void *pAd; /*Initialized in MiniportInitialize */ PURB pUrb; /*Initialized in MiniportInitialize */ PIRP pIrp; /*used to cancel pending bulk out. */ /*Initialized in MiniportInitialize */ - PTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */ + struct rt_tx_buffer *TransferBuffer; /*Initialized in MiniportInitialize */ unsigned long BulkOutSize; u8 BulkOutPipeId; u8 SelfIdx; @@ -155,15 +155,15 @@ typedef struct _TX_CONTEXT { u32 TxRate; dma_addr_t data_dma; /* urb dma on linux */ -} TX_CONTEXT, *PTX_CONTEXT, **PPTX_CONTEXT; +}; /* used to track driver-generated write irps */ -typedef struct _HT_TX_CONTEXT { +struct rt_ht_tx_context { void *pAd; /*Initialized in MiniportInitialize */ PURB pUrb; /*Initialized in MiniportInitialize */ PIRP pIrp; /*used to cancel pending bulk out. */ /*Initialized in MiniportInitialize */ - PHTTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */ + struct rt_httx_buffer *TransferBuffer; /*Initialized in MiniportInitialize */ unsigned long BulkOutSize; /* Indicate the total bulk-out size in bytes in one bulk-transmission */ u8 BulkOutPipeId; BOOLEAN IRPPending; @@ -179,13 +179,13 @@ typedef struct _HT_TX_CONTEXT { unsigned long ENextBulkOutPosition; /* Indicate the buffer end offset of a bulk-transmission */ u32 TxRate; dma_addr_t data_dma; /* urb dma on linux */ -} HT_TX_CONTEXT, *PHT_TX_CONTEXT, **PPHT_TX_CONTEXT; +}; /* */ /* Structure to keep track of receive packets and buffers to indicate */ /* receive data to the protocol. */ /* */ -typedef struct _RX_CONTEXT { +struct rt_rx_context { u8 *TransferBuffer; void *pAd; PIRP pIrp; /*used to cancel pending bulk in. */ @@ -200,7 +200,7 @@ typedef struct _RX_CONTEXT { atomic_t IrpLock; spinlock_t RxContextLock; dma_addr_t data_dma; /* urb dma on linux */ -} RX_CONTEXT, *PRX_CONTEXT; +}; /****************************************************************************** @@ -309,7 +309,7 @@ typedef struct _RX_CONTEXT { RTUSBMlmeUp(pAd); #define RTMP_HANDLE_COUNTER_MEASURE(_pAd, _pEntry) \ - { RTUSBEnqueueInternalCmd(_pAd, CMDTHREAD_802_11_COUNTER_MEASURE, _pEntry, sizeof(MAC_TABLE_ENTRY)); \ + { RTUSBEnqueueInternalCmd(_pAd, CMDTHREAD_802_11_COUNTER_MEASURE, _pEntry, sizeof(struct rt_mac_table_entry)); \ RTUSBMlmeUp(_pAd); \ } diff --git a/drivers/staging/rt2860/chip/rt30xx.h b/drivers/staging/rt2860/chip/rt30xx.h index 04c92ab796df..02e1d728fb41 100644 --- a/drivers/staging/rt2860/chip/rt30xx.h +++ b/drivers/staging/rt2860/chip/rt30xx.h @@ -39,7 +39,7 @@ #ifdef RT30xx -extern REG_PAIR RT30xx_RFRegTable[]; +extern struct rt_reg_pair RT30xx_RFRegTable[]; extern u8 NUM_RF_REG_PARMS; #endif /* RT30xx // */ diff --git a/drivers/staging/rt2860/chip/rtmp_mac.h b/drivers/staging/rt2860/chip/rtmp_mac.h index 5efe5015cad4..f6a72581d3bd 100644 --- a/drivers/staging/rt2860/chip/rtmp_mac.h +++ b/drivers/staging/rt2860/chip/rtmp_mac.h @@ -54,7 +54,7 @@ /*txop : for txop mode */ /* 0:txop for the MPDU frame will be handles by ASIC by register */ /* 1/2/3:the MPDU frame is send after PIFS/backoff/SIFS */ -typedef struct PACKED _TXWI_STRUC { +struct PACKED rt_txwi { /* Word 0 */ /* ex: 00 03 00 40 means txop = 3, PHYMODE = 1 */ u32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */ @@ -88,12 +88,12 @@ typedef struct PACKED _TXWI_STRUC { u32 IV; /*Word3 */ u32 EIV; -} TXWI_STRUC, *PTXWI_STRUC; +}; /* */ /* RXWI wireless information format, in PBF. invisible in driver. */ /* */ -typedef struct PACKED _RXWI_STRUC { +struct PACKED rt_rxwi { /* Word 0 */ u32 WirelessCliID:8; u32 KeyIndex:2; @@ -121,7 +121,7 @@ typedef struct PACKED _RXWI_STRUC { u32 FOFFSET:8; /* RT35xx */ u32 rsv2:8; /*u32 rsv2:16; */ -} RXWI_STRUC, *PRXWI_STRUC; +}; /* ================================================================================= */ /* Register format */ @@ -999,40 +999,41 @@ typedef union _SHAREDKEY_MODE_STRUC { } field; u32 word; } SHAREDKEY_MODE_STRUC, *PSHAREDKEY_MODE_STRUC; -/* 64-entry for pairwise key table */ -typedef struct _HW_WCID_ENTRY { /* 8-byte per entry */ + +/* 8-byte per entry, 64-entry for pairwise key table */ +struct rt_hw_wcid_entry { u8 Address[6]; u8 Rsv[2]; -} HW_WCID_ENTRY, PHW_WCID_ENTRY; +}; /* ================================================================================= */ /* WCID format */ /* ================================================================================= */ /*7.1 WCID ENTRY format : 8bytes */ -typedef struct _WCID_ENTRY_STRUC { +struct rt_wcid_entry { u8 RXBABitmap7; /* bit0 for TID8, bit7 for TID 15 */ u8 RXBABitmap0; /* bit0 for TID0, bit7 for TID 7 */ u8 MAC[6]; /* 0 for shared key table. 1 for pairwise key table */ -} WCID_ENTRY_STRUC, *PWCID_ENTRY_STRUC; +}; /*8.1.1 SECURITY KEY format : 8DW */ /* 32-byte per entry, total 16-entry for shared key table, 64-entry for pairwise key table */ -typedef struct _HW_KEY_ENTRY { /* 32-byte per entry */ +struct rt_hw_key_entry { u8 Key[16]; u8 TxMic[8]; u8 RxMic[8]; -} HW_KEY_ENTRY, *PHW_KEY_ENTRY; +}; /*8.1.2 IV/EIV format : 2DW */ /*8.1.3 RX attribute entry format : 1DW */ -typedef struct _MAC_ATTRIBUTE_STRUC { +struct rt_mac_attribute { u32 KeyTab:1; /* 0 for shared key table. 1 for pairwise key table */ u32 PairKeyMode:3; u32 BSSIDIdx:3; /*multipleBSS index for the WCID */ u32 RXWIUDF:3; u32 rsv:22; -} MAC_ATTRIBUTE_STRUC, *PMAC_ATTRIBUTE_STRUC; +}; /* ================================================================================= */ /* HOST-MCU communication data structure */ diff --git a/drivers/staging/rt2860/chip/rtmp_phy.h b/drivers/staging/rt2860/chip/rtmp_phy.h index 48d186020059..8b8b0f47f03b 100644 --- a/drivers/staging/rt2860/chip/rtmp_phy.h +++ b/drivers/staging/rt2860/chip/rtmp_phy.h @@ -212,7 +212,7 @@ #ifdef RTMP_MAC_PCI /* basic marco for BBP read operation. - _pAd: the data structure pointer of RTMP_ADAPTER + _pAd: the data structure pointer of struct rt_rtmp_adapter _bbpID : the bbp register ID _pV: data pointer used to save the value of queried bbp register. _bViaMCU: if we need access the bbp via the MCU. @@ -370,7 +370,7 @@ /* basic marco for BBP write operation. - _pAd: the data structure pointer of RTMP_ADAPTER + _pAd: the data structure pointer of struct rt_rtmp_adapter _bbpID : the bbp register ID _pV: data used to save the value of queried bbp register. _bViaMCU: if we need access the bbp via the MCU. diff --git a/drivers/staging/rt2860/chips/rt3070.c b/drivers/staging/rt2860/chips/rt3070.c index beaaafa2b4a1..627bad943a3c 100644 --- a/drivers/staging/rt2860/chips/rt3070.c +++ b/drivers/staging/rt2860/chips/rt3070.c @@ -43,7 +43,7 @@ #error "You Should Enable compile flag RTMP_RF_RW_SUPPORT for this chip" #endif /* RTMP_RF_RW_SUPPORT // */ -void NICInitRT3070RFRegisters(IN PRTMP_ADAPTER pAd) +void NICInitRT3070RFRegisters(struct rt_rtmp_adapter *pAd) { int i; u8 RFValue; diff --git a/drivers/staging/rt2860/chips/rt3090.c b/drivers/staging/rt2860/chips/rt3090.c index b80928c902d9..5927ba4c5a9b 100644 --- a/drivers/staging/rt2860/chips/rt3090.c +++ b/drivers/staging/rt2860/chips/rt3090.c @@ -43,7 +43,7 @@ #error "You Should Enable compile flag RTMP_RF_RW_SUPPORT for this chip" #endif /* RTMP_RF_RW_SUPPORT // */ -void NICInitRT3090RFRegisters(IN PRTMP_ADAPTER pAd) +void NICInitRT3090RFRegisters(struct rt_rtmp_adapter *pAd) { int i; /* Driver must read EEPROM to get RfIcType before initial RF registers */ diff --git a/drivers/staging/rt2860/chips/rt30xx.c b/drivers/staging/rt2860/chips/rt30xx.c index 39b483cce0db..6e684a3ccf0e 100644 --- a/drivers/staging/rt2860/chips/rt30xx.c +++ b/drivers/staging/rt2860/chips/rt30xx.c @@ -46,7 +46,7 @@ /* */ /* RF register initialization set */ /* */ -REG_PAIR RT30xx_RFRegTable[] = { +struct rt_reg_pair RT30xx_RFRegTable[] = { {RF_R04, 0x40} , {RF_R05, 0x03} @@ -87,7 +87,7 @@ REG_PAIR RT30xx_RFRegTable[] = { , }; -u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(REG_PAIR)); +u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(struct rt_reg_pair)); /* Antenna divesity use GPIO3 and EESK pin for control */ /* Antenna and EEPROM access are both using EESK pin, */ @@ -95,7 +95,7 @@ u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(REG_PAIR)); /* Then restore antenna after EEPROM access */ /* The original name of this function is AsicSetRxAnt(), now change to */ /*void AsicSetRxAnt( */ -void RT30xxSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant) +void RT30xxSetRxAnt(struct rt_rtmp_adapter *pAd, u8 Ant) { u32 Value; #ifdef RTMP_MAC_PCI @@ -159,7 +159,7 @@ void RT30xxSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant) ======================================================================== */ -void RTMPFilterCalibration(IN PRTMP_ADAPTER pAd) +void RTMPFilterCalibration(struct rt_rtmp_adapter *pAd) { u8 R55x = 0, value, FilterTarget = 0x1E, BBPValue = 0; u32 loop = 0, count = 0, loopcnt = 0, ReTry = 0; @@ -306,7 +306,7 @@ void RTMPFilterCalibration(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void RT30xxLoadRFNormalModeSetup(IN PRTMP_ADAPTER pAd) +void RT30xxLoadRFNormalModeSetup(struct rt_rtmp_adapter *pAd) { u8 RFValue; @@ -372,7 +372,7 @@ void RT30xxLoadRFNormalModeSetup(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void RT30xxLoadRFSleepModeSetup(IN PRTMP_ADAPTER pAd) +void RT30xxLoadRFSleepModeSetup(struct rt_rtmp_adapter *pAd) { u8 RFValue; u32 MACValue; @@ -428,7 +428,7 @@ void RT30xxLoadRFSleepModeSetup(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void RT30xxReverseRFSleepModeSetup(IN PRTMP_ADAPTER pAd) +void RT30xxReverseRFSleepModeSetup(struct rt_rtmp_adapter *pAd) { u8 RFValue; u32 MACValue; @@ -493,7 +493,7 @@ void RT30xxReverseRFSleepModeSetup(IN PRTMP_ADAPTER pAd) /* end johnli */ -void RT30xxHaltAction(IN PRTMP_ADAPTER pAd) +void RT30xxHaltAction(struct rt_rtmp_adapter *pAd) { u32 TxPinCfg = 0x00050F0F; diff --git a/drivers/staging/rt2860/chlist.h b/drivers/staging/rt2860/chlist.h index 4183c8b5a023..ada65e5ac610 100644 --- a/drivers/staging/rt2860/chlist.h +++ b/drivers/staging/rt2860/chlist.h @@ -49,28 +49,28 @@ #define BAND_24G 1 #define BAND_BOTH 2 -typedef struct _CH_DESP { +struct rt_ch_desp { u8 FirstChannel; u8 NumOfCh; char MaxTxPwr; /* dBm */ u8 Geography; /* 0:out door, 1:in door, 2:both */ BOOLEAN DfsReq; /* Dfs require, 0: No, 1: yes. */ -} CH_DESP, *PCH_DESP; +}; -typedef struct _CH_REGION { +struct rt_ch_region { u8 CountReg[3]; u8 DfsType; /* 0: CE, 1: FCC, 2: JAP, 3:JAP_W53, JAP_W56 */ - CH_DESP ChDesp[10]; -} CH_REGION, *PCH_REGION; + struct rt_ch_desp ChDesp[10]; +}; -extern CH_REGION ChRegion[]; +extern struct rt_ch_region ChRegion[]; -typedef struct _CH_FREQ_MAP_ { +struct rt_ch_freq_map { u16 channel; u16 freqKHz; -} CH_FREQ_MAP; +}; -extern CH_FREQ_MAP CH_HZ_ID_MAP[]; +extern struct rt_ch_freq_map CH_HZ_ID_MAP[]; extern int CH_HZ_ID_MAP_NUM; #define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \ @@ -103,15 +103,15 @@ extern int CH_HZ_ID_MAP_NUM; (_ch) = 1; \ }while(0) -void BuildChannelListEx(IN PRTMP_ADAPTER pAd); +void BuildChannelListEx(struct rt_rtmp_adapter *pAd); -void BuildBeaconChList(IN PRTMP_ADAPTER pAd, +void BuildBeaconChList(struct rt_rtmp_adapter *pAd, u8 *pBuf, unsigned long *pBufLen); -void N_ChannelCheck(IN PRTMP_ADAPTER pAd); +void N_ChannelCheck(struct rt_rtmp_adapter *pAd); -void N_SetCenCh(IN PRTMP_ADAPTER pAd); +void N_SetCenCh(struct rt_rtmp_adapter *pAd); -u8 GetCuntryMaxTxPwr(IN PRTMP_ADAPTER pAd, u8 channel); +u8 GetCuntryMaxTxPwr(struct rt_rtmp_adapter *pAd, u8 channel); #endif /* __CHLIST_H__ */ diff --git a/drivers/staging/rt2860/common/action.c b/drivers/staging/rt2860/common/action.c index 8928ee742676..56ad236e1144 100644 --- a/drivers/staging/rt2860/common/action.c +++ b/drivers/staging/rt2860/common/action.c @@ -39,7 +39,7 @@ #include "../rt_config.h" #include "action.h" -static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +static void ReservedAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); /* ========================================================================== @@ -58,8 +58,8 @@ static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); MT2_CLS3ERR cls3err_action ========================================================================== */ -void ActionStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, +void ActionStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]) { StateMachineInit(S, (STATE_MACHINE_FUNC *) Trans, MAX_ACT_STATE, @@ -98,19 +98,19 @@ void ActionStateMachineInit(IN PRTMP_ADAPTER pAd, (STATE_MACHINE_FUNC) MlmeInvalidAction); } -void MlmeADDBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeADDBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_ADDBA_REQ_STRUCT *pInfo; + struct rt_mlme_addba_req *pInfo; u8 Addr[6]; u8 *pOutBuffer = NULL; int NStatus; unsigned long Idx; - FRAME_ADDBA_REQ Frame; + struct rt_frame_addba_req Frame; unsigned long FrameLen; - BA_ORI_ENTRY *pBAEntry = NULL; + struct rt_ba_ori_entry *pBAEntry = NULL; - pInfo = (MLME_ADDBA_REQ_STRUCT *) Elem->Msg; - NdisZeroMemory(&Frame, sizeof(FRAME_ADDBA_REQ)); + pInfo = (struct rt_mlme_addba_req *)Elem->Msg; + NdisZeroMemory(&Frame, sizeof(struct rt_frame_addba_req)); if (MlmeAddBAReqSanity(pAd, Elem->Msg, Elem->MsgLen, Addr)) { NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ @@ -161,7 +161,7 @@ void MlmeADDBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Frame.BaStartSeq.word = cpu2le16(Frame.BaStartSeq.word); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_ADDBA_REQ), &Frame, END_OF_ARGS); + sizeof(struct rt_frame_addba_req), &Frame, END_OF_ARGS); MiniportMMRequest(pAd, (MGMT_USE_QUEUE_FLAG | @@ -182,26 +182,26 @@ void MlmeADDBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Description: send DELBA and delete BaEntry if any Parametrs: - Elem - MLME message MLME_DELBA_REQ_STRUCT + Elem - MLME message struct rt_mlme_delba_req IRQL = DISPATCH_LEVEL ========================================================================== */ -void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeDELBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_DELBA_REQ_STRUCT *pInfo; + struct rt_mlme_delba_req *pInfo; u8 *pOutBuffer = NULL; u8 *pOutBuffer2 = NULL; int NStatus; unsigned long Idx; - FRAME_DELBA_REQ Frame; + struct rt_frame_delba_req Frame; unsigned long FrameLen; - FRAME_BAR FrameBar; + struct rt_frame_bar FrameBar; - pInfo = (MLME_DELBA_REQ_STRUCT *) Elem->Msg; + pInfo = (struct rt_mlme_delba_req *)Elem->Msg; /* must send back DELBA */ - NdisZeroMemory(&Frame, sizeof(FRAME_DELBA_REQ)); + NdisZeroMemory(&Frame, sizeof(struct rt_frame_delba_req)); DBGPRINT(RT_DEBUG_TRACE, ("==> MlmeDELBAAction(), Initiator(%d) \n", pInfo->Initiator)); @@ -236,7 +236,7 @@ void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) FrameBar.BarControl.MTID = 0; /* make sure sequence not clear in DEL funciton. */ MakeOutgoingFrame(pOutBuffer2, &FrameLen, - sizeof(FRAME_BAR), &FrameBar, END_OF_ARGS); + sizeof(struct rt_frame_bar), &FrameBar, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer2, FrameLen); MlmeFreeMemory(pAd, pOutBuffer2); DBGPRINT(RT_DEBUG_TRACE, @@ -269,7 +269,7 @@ void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Frame.ReasonCode = cpu2le16(Frame.ReasonCode); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_DELBA_REQ), &Frame, END_OF_ARGS); + sizeof(struct rt_frame_delba_req), &Frame, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); DBGPRINT(RT_DEBUG_TRACE, @@ -278,25 +278,25 @@ void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void MlmeQOSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeQOSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void MlmeDLSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeDLSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void MlmeInvalidAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeInvalidAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /*u8 * pOutBuffer = NULL; */ /*Return the receiving frame except the MSB of category filed set to 1. 7.3.1.11 */ } -void PeerQOSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerQOSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void PeerBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Action = Elem->Msg[LENGTH_802_11 + 1]; @@ -313,13 +313,13 @@ void PeerBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void PeerPublicAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerPublicAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { if (Elem->Wcid >= MAX_LEN_OF_MAC_TABLE) return; } -static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void ReservedAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Category; @@ -333,18 +333,18 @@ static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) hex_dump("Reserved Action Frame", &Elem->Msg[0], Elem->MsgLen); } -void PeerRMAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerRMAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { return; } -static void respond_ht_information_exchange_action(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem) +static void respond_ht_information_exchange_action(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem) { u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - FRAME_HT_INFO HTINFOframe, *pFrame; + struct rt_frame_ht_info HTINFOframe, *pFrame; u8 *pAddr; /* 2. Always send back ADDBA Response */ @@ -356,10 +356,10 @@ static void respond_ht_information_exchange_action(IN PRTMP_ADAPTER pAd, return; } /* get RA */ - pFrame = (FRAME_HT_INFO *) & Elem->Msg[0]; + pFrame = (struct rt_frame_ht_info *) & Elem->Msg[0]; pAddr = pFrame->Hdr.Addr2; - NdisZeroMemory(&HTINFOframe, sizeof(FRAME_HT_INFO)); + NdisZeroMemory(&HTINFOframe, sizeof(struct rt_frame_ht_info)); /* 2-1. Prepare ADDBA Response frame. */ { if (ADHOC_ON(pAd)) @@ -381,13 +381,13 @@ static void respond_ht_information_exchange_action(IN PRTMP_ADAPTER pAd, pAd->CommonCfg.AddHTInfo.AddHtInfo.RecomWidth; MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_HT_INFO), &HTINFOframe, END_OF_ARGS); + sizeof(struct rt_frame_ht_info), &HTINFOframe, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); } -void PeerHTAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerHTAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Action = Elem->Msg[LENGTH_802_11 + 1]; @@ -436,10 +436,10 @@ void PeerHTAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) break; case HT_INFO_EXCHANGE: { - HT_INFORMATION_OCTET *pHT_info; + struct rt_ht_information_octet *pHT_info; pHT_info = - (HT_INFORMATION_OCTET *) & Elem->Msg[LENGTH_802_11 + + (struct rt_ht_information_octet *) & Elem->Msg[LENGTH_802_11 + 2]; /* 7.4.8.10 */ DBGPRINT(RT_DEBUG_TRACE, @@ -467,9 +467,9 @@ void PeerHTAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) FALSE , then continue indicaterx at this moment. ========================================================================== */ -void ORIBATimerTimeout(IN PRTMP_ADAPTER pAd) +void ORIBATimerTimeout(struct rt_rtmp_adapter *pAd) { - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; int i, total; u8 TID; @@ -489,16 +489,16 @@ void ORIBATimerTimeout(IN PRTMP_ADAPTER pAd) } } -void SendRefreshBAR(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) +void SendRefreshBAR(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry) { - FRAME_BAR FrameBar; + struct rt_frame_bar FrameBar; unsigned long FrameLen; int NStatus; u8 *pOutBuffer = NULL; u16 Sequence; u8 i, TID; u16 idx; - BA_ORI_ENTRY *pBAEntry; + struct rt_ba_ori_entry *pBAEntry; for (i = 0; i < NUM_OF_TID; i++) { idx = pEntry->BAOriWcidArray[i]; @@ -529,7 +529,7 @@ void SendRefreshBAR(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) FrameBar.BarControl.TID = TID; /* make sure sequence not clear in DEL funciton. */ MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_BAR), &FrameBar, + sizeof(struct rt_frame_bar), &FrameBar, END_OF_ARGS); /*if (!(CLIENT_STATUS_TEST_FLAG(pEntry, fCLIENT_STATUS_RALINK_CHIPSET))) */ if (1) /* Now we always send BAR. */ @@ -547,11 +547,11 @@ void SendRefreshBAR(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) } } -void ActHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void ActHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 *Addr1, u8 *Addr2, u8 *Addr3) { - NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11)); + NdisZeroMemory(pHdr80211, sizeof(struct rt_header_802_11)); pHdr80211->FC.Type = BTYPE_MGMT; pHdr80211->FC.SubType = SUBTYPE_ACTION; @@ -560,10 +560,10 @@ void ActHeaderInit(IN PRTMP_ADAPTER pAd, COPY_MAC_ADDR(pHdr80211->Addr3, Addr3); } -void BarHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PFRAME_BAR pCntlBar, u8 *pDA, u8 *pSA) +void BarHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_frame_bar * pCntlBar, u8 *pDA, u8 *pSA) { - NdisZeroMemory(pCntlBar, sizeof(FRAME_BAR)); + NdisZeroMemory(pCntlBar, sizeof(struct rt_frame_bar)); pCntlBar->FC.Type = BTYPE_CNTL; pCntlBar->FC.SubType = SUBTYPE_BLOCK_ACK_REQ; pCntlBar->BarControl.MTID = 0; @@ -571,7 +571,7 @@ void BarHeaderInit(IN PRTMP_ADAPTER pAd, pCntlBar->BarControl.ACKPolicy = 0; pCntlBar->Duration = - 16 + RTMPCalcDuration(pAd, RATE_1, sizeof(FRAME_BA)); + 16 + RTMPCalcDuration(pAd, RATE_1, sizeof(struct rt_frame_ba)); COPY_MAC_ADDR(pCntlBar->Addr1, pDA); COPY_MAC_ADDR(pCntlBar->Addr2, pSA); @@ -591,7 +591,7 @@ void BarHeaderInit(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void InsertActField(IN PRTMP_ADAPTER pAd, +void InsertActField(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 Category, u8 ActCode) { diff --git a/drivers/staging/rt2860/common/action.h b/drivers/staging/rt2860/common/action.h index f1d1ac73b1cb..974f8b84039f 100644 --- a/drivers/staging/rt2860/common/action.h +++ b/drivers/staging/rt2860/common/action.h @@ -39,18 +39,18 @@ #ifndef __ACTION_H__ #define __ACTION_H__ -typedef struct PACKED __HT_INFO_OCTET { +struct PACKED rt_ht_information_octet { u8 Request:1; u8 Forty_MHz_Intolerant:1; u8 STA_Channel_Width:1; u8 Reserved:5; -} HT_INFORMATION_OCTET; +}; -typedef struct PACKED __FRAME_HT_INFO { - HEADER_802_11 Hdr; +struct PACKED rt_frame_ht_info { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; - HT_INFORMATION_OCTET HT_Info; -} FRAME_HT_INFO, *PFRAME_HT_INFO; + struct rt_ht_information_octet HT_Info; +}; #endif /* __ACTION_H__ */ diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c index f90d709bcf40..69eea402d32d 100644 --- a/drivers/staging/rt2860/common/ba_action.c +++ b/drivers/staging/rt2860/common/ba_action.c @@ -38,12 +38,12 @@ #define RESET_RCV_SEQ (0xFFFF) -static void ba_mpdu_blk_free(PRTMP_ADAPTER pAd, +static void ba_mpdu_blk_free(struct rt_rtmp_adapter *pAd, struct reordering_mpdu *mpdu_blk); -BA_ORI_ENTRY *BATableAllocOriEntry(IN PRTMP_ADAPTER pAd, u16 * Idx); +struct rt_ba_ori_entry *BATableAllocOriEntry(struct rt_rtmp_adapter *pAd, u16 * Idx); -BA_REC_ENTRY *BATableAllocRecEntry(IN PRTMP_ADAPTER pAd, u16 * Idx); +struct rt_ba_rec_entry *BATableAllocRecEntry(struct rt_rtmp_adapter *pAd, u16 * Idx); void BAOriSessionSetupTimeout(void *SystemSpecific1, void *FunctionContext, @@ -61,8 +61,8 @@ BUILD_TIMER_FUNCTION(BARecSessionIdleTimeout); #define ANNOUNCE_REORDERING_PACKET(_pAd, _mpdu_blk) \ Announce_Reordering_Packet(_pAd, _mpdu_blk); -void BA_MaxWinSizeReasign(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntryPeer, u8 * pWinSize) +void BA_MaxWinSizeReasign(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntryPeer, u8 * pWinSize) { u8 MaxSize; @@ -97,7 +97,7 @@ void BA_MaxWinSizeReasign(IN PRTMP_ADAPTER pAd, } } -void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd, +void Announce_Reordering_Packet(struct rt_rtmp_adapter *pAd, IN struct reordering_mpdu *mpdu) { void *pPacket; @@ -194,10 +194,10 @@ static inline struct reordering_mpdu *ba_reordering_mpdu_probe(struct /* * free all resource for reordering mechanism */ -void ba_reordering_resource_release(PRTMP_ADAPTER pAd) +void ba_reordering_resource_release(struct rt_rtmp_adapter *pAd) { - BA_TABLE *Tab; - PBA_REC_ENTRY pBAEntry; + struct rt_ba_table *Tab; + struct rt_ba_rec_entry *pBAEntry; struct reordering_mpdu *mpdu_blk; int i; @@ -229,7 +229,7 @@ void ba_reordering_resource_release(PRTMP_ADAPTER pAd) /* * Allocate all resource for reordering mechanism */ -BOOLEAN ba_reordering_resource_init(PRTMP_ADAPTER pAd, int num) +BOOLEAN ba_reordering_resource_init(struct rt_rtmp_adapter *pAd, int num) { int i; u8 *mem; @@ -277,7 +277,7 @@ BOOLEAN ba_reordering_resource_init(PRTMP_ADAPTER pAd, int num) /*static int blk_count=0; // sample take off, no use */ -static struct reordering_mpdu *ba_mpdu_blk_alloc(PRTMP_ADAPTER pAd) +static struct reordering_mpdu *ba_mpdu_blk_alloc(struct rt_rtmp_adapter *pAd) { struct reordering_mpdu *mpdu_blk; @@ -292,7 +292,7 @@ static struct reordering_mpdu *ba_mpdu_blk_alloc(PRTMP_ADAPTER pAd) return mpdu_blk; } -static void ba_mpdu_blk_free(PRTMP_ADAPTER pAd, +static void ba_mpdu_blk_free(struct rt_rtmp_adapter *pAd, struct reordering_mpdu *mpdu_blk) { ASSERT(mpdu_blk); @@ -303,8 +303,8 @@ static void ba_mpdu_blk_free(PRTMP_ADAPTER pAd, NdisReleaseSpinLock(&pAd->mpdu_blk_pool.lock); } -static u16 ba_indicate_reordering_mpdus_in_order(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, +static u16 ba_indicate_reordering_mpdus_in_order(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, u16 StartSeq) { struct reordering_mpdu *mpdu_blk; @@ -334,8 +334,8 @@ static u16 ba_indicate_reordering_mpdus_in_order(IN PRTMP_ADAPTER pAd, return LastIndSeq; } -static void ba_indicate_reordering_mpdus_le_seq(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, +static void ba_indicate_reordering_mpdus_le_seq(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, u16 Sequence) { struct reordering_mpdu *mpdu_blk; @@ -358,8 +358,8 @@ static void ba_indicate_reordering_mpdus_le_seq(IN PRTMP_ADAPTER pAd, NdisReleaseSpinLock(&pBAEntry->RxReRingLock); } -static void ba_refresh_reordering_mpdus(IN PRTMP_ADAPTER pAd, - PBA_REC_ENTRY pBAEntry) +static void ba_refresh_reordering_mpdus(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry) { struct reordering_mpdu *mpdu_blk; @@ -381,8 +381,8 @@ static void ba_refresh_reordering_mpdus(IN PRTMP_ADAPTER pAd, } /*static */ -void ba_flush_reordering_timeout_mpdus(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, +void ba_flush_reordering_timeout_mpdus(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, unsigned long Now32) { u16 Sequence; @@ -440,14 +440,14 @@ void ba_flush_reordering_timeout_mpdus(IN PRTMP_ADAPTER pAd, * generate ADDBA request to * set up BA agreement */ -void BAOriSessionSetUp(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, +void BAOriSessionSetUp(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 TID, u16 TimeOut, unsigned long DelayTime, IN BOOLEAN isForced) { - /*MLME_ADDBA_REQ_STRUCT AddbaReq; */ - BA_ORI_ENTRY *pBAEntry = NULL; + /*struct rt_mlme_addba_req AddbaReq; */ + struct rt_ba_ori_entry *pBAEntry = NULL; u16 Idx; BOOLEAN Cancelled; @@ -506,17 +506,17 @@ void BAOriSessionSetUp(IN PRTMP_ADAPTER pAd, RTMPSetTimer(&pBAEntry->ORIBATimer, DelayTime); } -void BAOriSessionAdd(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN PFRAME_ADDBA_RSP pFrame) +void BAOriSessionAdd(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_frame_addba_rsp * pFrame) { - BA_ORI_ENTRY *pBAEntry = NULL; + struct rt_ba_ori_entry *pBAEntry = NULL; BOOLEAN Cancelled; u8 TID; u16 Idx; u8 *pOutBuffer2 = NULL; int NStatus; unsigned long FrameLen; - FRAME_BAR FrameBar; + struct rt_frame_bar FrameBar; TID = pFrame->BaParm.TID; Idx = pEntry->BAOriWcidArray[TID]; @@ -562,7 +562,7 @@ void BAOriSessionAdd(IN PRTMP_ADAPTER pAd, FrameBar.StartingSeq.field.StartSeq = pBAEntry->Sequence; /* make sure sequence not clear in DEL funciton. */ FrameBar.BarControl.TID = pBAEntry->TID; /* make sure sequence not clear in DEL funciton. */ MakeOutgoingFrame(pOutBuffer2, &FrameLen, - sizeof(FRAME_BAR), &FrameBar, END_OF_ARGS); + sizeof(struct rt_frame_bar), &FrameBar, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer2, FrameLen); MlmeFreeMemory(pAd, pOutBuffer2); @@ -571,10 +571,10 @@ void BAOriSessionAdd(IN PRTMP_ADAPTER pAd, } } -BOOLEAN BARecSessionAdd(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN PFRAME_ADDBA_REQ pFrame) +BOOLEAN BARecSessionAdd(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_frame_addba_req * pFrame) { - BA_REC_ENTRY *pBAEntry = NULL; + struct rt_ba_rec_entry *pBAEntry = NULL; BOOLEAN Status = TRUE; BOOLEAN Cancelled; u16 Idx; @@ -660,10 +660,10 @@ BOOLEAN BARecSessionAdd(IN PRTMP_ADAPTER pAd, return (Status); } -BA_REC_ENTRY *BATableAllocRecEntry(IN PRTMP_ADAPTER pAd, u16 * Idx) +struct rt_ba_rec_entry *BATableAllocRecEntry(struct rt_rtmp_adapter *pAd, u16 * Idx) { int i; - BA_REC_ENTRY *pBAEntry = NULL; + struct rt_ba_rec_entry *pBAEntry = NULL; NdisAcquireSpinLock(&pAd->BATabLock); @@ -690,10 +690,10 @@ done: return pBAEntry; } -BA_ORI_ENTRY *BATableAllocOriEntry(IN PRTMP_ADAPTER pAd, u16 * Idx) +struct rt_ba_ori_entry *BATableAllocOriEntry(struct rt_rtmp_adapter *pAd, u16 * Idx) { int i; - BA_ORI_ENTRY *pBAEntry = NULL; + struct rt_ba_ori_entry *pBAEntry = NULL; NdisAcquireSpinLock(&pAd->BATabLock); @@ -718,10 +718,10 @@ done: return pBAEntry; } -void BATableFreeOriEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) +void BATableFreeOriEntry(struct rt_rtmp_adapter *pAd, unsigned long Idx) { - BA_ORI_ENTRY *pBAEntry = NULL; - MAC_TABLE_ENTRY *pEntry; + struct rt_ba_ori_entry *pBAEntry = NULL; + struct rt_mac_table_entry *pEntry; if ((Idx == 0) || (Idx >= MAX_LEN_OF_BA_ORI_TABLE)) return; @@ -752,10 +752,10 @@ void BATableFreeOriEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) } } -void BATableFreeRecEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) +void BATableFreeRecEntry(struct rt_rtmp_adapter *pAd, unsigned long Idx) { - BA_REC_ENTRY *pBAEntry = NULL; - MAC_TABLE_ENTRY *pEntry; + struct rt_ba_rec_entry *pBAEntry = NULL; + struct rt_mac_table_entry *pEntry; if ((Idx == 0) || (Idx >= MAX_LEN_OF_BA_REC_TABLE)) return; @@ -777,13 +777,13 @@ void BATableFreeRecEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) } } -void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, +void BAOriSessionTearDown(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 TID, IN BOOLEAN bPassive, IN BOOLEAN bForceSend) { unsigned long Idx = 0; - BA_ORI_ENTRY *pBAEntry; + struct rt_ba_ori_entry *pBAEntry; BOOLEAN Cancelled; if (Wcid >= MAX_LEN_OF_MAC_TABLE) { @@ -796,13 +796,13 @@ void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, if ((Idx == 0) || (Idx >= MAX_LEN_OF_BA_ORI_TABLE)) { if (bForceSend == TRUE) { /* force send specified TID DelBA */ - MLME_DELBA_REQ_STRUCT DelbaReq; - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_delba_req DelbaReq; + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); - NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM)); + NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); COPY_MAC_ADDR(DelbaReq.Addr, pAd->MacTab.Content[Wcid].Addr); @@ -836,13 +836,13 @@ void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, /* */ if ((bPassive == FALSE) && (TID == pBAEntry->TID) && (pBAEntry->ORI_BA_Status == Originator_Done)) { - MLME_DELBA_REQ_STRUCT DelbaReq; - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_delba_req DelbaReq; + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); - NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM)); + NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); COPY_MAC_ADDR(DelbaReq.Addr, pAd->MacTab.Content[Wcid].Addr); @@ -867,11 +867,11 @@ void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, } } -void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, +void BARecSessionTearDown(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 TID, IN BOOLEAN bPassive) { unsigned long Idx = 0; - BA_REC_ENTRY *pBAEntry; + struct rt_ba_rec_entry *pBAEntry; if (Wcid >= MAX_LEN_OF_MAC_TABLE) { return; @@ -895,7 +895,7 @@ void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, /* */ if ((TID == pBAEntry->TID) && (pBAEntry->REC_BA_Status == Recipient_Accept)) { - MLME_DELBA_REQ_STRUCT DelbaReq; + struct rt_mlme_delba_req DelbaReq; BOOLEAN Cancelled; /*unsigned long offset; */ /*u32 VALUE; */ @@ -906,12 +906,12 @@ void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, /* 1. Send DELBA Action Frame */ /* */ if (bPassive == FALSE) { - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); - NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM)); + NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); COPY_MAC_ADDR(DelbaReq.Addr, pAd->MacTab.Content[Wcid].Addr); @@ -956,7 +956,7 @@ void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, BATableFreeRecEntry(pAd, Idx); } -void BASessionTearDownALL(IN OUT PRTMP_ADAPTER pAd, u8 Wcid) +void BASessionTearDownALL(struct rt_rtmp_adapter *pAd, u8 Wcid) { int i; @@ -985,9 +985,9 @@ void BAOriSessionSetupTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - BA_ORI_ENTRY *pBAEntry = (BA_ORI_ENTRY *) FunctionContext; - MAC_TABLE_ENTRY *pEntry; - PRTMP_ADAPTER pAd; + struct rt_ba_ori_entry *pBAEntry = (struct rt_ba_ori_entry *)FunctionContext; + struct rt_mac_table_entry *pEntry; + struct rt_rtmp_adapter *pAd; if (pBAEntry == NULL) return; @@ -1004,7 +1004,7 @@ void BAOriSessionSetupTimeout(void *SystemSpecific1, if ((pBAEntry->ORI_BA_Status == Originator_WaitRes) && (pBAEntry->Token < ORI_SESSION_MAX_RETRY)) { - MLME_ADDBA_REQ_STRUCT AddbaReq; + struct rt_mlme_addba_req AddbaReq; NdisZeroMemory(&AddbaReq, sizeof(AddbaReq)); COPY_MAC_ADDR(AddbaReq.pAddr, pEntry->Addr); @@ -1015,7 +1015,7 @@ void BAOriSessionSetupTimeout(void *SystemSpecific1, AddbaReq.TimeOutValue = 0; AddbaReq.Token = pBAEntry->Token; MlmeEnqueue(pAd, ACTION_STATE_MACHINE, MT2_MLME_ADD_BA_CATE, - sizeof(MLME_ADDBA_REQ_STRUCT), (void *)& AddbaReq); + sizeof(struct rt_mlme_addba_req), (void *)& AddbaReq); RTMP_MLME_HANDLER(pAd); DBGPRINT(RT_DEBUG_TRACE, ("BA Ori Session Timeout(%d) : Send ADD BA again\n", @@ -1047,8 +1047,8 @@ void BARecSessionIdleTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - BA_REC_ENTRY *pBAEntry = (BA_REC_ENTRY *) FunctionContext; - PRTMP_ADAPTER pAd; + struct rt_ba_rec_entry *pBAEntry = (struct rt_ba_rec_entry *)FunctionContext; + struct rt_rtmp_adapter *pAd; unsigned long Now32; if (pBAEntry == NULL) @@ -1070,20 +1070,20 @@ void BARecSessionIdleTimeout(void *SystemSpecific1, } } -void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerAddBAReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /* 7.4.4.1 */ /*unsigned long Idx; */ u8 Status = 1; u8 pAddr[6]; - FRAME_ADDBA_RSP ADDframe; + struct rt_frame_addba_rsp ADDframe; u8 *pOutBuffer = NULL; int NStatus; - PFRAME_ADDBA_REQ pAddreqFrame = NULL; + struct rt_frame_addba_req * pAddreqFrame = NULL; /*u8 BufSize; */ unsigned long FrameLen; unsigned long *ptemp; - PMAC_TABLE_ENTRY pMacEntry; + struct rt_mac_table_entry *pMacEntry; DBGPRINT(RT_DEBUG_TRACE, ("%s ==> (Wcid = %d)\n", __func__, Elem->Wcid)); @@ -1103,7 +1103,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) if ((pAd->CommonCfg.bBADecline == FALSE) && IS_HT_STA(pMacEntry)) { - pAddreqFrame = (PFRAME_ADDBA_REQ) (&Elem->Msg[0]); + pAddreqFrame = (struct rt_frame_addba_req *) (&Elem->Msg[0]); DBGPRINT(RT_DEBUG_OFF, ("Rcv Wcid(%d) AddBAReq\n", Elem->Wcid)); if (BARecSessionAdd @@ -1120,7 +1120,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) if (pAd->MacTab.Content[Elem->Wcid].ValidAsCLI) ASSERT(pAd->MacTab.Content[Elem->Wcid].Sst == SST_ASSOC); - pAddreqFrame = (PFRAME_ADDBA_REQ) (&Elem->Msg[0]); + pAddreqFrame = (struct rt_frame_addba_req *) (&Elem->Msg[0]); /* 2. Always send back ADDBA Response */ NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ if (NStatus != NDIS_STATUS_SUCCESS) { @@ -1129,7 +1129,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) return; } - NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP)); + NdisZeroMemory(&ADDframe, sizeof(struct rt_frame_addba_rsp)); /* 2-1. Prepare ADDBA Response frame. */ { @@ -1164,7 +1164,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ADDframe.TimeOutValue = cpu2le16(ADDframe.TimeOutValue); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_ADDBA_RSP), &ADDframe, END_OF_ARGS); + sizeof(struct rt_frame_addba_rsp), &ADDframe, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); @@ -1173,12 +1173,12 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ADDframe.BaParm.TID, ADDframe.BaParm.BufSize)); } -void PeerAddBARspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerAddBARspAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /*u8 Idx, i; */ /*u8 * pOutBuffer = NULL; */ - PFRAME_ADDBA_RSP pFrame = NULL; - /*PBA_ORI_ENTRY pBAEntry; */ + struct rt_frame_addba_rsp * pFrame = NULL; + /*struct rt_ba_ori_entry *pBAEntry; */ /*ADDBA Response from unknown peer, ignore this. */ if (Elem->Wcid >= MAX_LEN_OF_MAC_TABLE) @@ -1189,7 +1189,7 @@ void PeerAddBARspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /*hex_dump("PeerAddBARspAction()", Elem->Msg, Elem->MsgLen); */ if (PeerAddBARspActionSanity(pAd, Elem->Msg, Elem->MsgLen)) { - pFrame = (PFRAME_ADDBA_RSP) (&Elem->Msg[0]); + pFrame = (struct rt_frame_addba_rsp *) (&Elem->Msg[0]); DBGPRINT(RT_DEBUG_TRACE, ("\t\t StatusCode = %d\n", pFrame->StatusCode)); @@ -1216,16 +1216,16 @@ void PeerAddBARspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void PeerDelBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerDelBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /*u8 Idx; */ /*u8 * pOutBuffer = NULL; */ - PFRAME_DELBA_REQ pDelFrame = NULL; + struct rt_frame_delba_req * pDelFrame = NULL; DBGPRINT(RT_DEBUG_TRACE, ("%s ==>\n", __func__)); /*DELBA Request from unknown peer, ignore this. */ if (PeerDelBAActionSanity(pAd, Elem->Wcid, Elem->Msg, Elem->MsgLen)) { - pDelFrame = (PFRAME_DELBA_REQ) (&Elem->Msg[0]); + pDelFrame = (struct rt_frame_delba_req *) (&Elem->Msg[0]); if (pDelFrame->DelbaParm.Initiator == ORIGINATOR) { DBGPRINT(RT_DEBUG_TRACE, ("BA - PeerDelBAAction----> ORIGINATOR\n")); @@ -1243,14 +1243,14 @@ void PeerDelBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -BOOLEAN CntlEnqueueForRecv(IN PRTMP_ADAPTER pAd, +BOOLEAN CntlEnqueueForRecv(struct rt_rtmp_adapter *pAd, unsigned long Wcid, - unsigned long MsgLen, IN PFRAME_BA_REQ pMsg) + unsigned long MsgLen, struct rt_frame_ba_req * pMsg) { - PFRAME_BA_REQ pFrame = pMsg; + struct rt_frame_ba_req * pFrame = pMsg; /*PRTMP_REORDERBUF pBuffer; */ /*PRTMP_REORDERBUF pDmaBuf; */ - PBA_REC_ENTRY pBAEntry; + struct rt_ba_rec_entry *pBAEntry; /*BOOLEAN Result; */ unsigned long Idx; /*u8 NumRxPkt; */ @@ -1271,10 +1271,10 @@ BOOLEAN CntlEnqueueForRecv(IN PRTMP_ADAPTER pAd, if (MsgLen > MGMT_DMA_BUFFER_SIZE) { DBGPRINT_ERR(("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen)); return FALSE; - } else if (MsgLen != sizeof(FRAME_BA_REQ)) { + } else if (MsgLen != sizeof(struct rt_frame_ba_req)) { DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); return FALSE; - } else if (MsgLen != sizeof(FRAME_BA_REQ)) { + } else if (MsgLen != sizeof(struct rt_frame_ba_req)) { DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); return FALSE; } @@ -1309,12 +1309,12 @@ BOOLEAN CntlEnqueueForRecv(IN PRTMP_ADAPTER pAd, /* Description : Send PSMP Action frame If PSMP mode switches. */ -void SendPSMPAction(IN PRTMP_ADAPTER pAd, u8 Wcid, u8 Psmp) +void SendPSMPAction(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 Psmp) { u8 *pOutBuffer = NULL; int NStatus; /*unsigned long Idx; */ - FRAME_PSMP_ACTION Frame; + struct rt_frame_psmp_action Frame; unsigned long FrameLen; NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ @@ -1355,7 +1355,7 @@ void SendPSMPAction(IN PRTMP_ADAPTER pAd, u8 Wcid, u8 Psmp) break; } MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_PSMP_ACTION), &Frame, END_OF_ARGS); + sizeof(struct rt_frame_psmp_action), &Frame, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); DBGPRINT(RT_DEBUG_ERROR, ("HT - SendPSMPAction( %d ) \n", Frame.Psmp)); @@ -1363,7 +1363,7 @@ void SendPSMPAction(IN PRTMP_ADAPTER pAd, u8 Wcid, u8 Psmp) #define RADIO_MEASUREMENT_REQUEST_ACTION 0 -typedef struct PACKED { +struct PACKED rt_beacon_request { u8 RegulatoryClass; u8 ChannelNumber; u16 RandomInterval; @@ -1373,18 +1373,18 @@ typedef struct PACKED { u8 ReportingCondition; u8 Threshold; u8 SSIDIE[2]; /* 2 byte */ -} BEACON_REQUEST; +}; -typedef struct PACKED { +struct PACKED rt_measurement_req { u8 ID; u8 Length; u8 Token; u8 RequestMode; u8 Type; -} MEASUREMENT_REQ; +}; -void convert_reordering_packet_to_preAMSDU_or_802_3_packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, +void convert_reordering_packet_to_preAMSDU_or_802_3_packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { @@ -1436,9 +1436,9 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(IN PRTMP_ADAPTER pAd, } \ } while (0); -static void ba_enqueue_reordering_packet(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, - IN RX_BLK * pRxBlk, +static void ba_enqueue_reordering_packet(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { struct reordering_mpdu *mpdu_blk; @@ -1515,11 +1515,11 @@ static void ba_enqueue_reordering_packet(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void Indicate_AMPDU_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_AMPDU_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { u16 Idx; - PBA_REC_ENTRY pBAEntry = NULL; + struct rt_ba_rec_entry *pBAEntry = NULL; u16 Sequence = pRxBlk->pHeader->Sequence; unsigned long Now32; u8 Wcid = pRxBlk->pRxWI->WirelessCliID; diff --git a/drivers/staging/rt2860/common/cmm_aes.c b/drivers/staging/rt2860/common/cmm_aes.c index 99b0b1bff468..6730d78badfc 100644 --- a/drivers/staging/rt2860/common/cmm_aes.c +++ b/drivers/staging/rt2860/common/cmm_aes.c @@ -37,11 +37,11 @@ #include "../rt_config.h" -typedef struct { +struct aes_context { u32 erk[64]; /* encryption round keys */ u32 drk[64]; /* decryption round keys */ int nr; /* number of rounds */ -} aes_context; +}; /*****************************/ /******** SBOX Table *********/ @@ -408,9 +408,9 @@ void construct_ctr_preload(unsigned char *ctr_preload, } -BOOLEAN RTMPSoftDecryptAES(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptAES(struct rt_rtmp_adapter *pAd, u8 *pData, - unsigned long DataByteCnt, IN PCIPHER_KEY pWpaKey) + unsigned long DataByteCnt, struct rt_cipher_key *pWpaKey) { u8 KeyID; u32 HeaderLen; @@ -878,7 +878,7 @@ static uint32 KT3[256]; (b)[(i) + 3] = (uint8) ( (n) ); \ } -int rt_aes_set_key(aes_context * ctx, uint8 * key, int nbits) +int rt_aes_set_key(struct aes_context * ctx, uint8 * key, int nbits) { int i; uint32 *RK, *SK; @@ -1020,7 +1020,7 @@ int rt_aes_set_key(aes_context * ctx, uint8 * key, int nbits) /* AES 128-bit block encryption routine */ -void rt_aes_encrypt(aes_context * ctx, uint8 input[16], uint8 output[16]) +void rt_aes_encrypt(struct aes_context * ctx, uint8 input[16], uint8 output[16]) { uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; @@ -1107,7 +1107,7 @@ void rt_aes_encrypt(aes_context * ctx, uint8 input[16], uint8 output[16]) /* AES 128-bit block decryption routine */ -void rt_aes_decrypt(aes_context * ctx, uint8 input[16], uint8 output[16]) +void rt_aes_decrypt(struct aes_context * ctx, uint8 input[16], uint8 output[16]) { uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; @@ -1210,7 +1210,7 @@ void AES_GTK_KEY_WRAP(u8 * key, u8 R[512]; int num_blocks = p_len / 8; /* unit:64bits */ int i, j; - aes_context aesctx; + struct aes_context aesctx; u8 xor; rt_aes_set_key(&aesctx, key, 128); @@ -1271,7 +1271,7 @@ void AES_GTK_KEY_UNWRAP(u8 * key, u8 A[8], BIN[16], BOUT[16]; u8 xor; int i, j; - aes_context aesctx; + struct aes_context aesctx; u8 *R; int num_blocks = c_len / 8; /* unit:64bits */ diff --git a/drivers/staging/rt2860/common/cmm_asic.c b/drivers/staging/rt2860/common/cmm_asic.c index ef7d2a6c58d5..fafba27fcd7b 100644 --- a/drivers/staging/rt2860/common/cmm_asic.c +++ b/drivers/staging/rt2860/common/cmm_asic.c @@ -38,7 +38,7 @@ #include "../rt_config.h" /* Reset the RFIC setting to new series */ -RTMP_RF_REGS RF2850RegTable[] = { +struct rt_rtmp_rf_regs RF2850RegTable[] = { /* ch R1 R2 R3(TX0~4=0) R4 */ {1, 0x98402ecc, 0x984c0786, 0x9816b455, 0x9800510b} , @@ -177,9 +177,9 @@ RTMP_RF_REGS RF2850RegTable[] = { /* still lack of MMAC(Japan) ch 34,38,42,46 */ }; -u8 NUM_OF_2850_CHNL = (sizeof(RF2850RegTable) / sizeof(RTMP_RF_REGS)); +u8 NUM_OF_2850_CHNL = (sizeof(RF2850RegTable) / sizeof(struct rt_rtmp_rf_regs)); -FREQUENCY_ITEM FreqItems3020[] = { +struct rt_frequency_item FreqItems3020[] = { /**************************************************/ /* ISM : 2.4 to 2.483 GHz // */ /**************************************************/ @@ -216,16 +216,16 @@ FREQUENCY_ITEM FreqItems3020[] = { , }; -u8 NUM_OF_3020_CHNL = (sizeof(FreqItems3020) / sizeof(FREQUENCY_ITEM)); +u8 NUM_OF_3020_CHNL = (sizeof(FreqItems3020) / sizeof(struct rt_frequency_item)); -void AsicUpdateAutoFallBackTable(IN PRTMP_ADAPTER pAd, u8 *pRateTable) +void AsicUpdateAutoFallBackTable(struct rt_rtmp_adapter *pAd, u8 *pRateTable) { u8 i; HT_FBK_CFG0_STRUC HtCfg0; HT_FBK_CFG1_STRUC HtCfg1; LG_FBK_CFG0_STRUC LgCfg0; LG_FBK_CFG1_STRUC LgCfg1; - PRTMP_TX_RATE_SWITCH pCurrTxRate, pNextTxRate; + struct rt_rtmp_tx_rate_switch *pCurrTxRate, *pNextTxRate; /* set to initial value */ HtCfg0.word = 0x65432100; @@ -233,9 +233,9 @@ void AsicUpdateAutoFallBackTable(IN PRTMP_ADAPTER pAd, u8 *pRateTable) LgCfg0.word = 0xedcba988; LgCfg1.word = 0x00002100; - pNextTxRate = (PRTMP_TX_RATE_SWITCH) pRateTable + 1; + pNextTxRate = (struct rt_rtmp_tx_rate_switch *) pRateTable + 1; for (i = 1; i < *((u8 *)pRateTable); i++) { - pCurrTxRate = (PRTMP_TX_RATE_SWITCH) pRateTable + 1 + i; + pCurrTxRate = (struct rt_rtmp_tx_rate_switch *) pRateTable + 1 + i; switch (pCurrTxRate->Mode) { case 0: /*CCK */ break; @@ -417,7 +417,7 @@ void AsicUpdateAutoFallBackTable(IN PRTMP_ADAPTER pAd, u8 *pRateTable) we should choose not to use GF. But still set correct ASIC registers. ======================================================================== */ -void AsicUpdateProtect(IN PRTMP_ADAPTER pAd, +void AsicUpdateProtect(struct rt_rtmp_adapter *pAd, u16 OperationMode, u8 SetMask, IN BOOLEAN bDisableBGProtect, IN BOOLEAN bNonGFExist) @@ -631,13 +631,13 @@ void AsicUpdateProtect(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void AsicSwitchChannel(IN PRTMP_ADAPTER pAd, u8 Channel, IN BOOLEAN bScan) +void AsicSwitchChannel(struct rt_rtmp_adapter *pAd, u8 Channel, IN BOOLEAN bScan) { unsigned long R2 = 0, R3 = DEFAULT_RF_TX_POWER, R4 = 0; char TxPwer = 0, TxPwer2 = DEFAULT_RF_TX_POWER; /*Bbp94 = BBPR94_DEFAULT, TxPwer2 = DEFAULT_RF_TX_POWER; */ u8 index; u32 Value = 0; /*BbpReg, Value; */ - RTMP_RF_REGS *RFRegTable; + struct rt_rtmp_rf_regs *RFRegTable; u8 RFValue; RFValue = 0; @@ -1002,7 +1002,7 @@ void AsicSwitchChannel(IN PRTMP_ADAPTER pAd, u8 Channel, IN BOOLEAN bScan) RTMPusecDelay(1000); } -void AsicResetBBPAgent(IN PRTMP_ADAPTER pAd) +void AsicResetBBPAgent(struct rt_rtmp_adapter *pAd) { BBP_CSR_CFG_STRUC BbpCsr; DBGPRINT(RT_DEBUG_ERROR, ("Reset BBP Agent busy bit.!! \n")); @@ -1025,7 +1025,7 @@ void AsicResetBBPAgent(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicLockChannel(IN PRTMP_ADAPTER pAd, u8 Channel) +void AsicLockChannel(struct rt_rtmp_adapter *pAd, u8 Channel) { } @@ -1052,7 +1052,7 @@ void AsicRfTuningExec(void *SystemSpecific1, it should be called AFTER MlmeDynamicTxRatSwitching() ========================================================================== */ -void AsicAdjustTxPower(IN PRTMP_ADAPTER pAd) +void AsicAdjustTxPower(struct rt_rtmp_adapter *pAd) { int i, j; char DeltaPwr = 0; @@ -1277,7 +1277,7 @@ void AsicAdjustTxPower(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void AsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp) { RTMP_STA_SLEEP_THEN_AUTO_WAKEUP(pAd, TbttNumToNextWakeUp); @@ -1291,7 +1291,7 @@ void AsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, in INFRA BSS, we should use AsicSleepThenAutoWakeup() instead. ========================================================================== */ -void AsicForceSleep(IN PRTMP_ADAPTER pAd) +void AsicForceSleep(struct rt_rtmp_adapter *pAd) { } @@ -1306,7 +1306,7 @@ void AsicForceSleep(IN PRTMP_ADAPTER pAd) IRQL = DISPATCH_LEVEL ========================================================================== */ -void AsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) +void AsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx) { DBGPRINT(RT_DEBUG_INFO, ("--> AsicForceWakeup \n")); RTMP_STA_FORCE_WAKEUP(pAd, bFromTx); @@ -1321,7 +1321,7 @@ void AsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) ========================================================================== */ -void AsicSetBssid(IN PRTMP_ADAPTER pAd, u8 *pBssid) +void AsicSetBssid(struct rt_rtmp_adapter *pAd, u8 *pBssid) { unsigned long Addr4; DBGPRINT(RT_DEBUG_TRACE, @@ -1340,9 +1340,9 @@ void AsicSetBssid(IN PRTMP_ADAPTER pAd, u8 *pBssid) RTMP_IO_WRITE32(pAd, MAC_BSSID_DW1, Addr4); } -void AsicSetMcastWC(IN PRTMP_ADAPTER pAd) +void AsicSetMcastWC(struct rt_rtmp_adapter *pAd) { - MAC_TABLE_ENTRY *pEntry = &pAd->MacTab.Content[MCAST_WCID]; + struct rt_mac_table_entry *pEntry = &pAd->MacTab.Content[MCAST_WCID]; u16 offset; pEntry->Sst = SST_ASSOC; @@ -1360,7 +1360,7 @@ void AsicSetMcastWC(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicDelWcidTab(IN PRTMP_ADAPTER pAd, u8 Wcid) +void AsicDelWcidTab(struct rt_rtmp_adapter *pAd, u8 Wcid) { unsigned long Addr0 = 0x0, Addr1 = 0x0; unsigned long offset; @@ -1380,7 +1380,7 @@ void AsicDelWcidTab(IN PRTMP_ADAPTER pAd, u8 Wcid) ========================================================================== */ -void AsicEnableRDG(IN PRTMP_ADAPTER pAd) +void AsicEnableRDG(struct rt_rtmp_adapter *pAd) { TX_LINK_CFG_STRUC TxLinkCfg; u32 Data = 0; @@ -1405,7 +1405,7 @@ void AsicEnableRDG(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicDisableRDG(IN PRTMP_ADAPTER pAd) +void AsicDisableRDG(struct rt_rtmp_adapter *pAd) { TX_LINK_CFG_STRUC TxLinkCfg; u32 Data = 0; @@ -1441,7 +1441,7 @@ void AsicDisableRDG(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicDisableSync(IN PRTMP_ADAPTER pAd) +void AsicDisableSync(struct rt_rtmp_adapter *pAd) { BCN_TIME_CFG_STRUC csr; @@ -1468,7 +1468,7 @@ void AsicDisableSync(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicEnableBssSync(IN PRTMP_ADAPTER pAd) +void AsicEnableBssSync(struct rt_rtmp_adapter *pAd) { BCN_TIME_CFG_STRUC csr; @@ -1498,7 +1498,7 @@ void AsicEnableBssSync(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicEnableIbssSync(IN PRTMP_ADAPTER pAd) +void AsicEnableIbssSync(struct rt_rtmp_adapter *pAd) { BCN_TIME_CFG_STRUC csr9; u8 *ptr; @@ -1581,7 +1581,7 @@ void AsicEnableIbssSync(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) +void AsicSetEdcaParm(struct rt_rtmp_adapter *pAd, struct rt_edca_parm *pEdcaParm) { EDCA_AC_CFG_STRUC Ac0Cfg, Ac1Cfg, Ac2Cfg, Ac3Cfg; AC_TXOP_CSR0_STRUC csr0; @@ -1676,7 +1676,7 @@ void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, 0x00002222); - NdisZeroMemory(&pAd->CommonCfg.APEdcaParm, sizeof(EDCA_PARM)); + NdisZeroMemory(&pAd->CommonCfg.APEdcaParm, sizeof(struct rt_edca_parm)); } else { OPSTATUS_SET_FLAG(pAd, fOP_STATUS_WMM_INUSED); /*======================================================== */ @@ -1823,7 +1823,7 @@ void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, AifsnCsr.word); NdisMoveMemory(&pAd->CommonCfg.APEdcaParm, pEdcaParm, - sizeof(EDCA_PARM)); + sizeof(struct rt_edca_parm)); if (!ADHOC_ON(pAd)) { DBGPRINT(RT_DEBUG_TRACE, ("EDCA [#%d]: AIFSN CWmin CWmax TXOP(us) ACM\n", @@ -1862,7 +1862,7 @@ void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) ========================================================================== */ -void AsicSetSlotTime(IN PRTMP_ADAPTER pAd, IN BOOLEAN bUseShortSlotTime) +void AsicSetSlotTime(struct rt_rtmp_adapter *pAd, IN BOOLEAN bUseShortSlotTime) { unsigned long SlotTime; u32 RegValue = 0; @@ -1930,7 +1930,7 @@ void AsicSetSlotTime(IN PRTMP_ADAPTER pAd, IN BOOLEAN bUseShortSlotTime) Return: ======================================================================== */ -void AsicAddSharedKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddSharedKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIndex, u8 KeyIdx, u8 CipherAlg, @@ -2048,7 +2048,7 @@ void AsicAddSharedKeyEntry(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -void AsicRemoveSharedKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicRemoveSharedKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIndex, u8 KeyIdx) { /*unsigned long SecCsr0; */ @@ -2088,7 +2088,7 @@ void AsicRemoveSharedKeyEntry(IN PRTMP_ADAPTER pAd, } -void AsicUpdateWCIDAttribute(IN PRTMP_ADAPTER pAd, +void AsicUpdateWCIDAttribute(struct rt_rtmp_adapter *pAd, u16 WCID, u8 BssIndex, u8 CipherAlg, @@ -2106,7 +2106,7 @@ void AsicUpdateWCIDAttribute(IN PRTMP_ADAPTER pAd, RTMP_IO_WRITE32(pAd, offset, WCIDAttri); } -void AsicUpdateWCIDIVEIV(IN PRTMP_ADAPTER pAd, +void AsicUpdateWCIDIVEIV(struct rt_rtmp_adapter *pAd, u16 WCID, unsigned long uIV, unsigned long uEIV) { unsigned long offset; @@ -2117,7 +2117,7 @@ void AsicUpdateWCIDIVEIV(IN PRTMP_ADAPTER pAd, RTMP_IO_WRITE32(pAd, offset + 4, uEIV); } -void AsicUpdateRxWCIDTable(IN PRTMP_ADAPTER pAd, +void AsicUpdateRxWCIDTable(struct rt_rtmp_adapter *pAd, u16 WCID, u8 *pAddr) { unsigned long offset; @@ -2163,11 +2163,11 @@ void AsicUpdateRxWCIDTable(IN PRTMP_ADAPTER pAd, For AP mode bTxKey must be always set to TRUE. ======================================================================== */ -void AsicAddKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddKeyEntry(struct rt_rtmp_adapter *pAd, u16 WCID, u8 BssIndex, u8 KeyIdx, - IN PCIPHER_KEY pCipherKey, + struct rt_cipher_key *pCipherKey, IN BOOLEAN bUsePairewiseKeyTable, IN BOOLEAN bTxKey) { unsigned long offset; @@ -2339,9 +2339,9 @@ void AsicAddKeyEntry(IN PRTMP_ADAPTER pAd, Return: ======================================================================== */ -void AsicAddPairwiseKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddPairwiseKeyEntry(struct rt_rtmp_adapter *pAd, u8 *pAddr, - u8 WCID, IN CIPHER_KEY * pCipherKey) + u8 WCID, struct rt_cipher_key *pCipherKey) { int i; unsigned long offset; @@ -2422,7 +2422,7 @@ void AsicAddPairwiseKeyEntry(IN PRTMP_ADAPTER pAd, Return: ======================================================================== */ -void AsicRemovePairwiseKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicRemovePairwiseKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIdx, u8 Wcid) { unsigned long WCIDAttri; @@ -2434,7 +2434,7 @@ void AsicRemovePairwiseKeyEntry(IN PRTMP_ADAPTER pAd, RTMP_IO_WRITE32(pAd, offset, WCIDAttri); } -BOOLEAN AsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, +BOOLEAN AsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, u8 Command, u8 Token, u8 Arg0, u8 Arg1) { @@ -2445,7 +2445,7 @@ BOOLEAN AsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, return TRUE; } -void AsicSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant) +void AsicSetRxAnt(struct rt_rtmp_adapter *pAd, u8 Ant) { #ifdef RT30xx /* RT3572 ATE need not to do this. */ @@ -2453,7 +2453,7 @@ void AsicSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant) #endif /* RT30xx // */ } -void AsicTurnOffRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) +void AsicTurnOffRFClk(struct rt_rtmp_adapter *pAd, u8 Channel) { if (pAd->chipOps.AsicRfTurnOff) { pAd->chipOps.AsicRfTurnOff(pAd); @@ -2461,7 +2461,7 @@ void AsicTurnOffRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) /* RF R2 bit 18 = 0 */ u32 R1 = 0, R2 = 0, R3 = 0; u8 index; - RTMP_RF_REGS *RFRegTable; + struct rt_rtmp_rf_regs *RFRegTable; RFRegTable = RF2850RegTable; @@ -2507,12 +2507,12 @@ void AsicTurnOffRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) } } -void AsicTurnOnRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) +void AsicTurnOnRFClk(struct rt_rtmp_adapter *pAd, u8 Channel) { /* RF R2 bit 18 = 0 */ u32 R1 = 0, R2 = 0, R3 = 0; u8 index; - RTMP_RF_REGS *RFRegTable; + struct rt_rtmp_rf_regs *RFRegTable; #ifdef PCIE_PS_SUPPORT /* The RF programming sequence is difference between 3xxx and 2xxx */ diff --git a/drivers/staging/rt2860/common/cmm_cfg.c b/drivers/staging/rt2860/common/cmm_cfg.c index 9c6b7cacb089..24f439378439 100644 --- a/drivers/staging/rt2860/common/cmm_cfg.c +++ b/drivers/staging/rt2860/common/cmm_cfg.c @@ -80,7 +80,7 @@ char *GetBW(int BW) TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetCountryRegion(IN PRTMP_ADAPTER pAd, char *arg, int band) +int RT_CfgSetCountryRegion(struct rt_rtmp_adapter *pAd, char *arg, int band) { long region, regionMax; u8 *pCountryRegion; @@ -126,7 +126,7 @@ int RT_CfgSetCountryRegion(IN PRTMP_ADAPTER pAd, char *arg, int band) TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetWirelessMode(IN PRTMP_ADAPTER pAd, char *arg) +int RT_CfgSetWirelessMode(struct rt_rtmp_adapter *pAd, char *arg) { int MaxPhyMode = PHY_11G; long WirelessMode; @@ -143,7 +143,7 @@ int RT_CfgSetWirelessMode(IN PRTMP_ADAPTER pAd, char *arg) } -int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg) +int RT_CfgSetShortSlot(struct rt_rtmp_adapter *pAd, char *arg) { long ShortSlot; @@ -167,9 +167,9 @@ int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg) TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd, +int RT_CfgSetWepKey(struct rt_rtmp_adapter *pAd, char *keyString, - IN CIPHER_KEY * pSharedKey, int keyIdx) + struct rt_cipher_key *pSharedKey, int keyIdx) { int KeyLen; int i; @@ -177,7 +177,7 @@ int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd, BOOLEAN bKeyIsHex = FALSE; /* TODO: Shall we do memset for the original key info?? */ - memset(pSharedKey, 0, sizeof(CIPHER_KEY)); + memset(pSharedKey, 0, sizeof(struct rt_cipher_key)); KeyLen = strlen(keyString); switch (KeyLen) { case 5: /*wep 40 Ascii type */ @@ -230,7 +230,7 @@ int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd, TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetWPAPSKKey(IN RTMP_ADAPTER * pAd, +int RT_CfgSetWPAPSKKey(struct rt_rtmp_adapter *pAd, char *keyString, u8 * pHashStr, int hashStrLen, u8 *pPMKBuf) diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c index 64b217710344..2d2c311bc7a4 100644 --- a/drivers/staging/rt2860/common/cmm_data.c +++ b/drivers/staging/rt2860/common/cmm_data.c @@ -104,7 +104,7 @@ QID_AC_VO, QID_AC_VO }; ======================================================================== */ -int MiniportMMRequest(IN PRTMP_ADAPTER pAd, +int MiniportMMRequest(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 *pData, u32 Length) { void *pPacket; @@ -242,13 +242,13 @@ int MiniportMMRequest(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmit(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; - PHEADER_802_11 pHeader_802_11; + struct rt_header_802_11 * pHeader_802_11; if ((pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE) ) { @@ -259,7 +259,7 @@ int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, if (pSrcBufVA == NULL) return NDIS_STATUS_FAILURE; - pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); + pHeader_802_11 = (struct rt_header_802_11 *) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); #ifdef RTMP_MAC_PCI if (pAd->MACVersion == 0x28600100) @@ -270,17 +270,17 @@ int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, } -int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmitMgmtRing(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; - PHEADER_802_11 pHeader_802_11; + struct rt_header_802_11 * pHeader_802_11; BOOLEAN bAckRequired, bInsertTimestamp; u8 MlmeRate; - PTXWI_STRUC pFirstTxWI; - MAC_TABLE_ENTRY *pMacEntry = NULL; + struct rt_txwi * pFirstTxWI; + struct rt_mac_table_entry *pMacEntry = NULL; u8 PID; RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pSrcBufVA, &SrcBufLen); @@ -299,8 +299,8 @@ int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, AsicForceWakeup(pAd, TRUE); } - pFirstTxWI = (PTXWI_STRUC) (pSrcBufVA + TXINFO_SIZE); - pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); /*TXWI_SIZE); */ + pFirstTxWI = (struct rt_txwi *) (pSrcBufVA + TXINFO_SIZE); + pHeader_802_11 = (struct rt_header_802_11 *) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); /*TXWI_SIZE); */ if (pHeader_802_11->Addr1[0] & 0x01) { MlmeRate = pAd->CommonCfg.BasicMlmeRate; @@ -506,11 +506,11 @@ int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, (2).Normal ======================================================================== */ -static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, void *pPacket) +static u8 TxPktClassification(struct rt_rtmp_adapter *pAd, void *pPacket) { u8 TxFrameType = TX_UNKOWN_FRAME; u8 Wcid; - MAC_TABLE_ENTRY *pMacEntry = NULL; + struct rt_mac_table_entry *pMacEntry = NULL; BOOLEAN bHTRate = FALSE; Wcid = RTMP_GET_PACKET_WCID(pPacket); @@ -554,11 +554,11 @@ static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, void *pPacket) return TxFrameType; } -BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) +BOOLEAN RTMP_FillTxBlkInfo(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; void *pPacket; - PMAC_TABLE_ENTRY pMacEntry = NULL; + struct rt_mac_table_entry *pMacEntry = NULL; pPacket = pTxBlk->pPacket; RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pTxBlk->pSrcBufHeader, @@ -662,8 +662,8 @@ BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) return TRUE; } -BOOLEAN CanDoAggregateTransmit(IN RTMP_ADAPTER * pAd, - char * pPacket, IN TX_BLK * pTxBlk) +BOOLEAN CanDoAggregateTransmit(struct rt_rtmp_adapter *pAd, + char * pPacket, struct rt_tx_blk *pTxBlk) { /*DBGPRINT(RT_DEBUG_TRACE, ("Check if can do aggregation! TxFrameType=%d!\n", pTxBlk->TxFrameType)); */ @@ -712,20 +712,20 @@ BOOLEAN CanDoAggregateTransmit(IN RTMP_ADAPTER * pAd, ======================================================================== */ -void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /* BulkOutPipeId */ +void RTMPDeQueuePacket(struct rt_rtmp_adapter *pAd, IN BOOLEAN bIntContext, u8 QIdx, /* BulkOutPipeId */ u8 Max_Tx_Packets) { - PQUEUE_ENTRY pEntry = NULL; + struct rt_queue_entry *pEntry = NULL; void *pPacket; int Status = NDIS_STATUS_SUCCESS; u8 Count = 0; - PQUEUE_HEADER pQueue; + struct rt_queue_header *pQueue; unsigned long FreeNumber[NUM_OF_TX_RING]; u8 QueIdx, sQIdx, eQIdx; unsigned long IrqFlags = 0; BOOLEAN hasTxDesc = FALSE; - TX_BLK TxBlk; - TX_BLK *pTxBlk; + struct rt_tx_blk TxBlk; + struct rt_tx_blk *pTxBlk; if (QIdx == NUM_OF_TX_RING) { sQIdx = 0; @@ -780,7 +780,7 @@ void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /* } pTxBlk = &TxBlk; - NdisZeroMemory((u8 *)pTxBlk, sizeof(TX_BLK)); + NdisZeroMemory((u8 *)pTxBlk, sizeof(struct rt_tx_blk)); /*InitializeQueueHeader(&pTxBlk->TxPacketList); // Didn't need it because we already memzero it. */ pTxBlk->QueIdx = QueIdx; @@ -908,7 +908,7 @@ void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /* ======================================================================== */ -u16 RTMPCalcDuration(IN PRTMP_ADAPTER pAd, u8 Rate, unsigned long Size) +u16 RTMPCalcDuration(struct rt_rtmp_adapter *pAd, u8 Rate, unsigned long Size) { unsigned long Duration = 0; @@ -968,7 +968,7 @@ u16 RTMPCalcDuration(IN PRTMP_ADAPTER pAd, u8 Rate, unsigned long Size) ======================================================================== */ -void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pOutTxWI, IN BOOLEAN FRAG, IN BOOLEAN CFACK, IN BOOLEAN InsTimestamp, IN BOOLEAN AMPDU, IN BOOLEAN Ack, IN BOOLEAN NSeq, /* HW new a sequence. */ +void RTMPWriteTxWI(struct rt_rtmp_adapter *pAd, struct rt_txwi * pOutTxWI, IN BOOLEAN FRAG, IN BOOLEAN CFACK, IN BOOLEAN InsTimestamp, IN BOOLEAN AMPDU, IN BOOLEAN Ack, IN BOOLEAN NSeq, /* HW new a sequence. */ u8 BASize, u8 WCID, unsigned long Length, @@ -978,9 +978,9 @@ void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pOutTxWI, IN BOOLEAN FRA u8 Txopmode, IN BOOLEAN CfAck, IN HTTRANSMIT_SETTING * pTransmit) { - PMAC_TABLE_ENTRY pMac = NULL; - TXWI_STRUC TxWI; - PTXWI_STRUC pTxWI; + struct rt_mac_table_entry *pMac = NULL; + struct rt_txwi TxWI; + struct rt_txwi * pTxWI; if (WCID < MAX_LEN_OF_MAC_TABLE) pMac = &pAd->MacTab.Content[WCID]; @@ -1053,14 +1053,14 @@ void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pOutTxWI, IN BOOLEAN FRA } pTxWI->PacketId = pTxWI->MCS; - NdisMoveMemory(pOutTxWI, &TxWI, sizeof(TXWI_STRUC)); + NdisMoveMemory(pOutTxWI, &TxWI, sizeof(struct rt_txwi)); } -void RTMPWriteTxWI_Data(IN PRTMP_ADAPTER pAd, - IN OUT PTXWI_STRUC pTxWI, IN TX_BLK * pTxBlk) +void RTMPWriteTxWI_Data(struct rt_rtmp_adapter *pAd, + struct rt_txwi * pTxWI, struct rt_tx_blk *pTxBlk) { HTTRANSMIT_SETTING *pTransmit; - PMAC_TABLE_ENTRY pMacEntry; + struct rt_mac_table_entry *pMacEntry; u8 BASize; ASSERT(pTxWI); @@ -1134,11 +1134,11 @@ void RTMPWriteTxWI_Data(IN PRTMP_ADAPTER pAd, pTxWI->PacketId = pTxWI->MCS; } -void RTMPWriteTxWI_Cache(IN PRTMP_ADAPTER pAd, - IN OUT PTXWI_STRUC pTxWI, IN TX_BLK * pTxBlk) +void RTMPWriteTxWI_Cache(struct rt_rtmp_adapter *pAd, + struct rt_txwi * pTxWI, struct rt_tx_blk *pTxBlk) { PHTTRANSMIT_SETTING /*pTxHTPhyMode, */ pTransmit; - PMAC_TABLE_ENTRY pMacEntry; + struct rt_mac_table_entry *pMacEntry; /* */ /* update TXWI */ @@ -1194,7 +1194,7 @@ void RTMPWriteTxWI_Cache(IN PRTMP_ADAPTER pAd, /* 2. AGGREGATION_IN_USED */ /* 3. Fragmentation not in used */ /* 4. either no previous frame (pPrevAddr1=NULL) .OR. previoud frame is aggregatible */ -BOOLEAN TxFrameIsAggregatible(IN PRTMP_ADAPTER pAd, +BOOLEAN TxFrameIsAggregatible(struct rt_rtmp_adapter *pAd, u8 *pPrevAddr1, u8 *p8023hdr) { @@ -1230,8 +1230,8 @@ BOOLEAN TxFrameIsAggregatible(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN PeerIsAggreOn(IN PRTMP_ADAPTER pAd, - unsigned long TxRate, IN PMAC_TABLE_ENTRY pMacEntry) +BOOLEAN PeerIsAggreOn(struct rt_rtmp_adapter *pAd, + unsigned long TxRate, struct rt_mac_table_entry *pMacEntry) { unsigned long AFlags = (fCLIENT_STATUS_AMSDU_INUSED | fCLIENT_STATUS_AGGREGATION_CAPABLE); @@ -1269,7 +1269,7 @@ BOOLEAN PeerIsAggreOn(IN PRTMP_ADAPTER pAd, ======================================================================== */ -PQUEUE_HEADER RTMPCheckTxSwQueue(IN PRTMP_ADAPTER pAd, u8 *pQueIdx) +struct rt_queue_header *RTMPCheckTxSwQueue(struct rt_rtmp_adapter *pAd, u8 *pQueIdx) { unsigned long Number; @@ -1317,7 +1317,7 @@ PQUEUE_HEADER RTMPCheckTxSwQueue(IN PRTMP_ADAPTER pAd, u8 *pQueIdx) ======================================================================== */ -void RTMPSuspendMsduTransmission(IN PRTMP_ADAPTER pAd) +void RTMPSuspendMsduTransmission(struct rt_rtmp_adapter *pAd) { DBGPRINT(RT_DEBUG_TRACE, ("SCANNING, suspend MSDU transmission ...\n")); @@ -1354,7 +1354,7 @@ void RTMPSuspendMsduTransmission(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd) +void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd) { /* u8 IrqState; */ @@ -1379,13 +1379,13 @@ void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd) RTMPDeQueuePacket(pAd, FALSE, NUM_OF_TX_RING, MAX_TX_PROCESS); } -u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, +u32 deaggregate_AMSDU_announce(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pData, unsigned long DataSize) { u16 PayloadSize; u16 SubFrameSize; - PHEADER_802_3 pAMSDUsubheader; + struct rt_header_802_3 * pAMSDUsubheader; u32 nMSDU; u8 Header802_3[14]; @@ -1399,7 +1399,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, nMSDU++; /*hex_dump("subheader", pData, 64); */ - pAMSDUsubheader = (PHEADER_802_3) pData; + pAMSDUsubheader = (struct rt_header_802_3 *) pData; /*pData += LENGTH_802_3; */ PayloadSize = pAMSDUsubheader->Octet[1] + @@ -1421,8 +1421,8 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, if ((Header802_3[12] == 0x88) && (Header802_3[13] == 0x8E)) { /* avoid local heap overflow, use dyanamic allocation */ - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { memmove(Elem->Msg + @@ -1479,7 +1479,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, return nMSDU; } -u32 BA_Reorder_AMSDU_Annnounce(IN PRTMP_ADAPTER pAd, void *pPacket) +u32 BA_Reorder_AMSDU_Annnounce(struct rt_rtmp_adapter *pAd, void *pPacket) { u8 *pData; u16 DataSize; @@ -1501,10 +1501,10 @@ u32 BA_Reorder_AMSDU_Annnounce(IN PRTMP_ADAPTER pAd, void *pPacket) pEntry - pointer to the MAC entry; NULL is not found ========================================================================== */ -MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, u8 *pAddr) +struct rt_mac_table_entry *MacTableLookup(struct rt_rtmp_adapter *pAd, u8 *pAddr) { unsigned long HashIdx; - MAC_TABLE_ENTRY *pEntry = NULL; + struct rt_mac_table_entry *pEntry = NULL; HashIdx = MAC_ADDR_HASH_INDEX(pAddr); pEntry = pAd->MacTab.Hash[HashIdx]; @@ -1521,13 +1521,13 @@ MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, u8 *pAddr) return pEntry; } -MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd, +struct rt_mac_table_entry *MacTableInsertEntry(struct rt_rtmp_adapter *pAd, u8 *pAddr, u8 apidx, IN BOOLEAN CleanAll) { u8 HashIdx; int i, FirstWcid; - MAC_TABLE_ENTRY *pEntry = NULL, *pCurrEntry; + struct rt_mac_table_entry *pEntry = NULL, *pCurrEntry; /* u16 offset; */ /* unsigned long addr; */ @@ -1554,7 +1554,7 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd, if (CleanAll == TRUE) { pEntry->MaxSupportedRate = RATE_11; pEntry->CurrTxRate = RATE_11; - NdisZeroMemory(pEntry, sizeof(MAC_TABLE_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_mac_table_entry)); pEntry->PairwiseKey.KeyLen = 0; pEntry->PairwiseKey.CipherAlg = CIPHER_NONE; } @@ -1658,11 +1658,11 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd, Delete a specified client from MAC table ========================================================================== */ -BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, +BOOLEAN MacTableDeleteEntry(struct rt_rtmp_adapter *pAd, u16 wcid, u8 *pAddr) { u16 HashIdx; - MAC_TABLE_ENTRY *pEntry, *pPrevEntry, *pProbeEntry; + struct rt_mac_table_entry *pEntry, *pPrevEntry, *pProbeEntry; BOOLEAN Cancelled; /*u16 offset; // unused variable */ /*u8 j; // unused variable */ @@ -1722,7 +1722,7 @@ BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, EAPOL_START_DISABLE; } - NdisZeroMemory(pEntry, sizeof(MAC_TABLE_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_mac_table_entry)); pAd->MacTab.Size--; DBGPRINT(RT_DEBUG_TRACE, ("MacTableDeleteEntry1 - Total= %d\n", @@ -1752,7 +1752,7 @@ BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, the power-saving queues are freed here. ========================================================================== */ -void MacTableReset(IN PRTMP_ADAPTER pAd) +void MacTableReset(struct rt_rtmp_adapter *pAd) { int i; @@ -1790,8 +1790,8 @@ void MacTableReset(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AssocParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_ASSOC_REQ_STRUCT * AssocReq, +void AssocParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_assoc_req *AssocReq, u8 *pAddr, u16 CapabilityInfo, unsigned long Timeout, u16 ListenIntv) @@ -1811,8 +1811,8 @@ void AssocParmFill(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void DisassocParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_DISASSOC_REQ_STRUCT * DisassocReq, +void DisassocParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_disassoc_req *DisassocReq, u8 *pAddr, u16 Reason) { COPY_MAC_ADDR(DisassocReq->Addr, pAddr); @@ -1853,9 +1853,9 @@ void DisassocParmFill(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, void *pPacket) +BOOLEAN RTMPCheckDHCPFrame(struct rt_rtmp_adapter *pAd, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; unsigned long NumberOfBytesRead = 0; unsigned long CurrentOffset = 0; void *pVirtualAddress = NULL; @@ -1908,7 +1908,7 @@ BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, void *pPacket) return TRUE; } -BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, void *pPacket) +BOOLEAN RTMPCheckEtherType(struct rt_rtmp_adapter *pAd, void *pPacket) { u16 TypeLen; u8 Byte0, Byte1; @@ -2010,8 +2010,8 @@ BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, void *pPacket) } -void Update_Rssi_Sample(IN PRTMP_ADAPTER pAd, - IN RSSI_SAMPLE * pRssi, IN PRXWI_STRUC pRxWI) +void Update_Rssi_Sample(struct rt_rtmp_adapter *pAd, + struct rt_rssi_sample *pRssi, struct rt_rxwi * pRxWI) { char rssi0 = pRxWI->RSSI0; char rssi1 = pRxWI->RSSI1; @@ -2040,8 +2040,8 @@ void Update_Rssi_Sample(IN PRTMP_ADAPTER pAd, } /* Normal legacy Rx packet indication */ -void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_Legacy_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { void *pRxPacket = pRxBlk->pRxPacket; u8 Header802_3[LENGTH_802_3]; @@ -2063,7 +2063,7 @@ void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, #ifdef RTMP_MAC_USB if (pAd->CommonCfg.bDisableReordering == 0) { - PBA_REC_ENTRY pBAEntry; + struct rt_ba_rec_entry *pBAEntry; unsigned long Now32; u8 Wcid = pRxBlk->pRxWI->WirelessCliID; u8 TID = pRxBlk->pRxWI->TID; @@ -2111,8 +2111,8 @@ void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, } /* Normal, AMPDU or AMSDU */ -void CmmRxnonRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void CmmRxnonRalinkFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { if (RX_BLK_TEST_FLAG(pRxBlk, fRX_AMPDU) && (pAd->CommonCfg.bDisableReordering == 0)) { @@ -2127,9 +2127,9 @@ void CmmRxnonRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, } } -void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void CmmRxRalinkFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { u8 Header802_3[LENGTH_802_3]; u16 Msdu2Size; @@ -2192,9 +2192,9 @@ void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, _fragFrame.Flags = 0; \ } -void *RTMPDeFragmentDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) +void *RTMPDeFragmentDataFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) { - PHEADER_802_11 pHeader = pRxBlk->pHeader; + struct rt_header_802_11 * pHeader = pRxBlk->pHeader; void *pRxPacket = pRxBlk->pRxPacket; u8 *pData = pRxBlk->pData; u16 DataSize = pRxBlk->DataSize; @@ -2283,7 +2283,7 @@ done: pRetPacket = pAd->FragFrame.pFragPacket; pAd->FragFrame.pFragPacket = pNewFragPacket; pRxBlk->pHeader = - (PHEADER_802_11) GET_OS_PKT_DATAPTR(pRetPacket); + (struct rt_header_802_11 *) GET_OS_PKT_DATAPTR(pRetPacket); pRxBlk->pData = (u8 *) pRxBlk->pHeader + HeaderRoom; pRxBlk->DataSize = pAd->FragFrame.RxSize - HeaderRoom; pRxBlk->pRxPacket = pRetPacket; @@ -2295,8 +2295,8 @@ done: return pRetPacket; } -void Indicate_AMSDU_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_AMSDU_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { u32 nMSDU; @@ -2307,10 +2307,10 @@ void Indicate_AMSDU_Packet(IN PRTMP_ADAPTER pAd, pRxBlk->DataSize); } -void Indicate_EAPOL_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_EAPOL_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { - MAC_TABLE_ENTRY *pEntry = NULL; + struct rt_mac_table_entry *pEntry = NULL; { pEntry = &pAd->MacTab.Content[BSSID_WCID]; @@ -2329,7 +2329,7 @@ void Indicate_EAPOL_Packet(IN PRTMP_ADAPTER pAd, } #define BCN_TBTT_OFFSET 64 /*defer 64 us */ -void ReSyncBeaconTime(IN PRTMP_ADAPTER pAd) +void ReSyncBeaconTime(struct rt_rtmp_adapter *pAd) { u32 Offset; diff --git a/drivers/staging/rt2860/common/cmm_data_pci.c b/drivers/staging/rt2860/common/cmm_data_pci.c index b2549473fa8b..e6cb55a1292e 100644 --- a/drivers/staging/rt2860/common/cmm_data_pci.c +++ b/drivers/staging/rt2860/common/cmm_data_pci.c @@ -32,16 +32,16 @@ */ #include "../rt_config.h" -u16 RtmpPCI_WriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHeaderLen; /* */ @@ -73,7 +73,7 @@ u16 RtmpPCI_WriteTxResource(IN PRTMP_ADAPTER pAd, /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); pTxD->SDPtr0 = BufBasePaLow; @@ -97,17 +97,17 @@ u16 RtmpPCI_WriteTxResource(IN PRTMP_ADAPTER pAd, return RetTxIdx; } -u16 RtmpPCI_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteSingleTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHeaderLen; /* */ @@ -132,7 +132,7 @@ u16 RtmpPCI_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, /* */ /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); pTxD->SDPtr0 = BufBasePaLow; @@ -156,16 +156,16 @@ u16 RtmpPCI_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, return RetTxIdx; } -u16 RtmpPCI_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteMultiTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 frameNum, u16 * FreeNumber) { BOOLEAN bIsLast; u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHdrLen; u32 firstDMALen; @@ -210,7 +210,7 @@ u16 RtmpPCI_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, /* */ /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); pTxD->SDPtr0 = BufBasePaLow; @@ -235,28 +235,28 @@ u16 RtmpPCI_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, } -void RtmpPCI_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +void RtmpPCI_FinalWriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u16 totalMPDUSize, u16 FirstTxIdx) { - PTXWI_STRUC pTxWI; - PRTMP_TX_RING pTxRing; + struct rt_txwi * pTxWI; + struct rt_rtmp_tx_ring *pTxRing; /* */ /* get Tx Ring Resource */ /* */ pTxRing = &pAd->TxRing[pTxBlk->QueIdx]; - pTxWI = (PTXWI_STRUC) pTxRing->Cell[FirstTxIdx].DmaBuf.AllocVa; + pTxWI = (struct rt_txwi *) pTxRing->Cell[FirstTxIdx].DmaBuf.AllocVa; pTxWI->MPDUtotalByteCount = totalMPDUSize; } -void RtmpPCIDataLastTxIdx(IN PRTMP_ADAPTER pAd, +void RtmpPCIDataLastTxIdx(struct rt_rtmp_adapter *pAd, u8 QueIdx, u16 LastTxIdx) { - PTXD_STRUC pTxD; - PRTMP_TX_RING pTxRing; + struct rt_txd * pTxD; + struct rt_rtmp_tx_ring *pTxRing; /* */ /* get Tx Ring Resource */ @@ -266,21 +266,21 @@ void RtmpPCIDataLastTxIdx(IN PRTMP_ADAPTER pAd, /* */ /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[LastTxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[LastTxIdx].AllocVa; pTxD->LastSec1 = 1; } -u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteFragTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 fragNum, u16 * FreeNumber) { u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHeaderLen; u32 firstDMALen; @@ -305,7 +305,7 @@ u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, /* */ /* Build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); if (fragNum == pTxBlk->TotalFragNum) { @@ -341,15 +341,15 @@ u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, Must be run in Interrupt context This function handle PCI specific TxDesc and cpu index update and kick the packet out. */ -int RtmpPCIMgmtKickOut(IN RTMP_ADAPTER * pAd, +int RtmpPCIMgmtKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket, u8 *pSrcBufVA, u32 SrcBufLen) { - PTXD_STRUC pTxD; + struct rt_txd * pTxD; unsigned long SwIdx = pAd->MgmtRing.TxCpuIdx; - pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[SwIdx].AllocVa; + pTxD = (struct rt_txd *) pAd->MgmtRing.Cell[SwIdx].AllocVa; pAd->MgmtRing.Cell[SwIdx].pNdisPacket = pPacket; pAd->MgmtRing.Cell[SwIdx].pNextNdisPacket = NULL; @@ -405,11 +405,11 @@ int RtmpPCIMgmtKickOut(IN RTMP_ADAPTER * pAd, ======================================================================== */ -int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHeader, - IN PRXWI_STRUC pRxWI, IN PRT28XX_RXD_STRUC pRxD) +int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHeader, + struct rt_rxwi * pRxWI, IN PRT28XX_RXD_STRUC pRxD) { - PCIPHER_KEY pWpaKey; + struct rt_cipher_key *pWpaKey; int dBm; /* Phy errors & CRC errors */ @@ -516,13 +516,13 @@ int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, return (NDIS_STATUS_SUCCESS); } -BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) +BOOLEAN RTMPFreeTXDUponTxDmaDone(struct rt_rtmp_adapter *pAd, u8 QueIdx) { - PRTMP_TX_RING pTxRing; - PTXD_STRUC pTxD; + struct rt_rtmp_tx_ring *pTxRing; + struct rt_txd * pTxD; void *pPacket; u8 FREE = 0; - TXD_STRUC TxD, *pOriTxD; + struct rt_txd TxD, *pOriTxD; /*unsigned long IrqFlags; */ BOOLEAN bReschedule = FALSE; @@ -541,9 +541,9 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) /* Note : If (pAd->ate.bQATxStart == TRUE), we will never reach here. */ FREE++; pTxD = - (PTXD_STRUC) (pTxRing->Cell[pTxRing->TxSwFreeIdx].AllocVa); + (struct rt_txd *) (pTxRing->Cell[pTxRing->TxSwFreeIdx].AllocVa); pOriTxD = pTxD; - NdisMoveMemory(&TxD, pTxD, sizeof(TXD_STRUC)); + NdisMoveMemory(&TxD, pTxD, sizeof(struct rt_txd)); pTxD = &TxD; pTxD->DMADONE = 0; @@ -584,7 +584,7 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) /* get tx_tdx_idx again */ RTMP_IO_READ32(pAd, TX_DTX_IDX0 + QueIdx * RINGREG_DIFF, &pTxRing->TxDmaIdx); - NdisMoveMemory(pOriTxD, pTxD, sizeof(TXD_STRUC)); + NdisMoveMemory(pOriTxD, pTxD, sizeof(struct rt_txd)); /* RTMP_IRQ_UNLOCK(&pAd->irq_lock, IrqFlags); */ } @@ -609,7 +609,7 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) ======================================================================== */ -BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd, INT_SOURCE_CSR_STRUC TxRingBitmap) { /* u8 Count = 0; */ @@ -661,13 +661,13 @@ BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandleMgmtRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd) { - PTXD_STRUC pTxD; + struct rt_txd * pTxD; void *pPacket; /* int i; */ u8 FREE = 0; - PRTMP_MGMT_RING pMgmtRing = &pAd->MgmtRing; + struct rt_rtmp_mgmt_ring *pMgmtRing = &pAd->MgmtRing; NdisAcquireSpinLock(&pAd->MgmtRingLock); @@ -675,7 +675,7 @@ void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd) while (pMgmtRing->TxSwFreeIdx != pMgmtRing->TxDmaIdx) { FREE++; pTxD = - (PTXD_STRUC) (pMgmtRing->Cell[pAd->MgmtRing.TxSwFreeIdx]. + (struct rt_txd *) (pMgmtRing->Cell[pAd->MgmtRing.TxSwFreeIdx]. AllocVa); pTxD->DMADONE = 0; pPacket = pMgmtRing->Cell[pMgmtRing->TxSwFreeIdx].pNdisPacket; @@ -713,7 +713,7 @@ void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPHandleTBTTInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandleTBTTInterrupt(struct rt_rtmp_adapter *pAd) { { if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) { @@ -732,7 +732,7 @@ void RTMPHandleTBTTInterrupt(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPHandlePreTBTTInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandlePreTBTTInterrupt(struct rt_rtmp_adapter *pAd) { { if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) { @@ -743,7 +743,7 @@ void RTMPHandlePreTBTTInterrupt(IN PRTMP_ADAPTER pAd) } -void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandleRxCoherentInterrupt(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; @@ -773,18 +773,18 @@ void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd) DBGPRINT(RT_DEBUG_TRACE, ("<== RTMPHandleRxCoherentInterrupt \n")); } -void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, +void *GetPacketFromRxRing(struct rt_rtmp_adapter *pAd, OUT PRT28XX_RXD_STRUC pSaveRxD, OUT BOOLEAN * pbReschedule, IN u32 * pRxPending) { - PRXD_STRUC pRxD; + struct rt_rxd * pRxD; void *pRxPacket = NULL; void *pNewPacket; void *AllocVa; dma_addr_t AllocPa; BOOLEAN bReschedule = FALSE; - RTMP_DMACB *pRxCell; + struct rt_rtmp_dmacb *pRxCell; RTMP_SEM_LOCK(&pAd->RxRingLock); @@ -811,7 +811,7 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, pRxCell = &pAd->RxRing.Cell[pAd->RxRing.RxSwReadIdx]; /* Point to Rx indexed rx ring descriptor */ - pRxD = (PRXD_STRUC) pRxCell->AllocVa; + pRxD = (struct rt_rxd *) pRxCell->AllocVa; if (pRxD->DDONE == 0) { *pRxPending = 0; @@ -864,24 +864,24 @@ done: return pRxPacket; } -int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmitTxRing(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; - PTXD_STRUC pTxD; - PHEADER_802_11 pHeader_802_11; + struct rt_txd * pTxD; + struct rt_header_802_11 * pHeader_802_11; BOOLEAN bAckRequired, bInsertTimestamp; unsigned long SrcBufPA; /*u8 TxBufIdx; */ u8 MlmeRate; unsigned long SwIdx = pAd->TxRing[QueIdx].TxCpuIdx; - PTXWI_STRUC pFirstTxWI; + struct rt_txwi * pFirstTxWI; /*unsigned long i; */ /*HTTRANSMIT_SETTING MlmeTransmit; //Rate for this MGMT frame. */ unsigned long FreeNum; - MAC_TABLE_ENTRY *pMacEntry = NULL; + struct rt_mac_table_entry *pMacEntry = NULL; RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pSrcBufVA, &SrcBufLen); @@ -901,7 +901,7 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, SwIdx = pAd->TxRing[QueIdx].TxCpuIdx; - pTxD = (PTXD_STRUC) pAd->TxRing[QueIdx].Cell[SwIdx].AllocVa; + pTxD = (struct rt_txd *) pAd->TxRing[QueIdx].Cell[SwIdx].AllocVa; if (pAd->TxRing[QueIdx].Cell[SwIdx].pNdisPacket) { DBGPRINT(RT_DEBUG_OFF, ("MlmeHardTransmit Error\n")); @@ -915,9 +915,9 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) AsicForceWakeup(pAd, TRUE); } - pFirstTxWI = (PTXWI_STRUC) pSrcBufVA; + pFirstTxWI = (struct rt_txwi *) pSrcBufVA; - pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXWI_SIZE); + pHeader_802_11 = (struct rt_header_802_11 *) (pSrcBufVA + TXWI_SIZE); if (pHeader_802_11->Addr1[0] & 0x01) { MlmeRate = pAd->CommonCfg.BasicMlmeRate; } else { @@ -1040,7 +1040,7 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, return NDIS_STATUS_SUCCESS; } -int MlmeDataHardTransmit(IN PRTMP_ADAPTER pAd, +int MlmeDataHardTransmit(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { if ((pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE) @@ -1078,8 +1078,8 @@ int MlmeDataHardTransmit(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPWriteTxDescriptor(IN PRTMP_ADAPTER pAd, - IN PTXD_STRUC pTxD, +void RTMPWriteTxDescriptor(struct rt_rtmp_adapter *pAd, + struct rt_txd * pTxD, IN BOOLEAN bWIV, u8 QueueSEL) { /* */ diff --git a/drivers/staging/rt2860/common/cmm_data_usb.c b/drivers/staging/rt2860/common/cmm_data_usb.c index f3a7208e043e..7c56c2f51987 100644 --- a/drivers/staging/rt2860/common/cmm_data_usb.c +++ b/drivers/staging/rt2860/common/cmm_data_usb.c @@ -41,9 +41,9 @@ => => */ -static inline int RtmpUSBCanDoWrite(IN RTMP_ADAPTER * pAd, +static inline int RtmpUSBCanDoWrite(struct rt_rtmp_adapter *pAd, u8 QueIdx, - IN HT_TX_CONTEXT * pHTTXContext) + struct rt_ht_tx_context *pHTTXContext) { int canWrite = NDIS_STATUS_RESOURCES; @@ -68,8 +68,8 @@ static inline int RtmpUSBCanDoWrite(IN RTMP_ADAPTER * pAd, return canWrite; } -u16 RtmpUSB_WriteSubTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteSubTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { @@ -78,15 +78,15 @@ u16 RtmpUSB_WriteSubTxResource(IN PRTMP_ADAPTER pAd, } -u16 RtmpUSB_WriteFragTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteFragTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 fragNum, u16 * FreeNumber) { - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u16 hwHdrLen; /* The hwHdrLen consist of 802.11 header length plus the header padding length. */ u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u8 *pWirelessPacket = NULL; u8 QueIdx; int Status; @@ -147,8 +147,8 @@ u16 RtmpUSB_WriteFragTxResource(IN PRTMP_ADAPTER pAd, } NdisZeroMemory((u8 *)(&pTxBlk->HeaderBuf[0]), TXINFO_SIZE); - pTxInfo = (PTXINFO_STRUC) (&pTxBlk->HeaderBuf[0]); - pTxWI = (PTXWI_STRUC) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); + pTxInfo = (struct rt_txinfo *)(&pTxBlk->HeaderBuf[0]); + pTxWI = (struct rt_txwi *) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); pWirelessPacket = &pHTTXContext->TransferBuffer->field.WirelessPacket[fillOffset]; @@ -215,16 +215,16 @@ u16 RtmpUSB_WriteFragTxResource(IN PRTMP_ADAPTER pAd, } -u16 RtmpUSB_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteSingleTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u16 hwHdrLen; u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u8 *pWirelessPacket; u8 QueIdx; unsigned long IrqFlags; @@ -249,8 +249,8 @@ u16 RtmpUSB_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, if (Status == NDIS_STATUS_SUCCESS) { pHTTXContext->bCurWriting = TRUE; - pTxInfo = (PTXINFO_STRUC) (&pTxBlk->HeaderBuf[0]); - pTxWI = (PTXWI_STRUC) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); + pTxInfo = (struct rt_txinfo *)(&pTxBlk->HeaderBuf[0]); + pTxWI = (struct rt_txwi *) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); /* Reserve space for 8 bytes padding. */ if ((pHTTXContext->ENextBulkOutPosition == @@ -328,15 +328,15 @@ u16 RtmpUSB_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, } -u16 RtmpUSB_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteMultiTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 frameNum, u16 * FreeNumber) { - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u16 hwHdrLen; /* The hwHdrLen consist of 802.11 header length plus the header padding length. */ u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u8 *pWirelessPacket = NULL; u8 QueIdx; int Status; @@ -357,8 +357,8 @@ u16 RtmpUSB_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, if (Status == NDIS_STATUS_SUCCESS) { pHTTXContext->bCurWriting = TRUE; - pTxInfo = (PTXINFO_STRUC) (&pTxBlk->HeaderBuf[0]); - pTxWI = (PTXWI_STRUC) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); + pTxInfo = (struct rt_txinfo *)(&pTxBlk->HeaderBuf[0]); + pTxWI = (struct rt_txwi *) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); /* Reserve space for 8 bytes padding. */ if ((pHTTXContext->ENextBulkOutPosition == @@ -467,15 +467,15 @@ done: } -void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +void RtmpUSB_FinalWriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u16 totalMPDUSize, u16 TxIdx) { u8 QueIdx; - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u32 USBDMApktLen, padding; unsigned long IrqFlags; u8 *pWirelessPacket; @@ -502,7 +502,7 @@ void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, /* Update TxInfo->USBDMApktLen , */ /* the length = TXWI_SIZE + 802.11_hdr + 802.11_hdr_pad + payload_of_all_batch_frames + Bulk-Out-padding */ /* */ - pTxInfo = (PTXINFO_STRUC) (pWirelessPacket); + pTxInfo = (struct rt_txinfo *)(pWirelessPacket); /* Calculate the bulk-out padding */ USBDMApktLen = pTxBlk->Priv - TXINFO_SIZE; @@ -514,7 +514,7 @@ void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, /* */ /* Update TXWI->MPDUtotalByteCount , */ /* the length = 802.11 header + payload_of_all_batch_frames */ - pTxWI = (PTXWI_STRUC) (pWirelessPacket + TXINFO_SIZE); + pTxWI = (struct rt_txwi *) (pWirelessPacket + TXINFO_SIZE); pTxWI->MPDUtotalByteCount = totalMPDUSize; /* */ @@ -547,7 +547,7 @@ void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, } -void RtmpUSBDataLastTxIdx(IN PRTMP_ADAPTER pAd, +void RtmpUSBDataLastTxIdx(struct rt_rtmp_adapter *pAd, u8 QueIdx, u16 TxIdx) { /* DO nothing for USB. */ @@ -561,8 +561,8 @@ void RtmpUSBDataLastTxIdx(IN PRTMP_ADAPTER pAd, Check if the CurWriting flag is FALSE, if it's FALSE, we can do kick out. */ -void RtmpUSBDataKickOut(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, u8 QueIdx) +void RtmpUSBDataKickOut(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 QueIdx) { RTUSB_SET_BULK_FLAG(pAd, (fRTUSB_BULK_OUT_DATA_NORMAL << QueIdx)); RTUSBKickBulkOut(pAd); @@ -573,21 +573,21 @@ void RtmpUSBDataKickOut(IN PRTMP_ADAPTER pAd, Must be run in Interrupt context This function handle RT2870 specific TxDesc and cpu index update and kick the packet out. */ -int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, +int RtmpUSBMgmtKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket, u8 *pSrcBufVA, u32 SrcBufLen) { - PTXINFO_STRUC pTxInfo; + struct rt_txinfo *pTxInfo; unsigned long BulkOutSize; u8 padLen; u8 *pDest; unsigned long SwIdx = pAd->MgmtRing.TxCpuIdx; - PTX_CONTEXT pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[SwIdx].AllocVa; + struct rt_tx_context *pMLMEContext = + (struct rt_tx_context *)pAd->MgmtRing.Cell[SwIdx].AllocVa; unsigned long IrqFlags; - pTxInfo = (PTXINFO_STRUC) (pSrcBufVA); + pTxInfo = (struct rt_txinfo *)(pSrcBufVA); /* Build our URB for USBD */ BulkOutSize = SrcBufLen; @@ -613,7 +613,7 @@ int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, pAd->MgmtRing.Cell[pAd->MgmtRing.TxCpuIdx].pNdisPacket = pPacket; pMLMEContext->TransferBuffer = - (PTX_BUFFER) (GET_OS_PKT_DATAPTR(pPacket)); + (struct rt_tx_buffer *)(GET_OS_PKT_DATAPTR(pPacket)); /* Length in TxInfo should be 8 less than bulkout size. */ pMLMEContext->BulkOutSize = BulkOutSize; @@ -642,14 +642,14 @@ int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, return 0; } -void RtmpUSBNullFrameKickOut(IN RTMP_ADAPTER * pAd, +void RtmpUSBNullFrameKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 * pNullFrame, u32 frameLen) { if (pAd->NullContext.InUse == FALSE) { - PTX_CONTEXT pNullContext; - PTXINFO_STRUC pTxInfo; - PTXWI_STRUC pTxWI; + struct rt_tx_context *pNullContext; + struct rt_txinfo *pTxInfo; + struct rt_txwi * pTxWI; u8 *pWirelessPkt; pNullContext = &(pAd->NullContext); @@ -661,19 +661,19 @@ void RtmpUSBNullFrameKickOut(IN RTMP_ADAPTER * pAd, WirelessPacket[0]; RTMPZeroMemory(&pWirelessPkt[0], 100); - pTxInfo = (PTXINFO_STRUC) & pWirelessPkt[0]; + pTxInfo = (struct rt_txinfo *)& pWirelessPkt[0]; RTMPWriteTxInfo(pAd, pTxInfo, - (u16)(sizeof(HEADER_802_11) + TXWI_SIZE), + (u16)(sizeof(struct rt_header_802_11) + TXWI_SIZE), TRUE, EpToQueue[MGMTPIPEIDX], FALSE, FALSE); pTxInfo->QSEL = FIFO_EDCA; - pTxWI = (PTXWI_STRUC) & pWirelessPkt[TXINFO_SIZE]; + pTxWI = (struct rt_txwi *) & pWirelessPkt[TXINFO_SIZE]; RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, - FALSE, 0, BSSID_WCID, (sizeof(HEADER_802_11)), 0, + FALSE, 0, BSSID_WCID, (sizeof(struct rt_header_802_11)), 0, 0, (u8)pAd->CommonCfg.MlmeTransmit.field.MCS, IFS_HTTXOP, FALSE, &pAd->CommonCfg.MlmeTransmit); RTMPMoveMemory(&pWirelessPkt[TXWI_SIZE + TXINFO_SIZE], - &pAd->NullFrame, sizeof(HEADER_802_11)); + &pAd->NullFrame, sizeof(struct rt_header_802_11)); pAd->NullContext.BulkOutSize = TXINFO_SIZE + TXWI_SIZE + sizeof(pAd->NullFrame) + 4; @@ -707,17 +707,17 @@ Return Value: Note: ======================================================================== */ -void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, +void *GetPacketFromRxRing(struct rt_rtmp_adapter *pAd, OUT PRT28XX_RXD_STRUC pSaveRxD, OUT BOOLEAN * pbReschedule, IN u32 * pRxPending) { - PRX_CONTEXT pRxContext; + struct rt_rx_context *pRxContext; void *pSkb; u8 *pData; unsigned long ThisFrameLen; unsigned long RxBufferLength; - PRXWI_STRUC pRxWI; + struct rt_rxwi * pRxWI; pRxContext = &pAd->RxContext[pAd->NextRxBulkInReadIndex]; if ((pRxContext->Readable == FALSE) || (pRxContext->InUse == TRUE)) @@ -725,8 +725,8 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, RxBufferLength = pRxContext->BulkInOffset - pAd->ReadPosition; if (RxBufferLength < - (RT2870_RXDMALEN_FIELD_SIZE + sizeof(RXWI_STRUC) + - sizeof(RXINFO_STRUC))) { + (RT2870_RXDMALEN_FIELD_SIZE + sizeof(struct rt_rxwi) + + sizeof(struct rt_rxinfo))) { goto label_null; } @@ -748,7 +748,7 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, goto label_null; } - if ((ThisFrameLen + 8) > RxBufferLength) /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(RXINFO_STRUC)) */ + if ((ThisFrameLen + 8) > RxBufferLength) /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(struct rt_rxinfo)) */ { DBGPRINT(RT_DEBUG_TRACE, ("BIRIdx(%d):FrameLen(0x%lx) outranges. BulkInLen=0x%lx, remaining RxBufLen=0x%lx, ReadPos=0x%lx\n", @@ -761,7 +761,7 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, } /* skip USB frame length field */ pData += RT2870_RXDMALEN_FIELD_SIZE; - pRxWI = (PRXWI_STRUC) pData; + pRxWI = (struct rt_rxwi *) pData; if (pRxWI->MPDUtotalByteCount > ThisFrameLen) { DBGPRINT(RT_DEBUG_ERROR, ("%s():pRxWIMPDUtotalByteCount(%d) large than RxDMALen(%ld)\n", @@ -783,10 +783,10 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, RTMP_SET_PACKET_SOURCE(OSPKT_TO_RTPKT(pSkb), PKTSRC_NDIS); /* copy RxD */ - *pSaveRxD = *(PRXINFO_STRUC) (pData + ThisFrameLen); + *pSaveRxD = *(struct rt_rxinfo *) (pData + ThisFrameLen); /* update next packet read position. */ - pAd->ReadPosition += (ThisFrameLen + RT2870_RXDMALEN_FIELD_SIZE + RXINFO_SIZE); /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(RXINFO_STRUC)) */ + pAd->ReadPosition += (ThisFrameLen + RT2870_RXDMALEN_FIELD_SIZE + RXINFO_SIZE); /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(struct rt_rxinfo)) */ return pSkb; @@ -812,11 +812,11 @@ label_null: ======================================================================== */ -int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHeader, - IN PRXWI_STRUC pRxWI, IN PRT28XX_RXD_STRUC pRxINFO) +int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHeader, + struct rt_rxwi * pRxWI, IN PRT28XX_RXD_STRUC pRxINFO) { - PCIPHER_KEY pWpaKey; + struct rt_cipher_key *pWpaKey; int dBm; if (pAd->bPromiscuous == TRUE) @@ -909,7 +909,7 @@ void RtmpUsbStaAsicForceWakeupTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; if (pAd && pAd->Mlme.AutoWakeupTimerRunning) { AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02); @@ -919,7 +919,7 @@ void RtmpUsbStaAsicForceWakeupTimeout(void *SystemSpecific1, } } -void RT28xxUsbStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) +void RT28xxUsbStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx) { BOOLEAN Canceled; @@ -931,7 +931,7 @@ void RT28xxUsbStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_DOZE); } -void RT28xxUsbStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void RT28xxUsbStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp) { diff --git a/drivers/staging/rt2860/common/cmm_info.c b/drivers/staging/rt2860/common/cmm_info.c index 21780578f556..25302e8363b9 100644 --- a/drivers/staging/rt2860/common/cmm_info.c +++ b/drivers/staging/rt2860/common/cmm_info.c @@ -47,7 +47,7 @@ ======================================================================== */ -void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates) +void RTMPSetDesiredRates(struct rt_rtmp_adapter *pAdapter, long Rates) { NDIS_802_11_RATES aryRates; @@ -235,7 +235,7 @@ void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates) ======================================================================== */ -void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd) +void RTMPWPARemoveAllKeys(struct rt_rtmp_adapter *pAd) { u8 i; @@ -262,7 +262,7 @@ void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd) DBGPRINT(RT_DEBUG_TRACE, ("remove %s key #%d\n", CipherName[pAd->SharedKey[BSS0][i].CipherAlg], i)); - NdisZeroMemory(&pAd->SharedKey[BSS0][i], sizeof(CIPHER_KEY)); + NdisZeroMemory(&pAd->SharedKey[BSS0][i], sizeof(struct rt_cipher_key)); AsicRemoveSharedKeyEntry(pAd, BSS0, i); } @@ -307,7 +307,7 @@ void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPSetPhyMode(IN PRTMP_ADAPTER pAd, unsigned long phymode) +void RTMPSetPhyMode(struct rt_rtmp_adapter *pAd, unsigned long phymode) { int i; /* the selected phymode must be supported by the RF IC encoded in E2PROM */ @@ -435,7 +435,7 @@ void RTMPSetPhyMode(IN PRTMP_ADAPTER pAd, unsigned long phymode) ======================================================================== */ -void RTMPSetHT(IN PRTMP_ADAPTER pAd, IN OID_SET_HT_PHYMODE * pHTPhyMode) +void RTMPSetHT(struct rt_rtmp_adapter *pAd, struct rt_oid_set_ht_phymode *pHTPhyMode) { /*unsigned long *pmcs; */ u32 Value = 0; @@ -648,9 +648,9 @@ void RTMPSetHT(IN PRTMP_ADAPTER pAd, IN OID_SET_HT_PHYMODE * pHTPhyMode) ======================================================================== */ -void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx) +void RTMPSetIndividualHT(struct rt_rtmp_adapter *pAd, u8 apidx) { - PRT_HT_PHY_INFO pDesired_ht_phy = NULL; + struct rt_ht_phy_info *pDesired_ht_phy = NULL; u8 TxStream = pAd->CommonCfg.TxStream; u8 DesiredMcs = MCS_AUTO; @@ -669,7 +669,7 @@ void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx) ("RTMPSetIndividualHT: invalid apidx(%d)\n", apidx)); return; } - RTMPZeroMemory(pDesired_ht_phy, sizeof(RT_HT_PHY_INFO)); + RTMPZeroMemory(pDesired_ht_phy, sizeof(struct rt_ht_phy_info)); DBGPRINT(RT_DEBUG_TRACE, ("RTMPSetIndividualHT : Desired MCS = %d\n", DesiredMcs)); @@ -755,13 +755,13 @@ void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx) ======================================================================== */ -void RTMPUpdateHTIE(IN RT_HT_CAPABILITY * pRtHt, +void RTMPUpdateHTIE(struct rt_ht_capability *pRtHt, u8 * pMcsSet, - OUT HT_CAPABILITY_IE * pHtCapability, - OUT ADD_HT_INFO_IE * pAddHtInfo) + struct rt_ht_capability_ie * pHtCapability, + struct rt_add_ht_info_ie * pAddHtInfo) { - RTMPZeroMemory(pHtCapability, sizeof(HT_CAPABILITY_IE)); - RTMPZeroMemory(pAddHtInfo, sizeof(ADD_HT_INFO_IE)); + RTMPZeroMemory(pHtCapability, sizeof(struct rt_ht_capability_ie)); + RTMPZeroMemory(pAddHtInfo, sizeof(struct rt_add_ht_info_ie)); pHtCapability->HtCapInfo.ChannelWidth = pRtHt->ChannelWidth; pHtCapability->HtCapInfo.MimoPs = pRtHt->MimoPs; @@ -790,10 +790,10 @@ void RTMPUpdateHTIE(IN RT_HT_CAPABILITY * pRtHt, Return: ======================================================================== */ -void RTMPAddWcidAttributeEntry(IN PRTMP_ADAPTER pAd, +void RTMPAddWcidAttributeEntry(struct rt_rtmp_adapter *pAd, u8 BssIdx, u8 KeyIdx, - u8 CipherAlg, IN MAC_TABLE_ENTRY * pEntry) + u8 CipherAlg, struct rt_mac_table_entry *pEntry) { u32 WCIDAttri = 0; u16 offset; @@ -914,9 +914,9 @@ char *GetAuthMode(char auth) return "UNKNOW"; } -int SetCommonHT(IN PRTMP_ADAPTER pAd) +int SetCommonHT(struct rt_rtmp_adapter *pAd) { - OID_SET_HT_PHYMODE SetHT; + struct rt_oid_set_ht_phymode SetHT; if (pAd->CommonCfg.PhyMode < PHY_11ABGN_MIXED) return FALSE; diff --git a/drivers/staging/rt2860/common/cmm_mac_pci.c b/drivers/staging/rt2860/common/cmm_mac_pci.c index f00534220562..11dfdc58c77b 100644 --- a/drivers/staging/rt2860/common/cmm_mac_pci.c +++ b/drivers/staging/rt2860/common/cmm_mac_pci.c @@ -48,18 +48,18 @@ ======================================================================== */ -int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) +int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) { int Status = NDIS_STATUS_SUCCESS; unsigned long RingBasePaHigh; unsigned long RingBasePaLow; void *RingBaseVa; int index, num; - PTXD_STRUC pTxD; - PRXD_STRUC pRxD; + struct rt_txd * pTxD; + struct rt_rxd * pRxD; unsigned long ErrorValue = 0; - PRTMP_TX_RING pTxRing; - PRTMP_DMABUF pDmaBuf; + struct rt_rtmp_tx_ring *pTxRing; + struct rt_rtmp_dmabuf *pDmaBuf; void *pPacket; /* PRTMP_REORDERBUF pReorderBuf; */ @@ -166,7 +166,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) /* link the pre-allocated TxBuf to TXD */ pTxD = - (PTXD_STRUC) pTxRing->Cell[index].AllocVa; + (struct rt_txd *) pTxRing->Cell[index].AllocVa; pTxD->SDPtr0 = BufBasePaLow; /* advance to next ring descriptor address */ pTxD->DMADONE = 1; @@ -231,7 +231,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) RingBaseVa = (u8 *)RingBaseVa + TXD_SIZE; /* link the pre-allocated TxBuf to TXD */ - pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[index].AllocVa; + pTxD = (struct rt_txd *) pAd->MgmtRing.Cell[index].AllocVa; pTxD->DMADONE = 1; /* no pre-allocated buffer required in MgmtRing for scatter-gather case */ @@ -312,7 +312,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) NdisZeroMemory(pDmaBuf->AllocVa, pDmaBuf->AllocSize); /* Write RxD buffer address & allocated buffer length */ - pRxD = (PRXD_STRUC) pAd->RxRing.Cell[index].AllocVa; + pRxD = (struct rt_rxd *) pAd->RxRing.Cell[index].AllocVa; pRxD->SDP0 = RTMP_GetPhysicalAddressLow(pDmaBuf->AllocPa); pRxD->DDONE = 0; @@ -324,7 +324,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) } while (FALSE); - NdisZeroMemory(&pAd->FragFrame, sizeof(FRAGMENT_FRAME)); + NdisZeroMemory(&pAd->FragFrame, sizeof(struct rt_fragment_frame)); pAd->FragFrame.pFragPacket = RTMP_AllocateFragPacketBuffer(pAd, RX_BUFFER_NORMSIZE); @@ -400,14 +400,14 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) +void RTMPRingCleanUp(struct rt_rtmp_adapter *pAd, u8 RingType) { - PTXD_STRUC pTxD; - PRXD_STRUC pRxD; - PQUEUE_ENTRY pEntry; + struct rt_txd * pTxD; + struct rt_rxd * pRxD; + struct rt_queue_entry *pEntry; void *pPacket; int i; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; unsigned long IrqFlags; /*u32 RxSwReadIdx; */ @@ -426,7 +426,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) /* We have to clean all descriptors in case some error happened with reset */ for (i = 0; i < TX_RING_SIZE; i++) /* We have to scan all TX ring */ { - pTxD = (PTXD_STRUC) pTxRing->Cell[i].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[i].AllocVa; pPacket = (void *)pTxRing->Cell[i].pNdisPacket; /* release scatter-and-gather char */ @@ -471,7 +471,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) NdisAcquireSpinLock(&pAd->MgmtRingLock); for (i = 0; i < MGMT_RING_SIZE; i++) { - pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[i].AllocVa; + pTxD = (struct rt_txd *) pAd->MgmtRing.Cell[i].AllocVa; pPacket = (void *)pAd->MgmtRing.Cell[i].pNdisPacket; @@ -514,7 +514,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) NdisAcquireSpinLock(&pAd->RxRingLock); for (i = 0; i < RX_RING_SIZE; i++) { - pRxD = (PRXD_STRUC) pAd->RxRing.Cell[i].AllocVa; + pRxD = (struct rt_rxd *) pAd->RxRing.Cell[i].AllocVa; pRxD->DDONE = 0; } @@ -533,11 +533,11 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) } } -void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) +void RTMPFreeTxRxRingMemory(struct rt_rtmp_adapter *pAd) { int index, num, j; - PRTMP_TX_RING pTxRing; - PTXD_STRUC pTxD; + struct rt_rtmp_tx_ring *pTxRing; + struct rt_txd * pTxD; void *pPacket; unsigned int IrqFlags; @@ -547,9 +547,9 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) /* Free TxSwQueue Packet */ for (index = 0; index < NUM_OF_TX_RING; index++) { - PQUEUE_ENTRY pEntry; + struct rt_queue_entry *pEntry; void *pPacket; - PQUEUE_HEADER pQueue; + struct rt_queue_header *pQueue; RTMP_IRQ_LOCK(&pAd->irq_lock, IrqFlags); pQueue = &pAd->TxSwQueue[index]; @@ -566,7 +566,7 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) pTxRing = &pAd->TxRing[index]; for (j = 0; j < TX_RING_SIZE; j++) { - pTxD = (PTXD_STRUC) (pTxRing->Cell[j].AllocVa); + pTxD = (struct rt_txd *) (pTxRing->Cell[j].AllocVa); pPacket = pTxRing->Cell[j].pNdisPacket; if (pPacket) { @@ -607,21 +607,21 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) NDIS_STATUS_SUCCESS); } } - NdisZeroMemory(pAd->RxRing.Cell, RX_RING_SIZE * sizeof(RTMP_DMACB)); + NdisZeroMemory(pAd->RxRing.Cell, RX_RING_SIZE * sizeof(struct rt_rtmp_dmacb)); if (pAd->RxDescRing.AllocVa) { RTMP_FreeDescMemory(pAd, pAd->RxDescRing.AllocSize, pAd->RxDescRing.AllocVa, pAd->RxDescRing.AllocPa); } - NdisZeroMemory(&pAd->RxDescRing, sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->RxDescRing, sizeof(struct rt_rtmp_dmabuf)); if (pAd->MgmtDescRing.AllocVa) { RTMP_FreeDescMemory(pAd, pAd->MgmtDescRing.AllocSize, pAd->MgmtDescRing.AllocVa, pAd->MgmtDescRing.AllocPa); } - NdisZeroMemory(&pAd->MgmtDescRing, sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->MgmtDescRing, sizeof(struct rt_rtmp_dmabuf)); for (num = 0; num < NUM_OF_TX_RING; num++) { if (pAd->TxBufSpace[num].AllocVa) { @@ -631,14 +631,14 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) pAd->TxBufSpace[num].AllocVa, pAd->TxBufSpace[num].AllocPa); } - NdisZeroMemory(&pAd->TxBufSpace[num], sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->TxBufSpace[num], sizeof(struct rt_rtmp_dmabuf)); if (pAd->TxDescRing[num].AllocVa) { RTMP_FreeDescMemory(pAd, pAd->TxDescRing[num].AllocSize, pAd->TxDescRing[num].AllocVa, pAd->TxDescRing[num].AllocPa); } - NdisZeroMemory(&pAd->TxDescRing[num], sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->TxDescRing[num], sizeof(struct rt_rtmp_dmabuf)); } if (pAd->FragFrame.pFragPacket) @@ -667,7 +667,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMADisable(IN RTMP_ADAPTER * pAd) +void RT28XXDMADisable(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; @@ -691,7 +691,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd) +void RT28XXDMAEnable(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; int i = 0; @@ -721,7 +721,7 @@ void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd) } -BOOLEAN AsicCheckCommanOk(IN PRTMP_ADAPTER pAd, u8 Command) +BOOLEAN AsicCheckCommanOk(struct rt_rtmp_adapter *pAd, u8 Command) { u32 CmdStatus = 0, CID = 0, i; u32 ThisCIDMask = 0; @@ -794,7 +794,7 @@ Return Value: Note: ======================================================================== */ -void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, +void RT28xx_UpdateBeaconToAsic(struct rt_rtmp_adapter *pAd, int apidx, unsigned long FrameLen, unsigned long UpdatePos) { @@ -853,7 +853,7 @@ void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, } -void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) +void RT28xxPciStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx) { AUTO_WAKEUP_STRUC AutoWakeupCfg; @@ -888,7 +888,7 @@ void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) /* add by johnli, RF power sequence setup, load RF normal operation-mode setup */ if ((IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd)) && IS_VERSION_AFTER_F(pAd)) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; if (pChipOps->AsicReverseRfFromSleepMode) pChipOps-> @@ -949,7 +949,7 @@ void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) DBGPRINT(RT_DEBUG_TRACE, ("<=======RT28xxPciStaAsicForceWakeup\n")); } -void RT28xxPciStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void RT28xxPciStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp) { BOOLEAN brc; @@ -1020,7 +1020,7 @@ void PsPollWakeExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; unsigned long flags; DBGPRINT(RT_DEBUG_TRACE, ("-->PsPollWakeExec \n")); @@ -1048,8 +1048,8 @@ void RadioOnExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; WPDMA_GLO_CFG_STRUC DmaCfg; BOOLEAN Cancelled; @@ -1164,7 +1164,7 @@ void RadioOnExec(void *SystemSpecific1, ========================================================================== */ -BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level) +BOOLEAN RT28xxPciAsicRadioOn(struct rt_rtmp_adapter *pAd, u8 Level) { /*WPDMA_GLO_CFG_STRUC DmaCfg; */ BOOLEAN Cancelled; @@ -1223,7 +1223,7 @@ BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level) /* add by johnli, RF power sequence setup, load RF normal operation-mode setup */ if ((IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd))) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; if (pChipOps->AsicReverseRfFromSleepMode) pChipOps->AsicReverseRfFromSleepMode(pAd); @@ -1286,7 +1286,7 @@ BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level) ========================================================================== */ -BOOLEAN RT28xxPciAsicRadioOff(IN PRTMP_ADAPTER pAd, +BOOLEAN RT28xxPciAsicRadioOff(struct rt_rtmp_adapter *pAd, u8 Level, u16 TbttNumToNextWakeUp) { WPDMA_GLO_CFG_STRUC DmaCfg; @@ -1497,7 +1497,7 @@ BOOLEAN RT28xxPciAsicRadioOff(IN PRTMP_ADAPTER pAd, return TRUE; } -void RT28xxPciMlmeRadioOn(IN PRTMP_ADAPTER pAd) +void RT28xxPciMlmeRadioOn(struct rt_rtmp_adapter *pAd) { if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF)) return; @@ -1546,7 +1546,7 @@ void RT28xxPciMlmeRadioOn(IN PRTMP_ADAPTER pAd) } } -void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd) +void RT28xxPciMlmeRadioOFF(struct rt_rtmp_adapter *pAd) { BOOLEAN brc = TRUE; @@ -1556,9 +1556,9 @@ void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd) /* Link down first if any association exists */ if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) { if (INFRA_ON(pAd) || ADHOC_ON(pAd)) { - MLME_DISASSOC_REQ_STRUCT DisReq; - MLME_QUEUE_ELEM *pMsgElem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_disassoc_req DisReq; + struct rt_mlme_queue_elem *pMsgElem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (pMsgElem) { @@ -1569,10 +1569,10 @@ void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd) pMsgElem->Machine = ASSOC_STATE_MACHINE; pMsgElem->MsgType = MT2_MLME_DISASSOC_REQ; pMsgElem->MsgLen = - sizeof(MLME_DISASSOC_REQ_STRUCT); + sizeof(struct rt_mlme_disassoc_req); NdisMoveMemory(pMsgElem->Msg, &DisReq, sizeof - (MLME_DISASSOC_REQ_STRUCT)); + (struct rt_mlme_disassoc_req)); MlmeDisassocReqAction(pAd, pMsgElem); kfree(pMsgElem); diff --git a/drivers/staging/rt2860/common/cmm_mac_usb.c b/drivers/staging/rt2860/common/cmm_mac_usb.c index 251debb67d7c..010c37c4c724 100644 --- a/drivers/staging/rt2860/common/cmm_mac_usb.c +++ b/drivers/staging/rt2860/common/cmm_mac_usb.c @@ -43,12 +43,12 @@ Return Value: Note: Initialize all receive releated private buffer, include those define - in RTMP_ADAPTER structure and all private data structures. The mahor + in struct rt_rtmp_adapter structure and all private data structures. The mahor work is to allocate buffer for each packet and chain buffer to NDIS packet descriptor. ======================================================================== */ -int NICInitRecv(IN PRTMP_ADAPTER pAd) +int NICInitRecv(struct rt_rtmp_adapter *pAd) { u8 i; int Status = NDIS_STATUS_SUCCESS; @@ -64,7 +64,7 @@ int NICInitRecv(IN PRTMP_ADAPTER pAd) pAd->NextRxBulkInPosition = 0; for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); /*Allocate URB */ pRxContext->pUrb = RTUSB_ALLOC_URB(0); @@ -98,7 +98,7 @@ int NICInitRecv(IN PRTMP_ADAPTER pAd) out1: for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); if (NULL != pRxContext->TransferBuffer) { RTUSB_URB_FREE_BUFFER(pObj->pUsb_Dev, MAX_RXBULK_SIZE, @@ -132,7 +132,7 @@ Return Value: Note: ======================================================================== */ -int NICInitTransmit(IN PRTMP_ADAPTER pAd) +int NICInitTransmit(struct rt_rtmp_adapter *pAd) { #define LM_USB_ALLOC(pObj, Context, TB_Type, BufferSize, Status, msg1, err1, msg2, err2) \ Context->pUrb = RTUSB_ALLOC_URB(0); \ @@ -161,15 +161,15 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) u8 i, acidx; int Status = NDIS_STATUS_SUCCESS; - PTX_CONTEXT pNullContext = &(pAd->NullContext); - PTX_CONTEXT pPsPollContext = &(pAd->PsPollContext); - PTX_CONTEXT pRTSContext = &(pAd->RTSContext); - PTX_CONTEXT pMLMEContext = NULL; -/* PHT_TX_CONTEXT pHTTXContext = NULL; */ + struct rt_tx_context *pNullContext = &(pAd->NullContext); + struct rt_tx_context *pPsPollContext = &(pAd->PsPollContext); + struct rt_tx_context *pRTSContext = &(pAd->RTSContext); + struct rt_tx_context *pMLMEContext = NULL; +/* struct rt_ht_tx_context *pHTTXContext = NULL; */ struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie; void *RingBaseVa; -/* RTMP_TX_RING *pTxRing; */ - RTMP_MGMT_RING *pMgmtRing; +/* struct rt_rtmp_tx_ring *pTxRing; */ + struct rt_rtmp_mgmt_ring *pMgmtRing; DBGPRINT(RT_DEBUG_TRACE, ("--> NICInitTransmit\n")); pObj = pObj; @@ -199,15 +199,15 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* TX_RING_SIZE, 4 ACs */ /* */ for (acidx = 0; acidx < 4; acidx++) { - PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]); + struct rt_ht_tx_context *pHTTXContext = &(pAd->TxContext[acidx]); - NdisZeroMemory(pHTTXContext, sizeof(HT_TX_CONTEXT)); + NdisZeroMemory(pHTTXContext, sizeof(struct rt_ht_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pHTTXContext, PHTTX_BUFFER, - sizeof(HTTX_BUFFER), Status, + LM_USB_ALLOC(pObj, pHTTXContext, struct rt_httx_buffer *, + sizeof(struct rt_httx_buffer), Status, ("<-- ERROR in Alloc TX TxContext[%d] urb!! \n", acidx), done, - ("<-- ERROR in Alloc TX TxContext[%d] HTTX_BUFFER !! \n", + ("<-- ERROR in Alloc TX TxContext[%d] struct rt_httx_buffer !! \n", acidx), out1); NdisZeroMemory(pHTTXContext->TransferBuffer-> @@ -232,7 +232,7 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* Allocate MGMT ring descriptor's memory */ pAd->MgmtDescRing.AllocSize = - MGMT_RING_SIZE * sizeof(TX_CONTEXT); + MGMT_RING_SIZE * sizeof(struct rt_tx_context); os_alloc_mem(pAd, (u8 **) (&pAd->MgmtDescRing.AllocVa), pAd->MgmtDescRing.AllocSize); if (pAd->MgmtDescRing.AllocVa == NULL) { @@ -248,14 +248,14 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) pMgmtRing = &pAd->MgmtRing; for (i = 0; i < MGMT_RING_SIZE; i++) { /* link the pre-allocated Mgmt buffer to MgmtRing.Cell */ - pMgmtRing->Cell[i].AllocSize = sizeof(TX_CONTEXT); + pMgmtRing->Cell[i].AllocSize = sizeof(struct rt_tx_context); pMgmtRing->Cell[i].AllocVa = RingBaseVa; pMgmtRing->Cell[i].pNdisPacket = NULL; pMgmtRing->Cell[i].pNextNdisPacket = NULL; /*Allocate URB for MLMEContext */ pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa; + (struct rt_tx_context *)pAd->MgmtRing.Cell[i].AllocVa; pMLMEContext->pUrb = RTUSB_ALLOC_URB(0); if (pMLMEContext->pUrb == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -274,7 +274,7 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) pMLMEContext->SelfIdx = i; /* Offset to next ring descriptor address */ - RingBaseVa = (u8 *)RingBaseVa + sizeof(TX_CONTEXT); + RingBaseVa = (u8 *)RingBaseVa + sizeof(struct rt_tx_context); } DBGPRINT(RT_DEBUG_TRACE, ("MGMT Ring: total %d entry allocated\n", i)); @@ -289,16 +289,16 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ for (i = 0; i < BEACON_RING_SIZE; i++) /* 2 */ { - PTX_CONTEXT pBeaconContext = &(pAd->BeaconContext[i]); + struct rt_tx_context *pBeaconContext = &(pAd->BeaconContext[i]); - NdisZeroMemory(pBeaconContext, sizeof(TX_CONTEXT)); + NdisZeroMemory(pBeaconContext, sizeof(struct rt_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pBeaconContext, PTX_BUFFER, - sizeof(TX_BUFFER), Status, + LM_USB_ALLOC(pObj, pBeaconContext, struct rt_tx_buffer *, + sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX BeaconContext[%d] urb!! \n", i), out2, - ("<-- ERROR in Alloc TX BeaconContext[%d] TX_BUFFER !! \n", + ("<-- ERROR in Alloc TX BeaconContext[%d] struct rt_tx_buffer !! \n", i), out3); pBeaconContext->pAd = pAd; @@ -310,14 +310,14 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ /* NullContext */ /* */ - NdisZeroMemory(pNullContext, sizeof(TX_CONTEXT)); + NdisZeroMemory(pNullContext, sizeof(struct rt_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pNullContext, PTX_BUFFER, sizeof(TX_BUFFER), + LM_USB_ALLOC(pObj, pNullContext, struct rt_tx_buffer *, sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX NullContext urb!! \n"), out3, - ("<-- ERROR in Alloc TX NullContext TX_BUFFER !! \n"), + ("<-- ERROR in Alloc TX NullContext struct rt_tx_buffer !! \n"), out4); pNullContext->pAd = pAd; @@ -328,14 +328,14 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ /* RTSContext */ /* */ - NdisZeroMemory(pRTSContext, sizeof(TX_CONTEXT)); + NdisZeroMemory(pRTSContext, sizeof(struct rt_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pRTSContext, PTX_BUFFER, sizeof(TX_BUFFER), + LM_USB_ALLOC(pObj, pRTSContext, struct rt_tx_buffer *, sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX RTSContext urb!! \n"), out4, - ("<-- ERROR in Alloc TX RTSContext TX_BUFFER !! \n"), + ("<-- ERROR in Alloc TX RTSContext struct rt_tx_buffer !! \n"), out5); pRTSContext->pAd = pAd; @@ -346,13 +346,13 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ /* PsPollContext */ /* */ - /*NdisZeroMemory(pPsPollContext, sizeof(TX_CONTEXT)); */ + /*NdisZeroMemory(pPsPollContext, sizeof(struct rt_tx_context)); */ /*Allocate URB */ - LM_USB_ALLOC(pObj, pPsPollContext, PTX_BUFFER, - sizeof(TX_BUFFER), Status, + LM_USB_ALLOC(pObj, pPsPollContext, struct rt_tx_buffer *, + sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX PsPollContext urb!! \n"), out5, - ("<-- ERROR in Alloc TX PsPollContext TX_BUFFER !! \n"), + ("<-- ERROR in Alloc TX PsPollContext struct rt_tx_buffer !! \n"), out6); pPsPollContext->pAd = pAd; @@ -371,19 +371,19 @@ done: /* --------------------------- ERROR HANDLE --------------------------- */ out6: - LM_URB_FREE(pObj, pPsPollContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pPsPollContext, sizeof(struct rt_tx_buffer)); out5: - LM_URB_FREE(pObj, pRTSContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pRTSContext, sizeof(struct rt_tx_buffer)); out4: - LM_URB_FREE(pObj, pNullContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pNullContext, sizeof(struct rt_tx_buffer)); out3: for (i = 0; i < BEACON_RING_SIZE; i++) { - PTX_CONTEXT pBeaconContext = &(pAd->BeaconContext[i]); + struct rt_tx_context *pBeaconContext = &(pAd->BeaconContext[i]); if (pBeaconContext) - LM_URB_FREE(pObj, pBeaconContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pBeaconContext, sizeof(struct rt_tx_buffer)); } out2: @@ -391,10 +391,10 @@ out2: pMgmtRing = &pAd->MgmtRing; for (i = 0; i < MGMT_RING_SIZE; i++) { pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa; + (struct rt_tx_context *)pAd->MgmtRing.Cell[i].AllocVa; if (pMLMEContext) LM_URB_FREE(pObj, pMLMEContext, - sizeof(TX_BUFFER)); + sizeof(struct rt_tx_buffer)); } os_free_mem(pAd, pAd->MgmtDescRing.AllocVa); pAd->MgmtDescRing.AllocVa = NULL; @@ -402,9 +402,9 @@ out2: out1: for (acidx = 0; acidx < 4; acidx++) { - PHT_TX_CONTEXT pTxContext = &(pAd->TxContext[acidx]); + struct rt_ht_tx_context *pTxContext = &(pAd->TxContext[acidx]); if (pTxContext) - LM_URB_FREE(pObj, pTxContext, sizeof(HTTX_BUFFER)); + LM_URB_FREE(pObj, pTxContext, sizeof(struct rt_httx_buffer)); } /* Here we didn't have any pre-allocated memory need to free. */ @@ -428,16 +428,16 @@ Return Value: Note: ======================================================================== */ -int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) +int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) { -/* COUNTER_802_11 pCounter = &pAd->WlanCounters; */ +/* struct rt_counter_802_11 pCounter = &pAd->WlanCounters; */ int Status; int num; DBGPRINT(RT_DEBUG_TRACE, ("--> RTMPAllocTxRxRingMemory\n")); do { - /* Init the CmdQ and CmdQLock */ + /* Init the struct rt_cmdq and CmdQLock */ NdisAllocateSpinLock(&pAd->CmdQLock); NdisAcquireSpinLock(&pAd->CmdQLock); RTUSBInitializeCmdQ(&pAd->CmdQ); @@ -490,7 +490,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) } while (FALSE); - NdisZeroMemory(&pAd->FragFrame, sizeof(FRAGMENT_FRAME)); + NdisZeroMemory(&pAd->FragFrame, sizeof(struct rt_fragment_frame)); pAd->FragFrame.pFragPacket = RTMP_AllocateFragPacketBuffer(pAd, RX_BUFFER_NORMSIZE); @@ -519,7 +519,7 @@ Return Value: Note: ======================================================================== */ -void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) +void RTMPFreeTxRxRingMemory(struct rt_rtmp_adapter *pAd) { #define LM_URB_FREE(pObj, Context, BufferSize) \ if (NULL != Context->pUrb) { \ @@ -533,45 +533,45 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) Context->TransferBuffer = NULL; } u32 i, acidx; - PTX_CONTEXT pNullContext = &pAd->NullContext; - PTX_CONTEXT pPsPollContext = &pAd->PsPollContext; - PTX_CONTEXT pRTSContext = &pAd->RTSContext; -/* PHT_TX_CONTEXT pHTTXContext; */ + struct rt_tx_context *pNullContext = &pAd->NullContext; + struct rt_tx_context *pPsPollContext = &pAd->PsPollContext; + struct rt_tx_context *pRTSContext = &pAd->RTSContext; +/* struct rt_ht_tx_context *pHTTXContext; */ /*PRTMP_REORDERBUF pReorderBuf; */ struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie; -/* RTMP_TX_RING *pTxRing; */ +/* struct rt_rtmp_tx_ring *pTxRing; */ DBGPRINT(RT_DEBUG_ERROR, ("---> RTMPFreeTxRxRingMemory\n")); pObj = pObj; /* Free all resources for the RECEIVE buffer queue. */ for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); if (pRxContext) LM_URB_FREE(pObj, pRxContext, MAX_RXBULK_SIZE); } /* Free PsPoll frame resource */ - LM_URB_FREE(pObj, pPsPollContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pPsPollContext, sizeof(struct rt_tx_buffer)); /* Free NULL frame resource */ - LM_URB_FREE(pObj, pNullContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pNullContext, sizeof(struct rt_tx_buffer)); /* Free RTS frame resource */ - LM_URB_FREE(pObj, pRTSContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pRTSContext, sizeof(struct rt_tx_buffer)); /* Free beacon frame resource */ for (i = 0; i < BEACON_RING_SIZE; i++) { - PTX_CONTEXT pBeaconContext = &(pAd->BeaconContext[i]); + struct rt_tx_context *pBeaconContext = &(pAd->BeaconContext[i]); if (pBeaconContext) - LM_URB_FREE(pObj, pBeaconContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pBeaconContext, sizeof(struct rt_tx_buffer)); } /* Free mgmt frame resource */ for (i = 0; i < MGMT_RING_SIZE; i++) { - PTX_CONTEXT pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa; - /*LM_URB_FREE(pObj, pMLMEContext, sizeof(TX_BUFFER)); */ + struct rt_tx_context *pMLMEContext = + (struct rt_tx_context *)pAd->MgmtRing.Cell[i].AllocVa; + /*LM_URB_FREE(pObj, pMLMEContext, sizeof(struct rt_tx_buffer)); */ if (NULL != pAd->MgmtRing.Cell[i].pNdisPacket) { RTMPFreeNdisPacket(pAd, pAd->MgmtRing.Cell[i].pNdisPacket); @@ -592,9 +592,9 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) /* Free Tx frame resource */ for (acidx = 0; acidx < 4; acidx++) { - PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]); + struct rt_ht_tx_context *pHTTXContext = &(pAd->TxContext[acidx]); if (pHTTXContext) - LM_URB_FREE(pObj, pHTTXContext, sizeof(HTTX_BUFFER)); + LM_URB_FREE(pObj, pHTTXContext, sizeof(struct rt_httx_buffer)); } if (pAd->FragFrame.pFragPacket) @@ -636,7 +636,7 @@ Return Value: Note: ======================================================================== */ -int RTUSBWriteHWMACAddress(IN PRTMP_ADAPTER pAd) +int RTUSBWriteHWMACAddress(struct rt_rtmp_adapter *pAd) { MAC_DW0_STRUC StaMacReg0; MAC_DW1_STRUC StaMacReg1; @@ -687,7 +687,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMADisable(IN RTMP_ADAPTER * pAd) +void RT28XXDMADisable(struct rt_rtmp_adapter *pAd) { /* no use */ } @@ -706,7 +706,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd) +void RT28XXDMAEnable(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; USB_DMA_CFG_STRUC UsbCfg; @@ -767,14 +767,14 @@ Return Value: Note: ======================================================================== */ -void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, +void RT28xx_UpdateBeaconToAsic(struct rt_rtmp_adapter *pAd, int apidx, unsigned long FrameLen, unsigned long UpdatePos) { u8 *pBeaconFrame = NULL; u8 *ptr; u32 i, padding; - BEACON_SYNC_STRUCT *pBeaconSync = pAd->CommonCfg.pBeaconSync; + struct rt_beacon_sync *pBeaconSync = pAd->CommonCfg.pBeaconSync; u32 longValue; /* u16 shortValue; */ BOOLEAN bBcnReq = FALSE; @@ -849,9 +849,9 @@ void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, } -void RTUSBBssBeaconStop(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconStop(struct rt_rtmp_adapter *pAd) { - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; int i, offset; BOOLEAN Cancelled = TRUE; @@ -883,10 +883,10 @@ void RTUSBBssBeaconStop(IN RTMP_ADAPTER * pAd) } } -void RTUSBBssBeaconStart(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconStart(struct rt_rtmp_adapter *pAd) { int apidx; - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; /* LARGE_INTEGER tsfTime, deltaTime; */ pBeaconSync = pAd->CommonCfg.pBeaconSync; @@ -929,17 +929,17 @@ void RTUSBBssBeaconStart(IN RTMP_ADAPTER * pAd) } } -void RTUSBBssBeaconInit(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconInit(struct rt_rtmp_adapter *pAd) { - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; int i; os_alloc_mem(pAd, (u8 **) (&pAd->CommonCfg.pBeaconSync), - sizeof(BEACON_SYNC_STRUCT)); - /*NdisAllocMemory(pAd->CommonCfg.pBeaconSync, sizeof(BEACON_SYNC_STRUCT), MEM_ALLOC_FLAG); */ + sizeof(struct rt_beacon_sync)); + /*NdisAllocMemory(pAd->CommonCfg.pBeaconSync, sizeof(struct rt_beacon_sync), MEM_ALLOC_FLAG); */ if (pAd->CommonCfg.pBeaconSync) { pBeaconSync = pAd->CommonCfg.pBeaconSync; - NdisZeroMemory(pBeaconSync, sizeof(BEACON_SYNC_STRUCT)); + NdisZeroMemory(pBeaconSync, sizeof(struct rt_beacon_sync)); for (i = 0; i < HW_BEACON_MAX_COUNT; i++) { NdisZeroMemory(pBeaconSync->BeaconBuf[i], HW_BEACON_OFFSET); @@ -954,9 +954,9 @@ void RTUSBBssBeaconInit(IN RTMP_ADAPTER * pAd) } } -void RTUSBBssBeaconExit(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconExit(struct rt_rtmp_adapter *pAd) { - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; BOOLEAN Cancelled = TRUE; int i; @@ -1001,7 +1001,7 @@ void BeaconUpdateExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; LARGE_INTEGER tsfTime_a; /*, tsfTime_b, deltaTime_exp, deltaTime_ab; */ u32 delta, delta2MS, period2US, remain, remain_low, remain_high; /* BOOLEAN positive; */ @@ -1038,9 +1038,9 @@ void BeaconUpdateExec(void *SystemSpecific1, * 2870 Radio on/off Related functions. * ********************************************************************/ -void RT28xxUsbMlmeRadioOn(IN PRTMP_ADAPTER pAd) +void RT28xxUsbMlmeRadioOn(struct rt_rtmp_adapter *pAd) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; DBGPRINT(RT_DEBUG_TRACE, ("RT28xxUsbMlmeRadioOn()\n")); @@ -1068,7 +1068,7 @@ void RT28xxUsbMlmeRadioOn(IN PRTMP_ADAPTER pAd) RTMPSetLED(pAd, LED_RADIO_ON); } -void RT28xxUsbMlmeRadioOFF(IN PRTMP_ADAPTER pAd) +void RT28xxUsbMlmeRadioOFF(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; u32 Value, i; @@ -1080,14 +1080,14 @@ void RT28xxUsbMlmeRadioOFF(IN PRTMP_ADAPTER pAd) /* Clear PMKID cache. */ pAd->StaCfg.SavedPMKNum = 0; - RTMPZeroMemory(pAd->StaCfg.SavedPMK, (PMKID_NO * sizeof(BSSID_INFO))); + RTMPZeroMemory(pAd->StaCfg.SavedPMK, (PMKID_NO * sizeof(struct rt_bssid_info))); /* Link down first if any association exists */ if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) { if (INFRA_ON(pAd) || ADHOC_ON(pAd)) { - MLME_DISASSOC_REQ_STRUCT DisReq; - MLME_QUEUE_ELEM *pMsgElem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_disassoc_req DisReq; + struct rt_mlme_queue_elem *pMsgElem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (pMsgElem) { @@ -1098,10 +1098,10 @@ void RT28xxUsbMlmeRadioOFF(IN PRTMP_ADAPTER pAd) pMsgElem->Machine = ASSOC_STATE_MACHINE; pMsgElem->MsgType = MT2_MLME_DISASSOC_REQ; pMsgElem->MsgLen = - sizeof(MLME_DISASSOC_REQ_STRUCT); + sizeof(struct rt_mlme_disassoc_req); NdisMoveMemory(pMsgElem->Msg, &DisReq, sizeof - (MLME_DISASSOC_REQ_STRUCT)); + (struct rt_mlme_disassoc_req)); MlmeDisassocReqAction(pAd, pMsgElem); kfree(pMsgElem); diff --git a/drivers/staging/rt2860/common/cmm_sanity.c b/drivers/staging/rt2860/common/cmm_sanity.c index 16cc31af3259..556e3d06b88b 100644 --- a/drivers/staging/rt2860/common/cmm_sanity.c +++ b/drivers/staging/rt2860/common/cmm_sanity.c @@ -58,14 +58,14 @@ extern u8 WPS_OUI[]; ========================================================================== */ -BOOLEAN MlmeAddBAReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAddBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2) { - PMLME_ADDBA_REQ_STRUCT pInfo; + struct rt_mlme_addba_req *pInfo; - pInfo = (MLME_ADDBA_REQ_STRUCT *) Msg; + pInfo = (struct rt_mlme_addba_req *)Msg; - if ((MsgLen != sizeof(MLME_ADDBA_REQ_STRUCT))) { + if ((MsgLen != sizeof(struct rt_mlme_addba_req))) { DBGPRINT(RT_DEBUG_TRACE, ("MlmeAddBAReqSanity fail - message lenght not correct.\n")); return FALSE; @@ -97,12 +97,12 @@ BOOLEAN MlmeAddBAReqSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN MlmeDelBAReqSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned long MsgLen) +BOOLEAN MlmeDelBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen) { - MLME_DELBA_REQ_STRUCT *pInfo; - pInfo = (MLME_DELBA_REQ_STRUCT *) Msg; + struct rt_mlme_delba_req *pInfo; + pInfo = (struct rt_mlme_delba_req *)Msg; - if ((MsgLen != sizeof(MLME_DELBA_REQ_STRUCT))) { + if ((MsgLen != sizeof(struct rt_mlme_delba_req))) { DBGPRINT(RT_DEBUG_ERROR, ("MlmeDelBAReqSanity fail - message lenght not correct.\n")); return FALSE; @@ -131,14 +131,14 @@ BOOLEAN MlmeDelBAReqSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned long MsgLe return TRUE; } -BOOLEAN PeerAddBAReqActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAddBAReqActionSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pAddr2) { - PFRAME_802_11 pFrame = (PFRAME_802_11) pMsg; - PFRAME_ADDBA_REQ pAddFrame; - pAddFrame = (PFRAME_ADDBA_REQ) (pMsg); - if (MsgLen < (sizeof(FRAME_ADDBA_REQ))) { + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) pMsg; + struct rt_frame_addba_req * pAddFrame; + pAddFrame = (struct rt_frame_addba_req *) (pMsg); + if (MsgLen < (sizeof(struct rt_frame_addba_req))) { DBGPRINT(RT_DEBUG_ERROR, ("PeerAddBAReqActionSanity: ADDBA Request frame length size = %ld incorrect\n", MsgLen)); @@ -171,13 +171,13 @@ BOOLEAN PeerAddBAReqActionSanity(IN PRTMP_ADAPTER pAd, return TRUE; } -BOOLEAN PeerAddBARspActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAddBARspActionSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen) { - PFRAME_ADDBA_RSP pAddFrame; + struct rt_frame_addba_rsp * pAddFrame; - pAddFrame = (PFRAME_ADDBA_RSP) (pMsg); - if (MsgLen < (sizeof(FRAME_ADDBA_RSP))) { + pAddFrame = (struct rt_frame_addba_rsp *) (pMsg); + if (MsgLen < (sizeof(struct rt_frame_addba_rsp))) { DBGPRINT(RT_DEBUG_ERROR, ("PeerAddBARspActionSanity: ADDBA Response frame length size = %ld incorrect\n", MsgLen)); @@ -206,18 +206,18 @@ BOOLEAN PeerAddBARspActionSanity(IN PRTMP_ADAPTER pAd, } -BOOLEAN PeerDelBAActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDelBAActionSanity(struct rt_rtmp_adapter *pAd, u8 Wcid, void * pMsg, unsigned long MsgLen) { - /*PFRAME_802_11 pFrame = (PFRAME_802_11)pMsg; */ - PFRAME_DELBA_REQ pDelFrame; - if (MsgLen != (sizeof(FRAME_DELBA_REQ))) + /*struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *)pMsg; */ + struct rt_frame_delba_req * pDelFrame; + if (MsgLen != (sizeof(struct rt_frame_delba_req))) return FALSE; if (Wcid >= MAX_LEN_OF_MAC_TABLE) return FALSE; - pDelFrame = (PFRAME_DELBA_REQ) (pMsg); + pDelFrame = (struct rt_frame_delba_req *) (pMsg); *(u16 *) (&pDelFrame->DelbaParm) = cpu2le16(*(u16 *) (&pDelFrame->DelbaParm)); @@ -240,14 +240,14 @@ BOOLEAN PeerDelBAActionSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned long MsgLen, u8 MsgChannel, u8 *pAddr2, u8 *pBssid, char Ssid[], u8 * pSsidLen, u8 * pBssType, u16 * pBeaconPeriod, u8 * pChannel, u8 * pNewChannel, OUT LARGE_INTEGER * pTimestamp, OUT CF_PARM * pCfParm, u16 * pAtimWin, u16 * pCapabilityInfo, u8 * pErp, u8 * pDtimCount, u8 * pDtimPeriod, u8 * pBcastFlag, u8 * pMessageToMe, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, u8 * pCkipFlag, u8 * pAironetCellPowerLimit, OUT PEDCA_PARM pEdcaParm, OUT PQBSS_LOAD_PARM pQbssLoad, OUT PQOS_CAPABILITY_PARM pQosCapability, unsigned long * pRalinkIe, u8 * pHtCapabilityLen, u8 * pPreNHtCapabilityLen, OUT HT_CAPABILITY_IE * pHtCapability, u8 * AddHtInfoLen, OUT ADD_HT_INFO_IE * AddHtInfo, u8 * NewExtChannelOffset, /* Ht extension channel offset(above or below) */ +BOOLEAN PeerBeaconAndProbeRspSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 MsgChannel, u8 *pAddr2, u8 *pBssid, char Ssid[], u8 * pSsidLen, u8 * pBssType, u16 * pBeaconPeriod, u8 * pChannel, u8 * pNewChannel, OUT LARGE_INTEGER * pTimestamp, struct rt_cf_parm * pCfParm, u16 * pAtimWin, u16 * pCapabilityInfo, u8 * pErp, u8 * pDtimCount, u8 * pDtimPeriod, u8 * pBcastFlag, u8 * pMessageToMe, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, u8 * pCkipFlag, u8 * pAironetCellPowerLimit, struct rt_edca_parm *pEdcaParm, struct rt_qbss_load_parm *pQbssLoad, struct rt_qos_capability_parm *pQosCapability, unsigned long * pRalinkIe, u8 * pHtCapabilityLen, u8 * pPreNHtCapabilityLen, struct rt_ht_capability_ie * pHtCapability, u8 * AddHtInfoLen, struct rt_add_ht_info_ie * AddHtInfo, u8 * NewExtChannelOffset, /* Ht extension channel offset(above or below) */ u16 * LengthVIE, - OUT PNDIS_802_11_VARIABLE_IEs pVIE) + struct rt_ndis_802_11_variable_ies *pVIE) { u8 *Ptr; u8 TimLen; - PFRAME_802_11 pFrame; - PEID_STRUCT pEid; + struct rt_frame_802_11 * pFrame; + struct rt_eid * pEid; u8 SubType; u8 Sanity; /*u8 ECWMin, ECWMax; */ @@ -284,7 +284,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l pEdcaParm->bValid = FALSE; /* default: no IE_EDCA_PARAMETER found */ pQosCapability->bValid = FALSE; /* default: no IE_QOS_CAPABILITY found */ - pFrame = (PFRAME_802_11) Msg; + pFrame = (struct rt_frame_802_11 *) Msg; /* get subtype from header */ SubType = (u8)pFrame->Hdr.FC.SubType; @@ -320,7 +320,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l else *pBssType = BSS_ADHOC; - pEid = (PEID_STRUCT) Ptr; + pEid = (struct rt_eid *) Ptr; /* get variable fields from payload and advance the pointer */ while ((Length + 2 + pEid->Len) <= MsgLen) { @@ -374,7 +374,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension.!! */ { NdisMoveMemory(pHtCapability, pEid->Octet, - sizeof(HT_CAPABILITY_IE)); + sizeof(struct rt_ht_capability_ie)); *pHtCapabilityLen = SIZE_HT_CAP_IE; /* Nnow we only support 26 bytes. */ *(u16 *) (&pHtCapability->HtCapInfo) = @@ -401,11 +401,11 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l break; case IE_ADD_HT: - if (pEid->Len >= sizeof(ADD_HT_INFO_IE)) { + if (pEid->Len >= sizeof(struct rt_add_ht_info_ie)) { /* This IE allows extension, but we can ignore extra bytes beyond our knowledge , so only */ - /* copy first sizeof(ADD_HT_INFO_IE) */ + /* copy first sizeof(struct rt_add_ht_info_ie) */ NdisMoveMemory(AddHtInfo, pEid->Octet, - sizeof(ADD_HT_INFO_IE)); + sizeof(struct rt_add_ht_info_ie)); *AddHtInfoLen = SIZE_ADD_HT_INFO_IE; CtrlChannel = AddHtInfo->ControlChan; @@ -516,14 +516,14 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l if ((pEid->Octet[3] == OUI_BROADCOM_HT) && (pEid->Len >= 30)) { { - NdisMoveMemory(pHtCapability, &pEid->Octet[4], sizeof(HT_CAPABILITY_IE)); + NdisMoveMemory(pHtCapability, &pEid->Octet[4], sizeof(struct rt_ht_capability_ie)); *pHtCapabilityLen = SIZE_HT_CAP_IE; // Nnow we only support 26 bytes. } } if ((pEid->Octet[3] == OUI_BROADCOM_HT) && (pEid->Len >= 26)) { { - NdisMoveMemory(AddHtInfo, &pEid->Octet[4], sizeof(ADD_HT_INFO_IE)); + NdisMoveMemory(AddHtInfo, &pEid->Octet[4], sizeof(struct rt_add_ht_info_ie)); *AddHtInfoLen = SIZE_ADD_HT_INFO_IE; // Nnow we only support 26 bytes. } } @@ -552,7 +552,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l NdisMoveMemory(pHtCapability, &pEid->Octet[4], sizeof - (HT_CAPABILITY_IE)); + (struct rt_ht_capability_ie)); *pPreNHtCapabilityLen = SIZE_HT_CAP_IE; } @@ -560,7 +560,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l && (pEid->Len >= 26)) { NdisMoveMemory(AddHtInfo, &pEid->Octet[4], - sizeof(ADD_HT_INFO_IE)); + sizeof(struct rt_add_ht_info_ie)); *AddHtInfoLen = SIZE_ADD_HT_INFO_IE; } } else if (NdisEqualMemory(pEid->Octet, WPA_OUI, 4)) { @@ -696,7 +696,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l } Length = Length + 2 + pEid->Len; /* Eid[1] + Len[1]+ content[Len] */ - pEid = (PEID_STRUCT) ((u8 *) pEid + 2 + pEid->Len); + pEid = (struct rt_eid *) ((u8 *) pEid + 2 + pEid->Len); } /* For some 11a AP. it did not have the channel EID, patch here */ @@ -730,16 +730,16 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -BOOLEAN MlmeScanReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeScanReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 * pBssType, char Ssid[], u8 * pSsidLen, u8 * pScanType) { - MLME_SCAN_REQ_STRUCT *Info; + struct rt_mlme_scan_req *Info; - Info = (MLME_SCAN_REQ_STRUCT *) (Msg); + Info = (struct rt_mlme_scan_req *)(Msg); *pBssType = Info->BssType; *pSsidLen = Info->SsidLen; NdisMoveMemory(Ssid, Info->Ssid, *pSsidLen); @@ -757,7 +757,7 @@ BOOLEAN MlmeScanReqSanity(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -u8 ChannelSanity(IN PRTMP_ADAPTER pAd, u8 channel) +u8 ChannelSanity(struct rt_rtmp_adapter *pAd, u8 channel) { int i; @@ -779,12 +779,12 @@ u8 ChannelSanity(IN PRTMP_ADAPTER pAd, u8 channel) ========================================================================== */ -BOOLEAN PeerDeauthSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDeauthSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, u16 * pReason) { - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2); NdisMoveMemory(pReason, &pFrame->Octet[0], 2); @@ -803,7 +803,7 @@ BOOLEAN PeerDeauthSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAuthSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr, @@ -811,7 +811,7 @@ BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, u16 * pSeq, u16 * pStatus, char * pChlgText) { - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; COPY_MAC_ADDR(pAddr, pFrame->Hdr.Addr2); NdisMoveMemory(pAlg, &pFrame->Octet[0], 2); @@ -853,15 +853,15 @@ BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -BOOLEAN MlmeAuthReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAuthReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr, unsigned long * pTimeout, u16 * pAlg) { - MLME_AUTH_REQ_STRUCT *pInfo; + struct rt_mlme_auth_req *pInfo; - pInfo = (MLME_AUTH_REQ_STRUCT *) Msg; + pInfo = (struct rt_mlme_auth_req *)Msg; COPY_MAC_ADDR(pAddr, pInfo->Addr); *pTimeout = pInfo->Timeout; *pAlg = pInfo->Alg; @@ -887,16 +887,16 @@ BOOLEAN MlmeAuthReqSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN MlmeAssocReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAssocReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pApAddr, u16 * pCapabilityInfo, unsigned long * pTimeout, u16 * pListenIntv) { - MLME_ASSOC_REQ_STRUCT *pInfo; + struct rt_mlme_assoc_req *pInfo; - pInfo = (MLME_ASSOC_REQ_STRUCT *) Msg; + pInfo = (struct rt_mlme_assoc_req *)Msg; *pTimeout = pInfo->Timeout; /* timeout */ COPY_MAC_ADDR(pApAddr, pInfo->Addr); /* AP address */ *pCapabilityInfo = pInfo->CapabilityInfo; /* capability info */ @@ -916,12 +916,12 @@ BOOLEAN MlmeAssocReqSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN PeerDisassocSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDisassocSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, u16 * pReason) { - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2); NdisMoveMemory(pReason, &pFrame->Octet[0], 2); @@ -946,7 +946,7 @@ BOOLEAN PeerDisassocSanity(IN PRTMP_ADAPTER pAd, ======================================================================== */ -NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(IN PBSS_ENTRY pBss) +NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(struct rt_bss_entry *pBss) { NDIS_802_11_NETWORK_TYPE NetWorkType; u8 rate, i; @@ -1012,15 +1012,15 @@ NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(IN PBSS_ENTRY pBss) FALSE otherwise ========================================================================== */ -BOOLEAN PeerWpaMessageSanity(IN PRTMP_ADAPTER pAd, - IN PEAPOL_PACKET pMsg, +BOOLEAN PeerWpaMessageSanity(struct rt_rtmp_adapter *pAd, + struct rt_eapol_packet * pMsg, unsigned long MsgLen, - u8 MsgType, IN MAC_TABLE_ENTRY * pEntry) + u8 MsgType, struct rt_mac_table_entry *pEntry) { u8 mic[LEN_KEY_DESC_MIC], digest[80], KEYDATA[MAX_LEN_OF_RSNIE]; BOOLEAN bReplayDiff = FALSE; BOOLEAN bWPA2 = FALSE; - KEY_INFO EapolKeyInfo; + struct rt_key_info EapolKeyInfo; u8 GroupKeyIndex = 0; NdisZeroMemory(mic, sizeof(mic)); @@ -1029,7 +1029,7 @@ BOOLEAN PeerWpaMessageSanity(IN PRTMP_ADAPTER pAd, NdisZeroMemory((u8 *)& EapolKeyInfo, sizeof(EapolKeyInfo)); NdisMoveMemory((u8 *)& EapolKeyInfo, - (u8 *)& pMsg->KeyDesc.KeyInfo, sizeof(KEY_INFO)); + (u8 *)& pMsg->KeyDesc.KeyInfo, sizeof(struct rt_key_info)); *((u16 *) & EapolKeyInfo) = cpu2le16(*((u16 *) & EapolKeyInfo)); diff --git a/drivers/staging/rt2860/common/cmm_sync.c b/drivers/staging/rt2860/common/cmm_sync.c index 2d7f36a3e62c..f84194da47bc 100644 --- a/drivers/staging/rt2860/common/cmm_sync.c +++ b/drivers/staging/rt2860/common/cmm_sync.c @@ -105,13 +105,13 @@ u8 BaSizeArray[4] = { 8, 16, 32, 64 }; ========================================================================== */ -void BuildChannelList(IN PRTMP_ADAPTER pAd) +void BuildChannelList(struct rt_rtmp_adapter *pAd) { u8 i, j, index = 0, num = 0; u8 *pChannelList = NULL; NdisZeroMemory(pAd->ChannelList, - MAX_NUM_OF_CHANNELS * sizeof(CHANNEL_TX_POWER)); + MAX_NUM_OF_CHANNELS * sizeof(struct rt_channel_tx_power)); /* if not 11a-only mode, channel list starts from 2.4Ghz band */ if ((pAd->CommonCfg.PhyMode != PHY_11A) @@ -122,63 +122,63 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd) case REGION_0_BG_BAND: /* 1 -11 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_0_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_0_SIZE); index += BG_BAND_REGION_0_SIZE; break; case REGION_1_BG_BAND: /* 1 - 13 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_1_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_1_SIZE); index += BG_BAND_REGION_1_SIZE; break; case REGION_2_BG_BAND: /* 10 - 11 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_2_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_2_SIZE); index += BG_BAND_REGION_2_SIZE; break; case REGION_3_BG_BAND: /* 10 - 13 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_3_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_3_SIZE); index += BG_BAND_REGION_3_SIZE; break; case REGION_4_BG_BAND: /* 14 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_4_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_4_SIZE); index += BG_BAND_REGION_4_SIZE; break; case REGION_5_BG_BAND: /* 1 - 14 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_5_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_5_SIZE); index += BG_BAND_REGION_5_SIZE; break; case REGION_6_BG_BAND: /* 3 - 9 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_6_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_6_SIZE); index += BG_BAND_REGION_6_SIZE; break; case REGION_7_BG_BAND: /* 5 - 13 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_7_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_7_SIZE); index += BG_BAND_REGION_7_SIZE; break; case REGION_31_BG_BAND: /* 1 - 14 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_31_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_31_SIZE); index += BG_BAND_REGION_31_SIZE; break; @@ -315,7 +315,7 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd) + i], &pAd->TxPower[j], sizeof - (CHANNEL_TX_POWER)); + (struct rt_channel_tx_power)); } for (j = 0; j < 15; j++) { if (pChannelList[i] == RadarCh[j]) @@ -359,7 +359,7 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd) ========================================================================== */ -u8 FirstChannel(IN PRTMP_ADAPTER pAd) +u8 FirstChannel(struct rt_rtmp_adapter *pAd) { return pAd->ChannelList[0].Channel; } @@ -375,7 +375,7 @@ u8 FirstChannel(IN PRTMP_ADAPTER pAd) return 0 if no more next channel ========================================================================== */ -u8 NextChannel(IN PRTMP_ADAPTER pAd, u8 channel) +u8 NextChannel(struct rt_rtmp_adapter *pAd, u8 channel) { int i; u8 next_channel = 0; @@ -408,7 +408,7 @@ u8 NextChannel(IN PRTMP_ADAPTER pAd, u8 channel) the minimum value or next lower value. ========================================================================== */ -void ChangeToCellPowerLimit(IN PRTMP_ADAPTER pAd, +void ChangeToCellPowerLimit(struct rt_rtmp_adapter *pAd, u8 AironetCellPowerLimit) { /*valud 0xFF means that hasn't found power limit information */ @@ -435,7 +435,7 @@ void ChangeToCellPowerLimit(IN PRTMP_ADAPTER pAd, } -char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber) +char ConvertToRssi(struct rt_rtmp_adapter *pAd, char Rssi, u8 RssiNumber) { u8 RssiOffset, LNAGain; @@ -469,15 +469,15 @@ char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber) Scan next channel ========================================================================== */ -void ScanNextChannel(IN PRTMP_ADAPTER pAd) +void ScanNextChannel(struct rt_rtmp_adapter *pAd) { - HEADER_802_11 Hdr80211; + struct rt_header_802_11 Hdr80211; u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen = 0; u8 SsidLen = 0, ScanType = pAd->MlmeAux.ScanType, BBPValue = 0; u16 Status; - PHEADER_802_11 pHdr80211; + struct rt_header_802_11 * pHdr80211; u32 ScanTimeIn5gChannel = SHORT_CHANNEL_TIME; { @@ -522,7 +522,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) MlmeAllocateMemory(pAd, (void *)& pOutBuffer); if (NStatus == NDIS_STATUS_SUCCESS) { - pHdr80211 = (PHEADER_802_11) pOutBuffer; + pHdr80211 = (struct rt_header_802_11 *) pOutBuffer; MgtMacHeaderInit(pAd, pHdr80211, SUBTYPE_NULL_FUNC, 1, pAd->CommonCfg.Bssid, @@ -535,7 +535,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) /* Send using priority queue */ MiniportMMRequest(pAd, 0, pOutBuffer, sizeof - (HEADER_802_11)); + (struct rt_header_802_11)); DBGPRINT(RT_DEBUG_TRACE, ("MlmeScanReqAction -- Send PSM Data frame\n")); MlmeFreeMemory(pAd, pOutBuffer); @@ -642,7 +642,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) MgtMacHeaderInit(pAd, &Hdr80211, SUBTYPE_PROBE_REQ, 0, BROADCAST_ADDR, BROADCAST_ADDR); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &Hdr80211, 1, + sizeof(struct rt_header_802_11), &Hdr80211, 1, &SsidIe, 1, &SsidLen, SsidLen, pAd->MlmeAux.Ssid, 1, &SupRateIe, 1, &pAd->CommonCfg.SupRateLen, @@ -700,12 +700,12 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) } } -void MgtProbReqMacHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void MgtProbReqMacHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 SubType, u8 ToDs, u8 *pDA, u8 *pBssid) { - NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11)); + NdisZeroMemory(pHdr80211, sizeof(struct rt_header_802_11)); pHdr80211->FC.Type = BTYPE_MGMT; pHdr80211->FC.SubType = SubType; diff --git a/drivers/staging/rt2860/common/cmm_tkip.c b/drivers/staging/rt2860/common/cmm_tkip.c index 0ac9d744a86d..7a2a48eb8e51 100644 --- a/drivers/staging/rt2860/common/cmm_tkip.c +++ b/drivers/staging/rt2860/common/cmm_tkip.c @@ -115,7 +115,7 @@ u32 Tkip_Sbox_Upper[256] = { /* */ /* Expanded IV for TKIP function. */ /* */ -typedef struct PACKED _IV_CONTROL_ { +struct PACKED rt_tkip_iv { union PACKED { struct PACKED { u8 rc0; @@ -136,7 +136,7 @@ typedef struct PACKED _IV_CONTROL_ { } IV16; unsigned long IV32; -} TKIP_IV, *PTKIP_IV; +}; /* ======================================================================== @@ -214,7 +214,7 @@ void RTMPTkipPutUInt32(IN u8 *pDst, unsigned long val) ======================================================================== */ -void RTMPTkipSetMICKey(IN PTKIP_KEY_INFO pTkip, u8 *pMICKey) +void RTMPTkipSetMICKey(struct rt_tkip_key_info *pTkip, u8 *pMICKey) { /* Set the key */ pTkip->K0 = RTMPTkipGetUInt32(pMICKey); @@ -245,7 +245,7 @@ void RTMPTkipSetMICKey(IN PTKIP_KEY_INFO pTkip, u8 *pMICKey) ======================================================================== */ -void RTMPTkipAppendByte(IN PTKIP_KEY_INFO pTkip, u8 uChar) +void RTMPTkipAppendByte(struct rt_tkip_key_info *pTkip, u8 uChar) { /* Append the byte to our word-sized buffer */ pTkip->M |= (uChar << (8 * pTkip->nBytesInM)); @@ -289,7 +289,7 @@ void RTMPTkipAppendByte(IN PTKIP_KEY_INFO pTkip, u8 uChar) ======================================================================== */ -void RTMPTkipAppend(IN PTKIP_KEY_INFO pTkip, u8 *pSrc, u32 nBytes) +void RTMPTkipAppend(struct rt_tkip_key_info *pTkip, u8 *pSrc, u32 nBytes) { /* This is simple */ while (nBytes > 0) { @@ -316,7 +316,7 @@ void RTMPTkipAppend(IN PTKIP_KEY_INFO pTkip, u8 *pSrc, u32 nBytes) the MIC Value is store in pAd->PrivateInfo.MIC ======================================================================== */ -void RTMPTkipGetMIC(IN PTKIP_KEY_INFO pTkip) +void RTMPTkipGetMIC(struct rt_tkip_key_info *pTkip) { /* Append the minimum padding */ RTMPTkipAppendByte(pTkip, 0x5a); @@ -355,17 +355,17 @@ void RTMPTkipGetMIC(IN PTKIP_KEY_INFO pTkip) ======================================================================== */ -void RTMPInitTkipEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitTkipEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 KeyId, u8 *pTA, u8 *pMICKey, u8 *pTSC, unsigned long *pIV16, unsigned long *pIV32) { - TKIP_IV tkipIv; + struct rt_tkip_iv tkipIv; /* Prepare 8 bytes TKIP encapsulation for MPDU */ - NdisZeroMemory(&tkipIv, sizeof(TKIP_IV)); + NdisZeroMemory(&tkipIv, sizeof(struct rt_tkip_iv)); tkipIv.IV16.field.rc0 = *(pTSC + 1); tkipIv.IV16.field.rc1 = (tkipIv.IV16.field.rc0 | 0x20) & 0x7f; tkipIv.IV16.field.rc2 = *pTSC; @@ -399,7 +399,7 @@ void RTMPInitTkipEngine(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPInitMICEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitMICEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 *pDA, u8 *pSA, u8 UserPriority, u8 *pMICKey) @@ -440,7 +440,7 @@ void RTMPInitMICEngine(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPTkipCompareMICValue(struct rt_rtmp_adapter *pAd, u8 *pSrc, u8 *pDA, u8 *pSA, @@ -500,12 +500,12 @@ BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPCalculateMICValue(IN PRTMP_ADAPTER pAd, +void RTMPCalculateMICValue(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pEncap, - IN PCIPHER_KEY pKey, u8 apidx) + struct rt_cipher_key *pKey, u8 apidx) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; u8 *pSrc; @@ -698,10 +698,10 @@ void RTMPTkipMixKey(u8 * key, u8 * ta, unsigned long pnl, /* Least significant 1 /* TRUE: Success! */ /* FALSE: Decrypt Error! */ /* */ -BOOLEAN RTMPSoftDecryptTKIP(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptTKIP(struct rt_rtmp_adapter *pAd, u8 *pData, unsigned long DataByteCnt, - u8 UserPriority, IN PCIPHER_KEY pWpaKey) + u8 UserPriority, struct rt_cipher_key *pWpaKey) { u8 KeyID; u32 HeaderLen; @@ -726,7 +726,7 @@ BOOLEAN RTMPSoftDecryptTKIP(IN PRTMP_ADAPTER pAd, unsigned long pnh; /* Most significant 32 bits of PN */ u32 num_blocks; u32 payload_remainder; - ARCFOURCONTEXT ArcFourContext; + struct rt_arcfourcontext ArcFourContext; u32 crc32 = 0; u32 trailfcs = 0; u8 MIC[8]; diff --git a/drivers/staging/rt2860/common/cmm_wep.c b/drivers/staging/rt2860/common/cmm_wep.c index 05a921410caa..c72835504ecb 100644 --- a/drivers/staging/rt2860/common/cmm_wep.c +++ b/drivers/staging/rt2860/common/cmm_wep.c @@ -135,7 +135,7 @@ u8 WEPKEY[] = { ======================================================================== */ -void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitWepEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 KeyId, u8 KeyLen, IN u8 *pDest) { @@ -184,7 +184,7 @@ void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPEncryptData(IN PRTMP_ADAPTER pAd, +void RTMPEncryptData(struct rt_rtmp_adapter *pAd, u8 *pSrc, u8 *pDest, u32 Len) { pAd->PrivateInfo.FCSCRC32 = @@ -211,9 +211,9 @@ void RTMPEncryptData(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptWEP(struct rt_rtmp_adapter *pAd, u8 *pData, - unsigned long DataByteCnt, IN PCIPHER_KEY pGroupKey) + unsigned long DataByteCnt, struct rt_cipher_key *pGroupKey) { u32 trailfcs; u32 crc32; @@ -255,10 +255,10 @@ BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd, ======================================================================== Routine Description: - The Stream Cipher Encryption Algorithm "ARCFOUR" initialize + The Stream Cipher Encryption Algorithm "struct rt_arcfour" initialize Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pKey Pointer to the WEP KEY KeyLen Indicate the length fo the WEP KEY @@ -271,7 +271,7 @@ BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen) +void ARCFOUR_INIT(struct rt_arcfourcontext *Ctx, u8 *pKey, u32 KeyLen) { u8 t, u; u32 keyindex; @@ -301,19 +301,19 @@ void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen) ======================================================================== Routine Description: - Get bytes from ARCFOUR CONTEXT (S-BOX) + Get bytes from struct rt_arcfour CONTEXT (S-BOX) Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) Return Value: - u8 - the value of the ARCFOUR CONTEXT (S-BOX) + u8 - the value of the struct rt_arcfour CONTEXT (S-BOX) Note: ======================================================================== */ -u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx) +u8 ARCFOUR_BYTE(struct rt_arcfourcontext *Ctx) { u32 x; u32 y; @@ -341,7 +341,7 @@ u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx) The Stream Cipher Decryption Algorithm Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pDest Pointer to the Destination pSrc Pointer to the Source data Len Indicate the length of the Source data @@ -353,7 +353,7 @@ u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx) ======================================================================== */ -void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx, +void ARCFOUR_DECRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len) { u32 i; @@ -369,7 +369,7 @@ void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx, The Stream Cipher Encryption Algorithm Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pDest Pointer to the Destination pSrc Pointer to the Source data Len Indicate the length of the Source dta @@ -383,7 +383,7 @@ void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx, ======================================================================== */ -void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, +void ARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len) { u32 i; @@ -399,7 +399,7 @@ void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, The Stream Cipher Encryption Algorithm which conform to the special requirement to encrypt GTK. Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pDest Pointer to the Destination pSrc Pointer to the Source data Len Indicate the length of the Source dta @@ -407,7 +407,7 @@ void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, ======================================================================== */ -void WPAARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, +void WPAARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len) { u32 i; @@ -463,7 +463,7 @@ u32 RTMP_CALC_FCS32(u32 Fcs, u8 *Cp, int Len) ======================================================================== */ -void RTMPSetICV(IN PRTMP_ADAPTER pAd, u8 *pDest) +void RTMPSetICV(struct rt_rtmp_adapter *pAd, u8 *pDest) { pAd->PrivateInfo.FCSCRC32 ^= 0xffffffff; /* complement */ pAd->PrivateInfo.FCSCRC32 = cpu2le32(pAd->PrivateInfo.FCSCRC32); diff --git a/drivers/staging/rt2860/common/cmm_wpa.c b/drivers/staging/rt2860/common/cmm_wpa.c index 6daccd94e1e1..7b51be0e8dd3 100644 --- a/drivers/staging/rt2860/common/cmm_wpa.c +++ b/drivers/staging/rt2860/common/cmm_wpa.c @@ -54,30 +54,30 @@ u8 OUI_WPA2_8021X_AKM[4] = { 0x00, 0x0F, 0xAC, 0x01 }; u8 OUI_WPA2_PSK_AKM[4] = { 0x00, 0x0F, 0xAC, 0x02 }; u8 OUI_WPA2_WEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 }; -static void ConstructEapolKeyData(IN PMAC_TABLE_ENTRY pEntry, +static void ConstructEapolKeyData(struct rt_mac_table_entry *pEntry, u8 GroupKeyWepStatus, u8 keyDescVer, u8 MsgType, u8 DefaultKeyIdx, u8 * GTK, u8 * RSNIE, - u8 RSNIE_LEN, OUT PEAPOL_PACKET pMsg); + u8 RSNIE_LEN, struct rt_eapol_packet * pMsg); static void CalculateMIC(u8 KeyDescVer, - u8 * PTK, OUT PEAPOL_PACKET pMsg); + u8 * PTK, struct rt_eapol_packet * pMsg); -static void WpaEAPPacketAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPPacketAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLASFAlertAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLASFAlertAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLLogoffAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLLogoffAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLStartAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLStartAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLKeyAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); /* ========================================================================== @@ -87,8 +87,8 @@ static void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); S - pointer to the association state machine ========================================================================== */ -void WpaStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, OUT STATE_MACHINE_FUNC Trans[]) +void WpaStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]) { StateMachineInit(S, (STATE_MACHINE_FUNC *) Trans, MAX_WPA_PTK_STATE, MAX_WPA_MSG, (STATE_MACHINE_FUNC) Drop, WPA_PTK, @@ -115,15 +115,15 @@ void WpaStateMachineInit(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void WpaEAPPacketAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPPacketAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void WpaEAPOLASFAlertAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLASFAlertAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void WpaEAPOLLogoffAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLLogoffAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } @@ -134,14 +134,14 @@ void WpaEAPOLLogoffAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return: ========================================================================== */ -void WpaEAPOLStartAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLStartAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MAC_TABLE_ENTRY *pEntry; - PHEADER_802_11 pHeader; + struct rt_mac_table_entry *pEntry; + struct rt_header_802_11 * pHeader; DBGPRINT(RT_DEBUG_TRACE, ("WpaEAPOLStartAction ===> \n")); - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; /*For normaol PSK, we enqueue an EAPOL-Start command to trigger the process. */ if (Elem->MsgLen == 6) @@ -187,23 +187,23 @@ void WpaEAPOLStartAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return: ========================================================================== */ -void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLKeyAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MAC_TABLE_ENTRY *pEntry; - PHEADER_802_11 pHeader; - PEAPOL_PACKET pEapol_packet; - KEY_INFO peerKeyInfo; + struct rt_mac_table_entry *pEntry; + struct rt_header_802_11 * pHeader; + struct rt_eapol_packet * pEapol_packet; + struct rt_key_info peerKeyInfo; DBGPRINT(RT_DEBUG_TRACE, ("WpaEAPOLKeyAction ===>\n")); - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; pEapol_packet = - (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; NdisZeroMemory((u8 *)& peerKeyInfo, sizeof(peerKeyInfo)); NdisMoveMemory((u8 *)& peerKeyInfo, (u8 *)& pEapol_packet->KeyDesc.KeyInfo, - sizeof(KEY_INFO)); + sizeof(struct rt_key_info)); hex_dump("Received Eapol frame", (unsigned char *)pEapol_packet, (Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H)); @@ -357,8 +357,8 @@ void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ======================================================================== */ -void RTMPToWirelessSta(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +void RTMPToWirelessSta(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 *pHeader802_3, u32 HdrLen, u8 *pData, u32 DataLen, IN BOOLEAN bClearFrame) @@ -433,11 +433,11 @@ void RTMPToWirelessSta(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void WPAStart4WayHS(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, unsigned long TimeInterval) +void WPAStart4WayHS(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, unsigned long TimeInterval) { u8 Header802_3[14]; - EAPOL_PACKET EAPOLPKT; + struct rt_eapol_packet EAPOLPKT; u8 *pBssid = NULL; u8 group_cipher = Ndis802_11WEPDisabled; @@ -472,7 +472,7 @@ void WPAStart4WayHS(IN PRTMP_ADAPTER pAd, /* Construct EAPoL message - Pairwise Msg 1 */ /* EAPOL-Key(0,0,1,0,P,0,0,ANonce,0,DataKD_M1) */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_1, 0, /* Default key index */ pEntry->ANonce, NULL, /* TxRSC */ NULL, /* GTK */ @@ -516,14 +516,14 @@ void WPAStart4WayHS(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg1Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { u8 PTK[80]; u8 Header802_3[14]; - PEAPOL_PACKET pMsg1; + struct rt_eapol_packet * pMsg1; u32 MsgLen; - EAPOL_PACKET EAPOLPKT; + struct rt_eapol_packet EAPOLPKT; u8 *pCurrentAddr = NULL; u8 *pmk_ptr = NULL; u8 group_cipher = Ndis802_11WEPDisabled; @@ -537,7 +537,7 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) return; { @@ -549,7 +549,7 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, } /* Store the received frame */ - pMsg1 = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pMsg1 = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer Pairwise message 1 - Replay Counter */ @@ -585,7 +585,7 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, /* Construct EAPoL message - Pairwise Msg 2 */ /* EAPOL-Key(0,1,0,0,P,0,0,SNonce,MIC,DataKD_M2) */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_2, 0, /* DefaultKeyIdx */ pEntry->SNonce, NULL, /* TxRsc */ NULL, /* GTK */ @@ -609,14 +609,14 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg2Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { u8 PTK[80]; BOOLEAN Cancelled; - PHEADER_802_11 pHeader; - EAPOL_PACKET EAPOLPKT; - PEAPOL_PACKET pMsg2; + struct rt_header_802_11 * pHeader; + struct rt_eapol_packet EAPOLPKT; + struct rt_eapol_packet * pMsg2; u32 MsgLen; u8 Header802_3[LENGTH_802_3]; u8 TxTsc[6]; @@ -635,7 +635,7 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) return; /* check Entry in valid State */ @@ -643,10 +643,10 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, return; /* pointer to 802.11 header */ - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; /* skip 802.11_header(24-byte) and LLC_header(8) */ - pMsg2 = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pMsg2 = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Store SNonce */ @@ -678,7 +678,7 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, ADD_ONE_To_64BIT_VAR(pEntry->R_Counter); /* Construct EAPoL message - Pairwise Msg 3 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_3, @@ -724,13 +724,13 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg3Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { - PHEADER_802_11 pHeader; + struct rt_header_802_11 * pHeader; u8 Header802_3[14]; - EAPOL_PACKET EAPOLPKT; - PEAPOL_PACKET pMsg3; + struct rt_eapol_packet EAPOLPKT; + struct rt_eapol_packet * pMsg3; u32 MsgLen; u8 *pCurrentAddr = NULL; u8 group_cipher = Ndis802_11WEPDisabled; @@ -742,7 +742,7 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) return; { @@ -752,8 +752,8 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, } /* Record 802.11 header & the received EAPOL packet Msg3 */ - pHeader = (PHEADER_802_11) Elem->Msg; - pMsg3 = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pHeader = (struct rt_header_802_11 *) Elem->Msg; + pMsg3 = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer Pairwise message 3 - Replay Counter, MIC, RSNIE */ @@ -771,7 +771,7 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, return; } /* Construct EAPoL message - Pairwise Msg 4 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_4, 0, /* group key index not used in message 4 */ NULL, /* Nonce not used in message 4 */ NULL, /* TxRSC not used in message 4 */ @@ -784,14 +784,14 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, /* Update pairwise key */ { - PCIPHER_KEY pSharedKey; + struct rt_cipher_key *pSharedKey; pSharedKey = &pAd->SharedKey[BSS0][0]; NdisMoveMemory(pAd->StaCfg.PTK, pEntry->PTK, LEN_PTK); /* Prepare pair-wise key information into shared key table */ - NdisZeroMemory(pSharedKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(pSharedKey, sizeof(struct rt_cipher_key)); pSharedKey->KeyLen = LEN_TKIP_EK; NdisMoveMemory(pSharedKey->Key, &pAd->StaCfg.PTK[32], LEN_TKIP_EK); @@ -809,7 +809,7 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, else pSharedKey->CipherAlg = CIPHER_NONE; - /* Update these related information to MAC_TABLE_ENTRY */ + /* Update these related information to struct rt_mac_table_entry */ pEntry = &pAd->MacTab.Content[BSSID_WCID]; NdisMoveMemory(pEntry->PairwiseKey.Key, &pAd->StaCfg.PTK[32], LEN_TKIP_EK); @@ -871,11 +871,11 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg4Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { - PEAPOL_PACKET pMsg4; - PHEADER_802_11 pHeader; + struct rt_eapol_packet * pMsg4; + struct rt_header_802_11 * pHeader; u32 MsgLen; BOOLEAN Cancelled; u8 group_cipher = Ndis802_11WEPDisabled; @@ -888,18 +888,18 @@ void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) break; if (pEntry->WpaState < AS_PTKINIT_NEGOTIATING) break; /* pointer to 802.11 header */ - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; /* skip 802.11_header(24-byte) and LLC_header(8) */ pMsg4 = - (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer Pairwise message 4 - Replay Counter, MIC */ @@ -908,7 +908,7 @@ void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, break; /* 3. uses the MLME.SETKEYS.request to configure PTK into MAC */ - NdisZeroMemory(&pEntry->PairwiseKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(&pEntry->PairwiseKey, sizeof(struct rt_cipher_key)); /* reset IVEIV in Asic */ AsicUpdateWCIDIVEIV(pAd, pEntry->Aid, 1, 0); @@ -990,11 +990,11 @@ void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void WPAStart2WayGroupHS(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) +void WPAStart2WayGroupHS(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry) { u8 Header802_3[14]; u8 TxTsc[6]; - EAPOL_PACKET EAPOLPKT; + struct rt_eapol_packet EAPOLPKT; u8 group_cipher = Ndis802_11WEPDisabled; u8 default_key = 0; u8 *gnonce_ptr = NULL; @@ -1011,7 +1011,7 @@ void WPAStart2WayGroupHS(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) ADD_ONE_To_64BIT_VAR(pEntry->R_Counter); /* Construct EAPoL message - Group Msg 1 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_GROUP_MSG_1, @@ -1052,12 +1052,12 @@ void WPAStart2WayGroupHS(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) ======================================================================== */ -void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerGroupMsg1Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { u8 Header802_3[14]; - EAPOL_PACKET EAPOLPKT; - PEAPOL_PACKET pGroup; + struct rt_eapol_packet EAPOLPKT; + struct rt_eapol_packet * pGroup; u32 MsgLen; BOOLEAN Cancelled; u8 default_key = 0; @@ -1076,7 +1076,7 @@ void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, } /* Process Group Message 1 frame. skip 802.11 header(24) & LLC_SNAP header(8) */ - pGroup = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pGroup = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer group message 1 - Replay Counter, MIC, RSNIE */ @@ -1092,7 +1092,7 @@ void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, LEN_KEY_DESC_REPLAY); /* Construct EAPoL message - Group Msg 2 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_GROUP_MSG_2, default_key, NULL, /* Nonce not used */ NULL, /* TxRSC not used */ NULL, /* GTK not used */ @@ -1131,14 +1131,14 @@ void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void PeerGroupMsg2Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, +void PeerGroupMsg2Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, void * Msg, u32 MsgLen) { u32 Len; u8 *pData; BOOLEAN Cancelled; - PEAPOL_PACKET pMsg2; + struct rt_eapol_packet * pMsg2; u8 group_cipher = Ndis802_11WEPDisabled; DBGPRINT(RT_DEBUG_TRACE, ("===> PeerGroupMsg2Action \n")); @@ -1148,7 +1148,7 @@ void PeerGroupMsg2Action(IN PRTMP_ADAPTER pAd, break; if (MsgLen < - (LENGTH_802_1_H + LENGTH_EAPOL_H + sizeof(KEY_DESCRIPTER) - + (LENGTH_802_1_H + LENGTH_EAPOL_H + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) break; @@ -1156,7 +1156,7 @@ void PeerGroupMsg2Action(IN PRTMP_ADAPTER pAd, break; pData = (u8 *)Msg; - pMsg2 = (PEAPOL_PACKET) (pData + LENGTH_802_1_H); + pMsg2 = (struct rt_eapol_packet *) (pData + LENGTH_802_1_H); Len = MsgLen - LENGTH_802_1_H; /* Sanity Check peer group message 2 - Replay Counter, MIC */ @@ -1399,7 +1399,7 @@ int PasswordHash(char *password, u8 *ssid, int ssidlength, u8 *output) ======================================================================== */ -void WpaDerivePTK(IN PRTMP_ADAPTER pAd, +void WpaDerivePTK(struct rt_rtmp_adapter *pAd, u8 * PMK, u8 * ANonce, u8 * AA, @@ -1478,7 +1478,7 @@ void WpaDerivePTK(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void GenRandom(IN PRTMP_ADAPTER pAd, u8 * macAddr, u8 * random) +void GenRandom(struct rt_rtmp_adapter *pAd, u8 * macAddr, u8 * random) { int i, curr; u8 local[80], KeyCounter[32]; @@ -1537,7 +1537,7 @@ void GenRandom(IN PRTMP_ADAPTER pAd, u8 * macAddr, u8 * random) ======================================================================== */ -static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, +static void RTMPMakeRsnIeCipher(struct rt_rtmp_adapter *pAd, u8 ElementID, u32 WepStatus, IN BOOLEAN bMixCipher, @@ -1550,7 +1550,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, /* decide WPA2 or WPA1 */ if (ElementID == Wpa2Ie) { - RSNIE2 *pRsnie_cipher = (RSNIE2 *) pRsnIe; + struct rt_rsnie2 *pRsnie_cipher = (struct rt_rsnie2 *)pRsnIe; /* Assign the verson as 1 */ pRsnie_cipher->version = 1; @@ -1562,7 +1562,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA2_TKIP, 4); - *rsn_len = sizeof(RSNIE2); + *rsn_len = sizeof(struct rt_rsnie2); break; /* AES mode */ @@ -1576,7 +1576,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA2_CCMP, 4); - *rsn_len = sizeof(RSNIE2); + *rsn_len = sizeof(struct rt_rsnie2); break; /* TKIP-AES mix mode */ @@ -1602,7 +1602,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, } pRsnie_cipher->ucount = PairwiseCnt; - *rsn_len = sizeof(RSNIE2) + (4 * (PairwiseCnt - 1)); + *rsn_len = sizeof(struct rt_rsnie2) + (4 * (PairwiseCnt - 1)); break; } @@ -1625,7 +1625,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->version = cpu2le16(pRsnie_cipher->version); pRsnie_cipher->ucount = cpu2le16(pRsnie_cipher->ucount); } else { - RSNIE *pRsnie_cipher = (RSNIE *) pRsnIe; + struct rt_rsnie *pRsnie_cipher = (struct rt_rsnie *)pRsnIe; /* Assign OUI and version */ NdisMoveMemory(pRsnie_cipher->oui, OUI_WPA_VERSION, 4); @@ -1638,7 +1638,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA_TKIP, 4); - *rsn_len = sizeof(RSNIE); + *rsn_len = sizeof(struct rt_rsnie); break; /* AES mode */ @@ -1652,7 +1652,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA_CCMP, 4); - *rsn_len = sizeof(RSNIE); + *rsn_len = sizeof(struct rt_rsnie); break; /* TKIP-AES mix mode */ @@ -1678,7 +1678,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, } pRsnie_cipher->ucount = PairwiseCnt; - *rsn_len = sizeof(RSNIE) + (4 * (PairwiseCnt - 1)); + *rsn_len = sizeof(struct rt_rsnie) + (4 * (PairwiseCnt - 1)); break; } @@ -1722,16 +1722,16 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, ======================================================================== */ -static void RTMPMakeRsnIeAKM(IN PRTMP_ADAPTER pAd, +static void RTMPMakeRsnIeAKM(struct rt_rtmp_adapter *pAd, u8 ElementID, u32 AuthMode, u8 apidx, u8 *pRsnIe, u8 * rsn_len) { - RSNIE_AUTH *pRsnie_auth; + struct rt_rsnie_auth *pRsnie_auth; u8 AkmCnt = 1; /* default as 1 */ - pRsnie_auth = (RSNIE_AUTH *) (pRsnIe + (*rsn_len)); + pRsnie_auth = (struct rt_rsnie_auth *) (pRsnIe + (*rsn_len)); /* decide WPA2 or WPA1 */ if (ElementID == Wpa2Ie) { @@ -1781,7 +1781,7 @@ static void RTMPMakeRsnIeAKM(IN PRTMP_ADAPTER pAd, pRsnie_auth->acount = cpu2le16(pRsnie_auth->acount); /* update current RSNIE length */ - (*rsn_len) += (sizeof(RSNIE_AUTH) + (4 * (AkmCnt - 1))); + (*rsn_len) += (sizeof(struct rt_rsnie_auth) + (4 * (AkmCnt - 1))); } @@ -1803,7 +1803,7 @@ static void RTMPMakeRsnIeAKM(IN PRTMP_ADAPTER pAd, ======================================================================== */ -static void RTMPMakeRsnIeCap(IN PRTMP_ADAPTER pAd, +static void RTMPMakeRsnIeCap(struct rt_rtmp_adapter *pAd, u8 ElementID, u8 apidx, u8 *pRsnIe, u8 * rsn_len) @@ -1840,7 +1840,7 @@ static void RTMPMakeRsnIeCap(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPMakeRSNIE(IN PRTMP_ADAPTER pAd, +void RTMPMakeRSNIE(struct rt_rtmp_adapter *pAd, u32 AuthMode, u32 WepStatus, u8 apidx) { u8 *pRsnIe = NULL; /* primary RSNIE */ @@ -1932,8 +1932,8 @@ void RTMPMakeRSNIE(IN PRTMP_ADAPTER pAd, FALSE - otherwise ========================================================================== */ -BOOLEAN RTMPCheckWPAframe(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +BOOLEAN RTMPCheckWPAframe(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 *pData, unsigned long DataByteCount, u8 FromWhichBSSID) { @@ -2044,22 +2044,22 @@ char *GetEapolMsgType(char msg) ======================================================================== */ -BOOLEAN RTMPCheckRSNIE(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckRSNIE(struct rt_rtmp_adapter *pAd, u8 *pData, u8 DataLen, - IN MAC_TABLE_ENTRY * pEntry, u8 * Offset) + struct rt_mac_table_entry *pEntry, u8 * Offset) { u8 *pVIE; u8 len; - PEID_STRUCT pEid; + struct rt_eid * pEid; BOOLEAN result = FALSE; pVIE = pData; len = DataLen; *Offset = 0; - while (len > sizeof(RSNIE2)) { - pEid = (PEID_STRUCT) pVIE; + while (len > sizeof(struct rt_rsnie2)) { + pEid = (struct rt_eid *) pVIE; /* WPA RSN IE */ if ((pEid->Eid == IE_WPA) && (NdisEqualMemory(pEid->Octet, WPA_OUI, 4))) { @@ -2118,14 +2118,14 @@ BOOLEAN RTMPCheckRSNIE(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPParseEapolKeyData(struct rt_rtmp_adapter *pAd, u8 *pKeyData, u8 KeyDataLen, u8 GroupKeyIndex, u8 MsgType, - IN BOOLEAN bWPA2, IN MAC_TABLE_ENTRY * pEntry) + IN BOOLEAN bWPA2, struct rt_mac_table_entry *pEntry) { - PKDE_ENCAP pKDE = NULL; + struct rt_kde_encap * pKDE = NULL; u8 *pMyKeyData = pKeyData; u8 KeyDataLength = KeyDataLen; u8 GTKLEN = 0; @@ -2177,7 +2177,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, && (MsgType == EAPOL_PAIR_MSG_3 || MsgType == EAPOL_GROUP_MSG_1)) { if (KeyDataLength >= 8) /* KDE format exclude GTK length */ { - pKDE = (PKDE_ENCAP) pMyKeyData; + pKDE = (struct rt_kde_encap *) pMyKeyData; DefaultIdx = pKDE->GTKEncap.Kid; @@ -2224,7 +2224,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, } { - PCIPHER_KEY pSharedKey; + struct rt_cipher_key *pSharedKey; /* set key material, TxMic and RxMic */ NdisMoveMemory(pAd->StaCfg.GTK, pMyKeyData, 32); @@ -2233,7 +2233,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, pSharedKey = &pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId]; /* Prepare pair-wise key information into shared key table */ - NdisZeroMemory(pSharedKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(pSharedKey, sizeof(struct rt_cipher_key)); pSharedKey->KeyLen = LEN_TKIP_EK; NdisMoveMemory(pSharedKey->Key, pAd->StaCfg.GTK, LEN_TKIP_EK); NdisMoveMemory(pSharedKey->RxMic, &pAd->StaCfg.GTK[16], @@ -2320,7 +2320,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, +void ConstructEapolMsg(struct rt_mac_table_entry *pEntry, u8 GroupKeyWepStatus, u8 MsgType, u8 DefaultKeyIdx, @@ -2328,7 +2328,7 @@ void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, u8 * TxRSC, u8 * GTK, u8 * RSNIE, - u8 RSNIE_Len, OUT PEAPOL_PACKET pMsg) + u8 RSNIE_Len, struct rt_eapol_packet * pMsg) { BOOLEAN bWPA2 = FALSE; u8 KeyDescVer; @@ -2483,20 +2483,20 @@ void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, ======================================================================== */ -void ConstructEapolKeyData(IN PMAC_TABLE_ENTRY pEntry, +void ConstructEapolKeyData(struct rt_mac_table_entry *pEntry, u8 GroupKeyWepStatus, u8 keyDescVer, u8 MsgType, u8 DefaultKeyIdx, u8 * GTK, u8 * RSNIE, - u8 RSNIE_LEN, OUT PEAPOL_PACKET pMsg) + u8 RSNIE_LEN, struct rt_eapol_packet * pMsg) { u8 *mpool, *Key_Data, *Rc4GTK; u8 ekey[(LEN_KEY_DESC_IV + LEN_EAP_EK)]; unsigned long data_offset; BOOLEAN bWPA2Capable = FALSE; - PRTMP_ADAPTER pAd = pEntry->pAd; + struct rt_rtmp_adapter *pAd = pEntry->pAd; BOOLEAN GTK_Included = FALSE; /* Choose WPA2 or not */ @@ -2661,7 +2661,7 @@ void ConstructEapolKeyData(IN PMAC_TABLE_ENTRY pEntry, ======================================================================== */ static void CalculateMIC(u8 KeyDescVer, - u8 * PTK, OUT PEAPOL_PACKET pMsg) + u8 * PTK, struct rt_eapol_packet * pMsg) { u8 *OutBuffer; unsigned long FrameLen = 0; @@ -2714,12 +2714,12 @@ static void CalculateMIC(u8 KeyDescVer, ======================================================================== */ -int RTMPSoftDecryptBroadCastData(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, +int RTMPSoftDecryptBroadCastData(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, IN NDIS_802_11_ENCRYPTION_STATUS - GroupCipher, IN PCIPHER_KEY pShard_key) + GroupCipher, struct rt_cipher_key *pShard_key) { - PRXWI_STRUC pRxWI = pRxBlk->pRxWI; + struct rt_rxwi * pRxWI = pRxBlk->pRxWI; /* handle WEP decryption */ if (GroupCipher == Ndis802_11Encryption1Enabled) { @@ -2777,15 +2777,15 @@ int RTMPSoftDecryptBroadCastData(IN PRTMP_ADAPTER pAd, u8 *GetSuiteFromRSNIE(u8 *rsnie, u32 rsnie_len, u8 type, u8 * count) { - PEID_STRUCT pEid; + struct rt_eid * pEid; int len; u8 *pBuf; int offset = 0; - PRSNIE_AUTH pAkm; + struct rt_rsnie_auth *pAkm; u16 acount; BOOLEAN isWPA2 = FALSE; - pEid = (PEID_STRUCT) rsnie; + pEid = (struct rt_eid *) rsnie; len = rsnie_len - 2; /* exclude IE and length */ pBuf = (u8 *)& pEid->Octet[0]; @@ -2799,10 +2799,10 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, } /* Check WPA or WPA2 */ if (pEid->Eid == IE_WPA) { - PRSNIE pRsnie = (PRSNIE) pBuf; + struct rt_rsnie *pRsnie = (struct rt_rsnie *)pBuf; u16 ucount; - if (len < sizeof(RSNIE)) { + if (len < sizeof(struct rt_rsnie)) { DBGPRINT_ERR(("%s : The length is too short for WPA\n", __func__)); return NULL; @@ -2827,15 +2827,15 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, return pRsnie->ucast[0].oui; } - offset = sizeof(RSNIE) + (4 * (ucount - 1)); + offset = sizeof(struct rt_rsnie) + (4 * (ucount - 1)); } else if (pEid->Eid == IE_RSN) { - PRSNIE2 pRsnie = (PRSNIE2) pBuf; + struct rt_rsnie2 *pRsnie = (struct rt_rsnie2 *)pBuf; u16 ucount; isWPA2 = TRUE; - if (len < sizeof(RSNIE2)) { + if (len < sizeof(struct rt_rsnie2)) { DBGPRINT_ERR(("%s : The length is too short for WPA2\n", __func__)); return NULL; @@ -2860,7 +2860,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, return pRsnie->ucast[0].oui; } - offset = sizeof(RSNIE2) + (4 * (ucount - 1)); + offset = sizeof(struct rt_rsnie2) + (4 * (ucount - 1)); } else { DBGPRINT_ERR(("%s : Unknown IE (%d)\n", __func__, pEid->Eid)); @@ -2871,13 +2871,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, pBuf += offset; len -= offset; - if (len < sizeof(RSNIE_AUTH)) { + if (len < sizeof(struct rt_rsnie_auth)) { DBGPRINT_ERR(("%s : The length of RSNIE is too short\n", __func__)); return NULL; } /* pointer to AKM count */ - pAkm = (PRSNIE_AUTH) pBuf; + pAkm = (struct rt_rsnie_auth *)pBuf; /* Get the count of pairwise cipher */ acount = cpu2le16(pAkm->acount); @@ -2893,7 +2893,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, *count = acount; return pAkm->auth[0].oui; } - offset = sizeof(RSNIE_AUTH) + (4 * (acount - 1)); + offset = sizeof(struct rt_rsnie_auth) + (4 * (acount - 1)); pBuf += offset; len -= offset; diff --git a/drivers/staging/rt2860/common/crypt_hmac.c b/drivers/staging/rt2860/common/crypt_hmac.c index 6a086f92278a..d7ab08ec1a41 100644 --- a/drivers/staging/rt2860/common/crypt_hmac.c +++ b/drivers/staging/rt2860/common/crypt_hmac.c @@ -51,14 +51,14 @@ void HMAC_SHA1(IN const u8 Key[], IN const u8 Message[], u32 MessageLen, u8 MAC[], u32 MACLen) { - SHA1_CTX_STRUC sha_ctx1; - SHA1_CTX_STRUC sha_ctx2; + struct rt_sha1_ctx sha_ctx1; + struct rt_sha1_ctx sha_ctx2; u8 K0[SHA1_BLOCK_SIZE]; u8 Digest[SHA1_DIGEST_SIZE]; u32 index; - NdisZeroMemory(&sha_ctx1, sizeof(SHA1_CTX_STRUC)); - NdisZeroMemory(&sha_ctx2, sizeof(SHA1_CTX_STRUC)); + NdisZeroMemory(&sha_ctx1, sizeof(struct rt_sha1_ctx)); + NdisZeroMemory(&sha_ctx2, sizeof(struct rt_sha1_ctx)); /* * If the length of K = B(Block size): K0 = K. * If the length of K > B: hash K to obtain an L byte string, @@ -130,14 +130,14 @@ void HMAC_MD5(IN const u8 Key[], IN const u8 Message[], u32 MessageLen, u8 MAC[], u32 MACLen) { - MD5_CTX_STRUC md5_ctx1; - MD5_CTX_STRUC md5_ctx2; + struct rt_md5_ctx_struc md5_ctx1; + struct rt_md5_ctx_struc md5_ctx2; u8 K0[MD5_BLOCK_SIZE]; u8 Digest[MD5_DIGEST_SIZE]; u32 index; - NdisZeroMemory(&md5_ctx1, sizeof(MD5_CTX_STRUC)); - NdisZeroMemory(&md5_ctx2, sizeof(MD5_CTX_STRUC)); + NdisZeroMemory(&md5_ctx1, sizeof(struct rt_md5_ctx_struc)); + NdisZeroMemory(&md5_ctx2, sizeof(struct rt_md5_ctx_struc)); /* * If the length of K = B(Block size): K0 = K. * If the length of K > B: hash K to obtain an L byte string, diff --git a/drivers/staging/rt2860/common/crypt_md5.c b/drivers/staging/rt2860/common/crypt_md5.c index 433aaf27dfa3..6deab659c22b 100644 --- a/drivers/staging/rt2860/common/crypt_md5.c +++ b/drivers/staging/rt2860/common/crypt_md5.c @@ -79,7 +79,7 @@ Note: None ======================================================================== */ -void MD5_Init(IN MD5_CTX_STRUC * pMD5_CTX) +void MD5_Init(struct rt_md5_ctx_struc *pMD5_CTX) { NdisMoveMemory(pMD5_CTX->HashValue, MD5_DefaultHashValue, sizeof(MD5_DefaultHashValue)); @@ -103,7 +103,7 @@ Note: T[i] := floor(abs(sin(i + 1)) * (2 pow 32)), i is number of round ======================================================================== */ -void MD5_Hash(IN MD5_CTX_STRUC * pMD5_CTX) +void MD5_Hash(struct rt_md5_ctx_struc *pMD5_CTX) { u32 X_i; u32 X[16]; @@ -227,7 +227,7 @@ Routine Description: will be called. Arguments: - pMD5_CTX Pointer to MD5_CTX_STRUC + pMD5_CTX Pointer to struct rt_md5_ctx_struc message Message context messageLen The length of message in bytes @@ -238,7 +238,7 @@ Note: None ======================================================================== */ -void MD5_Append(IN MD5_CTX_STRUC * pMD5_CTX, +void MD5_Append(struct rt_md5_ctx_struc *pMD5_CTX, IN const u8 Message[], u32 MessageLen) { u32 appendLen = 0; @@ -271,7 +271,7 @@ Routine Description: 3. Transform the Hash Value to digest message Arguments: - pMD5_CTX Pointer to MD5_CTX_STRUC + pMD5_CTX Pointer to struct rt_md5_ctx_struc Return Value: digestMessage Digest message @@ -280,7 +280,7 @@ Note: None ======================================================================== */ -void MD5_End(IN MD5_CTX_STRUC * pMD5_CTX, u8 DigestMessage[]) +void MD5_End(struct rt_md5_ctx_struc *pMD5_CTX, u8 DigestMessage[]) { u32 index; u64 message_length_bits; @@ -326,9 +326,9 @@ Note: void RT_MD5(IN const u8 Message[], u32 MessageLen, u8 DigestMessage[]) { - MD5_CTX_STRUC md5_ctx; + struct rt_md5_ctx_struc md5_ctx; - NdisZeroMemory(&md5_ctx, sizeof(MD5_CTX_STRUC)); + NdisZeroMemory(&md5_ctx, sizeof(struct rt_md5_ctx_struc)); MD5_Init(&md5_ctx); MD5_Append(&md5_ctx, Message, MessageLen); MD5_End(&md5_ctx, DigestMessage); diff --git a/drivers/staging/rt2860/common/crypt_sha2.c b/drivers/staging/rt2860/common/crypt_sha2.c index 9166ea019eda..fa83fb287fe5 100644 --- a/drivers/staging/rt2860/common/crypt_sha2.c +++ b/drivers/staging/rt2860/common/crypt_sha2.c @@ -52,10 +52,10 @@ static const u32 SHA1_DefaultHashValue[5] = { /* ======================================================================== Routine Description: - Initial SHA1_CTX_STRUC + Initial struct rt_sha1_ctx Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx Return Value: None @@ -64,7 +64,7 @@ Note: None ======================================================================== */ -void RT_SHA1_Init(IN SHA1_CTX_STRUC * pSHA_CTX) +void RT_SHA1_Init(struct rt_sha1_ctx *pSHA_CTX) { NdisMoveMemory(pSHA_CTX->HashValue, SHA1_DefaultHashValue, sizeof(SHA1_DefaultHashValue)); @@ -79,7 +79,7 @@ Routine Description: SHA1 computation for one block (512 bits) Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx Return Value: None @@ -88,7 +88,7 @@ Note: None ======================================================================== */ -void SHA1_Hash(IN SHA1_CTX_STRUC * pSHA_CTX) +void SHA1_Hash(struct rt_sha1_ctx *pSHA_CTX) { u32 W_i, t, s; u32 W[16]; @@ -157,7 +157,7 @@ Routine Description: will be called. Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx message Message context messageLen The length of message in bytes @@ -168,7 +168,7 @@ Note: None ======================================================================== */ -void SHA1_Append(IN SHA1_CTX_STRUC * pSHA_CTX, +void SHA1_Append(struct rt_sha1_ctx *pSHA_CTX, IN const u8 Message[], u32 MessageLen) { u32 appendLen = 0; @@ -201,7 +201,7 @@ Routine Description: 3. Transform the Hash Value to digest message Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx Return Value: digestMessage Digest message @@ -210,7 +210,7 @@ Note: None ======================================================================== */ -void SHA1_End(IN SHA1_CTX_STRUC * pSHA_CTX, u8 DigestMessage[]) +void SHA1_End(struct rt_sha1_ctx *pSHA_CTX, u8 DigestMessage[]) { u32 index; u64 message_length_bits; @@ -257,9 +257,9 @@ void RT_SHA1(IN const u8 Message[], u32 MessageLen, u8 DigestMessage[]) { - SHA1_CTX_STRUC sha_ctx; + struct rt_sha1_ctx sha_ctx; - NdisZeroMemory(&sha_ctx, sizeof(SHA1_CTX_STRUC)); + NdisZeroMemory(&sha_ctx, sizeof(struct rt_sha1_ctx)); RT_SHA1_Init(&sha_ctx); SHA1_Append(&sha_ctx, Message, MessageLen); SHA1_End(&sha_ctx, DigestMessage); diff --git a/drivers/staging/rt2860/common/dfs.c b/drivers/staging/rt2860/common/dfs.c index 8bee5cf03e4b..71cbb2665243 100644 --- a/drivers/staging/rt2860/common/dfs.c +++ b/drivers/staging/rt2860/common/dfs.c @@ -52,7 +52,7 @@ ======================================================================== */ -BOOLEAN RadarChannelCheck(IN PRTMP_ADAPTER pAd, u8 Ch) +BOOLEAN RadarChannelCheck(struct rt_rtmp_adapter *pAd, u8 Ch) { int i; BOOLEAN result = FALSE; diff --git a/drivers/staging/rt2860/common/ee_efuse.c b/drivers/staging/rt2860/common/ee_efuse.c index b997151c25ff..03412f5bc990 100644 --- a/drivers/staging/rt2860/common/ee_efuse.c +++ b/drivers/staging/rt2860/common/ee_efuse.c @@ -73,7 +73,7 @@ typedef union _EFUSE_CTRL_STRUC { ======================================================================== */ -u8 eFuseReadRegisters(IN PRTMP_ADAPTER pAd, +u8 eFuseReadRegisters(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Length, u16 * pData) { EFUSE_CTRL_STRUC eFuseCtrlStruc; @@ -149,7 +149,7 @@ u8 eFuseReadRegisters(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd, +void eFusePhysicalReadRegisters(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Length, u16 * pData) { @@ -214,7 +214,7 @@ void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd, ======================================================================== */ -static void eFuseReadPhysical(IN PRTMP_ADAPTER pAd, +static void eFuseReadPhysical(struct rt_rtmp_adapter *pAd, u16 *lpInBuffer, unsigned long nInBufferSize, u16 *lpOutBuffer, unsigned long nOutBufferSize) @@ -244,7 +244,7 @@ static void eFuseReadPhysical(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int set_eFuseGetFreeBlockCount_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int set_eFuseGetFreeBlockCount_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u16 i; u16 LogicalAddress; @@ -268,7 +268,7 @@ int set_eFuseGetFreeBlockCount_Proc(IN PRTMP_ADAPTER pAd, char *arg) return TRUE; } -int set_eFusedump_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int set_eFusedump_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u16 InBuf[3]; int i = 0; @@ -287,14 +287,14 @@ int set_eFusedump_Proc(IN PRTMP_ADAPTER pAd, char *arg) return TRUE; } -int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd, +int rtmp_ee_efuse_read16(struct rt_rtmp_adapter *pAd, u16 Offset, u16 * pValue) { eFuseReadRegisters(pAd, Offset, 2, pValue); return (*pValue); } -int RtmpEfuseSupportCheck(IN RTMP_ADAPTER * pAd) +int RtmpEfuseSupportCheck(struct rt_rtmp_adapter *pAd) { u16 value; @@ -305,7 +305,7 @@ int RtmpEfuseSupportCheck(IN RTMP_ADAPTER * pAd) return 0; } -void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock) +void eFuseGetFreeBlockCount(struct rt_rtmp_adapter *pAd, u32 *EfuseFreeBlock) { u16 i; u16 LogicalAddress; @@ -331,7 +331,7 @@ void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock) ("eFuseGetFreeBlockCount is 0x%x\n", *EfuseFreeBlock)); } -int eFuse_init(IN PRTMP_ADAPTER pAd) +int eFuse_init(struct rt_rtmp_adapter *pAd) { u32 EfuseFreeBlock = 0; DBGPRINT(RT_DEBUG_ERROR, diff --git a/drivers/staging/rt2860/common/ee_prom.c b/drivers/staging/rt2860/common/ee_prom.c index 8cd654c4f99b..2083740a844b 100644 --- a/drivers/staging/rt2860/common/ee_prom.c +++ b/drivers/staging/rt2860/common/ee_prom.c @@ -38,7 +38,7 @@ #include "../rt_config.h" /* IRQL = PASSIVE_LEVEL */ -static inline void RaiseClock(IN PRTMP_ADAPTER pAd, u32 * x) +static inline void RaiseClock(struct rt_rtmp_adapter *pAd, u32 * x) { *x = *x | EESK; RTMP_IO_WRITE32(pAd, E2PROM_CSR, *x); @@ -46,7 +46,7 @@ static inline void RaiseClock(IN PRTMP_ADAPTER pAd, u32 * x) } /* IRQL = PASSIVE_LEVEL */ -static inline void LowerClock(IN PRTMP_ADAPTER pAd, u32 * x) +static inline void LowerClock(struct rt_rtmp_adapter *pAd, u32 * x) { *x = *x & ~EESK; RTMP_IO_WRITE32(pAd, E2PROM_CSR, *x); @@ -54,7 +54,7 @@ static inline void LowerClock(IN PRTMP_ADAPTER pAd, u32 * x) } /* IRQL = PASSIVE_LEVEL */ -static inline u16 ShiftInBits(IN PRTMP_ADAPTER pAd) +static inline u16 ShiftInBits(struct rt_rtmp_adapter *pAd) { u32 x, i; u16 data = 0; @@ -79,7 +79,7 @@ static inline u16 ShiftInBits(IN PRTMP_ADAPTER pAd) } /* IRQL = PASSIVE_LEVEL */ -static inline void ShiftOutBits(IN PRTMP_ADAPTER pAd, +static inline void ShiftOutBits(struct rt_rtmp_adapter *pAd, u16 data, u16 count) { u32 x, mask; @@ -107,7 +107,7 @@ static inline void ShiftOutBits(IN PRTMP_ADAPTER pAd, } /* IRQL = PASSIVE_LEVEL */ -static inline void EEpromCleanup(IN PRTMP_ADAPTER pAd) +static inline void EEpromCleanup(struct rt_rtmp_adapter *pAd) { u32 x; @@ -120,7 +120,7 @@ static inline void EEpromCleanup(IN PRTMP_ADAPTER pAd) LowerClock(pAd, &x); } -static inline void EWEN(IN PRTMP_ADAPTER pAd) +static inline void EWEN(struct rt_rtmp_adapter *pAd) { u32 x; @@ -141,7 +141,7 @@ static inline void EWEN(IN PRTMP_ADAPTER pAd) EEpromCleanup(pAd); } -static inline void EWDS(IN PRTMP_ADAPTER pAd) +static inline void EWDS(struct rt_rtmp_adapter *pAd) { u32 x; @@ -163,7 +163,7 @@ static inline void EWDS(IN PRTMP_ADAPTER pAd) } /* IRQL = PASSIVE_LEVEL */ -int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd, +int rtmp_ee_prom_read16(struct rt_rtmp_adapter *pAd, u16 Offset, u16 * pValue) { u32 x; diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c index 764de3a7807f..94670076d32b 100644 --- a/drivers/staging/rt2860/common/eeprom.c +++ b/drivers/staging/rt2860/common/eeprom.c @@ -36,9 +36,9 @@ */ #include "../rt_config.h" -int RtmpChipOpsEepromHook(IN RTMP_ADAPTER * pAd, int infType) +int RtmpChipOpsEepromHook(struct rt_rtmp_adapter *pAd, int infType) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; #ifdef RT30xx #ifdef RTMP_EFUSE_SUPPORT u32 eFuseCtrl, MacCsr0; diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index fcf030b7db66..8cd8f53ed0e6 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c @@ -356,7 +356,7 @@ u8 ZeroSsid[32] = ========================================================================== */ -int MlmeInit(IN PRTMP_ADAPTER pAd) +int MlmeInit(struct rt_rtmp_adapter *pAd) { int Status = NDIS_STATUS_SUCCESS; @@ -453,9 +453,9 @@ int MlmeInit(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void MlmeHandler(IN PRTMP_ADAPTER pAd) +void MlmeHandler(struct rt_rtmp_adapter *pAd) { - MLME_QUEUE_ELEM *Elem = NULL; + struct rt_mlme_queue_elem *Elem = NULL; /* Only accept MLME and Frame from peer side, no other (control/data) frame should */ /* get into this state machine */ @@ -571,7 +571,7 @@ void MlmeHandler(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void MlmeHalt(IN PRTMP_ADAPTER pAd) +void MlmeHalt(struct rt_rtmp_adapter *pAd) { BOOLEAN Cancelled; @@ -610,7 +610,7 @@ void MlmeHalt(IN PRTMP_ADAPTER pAd) RTMPCancelTimer(&pAd->Mlme.RxAntEvalTimer, &Cancelled); if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; /* Set LED */ RTMPSetLED(pAd, LED_HALT); @@ -639,7 +639,7 @@ void MlmeHalt(IN PRTMP_ADAPTER pAd) DBGPRINT(RT_DEBUG_TRACE, ("<== MlmeHalt\n")); } -void MlmeResetRalinkCounters(IN PRTMP_ADAPTER pAd) +void MlmeResetRalinkCounters(struct rt_rtmp_adapter *pAd) { pAd->RalinkCounters.LastOneSecRxOkDataCnt = pAd->RalinkCounters.OneSecRxOkDataCnt; @@ -694,7 +694,7 @@ void MlmePeriodicExec(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { unsigned long TxTotalCnt; - PRTMP_ADAPTER pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; #ifdef RTMP_MAC_PCI { @@ -938,8 +938,8 @@ BOOLEAN MlmeValidateSSID(u8 *pSsid, u8 SsidLen) return (TRUE); } -void MlmeSelectTxRateTable(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 ** ppTable, u8 *pTableSize, u8 *pInitTxRateIdx) { @@ -1144,7 +1144,7 @@ void MlmeSelectTxRateTable(IN PRTMP_ADAPTER pAd, } while (FALSE); } -void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) +void STAMlmePeriodicExec(struct rt_rtmp_adapter *pAd) { unsigned long TxTotalCnt; int i; @@ -1385,7 +1385,7 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) pAd->StaCfg.LastBeaconRxTime + ADHOC_BEACON_LOST_TIME) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)) { - MLME_START_REQ_STRUCT StartReq; + struct rt_mlme_start_req StartReq; DBGPRINT(RT_DEBUG_TRACE, ("MMCHK - excessive BEACON lost, last STA in this IBSS, MediaState=Disconnected\n")); @@ -1395,12 +1395,12 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) (char *) pAd->MlmeAux.Ssid, pAd->MlmeAux.SsidLen); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_START_REQ, - sizeof(MLME_START_REQ_STRUCT), &StartReq); + sizeof(struct rt_mlme_start_req), &StartReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_START; } for (i = 1; i < MAX_LEN_OF_MAC_TABLE; i++) { - MAC_TABLE_ENTRY *pEntry = &pAd->MacTab.Content[i]; + struct rt_mac_table_entry *pEntry = &pAd->MacTab.Content[i]; if (pEntry->ValidAsCLI == FALSE) continue; @@ -1429,7 +1429,7 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) pAd->MlmeAux.AutoReconnectSsidLen) == TRUE)) { if ((pAd->ScanTab.BssNr == 0) && (pAd->Mlme.CntlMachine.CurrState == CNTL_IDLE)) { - MLME_SCAN_REQ_STRUCT ScanReq; + struct rt_mlme_scan_req ScanReq; if (RTMP_TIME_AFTER (pAd->Mlme.Now32, @@ -1447,7 +1447,7 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_SCAN_REQ, sizeof - (MLME_SCAN_REQ_STRUCT), + (struct rt_mlme_scan_req), &ScanReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_LIST_SCAN; @@ -1491,10 +1491,10 @@ void LinkDownExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; if (pAd != NULL) { - MLME_DISASSOC_REQ_STRUCT DisassocReq; + struct rt_mlme_disassoc_req DisassocReq; if ((pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED) && (INFRA_ON(pAd))) { @@ -1505,7 +1505,7 @@ void LinkDownExec(void *SystemSpecific1, REASON_DISASSOC_STA_LEAVING); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_DISASSOC; @@ -1517,7 +1517,7 @@ void LinkDownExec(void *SystemSpecific1, } /* IRQL = DISPATCH_LEVEL */ -void MlmeAutoScan(IN PRTMP_ADAPTER pAd) +void MlmeAutoScan(struct rt_rtmp_adapter *pAd) { /* check CntlMachine.CurrState to avoid collision with NDIS SetOID request */ if (pAd->Mlme.CntlMachine.CurrState == CNTL_IDLE) { @@ -1532,7 +1532,7 @@ void MlmeAutoScan(IN PRTMP_ADAPTER pAd) } /* IRQL = DISPATCH_LEVEL */ -void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) +void MlmeAutoReconnectLastSSID(struct rt_rtmp_adapter *pAd) { if (pAd->StaCfg.bAutoConnectByBssid) { DBGPRINT(RT_DEBUG_TRACE, @@ -1555,7 +1555,7 @@ void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) (MlmeValidateSSID (pAd->MlmeAux.AutoReconnectSsid, pAd->MlmeAux.AutoReconnectSsidLen) == TRUE)) { - NDIS_802_11_SSID OidSsid; + struct rt_ndis_802_11_ssid OidSsid; OidSsid.SsidLength = pAd->MlmeAux.AutoReconnectSsidLen; NdisMoveMemory(OidSsid.Ssid, pAd->MlmeAux.AutoReconnectSsid, pAd->MlmeAux.AutoReconnectSsidLen); @@ -1565,7 +1565,7 @@ void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) pAd->MlmeAux.AutoReconnectSsid, pAd->MlmeAux.AutoReconnectSsidLen)); MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, OID_802_11_SSID, - sizeof(NDIS_802_11_SSID), &OidSsid); + sizeof(struct rt_ndis_802_11_ssid), &OidSsid); RTMP_MLME_HANDLER(pAd); } } @@ -1582,11 +1582,11 @@ void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) Output: ========================================================================== */ -void MlmeCheckForRoaming(IN PRTMP_ADAPTER pAd, unsigned long Now32) +void MlmeCheckForRoaming(struct rt_rtmp_adapter *pAd, unsigned long Now32) { u16 i; - BSS_TABLE *pRoamTab = &pAd->MlmeAux.RoamTab; - BSS_ENTRY *pBss; + struct rt_bss_table *pRoamTab = &pAd->MlmeAux.RoamTab; + struct rt_bss_entry *pBss; DBGPRINT(RT_DEBUG_TRACE, ("==> MlmeCheckForRoaming\n")); /* put all roaming candidates into RoamTab, and sort in RSSI order */ @@ -1607,7 +1607,7 @@ void MlmeCheckForRoaming(IN PRTMP_ADAPTER pAd, unsigned long Now32) /* AP passing all above rules is put into roaming candidate table */ NdisMoveMemory(&pRoamTab->BssEntry[pRoamTab->BssNr], pBss, - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); pRoamTab->BssNr += 1; } @@ -1640,11 +1640,11 @@ void MlmeCheckForRoaming(IN PRTMP_ADAPTER pAd, unsigned long Now32) Output: ========================================================================== */ -BOOLEAN MlmeCheckForFastRoaming(IN PRTMP_ADAPTER pAd) +BOOLEAN MlmeCheckForFastRoaming(struct rt_rtmp_adapter *pAd) { u16 i; - BSS_TABLE *pRoamTab = &pAd->MlmeAux.RoamTab; - BSS_ENTRY *pBss; + struct rt_bss_table *pRoamTab = &pAd->MlmeAux.RoamTab; + struct rt_bss_entry *pBss; DBGPRINT(RT_DEBUG_TRACE, ("==> MlmeCheckForFastRoaming\n")); /* put all roaming candidates into RoamTab, and sort in RSSI order */ @@ -1676,7 +1676,7 @@ BOOLEAN MlmeCheckForFastRoaming(IN PRTMP_ADAPTER pAd) pBss->Rssi)); /* AP passing all above rules is put into roaming candidate table */ NdisMoveMemory(&pRoamTab->BssEntry[pRoamTab->BssNr], pBss, - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); pRoamTab->BssNr += 1; } @@ -1699,8 +1699,8 @@ BOOLEAN MlmeCheckForFastRoaming(IN PRTMP_ADAPTER pAd) return FALSE; } -void MlmeSetTxRate(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, IN PRTMP_TX_RATE_SWITCH pTxRate) +void MlmeSetTxRate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_rtmp_tx_rate_switch * pTxRate) { u8 MaxMode = MODE_OFDM; @@ -1840,13 +1840,13 @@ void MlmeSetTxRate(IN PRTMP_ADAPTER pAd, call this routine every second ========================================================================== */ -void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) +void MlmeDynamicTxRateSwitching(struct rt_rtmp_adapter *pAd) { u8 UpRateIdx = 0, DownRateIdx = 0, CurrRateIdx; unsigned long i, AccuTxTotalCnt = 0, TxTotalCnt; unsigned long TxErrorRatio = 0; BOOLEAN bTxRateChanged = FALSE, bUpgradeQuality = FALSE; - PRTMP_TX_RATE_SWITCH pCurrTxRate, pNextTxRate = NULL; + struct rt_rtmp_tx_rate_switch *pCurrTxRate, *pNextTxRate = NULL; u8 *pTable; u8 TableSize = 0; u8 InitTxRateIdx = 0, TrainUp, TrainDown; @@ -1854,8 +1854,8 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) TX_STA_CNT1_STRUC StaTx1; TX_STA_CNT0_STRUC TxStaCnt0; unsigned long TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0; - MAC_TABLE_ENTRY *pEntry; - RSSI_SAMPLE *pRssi = &pAd->StaCfg.RssiSample; + struct rt_mac_table_entry *pEntry; + struct rt_rssi_sample *pRssi = &pAd->StaCfg.RssiSample; /* */ /* walk through MAC table, see if need to change AP's TX rate toward each entry */ @@ -1982,7 +1982,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) /* When switch from Fixed rate -> auto rate, the REAL TX rate might be different from pAd->CommonCfg.TxRateIndex. */ /* So need to sync here. */ pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(CurrRateIdx + 1) * 5]; + (struct rt_rtmp_tx_rate_switch *) & pTable[(CurrRateIdx + 1) * 5]; if ((pEntry->HTPhyMode.field.MCS != pCurrTxRate->CurrMCS) /*&& (pAd->StaCfg.bAutoTxRateSwitch == TRUE) */ ) { @@ -1990,7 +1990,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) /* Need to sync Real Tx rate and our record. */ /* Then return for next DRS. */ pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(InitTxRateIdx + 1) + (struct rt_rtmp_tx_rate_switch *) & pTable[(InitTxRateIdx + 1) * 5]; pEntry->CurrTxRateIndex = InitTxRateIdx; MlmeSetTxRate(pAd, pEntry, pCurrTxRate); @@ -2012,7 +2012,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) } pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(CurrRateIdx + 1) * 5]; + (struct rt_rtmp_tx_rate_switch *) & pTable[(CurrRateIdx + 1) * 5]; if ((Rssi > -65) && (pCurrTxRate->Mode >= MODE_HTMIX)) { TrainUp = @@ -2049,7 +2049,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) /* check the existence and index of each needed MCS */ while (idx < pTable[0]) { pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(idx + 1) * + (struct rt_rtmp_tx_rate_switch *) & pTable[(idx + 1) * 5]; if (pCurrTxRate->CurrMCS == MCS_0) { @@ -2192,7 +2192,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) { pEntry->CurrTxRateIndex = TxRateIdx; pNextTxRate = - (PRTMP_TX_RATE_SWITCH) & + (struct rt_rtmp_tx_rate_switch *) & pTable[(pEntry->CurrTxRateIndex + 1) * 5]; MlmeSetTxRate(pAd, pEntry, pNextTxRate); } @@ -2332,7 +2332,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) } pNextTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(tmpTxRate + 1) * + (struct rt_rtmp_tx_rate_switch *) & pTable[(tmpTxRate + 1) * 5]; } if (bTxRateChanged && pNextTxRate) { @@ -2364,12 +2364,12 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; u8 UpRateIdx = 0, DownRateIdx = 0, CurrRateIdx = 0; unsigned long TxTotalCnt; unsigned long TxErrorRatio = 0; BOOLEAN bTxRateChanged; /*, bUpgradeQuality = FALSE; */ - PRTMP_TX_RATE_SWITCH pCurrTxRate, pNextTxRate = NULL; + struct rt_rtmp_tx_rate_switch *pCurrTxRate, *pNextTxRate = NULL; u8 *pTable; u8 TableSize = 0; u8 InitTxRateIdx = 0, TrainUp, TrainDown; @@ -2377,7 +2377,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, TX_STA_CNT0_STRUC TxStaCnt0; char Rssi, ratio; unsigned long TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0; - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; unsigned long i; pAd->StaCfg.StaQuickResponeForRateUpTimerRunning = FALSE; @@ -2421,7 +2421,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, } pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(CurrRateIdx + 1) * 5]; + (struct rt_rtmp_tx_rate_switch *) & pTable[(CurrRateIdx + 1) * 5]; if ((Rssi > -65) && (pCurrTxRate->Mode >= MODE_HTMIX)) { TrainUp = @@ -2574,7 +2574,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, } pNextTxRate = - (PRTMP_TX_RATE_SWITCH) & + (struct rt_rtmp_tx_rate_switch *) & pTable[(pAd->CommonCfg.TxRateIndex + 1) * 5]; if (bTxRateChanged && pNextTxRate) { MlmeSetTxRate(pAd, pEntry, pNextTxRate); @@ -2601,7 +2601,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, ========================================================================== */ -void MlmeCheckPsmChange(IN PRTMP_ADAPTER pAd, unsigned long Now32) +void MlmeCheckPsmChange(struct rt_rtmp_adapter *pAd, unsigned long Now32) { unsigned long PowerMode; @@ -2638,7 +2638,7 @@ void MlmeCheckPsmChange(IN PRTMP_ADAPTER pAd, unsigned long Now32) /* IRQL = PASSIVE_LEVEL */ /* IRQL = DISPATCH_LEVEL */ -void MlmeSetPsmBit(IN PRTMP_ADAPTER pAd, u16 psm) +void MlmeSetPsmBit(struct rt_rtmp_adapter *pAd, u16 psm) { AUTO_RSP_CFG_STRUC csr4; @@ -2669,14 +2669,14 @@ void MlmeSetPsmBit(IN PRTMP_ADAPTER pAd, u16 psm) channel quality based on the most up-to-date information ========================================================================== */ -void MlmeCalculateChannelQuality(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pMacEntry, unsigned long Now32) +void MlmeCalculateChannelQuality(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pMacEntry, unsigned long Now32) { unsigned long TxOkCnt, TxCnt, TxPER, TxPRR; unsigned long RxCnt, RxPER; u8 NorRssi; char MaxRssi; - RSSI_SAMPLE *pRssiSample = NULL; + struct rt_rssi_sample *pRssiSample = NULL; u32 OneSecTxNoRetryOkCount = 0; u32 OneSecTxRetryOkCount = 0; u32 OneSecTxFailCount = 0; @@ -2751,7 +2751,7 @@ void MlmeCalculateChannelQuality(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -void MlmeSetTxPreamble(IN PRTMP_ADAPTER pAd, u16 TxPreamble) +void MlmeSetTxPreamble(struct rt_rtmp_adapter *pAd, u16 TxPreamble) { AUTO_RSP_CFG_STRUC csr4; @@ -2785,7 +2785,7 @@ void MlmeSetTxPreamble(IN PRTMP_ADAPTER pAd, u16 TxPreamble) ========================================================================== */ -void UpdateBasicRateBitmap(IN PRTMP_ADAPTER pAdapter) +void UpdateBasicRateBitmap(struct rt_rtmp_adapter *pAdapter) { int i, j; /* 1 2 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */ @@ -2831,7 +2831,7 @@ void UpdateBasicRateBitmap(IN PRTMP_ADAPTER pAdapter) /* IRQL = DISPATCH_LEVEL */ /* bLinkUp is to identify the inital link speed. */ /* TRUE indicates the rate update at linkup, we should not try to set the rate at 54Mbps. */ -void MlmeUpdateTxRates(IN PRTMP_ADAPTER pAd, IN BOOLEAN bLinkUp, u8 apidx) +void MlmeUpdateTxRates(struct rt_rtmp_adapter *pAd, IN BOOLEAN bLinkUp, u8 apidx) { int i, num; u8 Rate = RATE_6, MaxDesire = RATE_1, MaxSupport = RATE_1; @@ -3292,15 +3292,15 @@ void MlmeUpdateTxRates(IN PRTMP_ADAPTER pAd, IN BOOLEAN bLinkUp, u8 apidx) ========================================================================== */ -void MlmeUpdateHtTxRates(IN PRTMP_ADAPTER pAd, u8 apidx) +void MlmeUpdateHtTxRates(struct rt_rtmp_adapter *pAd, u8 apidx) { u8 StbcMcs; /*j, StbcMcs, bitmask; */ char i; /* 3*3 */ - RT_HT_CAPABILITY *pRtHtCap = NULL; - RT_HT_PHY_INFO *pActiveHtPhy = NULL; + struct rt_ht_capability *pRtHtCap = NULL; + struct rt_ht_phy_info *pActiveHtPhy = NULL; unsigned long BasicMCS; u8 j, bitmask; - PRT_HT_PHY_INFO pDesireHtPhy = NULL; + struct rt_ht_phy_info *pDesireHtPhy = NULL; PHTTRANSMIT_SETTING pHtPhy = NULL; PHTTRANSMIT_SETTING pMaxHtPhy = NULL; PHTTRANSMIT_SETTING pMinHtPhy = NULL; @@ -3444,7 +3444,7 @@ void MlmeUpdateHtTxRates(IN PRTMP_ADAPTER pAd, u8 apidx) DBGPRINT(RT_DEBUG_TRACE, ("MlmeUpdateHtTxRates<=== \n")); } -void BATableInit(IN PRTMP_ADAPTER pAd, IN BA_TABLE * Tab) +void BATableInit(struct rt_rtmp_adapter *pAd, struct rt_ba_table *Tab) { int i; @@ -3462,13 +3462,13 @@ void BATableInit(IN PRTMP_ADAPTER pAd, IN BA_TABLE * Tab) } /* IRQL = DISPATCH_LEVEL */ -void MlmeRadioOff(IN PRTMP_ADAPTER pAd) +void MlmeRadioOff(struct rt_rtmp_adapter *pAd) { RTMP_MLME_RADIO_OFF(pAd); } /* IRQL = DISPATCH_LEVEL */ -void MlmeRadioOn(IN PRTMP_ADAPTER pAd) +void MlmeRadioOn(struct rt_rtmp_adapter *pAd) { RTMP_MLME_RADIO_ON(pAd); } @@ -3487,14 +3487,14 @@ void MlmeRadioOn(IN PRTMP_ADAPTER pAd) IRQL = DISPATCH_LEVEL */ -void BssTableInit(IN BSS_TABLE * Tab) +void BssTableInit(struct rt_bss_table *Tab) { int i; Tab->BssNr = 0; Tab->BssOverlapNr = 0; for (i = 0; i < MAX_LEN_OF_BSS_TABLE; i++) { - NdisZeroMemory(&Tab->BssEntry[i], sizeof(BSS_ENTRY)); + NdisZeroMemory(&Tab->BssEntry[i], sizeof(struct rt_bss_entry)); Tab->BssEntry[i].Rssi = -127; /* initial the rssi as a minimum value */ } } @@ -3510,7 +3510,7 @@ void BssTableInit(IN BSS_TABLE * Tab) IRQL = DISPATCH_LEVEL */ -unsigned long BssTableSearch(IN BSS_TABLE * Tab, u8 *pBssid, u8 Channel) +unsigned long BssTableSearch(struct rt_bss_table *Tab, u8 *pBssid, u8 Channel) { u8 i; @@ -3528,7 +3528,7 @@ unsigned long BssTableSearch(IN BSS_TABLE * Tab, u8 *pBssid, u8 Channel) return (unsigned long)BSS_NOT_FOUND; } -unsigned long BssSsidTableSearch(IN BSS_TABLE * Tab, +unsigned long BssSsidTableSearch(struct rt_bss_table *Tab, u8 *pBssid, u8 *pSsid, u8 SsidLen, u8 Channel) { @@ -3550,7 +3550,7 @@ unsigned long BssSsidTableSearch(IN BSS_TABLE * Tab, return (unsigned long)BSS_NOT_FOUND; } -unsigned long BssTableSearchWithSSID(IN BSS_TABLE * Tab, +unsigned long BssTableSearchWithSSID(struct rt_bss_table *Tab, u8 *Bssid, u8 *pSsid, u8 SsidLen, u8 Channel) @@ -3575,7 +3575,7 @@ unsigned long BssTableSearchWithSSID(IN BSS_TABLE * Tab, return (unsigned long)BSS_NOT_FOUND; } -unsigned long BssSsidTableSearchBySSID(IN BSS_TABLE * Tab, +unsigned long BssSsidTableSearchBySSID(struct rt_bss_table *Tab, u8 *pSsid, u8 SsidLen) { u8 i; @@ -3591,7 +3591,7 @@ unsigned long BssSsidTableSearchBySSID(IN BSS_TABLE * Tab, } /* IRQL = DISPATCH_LEVEL */ -void BssTableDeleteEntry(IN OUT BSS_TABLE * Tab, +void BssTableDeleteEntry(struct rt_bss_table *Tab, u8 *pBssid, u8 Channel) { u8 i, j; @@ -3602,10 +3602,10 @@ void BssTableDeleteEntry(IN OUT BSS_TABLE * Tab, for (j = i; j < Tab->BssNr - 1; j++) { NdisMoveMemory(&(Tab->BssEntry[j]), &(Tab->BssEntry[j + 1]), - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); } NdisZeroMemory(&(Tab->BssEntry[Tab->BssNr - 1]), - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); Tab->BssNr -= 1; return; } @@ -3621,8 +3621,8 @@ void BssTableDeleteEntry(IN OUT BSS_TABLE * Tab, // IRQL = DISPATCH_LEVEL ======================================================================== */ -void BATableDeleteORIEntry(IN OUT PRTMP_ADAPTER pAd, - IN BA_ORI_ENTRY * pBAORIEntry) +void BATableDeleteORIEntry(struct rt_rtmp_adapter *pAd, + struct rt_ba_ori_entry *pBAORIEntry) { if (pBAORIEntry->ORI_BA_Status != Originator_NONE) { @@ -3652,7 +3652,7 @@ void BATableDeleteORIEntry(IN OUT PRTMP_ADAPTER pAd, IRQL = DISPATCH_LEVEL */ -void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, IN PCF_PARM pCfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, IN HT_CAPABILITY_IE * pHtCapability, IN ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +void BssEntrySet(struct rt_rtmp_adapter *pAd, struct rt_bss_entry *pBss, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, struct rt_cf_parm * pCfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 HtCapabilityLen, u8 AddHtInfoLen, u8 NewExtChanOffset, @@ -3660,10 +3660,10 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss char Rssi, IN LARGE_INTEGER TimeStamp, u8 CkipFlag, - IN PEDCA_PARM pEdcaParm, - IN PQOS_CAPABILITY_PARM pQosCapability, - IN PQBSS_LOAD_PARM pQbssLoad, - u16 LengthVIE, IN PNDIS_802_11_VARIABLE_IEs pVIE) + struct rt_edca_parm *pEdcaParm, + struct rt_qos_capability_parm *pQosCapability, + struct rt_qbss_load_parm *pQbssLoad, + u16 LengthVIE, struct rt_ndis_802_11_variable_ies *pVIE) { COPY_MAC_ADDR(pBss->Bssid, pBssid); /* Default Hidden SSID to be TRUE, it will be turned to FALSE after coping SSID */ @@ -3761,27 +3761,27 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss /* new for QOS */ if (pEdcaParm) - NdisMoveMemory(&pBss->EdcaParm, pEdcaParm, sizeof(EDCA_PARM)); + NdisMoveMemory(&pBss->EdcaParm, pEdcaParm, sizeof(struct rt_edca_parm)); else pBss->EdcaParm.bValid = FALSE; if (pQosCapability) NdisMoveMemory(&pBss->QosCapability, pQosCapability, - sizeof(QOS_CAPABILITY_PARM)); + sizeof(struct rt_qos_capability_parm)); else pBss->QosCapability.bValid = FALSE; if (pQbssLoad) NdisMoveMemory(&pBss->QbssLoad, pQbssLoad, - sizeof(QBSS_LOAD_PARM)); + sizeof(struct rt_qbss_load_parm)); else pBss->QbssLoad.bValid = FALSE; { - PEID_STRUCT pEid; + struct rt_eid * pEid; u16 Length = 0; NdisZeroMemory(&pBss->WpaIE.IE[0], MAX_CUSTOM_LEN); NdisZeroMemory(&pBss->RsnIE.IE[0], MAX_CUSTOM_LEN); - pEid = (PEID_STRUCT) pVIE; + pEid = (struct rt_eid *) pVIE; while ((Length + 2 + (u16)pEid->Len) <= LengthVIE) { switch (pEid->Eid) { case IE_WPA: @@ -3809,7 +3809,7 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss break; } Length = Length + 2 + (u16)pEid->Len; /* Eid[1] + Len[1]+ content[Len] */ - pEid = (PEID_STRUCT) ((u8 *) pEid + 2 + pEid->Len); + pEid = (struct rt_eid *) ((u8 *) pEid + 2 + pEid->Len); } } } @@ -3837,7 +3837,7 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss IRQL = DISPATCH_LEVEL */ -unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT BSS_TABLE * Tab, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, IN CF_PARM * CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, IN HT_CAPABILITY_IE * pHtCapability, IN ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +unsigned long BssTableSetEntry(struct rt_rtmp_adapter *pAd, struct rt_bss_table *Tab, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, struct rt_cf_parm * CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 HtCapabilityLen, u8 AddHtInfoLen, u8 NewExtChanOffset, @@ -3845,10 +3845,10 @@ unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT BSS_TABLE * Tab, u8 *pB char Rssi, IN LARGE_INTEGER TimeStamp, u8 CkipFlag, - IN PEDCA_PARM pEdcaParm, - IN PQOS_CAPABILITY_PARM pQosCapability, - IN PQBSS_LOAD_PARM pQbssLoad, - u16 LengthVIE, IN PNDIS_802_11_VARIABLE_IEs pVIE) + struct rt_edca_parm *pEdcaParm, + struct rt_qos_capability_parm *pQosCapability, + struct rt_qbss_load_parm *pQbssLoad, + u16 LengthVIE, struct rt_ndis_802_11_variable_ies *pVIE) { unsigned long Idx; @@ -3924,14 +3924,14 @@ unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT BSS_TABLE * Tab, u8 *pB } /* IRQL = DISPATCH_LEVEL */ -void BssTableSsidSort(IN PRTMP_ADAPTER pAd, - OUT BSS_TABLE * OutTab, char Ssid[], u8 SsidLen) +void BssTableSsidSort(struct rt_rtmp_adapter *pAd, + struct rt_bss_table *OutTab, char Ssid[], u8 SsidLen) { int i; BssTableInit(OutTab); for (i = 0; i < pAd->ScanTab.BssNr; i++) { - BSS_ENTRY *pInBss = &pAd->ScanTab.BssEntry[i]; + struct rt_bss_entry *pInBss = &pAd->ScanTab.BssEntry[i]; BOOLEAN bIsHiddenApIncluded = FALSE; if (((pAd->CommonCfg.bIEEE80211H == 1) && @@ -3945,7 +3945,7 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, if ((pInBss->BssType == pAd->StaCfg.BssType) && (SSID_EQUAL(Ssid, SsidLen, pInBss->Ssid, pInBss->SsidLen) || bIsHiddenApIncluded)) { - BSS_ENTRY *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; + struct rt_bss_entry *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; /* 2.4G/5G N only mode */ if ((pInBss->HtCapabilityLen == 0) && @@ -4067,12 +4067,12 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, } } /* copy matching BSS from InTab to OutTab */ - NdisMoveMemory(pOutBss, pInBss, sizeof(BSS_ENTRY)); + NdisMoveMemory(pOutBss, pInBss, sizeof(struct rt_bss_entry)); OutTab->BssNr++; } else if ((pInBss->BssType == pAd->StaCfg.BssType) && (SsidLen == 0)) { - BSS_ENTRY *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; + struct rt_bss_entry *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; /* 2.4G/5G N only mode */ if ((pInBss->HtCapabilityLen == 0) && @@ -4167,7 +4167,7 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, } } /* copy matching BSS from InTab to OutTab */ - NdisMoveMemory(pOutBss, pInBss, sizeof(BSS_ENTRY)); + NdisMoveMemory(pOutBss, pInBss, sizeof(struct rt_bss_entry)); OutTab->BssNr++; } @@ -4180,33 +4180,33 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -void BssTableSortByRssi(IN OUT BSS_TABLE * OutTab) +void BssTableSortByRssi(struct rt_bss_table *OutTab) { int i, j; - BSS_ENTRY TmpBss; + struct rt_bss_entry TmpBss; for (i = 0; i < OutTab->BssNr - 1; i++) { for (j = i + 1; j < OutTab->BssNr; j++) { if (OutTab->BssEntry[j].Rssi > OutTab->BssEntry[i].Rssi) { NdisMoveMemory(&TmpBss, &OutTab->BssEntry[j], - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); NdisMoveMemory(&OutTab->BssEntry[j], &OutTab->BssEntry[i], - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); NdisMoveMemory(&OutTab->BssEntry[i], &TmpBss, - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); } } } } -void BssCipherParse(IN OUT PBSS_ENTRY pBss) +void BssCipherParse(struct rt_bss_entry *pBss) { - PEID_STRUCT pEid; + struct rt_eid * pEid; u8 *pTmp; - PRSN_IE_HEADER_STRUCT pRsnHeader; - PCIPHER_SUITE_STRUCT pCipher; - PAKM_SUITE_STRUCT pAKM; + struct rt_rsn_ie_header * pRsnHeader; + struct rt_cipher_suite_struct * pCipher; + struct rt_akm_suite * pAKM; u16 Count; int Length; NDIS_802_11_ENCRYPTION_STATUS TmpCipher; @@ -4242,7 +4242,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) while (Length > 0) { /* Parse cipher suite base on WPA1 & WPA2, they should be parsed differently */ pTmp = ((u8 *)pBss->VarIEs) + pBss->VarIELen - Length; - pEid = (PEID_STRUCT) pTmp; + pEid = (struct rt_eid *) pTmp; switch (pEid->Eid) { case IE_WPA: if (NdisEqualMemory(pEid->Octet, SES_OUI, 3) @@ -4380,15 +4380,15 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) break; case IE_RSN: - pRsnHeader = (PRSN_IE_HEADER_STRUCT) pTmp; + pRsnHeader = (struct rt_rsn_ie_header *) pTmp; /* 0. Version must be 1 */ if (le2cpu16(pRsnHeader->Version) != 1) break; - pTmp += sizeof(RSN_IE_HEADER_STRUCT); + pTmp += sizeof(struct rt_rsn_ie_header); /* 1. Check group cipher */ - pCipher = (PCIPHER_SUITE_STRUCT) pTmp; + pCipher = (struct rt_cipher_suite_struct *) pTmp; if (!RTMPEqualMemory(pTmp, RSN_OUI, 3)) break; @@ -4414,7 +4414,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) break; } /* set to correct offset for next parsing */ - pTmp += sizeof(CIPHER_SUITE_STRUCT); + pTmp += sizeof(struct rt_cipher_suite_struct); /* 2. Get pairwise cipher counts */ /*Count = *(u16 *)pTmp; */ @@ -4425,7 +4425,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) /* Parsing all unicast cipher suite */ while (Count > 0) { /* Skip OUI */ - pCipher = (PCIPHER_SUITE_STRUCT) pTmp; + pCipher = (struct rt_cipher_suite_struct *) pTmp; TmpCipher = Ndis802_11WEPDisabled; switch (pCipher->Type) { case 1: @@ -4452,7 +4452,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) } else { pBss->WPA2.PairCipherAux = TmpCipher; } - pTmp += sizeof(CIPHER_SUITE_STRUCT); + pTmp += sizeof(struct rt_cipher_suite_struct); Count--; } @@ -4464,7 +4464,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) /* 5. Get AKM ciphers */ /* Parsing all AKM ciphers */ while (Count > 0) { - pAKM = (PAKM_SUITE_STRUCT) pTmp; + pAKM = (struct rt_akm_suite *) pTmp; if (!RTMPEqualMemory(pTmp, RSN_OUI, 3)) break; @@ -4499,7 +4499,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) Ndis802_11AuthModeMax; break; } - pTmp += (Count * sizeof(AKM_SUITE_STRUCT)); + pTmp += (Count * sizeof(struct rt_akm_suite)); Count--; } @@ -4546,7 +4546,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) * \pre * \post */ -void MacAddrRandomBssid(IN PRTMP_ADAPTER pAd, u8 *pAddr) +void MacAddrRandomBssid(struct rt_rtmp_adapter *pAd, u8 *pAddr) { int i; @@ -4572,12 +4572,12 @@ void MacAddrRandomBssid(IN PRTMP_ADAPTER pAd, u8 *pAddr) IRQL = DISPATCH_LEVEL */ -void MgtMacHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void MgtMacHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 SubType, u8 ToDs, u8 *pDA, u8 *pBssid) { - NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11)); + NdisZeroMemory(pHdr80211, sizeof(struct rt_header_802_11)); pHdr80211->FC.Type = BTYPE_MGMT; pHdr80211->FC.SubType = SubType; @@ -4650,7 +4650,7 @@ unsigned long MakeOutgoingFrame(u8 * Buffer, unsigned long * FrameLen, ...) IRQL = PASSIVE_LEVEL */ -int MlmeQueueInit(IN MLME_QUEUE * Queue) +int MlmeQueueInit(struct rt_mlme_queue *Queue) { int i; @@ -4684,12 +4684,12 @@ int MlmeQueueInit(IN MLME_QUEUE * Queue) IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeEnqueue(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeEnqueue(struct rt_rtmp_adapter *pAd, unsigned long Machine, unsigned long MsgType, unsigned long MsgLen, void * Msg) { int Tail; - MLME_QUEUE *Queue = (MLME_QUEUE *) & pAd->Mlme.Queue; + struct rt_mlme_queue *Queue = (struct rt_mlme_queue *)& pAd->Mlme.Queue; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -4744,7 +4744,7 @@ BOOLEAN MlmeEnqueue(IN PRTMP_ADAPTER pAd, IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd, unsigned long Wcid, unsigned long TimeStampHigh, unsigned long TimeStampLow, @@ -4754,9 +4754,9 @@ BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, unsigned long MsgLen, void * Msg, u8 Signal) { int Tail, Machine; - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; int MsgType; - MLME_QUEUE *Queue = (MLME_QUEUE *) & pAd->Mlme.Queue; + struct rt_mlme_queue *Queue = (struct rt_mlme_queue *)& pAd->Mlme.Queue; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -4826,7 +4826,7 @@ BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeDequeue(IN MLME_QUEUE * Queue, OUT MLME_QUEUE_ELEM ** Elem) +BOOLEAN MlmeDequeue(struct rt_mlme_queue *Queue, struct rt_mlme_queue_elem ** Elem) { NdisAcquireSpinLock(&(Queue->Lock)); *Elem = &(Queue->Entry[Queue->Head]); @@ -4840,10 +4840,10 @@ BOOLEAN MlmeDequeue(IN MLME_QUEUE * Queue, OUT MLME_QUEUE_ELEM ** Elem) } /* IRQL = DISPATCH_LEVEL */ -void MlmeRestartStateMachine(IN PRTMP_ADAPTER pAd) +void MlmeRestartStateMachine(struct rt_rtmp_adapter *pAd) { #ifdef RTMP_MAC_PCI - MLME_QUEUE_ELEM *Elem = NULL; + struct rt_mlme_queue_elem *Elem = NULL; #endif /* RTMP_MAC_PCI // */ BOOLEAN Cancelled; @@ -4919,7 +4919,7 @@ void MlmeRestartStateMachine(IN PRTMP_ADAPTER pAd) IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeQueueEmpty(IN MLME_QUEUE * Queue) +BOOLEAN MlmeQueueEmpty(struct rt_mlme_queue *Queue) { BOOLEAN Ans; @@ -4940,7 +4940,7 @@ BOOLEAN MlmeQueueEmpty(IN MLME_QUEUE * Queue) IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeQueueFull(IN MLME_QUEUE * Queue) +BOOLEAN MlmeQueueFull(struct rt_mlme_queue *Queue) { BOOLEAN Ans; @@ -4962,7 +4962,7 @@ BOOLEAN MlmeQueueFull(IN MLME_QUEUE * Queue) IRQL = PASSIVE_LEVEL */ -void MlmeQueueDestroy(IN MLME_QUEUE * pQueue) +void MlmeQueueDestroy(struct rt_mlme_queue *pQueue) { NdisAcquireSpinLock(&(pQueue->Lock)); pQueue->Num = 0; @@ -4983,8 +4983,8 @@ void MlmeQueueDestroy(IN MLME_QUEUE * pQueue) IRQL = DISPATCH_LEVEL */ -BOOLEAN MsgTypeSubst(IN PRTMP_ADAPTER pAd, - IN PFRAME_802_11 pFrame, +BOOLEAN MsgTypeSubst(struct rt_rtmp_adapter *pAd, + struct rt_frame_802_11 * pFrame, int * Machine, int * MsgType) { u16 Seq, Alg; @@ -5097,7 +5097,7 @@ BOOLEAN MsgTypeSubst(IN PRTMP_ADAPTER pAd, IRQL = PASSIVE_LEVEL */ -void StateMachineInit(IN STATE_MACHINE * S, +void StateMachineInit(struct rt_state_machine *S, IN STATE_MACHINE_FUNC Trans[], unsigned long StNr, unsigned long MsgNr, @@ -5135,7 +5135,7 @@ void StateMachineInit(IN STATE_MACHINE * S, IRQL = PASSIVE_LEVEL */ -void StateMachineSetAction(IN STATE_MACHINE * S, +void StateMachineSetAction(struct rt_state_machine *S, unsigned long St, unsigned long Msg, IN STATE_MACHINE_FUNC Func) { @@ -5158,8 +5158,8 @@ void StateMachineSetAction(IN STATE_MACHINE * S, IRQL = DISPATCH_LEVEL */ -void StateMachinePerformAction(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, IN MLME_QUEUE_ELEM * Elem) +void StateMachinePerformAction(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, struct rt_mlme_queue_elem *Elem) { (*(S->TransFunc[S->CurrState * S->NrMsg + Elem->MsgType - S->Base])) (pAd, Elem); @@ -5173,7 +5173,7 @@ void StateMachinePerformAction(IN PRTMP_ADAPTER pAd, StateMachinePerformAction() ========================================================================== */ -void Drop(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void Drop(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } @@ -5189,7 +5189,7 @@ void Drop(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void LfsrInit(IN PRTMP_ADAPTER pAd, unsigned long Seed) +void LfsrInit(struct rt_rtmp_adapter *pAd, unsigned long Seed) { if (Seed == 0) pAd->Mlme.ShiftReg = 1; @@ -5202,7 +5202,7 @@ void LfsrInit(IN PRTMP_ADAPTER pAd, unsigned long Seed) Description: ========================================================================== */ -u8 RandomByte(IN PRTMP_ADAPTER pAd) +u8 RandomByte(struct rt_rtmp_adapter *pAd) { unsigned long i; u8 R, Result; @@ -5244,7 +5244,7 @@ u8 RandomByte(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPCheckRates(IN PRTMP_ADAPTER pAd, +void RTMPCheckRates(struct rt_rtmp_adapter *pAd, IN u8 SupRate[], IN u8 * SupRateLen) { u8 RateIdx, i, j; @@ -5267,7 +5267,7 @@ void RTMPCheckRates(IN PRTMP_ADAPTER pAd, NdisMoveMemory(SupRate, NewRate, NewRateLen); } -BOOLEAN RTMPCheckChannel(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckChannel(struct rt_rtmp_adapter *pAd, u8 CentralChannel, u8 Channel) { u8 k; @@ -5320,10 +5320,10 @@ BOOLEAN RTMPCheckChannel(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPCheckHt(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckHt(struct rt_rtmp_adapter *pAd, u8 Wcid, - IN HT_CAPABILITY_IE * pHtCapability, - IN ADD_HT_INFO_IE * pAddHtInfo) + struct rt_ht_capability_ie * pHtCapability, + struct rt_add_ht_info_ie * pAddHtInfo) { if (Wcid >= MAX_LEN_OF_MAC_TABLE) return FALSE; @@ -5449,7 +5449,7 @@ BOOLEAN RTMPCheckHt(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPUpdateMlmeRate(IN PRTMP_ADAPTER pAd) +void RTMPUpdateMlmeRate(struct rt_rtmp_adapter *pAd) { u8 MinimumRate; u8 ProperMlmeRate; /*= RATE_54; */ @@ -5558,7 +5558,7 @@ void RTMPUpdateMlmeRate(IN PRTMP_ADAPTER pAd) pAd->CommonCfg.MlmeTransmit.word)); } -char RTMPMaxRssi(IN PRTMP_ADAPTER pAd, +char RTMPMaxRssi(struct rt_rtmp_adapter *pAd, char Rssi0, char Rssi1, char Rssi2) { char larger = -127; @@ -5594,7 +5594,7 @@ char RTMPMaxRssi(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void AsicEvaluateRxAnt(IN PRTMP_ADAPTER pAd) +void AsicEvaluateRxAnt(struct rt_rtmp_adapter *pAd) { u8 BBPR3 = 0; @@ -5677,7 +5677,7 @@ void AsicRxAntEvalTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; u8 BBPR3 = 0; char larger = -127, rssi0, rssi1, rssi2; @@ -5749,7 +5749,7 @@ void APSDPeriodicExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)) return; @@ -5784,7 +5784,7 @@ void APSDPeriodicExec(void *SystemSpecific1, ======================================================================== */ -void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack) +void RTMPSetPiggyBack(struct rt_rtmp_adapter *pAd, IN BOOLEAN bPiggyBack) { TX_LINK_CFG_STRUC TxLinkCfg; @@ -5809,8 +5809,8 @@ void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack) ======================================================================== */ -BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry) +BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry) { BOOLEAN result = TRUE; @@ -5826,7 +5826,7 @@ BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(IN PRTMP_ADAPTER pAd, return result; } -BOOLEAN RTMPAutoRateSwitchCheck(IN PRTMP_ADAPTER pAd) +BOOLEAN RTMPAutoRateSwitchCheck(struct rt_rtmp_adapter *pAd) { { if (pAd->StaCfg.bAutoTxRateSwitch) @@ -5850,7 +5850,7 @@ BOOLEAN RTMPAutoRateSwitchCheck(IN PRTMP_ADAPTER pAd) ======================================================================== */ -u8 RTMPStaFixedTxMode(IN PRTMP_ADAPTER pAd, IN PMAC_TABLE_ENTRY pEntry) +u8 RTMPStaFixedTxMode(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry) { u8 tx_mode = FIXED_TXMODE_HT; @@ -5878,7 +5878,7 @@ u8 RTMPStaFixedTxMode(IN PRTMP_ADAPTER pAd, IN PMAC_TABLE_ENTRY pEntry) ======================================================================== */ -void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, PMAC_TABLE_ENTRY pEntry) +void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, struct rt_mac_table_entry *pEntry) { HTTRANSMIT_SETTING TransmitSetting; @@ -5921,7 +5921,7 @@ void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, PMAC_TABLE_ENTRY pEntry) ========================================================================== */ -void AsicStaBbpTuning(IN PRTMP_ADAPTER pAd) +void AsicStaBbpTuning(struct rt_rtmp_adapter *pAd) { u8 OrigR66Value = 0, R66; /*, R66UpperBound = 0x30, R66LowerBound = 0x30; */ char Rssi; @@ -6033,7 +6033,7 @@ void AsicStaBbpTuning(IN PRTMP_ADAPTER pAd) } } -void RTMPSetAGCInitValue(IN PRTMP_ADAPTER pAd, u8 BandWidth) +void RTMPSetAGCInitValue(struct rt_rtmp_adapter *pAd, u8 BandWidth) { u8 R66 = 0x30; diff --git a/drivers/staging/rt2860/common/rt_channel.c b/drivers/staging/rt2860/common/rt_channel.c index 3fe5d9762b2c..538798981177 100644 --- a/drivers/staging/rt2860/common/rt_channel.c +++ b/drivers/staging/rt2860/common/rt_channel.c @@ -26,7 +26,7 @@ */ #include "../rt_config.h" -CH_FREQ_MAP CH_HZ_ID_MAP[] = { +struct rt_ch_freq_map CH_HZ_ID_MAP[] = { {1, 2412} , {2, 2417} @@ -144,9 +144,9 @@ CH_FREQ_MAP CH_HZ_ID_MAP[] = { , /* Japan, means J16 */ }; -int CH_HZ_ID_MAP_NUM = (sizeof(CH_HZ_ID_MAP) / sizeof(CH_FREQ_MAP)); +int CH_HZ_ID_MAP_NUM = (sizeof(CH_HZ_ID_MAP) / sizeof(struct rt_ch_freq_map)); -CH_REGION ChRegion[] = { +struct rt_ch_region ChRegion[] = { { /* Antigua and Berbuda */ "AG", CE, @@ -1422,10 +1422,10 @@ CH_REGION ChRegion[] = { , }; -static PCH_REGION GetChRegion(u8 *CntryCode) +static struct rt_ch_region *GetChRegion(u8 *CntryCode) { int loop = 0; - PCH_REGION pChRegion = NULL; + struct rt_ch_region *pChRegion = NULL; while (strcmp((char *)ChRegion[loop].CountReg, "") != 0) { if (strncmp @@ -1461,8 +1461,8 @@ static void ChBandCheck(u8 PhyMode, u8 *pChType) } } -static u8 FillChList(IN PRTMP_ADAPTER pAd, - IN PCH_DESP pChDesp, +static u8 FillChList(struct rt_rtmp_adapter *pAd, + struct rt_ch_desp *pChDesp, u8 Offset, u8 increment) { int i, j, l; @@ -1494,12 +1494,12 @@ static u8 FillChList(IN PRTMP_ADAPTER pAd, return j; } -static inline void CreateChList(IN PRTMP_ADAPTER pAd, - IN PCH_REGION pChRegion, u8 Geography) +static inline void CreateChList(struct rt_rtmp_adapter *pAd, + struct rt_ch_region *pChRegion, u8 Geography) { int i; u8 offset = 0; - PCH_DESP pChDesp; + struct rt_ch_desp *pChDesp; u8 ChType; u8 increment; @@ -1532,21 +1532,21 @@ static inline void CreateChList(IN PRTMP_ADAPTER pAd, } } -void BuildChannelListEx(IN PRTMP_ADAPTER pAd) +void BuildChannelListEx(struct rt_rtmp_adapter *pAd) { - PCH_REGION pChReg; + struct rt_ch_region *pChReg; pChReg = GetChRegion(pAd->CommonCfg.CountryCode); CreateChList(pAd, pChReg, pAd->CommonCfg.Geography); } -void BuildBeaconChList(IN PRTMP_ADAPTER pAd, +void BuildBeaconChList(struct rt_rtmp_adapter *pAd, u8 *pBuf, unsigned long *pBufLen) { int i; unsigned long TmpLen; - PCH_REGION pChRegion; - PCH_DESP pChDesp; + struct rt_ch_region *pChRegion; + struct rt_ch_desp *pChDesp; u8 ChType; pChRegion = GetChRegion(pAd->CommonCfg.CountryCode); @@ -1581,7 +1581,7 @@ void BuildBeaconChList(IN PRTMP_ADAPTER pAd, } } -static BOOLEAN IsValidChannel(IN PRTMP_ADAPTER pAd, u8 channel) +static BOOLEAN IsValidChannel(struct rt_rtmp_adapter *pAd, u8 channel) { int i; @@ -1608,7 +1608,7 @@ static u8 GetExtCh(u8 Channel, u8 Direction) return ExtCh; } -void N_ChannelCheck(IN PRTMP_ADAPTER pAd) +void N_ChannelCheck(struct rt_rtmp_adapter *pAd) { /*u8 ChannelNum = pAd->ChannelListNum; */ u8 Channel = pAd->CommonCfg.Channel; @@ -1670,7 +1670,7 @@ void N_ChannelCheck(IN PRTMP_ADAPTER pAd) } -void N_SetCenCh(IN PRTMP_ADAPTER pAd) +void N_SetCenCh(struct rt_rtmp_adapter *pAd) { if (pAd->CommonCfg.RegTransmitSetting.field.BW == BW_40) { if (pAd->CommonCfg.RegTransmitSetting.field.EXTCHA == @@ -1690,7 +1690,7 @@ void N_SetCenCh(IN PRTMP_ADAPTER pAd) } } -u8 GetCuntryMaxTxPwr(IN PRTMP_ADAPTER pAd, u8 channel) +u8 GetCuntryMaxTxPwr(struct rt_rtmp_adapter *pAd, u8 channel) { int i; for (i = 0; i < pAd->ChannelListNum; i++) { diff --git a/drivers/staging/rt2860/common/rt_rf.c b/drivers/staging/rt2860/common/rt_rf.c index 6d6ca32691ff..fb0ca88fa3ea 100644 --- a/drivers/staging/rt2860/common/rt_rf.c +++ b/drivers/staging/rt2860/common/rt_rf.c @@ -53,7 +53,7 @@ ======================================================================== */ -int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd, +int RT30xxWriteRFRegister(struct rt_rtmp_adapter *pAd, u8 regID, u8 value) { RF_CSR_CFG_STRUC rfcsr; @@ -101,7 +101,7 @@ int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd, +int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd, u8 regID, u8 *pValue) { RF_CSR_CFG_STRUC rfcsr; @@ -139,15 +139,15 @@ int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd, return STATUS_SUCCESS; } -void NICInitRFRegisters(IN RTMP_ADAPTER * pAd) +void NICInitRFRegisters(struct rt_rtmp_adapter *pAd) { if (pAd->chipOps.AsicRfInit) pAd->chipOps.AsicRfInit(pAd); } -void RtmpChipOpsRFHook(IN RTMP_ADAPTER * pAd) +void RtmpChipOpsRFHook(struct rt_rtmp_adapter *pAd) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; pChipOps->pRFRegTable = NULL; pChipOps->AsicRfInit = NULL; diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c index 5cda0ea53f3b..46e7a2a41125 100644 --- a/drivers/staging/rt2860/common/rtmp_init.c +++ b/drivers/staging/rt2860/common/rtmp_init.c @@ -43,7 +43,7 @@ char *CipherName[] = /* */ /* BBP register initialization set */ /* */ -REG_PAIR BBPRegTable[] = { +struct rt_reg_pair BBPRegTable[] = { {BBP_R65, 0x2C}, /* fix rssi issue */ {BBP_R66, 0x38}, /* Also set this default value to pAd->BbpTuning.R66CurrentValue at initial */ {BBP_R69, 0x12}, @@ -61,13 +61,13 @@ REG_PAIR BBPRegTable[] = { {BBP_R106, 0x35}, /* for ShortGI throughput */ }; -#define NUM_BBP_REG_PARMS (sizeof(BBPRegTable) / sizeof(REG_PAIR)) +#define NUM_BBP_REG_PARMS (sizeof(BBPRegTable) / sizeof(struct rt_reg_pair)) /* */ /* ASIC register initialization sets */ /* */ -RTMP_REG_PAIR MACRegTable[] = { +struct rt_rtmp_reg_pair MACRegTable[] = { #if defined(HW_BEACON_OFFSET) && (HW_BEACON_OFFSET == 0x200) {BCN_OFFSET0, 0xf8f0e8e0}, /* 0x3800(e0), 0x3A00(e8), 0x3C00(f0), 0x3E00(f8), 512B for each beacon */ {BCN_OFFSET1, 0x6f77d0c8}, /* 0x3200(c8), 0x3400(d0), 0x1DC0(77), 0x1BC0(6f), 512B for each beacon */ @@ -124,20 +124,20 @@ RTMP_REG_PAIR MACRegTable[] = { {PWR_PIN_CFG, 0x00000003}, /* patch for 2880-E */ }; -RTMP_REG_PAIR STAMACRegTable[] = { +struct rt_rtmp_reg_pair STAMACRegTable[] = { {WMM_AIFSN_CFG, 0x00002273}, {WMM_CWMIN_CFG, 0x00002344}, {WMM_CWMAX_CFG, 0x000034aa}, }; -#define NUM_MAC_REG_PARMS (sizeof(MACRegTable) / sizeof(RTMP_REG_PAIR)) -#define NUM_STA_MAC_REG_PARMS (sizeof(STAMACRegTable) / sizeof(RTMP_REG_PAIR)) +#define NUM_MAC_REG_PARMS (sizeof(MACRegTable) / sizeof(struct rt_rtmp_reg_pair)) +#define NUM_STA_MAC_REG_PARMS (sizeof(STAMACRegTable) / sizeof(struct rt_rtmp_reg_pair)) /* ======================================================================== Routine Description: - Allocate RTMP_ADAPTER data block and do some initialization + Allocate struct rt_rtmp_adapter data block and do some initialization Arguments: Adapter Pointer to our adapter @@ -153,9 +153,9 @@ RTMP_REG_PAIR STAMACRegTable[] = { ======================================================================== */ int RTMPAllocAdapterBlock(void *handle, - OUT PRTMP_ADAPTER * ppAdapter) + struct rt_rtmp_adapter * * ppAdapter) { - PRTMP_ADAPTER pAd; + struct rt_rtmp_adapter *pAd; int Status; int index; u8 *pBeaconBuf = NULL; @@ -165,7 +165,7 @@ int RTMPAllocAdapterBlock(void *handle, *ppAdapter = NULL; do { - /* Allocate RTMP_ADAPTER memory block */ + /* Allocate struct rt_rtmp_adapter memory block */ pBeaconBuf = kmalloc(MAX_BEACON_SIZE, MEM_ALLOC_FLAG); if (pBeaconBuf == NULL) { Status = NDIS_STATUS_FAILURE; @@ -182,7 +182,7 @@ int RTMPAllocAdapterBlock(void *handle, pAd->BeaconBuf = pBeaconBuf; DBGPRINT(RT_DEBUG_OFF, ("\n\n=== pAd = %p, size = %d ===\n\n", pAd, - (u32)sizeof(RTMP_ADAPTER))); + (u32)sizeof(struct rt_rtmp_adapter))); /* Init spin locks */ NdisAllocateSpinLock(&pAd->MgmtRingLock); @@ -230,7 +230,7 @@ int RTMPAllocAdapterBlock(void *handle, ======================================================================== */ -void RTMPReadTxPwrPerRate(IN PRTMP_ADAPTER pAd) +void RTMPReadTxPwrPerRate(struct rt_rtmp_adapter *pAd) { unsigned long data, Adata, Gdata; u16 i, value, value2; @@ -441,7 +441,7 @@ void RTMPReadTxPwrPerRate(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPReadChannelPwr(IN PRTMP_ADAPTER pAd) +void RTMPReadChannelPwr(struct rt_rtmp_adapter *pAd) { u8 i, choffset; EEPROM_TX_PWR_STRUC Power; @@ -650,7 +650,7 @@ void RTMPReadChannelPwr(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int NICReadRegParameters(IN PRTMP_ADAPTER pAd, +int NICReadRegParameters(struct rt_rtmp_adapter *pAd, void *WrapperConfigurationContext) { int Status = NDIS_STATUS_SUCCESS; @@ -676,7 +676,7 @@ int NICReadRegParameters(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void NICReadEEPROMParameters(IN PRTMP_ADAPTER pAd, u8 *mac_addr) +void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr) { u32 data = 0; u16 i, value, value2; @@ -1133,7 +1133,7 @@ void NICReadEEPROMParameters(IN PRTMP_ADAPTER pAd, u8 *mac_addr) ======================================================================== */ -void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd) +void NICInitAsicFromEEPROM(struct rt_rtmp_adapter *pAd) { u32 data = 0; u8 BBPR1 = 0; @@ -1242,7 +1242,7 @@ void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd) #ifdef RTMP_MAC_PCI #ifdef RT30xx if (IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd)) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; if (pChipOps->AsicReverseRfFromSleepMode) pChipOps->AsicReverseRfFromSleepMode(pAd); } @@ -1366,7 +1366,7 @@ void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int NICInitializeAdapter(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset) +int NICInitializeAdapter(struct rt_rtmp_adapter *pAd, IN BOOLEAN bHardReset) { int Status = NDIS_STATUS_SUCCESS; WPDMA_GLO_CFG_STRUC GloCfg; @@ -1562,7 +1562,7 @@ retry: ======================================================================== */ -int NICInitializeAsic(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset) +int NICInitializeAsic(struct rt_rtmp_adapter *pAd, IN BOOLEAN bHardReset) { unsigned long Index = 0; u8 R0 = 0xff; @@ -1929,7 +1929,7 @@ int NICInitializeAsic(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset) ======================================================================== */ -void NICIssueReset(IN PRTMP_ADAPTER pAd) +void NICIssueReset(struct rt_rtmp_adapter *pAd) { u32 Value = 0; DBGPRINT(RT_DEBUG_TRACE, ("--> NICIssueReset\n")); @@ -1965,15 +1965,15 @@ void NICIssueReset(IN PRTMP_ADAPTER pAd) ======================================================================== */ -BOOLEAN NICCheckForHang(IN PRTMP_ADAPTER pAd) +BOOLEAN NICCheckForHang(struct rt_rtmp_adapter *pAd) { return (FALSE); } -void NICUpdateFifoStaCounters(IN PRTMP_ADAPTER pAd) +void NICUpdateFifoStaCounters(struct rt_rtmp_adapter *pAd) { TX_STA_FIFO_STRUC StaFifo; - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; u8 i = 0; u8 pid = 0, wcid = 0; char reTry; @@ -2094,7 +2094,7 @@ void NICUpdateFifoStaCounters(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd) +void NICUpdateRawCounters(struct rt_rtmp_adapter *pAd) { u32 OldValue; /*, Value2; */ /*unsigned long PageSum, OneSecTransmitCount; */ @@ -2114,7 +2114,7 @@ void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd) TX_AGG_CNT5_STRUC TxAggCnt5; TX_AGG_CNT6_STRUC TxAggCnt6; TX_AGG_CNT7_STRUC TxAggCnt7; - COUNTER_RALINK *pRalinkCounters; + struct rt_counter_ralink *pRalinkCounters; pRalinkCounters = &pAd->RalinkCounters; @@ -2299,7 +2299,7 @@ void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void NICResetFromError(IN PRTMP_ADAPTER pAd) +void NICResetFromError(struct rt_rtmp_adapter *pAd) { /* Reset BBP (according to alex, reset ASIC will force reset BBP */ /* Therefore, skip the reset BBP */ @@ -2317,7 +2317,7 @@ void NICResetFromError(IN PRTMP_ADAPTER pAd) AsicLockChannel(pAd, pAd->CommonCfg.CentralChannel); } -int NICLoadFirmware(IN PRTMP_ADAPTER pAd) +int NICLoadFirmware(struct rt_rtmp_adapter *pAd) { int status = NDIS_STATUS_SUCCESS; if (pAd->chipOps.loadFirmware) @@ -2339,7 +2339,7 @@ int NICLoadFirmware(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void NICEraseFirmware(IN PRTMP_ADAPTER pAd) +void NICEraseFirmware(struct rt_rtmp_adapter *pAd) { if (pAd->chipOps.eraseFirmware) pAd->chipOps.eraseFirmware(pAd); @@ -2367,7 +2367,7 @@ void NICEraseFirmware(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int NICLoadRateSwitchingParams(IN PRTMP_ADAPTER pAd) +int NICLoadRateSwitchingParams(struct rt_rtmp_adapter *pAd) { return NDIS_STATUS_SUCCESS; } @@ -2500,7 +2500,7 @@ void RTMPMoveMemory(void *pDest, void *pSrc, unsigned long Length) ======================================================================== */ -void UserCfgInit(IN PRTMP_ADAPTER pAd) +void UserCfgInit(struct rt_rtmp_adapter *pAd) { u32 key_index, bss_index; @@ -2673,7 +2673,7 @@ void UserCfgInit(IN PRTMP_ADAPTER pAd) pAd->CommonCfg.NdisRadioStateOff = FALSE; /* New to support microsoft disable radio with OID command */ pAd->StaCfg.RssiTrigger = 0; - NdisZeroMemory(&pAd->StaCfg.RssiSample, sizeof(RSSI_SAMPLE)); + NdisZeroMemory(&pAd->StaCfg.RssiSample, sizeof(struct rt_rssi_sample)); pAd->StaCfg.RssiTriggerMode = RSSI_TRIGGERED_UPON_BELOW_THRESHOLD; pAd->StaCfg.AtimWin = 0; @@ -2793,7 +2793,7 @@ void UserCfgInit(IN PRTMP_ADAPTER pAd) /*pAd->bTest1 = FALSE; */ /* initialize MAC table and allocate spin lock */ - NdisZeroMemory(&pAd->MacTab, sizeof(MAC_TABLE)); + NdisZeroMemory(&pAd->MacTab, sizeof(struct rt_mac_table)); InitializeQueueHeader(&pAd->MacTab.McastPsQueue); NdisAllocateSpinLock(&pAd->MacTabLock); @@ -2875,8 +2875,8 @@ void AtoH(char *src, u8 *dest, int destlen) ======================================================================== */ -void RTMPInitTimer(IN PRTMP_ADAPTER pAd, - IN PRALINK_TIMER_STRUCT pTimer, +void RTMPInitTimer(struct rt_rtmp_adapter *pAd, + struct rt_ralink_timer *pTimer, void *pTimerFunc, void *pData, IN BOOLEAN Repeat) { /* */ @@ -2915,7 +2915,7 @@ void RTMPInitTimer(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPSetTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) +void RTMPSetTimer(struct rt_ralink_timer *pTimer, unsigned long Value) { if (pTimer->Valid) { pTimer->TimerValue = Value; @@ -2950,7 +2950,7 @@ void RTMPSetTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) ======================================================================== */ -void RTMPModTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) +void RTMPModTimer(struct rt_ralink_timer *pTimer, unsigned long Value) { BOOLEAN Cancel; @@ -2989,7 +2989,7 @@ void RTMPModTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) ======================================================================== */ -void RTMPCancelTimer(IN PRALINK_TIMER_STRUCT pTimer, OUT BOOLEAN * pCancelled) +void RTMPCancelTimer(struct rt_ralink_timer *pTimer, OUT BOOLEAN * pCancelled) { if (pTimer->Valid) { if (pTimer->State == FALSE) @@ -3030,7 +3030,7 @@ void RTMPCancelTimer(IN PRALINK_TIMER_STRUCT pTimer, OUT BOOLEAN * pCancelled) ======================================================================== */ -void RTMPSetLED(IN PRTMP_ADAPTER pAd, u8 Status) +void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status) { /*unsigned long data; */ u8 HighByte = 0; @@ -3117,7 +3117,7 @@ void RTMPSetLED(IN PRTMP_ADAPTER pAd, u8 Status) > -57 Excellent ======================================================================== */ -void RTMPSetSignalLED(IN PRTMP_ADAPTER pAd, IN NDIS_802_11_RSSI Dbm) +void RTMPSetSignalLED(struct rt_rtmp_adapter *pAd, IN NDIS_802_11_RSSI Dbm) { u8 nLed = 0; @@ -3164,7 +3164,7 @@ void RTMPSetSignalLED(IN PRTMP_ADAPTER pAd, IN NDIS_802_11_RSSI Dbm) Before Enable RX, make sure you have enabled Interrupt. ======================================================================== */ -void RTMPEnableRxTx(IN PRTMP_ADAPTER pAd) +void RTMPEnableRxTx(struct rt_rtmp_adapter *pAd) { /* WPDMA_GLO_CFG_STRUC GloCfg; */ /* unsigned long i = 0; */ @@ -3193,12 +3193,12 @@ void RTMPEnableRxTx(IN PRTMP_ADAPTER pAd) } /*+++Add by shiang, move from os/linux/rt_main_dev.c */ -void CfgInitHook(PRTMP_ADAPTER pAd) +void CfgInitHook(struct rt_rtmp_adapter *pAd) { pAd->bBroadComHT = TRUE; } -int rt28xx_init(IN PRTMP_ADAPTER pAd, +int rt28xx_init(struct rt_rtmp_adapter *pAd, char *pDefaultMac, char *pHostName) { u32 index; @@ -3476,12 +3476,12 @@ err0: /*---Add by shiang, move from os/linux/rt_main_dev.c */ -static int RtmpChipOpsRegister(IN RTMP_ADAPTER * pAd, int infType) +static int RtmpChipOpsRegister(struct rt_rtmp_adapter *pAd, int infType) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; int status; - memset(pChipOps, 0, sizeof(RTMP_CHIP_OP)); + memset(pChipOps, 0, sizeof(struct rt_rtmp_chip_op)); /* set eeprom related hook functions */ status = RtmpChipOpsEepromHook(pAd, infType); @@ -3508,7 +3508,7 @@ static int RtmpChipOpsRegister(IN RTMP_ADAPTER * pAd, int infType) return status; } -int RtmpRaDevCtrlInit(IN RTMP_ADAPTER * pAd, IN RTMP_INF_TYPE infType) +int RtmpRaDevCtrlInit(struct rt_rtmp_adapter *pAd, IN RTMP_INF_TYPE infType) { /*void *handle; */ @@ -3535,7 +3535,7 @@ int RtmpRaDevCtrlInit(IN RTMP_ADAPTER * pAd, IN RTMP_INF_TYPE infType) return 0; } -BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd) +BOOLEAN RtmpRaDevCtrlExit(struct rt_rtmp_adapter *pAd) { RTMPFreeAdapter(pAd); @@ -3544,7 +3544,7 @@ BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd) } /* not yet support MBSS */ -struct net_device *get_netdev_from_bssid(IN PRTMP_ADAPTER pAd, u8 FromWhichBSSID) +struct net_device *get_netdev_from_bssid(struct rt_rtmp_adapter *pAd, u8 FromWhichBSSID) { struct net_device *dev_p = NULL; diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c index 3d695278afea..683abad30f66 100644 --- a/drivers/staging/rt2860/common/rtmp_mcu.c +++ b/drivers/staging/rt2860/common/rtmp_mcu.c @@ -80,7 +80,7 @@ ======================================================================== */ -int RtmpAsicEraseFirmware(IN PRTMP_ADAPTER pAd) +int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd) { unsigned long i; @@ -107,7 +107,7 @@ int RtmpAsicEraseFirmware(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int RtmpAsicLoadFirmware(IN PRTMP_ADAPTER pAd) +int RtmpAsicLoadFirmware(struct rt_rtmp_adapter *pAd) { int Status = NDIS_STATUS_SUCCESS; @@ -172,7 +172,7 @@ int RtmpAsicLoadFirmware(IN PRTMP_ADAPTER pAd) return Status; } -int RtmpAsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, +int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, u8 Command, u8 Token, u8 Arg0, u8 Arg1) { diff --git a/drivers/staging/rt2860/common/rtmp_timer.c b/drivers/staging/rt2860/common/rtmp_timer.c index d5648d8967d9..42e47d9dc2c9 100644 --- a/drivers/staging/rt2860/common/rtmp_timer.c +++ b/drivers/staging/rt2860/common/rtmp_timer.c @@ -74,15 +74,15 @@ BUILD_TIMER_FUNCTION(LedCtrlMain); #endif #ifdef RTMP_TIMER_TASK_SUPPORT -static void RtmpTimerQHandle(RTMP_ADAPTER * pAd) +static void RtmpTimerQHandle(struct rt_rtmp_adapter *pAd) { #ifndef KTHREAD_SUPPORT int status; #endif - RALINK_TIMER_STRUCT *pTimer; - RTMP_TIMER_TASK_ENTRY *pEntry; + struct rt_ralink_timer *pTimer; + struct rt_rtmp_timer_task_entry *pEntry; unsigned long irqFlag; - RTMP_OS_TASK *pTask; + struct rt_rtmp_os_task *pTask; pTask = &pAd->timerTask; while (!pTask->task_killed) { @@ -140,11 +140,11 @@ static void RtmpTimerQHandle(RTMP_ADAPTER * pAd) int RtmpTimerQThread(IN void *Context) { - RTMP_OS_TASK *pTask; - PRTMP_ADAPTER pAd; + struct rt_rtmp_os_task *pTask; + struct rt_rtmp_adapter *pAd; - pTask = (RTMP_OS_TASK *) Context; - pAd = (PRTMP_ADAPTER) pTask->priv; + pTask = (struct rt_rtmp_os_task *)Context; + pAd = (struct rt_rtmp_adapter *)pTask->priv; RtmpOSTaskCustomize(pTask); @@ -174,12 +174,12 @@ int RtmpTimerQThread(IN void *Context) } -RTMP_TIMER_TASK_ENTRY *RtmpTimerQInsert(IN RTMP_ADAPTER * pAd, - IN RALINK_TIMER_STRUCT * pTimer) +struct rt_rtmp_timer_task_entry *RtmpTimerQInsert(struct rt_rtmp_adapter *pAd, + struct rt_ralink_timer *pTimer) { - RTMP_TIMER_TASK_ENTRY *pQNode = NULL, *pQTail; + struct rt_rtmp_timer_task_entry *pQNode = NULL, *pQTail; unsigned long irqFlags; - RTMP_OS_TASK *pTask = &pAd->timerTask; + struct rt_rtmp_os_task *pTask = &pAd->timerTask; RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); if (pAd->TimerQ.status & RTMP_TASK_CAN_DO_INSERT) { @@ -211,9 +211,9 @@ RTMP_TIMER_TASK_ENTRY *RtmpTimerQInsert(IN RTMP_ADAPTER * pAd, return pQNode; } -BOOLEAN RtmpTimerQRemove(IN RTMP_ADAPTER * pAd, IN RALINK_TIMER_STRUCT * pTimer) +BOOLEAN RtmpTimerQRemove(struct rt_rtmp_adapter *pAd, struct rt_ralink_timer *pTimer) { - RTMP_TIMER_TASK_ENTRY *pNode, *pPrev = NULL; + struct rt_rtmp_timer_task_entry *pNode, *pPrev = NULL; unsigned long irqFlags; RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); @@ -245,9 +245,9 @@ BOOLEAN RtmpTimerQRemove(IN RTMP_ADAPTER * pAd, IN RALINK_TIMER_STRUCT * pTimer) return TRUE; } -void RtmpTimerQExit(RTMP_ADAPTER * pAd) +void RtmpTimerQExit(struct rt_rtmp_adapter *pAd) { - RTMP_TIMER_TASK_ENTRY *pTimerQ; + struct rt_rtmp_timer_task_entry *pTimerQ; unsigned long irqFlags; RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); @@ -267,10 +267,10 @@ void RtmpTimerQExit(RTMP_ADAPTER * pAd) } -void RtmpTimerQInit(RTMP_ADAPTER * pAd) +void RtmpTimerQInit(struct rt_rtmp_adapter *pAd) { int i; - RTMP_TIMER_TASK_ENTRY *pQNode, *pEntry; + struct rt_rtmp_timer_task_entry *pQNode, *pEntry; unsigned long irqFlags; NdisAllocateSpinLock(&pAd->TimerQLock); @@ -278,12 +278,12 @@ void RtmpTimerQInit(RTMP_ADAPTER * pAd) NdisZeroMemory(&pAd->TimerQ, sizeof(pAd->TimerQ)); os_alloc_mem(pAd, &pAd->TimerQ.pTimerQPoll, - sizeof(RTMP_TIMER_TASK_ENTRY) * TIMER_QUEUE_SIZE_MAX); + sizeof(struct rt_rtmp_timer_task_entry) * TIMER_QUEUE_SIZE_MAX); if (pAd->TimerQ.pTimerQPoll) { pEntry = NULL; - pQNode = (RTMP_TIMER_TASK_ENTRY *) pAd->TimerQ.pTimerQPoll; + pQNode = (struct rt_rtmp_timer_task_entry *)pAd->TimerQ.pTimerQPoll; NdisZeroMemory(pAd->TimerQ.pTimerQPoll, - sizeof(RTMP_TIMER_TASK_ENTRY) * + sizeof(struct rt_rtmp_timer_task_entry) * TIMER_QUEUE_SIZE_MAX); RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); diff --git a/drivers/staging/rt2860/common/spectrum.c b/drivers/staging/rt2860/common/spectrum.c index b89ad5f5a462..51e38d809333 100644 --- a/drivers/staging/rt2860/common/spectrum.c +++ b/drivers/staging/rt2860/common/spectrum.c @@ -40,7 +40,7 @@ #include "action.h" /* The regulatory information in the USA (US) */ -DOT11_REGULATORY_INFORMATION USARegulatoryInfo[] = { +struct rt_dot11_regulatory_information USARegulatoryInfo[] = { /* "regulatory class" "number of channels" "Max Tx Pwr" "channel list" */ {0, {0, 0, {0} } @@ -95,10 +95,10 @@ DOT11_REGULATORY_INFORMATION USARegulatoryInfo[] = { } }; -#define USA_REGULATORY_INFO_SIZE (sizeof(USARegulatoryInfo) / sizeof(DOT11_REGULATORY_INFORMATION)) +#define USA_REGULATORY_INFO_SIZE (sizeof(USARegulatoryInfo) / sizeof(struct rt_dot11_regulatory_information)) /* The regulatory information in Europe */ -DOT11_REGULATORY_INFORMATION EuropeRegulatoryInfo[] = { +struct rt_dot11_regulatory_information EuropeRegulatoryInfo[] = { /* "regulatory class" "number of channels" "Max Tx Pwr" "channel list" */ {0, {0, 0, {0} } @@ -121,10 +121,10 @@ DOT11_REGULATORY_INFORMATION EuropeRegulatoryInfo[] = { } }; -#define EU_REGULATORY_INFO_SIZE (sizeof(EuropeRegulatoryInfo) / sizeof(DOT11_REGULATORY_INFORMATION)) +#define EU_REGULATORY_INFO_SIZE (sizeof(EuropeRegulatoryInfo) / sizeof(struct rt_dot11_regulatory_information)) /* The regulatory information in Japan */ -DOT11_REGULATORY_INFORMATION JapanRegulatoryInfo[] = { +struct rt_dot11_regulatory_information JapanRegulatoryInfo[] = { /* "regulatory class" "number of channels" "Max Tx Pwr" "channel list" */ {0, {0, 0, {0} } @@ -259,17 +259,17 @@ DOT11_REGULATORY_INFORMATION JapanRegulatoryInfo[] = { } }; -#define JP_REGULATORY_INFO_SIZE (sizeof(JapanRegulatoryInfo) / sizeof(DOT11_REGULATORY_INFORMATION)) +#define JP_REGULATORY_INFO_SIZE (sizeof(JapanRegulatoryInfo) / sizeof(struct rt_dot11_regulatory_information)) -char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) +char RTMP_GetTxPwr(struct rt_rtmp_adapter *pAd, IN HTTRANSMIT_SETTING HTTxMode) { - typedef struct __TX_PWR_CFG { + struct tx_pwr_cfg { u8 Mode; u8 MCS; u16 req; u8 shift; u32 BitMask; - } TX_PWR_CFG; + }; u32 Value; int Idx; @@ -279,7 +279,7 @@ char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) char DaltaPwr; unsigned long TxPwr[5]; - TX_PWR_CFG TxPwrCfg[] = { + struct tx_pwr_cfg TxPwrCfg[] = { {MODE_CCK, 0, 0, 4, 0x000000f0}, {MODE_CCK, 1, 0, 0, 0x0000000f}, {MODE_CCK, 2, 0, 12, 0x0000f000}, @@ -310,7 +310,7 @@ char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) {MODE_HTMIX, 14, 3, 12, 0x0000f000}, {MODE_HTMIX, 15, 3, 8, 0x00000f00} }; -#define MAX_TXPWR_TAB_SIZE (sizeof(TxPwrCfg) / sizeof(TX_PWR_CFG)) +#define MAX_TXPWR_TAB_SIZE (sizeof(TxPwrCfg) / sizeof(struct tx_pwr_cfg)) CurTxPwr = 19; @@ -395,15 +395,15 @@ char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) return CurTxPwr; } -void MeasureReqTabInit(IN PRTMP_ADAPTER pAd) +void MeasureReqTabInit(struct rt_rtmp_adapter *pAd) { NdisAllocateSpinLock(&pAd->CommonCfg.MeasureReqTabLock); pAd->CommonCfg.pMeasureReqTab = - kmalloc(sizeof(MEASURE_REQ_TAB), GFP_ATOMIC); + kmalloc(sizeof(struct rt_measure_req_tab), GFP_ATOMIC); if (pAd->CommonCfg.pMeasureReqTab) NdisZeroMemory(pAd->CommonCfg.pMeasureReqTab, - sizeof(MEASURE_REQ_TAB)); + sizeof(struct rt_measure_req_tab)); else DBGPRINT(RT_DEBUG_ERROR, ("%s Fail to alloc memory for pAd->CommonCfg.pMeasureReqTab.\n", @@ -412,7 +412,7 @@ void MeasureReqTabInit(IN PRTMP_ADAPTER pAd) return; } -void MeasureReqTabExit(IN PRTMP_ADAPTER pAd) +void MeasureReqTabExit(struct rt_rtmp_adapter *pAd) { NdisFreeSpinLock(&pAd->CommonCfg.MeasureReqTabLock); @@ -423,12 +423,12 @@ void MeasureReqTabExit(IN PRTMP_ADAPTER pAd) return; } -PMEASURE_REQ_ENTRY MeasureReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) +struct rt_measure_req_entry *MeasureReqLookUp(struct rt_rtmp_adapter *pAd, u8 DialogToken) { u32 HashIdx; - PMEASURE_REQ_TAB pTab = pAd->CommonCfg.pMeasureReqTab; - PMEASURE_REQ_ENTRY pEntry = NULL; - PMEASURE_REQ_ENTRY pPrevEntry = NULL; + struct rt_measure_req_tab *pTab = pAd->CommonCfg.pMeasureReqTab; + struct rt_measure_req_entry *pEntry = NULL; + struct rt_measure_req_entry *pPrevEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -455,12 +455,12 @@ PMEASURE_REQ_ENTRY MeasureReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) +struct rt_measure_req_entry *MeasureReqInsert(struct rt_rtmp_adapter *pAd, u8 DialogToken) { int i; unsigned long HashIdx; - PMEASURE_REQ_TAB pTab = pAd->CommonCfg.pMeasureReqTab; - PMEASURE_REQ_ENTRY pEntry = NULL, pCurrEntry; + struct rt_measure_req_tab *pTab = pAd->CommonCfg.pMeasureReqTab; + struct rt_measure_req_entry *pEntry = NULL, *pCurrEntry; unsigned long Now; if (pTab == NULL) { @@ -482,11 +482,11 @@ PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) lastTime + MQ_REQ_AGE_OUT))) { - PMEASURE_REQ_ENTRY pPrevEntry = NULL; + struct rt_measure_req_entry *pPrevEntry = NULL; unsigned long HashIdx = MQ_DIALOGTOKEN_HASH_INDEX(pEntry-> DialogToken); - PMEASURE_REQ_ENTRY pProbeEntry = + struct rt_measure_req_entry *pProbeEntry = pTab->Hash[HashIdx]; /* update Hash list */ @@ -507,7 +507,7 @@ PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) } while (pProbeEntry); NdisZeroMemory(pEntry, - sizeof(MEASURE_REQ_ENTRY)); + sizeof(struct rt_measure_req_entry)); pTab->Size--; break; @@ -548,10 +548,10 @@ PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) +void MeasureReqDelete(struct rt_rtmp_adapter *pAd, u8 DialogToken) { - PMEASURE_REQ_TAB pTab = pAd->CommonCfg.pMeasureReqTab; - PMEASURE_REQ_ENTRY pEntry = NULL; + struct rt_measure_req_tab *pTab = pAd->CommonCfg.pMeasureReqTab; + struct rt_measure_req_entry *pEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -566,9 +566,9 @@ void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pEntry = MeasureReqLookUp(pAd, DialogToken); if (pEntry != NULL) { - PMEASURE_REQ_ENTRY pPrevEntry = NULL; + struct rt_measure_req_entry *pPrevEntry = NULL; unsigned long HashIdx = MQ_DIALOGTOKEN_HASH_INDEX(pEntry->DialogToken); - PMEASURE_REQ_ENTRY pProbeEntry = pTab->Hash[HashIdx]; + struct rt_measure_req_entry *pProbeEntry = pTab->Hash[HashIdx]; RTMP_SEM_LOCK(&pAd->CommonCfg.MeasureReqTabLock); /* update Hash list */ @@ -586,7 +586,7 @@ void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pProbeEntry = pProbeEntry->pNext; } while (pProbeEntry); - NdisZeroMemory(pEntry, sizeof(MEASURE_REQ_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_measure_req_entry)); pTab->Size--; RTMP_SEM_UNLOCK(&pAd->CommonCfg.MeasureReqTabLock); @@ -595,13 +595,13 @@ void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) return; } -void TpcReqTabInit(IN PRTMP_ADAPTER pAd) +void TpcReqTabInit(struct rt_rtmp_adapter *pAd) { NdisAllocateSpinLock(&pAd->CommonCfg.TpcReqTabLock); - pAd->CommonCfg.pTpcReqTab = kmalloc(sizeof(TPC_REQ_TAB), GFP_ATOMIC); + pAd->CommonCfg.pTpcReqTab = kmalloc(sizeof(struct rt_tpc_req_tab), GFP_ATOMIC); if (pAd->CommonCfg.pTpcReqTab) - NdisZeroMemory(pAd->CommonCfg.pTpcReqTab, sizeof(TPC_REQ_TAB)); + NdisZeroMemory(pAd->CommonCfg.pTpcReqTab, sizeof(struct rt_tpc_req_tab)); else DBGPRINT(RT_DEBUG_ERROR, ("%s Fail to alloc memory for pAd->CommonCfg.pTpcReqTab.\n", @@ -610,7 +610,7 @@ void TpcReqTabInit(IN PRTMP_ADAPTER pAd) return; } -void TpcReqTabExit(IN PRTMP_ADAPTER pAd) +void TpcReqTabExit(struct rt_rtmp_adapter *pAd) { NdisFreeSpinLock(&pAd->CommonCfg.TpcReqTabLock); @@ -621,12 +621,12 @@ void TpcReqTabExit(IN PRTMP_ADAPTER pAd) return; } -static PTPC_REQ_ENTRY TpcReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) +static struct rt_tpc_req_entry *TpcReqLookUp(struct rt_rtmp_adapter *pAd, u8 DialogToken) { u32 HashIdx; - PTPC_REQ_TAB pTab = pAd->CommonCfg.pTpcReqTab; - PTPC_REQ_ENTRY pEntry = NULL; - PTPC_REQ_ENTRY pPrevEntry = NULL; + struct rt_tpc_req_tab *pTab = pAd->CommonCfg.pTpcReqTab; + struct rt_tpc_req_entry *pEntry = NULL; + struct rt_tpc_req_entry *pPrevEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -653,12 +653,12 @@ static PTPC_REQ_ENTRY TpcReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) +static struct rt_tpc_req_entry *TpcReqInsert(struct rt_rtmp_adapter *pAd, u8 DialogToken) { int i; unsigned long HashIdx; - PTPC_REQ_TAB pTab = pAd->CommonCfg.pTpcReqTab; - PTPC_REQ_ENTRY pEntry = NULL, pCurrEntry; + struct rt_tpc_req_tab *pTab = pAd->CommonCfg.pTpcReqTab; + struct rt_tpc_req_entry *pEntry = NULL, *pCurrEntry; unsigned long Now; if (pTab == NULL) { @@ -680,11 +680,11 @@ static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) lastTime + TPC_REQ_AGE_OUT))) { - PTPC_REQ_ENTRY pPrevEntry = NULL; + struct rt_tpc_req_entry *pPrevEntry = NULL; unsigned long HashIdx = TPC_DIALOGTOKEN_HASH_INDEX(pEntry-> DialogToken); - PTPC_REQ_ENTRY pProbeEntry = + struct rt_tpc_req_entry *pProbeEntry = pTab->Hash[HashIdx]; /* update Hash list */ @@ -704,7 +704,7 @@ static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) pProbeEntry = pProbeEntry->pNext; } while (pProbeEntry); - NdisZeroMemory(pEntry, sizeof(TPC_REQ_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_tpc_req_entry)); pTab->Size--; break; @@ -745,10 +745,10 @@ static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) +static void TpcReqDelete(struct rt_rtmp_adapter *pAd, u8 DialogToken) { - PTPC_REQ_TAB pTab = pAd->CommonCfg.pTpcReqTab; - PTPC_REQ_ENTRY pEntry = NULL; + struct rt_tpc_req_tab *pTab = pAd->CommonCfg.pTpcReqTab; + struct rt_tpc_req_entry *pEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -763,9 +763,9 @@ static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pEntry = TpcReqLookUp(pAd, DialogToken); if (pEntry != NULL) { - PTPC_REQ_ENTRY pPrevEntry = NULL; + struct rt_tpc_req_entry *pPrevEntry = NULL; unsigned long HashIdx = TPC_DIALOGTOKEN_HASH_INDEX(pEntry->DialogToken); - PTPC_REQ_ENTRY pProbeEntry = pTab->Hash[HashIdx]; + struct rt_tpc_req_entry *pProbeEntry = pTab->Hash[HashIdx]; RTMP_SEM_LOCK(&pAd->CommonCfg.TpcReqTabLock); /* update Hash list */ @@ -783,7 +783,7 @@ static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pProbeEntry = pProbeEntry->pNext; } while (pProbeEntry); - NdisZeroMemory(pEntry, sizeof(TPC_REQ_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_tpc_req_entry)); pTab->Size--; RTMP_SEM_UNLOCK(&pAd->CommonCfg.TpcReqTabLock); @@ -802,7 +802,7 @@ static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) Return : Current Time Stamp. ========================================================================== */ -static u64 GetCurrentTimeStamp(IN PRTMP_ADAPTER pAd) +static u64 GetCurrentTimeStamp(struct rt_rtmp_adapter *pAd) { /* get current time stamp. */ return 0; @@ -818,7 +818,7 @@ static u64 GetCurrentTimeStamp(IN PRTMP_ADAPTER pAd) Return : Current Time Stamp. ========================================================================== */ -static u8 GetCurTxPwr(IN PRTMP_ADAPTER pAd, u8 Wcid) +static u8 GetCurTxPwr(struct rt_rtmp_adapter *pAd, u8 Wcid) { return 16; /* 16 dBm */ } @@ -833,7 +833,7 @@ static u8 GetCurTxPwr(IN PRTMP_ADAPTER pAd, u8 Wcid) Return : Current Time Stamp. ========================================================================== */ -void InsertChannelRepIE(IN PRTMP_ADAPTER pAd, +void InsertChannelRepIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, char *pCountry, u8 RegulatoryClass) @@ -900,7 +900,7 @@ void InsertChannelRepIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void InsertDialogToken(IN PRTMP_ADAPTER pAd, +void InsertDialogToken(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 DialogToken) { @@ -924,7 +924,7 @@ void InsertDialogToken(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertTpcReqIE(IN PRTMP_ADAPTER pAd, +static void InsertTpcReqIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen) { unsigned long TempLen; @@ -953,15 +953,15 @@ static void InsertTpcReqIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void InsertTpcReportIE(IN PRTMP_ADAPTER pAd, +void InsertTpcReportIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 TxPwr, u8 LinkMargin) { unsigned long TempLen; - unsigned long Len = sizeof(TPC_REPORT_INFO); + unsigned long Len = sizeof(struct rt_tpc_report_info); u8 ElementID = IE_TPC_REPORT; - TPC_REPORT_INFO TpcReportIE; + struct rt_tpc_report_info TpcReportIE; TpcReportIE.TxPwr = TxPwr; TpcReportIE.LinkMargin = LinkMargin; @@ -990,16 +990,16 @@ void InsertTpcReportIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertChSwAnnIE(IN PRTMP_ADAPTER pAd, +static void InsertChSwAnnIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 ChSwMode, u8 NewChannel, u8 ChSwCnt) { unsigned long TempLen; - unsigned long Len = sizeof(CH_SW_ANN_INFO); + unsigned long Len = sizeof(struct rt_ch_sw_ann_info); u8 ElementID = IE_CHANNEL_SWITCH_ANNOUNCEMENT; - CH_SW_ANN_INFO ChSwAnnIE; + struct rt_ch_sw_ann_info ChSwAnnIE; ChSwAnnIE.ChSwMode = ChSwMode; ChSwAnnIE.Channel = NewChannel; @@ -1031,10 +1031,10 @@ static void InsertChSwAnnIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertMeasureReqIE(IN PRTMP_ADAPTER pAd, +static void InsertMeasureReqIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, - u8 Len, IN PMEASURE_REQ_INFO pMeasureReqIE) + u8 Len, struct rt_measure_req_info * pMeasureReqIE) { unsigned long TempLen; u8 ElementID = IE_MEASUREMENT_REQUEST; @@ -1042,7 +1042,7 @@ static void InsertMeasureReqIE(IN PRTMP_ADAPTER pAd, MakeOutgoingFrame(pFrameBuf, &TempLen, 1, &ElementID, 1, &Len, - sizeof(MEASURE_REQ_INFO), pMeasureReqIE, END_OF_ARGS); + sizeof(struct rt_measure_req_info), pMeasureReqIE, END_OF_ARGS); *pFrameLen = *pFrameLen + TempLen; @@ -1066,17 +1066,17 @@ static void InsertMeasureReqIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertMeasureReportIE(IN PRTMP_ADAPTER pAd, +static void InsertMeasureReportIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, - IN PMEASURE_REPORT_INFO pMeasureReportIE, + struct rt_measure_report_info * pMeasureReportIE, u8 ReportLnfoLen, u8 *pReportInfo) { unsigned long TempLen; unsigned long Len; u8 ElementID = IE_MEASUREMENT_REPORT; - Len = sizeof(MEASURE_REPORT_INFO) + ReportLnfoLen; + Len = sizeof(struct rt_measure_report_info) + ReportLnfoLen; MakeOutgoingFrame(pFrameBuf, &TempLen, 1, &ElementID, @@ -1105,7 +1105,7 @@ static void InsertMeasureReportIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, +void MakeMeasurementReqFrame(struct rt_rtmp_adapter *pAd, u8 *pOutBuffer, unsigned long *pFrameLen, u8 TotalLen, @@ -1116,7 +1116,7 @@ void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, u8 MeasureReqType, u8 NumOfRepetitions) { unsigned long TempLen; - MEASURE_REQ_INFO MeasureReqIE; + struct rt_measure_req_info MeasureReqIE; InsertActField(pAd, (pOutBuffer + *pFrameLen), pFrameLen, Category, Action); @@ -1133,7 +1133,7 @@ void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, *pFrameLen += TempLen; } /* prepare Measurement IE. */ - NdisZeroMemory(&MeasureReqIE, sizeof(MEASURE_REQ_INFO)); + NdisZeroMemory(&MeasureReqIE, sizeof(struct rt_measure_req_info)); MeasureReqIE.Token = MeasureToken; MeasureReqIE.ReqMode.word = MeasureReqMode; MeasureReqIE.ReqType = MeasureReqType; @@ -1155,7 +1155,7 @@ void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, +void EnqueueMeasurementRep(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken, u8 MeasureToken, @@ -1166,8 +1166,8 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; - MEASURE_REPORT_INFO MeasureRepIE; + struct rt_header_802_11 ActHdr; + struct rt_measure_report_info MeasureRepIE; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1179,8 +1179,8 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_MRP); @@ -1189,7 +1189,7 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, InsertDialogToken(pAd, (pOutBuffer + FrameLen), &FrameLen, DialogToken); /* prepare Measurement IE. */ - NdisZeroMemory(&MeasureRepIE, sizeof(MEASURE_REPORT_INFO)); + NdisZeroMemory(&MeasureRepIE, sizeof(struct rt_measure_report_info)); MeasureRepIE.Token = MeasureToken; MeasureRepIE.ReportMode = MeasureReqMode; MeasureRepIE.ReportType = MeasureReqType; @@ -1214,13 +1214,13 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken) +void EnqueueTPCReq(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken) { u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1232,8 +1232,8 @@ void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken) ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_TPCRQ); @@ -1262,7 +1262,7 @@ void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken) Return : None. ========================================================================== */ -void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, +void EnqueueTPCRep(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken, u8 TxPwr, u8 LinkMargin) { @@ -1270,7 +1270,7 @@ void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1282,8 +1282,8 @@ void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_TPCRP); @@ -1315,14 +1315,14 @@ void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, +void EnqueueChSwAnn(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 ChSwMode, u8 NewCh) { u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1334,8 +1334,8 @@ void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_CHANNEL_SWITCH); @@ -1349,7 +1349,7 @@ void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, return; } -static BOOLEAN DfsRequirementCheck(IN PRTMP_ADAPTER pAd, u8 Channel) +static BOOLEAN DfsRequirementCheck(struct rt_rtmp_adapter *pAd, u8 Channel) { BOOLEAN Result = FALSE; int i; @@ -1376,13 +1376,13 @@ static BOOLEAN DfsRequirementCheck(IN PRTMP_ADAPTER pAd, u8 Channel) return Result; } -void NotifyChSwAnnToPeerAPs(IN PRTMP_ADAPTER pAd, +void NotifyChSwAnnToPeerAPs(struct rt_rtmp_adapter *pAd, u8 *pRA, u8 *pTA, u8 ChSwMode, u8 Channel) { } -static void StartDFSProcedure(IN PRTMP_ADAPTER pAd, +static void StartDFSProcedure(struct rt_rtmp_adapter *pAd, u8 Channel, u8 ChSwMode) { /* start DFS procedure */ @@ -1415,18 +1415,18 @@ static void StartDFSProcedure(IN PRTMP_ADAPTER pAd, +----+-----+-----------+------------+-----------+ 1 1 1 1 1 */ -static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerChSwAnnSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, - OUT PCH_SW_ANN_INFO pChSwAnnInfo) + struct rt_ch_sw_ann_info * pChSwAnnInfo) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; /* skip 802.11 header. */ - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1435,7 +1435,7 @@ static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, if (pChSwAnnInfo == NULL) return result; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1453,7 +1453,7 @@ static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1472,23 +1472,23 @@ static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerMeasureReqSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken, - OUT PMEASURE_REQ_INFO pMeasureReqInfo, - OUT PMEASURE_REQ pMeasureReq) + struct rt_measure_req_info * pMeasureReqInfo, + struct rt_measure_req * pMeasureReq) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; u8 *ptr; u64 MeasureStartTime; u16 MeasureDuration; /* skip 802.11 header. */ - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1501,7 +1501,7 @@ static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1526,7 +1526,7 @@ static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1566,22 +1566,22 @@ static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, +-----+---------------+---------------------+-------+------------+----------+ 0 1 2 3 4 5-7 */ -static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerMeasureReportSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken, - OUT PMEASURE_REPORT_INFO + struct rt_measure_report_info * pMeasureReportInfo, u8 *pReportBuf) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; u8 *ptr; /* skip 802.11 header. */ - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1594,7 +1594,7 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1606,8 +1606,8 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, NdisMoveMemory(&pMeasureReportInfo->ReportType, eid_ptr->Octet + 2, 1); if (pMeasureReportInfo->ReportType == RM_BASIC) { - PMEASURE_BASIC_REPORT pReport = - (PMEASURE_BASIC_REPORT) pReportBuf; + struct rt_measure_basic_report * pReport = + (struct rt_measure_basic_report *) pReportBuf; ptr = (u8 *)(eid_ptr->Octet + 3); NdisMoveMemory(&pReport->ChNum, ptr, 1); NdisMoveMemory(&pReport->MeasureStartTime, @@ -1617,8 +1617,8 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, NdisMoveMemory(&pReport->Map, ptr + 11, 1); } else if (pMeasureReportInfo->ReportType == RM_CCA) { - PMEASURE_CCA_REPORT pReport = - (PMEASURE_CCA_REPORT) pReportBuf; + struct rt_measure_cca_report * pReport = + (struct rt_measure_cca_report *) pReportBuf; ptr = (u8 *)(eid_ptr->Octet + 3); NdisMoveMemory(&pReport->ChNum, ptr, 1); NdisMoveMemory(&pReport->MeasureStartTime, @@ -1630,8 +1630,8 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, } else if (pMeasureReportInfo->ReportType == RM_RPI_HISTOGRAM) { - PMEASURE_RPI_REPORT pReport = - (PMEASURE_RPI_REPORT) pReportBuf; + struct rt_measure_rpi_report * pReport = + (struct rt_measure_rpi_report *) pReportBuf; ptr = (u8 *)(eid_ptr->Octet + 3); NdisMoveMemory(&pReport->ChNum, ptr, 1); NdisMoveMemory(&pReport->MeasureStartTime, @@ -1647,7 +1647,7 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1666,16 +1666,16 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerTpcReqSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1688,7 +1688,7 @@ static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1699,7 +1699,7 @@ static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1719,18 +1719,18 @@ static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerTpcRepSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken, - OUT PTPC_REPORT_INFO pTpcRepInfo) + struct rt_tpc_report_info * pTpcRepInfo) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1743,7 +1743,7 @@ static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1757,7 +1757,7 @@ static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1774,14 +1774,14 @@ static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void PeerChSwAnnAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void PeerChSwAnnAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - CH_SW_ANN_INFO ChSwAnnInfo; - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_ch_sw_ann_info ChSwAnnInfo; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 index = 0, Channel = 0, NewChannel = 0; unsigned long Bssidx = 0; - NdisZeroMemory(&ChSwAnnInfo, sizeof(CH_SW_ANN_INFO)); + NdisZeroMemory(&ChSwAnnInfo, sizeof(struct rt_ch_sw_ann_info)); if (!PeerChSwAnnSanity(pAd, Elem->Msg, Elem->MsgLen, &ChSwAnnInfo)) { DBGPRINT(RT_DEBUG_TRACE, ("Invalid Channel Switch Action Frame.\n")); @@ -1856,13 +1856,13 @@ static void PeerChSwAnnAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -static void PeerMeasureReqAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem) +static void PeerMeasureReqAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem) { - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 DialogToken; - MEASURE_REQ_INFO MeasureReqInfo; - MEASURE_REQ MeasureReq; + struct rt_measure_req_info MeasureReqInfo; + struct rt_measure_req MeasureReq; MEASURE_REPORT_MODE ReportMode; if (PeerMeasureReqSanity @@ -1889,11 +1889,11 @@ static void PeerMeasureReqAction(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem) +static void PeerMeasureReportAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem) { - MEASURE_REPORT_INFO MeasureReportInfo; - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_measure_report_info MeasureReportInfo; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 DialogToken; u8 *pMeasureReportInfo; @@ -1901,20 +1901,20 @@ static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, /* return; */ if ((pMeasureReportInfo = - kmalloc(sizeof(MEASURE_RPI_REPORT), GFP_ATOMIC)) == NULL) { + kmalloc(sizeof(struct rt_measure_rpi_report), GFP_ATOMIC)) == NULL) { DBGPRINT(RT_DEBUG_ERROR, ("%s unable to alloc memory for measure report buffer (size=%zu).\n", - __func__, sizeof(MEASURE_RPI_REPORT))); + __func__, sizeof(struct rt_measure_rpi_report))); return; } - NdisZeroMemory(&MeasureReportInfo, sizeof(MEASURE_REPORT_INFO)); - NdisZeroMemory(pMeasureReportInfo, sizeof(MEASURE_RPI_REPORT)); + NdisZeroMemory(&MeasureReportInfo, sizeof(struct rt_measure_report_info)); + NdisZeroMemory(pMeasureReportInfo, sizeof(struct rt_measure_rpi_report)); if (PeerMeasureReportSanity (pAd, Elem->Msg, Elem->MsgLen, &DialogToken, &MeasureReportInfo, pMeasureReportInfo)) { do { - PMEASURE_REQ_ENTRY pEntry = NULL; + struct rt_measure_req_entry *pEntry = NULL; /* Not a autonomous measure report. */ /* check the dialog token field. drop it if the dialog token doesn't match. */ @@ -1927,8 +1927,8 @@ static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, MeasureReqDelete(pAd, pEntry->DialogToken); if (MeasureReportInfo.ReportType == RM_BASIC) { - PMEASURE_BASIC_REPORT pBasicReport = - (PMEASURE_BASIC_REPORT) pMeasureReportInfo; + struct rt_measure_basic_report * pBasicReport = + (struct rt_measure_basic_report *) pMeasureReportInfo; if ((pBasicReport->Map.field.Radar) && (DfsRequirementCheck @@ -1965,9 +1965,9 @@ static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void PeerTpcReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void PeerTpcReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 *pFramePtr = pFr->Octet; u8 DialogToken; u8 TxPwr = GetCurTxPwr(pAd, Elem->Wcid); @@ -2007,13 +2007,13 @@ static void PeerTpcReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -static void PeerTpcRepAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void PeerTpcRepAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 DialogToken; - TPC_REPORT_INFO TpcRepInfo; - PTPC_REQ_ENTRY pEntry = NULL; + struct rt_tpc_report_info TpcRepInfo; + struct rt_tpc_req_entry *pEntry = NULL; - NdisZeroMemory(&TpcRepInfo, sizeof(TPC_REPORT_INFO)); + NdisZeroMemory(&TpcRepInfo, sizeof(struct rt_tpc_report_info)); if (PeerTpcRepSanity (pAd, Elem->Msg, Elem->MsgLen, &DialogToken, &TpcRepInfo)) { if ((pEntry = TpcReqLookUp(pAd, DialogToken)) != NULL) { @@ -2040,7 +2040,7 @@ static void PeerTpcRepAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -void PeerSpectrumAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerSpectrumAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Action = Elem->Msg[LENGTH_802_11 + 1]; @@ -2085,7 +2085,7 @@ void PeerSpectrumAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int Set_MeasureReq_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u32 Aid = 1; u32 ArgIdx; @@ -2096,10 +2096,10 @@ int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) u8 MeasureReqType = RM_BASIC; u8 MeasureCh = 1; u64 MeasureStartTime = GetCurrentTimeStamp(pAd); - MEASURE_REQ MeasureReq; + struct rt_measure_req MeasureReq; u8 TotalLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; @@ -2153,13 +2153,13 @@ int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pAd->MacTab.Content[Aid].Addr, pAd->CurrentAddress); - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); - TotalLen = sizeof(MEASURE_REQ_INFO) + sizeof(MEASURE_REQ); + TotalLen = sizeof(struct rt_measure_req_info) + sizeof(struct rt_measure_req); MakeMeasurementReqFrame(pAd, pOutBuffer, &FrameLen, - sizeof(MEASURE_REQ_INFO), CATEGORY_RM, RM_BASIC, + sizeof(struct rt_measure_req_info), CATEGORY_RM, RM_BASIC, MeasureReqToken, MeasureReqMode.word, MeasureReqType, 0); @@ -2170,7 +2170,7 @@ int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) { unsigned long TempLen; MakeOutgoingFrame(pOutBuffer + FrameLen, &TempLen, - sizeof(MEASURE_REQ), &MeasureReq, + sizeof(struct rt_measure_req), &MeasureReq, END_OF_ARGS); FrameLen += TempLen; } @@ -2183,7 +2183,7 @@ END_OF_MEASURE_REQ: return TRUE; } -int Set_TpcReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int Set_TpcReq_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u32 Aid; diff --git a/drivers/staging/rt2860/crypt_md5.h b/drivers/staging/rt2860/crypt_md5.h index bbabf12abf8a..26f974554b26 100644 --- a/drivers/staging/rt2860/crypt_md5.h +++ b/drivers/staging/rt2860/crypt_md5.h @@ -53,18 +53,19 @@ #ifdef MD5_SUPPORT #define MD5_BLOCK_SIZE 64 /* 512 bits = 64 bytes */ #define MD5_DIGEST_SIZE 16 /* 128 bits = 16 bytes */ -typedef struct { + +struct rt_md5_ctx_struc { u32 HashValue[4]; u64 MessageLen; u8 Block[MD5_BLOCK_SIZE]; u32 BlockLen; -} MD5_CTX_STRUC, *PMD5_CTX_STRUC; +}; -void MD5_Init(IN MD5_CTX_STRUC * pMD5_CTX); -void MD5_Hash(IN MD5_CTX_STRUC * pMD5_CTX); -void MD5_Append(IN MD5_CTX_STRUC * pMD5_CTX, +void MD5_Init(struct rt_md5_ctx_struc *pMD5_CTX); +void MD5_Hash(struct rt_md5_ctx_struc *pMD5_CTX); +void MD5_Append(struct rt_md5_ctx_struc *pMD5_CTX, IN const u8 Message[], u32 MessageLen); -void MD5_End(IN MD5_CTX_STRUC * pMD5_CTX, u8 DigestMessage[]); +void MD5_End(struct rt_md5_ctx_struc *pMD5_CTX, u8 DigestMessage[]); void RT_MD5(IN const u8 Message[], u32 MessageLen, u8 DigestMessage[]); #endif /* MD5_SUPPORT */ diff --git a/drivers/staging/rt2860/crypt_sha2.h b/drivers/staging/rt2860/crypt_sha2.h index bfd88bc65f67..20d11ab865c1 100644 --- a/drivers/staging/rt2860/crypt_sha2.h +++ b/drivers/staging/rt2860/crypt_sha2.h @@ -54,18 +54,18 @@ #ifdef SHA1_SUPPORT #define SHA1_BLOCK_SIZE 64 /* 512 bits = 64 bytes */ #define SHA1_DIGEST_SIZE 20 /* 160 bits = 20 bytes */ -typedef struct _SHA1_CTX_STRUC { +struct rt_sha1_ctx { u32 HashValue[5]; /* 5 = (SHA1_DIGEST_SIZE / 32) */ u64 MessageLen; /* total size */ u8 Block[SHA1_BLOCK_SIZE]; u32 BlockLen; -} SHA1_CTX_STRUC, *PSHA1_CTX_STRUC; +}; -void RT_SHA1_Init(IN SHA1_CTX_STRUC * pSHA_CTX); -void SHA1_Hash(IN SHA1_CTX_STRUC * pSHA_CTX); -void SHA1_Append(IN SHA1_CTX_STRUC * pSHA_CTX, +void RT_SHA1_Init(struct rt_sha1_ctx *pSHA_CTX); +void SHA1_Hash(struct rt_sha1_ctx *pSHA_CTX); +void SHA1_Append(struct rt_sha1_ctx *pSHA_CTX, IN const u8 Message[], u32 MessageLen); -void SHA1_End(IN SHA1_CTX_STRUC * pSHA_CTX, u8 DigestMessage[]); +void SHA1_End(struct rt_sha1_ctx *pSHA_CTX, u8 DigestMessage[]); void RT_SHA1(IN const u8 Message[], u32 MessageLen, u8 DigestMessage[]); #endif /* SHA1_SUPPORT */ diff --git a/drivers/staging/rt2860/dfs.h b/drivers/staging/rt2860/dfs.h index d094490200b9..5fbab259acae 100644 --- a/drivers/staging/rt2860/dfs.h +++ b/drivers/staging/rt2860/dfs.h @@ -36,4 +36,4 @@ Fonchi 03-12-2007 created */ -BOOLEAN RadarChannelCheck(IN PRTMP_ADAPTER pAd, u8 Ch); +BOOLEAN RadarChannelCheck(struct rt_rtmp_adapter *pAd, u8 Ch); diff --git a/drivers/staging/rt2860/eeprom.h b/drivers/staging/rt2860/eeprom.h index 50df5a2562af..039801a97099 100644 --- a/drivers/staging/rt2860/eeprom.h +++ b/drivers/staging/rt2860/eeprom.h @@ -41,20 +41,20 @@ /************************************************************************* * Public function declarations for prom-based chipset ************************************************************************/ -int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd, +int rtmp_ee_prom_read16(struct rt_rtmp_adapter *pAd, u16 Offset, u16 * pValue); #endif /* RTMP_PCI_SUPPORT // */ #ifdef RTMP_USB_SUPPORT /************************************************************************* * Public function declarations for usb-based prom chipset ************************************************************************/ -int RTUSBReadEEPROM16(IN PRTMP_ADAPTER pAd, +int RTUSBReadEEPROM16(struct rt_rtmp_adapter *pAd, u16 offset, u16 *pData); #endif /* RTMP_USB_SUPPORT // */ #ifdef RT30xx #ifdef RTMP_EFUSE_SUPPORT -int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd, +int rtmp_ee_efuse_read16(struct rt_rtmp_adapter *pAd, u16 Offset, u16 * pValue); #endif /* RTMP_EFUSE_SUPPORT // */ #endif /* RT30xx // */ @@ -62,6 +62,6 @@ int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd, /************************************************************************* * Public function declarations for prom operation callback functions setting ************************************************************************/ -int RtmpChipOpsEepromHook(IN RTMP_ADAPTER * pAd, int infType); +int RtmpChipOpsEepromHook(struct rt_rtmp_adapter *pAd, int infType); #endif /* __EEPROM_H__ // */ diff --git a/drivers/staging/rt2860/iface/rtmp_usb.h b/drivers/staging/rt2860/iface/rtmp_usb.h index f2955a2de029..6bb384a74660 100644 --- a/drivers/staging/rt2860/iface/rtmp_usb.h +++ b/drivers/staging/rt2860/iface/rtmp_usb.h @@ -126,7 +126,7 @@ void RTUSBBulkRxComplete(struct urb *pUrb, struct pt_regs *pt_regs); #ifdef KTHREAD_SUPPORT #define RTUSBMlmeUp(pAd) \ do{ \ - RTMP_OS_TASK *_pTask = &((pAd)->mlmeTask);\ + struct rt_rtmp_os_task *_pTask = &((pAd)->mlmeTask);\ if (_pTask->kthread_task) \ { \ _pTask->kthread_running = TRUE; \ @@ -136,7 +136,7 @@ void RTUSBBulkRxComplete(struct urb *pUrb, struct pt_regs *pt_regs); #else #define RTUSBMlmeUp(pAd) \ do{ \ - RTMP_OS_TASK *_pTask = &((pAd)->mlmeTask);\ + struct rt_rtmp_os_task *_pTask = &((pAd)->mlmeTask);\ CHECK_PID_LEGALITY(_pTask->taskPID) \ { \ RTMP_SEM_EVENT_UP(&(_pTask->taskSema)); \ @@ -147,7 +147,7 @@ void RTUSBBulkRxComplete(struct urb *pUrb, struct pt_regs *pt_regs); #ifdef KTHREAD_SUPPORT #define RTUSBCMDUp(pAd) \ do{ \ - RTMP_OS_TASK *_pTask = &((pAd)->cmdQTask); \ + struct rt_rtmp_os_task *_pTask = &((pAd)->cmdQTask); \ { \ _pTask->kthread_running = TRUE; \ wake_up(&_pTask->kthread_q); \ @@ -157,7 +157,7 @@ void RTUSBBulkRxComplete(struct urb *pUrb, struct pt_regs *pt_regs); #else #define RTUSBCMDUp(pAd) \ do{ \ - RTMP_OS_TASK *_pTask = &((pAd)->cmdQTask); \ + struct rt_rtmp_os_task *_pTask = &((pAd)->cmdQTask); \ CHECK_PID_LEGALITY(_pTask->taskPID) \ {\ RTMP_SEM_EVENT_UP(&(_pTask->taskSema)); \ diff --git a/drivers/staging/rt2860/mlme.h b/drivers/staging/rt2860/mlme.h index 09e326ee85b0..11434132f93b 100644 --- a/drivers/staging/rt2860/mlme.h +++ b/drivers/staging/rt2860/mlme.h @@ -187,7 +187,7 @@ if (((__pEntry)) != NULL) \ /* 802.11 frame formats */ /* */ /* HT Capability INFO field in HT Cap IE . */ -typedef struct PACKED { +struct PACKED rt_ht_cap_info { u16 AdvCoding:1; u16 ChannelWidth:1; u16 MimoPs:2; /*momi power safe */ @@ -202,17 +202,17 @@ typedef struct PACKED { u16 PSMP:1; u16 Forty_Mhz_Intolerant:1; u16 LSIGTxopProSup:1; -} HT_CAP_INFO, *PHT_CAP_INFO; +}; /* HT Capability INFO field in HT Cap IE . */ -typedef struct PACKED { +struct PACKED rt_ht_cap_parm { u8 MaxRAmpduFactor:2; u8 MpduDensity:3; u8 rsv:3; /*momi power safe */ -} HT_CAP_PARM, *PHT_CAP_PARM; +}; /* HT Capability INFO field in HT Cap IE . */ -typedef struct PACKED { +struct PACKED rt_ht_mcs_set { u8 MCSSet[10]; u8 SupRate[2]; /* unit : 1Mbps */ u8 TxMCSSetDefined:1; @@ -221,10 +221,10 @@ typedef struct PACKED { u8 MpduDensity:1; u8 rsv:3; u8 rsv3[3]; -} HT_MCS_SET, *PHT_MCS_SET; +}; /* HT Capability INFO field in HT Cap IE . */ -typedef struct PACKED { +struct PACKED rt_ext_ht_cap_info { u16 Pco:1; u16 TranTime:2; u16 rsv:5; /*momi power safe */ @@ -232,10 +232,10 @@ typedef struct PACKED { u16 PlusHTC:1; /*+HTC control field support */ u16 RDGSupport:1; /*reverse Direction Grant support */ u16 rsv2:4; -} EXT_HT_CAP_INFO, *PEXT_HT_CAP_INFO; +}; /* HT Beamforming field in HT Cap IE . */ -typedef struct PACKED _HT_BF_CAP { +struct PACKED rt_ht_bf_cap { unsigned long TxBFRecCapable:1; unsigned long RxSoundCapable:1; unsigned long TxSoundCapable:1; @@ -256,10 +256,10 @@ typedef struct PACKED _HT_BF_CAP { unsigned long CSIRowBFSup:2; unsigned long ChanEstimation:2; unsigned long rsv:3; -} HT_BF_CAP, *PHT_BF_CAP; +}; /* HT antenna selection field in HT Cap IE . */ -typedef struct PACKED _HT_AS_CAP { +struct PACKED rt_ht_as_cap { u8 AntSelect:1; u8 ExpCSIFbkTxASEL:1; u8 AntIndFbkTxASEL:1; @@ -268,20 +268,20 @@ typedef struct PACKED _HT_AS_CAP { u8 RxASel:1; u8 TxSoundPPDU:1; u8 rsv:1; -} HT_AS_CAP, *PHT_AS_CAP; +}; /* Draft 1.0 set IE length 26, but is extensible.. */ #define SIZE_HT_CAP_IE 26 /* The structure for HT Capability IE. */ -typedef struct PACKED _HT_CAPABILITY_IE { - HT_CAP_INFO HtCapInfo; - HT_CAP_PARM HtCapParm; -/* HT_MCS_SET HtMCSSet; */ +struct PACKED rt_ht_capability_ie { + struct rt_ht_cap_info HtCapInfo; + struct rt_ht_cap_parm HtCapParm; +/* struct rt_ht_mcs_set HtMCSSet; */ u8 MCSSet[16]; - EXT_HT_CAP_INFO ExtHtCapInfo; - HT_BF_CAP TxBFCap; /* beamforming cap. rt2860c not support beamforming. */ - HT_AS_CAP ASCap; /*antenna selection. */ -} HT_CAPABILITY_IE, *PHT_CAPABILITY_IE; + struct rt_ext_ht_cap_info ExtHtCapInfo; + struct rt_ht_bf_cap TxBFCap; /* beamforming cap. rt2860c not support beamforming. */ + struct rt_ht_as_cap ASCap; /*antenna selection. */ +}; /* 802.11n draft3 related structure definitions. */ /* 7.3.2.60 */ @@ -296,7 +296,7 @@ typedef struct PACKED _HT_CAPABILITY_IE { /* (dot11BSSWidthChannelTransactionDelayFactor * dot11BSSWidthTriggerScanInterval) seconds without */ /* being obligated to perform OBSS Scan operations. default is 25(== 0.25%) */ -typedef struct PACKED _OVERLAP_BSS_SCAN_IE { +struct PACKED rt_overlap_bss_scan_ie { u16 ScanPassiveDwell; u16 ScanActiveDwell; u16 TriggerScanInt; /* Trigger scan interval */ @@ -304,7 +304,7 @@ typedef struct PACKED _OVERLAP_BSS_SCAN_IE { u16 ActiveTalPerChannel; /* active total per channel */ u16 DelayFactor; /* BSS width channel transition delay factor */ u16 ScanActThre; /* Scan Activity threshold */ -} OVERLAP_BSS_SCAN_IE, *POVERLAP_BSS_SCAN_IE; +}; /* 7.3.2.56. 20/40 Coexistence element used in Element ID = 72 = IE_2040_BSS_COEXIST */ typedef union PACKED _BSS_2040_COEXIST_IE { @@ -317,70 +317,70 @@ typedef union PACKED _BSS_2040_COEXIST_IE { u8 word; } BSS_2040_COEXIST_IE, *PBSS_2040_COEXIST_IE; -typedef struct _TRIGGER_EVENTA { +struct rt_trigger_eventa { BOOLEAN bValid; u8 BSSID[6]; u8 RegClass; /* Regulatory Class */ u16 Channel; unsigned long CDCounter; /* Maintain a seperate count down counter for each Event A. */ -} TRIGGER_EVENTA, *PTRIGGER_EVENTA; +}; /* 20/40 trigger event table */ /* If one Event A delete or created, or if Event B is detected or not detected, STA should send 2040BSSCoexistence to AP. */ #define MAX_TRIGGER_EVENT 64 -typedef struct _TRIGGER_EVENT_TAB { +struct rt_trigger_event_tab { u8 EventANo; - TRIGGER_EVENTA EventA[MAX_TRIGGER_EVENT]; + struct rt_trigger_eventa EventA[MAX_TRIGGER_EVENT]; unsigned long EventBCountDown; /* Count down counter for Event B. */ -} TRIGGER_EVENT_TAB, *PTRIGGER_EVENT_TAB; +}; /* 7.3.27 20/40 Bss Coexistence Mgmt capability used in extended capabilities information IE( ID = 127 = IE_EXT_CAPABILITY). */ /* This is the first octet and was defined in 802.11n D3.03 and 802.11yD9.0 */ -typedef struct PACKED _EXT_CAP_INFO_ELEMENT { +struct PACKED rt_ext_cap_info_element { u8 BssCoexistMgmtSupport:1; u8 rsv:1; u8 ExtendChannelSwitch:1; u8 rsv2:5; -} EXT_CAP_INFO_ELEMENT, *PEXT_CAP_INFO_ELEMENT; +}; /* 802.11n 7.3.2.61 */ -typedef struct PACKED _BSS_2040_COEXIST_ELEMENT { +struct PACKED rt_bss_2040_coexist_element { u8 ElementID; /* ID = IE_2040_BSS_COEXIST = 72 */ u8 Len; BSS_2040_COEXIST_IE BssCoexistIe; -} BSS_2040_COEXIST_ELEMENT, *PBSS_2040_COEXIST_ELEMENT; +}; /*802.11n 7.3.2.59 */ -typedef struct PACKED _BSS_2040_INTOLERANT_CH_REPORT { +struct PACKED rt_bss_2040_intolerant_ch_report { u8 ElementID; /* ID = IE_2040_BSS_INTOLERANT_REPORT = 73 */ u8 Len; u8 RegulatoryClass; u8 ChList[0]; -} BSS_2040_INTOLERANT_CH_REPORT, *PBSS_2040_INTOLERANT_CH_REPORT; +}; /* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */ -typedef struct PACKED _CHA_SWITCH_ANNOUNCE_IE { +struct PACKED rt_cha_switch_announce_ie { u8 SwitchMode; /*channel switch mode */ u8 NewChannel; /* */ u8 SwitchCount; /* */ -} CHA_SWITCH_ANNOUNCE_IE, *PCHA_SWITCH_ANNOUNCE_IE; +}; /* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */ -typedef struct PACKED _SEC_CHA_OFFSET_IE { +struct PACKED rt_sec_cha_offset_ie { u8 SecondaryChannelOffset; /* 1: Secondary above, 3: Secondary below, 0: no Secondary */ -} SEC_CHA_OFFSET_IE, *PSEC_CHA_OFFSET_IE; +}; -/* This structure is extracted from struct RT_HT_CAPABILITY */ -typedef struct { +/* This structure is extracted from struct struct rt_ht_capability */ +struct rt_ht_phy_info { BOOLEAN bHtEnable; /* If we should use ht rate. */ BOOLEAN bPreNHt; /* If we should use ht rate. */ /*Substract from HT Capability IE */ u8 MCSSet[16]; -} RT_HT_PHY_INFO, *PRT_HT_PHY_INFO; +}; /*This structure substracts ralink supports from all 802.11n-related features. */ /*Features not listed here but contained in 802.11n spec are not supported in rt2860. */ -typedef struct { +struct rt_ht_capability { u16 ChannelWidth:1; u16 MimoPs:2; /*mimo power safe MMPS_ */ u16 GF:1; /*green field */ @@ -408,27 +408,27 @@ typedef struct { u8 NewExtChannelOffset; /* Extension Capability IE = 127 */ u8 BSSCoexist2040; -} RT_HT_CAPABILITY, *PRT_HT_CAPABILITY; +}; /* field in Addtional HT Information IE . */ -typedef struct PACKED { +struct PACKED rt_add_htinfo { u8 ExtChanOffset:2; u8 RecomWidth:1; u8 RifsMode:1; u8 S_PSMPSup:1; /*Indicate support for scheduled PSMP */ u8 SerInterGranu:3; /*service interval granularity */ -} ADD_HTINFO, *PADD_HTINFO; +}; -typedef struct PACKED { +struct PACKED rt_add_htinfo2 { u16 OperaionMode:2; u16 NonGfPresent:1; u16 rsv:1; u16 OBSS_NonHTExist:1; u16 rsv2:11; -} ADD_HTINFO2, *PADD_HTINFO2; +}; /* TODO: Need sync with spec about the definition of StbcMcs. In Draft 3.03, it's reserved. */ -typedef struct PACKED { +struct PACKED rt_add_htinfo3 { u16 StbcMcs:6; u16 DualBeacon:1; u16 DualCTSProtect:1; @@ -437,56 +437,56 @@ typedef struct PACKED { u16 PcoActive:1; u16 PcoPhase:1; u16 rsv:4; -} ADD_HTINFO3, *PADD_HTINFO3; +}; #define SIZE_ADD_HT_INFO_IE 22 -typedef struct PACKED { +struct PACKED rt_add_ht_info_ie { u8 ControlChan; - ADD_HTINFO AddHtInfo; - ADD_HTINFO2 AddHtInfo2; - ADD_HTINFO3 AddHtInfo3; + struct rt_add_htinfo AddHtInfo; + struct rt_add_htinfo2 AddHtInfo2; + struct rt_add_htinfo3 AddHtInfo3; u8 MCSSet[16]; /* Basic MCS set */ -} ADD_HT_INFO_IE, *PADD_HT_INFO_IE; +}; -typedef struct PACKED { +struct PACKED rt_new_ext_chan_ie { u8 NewExtChanOffset; -} NEW_EXT_CHAN_IE, *PNEW_EXT_CHAN_IE; +}; -typedef struct PACKED _FRAME_802_11 { - HEADER_802_11 Hdr; +struct PACKED rt_frame_802_11 { + struct rt_header_802_11 Hdr; u8 Octet[1]; -} FRAME_802_11, *PFRAME_802_11; +}; /* QoSNull embedding of management action. When HT Control MA field set to 1. */ -typedef struct PACKED _MA_BODY { +struct PACKED rt_ma_body { u8 Category; u8 Action; u8 Octet[1]; -} MA_BODY, *PMA_BODY; +}; -typedef struct PACKED _HEADER_802_3 { +struct PACKED rt_header_802_3 { u8 DAAddr1[MAC_ADDR_LEN]; u8 SAAddr2[MAC_ADDR_LEN]; u8 Octet[2]; -} HEADER_802_3, *PHEADER_802_3; +}; /*//Block ACK related format */ /* 2-byte BA Parameter field in DELBA frames to terminate an already set up bA */ -typedef struct PACKED { +struct PACKED rt_delba_parm { u16 Rsv:11; /* always set to 0 */ u16 Initiator:1; /* 1: originator 0:recipient */ u16 TID:4; /* value of TC os TS */ -} DELBA_PARM, *PDELBA_PARM; +}; /* 2-byte BA Parameter Set field in ADDBA frames to signal parm for setting up a BA */ -typedef struct PACKED { +struct PACKED rt_ba_parm { u16 AMSDUSupported:1; /* 0: not permitted 1: permitted */ u16 BAPolicy:1; /* 1: immediately BA 0:delayed BA */ u16 TID:4; /* value of TC os TS */ u16 BufSize:10; /* number of buffe of size 2304 octetsr */ -} BA_PARM, *PBA_PARM; +}; /* 2-byte BA Starting Seq CONTROL field */ -typedef union PACKED { +typedef union PACKED _BASEQ_CONTROL { struct PACKED { u16 FragNum:4; /* always set to 0 */ u16 StartSeq:12; /* sequence number of the 1st MSDU for which this BAR is sent */ @@ -496,177 +496,176 @@ typedef union PACKED { /*BAControl and BARControl are the same */ /* 2-byte BA CONTROL field in BA frame */ -typedef struct PACKED { +struct PACKED rt_ba_control { u16 ACKPolicy:1; /* only related to N-Delayed BA. But not support in RT2860b. 0:NormalACK 1:No ACK */ u16 MTID:1; /*EWC V1.24 */ u16 Compressed:1; u16 Rsv:9; u16 TID:4; -} BA_CONTROL, *PBA_CONTROL; +}; /* 2-byte BAR CONTROL field in BAR frame */ -typedef struct PACKED { +struct PACKED rt_bar_control { u16 ACKPolicy:1; /* 0:normal ack, 1:no ack. */ - u16 MTID:1; /*if this bit1, use FRAME_MTBA_REQ, if 0, use FRAME_BA_REQ */ + u16 MTID:1; /*if this bit1, use struct rt_frame_mtba_req, if 0, use struct rt_frame_ba_req */ u16 Compressed:1; u16 Rsv1:9; u16 TID:4; -} BAR_CONTROL, *PBAR_CONTROL; +}; /* BARControl in MTBAR frame */ -typedef struct PACKED { +struct PACKED rt_mtbar_control { u16 ACKPolicy:1; u16 MTID:1; u16 Compressed:1; u16 Rsv1:9; u16 NumTID:4; -} MTBAR_CONTROL, *PMTBAR_CONTROL; +}; -typedef struct PACKED { +struct PACKED rt_per_tid_info { u16 Rsv1:12; u16 TID:4; -} PER_TID_INFO, *PPER_TID_INFO; +}; -typedef struct { - PER_TID_INFO PerTID; +struct rt_each_tid { + struct rt_per_tid_info PerTID; BASEQ_CONTROL BAStartingSeq; -} EACH_TID, *PEACH_TID; +}; /* BAREQ AND MTBAREQ have the same subtype BAR, 802.11n BAR use compressed bitmap. */ -typedef struct PACKED _FRAME_BA_REQ { - FRAME_CONTROL FC; +struct PACKED rt_frame_ba_req { + struct rt_frame_control FC; u16 Duration; u8 Addr1[MAC_ADDR_LEN]; u8 Addr2[MAC_ADDR_LEN]; - BAR_CONTROL BARControl; + struct rt_bar_control BARControl; BASEQ_CONTROL BAStartingSeq; -} FRAME_BA_REQ, *PFRAME_BA_REQ; +}; -typedef struct PACKED _FRAME_MTBA_REQ { - FRAME_CONTROL FC; +struct PACKED rt_frame_mtba_req { + struct rt_frame_control FC; u16 Duration; u8 Addr1[MAC_ADDR_LEN]; u8 Addr2[MAC_ADDR_LEN]; - MTBAR_CONTROL MTBARControl; - PER_TID_INFO PerTIDInfo; + struct rt_mtbar_control MTBARControl; + struct rt_per_tid_info PerTIDInfo; BASEQ_CONTROL BAStartingSeq; -} FRAME_MTBA_REQ, *PFRAME_MTBA_REQ; +}; /* Compressed format is mandantory in HT STA */ -typedef struct PACKED _FRAME_MTBA { - FRAME_CONTROL FC; +struct PACKED rt_frame_mtba { + struct rt_frame_control FC; u16 Duration; u8 Addr1[MAC_ADDR_LEN]; u8 Addr2[MAC_ADDR_LEN]; - BA_CONTROL BAControl; + struct rt_ba_control BAControl; BASEQ_CONTROL BAStartingSeq; u8 BitMap[8]; -} FRAME_MTBA, *PFRAME_MTBA; +}; -typedef struct PACKED _FRAME_PSMP_ACTION { - HEADER_802_11 Hdr; +struct PACKED rt_frame_psmp_action { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; u8 Psmp; /* 7.3.1.25 */ -} FRAME_PSMP_ACTION, *PFRAME_PSMP_ACTION; +}; -typedef struct PACKED _FRAME_ACTION_HDR { - HEADER_802_11 Hdr; +struct PACKED rt_frame_action_hdr { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; -} FRAME_ACTION_HDR, *PFRAME_ACTION_HDR; +}; /*Action Frame */ /*Action Frame Category:Spectrum, Action:Channel Switch. 7.3.2.20 */ -typedef struct PACKED _CHAN_SWITCH_ANNOUNCE { +struct PACKED rt_chan_switch_announce { u8 ElementID; /* ID = IE_CHANNEL_SWITCH_ANNOUNCEMENT = 37 */ u8 Len; - CHA_SWITCH_ANNOUNCE_IE CSAnnounceIe; -} CHAN_SWITCH_ANNOUNCE, *PCHAN_SWITCH_ANNOUNCE; + struct rt_cha_switch_announce_ie CSAnnounceIe; +}; /*802.11n : 7.3.2.20a */ -typedef struct PACKED _SECOND_CHAN_OFFSET { +struct PACKED rt_second_chan_offset { u8 ElementID; /* ID = IE_SECONDARY_CH_OFFSET = 62 */ u8 Len; - SEC_CHA_OFFSET_IE SecChOffsetIe; -} SECOND_CHAN_OFFSET, *PSECOND_CHAN_OFFSET; + struct rt_sec_cha_offset_ie SecChOffsetIe; +}; -typedef struct PACKED _FRAME_SPETRUM_CS { - HEADER_802_11 Hdr; +struct PACKED rt_frame_spetrum_cs { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; - CHAN_SWITCH_ANNOUNCE CSAnnounce; - SECOND_CHAN_OFFSET SecondChannel; -} FRAME_SPETRUM_CS, *PFRAME_SPETRUM_CS; + struct rt_chan_switch_announce CSAnnounce; + struct rt_second_chan_offset SecondChannel; +}; -typedef struct PACKED _FRAME_ADDBA_REQ { - HEADER_802_11 Hdr; +struct PACKED rt_frame_addba_req { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; u8 Token; /* 1 */ - BA_PARM BaParm; /* 2 - 10 */ + struct rt_ba_parm BaParm; /* 2 - 10 */ u16 TimeOutValue; /* 0 - 0 */ BASEQ_CONTROL BaStartSeq; /* 0-0 */ -} FRAME_ADDBA_REQ, *PFRAME_ADDBA_REQ; +}; -typedef struct PACKED _FRAME_ADDBA_RSP { - HEADER_802_11 Hdr; +struct PACKED rt_frame_addba_rsp { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; u8 Token; u16 StatusCode; - BA_PARM BaParm; /*0 - 2 */ + struct rt_ba_parm BaParm; /*0 - 2 */ u16 TimeOutValue; -} FRAME_ADDBA_RSP, *PFRAME_ADDBA_RSP; +}; -typedef struct PACKED _FRAME_DELBA_REQ { - HEADER_802_11 Hdr; +struct PACKED rt_frame_delba_req { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; - DELBA_PARM DelbaParm; + struct rt_delba_parm DelbaParm; u16 ReasonCode; -} FRAME_DELBA_REQ, *PFRAME_DELBA_REQ; +}; /*7.2.1.7 */ -typedef struct PACKED _FRAME_BAR { - FRAME_CONTROL FC; +struct PACKED rt_frame_bar { + struct rt_frame_control FC; u16 Duration; u8 Addr1[MAC_ADDR_LEN]; u8 Addr2[MAC_ADDR_LEN]; - BAR_CONTROL BarControl; + struct rt_bar_control BarControl; BASEQ_CONTROL StartingSeq; -} FRAME_BAR, *PFRAME_BAR; +}; /*7.2.1.7 */ -typedef struct PACKED _FRAME_BA { - FRAME_CONTROL FC; +struct PACKED rt_frame_ba { + struct rt_frame_control FC; u16 Duration; u8 Addr1[MAC_ADDR_LEN]; u8 Addr2[MAC_ADDR_LEN]; - BAR_CONTROL BarControl; + struct rt_bar_control BarControl; BASEQ_CONTROL StartingSeq; u8 bitmask[8]; -} FRAME_BA, *PFRAME_BA; +}; /* Radio Measuement Request Frame Format */ -typedef struct PACKED _FRAME_RM_REQ_ACTION { - HEADER_802_11 Hdr; +struct PACKED rt_frame_rm_req_action { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; u8 Token; u16 Repetition; u8 data[0]; -} FRAME_RM_REQ_ACTION, *PFRAME_RM_REQ_ACTION; +}; -typedef struct PACKED { +struct PACKED rt_ht_ext_channel_switch_announcement_ie { u8 ID; u8 Length; u8 ChannelSwitchMode; u8 NewRegClass; u8 NewChannelNum; u8 ChannelSwitchCount; -} HT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE, - *PHT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE; +}; /* */ /* _Limit must be the 2**n - 1 */ @@ -681,24 +680,24 @@ typedef struct PACKED { /* */ /* Contention-free parameter (without ID and Length) */ /* */ -typedef struct PACKED { +struct PACKED rt_cf_parm { BOOLEAN bValid; /* 1: variable contains valid value */ u8 CfpCount; u8 CfpPeriod; u16 CfpMaxDuration; u16 CfpDurRemaining; -} CF_PARM, *PCF_PARM; +}; -typedef struct _CIPHER_SUITE { +struct rt_cipher_suite { NDIS_802_11_ENCRYPTION_STATUS PairCipher; /* Unicast cipher 1, this one has more secured cipher suite */ NDIS_802_11_ENCRYPTION_STATUS PairCipherAux; /* Unicast cipher 2 if AP announce two unicast cipher suite */ NDIS_802_11_ENCRYPTION_STATUS GroupCipher; /* Group cipher */ u16 RsnCapability; /* RSN capability from beacon */ BOOLEAN bMixMode; /* Indicate Pair & Group cipher might be different */ -} CIPHER_SUITE, *PCIPHER_SUITE; +}; /* EDCA configuration from AP's BEACON/ProbeRsp */ -typedef struct { +struct rt_edca_parm { BOOLEAN bValid; /* 1: variable contains valid value */ BOOLEAN bAdd; /* 1: variable contains valid value */ BOOLEAN bQAck; @@ -712,18 +711,18 @@ typedef struct { u8 Cwmax[4]; u16 Txop[4]; /* in unit of 32-us */ BOOLEAN bACM[4]; /* 1: Admission Control of AC_BK is mandattory */ -} EDCA_PARM, *PEDCA_PARM; +}; /* QBSS LOAD information from QAP's BEACON/ProbeRsp */ -typedef struct { +struct rt_qbss_load_parm { BOOLEAN bValid; /* 1: variable contains valid value */ u16 StaNum; u8 ChannelUtilization; u16 RemainingAdmissionControl; /* in unit of 32-us */ -} QBSS_LOAD_PARM, *PQBSS_LOAD_PARM; +}; /* QBSS Info field in QSTA's assoc req */ -typedef struct PACKED { +struct PACKED rt_qbss_sta_info_parm { u8 UAPSD_AC_VO:1; u8 UAPSD_AC_VI:1; u8 UAPSD_AC_BK:1; @@ -731,32 +730,32 @@ typedef struct PACKED { u8 Rsv1:1; u8 MaxSPLength:2; u8 Rsv2:1; -} QBSS_STA_INFO_PARM, *PQBSS_STA_INFO_PARM; +}; /* QBSS Info field in QAP's Beacon/ProbeRsp */ -typedef struct PACKED { +struct PACKED rt_qbss_ap_info_parm { u8 ParamSetCount:4; u8 Rsv:3; u8 UAPSD:1; -} QBSS_AP_INFO_PARM, *PQBSS_AP_INFO_PARM; +}; /* QOS Capability reported in QAP's BEACON/ProbeRsp */ /* QOS Capability sent out in QSTA's AssociateReq/ReAssociateReq */ -typedef struct { +struct rt_qos_capability_parm { BOOLEAN bValid; /* 1: variable contains valid value */ BOOLEAN bQAck; BOOLEAN bQueueRequest; BOOLEAN bTxopRequest; /* BOOLEAN bMoreDataAck; */ u8 EdcaUpdateCount; -} QOS_CAPABILITY_PARM, *PQOS_CAPABILITY_PARM; +}; -typedef struct { +struct rt_wpa_ie { u8 IELen; u8 IE[MAX_CUSTOM_LEN]; -} WPA_IE_; +}; -typedef struct { +struct rt_bss_entry { u8 Bssid[MAC_ADDR_LEN]; u8 Channel; u8 CentralChannel; /*Store the wide-band central channel for 40MHz. .used in 40MHz AP. Or this is the same as Channel. */ @@ -768,9 +767,9 @@ typedef struct { u8 SupRateLen; u8 ExtRate[MAX_LEN_OF_SUPPORTED_RATES]; u8 ExtRateLen; - HT_CAPABILITY_IE HtCapability; + struct rt_ht_capability_ie HtCapability; u8 HtCapabilityLen; - ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */ + struct rt_add_ht_info_ie AddHtInfo; /* AP might use this additional ht info IE */ u8 AddHtInfoLen; u8 NewExtChanOffset; char Rssi; @@ -792,11 +791,11 @@ typedef struct { BOOLEAN bSES; /* New for WPA2 */ - CIPHER_SUITE WPA; /* AP announced WPA cipher suite */ - CIPHER_SUITE WPA2; /* AP announced WPA2 cipher suite */ + struct rt_cipher_suite WPA; /* AP announced WPA cipher suite */ + struct rt_cipher_suite WPA2; /* AP announced WPA2 cipher suite */ /* New for microsoft WPA support */ - NDIS_802_11_FIXED_IEs FixIEs; + struct rt_ndis_802_11_fixed_ies FixIEs; NDIS_802_11_AUTHENTICATION_MODE AuthModeAux; /* Addition mode for WPA2 / WPA capable AP */ NDIS_802_11_AUTHENTICATION_MODE AuthMode; NDIS_802_11_WEP_STATUS WepStatus; /* Unicast Encryption Algorithm extract from VAR_IE */ @@ -811,20 +810,20 @@ typedef struct { u8 TTSF[8]; /* Target TSF */ /* 802.11e d9, and WMM */ - EDCA_PARM EdcaParm; - QOS_CAPABILITY_PARM QosCapability; - QBSS_LOAD_PARM QbssLoad; - WPA_IE_ WpaIE; - WPA_IE_ RsnIE; -} BSS_ENTRY, *PBSS_ENTRY; - -typedef struct { + struct rt_edca_parm EdcaParm; + struct rt_qos_capability_parm QosCapability; + struct rt_qbss_load_parm QbssLoad; + struct rt_wpa_ie WpaIE; + struct rt_wpa_ie RsnIE; +}; + +struct rt_bss_table { u8 BssNr; u8 BssOverlapNr; - BSS_ENTRY BssEntry[MAX_LEN_OF_BSS_TABLE]; -} BSS_TABLE, *PBSS_TABLE; + struct rt_bss_entry BssEntry[MAX_LEN_OF_BSS_TABLE]; +}; -typedef struct _MLME_QUEUE_ELEM { +struct rt_mlme_queue_elem { unsigned long Machine; unsigned long MsgType; unsigned long MsgLen; @@ -837,25 +836,25 @@ typedef struct _MLME_QUEUE_ELEM { u8 Channel; u8 Wcid; BOOLEAN Occupied; -} MLME_QUEUE_ELEM, *PMLME_QUEUE_ELEM; +}; -typedef struct _MLME_QUEUE { +struct rt_mlme_queue { unsigned long Num; unsigned long Head; unsigned long Tail; spinlock_t Lock; - MLME_QUEUE_ELEM Entry[MAX_LEN_OF_MLME_QUEUE]; -} MLME_QUEUE, *PMLME_QUEUE; + struct rt_mlme_queue_elem Entry[MAX_LEN_OF_MLME_QUEUE]; +}; -typedef void(*STATE_MACHINE_FUNC) (void * Adaptor, MLME_QUEUE_ELEM * Elem); +typedef void(*STATE_MACHINE_FUNC) (void * Adaptor, struct rt_mlme_queue_elem *Elem); -typedef struct _STATE_MACHINE { +struct rt_state_machine { unsigned long Base; unsigned long NrState; unsigned long NrMsg; unsigned long CurrState; STATE_MACHINE_FUNC *TransFunc; -} STATE_MACHINE, *PSTATE_MACHINE; +}; /* MLME AUX data structure that hold temporarliy settings during a connection attempt. */ /* Once this attemp succeeds, all settings will be copy to pAd->StaActive. */ @@ -863,7 +862,7 @@ typedef struct _STATE_MACHINE { /* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */ /* separate this under-trial settings away from pAd->StaActive so that once */ /* this new attempt failed, driver can auto-recover back to the active settings. */ -typedef struct _MLME_AUX { +struct rt_mlme_aux { u8 BssType; u8 Ssid[MAX_LEN_OF_SSID]; u8 SsidLen; @@ -887,33 +886,33 @@ typedef struct _MLME_AUX { u8 ExtRate[MAX_LEN_OF_SUPPORTED_RATES]; u8 SupRateLen; u8 ExtRateLen; - HT_CAPABILITY_IE HtCapability; + struct rt_ht_capability_ie HtCapability; u8 HtCapabilityLen; - ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */ + struct rt_add_ht_info_ie AddHtInfo; /* AP might use this additional ht info IE */ u8 NewExtChannelOffset; - /*RT_HT_CAPABILITY SupportedHtPhy; */ + /*struct rt_ht_capability SupportedHtPhy; */ /* new for QOS */ - QOS_CAPABILITY_PARM APQosCapability; /* QOS capability of the current associated AP */ - EDCA_PARM APEdcaParm; /* EDCA parameters of the current associated AP */ - QBSS_LOAD_PARM APQbssLoad; /* QBSS load of the current associated AP */ + struct rt_qos_capability_parm APQosCapability; /* QOS capability of the current associated AP */ + struct rt_edca_parm APEdcaParm; /* EDCA parameters of the current associated AP */ + struct rt_qbss_load_parm APQbssLoad; /* QBSS load of the current associated AP */ /* new to keep Ralink specific feature */ unsigned long APRalinkIe; - BSS_TABLE SsidBssTab; /* AP list for the same SSID */ - BSS_TABLE RoamTab; /* AP list eligible for roaming */ + struct rt_bss_table SsidBssTab; /* AP list for the same SSID */ + struct rt_bss_table RoamTab; /* AP list eligible for roaming */ unsigned long BssIdx; unsigned long RoamIdx; BOOLEAN CurrReqIsFromNdis; - RALINK_TIMER_STRUCT BeaconTimer, ScanTimer; - RALINK_TIMER_STRUCT AuthTimer; - RALINK_TIMER_STRUCT AssocTimer, ReassocTimer, DisassocTimer; -} MLME_AUX, *PMLME_AUX; + struct rt_ralink_timer BeaconTimer, ScanTimer; + struct rt_ralink_timer AuthTimer; + struct rt_ralink_timer AssocTimer, ReassocTimer, DisassocTimer; +}; -typedef struct _MLME_ADDBA_REQ_STRUCT { +struct rt_mlme_addba_req { u8 Wcid; /* */ u8 pAddr[MAC_ADDR_LEN]; u8 BaBufSize; @@ -921,64 +920,63 @@ typedef struct _MLME_ADDBA_REQ_STRUCT { u8 TID; u8 Token; u16 BaStartSeq; -} MLME_ADDBA_REQ_STRUCT, *PMLME_ADDBA_REQ_STRUCT; +}; -typedef struct _MLME_DELBA_REQ_STRUCT { +struct rt_mlme_delba_req { u8 Wcid; /* */ u8 Addr[MAC_ADDR_LEN]; u8 TID; u8 Initiator; -} MLME_DELBA_REQ_STRUCT, *PMLME_DELBA_REQ_STRUCT; +}; /* assoc struct is equal to reassoc */ -typedef struct _MLME_ASSOC_REQ_STRUCT { +struct rt_mlme_assoc_req { u8 Addr[MAC_ADDR_LEN]; u16 CapabilityInfo; u16 ListenIntv; unsigned long Timeout; -} MLME_ASSOC_REQ_STRUCT, *PMLME_ASSOC_REQ_STRUCT, MLME_REASSOC_REQ_STRUCT, - *PMLME_REASSOC_REQ_STRUCT; +}; -typedef struct _MLME_DISASSOC_REQ_STRUCT { +struct rt_mlme_disassoc_req { u8 Addr[MAC_ADDR_LEN]; u16 Reason; -} MLME_DISASSOC_REQ_STRUCT, *PMLME_DISASSOC_REQ_STRUCT; +}; -typedef struct _MLME_AUTH_REQ_STRUCT { +struct rt_mlme_auth_req { u8 Addr[MAC_ADDR_LEN]; u16 Alg; unsigned long Timeout; -} MLME_AUTH_REQ_STRUCT, *PMLME_AUTH_REQ_STRUCT; +}; -typedef struct _MLME_DEAUTH_REQ_STRUCT { +struct rt_mlme_deauth_req { u8 Addr[MAC_ADDR_LEN]; u16 Reason; -} MLME_DEAUTH_REQ_STRUCT, *PMLME_DEAUTH_REQ_STRUCT; +}; -typedef struct { +struct rt_mlme_join_req { unsigned long BssIdx; -} MLME_JOIN_REQ_STRUCT; +}; -typedef struct _MLME_SCAN_REQ_STRUCT { +struct rt_mlme_scan_req { u8 Bssid[MAC_ADDR_LEN]; u8 BssType; u8 ScanType; u8 SsidLen; char Ssid[MAX_LEN_OF_SSID]; -} MLME_SCAN_REQ_STRUCT, *PMLME_SCAN_REQ_STRUCT; +}; -typedef struct _MLME_START_REQ_STRUCT { +struct rt_mlme_start_req { char Ssid[MAX_LEN_OF_SSID]; u8 SsidLen; -} MLME_START_REQ_STRUCT, *PMLME_START_REQ_STRUCT; +}; -typedef struct PACKED { +struct PACKED rt_eid { u8 Eid; u8 Len; u8 Octet[1]; -} EID_STRUCT, *PEID_STRUCT, BEACON_EID_STRUCT, *PBEACON_EID_STRUCT; +}; -typedef struct PACKED _RTMP_TX_RATE_SWITCH { +struct PACKED rt_rtmp_tx_rate_switch { u8 ItemNo; u8 STBC:1; u8 ShortGI:1; @@ -989,7 +987,7 @@ typedef struct PACKED _RTMP_TX_RATE_SWITCH { u8 CurrMCS; u8 TrainUp; u8 TrainDown; -} RRTMP_TX_RATE_SWITCH, *PRTMP_TX_RATE_SWITCH; +}; /* ========================== AP mlme.h =============================== */ #define TBTT_PRELOAD_TIME 384 /* usec. LomgPreamble + 24-byte at 1Mbps */ diff --git a/drivers/staging/rt2860/oid.h b/drivers/staging/rt2860/oid.h index 05a71f027468..fa4a2e692e79 100644 --- a/drivers/staging/rt2860/oid.h +++ b/drivers/staging/rt2860/oid.h @@ -137,9 +137,9 @@ typedef enum _NDIS_802_11_STATUS_TYPE { typedef u8 NDIS_802_11_MAC_ADDRESS[6]; -typedef struct _NDIS_802_11_STATUS_INDICATION { +struct rt_ndis_802_11_status_indication { NDIS_802_11_STATUS_TYPE StatusType; -} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION; +}; /* mask for authentication/integrity fields */ #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f @@ -149,23 +149,23 @@ typedef struct _NDIS_802_11_STATUS_INDICATION { #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E -typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST { +struct rt_ndis_802_11_authentication_request { unsigned long Length; /* Length of structure */ NDIS_802_11_MAC_ADDRESS Bssid; unsigned long Flags; -} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST; +}; /*Added new types for PMKID Candidate lists. */ -typedef struct _PMKID_CANDIDATE { +struct rt_pmkid_candidate { NDIS_802_11_MAC_ADDRESS BSSID; unsigned long Flags; -} PMKID_CANDIDATE, *PPMKID_CANDIDATE; +}; -typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST { +struct rt_ndis_802_11_pmkid_candidate_list { unsigned long Version; /* Version of the structure */ unsigned long NumCandidates; /* No. of pmkid candidates */ - PMKID_CANDIDATE CandidateList[1]; -} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST; + struct rt_pmkid_candidate CandidateList[1]; +}; /*Flags for PMKID Candidate list structure */ #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01 @@ -182,10 +182,10 @@ typedef enum _NDIS_802_11_NETWORK_TYPE { Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */ } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE; -typedef struct _NDIS_802_11_NETWORK_TYPE_LIST { +struct rt_ndis_802_11_network_type_list { u32 NumberOfItems; /* in list below, at least 1 */ NDIS_802_11_NETWORK_TYPE NetworkType[1]; -} NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST; +}; typedef enum _NDIS_802_11_POWER_MODE { Ndis802_11PowerModeCAM, @@ -202,22 +202,22 @@ typedef unsigned long NDIS_802_11_TX_POWER_LEVEL; /* in milliwatts */ /* */ typedef long NDIS_802_11_RSSI; /* in dBm */ -typedef struct _NDIS_802_11_CONFIGURATION_FH { +struct rt_ndis_802_11_configuration_fh { unsigned long Length; /* Length of structure */ unsigned long HopPattern; /* As defined by 802.11, MSB set */ unsigned long HopSet; /* to one if non-802.11 */ unsigned long DwellTime; /* units are Kusec */ -} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH; +}; -typedef struct _NDIS_802_11_CONFIGURATION { +struct rt_ndis_802_11_configuration { unsigned long Length; /* Length of structure */ unsigned long BeaconPeriod; /* units are Kusec */ unsigned long ATIMWindow; /* units are Kusec */ unsigned long DSConfig; /* Frequency, units are kHz */ - NDIS_802_11_CONFIGURATION_FH FHConfig; -} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION; + struct rt_ndis_802_11_configuration_fh FHConfig; +}; -typedef struct _NDIS_802_11_STATISTICS { +struct rt_ndis_802_11_statistics { unsigned long Length; /* Length of structure */ LARGE_INTEGER TransmittedFragmentCount; LARGE_INTEGER MulticastTransmittedFrameCount; @@ -240,31 +240,31 @@ typedef struct _NDIS_802_11_STATISTICS { LARGE_INTEGER CCMPReplays; LARGE_INTEGER CCMPDecryptErrors; LARGE_INTEGER FourWayHandshakeFailures; -} NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS; +}; typedef unsigned long NDIS_802_11_KEY_INDEX; typedef unsigned long long NDIS_802_11_KEY_RSC; #define MAX_RADIUS_SRV_NUM 2 /* 802.1x failover number */ -typedef struct PACKED _RADIUS_SRV_INFO { +struct PACKED rt_radius_srv_info { u32 radius_ip; u32 radius_port; u8 radius_key[64]; u8 radius_key_len; -} RADIUS_SRV_INFO, *PRADIUS_SRV_INFO; +}; -typedef struct PACKED _RADIUS_KEY_INFO { +struct PACKED rt_radius_key_info { u8 radius_srv_num; - RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM]; + struct rt_radius_srv_info radius_srv_info[MAX_RADIUS_SRV_NUM]; u8 ieee8021xWEP; /* dynamic WEP */ u8 key_index; u8 key_length; /* length of key in bytes */ u8 key_material[13]; -} RADIUS_KEY_INFO, *PRADIUS_KEY_INFO; +}; /* It's used by 802.1x daemon to require relative configuration */ -typedef struct PACKED _RADIUS_CONF { +struct PACKED rt_radius_conf { u32 Length; /* Length of this structure */ u8 mbss_num; /* indicate multiple BSS number */ u32 own_ip_addr; @@ -274,38 +274,38 @@ typedef struct PACKED _RADIUS_CONF { u8 EAPifname_len[8]; u8 PreAuthifname[8][IFNAMSIZ]; u8 PreAuthifname_len[8]; - RADIUS_KEY_INFO RadiusInfo[8]; -} RADIUS_CONF, *PRADIUS_CONF; + struct rt_radius_key_info RadiusInfo[8]; +}; /* Key mapping keys require a BSSID */ -typedef struct _NDIS_802_11_KEY { +struct rt_ndis_802_11_key { u32 Length; /* Length of this structure */ u32 KeyIndex; u32 KeyLength; /* length of key in bytes */ NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_KEY_RSC KeyRSC; u8 KeyMaterial[1]; /* variable length depending on above field */ -} NDIS_802_11_KEY, *PNDIS_802_11_KEY; +}; -typedef struct _NDIS_802_11_PASSPHRASE { +struct rt_ndis_802_11_passphrase { u32 KeyLength; /* length of key in bytes */ NDIS_802_11_MAC_ADDRESS BSSID; u8 KeyMaterial[1]; /* variable length depending on above field */ -} NDIS_802_11_PASSPHRASE, *PNDIS_802_11_PASSPHRASE; +}; -typedef struct _NDIS_802_11_REMOVE_KEY { +struct rt_ndis_802_11_remove_key { u32 Length; /* Length of this structure */ u32 KeyIndex; NDIS_802_11_MAC_ADDRESS BSSID; -} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY; +}; -typedef struct _NDIS_802_11_WEP { +struct rt_ndis_802_11_wep { u32 Length; /* Length of this structure */ u32 KeyIndex; /* 0 is the per-client key, 1-N are the */ /* global keys */ u32 KeyLength; /* length of key in bytes */ u8 KeyMaterial[1]; /* variable length depending on above field */ -} NDIS_802_11_WEP, *PNDIS_802_11_WEP; +}; typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE { Ndis802_11IBSS, @@ -333,63 +333,63 @@ typedef enum _NDIS_802_11_AUTHENTICATION_MODE { typedef u8 NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */ typedef u8 NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */ -typedef struct PACKED _NDIS_802_11_SSID { +struct PACKED rt_ndis_802_11_ssid { u32 SsidLength; /* length of SSID field below, in bytes; */ /* this can be zero. */ u8 Ssid[NDIS_802_11_LENGTH_SSID]; /* SSID information field */ -} NDIS_802_11_SSID, *PNDIS_802_11_SSID; +}; -typedef struct PACKED _NDIS_WLAN_BSSID { +struct PACKED rt_ndis_wlan_bssid { unsigned long Length; /* Length of this structure */ NDIS_802_11_MAC_ADDRESS MacAddress; /* BSSID */ u8 Reserved[2]; - NDIS_802_11_SSID Ssid; /* SSID */ + struct rt_ndis_802_11_ssid Ssid; /* SSID */ unsigned long Privacy; /* WEP encryption requirement */ NDIS_802_11_RSSI Rssi; /* receive signal strength in dBm */ NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; - NDIS_802_11_CONFIGURATION Configuration; + struct rt_ndis_802_11_configuration Configuration; NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; NDIS_802_11_RATES SupportedRates; -} NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID; +}; -typedef struct PACKED _NDIS_802_11_BSSID_LIST { +struct PACKED rt_ndis_802_11_bssid_list { u32 NumberOfItems; /* in list below, at least 1 */ - NDIS_WLAN_BSSID Bssid[1]; -} NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST; + struct rt_ndis_wlan_bssid Bssid[1]; +}; /* Added Capabilities, IELength and IEs for each BSSID */ -typedef struct PACKED _NDIS_WLAN_BSSID_EX { +struct PACKED rt_ndis_wlan_bssid_ex { unsigned long Length; /* Length of this structure */ NDIS_802_11_MAC_ADDRESS MacAddress; /* BSSID */ u8 Reserved[2]; - NDIS_802_11_SSID Ssid; /* SSID */ + struct rt_ndis_802_11_ssid Ssid; /* SSID */ u32 Privacy; /* WEP encryption requirement */ NDIS_802_11_RSSI Rssi; /* receive signal */ /* strength in dBm */ NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; - NDIS_802_11_CONFIGURATION Configuration; + struct rt_ndis_802_11_configuration Configuration; NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; NDIS_802_11_RATES_EX SupportedRates; unsigned long IELength; u8 IEs[1]; -} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX; +}; -typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX { +struct PACKED rt_ndis_802_11_bssid_list_ex { u32 NumberOfItems; /* in list below, at least 1 */ - NDIS_WLAN_BSSID_EX Bssid[1]; -} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX; + struct rt_ndis_wlan_bssid_ex Bssid[1]; +}; -typedef struct PACKED _NDIS_802_11_FIXED_IEs { +struct PACKED rt_ndis_802_11_fixed_ies { u8 Timestamp[8]; u16 BeaconInterval; u16 Capabilities; -} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs; +}; -typedef struct _NDIS_802_11_VARIABLE_IEs { +struct rt_ndis_802_11_variable_ies { u8 ElementID; u8 Length; /* Number of bytes in data field */ u8 data[1]; -} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs; +}; typedef unsigned long NDIS_802_11_FRAGMENTATION_THRESHOLD; @@ -436,34 +436,34 @@ typedef enum _NDIS_802_11_RELOAD_DEFAULTS { #define NDIS_802_11_AI_RESFI_STATUSCODE 2 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4 -typedef struct _NDIS_802_11_AI_REQFI { +struct rt_ndis_802_11_ai_reqfi { u16 Capabilities; u16 ListenInterval; NDIS_802_11_MAC_ADDRESS CurrentAPAddress; -} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI; +}; -typedef struct _NDIS_802_11_AI_RESFI { +struct rt_ndis_802_11_ai_resfi { u16 Capabilities; u16 StatusCode; u16 AssociationId; -} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; +}; -typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION { +struct rt_ndis_802_11_association_information { unsigned long Length; u16 AvailableRequestFixedIEs; - NDIS_802_11_AI_REQFI RequestFixedIEs; + struct rt_ndis_802_11_ai_reqfi RequestFixedIEs; unsigned long RequestIELength; unsigned long OffsetRequestIEs; u16 AvailableResponseFixedIEs; - NDIS_802_11_AI_RESFI ResponseFixedIEs; + struct rt_ndis_802_11_ai_resfi ResponseFixedIEs; unsigned long ResponseIELength; unsigned long OffsetResponseIEs; -} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; +}; -typedef struct _NDIS_802_11_AUTHENTICATION_EVENT { - NDIS_802_11_STATUS_INDICATION Status; - NDIS_802_11_AUTHENTICATION_REQUEST Request[1]; -} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT; +struct rt_ndis_802_11_authentication_event { + struct rt_ndis_802_11_status_indication Status; + struct rt_ndis_802_11_authentication_request Request[1]; +}; /* 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE */ typedef enum _NDIS_802_11_MEDIA_STREAM_MODE { @@ -474,31 +474,30 @@ typedef enum _NDIS_802_11_MEDIA_STREAM_MODE { /* PMKID Structures */ typedef u8 NDIS_802_11_PMKID_VALUE[16]; -typedef struct _BSSID_INFO { +struct rt_bssid_info { NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_PMKID_VALUE PMKID; -} BSSID_INFO, *PBSSID_INFO; +}; -typedef struct _NDIS_802_11_PMKID { +struct rt_ndis_802_11_pmkid { u32 Length; u32 BSSIDInfoCount; - BSSID_INFO BSSIDInfo[1]; -} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID; + struct rt_bssid_info BSSIDInfo[1]; +}; -typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION { +struct rt_ndis_802_11_authentication_encryption { NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported; NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported; -} NDIS_802_11_AUTHENTICATION_ENCRYPTION, - *PNDIS_802_11_AUTHENTICATION_ENCRYPTION; +}; -typedef struct _NDIS_802_11_CAPABILITY { +struct rt_ndis_802_11_capability { unsigned long Length; unsigned long Version; unsigned long NoOfPMKIDs; unsigned long NoOfAuthEncryptPairsSupported; - NDIS_802_11_AUTHENTICATION_ENCRYPTION + struct rt_ndis_802_11_authentication_encryption AuthenticationEncryptionSupported[1]; -} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; +}; #define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x01) /* Sync. with AP for wsc upnp daemon */ #define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02) @@ -595,25 +594,25 @@ typedef enum _RT_802_11_PHY_MODE { } RT_802_11_PHY_MODE; /* put all proprietery for-query objects here to reduce # of Query_OID */ -typedef struct _RT_802_11_LINK_STATUS { +struct rt_802_11_link_status { unsigned long CurrTxRate; /* in units of 0.5Mbps */ unsigned long ChannelQuality; /* 0..100 % */ unsigned long TxByteCount; /* both ok and fail */ unsigned long RxByteCount; /* both ok and fail */ unsigned long CentralChannel; /* 40MHz central channel number */ -} RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS; +}; -typedef struct _RT_802_11_EVENT_LOG { +struct rt_802_11_event_log { LARGE_INTEGER SystemTime; /* timestammp via NdisGetCurrentSystemTime() */ u8 Addr[MAC_ADDR_LENGTH]; u16 Event; /* EVENT_xxx */ -} RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG; +}; -typedef struct _RT_802_11_EVENT_TABLE { +struct rt_802_11_event_table { unsigned long Num; unsigned long Rsv; /* to align Log[] at LARGE_INEGER boundary */ - RT_802_11_EVENT_LOG Log[MAX_NUMBER_OF_EVENT]; -} RT_802_11_EVENT_TABLE, PRT_802_11_EVENT_TABLE; + struct rt_802_11_event_log Log[MAX_NUMBER_OF_EVENT]; +}; /* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! */ typedef union _MACHTTRANSMIT_SETTING { @@ -628,7 +627,7 @@ typedef union _MACHTTRANSMIT_SETTING { u16 word; } MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING; -typedef struct _RT_802_11_MAC_ENTRY { +struct rt_802_11_mac_entry { u8 Addr[MAC_ADDR_LENGTH]; u8 Aid; u8 Psm; /* 0:PWR_ACTIVE, 1:PWR_SAVE */ @@ -638,21 +637,21 @@ typedef struct _RT_802_11_MAC_ENTRY { char AvgRssi2; u32 ConnectedTime; MACHTTRANSMIT_SETTING TxRate; -} RT_802_11_MAC_ENTRY, *PRT_802_11_MAC_ENTRY; +}; -typedef struct _RT_802_11_MAC_TABLE { +struct rt_802_11_mac_table { unsigned long Num; - RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC]; -} RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE; + struct rt_802_11_mac_entry Entry[MAX_NUMBER_OF_MAC]; +}; /* structure for query/set hardware register - MAC, BBP, RF register */ -typedef struct _RT_802_11_HARDWARE_REGISTER { +struct rt_802_11_hardware_register { unsigned long HardwareType; /* 0:MAC, 1:BBP, 2:RF register, 3:EEPROM */ unsigned long Offset; /* Q/S register offset addr */ unsigned long Data; /* R/W data buffer */ -} RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER; +}; -typedef struct _RT_802_11_AP_CONFIG { +struct rt_802_11_ap_config { unsigned long EnableTxBurst; /* 0-disable, 1-enable */ unsigned long EnableTurboRate; /* 0-disable, 1-enable 72/100mbps turbo rate */ unsigned long IsolateInterStaTraffic; /* 0-disable, 1-enable isolation */ @@ -661,10 +660,10 @@ typedef struct _RT_802_11_AP_CONFIG { unsigned long UseShortSlotTime; /* 0-no use, 1-use 9-us short slot time */ unsigned long Rsv1; /* must be 0 */ unsigned long SystemErrorBitmap; /* ignore upon SET, return system error upon QUERY */ -} RT_802_11_AP_CONFIG, *PRT_802_11_AP_CONFIG; +}; /* structure to query/set STA_CONFIG */ -typedef struct _RT_802_11_STA_CONFIG { +struct rt_802_11_sta_config { unsigned long EnableTxBurst; /* 0-disable, 1-enable */ unsigned long EnableTurboRate; /* 0-disable, 1-enable 72/100mbps turbo rate */ unsigned long UseBGProtection; /* 0-AUTO, 1-always ON, 2-always OFF */ @@ -673,12 +672,12 @@ typedef struct _RT_802_11_STA_CONFIG { unsigned long HwRadioStatus; /* 0-OFF, 1-ON, default is 1, Read-Only */ unsigned long Rsv1; /* must be 0 */ unsigned long SystemErrorBitmap; /* ignore upon SET, return system error upon QUERY */ -} RT_802_11_STA_CONFIG, *PRT_802_11_STA_CONFIG; +}; /* */ /* For OID Query or Set about BA structure */ /* */ -typedef struct _OID_BACAP_STRUC { +struct rt_oid_bacap { u8 RxBAWinLimit; u8 TxBAWinLimit; u8 Policy; /* 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid */ @@ -687,32 +686,32 @@ typedef struct _OID_BACAP_STRUC { u8 AmsduSize; /* 0:3839, 1:7935 bytes. u32 MSDUSizeToBytes[] = { 3839, 7935}; */ u8 MMPSmode; /* MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable */ BOOLEAN AutoBA; /* Auto BA will automatically */ -} OID_BACAP_STRUC, *POID_BACAP_STRUC; +}; -typedef struct _RT_802_11_ACL_ENTRY { +struct rt_802_11_acl_entry { u8 Addr[MAC_ADDR_LENGTH]; u16 Rsv; -} RT_802_11_ACL_ENTRY, *PRT_802_11_ACL_ENTRY; +}; -typedef struct PACKED _RT_802_11_ACL { +struct PACKED rt_rt_802_11_acl { unsigned long Policy; /* 0-disable, 1-positive list, 2-negative list */ unsigned long Num; - RT_802_11_ACL_ENTRY Entry[MAX_NUMBER_OF_ACL]; -} RT_802_11_ACL, *PRT_802_11_ACL; + struct rt_802_11_acl_entry Entry[MAX_NUMBER_OF_ACL]; +}; -typedef struct _RT_802_11_WDS { +struct rt_802_11_wds { unsigned long Num; NDIS_802_11_MAC_ADDRESS Entry[24 /*MAX_NUM_OF_WDS_LINK */ ]; unsigned long KeyLength; u8 KeyMaterial[32]; -} RT_802_11_WDS, *PRT_802_11_WDS; +}; -typedef struct _RT_802_11_TX_RATES_ { +struct rt_802_11_tx_rates { u8 SupRateLen; u8 SupRate[MAX_LENGTH_OF_SUPPORT_RATES]; u8 ExtRateLen; u8 ExtRate[MAX_LENGTH_OF_SUPPORT_RATES]; -} RT_802_11_TX_RATES, *PRT_802_11_TX_RATES; +}; /* Definition of extra information code */ #define GENERAL_LINK_UP 0x0 /* Link is Up */ @@ -732,7 +731,7 @@ typedef struct _RT_802_11_TX_RATES_ { #define EXTRA_INFO_CLEAR 0xffffffff /* This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use. */ -typedef struct { +struct rt_oid_set_ht_phymode { RT_802_11_PHY_MODE PhyMode; /* */ u8 TransmitNo; u8 HtMode; /*HTMODE_GF or HTMODE_MM */ @@ -742,7 +741,7 @@ typedef struct { u8 STBC; u8 SHORTGI; u8 rsv; -} OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE; +}; #define MAX_CUSTOM_LEN 128 @@ -752,14 +751,14 @@ typedef enum _RT_802_11_D_CLIENT_MODE { Rt802_11_D_Strict, } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE; -typedef struct _RT_CHANNEL_LIST_INFO { +struct rt_channel_list_info { u8 ChannelList[MAX_NUM_OF_CHS]; /* list all supported channels for site survey */ u8 ChannelListNum; /* number of channel in ChannelList[] */ -} RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO; +}; /* WSC configured credential */ -typedef struct _WSC_CREDENTIAL { - NDIS_802_11_SSID SSID; /* mandatory */ +struct rt_wsc_credential { + struct rt_ndis_802_11_ssid SSID; /* mandatory */ u16 AuthType; /* mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk */ u16 EncrType; /* mandatory, 1: none, 2: wep, 4: tkip, 8: aes */ u8 Key[64]; /* mandatory, Maximum 64 byte */ @@ -767,13 +766,13 @@ typedef struct _WSC_CREDENTIAL { u8 MacAddr[6]; /* mandatory, AP MAC address */ u8 KeyIndex; /* optional, default is 1 */ u8 Rsvd[3]; /* Make alignment */ -} WSC_CREDENTIAL, *PWSC_CREDENTIAL; +}; /* WSC configured profiles */ -typedef struct _WSC_PROFILE { +struct rt_wsc_profile { u32 ProfileCnt; u32 ApplyProfileIdx; /* add by johnli, fix WPS test plan 5.1.1 */ - WSC_CREDENTIAL Profile[8]; /* Support up to 8 profiles */ -} WSC_PROFILE, *PWSC_PROFILE; + struct rt_wsc_credential Profile[8]; /* Support up to 8 profiles */ +}; #endif /* _OID_H_ */ diff --git a/drivers/staging/rt2860/pci_main_dev.c b/drivers/staging/rt2860/pci_main_dev.c index 20db402b1d99..6af430419070 100644 --- a/drivers/staging/rt2860/pci_main_dev.c +++ b/drivers/staging/rt2860/pci_main_dev.c @@ -59,7 +59,7 @@ static void __exit rt2860_cleanup_module(void); static int __init rt2860_init_module(void); static void RTMPInitPCIeDevice(IN struct pci_dev *pci_dev, - IN PRTMP_ADAPTER pAd); + struct rt_rtmp_adapter *pAd); #ifdef CONFIG_PM static int rt2860_suspend(struct pci_dev *pci_dev, pm_message_t state); @@ -123,7 +123,7 @@ resume:rt2860_resume, ***************************************************************************/ #ifdef CONFIG_PM -void RT2860RejectPendingPackets(IN PRTMP_ADAPTER pAd) +void RT2860RejectPendingPackets(struct rt_rtmp_adapter *pAd) { /* clear PS packets */ /* clear TxSw packets */ @@ -132,7 +132,7 @@ void RT2860RejectPendingPackets(IN PRTMP_ADAPTER pAd) static int rt2860_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct net_device *net_dev = pci_get_drvdata(pci_dev); - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) NULL; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)NULL; int retval = 0; DBGPRINT(RT_DEBUG_TRACE, ("===> rt2860_suspend()\n")); @@ -184,7 +184,7 @@ static int rt2860_suspend(struct pci_dev *pci_dev, pm_message_t state) static int rt2860_resume(struct pci_dev *pci_dev) { struct net_device *net_dev = pci_get_drvdata(pci_dev); - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) NULL; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)NULL; int retval; /* set the power state of a PCI device */ @@ -268,13 +268,13 @@ module_exit(rt2860_cleanup_module); static int __devinit rt2860_probe(IN struct pci_dev *pci_dev, IN const struct pci_device_id *pci_id) { - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) NULL; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)NULL; struct net_device *net_dev; void *handle; char *print_name; unsigned long csr_addr; int rv = 0; - RTMP_OS_NETDEV_OP_HOOK netDevHook; + struct rt_rtmp_os_netdev_op_hook netDevHook; DBGPRINT(RT_DEBUG_TRACE, ("===> rt2860_probe\n")); @@ -314,7 +314,7 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev, pci_set_master(pci_dev); /*RtmpDevInit============================================== */ - /* Allocate RTMP_ADAPTER adapter structure */ + /* Allocate struct rt_rtmp_adapter adapter structure */ handle = kmalloc(sizeof(struct os_cookie), GFP_KERNEL); if (handle == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -325,10 +325,10 @@ static int __devinit rt2860_probe(IN struct 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 "struct rt_rtmp_adapter" */ if (rv != NDIS_STATUS_SUCCESS) goto err_out_iounmap; - /* Here are the RTMP_ADAPTER structure with pci-bus specific parameters. */ + /* Here are the struct rt_rtmp_adapter structure with pci-bus specific parameters. */ pAd->CSRBaseAddress = (u8 *)csr_addr; DBGPRINT(RT_DEBUG_ERROR, ("pAd->CSRBaseAddress =0x%lx, csr_addr=0x%lx!\n", @@ -369,7 +369,7 @@ err_out_free_netdev: RtmpOSNetDevFree(net_dev); err_out_free_radev: - /* free RTMP_ADAPTER strcuture and os_cookie */ + /* free struct rt_rtmp_adapter strcuture and os_cookie */ RTMPFreeAdapter(pAd); err_out_iounmap: @@ -392,7 +392,7 @@ err_out: static void __devexit rt2860_remove_one(IN struct pci_dev *pci_dev) { struct net_device *net_dev = pci_get_drvdata(pci_dev); - RTMP_ADAPTER *pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; unsigned long csr_addr = net_dev->base_addr; /* pAd->CSRBaseAddress; */ GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -410,7 +410,7 @@ static void __devexit rt2860_remove_one(IN struct pci_dev *pci_dev) release_mem_region(pci_resource_start(pci_dev, 0), pci_resource_len(pci_dev, 0)); - /* Free RTMP_ADAPTER related structures. */ + /* Free struct rt_rtmp_adapter related structures. */ RtmpRaDevCtrlExit(pAd); } else { @@ -456,7 +456,7 @@ BOOLEAN RT28XXChipsetCheck(IN void *_dev_p) * PCIe device initialization related procedures. * ***************************************************************************/ -static void RTMPInitPCIeDevice(IN struct pci_dev *pci_dev, IN PRTMP_ADAPTER pAd) +static void RTMPInitPCIeDevice(struct pci_dev *pci_dev, struct rt_rtmp_adapter *pAd) { u16 device_id; struct os_cookie *pObj; @@ -495,7 +495,7 @@ static void RTMPInitPCIeDevice(IN struct pci_dev *pci_dev, IN PRTMP_ADAPTER pAd) } } -void RTMPInitPCIeLinkCtrlValue(IN PRTMP_ADAPTER pAd) +void RTMPInitPCIeLinkCtrlValue(struct rt_rtmp_adapter *pAd) { int pos; u16 reg16, data2, PCIePowerSaveLevel, Configuration; @@ -810,7 +810,7 @@ void RTMPInitPCIeLinkCtrlValue(IN PRTMP_ADAPTER pAd) } } -void RTMPFindHostPCIDev(IN PRTMP_ADAPTER pAd) +void RTMPFindHostPCIDev(struct rt_rtmp_adapter *pAd) { u16 reg16; u8 reg8; @@ -856,7 +856,7 @@ void RTMPFindHostPCIDev(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPPCIeLinkCtrlValueRestore(IN PRTMP_ADAPTER pAd, u8 Level) +void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level) { u16 PCIePowerSaveLevel, reg16; u16 Configuration; @@ -950,7 +950,7 @@ void RTMPPCIeLinkCtrlValueRestore(IN PRTMP_ADAPTER pAd, u8 Level) ======================================================================== */ -void RTMPPCIeLinkCtrlSetting(IN PRTMP_ADAPTER pAd, u16 Max) +void RTMPPCIeLinkCtrlSetting(struct rt_rtmp_adapter *pAd, u16 Max) { u16 PCIePowerSaveLevel, reg16; u16 Configuration; @@ -1076,7 +1076,7 @@ void RTMPPCIeLinkCtrlSetting(IN PRTMP_ADAPTER pAd, u16 Max) ======================================================================== */ -void RTMPrt3xSetPCIePowerLinkCtrl(IN PRTMP_ADAPTER pAd) +void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd) { unsigned long HostConfiguration = 0; diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index 4c2811799442..a94593c548ef 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -89,7 +89,7 @@ void RTMP_SetPeriodicTimer(struct timer_list * pTimer, } /* convert NdisMInitializeTimer --> RTMP_OS_Init_Timer */ -void RTMP_OS_Init_Timer(IN PRTMP_ADAPTER pAd, +void RTMP_OS_Init_Timer(struct rt_rtmp_adapter *pAd, struct timer_list * pTimer, IN TIMER_FUNCTION function, void *data) { @@ -127,7 +127,7 @@ void RTMP_OS_Del_Timer(struct timer_list * pTimer, } -void RTMP_OS_Release_Packet(IN PRTMP_ADAPTER pAd, IN PQUEUE_ENTRY pEntry) +void RTMP_OS_Release_Packet(struct rt_rtmp_adapter *pAd, struct rt_queue_entry *pEntry) { /*RTMPFreeNdisPacket(pAd, (struct sk_buff *)pEntry); */ } @@ -150,7 +150,7 @@ void RTMP_GetCurrentSystemTime(LARGE_INTEGER * time) } /* pAd MUST allow to be NULL */ -int os_alloc_mem(IN RTMP_ADAPTER * pAd, u8 ** mem, unsigned long size) +int os_alloc_mem(struct rt_rtmp_adapter *pAd, u8 ** mem, unsigned long size) { *mem = (u8 *)kmalloc(size, GFP_ATOMIC); if (*mem) @@ -160,7 +160,7 @@ int os_alloc_mem(IN RTMP_ADAPTER * pAd, u8 ** mem, unsigned long size) } /* pAd MUST allow to be NULL */ -int os_free_mem(IN PRTMP_ADAPTER pAd, void *mem) +int os_free_mem(struct rt_rtmp_adapter *pAd, void *mem) { ASSERT(mem); @@ -168,7 +168,7 @@ int os_free_mem(IN PRTMP_ADAPTER pAd, void *mem) return (NDIS_STATUS_SUCCESS); } -void *RtmpOSNetPktAlloc(IN RTMP_ADAPTER * pAd, IN int size) +void *RtmpOSNetPktAlloc(struct rt_rtmp_adapter *pAd, IN int size) { struct sk_buff *skb; /* Add 2 more bytes for ip header alignment */ @@ -177,7 +177,7 @@ void *RtmpOSNetPktAlloc(IN RTMP_ADAPTER * pAd, IN int size) return ((void *)skb); } -void *RTMP_AllocateFragPacketBuffer(IN PRTMP_ADAPTER pAd, +void *RTMP_AllocateFragPacketBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length) { struct sk_buff *pkt; @@ -196,7 +196,7 @@ void *RTMP_AllocateFragPacketBuffer(IN PRTMP_ADAPTER pAd, return (void *)pkt; } -void *RTMP_AllocateTxPacketBuffer(IN PRTMP_ADAPTER pAd, +void *RTMP_AllocateTxPacketBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress) @@ -220,7 +220,7 @@ void *RTMP_AllocateTxPacketBuffer(IN PRTMP_ADAPTER pAd, return (void *)pkt; } -void build_tx_packet(IN PRTMP_ADAPTER pAd, +void build_tx_packet(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pFrame, unsigned long FrameLen) { @@ -233,7 +233,7 @@ void build_tx_packet(IN PRTMP_ADAPTER pAd, NdisMoveMemory(skb_put(pTxPkt, FrameLen), pFrame, FrameLen); } -void RTMPFreeAdapter(IN PRTMP_ADAPTER pAd) +void RTMPFreeAdapter(struct rt_rtmp_adapter *pAd) { struct os_cookie *os_cookie; int index; @@ -260,7 +260,7 @@ void RTMPFreeAdapter(IN PRTMP_ADAPTER pAd) NdisFreeSpinLock(&pAd->irq_lock); - vfree(pAd); /* pci_free_consistent(os_cookie->pci_dev,sizeof(RTMP_ADAPTER),pAd,os_cookie->pAd_pa); */ + vfree(pAd); /* pci_free_consistent(os_cookie->pci_dev,sizeof(struct rt_rtmp_adapter),pAd,os_cookie->pAd_pa); */ if (os_cookie) kfree(os_cookie); } @@ -292,7 +292,7 @@ BOOLEAN OS_Need_Clone_Packet(void) ======================================================================== */ -int RTMPCloneNdisPacket(IN PRTMP_ADAPTER pAd, +int RTMPCloneNdisPacket(struct rt_rtmp_adapter *pAd, IN BOOLEAN pInsAMSDUHdr, void *pInPacket, void ** ppOutPacket) @@ -323,7 +323,7 @@ int RTMPCloneNdisPacket(IN PRTMP_ADAPTER pAd, } /* the allocated NDIS PACKET must be freed via RTMPFreeNdisPacket() */ -int RTMPAllocateNdisPacket(IN PRTMP_ADAPTER pAd, +int RTMPAllocateNdisPacket(struct rt_rtmp_adapter *pAd, void ** ppPacket, u8 *pHeader, u32 HeaderLen, @@ -367,7 +367,7 @@ int RTMPAllocateNdisPacket(IN PRTMP_ADAPTER pAd, corresponding NDIS_BUFFER and allocated memory. ======================================================================== */ -void RTMPFreeNdisPacket(IN PRTMP_ADAPTER pAd, void *pPacket) +void RTMPFreeNdisPacket(struct rt_rtmp_adapter *pAd, void *pPacket) { dev_kfree_skb_any(RTPKT_TO_OSPKT(pPacket)); } @@ -386,7 +386,7 @@ int Sniff2BytesFromNdisBuffer(char *pFirstBuffer, } void RTMP_QueryPacketInfo(void *pPacket, - OUT PACKET_INFO * pPacketInfo, + struct rt_packet_info *pPacketInfo, u8 ** pSrcBufVA, u32 * pSrcBufLen) { pPacketInfo->BufferCount = 1; @@ -399,7 +399,7 @@ void RTMP_QueryPacketInfo(void *pPacket, } void RTMP_QueryNextPacketInfo(void ** ppPacket, - OUT PACKET_INFO * pPacketInfo, + struct rt_packet_info *pPacketInfo, u8 ** pSrcBufVA, u32 * pSrcBufLen) { void *pPacket = NULL; @@ -429,7 +429,7 @@ void RTMP_QueryNextPacketInfo(void ** ppPacket, } } -void *DuplicatePacket(IN PRTMP_ADAPTER pAd, +void *DuplicatePacket(struct rt_rtmp_adapter *pAd, void *pPacket, u8 FromWhichBSSID) { struct sk_buff *skb; @@ -450,7 +450,7 @@ void *DuplicatePacket(IN PRTMP_ADAPTER pAd, } -void *duplicate_pkt(IN PRTMP_ADAPTER pAd, +void *duplicate_pkt(struct rt_rtmp_adapter *pAd, u8 *pHeader802_3, u32 HdrLen, u8 *pData, @@ -474,7 +474,7 @@ void *duplicate_pkt(IN PRTMP_ADAPTER pAd, } #define TKIP_TX_MIC_SIZE 8 -void *duplicate_pkt_with_TKIP_MIC(IN PRTMP_ADAPTER pAd, +void *duplicate_pkt_with_TKIP_MIC(struct rt_rtmp_adapter *pAd, void *pPacket) { struct sk_buff *skb, *newskb; @@ -497,7 +497,7 @@ void *duplicate_pkt_with_TKIP_MIC(IN PRTMP_ADAPTER pAd, return OSPKT_TO_RTPKT(skb); } -void *ClonePacket(IN PRTMP_ADAPTER pAd, +void *ClonePacket(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pData, unsigned long DataSize) { @@ -524,8 +524,8 @@ void *ClonePacket(IN PRTMP_ADAPTER pAd, /* */ /* change OS packet DataPtr and DataLen */ /* */ -void update_os_packet_info(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void update_os_packet_info(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { struct sk_buff *pOSPkt; @@ -538,8 +538,8 @@ void update_os_packet_info(IN PRTMP_ADAPTER pAd, pOSPkt->tail = pOSPkt->data + pOSPkt->len; } -void wlan_802_11_to_802_3_packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, +void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 *pHeader802_3, u8 FromWhichBSSID) { @@ -564,7 +564,7 @@ void wlan_802_11_to_802_3_packet(IN PRTMP_ADAPTER pAd, LENGTH_802_3); } -void announce_802_3_packet(IN PRTMP_ADAPTER pAd, void *pPacket) +void announce_802_3_packet(struct rt_rtmp_adapter *pAd, void *pPacket) { struct sk_buff *pRxPkt; @@ -579,8 +579,8 @@ void announce_802_3_packet(IN PRTMP_ADAPTER pAd, void *pPacket) netif_rx(pRxPkt); } -PRTMP_SCATTER_GATHER_LIST -rt_get_sg_list_from_packet(void *pPacket, RTMP_SCATTER_GATHER_LIST * sg) +struct rt_rtmp_sg_list * +rt_get_sg_list_from_packet(void *pPacket, struct rt_rtmp_sg_list *sg) { sg->NumberOfElements = 1; sg->Elements[0].Address = GET_OS_PKT_DATAPTR(pPacket); @@ -628,7 +628,7 @@ void hex_dump(char *str, unsigned char *pSrcBufVA, unsigned int SrcBufLen) ======================================================================== */ -void RTMPSendWirelessEvent(IN PRTMP_ADAPTER pAd, +void RTMPSendWirelessEvent(struct rt_rtmp_adapter *pAd, u16 Event_flag, u8 *pAddr, u8 BssIdx, char Rssi) { @@ -715,10 +715,10 @@ void RTMPSendWirelessEvent(IN PRTMP_ADAPTER pAd, __func__)); } -void send_monitor_packets(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) +void send_monitor_packets(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) { struct sk_buff *pOSPkt; - wlan_ng_prism2_header *ph; + struct rt_wlan_ng_prism2_header *ph; int rate_index = 0; u16 header_len = 0; u8 temp_header[40] = { 0 }; @@ -743,11 +743,11 @@ void send_monitor_packets(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) goto err_free_sk_buff; } - if (pRxBlk->DataSize + sizeof(wlan_ng_prism2_header) > + if (pRxBlk->DataSize + sizeof(struct rt_wlan_ng_prism2_header) > RX_BUFFER_AGGRESIZE) { DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%zu)\n", __func__, - pRxBlk->DataSize + sizeof(wlan_ng_prism2_header))); + pRxBlk->DataSize + sizeof(struct rt_wlan_ng_prism2_header))); goto err_free_sk_buff; } @@ -795,9 +795,9 @@ void send_monitor_packets(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) skb_pull(pOSPkt, (pRxBlk->pData - pOSPkt->data)); } /*end if */ - if (skb_headroom(pOSPkt) < (sizeof(wlan_ng_prism2_header) + header_len)) { + if (skb_headroom(pOSPkt) < (sizeof(struct rt_wlan_ng_prism2_header) + header_len)) { if (pskb_expand_head - (pOSPkt, (sizeof(wlan_ng_prism2_header) + header_len), 0, + (pOSPkt, (sizeof(struct rt_wlan_ng_prism2_header) + header_len), 0, GFP_ATOMIC)) { DBGPRINT(RT_DEBUG_ERROR, ("%s : Reallocate header size of sk_buff fail!\n", @@ -810,12 +810,12 @@ void send_monitor_packets(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) NdisMoveMemory(skb_push(pOSPkt, header_len), temp_header, header_len); - ph = (wlan_ng_prism2_header *) skb_push(pOSPkt, - sizeof(wlan_ng_prism2_header)); - NdisZeroMemory(ph, sizeof(wlan_ng_prism2_header)); + ph = (struct rt_wlan_ng_prism2_header *)skb_push(pOSPkt, + sizeof(struct rt_wlan_ng_prism2_header)); + NdisZeroMemory(ph, sizeof(struct rt_wlan_ng_prism2_header)); ph->msgcode = DIDmsg_lnxind_wlansniffrm; - ph->msglen = sizeof(wlan_ng_prism2_header); + ph->msglen = sizeof(struct rt_wlan_ng_prism2_header); strcpy((char *)ph->devname, (char *)pAd->net_dev->name); ph->hosttime.did = DIDmsg_lnxind_wlansniffrm_hosttime; @@ -909,7 +909,7 @@ int RtmpOSIRQRequest(struct net_device *pNetDev) { #ifdef RTMP_PCI_SUPPORT struct net_device *net_dev = pNetDev; - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; int retval = 0; GET_PAD_FROM_NET_DEV(pAd, pNetDev); @@ -935,7 +935,7 @@ int RtmpOSIRQRequest(struct net_device *pNetDev) int RtmpOSIRQRelease(struct net_device *pNetDev) { struct net_device *net_dev = pNetDev; - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -1005,12 +1005,12 @@ int RtmpOSFileWrite(struct file *osfd, char *pDataPtr, int writeLen) Task create/management/kill related functions. *******************************************************************************/ -int RtmpOSTaskKill(IN RTMP_OS_TASK * pTask) +int RtmpOSTaskKill(struct rt_rtmp_os_task *pTask) { - RTMP_ADAPTER *pAd; + struct rt_rtmp_adapter *pAd; int ret = NDIS_STATUS_FAILURE; - pAd = (RTMP_ADAPTER *) pTask->priv; + pAd = (struct rt_rtmp_adapter *)pTask->priv; #ifdef KTHREAD_SUPPORT if (pTask->kthread_task) { @@ -1043,7 +1043,7 @@ int RtmpOSTaskKill(IN RTMP_OS_TASK * pTask) } -int RtmpOSTaskNotifyToExit(IN RTMP_OS_TASK * pTask) +int RtmpOSTaskNotifyToExit(struct rt_rtmp_os_task *pTask) { #ifndef KTHREAD_SUPPORT @@ -1053,7 +1053,7 @@ int RtmpOSTaskNotifyToExit(IN RTMP_OS_TASK * pTask) return 0; } -void RtmpOSTaskCustomize(IN RTMP_OS_TASK * pTask) +void RtmpOSTaskCustomize(struct rt_rtmp_os_task *pTask) { #ifndef KTHREAD_SUPPORT @@ -1070,7 +1070,7 @@ void RtmpOSTaskCustomize(IN RTMP_OS_TASK * pTask) #endif } -int RtmpOSTaskAttach(IN RTMP_OS_TASK * pTask, +int RtmpOSTaskAttach(struct rt_rtmp_os_task *pTask, IN int (*fn) (void *), IN void *arg) { int status = NDIS_STATUS_SUCCESS; @@ -1098,7 +1098,7 @@ int RtmpOSTaskAttach(IN RTMP_OS_TASK * pTask, return status; } -int RtmpOSTaskInit(IN RTMP_OS_TASK * pTask, +int RtmpOSTaskInit(struct rt_rtmp_os_task *pTask, char *pTaskName, void * pPriv) { int len; @@ -1106,7 +1106,7 @@ int RtmpOSTaskInit(IN RTMP_OS_TASK * pTask, ASSERT(pTask); #ifndef KTHREAD_SUPPORT - NdisZeroMemory((u8 *)(pTask), sizeof(RTMP_OS_TASK)); + NdisZeroMemory((u8 *)(pTask), sizeof(struct rt_rtmp_os_task)); #endif len = strlen(pTaskName); @@ -1126,7 +1126,7 @@ int RtmpOSTaskInit(IN RTMP_OS_TASK * pTask, return NDIS_STATUS_SUCCESS; } -void RTMP_IndicateMediaState(IN PRTMP_ADAPTER pAd) +void RTMP_IndicateMediaState(struct rt_rtmp_adapter *pAd) { if (pAd->CommonCfg.bWirelessEvent) { if (pAd->IndicateMediaState == NdisMediaStateConnected) { @@ -1141,7 +1141,7 @@ void RTMP_IndicateMediaState(IN PRTMP_ADAPTER pAd) } } -int RtmpOSWrielessEventSend(IN RTMP_ADAPTER * pAd, +int RtmpOSWrielessEventSend(struct rt_rtmp_adapter *pAd, u32 eventType, int flags, u8 *pSrcMac, @@ -1167,7 +1167,7 @@ int RtmpOSWrielessEventSend(IN RTMP_ADAPTER * pAd, int RtmpOSNetDevAddrSet(struct net_device *pNetDev, u8 *pMacAddr) { struct net_device *net_dev; - RTMP_ADAPTER *pAd; + struct rt_rtmp_adapter *pAd; net_dev = pNetDev; GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -1187,7 +1187,7 @@ int RtmpOSNetDevAddrSet(struct net_device *pNetDev, u8 *pMacAddr) /* * Assign the network dev name for created Ralink WiFi interface. */ -static int RtmpOSNetDevRequestName(IN RTMP_ADAPTER * pAd, +static int RtmpOSNetDevRequestName(struct rt_rtmp_adapter *pAd, struct net_device *dev, char *pPrefixStr, int devIdx) { @@ -1278,7 +1278,7 @@ void RtmpOSNetDeviceRefPut(struct net_device *pNetDev) dev_put(pNetDev); } -int RtmpOSNetDevDestory(IN RTMP_ADAPTER * pAd, struct net_device *pNetDev) +int RtmpOSNetDevDestory(struct rt_rtmp_adapter *pAd, struct net_device *pNetDev) { /* TODO: Need to fix this */ @@ -1292,14 +1292,14 @@ void RtmpOSNetDevDetach(struct net_device *pNetDev) } int RtmpOSNetDevAttach(struct net_device *pNetDev, - IN RTMP_OS_NETDEV_OP_HOOK * pDevOpHook) + struct rt_rtmp_os_netdev_op_hook *pDevOpHook) { int ret, rtnl_locked = FALSE; DBGPRINT(RT_DEBUG_TRACE, ("RtmpOSNetDevAttach()--->\n")); /* If we need hook some callback function to the net device structrue, now do it. */ if (pDevOpHook) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, pNetDev); @@ -1331,7 +1331,7 @@ int RtmpOSNetDevAttach(struct net_device *pNetDev, return NDIS_STATUS_FAILURE; } -struct net_device *RtmpOSNetDevCreate(IN RTMP_ADAPTER * pAd, +struct net_device *RtmpOSNetDevCreate(struct rt_rtmp_adapter *pAd, int devType, int devNum, int privMemSize, char *pNamePrefix) diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h index d63ac7d3936a..e1eb740839e5 100644 --- a/drivers/staging/rt2860/rt_linux.h +++ b/drivers/staging/rt2860/rt_linux.h @@ -184,11 +184,11 @@ struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev); /*********************************************************************************** * OS file operation related data structure definitions ***********************************************************************************/ -typedef struct _RTMP_OS_FS_INFO_ { +struct rt_rtmp_os_fs_info { int fsuid; int fsgid; mm_segment_t fs; -} RTMP_OS_FS_INFO; +}; #define IS_FILE_OPEN_ERR(_fd) IS_ERR((_fd)) @@ -373,7 +373,7 @@ static inline void NdisGetSystemUpTime(unsigned long * time) } /*********************************************************************************** - * OS specific cookie data structure binding to RTMP_ADAPTER + * OS specific cookie data structure binding to struct rt_rtmp_adapter ***********************************************************************************/ struct os_cookie { @@ -631,7 +631,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, (void *)(pEntry) #define PACKET_TO_QUEUE_ENTRY(pPacket) \ - (PQUEUE_ENTRY)(pPacket) + (struct rt_queue_entry *)(pPacket) #define GET_SG_LIST_FROM_PACKET(_p, _sc) \ rt_get_sg_list_from_packet(_p, _sc) @@ -842,6 +842,6 @@ int rt28xx_sta_ioctl(struct net_device *net_dev, IN OUT struct ifreq *rq, int cm 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); -#define GET_PAD_FROM_NET_DEV(_pAd, _net_dev) (_pAd) = (PRTMP_ADAPTER)(_net_dev)->ml_priv; +#define GET_PAD_FROM_NET_DEV(_pAd, _net_dev) (_pAd) = (struct rt_rtmp_adapter *)(_net_dev)->ml_priv; #endif /* __RT_LINUX_H__ // */ diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index 347279912e44..fbbec9d2dcdd 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -83,7 +83,7 @@ Note: */ int MainVirtualIF_close(IN struct net_device *net_dev) { - RTMP_ADAPTER *pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -99,9 +99,9 @@ int MainVirtualIF_close(IN struct net_device *net_dev) if (INFRA_ON(pAd) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) { - MLME_DISASSOC_REQ_STRUCT DisReq; - MLME_QUEUE_ELEM *MsgElem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_disassoc_req DisReq; + struct rt_mlme_queue_elem *MsgElem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (MsgElem) { @@ -112,10 +112,10 @@ int MainVirtualIF_close(IN struct net_device *net_dev) MsgElem->Machine = ASSOC_STATE_MACHINE; MsgElem->MsgType = MT2_MLME_DISASSOC_REQ; MsgElem->MsgLen = - sizeof(MLME_DISASSOC_REQ_STRUCT); + sizeof(struct rt_mlme_disassoc_req); NdisMoveMemory(MsgElem->Msg, &DisReq, sizeof - (MLME_DISASSOC_REQ_STRUCT)); + (struct rt_mlme_disassoc_req)); /* Prevent to connect AP again in STAMlmePeriodicExec */ pAd->MlmeAux.AutoReconnectSsidLen = 32; @@ -167,7 +167,7 @@ Note: */ int MainVirtualIF_open(IN struct net_device *net_dev) { - RTMP_ADAPTER *pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -211,7 +211,7 @@ Note: int rt28xx_close(struct net_device *dev) { struct net_device *net_dev = (struct net_device *)dev; - RTMP_ADAPTER *pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; BOOLEAN Cancelled; u32 i = 0; @@ -381,7 +381,7 @@ Note: int rt28xx_open(struct net_device *dev) { struct net_device *net_dev = (struct net_device *)dev; - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; int retval = 0; /*struct os_cookie *pObj; */ @@ -459,14 +459,14 @@ static const struct net_device_ops rt2860_netdev_ops = { .ndo_start_xmit = rt28xx_send_packets, }; -struct net_device *RtmpPhyNetDevInit(IN RTMP_ADAPTER * pAd, - IN RTMP_OS_NETDEV_OP_HOOK * pNetDevHook) +struct net_device *RtmpPhyNetDevInit(struct rt_rtmp_adapter *pAd, + struct rt_rtmp_os_netdev_op_hook *pNetDevHook) { struct net_device *net_dev = NULL; /* int Status; */ net_dev = - RtmpOSNetDevCreate(pAd, INT_MAIN, 0, sizeof(PRTMP_ADAPTER), + RtmpOSNetDevCreate(pAd, INT_MAIN, 0, sizeof(struct rt_rtmp_adapter *), INF_MAIN_DEV_NAME); if (net_dev == NULL) { printk @@ -475,7 +475,7 @@ struct net_device *RtmpPhyNetDevInit(IN RTMP_ADAPTER * pAd, } NdisZeroMemory((unsigned char *)pNetDevHook, - sizeof(RTMP_OS_NETDEV_OP_HOOK)); + sizeof(struct rt_rtmp_os_netdev_op_hook)); pNetDevHook->netdev_ops = &rt2860_netdev_ops; pNetDevHook->priv_flags = INT_MAIN; pNetDevHook->needProtcted = FALSE; @@ -509,7 +509,7 @@ Note: int rt28xx_packet_xmit(struct sk_buff *skb) { struct net_device *net_dev = skb->dev; - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; int status = NETDEV_TX_OK; void *pPacket = (void *)skb; @@ -561,7 +561,7 @@ Note: static int rt28xx_send_packets(IN struct sk_buff *skb_p, IN struct net_device *net_dev) { - RTMP_ADAPTER *pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -580,7 +580,7 @@ static int rt28xx_send_packets(IN struct sk_buff *skb_p, /* This function will be called when query /proc */ struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -643,7 +643,7 @@ void tbtt_tasklet(unsigned long data) static struct net_device_stats *RT28xx_get_ether_stats(IN struct net_device *net_dev) { - RTMP_ADAPTER *pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; if (net_dev) GET_PAD_FROM_NET_DEV(pAd, net_dev); @@ -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, struct net_device *net_dev) +BOOLEAN RtmpPhyNetDevExit(struct rt_rtmp_adapter *pAd, struct net_device *net_dev) { /* Unregister network device */ @@ -724,11 +724,11 @@ Note: int AdapterBlockAllocateMemory(void *handle, void ** ppAd) { - *ppAd = (void *)vmalloc(sizeof(RTMP_ADAPTER)); /*pci_alloc_consistent(pci_dev, sizeof(RTMP_ADAPTER), phy_addr); */ + *ppAd = (void *)vmalloc(sizeof(struct rt_rtmp_adapter)); /*pci_alloc_consistent(pci_dev, sizeof(struct rt_rtmp_adapter), phy_addr); */ if (*ppAd) { - NdisZeroMemory(*ppAd, sizeof(RTMP_ADAPTER)); - ((PRTMP_ADAPTER) * ppAd)->OS_Cookie = handle; + NdisZeroMemory(*ppAd, sizeof(struct rt_rtmp_adapter)); + ((struct rt_rtmp_adapter *)* ppAd)->OS_Cookie = handle; return (NDIS_STATUS_SUCCESS); } else { return (NDIS_STATUS_FAILURE); diff --git a/drivers/staging/rt2860/rt_pci_rbus.c b/drivers/staging/rt2860/rt_pci_rbus.c index 7494df4a7d6c..e0a0aeeb17a2 100644 --- a/drivers/staging/rt2860/rt_pci_rbus.c +++ b/drivers/staging/rt2860/rt_pci_rbus.c @@ -77,7 +77,7 @@ static void fifo_statistic_full_tasklet(unsigned long data); * **************************************************************************/ /* Function for TxDesc Memory allocation. */ -void RTMP_AllocateTxDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateTxDescMemory(struct rt_rtmp_adapter *pAd, u32 Index, unsigned long Length, IN BOOLEAN Cached, @@ -93,7 +93,7 @@ void RTMP_AllocateTxDescMemory(IN PRTMP_ADAPTER pAd, } /* Function for MgmtDesc Memory allocation. */ -void RTMP_AllocateMgmtDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateMgmtDescMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, @@ -108,7 +108,7 @@ void RTMP_AllocateMgmtDescMemory(IN PRTMP_ADAPTER pAd, } /* Function for RxDesc Memory allocation. */ -void RTMP_AllocateRxDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateRxDescMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, @@ -123,7 +123,7 @@ void RTMP_AllocateRxDescMemory(IN PRTMP_ADAPTER pAd, } /* Function for free allocated Desc Memory. */ -void RTMP_FreeDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_FreeDescMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, void *VirtualAddress, dma_addr_t PhysicalAddress) @@ -135,7 +135,7 @@ void RTMP_FreeDescMemory(IN PRTMP_ADAPTER pAd, } /* Function for TxData DMA Memory allocation. */ -void RTMP_AllocateFirstTxBuffer(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateFirstTxBuffer(struct rt_rtmp_adapter *pAd, u32 Index, unsigned long Length, IN BOOLEAN Cached, @@ -149,7 +149,7 @@ void RTMP_AllocateFirstTxBuffer(IN PRTMP_ADAPTER pAd, PhysicalAddress); } -void RTMP_FreeFirstTxBuffer(IN PRTMP_ADAPTER pAd, +void RTMP_FreeFirstTxBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void *VirtualAddress, @@ -170,7 +170,7 @@ void RTMP_FreeFirstTxBuffer(IN PRTMP_ADAPTER pAd, * VirtualAddress: Pointer to memory is returned here * PhysicalAddress: Physical address corresponding to virtual address */ -void RTMP_AllocateSharedMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateSharedMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, @@ -194,7 +194,7 @@ void RTMP_AllocateSharedMemory(IN PRTMP_ADAPTER pAd, * Notes: * Cached is ignored: always cached memory */ -void *RTMP_AllocateRxPacketBuffer(IN PRTMP_ADAPTER pAd, +void *RTMP_AllocateRxPacketBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, @@ -224,7 +224,7 @@ void *RTMP_AllocateRxPacketBuffer(IN PRTMP_ADAPTER pAd, return (void *)pkt; } -void Invalid_Remaining_Packet(IN PRTMP_ADAPTER pAd, unsigned long VirtualAddress) +void Invalid_Remaining_Packet(struct rt_rtmp_adapter *pAd, unsigned long VirtualAddress) { dma_addr_t PhysicalAddress; @@ -233,7 +233,7 @@ void Invalid_Remaining_Packet(IN PRTMP_ADAPTER pAd, unsigned long VirtualAddress RX_BUFFER_NORMSIZE - 1600, -1, PCI_DMA_FROMDEVICE); } -int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd) +int RtmpNetTaskInit(struct rt_rtmp_adapter *pAd) { struct os_cookie *pObj; @@ -257,7 +257,7 @@ int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd) return NDIS_STATUS_SUCCESS; } -void RtmpNetTaskExit(IN RTMP_ADAPTER * pAd) +void RtmpNetTaskExit(struct rt_rtmp_adapter *pAd) { struct os_cookie *pObj; @@ -273,7 +273,7 @@ void RtmpNetTaskExit(IN RTMP_ADAPTER * pAd) tasklet_kill(&pObj->fifo_statistic_full_task); } -int RtmpMgmtTaskInit(IN RTMP_ADAPTER * pAd) +int RtmpMgmtTaskInit(struct rt_rtmp_adapter *pAd) { return NDIS_STATUS_SUCCESS; @@ -293,13 +293,13 @@ Return Value: Note: ======================================================================== */ -void RtmpMgmtTaskExit(IN RTMP_ADAPTER * pAd) +void RtmpMgmtTaskExit(struct rt_rtmp_adapter *pAd) { return; } -static inline void rt2860_int_enable(PRTMP_ADAPTER pAd, unsigned int mode) +static inline void rt2860_int_enable(struct rt_rtmp_adapter *pAd, unsigned int mode) { u32 regValue; @@ -316,7 +316,7 @@ static inline void rt2860_int_enable(PRTMP_ADAPTER pAd, unsigned int mode) RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_ACTIVE); } -static inline void rt2860_int_disable(PRTMP_ADAPTER pAd, unsigned int mode) +static inline void rt2860_int_disable(struct rt_rtmp_adapter *pAd, unsigned int mode) { u32 regValue; @@ -337,7 +337,7 @@ static inline void rt2860_int_disable(PRTMP_ADAPTER pAd, unsigned int mode) static void mgmt_dma_done_tasklet(unsigned long data) { unsigned long flags; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) data; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)data; INT_SOURCE_CSR_STRUC IntSource; struct os_cookie *pObj; @@ -376,7 +376,7 @@ static void mgmt_dma_done_tasklet(unsigned long data) static void rx_done_tasklet(unsigned long data) { unsigned long flags; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) data; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)data; BOOLEAN bReschedule = 0; struct os_cookie *pObj; @@ -410,7 +410,7 @@ static void rx_done_tasklet(unsigned long data) void fifo_statistic_full_tasklet(unsigned long data) { unsigned long flags; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) data; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)data; struct os_cookie *pObj; /* Do nothing if the driver is starting halt state. */ @@ -444,7 +444,7 @@ void fifo_statistic_full_tasklet(unsigned long data) static void ac3_dma_done_tasklet(unsigned long data) { unsigned long flags; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) data; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)data; INT_SOURCE_CSR_STRUC IntSource; struct os_cookie *pObj; BOOLEAN bReschedule = 0; @@ -482,7 +482,7 @@ static void ac3_dma_done_tasklet(unsigned long data) static void ac2_dma_done_tasklet(unsigned long data) { unsigned long flags; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) data; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)data; INT_SOURCE_CSR_STRUC IntSource; struct os_cookie *pObj; BOOLEAN bReschedule = 0; @@ -520,7 +520,7 @@ static void ac2_dma_done_tasklet(unsigned long data) static void ac1_dma_done_tasklet(unsigned long data) { unsigned long flags; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) data; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)data; INT_SOURCE_CSR_STRUC IntSource; struct os_cookie *pObj; BOOLEAN bReschedule = 0; @@ -558,7 +558,7 @@ static void ac1_dma_done_tasklet(unsigned long data) static void ac0_dma_done_tasklet(unsigned long data) { unsigned long flags; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) data; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)data; INT_SOURCE_CSR_STRUC IntSource; struct os_cookie *pObj; BOOLEAN bReschedule = 0; @@ -604,7 +604,7 @@ int print_int_count; IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance) { struct net_device *net_dev = (struct net_device *)dev_instance; - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; INT_SOURCE_CSR_STRUC IntSource; struct os_cookie *pObj; @@ -793,7 +793,7 @@ IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance) dma_addr_t linux_pci_map_single(void *handle, void *ptr, size_t size, int sd_idx, int direction) { - PRTMP_ADAPTER pAd; + struct rt_rtmp_adapter *pAd; struct os_cookie *pObj; /* @@ -812,12 +812,12 @@ dma_addr_t linux_pci_map_single(void *handle, void *ptr, size_t size, sd_idx = -1 */ - pAd = (PRTMP_ADAPTER) handle; + pAd = (struct rt_rtmp_adapter *)handle; pObj = (struct os_cookie *)pAd->OS_Cookie; if (sd_idx == 1) { - PTX_BLK pTxBlk; - pTxBlk = (PTX_BLK) ptr; + struct rt_tx_blk *pTxBlk; + pTxBlk = (struct rt_tx_blk *)ptr; return pci_map_single(pObj->pci_dev, pTxBlk->pSrcBufData, pTxBlk->SrcBufLen, direction); } else { @@ -829,10 +829,10 @@ dma_addr_t linux_pci_map_single(void *handle, void *ptr, size_t size, void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, int direction) { - PRTMP_ADAPTER pAd; + struct rt_rtmp_adapter *pAd; struct os_cookie *pObj; - pAd = (PRTMP_ADAPTER) handle; + pAd = (struct rt_rtmp_adapter *)handle; pObj = (struct os_cookie *)pAd->OS_Cookie; pci_unmap_single(pObj->pci_dev, dma_addr, size, direction); diff --git a/drivers/staging/rt2860/rt_usb.c b/drivers/staging/rt2860/rt_usb.c index 68f6f48f7251..01a7eb4e8ba8 100644 --- a/drivers/staging/rt2860/rt_usb.c +++ b/drivers/staging/rt2860/rt_usb.c @@ -77,9 +77,9 @@ Return Value: Note: ======================================================================== */ -int RtmpMgmtTaskInit(IN RTMP_ADAPTER * pAd) +int RtmpMgmtTaskInit(struct rt_rtmp_adapter *pAd) { - RTMP_OS_TASK *pTask; + struct rt_rtmp_os_task *pTask; int status; /* @@ -133,10 +133,10 @@ Return Value: Note: ======================================================================== */ -void RtmpMgmtTaskExit(IN RTMP_ADAPTER * pAd) +void RtmpMgmtTaskExit(struct rt_rtmp_adapter *pAd) { int ret; - RTMP_OS_TASK *pTask; + struct rt_rtmp_os_task *pTask; /* Sleep 50 milliseconds so pending io might finish normally */ RTMPusecDelay(50000); @@ -197,16 +197,16 @@ void RtmpMgmtTaskExit(IN RTMP_ADAPTER * pAd) static void rtusb_dataout_complete(unsigned long data) { - PRTMP_ADAPTER pAd; + struct rt_rtmp_adapter *pAd; struct urb *pUrb; struct os_cookie *pObj; - PHT_TX_CONTEXT pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u8 BulkOutPipeId; int Status; unsigned long IrqFlags; pUrb = (struct urb *)data; - pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; + pHTTXContext = (struct rt_ht_tx_context *)pUrb->context; pAd = pHTTXContext->pAd; pObj = (struct os_cookie *)pAd->OS_Cookie; Status = pUrb->status; @@ -294,14 +294,14 @@ static void rtusb_dataout_complete(unsigned long data) static void rtusb_null_frame_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PTX_CONTEXT pNullContext; + struct rt_rtmp_adapter *pAd; + struct rt_tx_context *pNullContext; struct urb *pUrb; int Status; unsigned long irqFlag; pUrb = (struct urb *)data; - pNullContext = (PTX_CONTEXT) pUrb->context; + pNullContext = (struct rt_tx_context *)pUrb->context; pAd = pNullContext->pAd; Status = pUrb->status; @@ -343,14 +343,14 @@ static void rtusb_null_frame_done_tasklet(unsigned long data) static void rtusb_rts_frame_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PTX_CONTEXT pRTSContext; + struct rt_rtmp_adapter *pAd; + struct rt_tx_context *pRTSContext; struct urb *pUrb; int Status; unsigned long irqFlag; pUrb = (struct urb *)data; - pRTSContext = (PTX_CONTEXT) pUrb->context; + pRTSContext = (struct rt_tx_context *)pUrb->context; pAd = pRTSContext->pAd; Status = pUrb->status; @@ -393,13 +393,13 @@ static void rtusb_rts_frame_done_tasklet(unsigned long data) static void rtusb_pspoll_frame_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PTX_CONTEXT pPsPollContext; + struct rt_rtmp_adapter *pAd; + struct rt_tx_context *pPsPollContext; struct urb *pUrb; int Status; pUrb = (struct urb *)data; - pPsPollContext = (PTX_CONTEXT) pUrb->context; + pPsPollContext = (struct rt_tx_context *)pUrb->context; pAd = pPsPollContext->pAd; Status = pUrb->status; @@ -453,13 +453,13 @@ Note: static void rx_done_tasklet(unsigned long data) { struct urb *pUrb; - PRX_CONTEXT pRxContext; - PRTMP_ADAPTER pAd; + struct rt_rx_context *pRxContext; + struct rt_rtmp_adapter *pAd; int Status; unsigned int IrqFlags; pUrb = (struct urb *)data; - pRxContext = (PRX_CONTEXT) pUrb->context; + pRxContext = (struct rt_rx_context *)pUrb->context; pAd = pRxContext->pAd; Status = pUrb->status; @@ -514,8 +514,8 @@ static void rx_done_tasklet(unsigned long data) static void rtusb_mgmt_dma_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PTX_CONTEXT pMLMEContext; + struct rt_rtmp_adapter *pAd; + struct rt_tx_context *pMLMEContext; int index; void *pPacket; struct urb *pUrb; @@ -523,7 +523,7 @@ static void rtusb_mgmt_dma_done_tasklet(unsigned long data) unsigned long IrqFlags; pUrb = (struct urb *)data; - pMLMEContext = (PTX_CONTEXT) pUrb->context; + pMLMEContext = (struct rt_tx_context *)pUrb->context; pAd = pMLMEContext->pAd; Status = pUrb->status; index = pMLMEContext->SelfIdx; @@ -595,13 +595,13 @@ static void rtusb_mgmt_dma_done_tasklet(unsigned long data) static void rtusb_ac3_dma_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PHT_TX_CONTEXT pHTTXContext; + struct rt_rtmp_adapter *pAd; + struct rt_ht_tx_context *pHTTXContext; u8 BulkOutPipeId = 3; struct urb *pUrb; pUrb = (struct urb *)data; - pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; + pHTTXContext = (struct rt_ht_tx_context *)pUrb->context; pAd = pHTTXContext->pAd; rtusb_dataout_complete((unsigned long)pUrb); @@ -635,13 +635,13 @@ static void rtusb_ac3_dma_done_tasklet(unsigned long data) static void rtusb_ac2_dma_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PHT_TX_CONTEXT pHTTXContext; + struct rt_rtmp_adapter *pAd; + struct rt_ht_tx_context *pHTTXContext; u8 BulkOutPipeId = 2; struct urb *pUrb; pUrb = (struct urb *)data; - pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; + pHTTXContext = (struct rt_ht_tx_context *)pUrb->context; pAd = pHTTXContext->pAd; rtusb_dataout_complete((unsigned long)pUrb); @@ -675,13 +675,13 @@ static void rtusb_ac2_dma_done_tasklet(unsigned long data) static void rtusb_ac1_dma_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PHT_TX_CONTEXT pHTTXContext; + struct rt_rtmp_adapter *pAd; + struct rt_ht_tx_context *pHTTXContext; u8 BulkOutPipeId = 1; struct urb *pUrb; pUrb = (struct urb *)data; - pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; + pHTTXContext = (struct rt_ht_tx_context *)pUrb->context; pAd = pHTTXContext->pAd; rtusb_dataout_complete((unsigned long)pUrb); @@ -715,13 +715,13 @@ static void rtusb_ac1_dma_done_tasklet(unsigned long data) static void rtusb_ac0_dma_done_tasklet(unsigned long data) { - PRTMP_ADAPTER pAd; - PHT_TX_CONTEXT pHTTXContext; + struct rt_rtmp_adapter *pAd; + struct rt_ht_tx_context *pHTTXContext; u8 BulkOutPipeId = 0; struct urb *pUrb; pUrb = (struct urb *)data; - pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; + pHTTXContext = (struct rt_ht_tx_context *)pUrb->context; pAd = pHTTXContext->pAd; rtusb_dataout_complete((unsigned long)pUrb); @@ -753,7 +753,7 @@ static void rtusb_ac0_dma_done_tasklet(unsigned long data) } -int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd) +int RtmpNetTaskInit(struct rt_rtmp_adapter *pAd) { struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie; @@ -780,7 +780,7 @@ int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd) return NDIS_STATUS_SUCCESS; } -void RtmpNetTaskExit(IN RTMP_ADAPTER * pAd) +void RtmpNetTaskExit(struct rt_rtmp_adapter *pAd) { struct os_cookie *pObj; diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index 8182b2aa4563..c50abf4b8068 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h @@ -44,10 +44,7 @@ #include "rtmp_dot11.h" #include "rtmp_chip.h" -typedef struct _RTMP_ADAPTER RTMP_ADAPTER; -typedef struct _RTMP_ADAPTER *PRTMP_ADAPTER; - -typedef struct _RTMP_CHIP_OP_ RTMP_CHIP_OP; +struct rt_rtmp_adapter; /*#define DBG 1 */ @@ -146,7 +143,7 @@ extern u8 RateSwitchTable11N2SForABand[]; extern u8 PRE_N_HT_OUI[]; -typedef struct _RSSI_SAMPLE { +struct rt_rssi_sample { char LastRssi0; /* last received RSSI */ char LastRssi1; /* last received RSSI */ char LastRssi2; /* last received RSSI */ @@ -156,21 +153,23 @@ typedef struct _RSSI_SAMPLE { short AvgRssi0X8; short AvgRssi1X8; short AvgRssi2X8; -} RSSI_SAMPLE; +}; /* */ /* Queue structure and macros */ /* */ -typedef struct _QUEUE_ENTRY { - struct _QUEUE_ENTRY *Next; -} QUEUE_ENTRY, *PQUEUE_ENTRY; +struct rt_queue_entry; + +struct rt_queue_entry { + struct rt_queue_entry *Next; +}; /* Queue structure */ -typedef struct _QUEUE_HEADER { - PQUEUE_ENTRY Head; - PQUEUE_ENTRY Tail; +struct rt_queue_header { + struct rt_queue_entry *Head; + struct rt_queue_entry *Tail; unsigned long Number; -} QUEUE_HEADER, *PQUEUE_HEADER; +}; #define InitializeQueueHeader(QueueHeader) \ { \ @@ -181,7 +180,7 @@ typedef struct _QUEUE_HEADER { #define RemoveHeadQueue(QueueHeader) \ (QueueHeader)->Head; \ { \ - PQUEUE_ENTRY pNext; \ + struct rt_queue_entry *pNext; \ if ((QueueHeader)->Head != NULL) \ { \ pNext = (QueueHeader)->Head->Next; \ @@ -195,32 +194,32 @@ typedef struct _QUEUE_HEADER { #define InsertHeadQueue(QueueHeader, QueueEntry) \ { \ - ((PQUEUE_ENTRY)QueueEntry)->Next = (QueueHeader)->Head; \ - (QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry); \ + ((struct rt_queue_entry *)QueueEntry)->Next = (QueueHeader)->Head; \ + (QueueHeader)->Head = (struct rt_queue_entry *)(QueueEntry); \ if ((QueueHeader)->Tail == NULL) \ - (QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry); \ + (QueueHeader)->Tail = (struct rt_queue_entry *)(QueueEntry); \ (QueueHeader)->Number++; \ } #define InsertTailQueue(QueueHeader, QueueEntry) \ { \ - ((PQUEUE_ENTRY)QueueEntry)->Next = NULL; \ + ((struct rt_queue_entry *)QueueEntry)->Next = NULL; \ if ((QueueHeader)->Tail) \ - (QueueHeader)->Tail->Next = (PQUEUE_ENTRY)(QueueEntry); \ + (QueueHeader)->Tail->Next = (struct rt_queue_entry *)(QueueEntry); \ else \ - (QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry); \ - (QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry); \ + (QueueHeader)->Head = (struct rt_queue_entry *)(QueueEntry); \ + (QueueHeader)->Tail = (struct rt_queue_entry *)(QueueEntry); \ (QueueHeader)->Number++; \ } #define InsertTailQueueAc(pAd, pEntry, QueueHeader, QueueEntry) \ { \ - ((PQUEUE_ENTRY)QueueEntry)->Next = NULL; \ + ((struct rt_queue_entry *)QueueEntry)->Next = NULL; \ if ((QueueHeader)->Tail) \ - (QueueHeader)->Tail->Next = (PQUEUE_ENTRY)(QueueEntry); \ + (QueueHeader)->Tail->Next = (struct rt_queue_entry *)(QueueEntry); \ else \ - (QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry); \ - (QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry); \ + (QueueHeader)->Head = (struct rt_queue_entry *)(QueueEntry); \ + (QueueHeader)->Tail = (struct rt_queue_entry *)(QueueEntry); \ (QueueHeader)->Number++; \ } @@ -294,12 +293,12 @@ typedef struct _QUEUE_HEADER { /* MACRO for 32-bit PCI register read / write */ /* */ /* Usage : RTMP_IO_READ32( */ -/* PRTMP_ADAPTER pAd, */ +/* struct rt_rtmp_adapter *pAd, */ /* unsigned long Register_Offset, */ /* unsigned long * pValue) */ /* */ /* RTMP_IO_WRITE32( */ -/* PRTMP_ADAPTER pAd, */ +/* struct rt_rtmp_adapter *pAd, */ /* unsigned long Register_Offset, */ /* unsigned long Value) */ /* */ @@ -307,21 +306,21 @@ typedef struct _QUEUE_HEADER { /* */ /* Common fragment list structure - Identical to the scatter gather frag list structure */ /* */ -/*#define RTMP_SCATTER_GATHER_ELEMENT SCATTER_GATHER_ELEMENT */ -/*#define PRTMP_SCATTER_GATHER_ELEMENT PSCATTER_GATHER_ELEMENT */ +/*#define struct rt_rtmp_sg_element SCATTER_GATHER_ELEMENT */ +/*#define struct rt_rtmp_sg_element *PSCATTER_GATHER_ELEMENT */ #define NIC_MAX_PHYS_BUF_COUNT 8 -typedef struct _RTMP_SCATTER_GATHER_ELEMENT { +struct rt_rtmp_sg_element { void *Address; unsigned long Length; unsigned long *Reserved; -} RTMP_SCATTER_GATHER_ELEMENT, *PRTMP_SCATTER_GATHER_ELEMENT; +}; -typedef struct _RTMP_SCATTER_GATHER_LIST { +struct rt_rtmp_sg_list { unsigned long NumberOfElements; unsigned long *Reserved; - RTMP_SCATTER_GATHER_ELEMENT Elements[NIC_MAX_PHYS_BUF_COUNT]; -} RTMP_SCATTER_GATHER_LIST, *PRTMP_SCATTER_GATHER_LIST; + struct rt_rtmp_sg_element Elements[NIC_MAX_PHYS_BUF_COUNT]; +}; /* */ /* Some utility macros */ @@ -476,11 +475,11 @@ typedef struct _RTMP_SCATTER_GATHER_LIST { /* Data buffer for DMA operation, the buffer must be contiguous physical memory */ /* Both DMA to / from CPU use the same structure. */ /* */ -typedef struct _RTMP_DMABUF { +struct rt_rtmp_dmabuf { unsigned long AllocSize; void *AllocVa; /* TxBuf virtual address */ dma_addr_t AllocPa; /* TxBuf physical address */ -} RTMP_DMABUF, *PRTMP_DMABUF; +}; /* */ /* Control block (Descriptor) for all ring descriptor DMA operation, buffer must be */ @@ -490,41 +489,41 @@ typedef struct _RTMP_DMABUF { /* to describe the packet buffer. For Tx, char stored the tx packet descriptor */ /* which driver should ACK upper layer when the tx is physically done or failed. */ /* */ -typedef struct _RTMP_DMACB { +struct rt_rtmp_dmacb { unsigned long AllocSize; /* Control block size */ void *AllocVa; /* Control block virtual address */ dma_addr_t AllocPa; /* Control block physical address */ void *pNdisPacket; void *pNextNdisPacket; - RTMP_DMABUF DmaBuf; /* Associated DMA buffer structure */ -} RTMP_DMACB, *PRTMP_DMACB; + struct rt_rtmp_dmabuf DmaBuf; /* Associated DMA buffer structure */ +}; -typedef struct _RTMP_TX_RING { - RTMP_DMACB Cell[TX_RING_SIZE]; +struct rt_rtmp_tx_ring { + struct rt_rtmp_dmacb Cell[TX_RING_SIZE]; u32 TxCpuIdx; u32 TxDmaIdx; u32 TxSwFreeIdx; /* software next free tx index */ -} RTMP_TX_RING, *PRTMP_TX_RING; +}; -typedef struct _RTMP_RX_RING { - RTMP_DMACB Cell[RX_RING_SIZE]; +struct rt_rtmp_rx_ring { + struct rt_rtmp_dmacb Cell[RX_RING_SIZE]; u32 RxCpuIdx; u32 RxDmaIdx; int RxSwReadIdx; /* software next read index */ -} RTMP_RX_RING, *PRTMP_RX_RING; +}; -typedef struct _RTMP_MGMT_RING { - RTMP_DMACB Cell[MGMT_RING_SIZE]; +struct rt_rtmp_mgmt_ring { + struct rt_rtmp_dmacb Cell[MGMT_RING_SIZE]; u32 TxCpuIdx; u32 TxDmaIdx; u32 TxSwFreeIdx; /* software next free tx index */ -} RTMP_MGMT_RING, *PRTMP_MGMT_RING; +}; /* */ /* Statistic counter structure */ /* */ -typedef struct _COUNTER_802_3 { +struct rt_counter_802_3 { /* General Stats */ unsigned long GoodTransmits; unsigned long GoodReceives; @@ -537,9 +536,9 @@ typedef struct _COUNTER_802_3 { unsigned long OneCollision; unsigned long MoreCollisions; -} COUNTER_802_3, *PCOUNTER_802_3; +}; -typedef struct _COUNTER_802_11 { +struct rt_counter_802_11 { unsigned long Length; LARGE_INTEGER LastTransmittedFragmentCount; LARGE_INTEGER TransmittedFragmentCount; @@ -554,9 +553,9 @@ typedef struct _COUNTER_802_11 { LARGE_INTEGER ReceivedFragmentCount; LARGE_INTEGER MulticastReceivedFrameCount; LARGE_INTEGER FCSErrorCount; -} COUNTER_802_11, *PCOUNTER_802_11; +}; -typedef struct _COUNTER_RALINK { +struct rt_counter_ralink { unsigned long TransmittedByteCount; /* both successful and failure, used to calculate TX throughput */ unsigned long ReceivedByteCount; /* both CRC okay and CRC error, used to calculate RX throughput */ unsigned long BeenDisassociatedCount; @@ -619,9 +618,9 @@ typedef struct _COUNTER_RALINK { LARGE_INTEGER TransmittedMPDUsInAMPDUCount; LARGE_INTEGER TransmittedOctetsInAMPDUCount; LARGE_INTEGER MPDUInReceivedAMPDUCount; -} COUNTER_RALINK, *PCOUNTER_RALINK; +}; -typedef struct _COUNTER_DRS { +struct rt_counter_drs { /* to record the each TX rate's quality. 0 is best, the bigger the worse. */ u16 TxQuality[MAX_STEP_OF_TX_RATE_SWITCH]; u8 PER[MAX_STEP_OF_TX_RATE_SWITCH]; @@ -632,12 +631,12 @@ typedef struct _COUNTER_DRS { u8 LastSecTxRateChangeAction; /* 0: no change, 1:rate UP, 2:rate down */ u8 LastTimeTxRateChangeAction; /*Keep last time value of LastSecTxRateChangeAction */ unsigned long LastTxOkCount; -} COUNTER_DRS, *PCOUNTER_DRS; +}; /*************************************************************************** * security key related data structure **************************************************************************/ -typedef struct _CIPHER_KEY { +struct rt_cipher_key { u8 Key[16]; /* right now we implement 4 keys, 128 bits max */ u8 RxMic[8]; /* make alignment */ u8 TxMic[8]; @@ -648,37 +647,37 @@ typedef struct _CIPHER_KEY { u8 BssId[6]; /* Key length for each key, 0: entry is invalid */ u8 Type; /* Indicate Pairwise/Group when reporting MIC error */ -} CIPHER_KEY, *PCIPHER_KEY; +}; /* structure to define WPA Group Key Rekey Interval */ -typedef struct PACKED _RT_802_11_WPA_REKEY { +struct PACKED rt_802_11_wpa_rekey { unsigned long ReKeyMethod; /* mechanism for rekeying: 0:disable, 1: time-based, 2: packet-based */ unsigned long ReKeyInterval; /* time-based: seconds, packet-based: kilo-packets */ -} RT_WPA_REKEY, *PRT_WPA_REKEY, RT_802_11_WPA_REKEY, *PRT_802_11_WPA_REKEY; +}; #ifdef RTMP_MAC_USB /*************************************************************************** * RTUSB I/O related data structure **************************************************************************/ -typedef struct _RT_SET_ASIC_WCID { +struct rt_set_asic_wcid { unsigned long WCID; /* mechanism for rekeying: 0:disable, 1: time-based, 2: packet-based */ unsigned long SetTid; /* time-based: seconds, packet-based: kilo-packets */ unsigned long DeleteTid; /* time-based: seconds, packet-based: kilo-packets */ u8 Addr[MAC_ADDR_LEN]; /* avoid in interrupt when write key */ -} RT_SET_ASIC_WCID, *PRT_SET_ASIC_WCID; +}; -typedef struct _RT_SET_ASIC_WCID_ATTRI { +struct rt_set_asic_wcid_attri { unsigned long WCID; /* mechanism for rekeying: 0:disable, 1: time-based, 2: packet-based */ unsigned long Cipher; /* ASIC Cipher definition */ u8 Addr[ETH_LENGTH_OF_ADDRESS]; -} RT_SET_ASIC_WCID_ATTRI, *PRT_SET_ASIC_WCID_ATTRI; +}; /* for USB interface, avoid in interrupt when write key */ -typedef struct RT_ADD_PAIRWISE_KEY_ENTRY { +struct rt_add_pairwise_key_entry { u8 MacAddr[6]; u16 MacTabMatchWCID; /* ASIC */ - CIPHER_KEY CipherKey; -} RT_ADD_PAIRWISE_KEY_ENTRY, *PRT_ADD_PAIRWISE_KEY_ENTRY; + struct rt_cipher_key CipherKey; +}; /* Cipher suite type for mixed mode group cipher, P802.11i-2004 */ typedef enum _RT_802_11_CIPHER_SUITE_TYPE { @@ -691,24 +690,24 @@ typedef enum _RT_802_11_CIPHER_SUITE_TYPE { } RT_802_11_CIPHER_SUITE_TYPE, *PRT_802_11_CIPHER_SUITE_TYPE; #endif /* RTMP_MAC_USB // */ -typedef struct { +struct rt_rogueap_entry { u8 Addr[MAC_ADDR_LEN]; u8 ErrorCode[2]; /*00 01-Invalid authentication type */ /*00 02-Authentication timeout */ /*00 03-Challenge from AP failed */ /*00 04-Challenge to AP failed */ BOOLEAN Reported; -} ROGUEAP_ENTRY, *PROGUEAP_ENTRY; +}; -typedef struct { +struct rt_rogueap_table { u8 RogueApNr; - ROGUEAP_ENTRY RogueApEntry[MAX_LEN_OF_BSS_TABLE]; -} ROGUEAP_TABLE, *PROGUEAP_TABLE; + struct rt_rogueap_entry RogueApEntry[MAX_LEN_OF_BSS_TABLE]; +}; /* */ /* Cisco IAPP format */ /* */ -typedef struct _CISCO_IAPP_CONTENT_ { +struct rt_cisco_iapp_content { u16 Length; /*IAPP Length */ u8 MessageType; /*IAPP type */ u8 FunctionCode; /*IAPP function type */ @@ -722,42 +721,42 @@ typedef struct _CISCO_IAPP_CONTENT_ { u16 SsidLen; u8 Ssid[MAX_LEN_OF_SSID]; u16 Seconds; /*Seconds that the client has been disassociated. */ -} CISCO_IAPP_CONTENT, *PCISCO_IAPP_CONTENT; +}; /* * Fragment Frame structure */ -typedef struct _FRAGMENT_FRAME { +struct rt_fragment_frame { void *pFragPacket; unsigned long RxSize; u16 Sequence; u16 LastFrag; unsigned long Flags; /* Some extra frame information. bit 0: LLC presented */ -} FRAGMENT_FRAME, *PFRAGMENT_FRAME; +}; /* */ /* Packet information for NdisQueryPacket */ /* */ -typedef struct _PACKET_INFO { +struct rt_packet_info { u32 PhysicalBufferCount; /* Physical breaks of buffer descripor chained */ u32 BufferCount; /* Number of Buffer descriptor chained */ u32 TotalPacketLength; /* Self explained */ char *pFirstBuffer; /* Pointer to first buffer descriptor */ -} PACKET_INFO, *PPACKET_INFO; +}; /* */ /* Arcfour Structure Added by PaulWu */ /* */ -typedef struct _ARCFOUR { +struct rt_arcfourcontext { u32 X; u32 Y; u8 STATE[256]; -} ARCFOURCONTEXT, *PARCFOURCONTEXT; +}; /* */ /* Tkip Key structure which RC4 key & MIC calculation */ /* */ -typedef struct _TKIP_KEY_INFO { +struct rt_tkip_key_info { u32 nBytesInM; /* # bytes in M for MICKEY */ unsigned long IV16; unsigned long IV32; @@ -768,56 +767,56 @@ typedef struct _TKIP_KEY_INFO { unsigned long M; /* Message accumulator for MICKEY */ u8 RC4KEY[16]; u8 MIC[8]; -} TKIP_KEY_INFO, *PTKIP_KEY_INFO; +}; /* */ /* Private / Misc data, counters for driver internal use */ /* */ -typedef struct __PRIVATE_STRUC { +struct rt_private { u32 SystemResetCnt; /* System reset counter */ u32 TxRingFullCnt; /* Tx ring full occurrance number */ u32 PhyRxErrCnt; /* PHY Rx error count, for debug purpose, might move to global counter */ /* Variables for WEP encryption / decryption in rtmp_wep.c */ u32 FCSCRC32; - ARCFOURCONTEXT WEPCONTEXT; + struct rt_arcfourcontext WEPCONTEXT; /* Tkip stuff */ - TKIP_KEY_INFO Tx; - TKIP_KEY_INFO Rx; -} PRIVATE_STRUC, *PPRIVATE_STRUC; + struct rt_tkip_key_info Tx; + struct rt_tkip_key_info Rx; +}; /*************************************************************************** * Channel and BBP related data structures **************************************************************************/ /* structure to tune BBP R66 (BBP TUNING) */ -typedef struct _BBP_R66_TUNING { +struct rt_bbp_r66_tuning { BOOLEAN bEnable; u16 FalseCcaLowerThreshold; /* default 100 */ u16 FalseCcaUpperThreshold; /* default 512 */ u8 R66Delta; u8 R66CurrentValue; BOOLEAN R66LowerUpperSelect; /*Before LinkUp, Used LowerBound or UpperBound as R66 value. */ -} BBP_R66_TUNING, *PBBP_R66_TUNING; +}; /* structure to store channel TX power */ -typedef struct _CHANNEL_TX_POWER { +struct rt_channel_tx_power { u16 RemainingTimeForUse; /*unit: sec */ u8 Channel; char Power; char Power2; u8 MaxTxPwr; u8 DfsReq; -} CHANNEL_TX_POWER, *PCHANNEL_TX_POWER; +}; /* structure to store 802.11j channel TX power */ -typedef struct _CHANNEL_11J_TX_POWER { +struct rt_channel_11j_tx_power { u8 Channel; u8 BW; /* BW_10 or BW_20 */ char Power; char Power2; u16 RemainingTimeForUse; /*unit: sec */ -} CHANNEL_11J_TX_POWER, *PCHANNEL_11J_TX_POWER; +}; -typedef struct _SOFT_RX_ANT_DIVERSITY_STRUCT { +struct rt_soft_rx_ant_diversity { u8 EvaluatePeriod; /* 0:not evalute status, 1: evaluate status, 2: switching status */ u8 EvaluateStableCnt; u8 Pair1PrimaryRxAnt; /* 0:Ant-E1, 1:Ant-E2 */ @@ -830,13 +829,13 @@ typedef struct _SOFT_RX_ANT_DIVERSITY_STRUCT { short Pair2LastAvgRssi; /* */ unsigned long RcvPktNumWhenEvaluate; BOOLEAN FirstPktArrivedWhenEvaluate; - RALINK_TIMER_STRUCT RxAntDiversityTimer; -} SOFT_RX_ANT_DIVERSITY, *PSOFT_RX_ANT_DIVERSITY; + struct rt_ralink_timer RxAntDiversityTimer; +}; /*************************************************************************** * structure for radar detection and channel switch **************************************************************************/ -typedef struct _RADAR_DETECT_STRUCT { +struct rt_radar_detect { /*BOOLEAN IEEE80211H; // 0: disable, 1: enable IEEE802.11h */ u8 CSCount; /*Channel switch counter */ u8 CSPeriod; /*Channel switch period (beacon count) */ @@ -854,7 +853,7 @@ typedef struct _RADAR_DETECT_STRUCT { BOOLEAN bFastDfs; u8 ChMovingTime; u8 LongPulseRadarTh; -} RADAR_DETECT_STRUCT, *PRADAR_DETECT_STRUCT; +}; typedef enum _ABGBAND_STATE_ { UNKNOWN_BAND, @@ -880,25 +879,25 @@ typedef union _PS_CONTROL { /*************************************************************************** * structure for MLME state machine **************************************************************************/ -typedef struct _MLME_STRUCT { +struct rt_mlme { /* STA state machines */ - STATE_MACHINE CntlMachine; - STATE_MACHINE AssocMachine; - STATE_MACHINE AuthMachine; - STATE_MACHINE AuthRspMachine; - STATE_MACHINE SyncMachine; - STATE_MACHINE WpaPskMachine; - STATE_MACHINE LeapMachine; + struct rt_state_machine CntlMachine; + struct rt_state_machine AssocMachine; + struct rt_state_machine AuthMachine; + struct rt_state_machine AuthRspMachine; + struct rt_state_machine SyncMachine; + struct rt_state_machine WpaPskMachine; + struct rt_state_machine LeapMachine; STATE_MACHINE_FUNC AssocFunc[ASSOC_FUNC_SIZE]; STATE_MACHINE_FUNC AuthFunc[AUTH_FUNC_SIZE]; STATE_MACHINE_FUNC AuthRspFunc[AUTH_RSP_FUNC_SIZE]; STATE_MACHINE_FUNC SyncFunc[SYNC_FUNC_SIZE]; STATE_MACHINE_FUNC ActFunc[ACT_FUNC_SIZE]; /* Action */ - STATE_MACHINE ActMachine; + struct rt_state_machine ActMachine; /* common WPA state machine */ - STATE_MACHINE WpaMachine; + struct rt_state_machine WpaMachine; STATE_MACHINE_FUNC WpaFunc[WPA_FUNC_SIZE]; unsigned long ChannelQuality; /* 0..100, Channel Quality Indication for Roaming */ @@ -907,18 +906,18 @@ typedef struct _MLME_STRUCT { BOOLEAN bRunning; spinlock_t TaskLock; - MLME_QUEUE Queue; + struct rt_mlme_queue Queue; u32 ShiftReg; - RALINK_TIMER_STRUCT PeriodicTimer; - RALINK_TIMER_STRUCT APSDPeriodicTimer; - RALINK_TIMER_STRUCT LinkDownTimer; - RALINK_TIMER_STRUCT LinkUpTimer; + struct rt_ralink_timer PeriodicTimer; + struct rt_ralink_timer APSDPeriodicTimer; + struct rt_ralink_timer LinkDownTimer; + struct rt_ralink_timer LinkUpTimer; #ifdef RTMP_MAC_PCI u8 bPsPollTimerRunning; - RALINK_TIMER_STRUCT PsPollTimer; - RALINK_TIMER_STRUCT RadioOnOffTimer; + struct rt_ralink_timer PsPollTimer; + struct rt_ralink_timer RadioOnOffTimer; #endif /* RTMP_MAC_PCI // */ unsigned long PeriodicRound; unsigned long OneSecPeriodicRound; @@ -926,7 +925,7 @@ typedef struct _MLME_STRUCT { u8 RealRxPath; BOOLEAN bLowThroughput; BOOLEAN bEnableAutoAntennaCheck; - RALINK_TIMER_STRUCT RxAntEvalTimer; + struct rt_ralink_timer RxAntEvalTimer; #ifdef RT30xx u8 CaliBW40RfR24; @@ -934,10 +933,10 @@ typedef struct _MLME_STRUCT { #endif /* RT30xx // */ #ifdef RTMP_MAC_USB - RALINK_TIMER_STRUCT AutoWakeupTimer; + struct rt_ralink_timer AutoWakeupTimer; BOOLEAN AutoWakeupTimerRunning; #endif /* RTMP_MAC_USB // */ -} MLME_STRUCT, *PMLME_STRUCT; +}; /*************************************************************************** * 802.11 N related data structures @@ -974,7 +973,7 @@ typedef enum _ORI_BLOCKACK_STATUS { Originator_Done } ORI_BLOCKACK_STATUS, *PORI_BLOCKACK_STATUS; -typedef struct _BA_ORI_ENTRY { +struct rt_ba_ori_entry { u8 Wcid; u8 TID; u8 BAWinSize; @@ -983,11 +982,11 @@ typedef struct _BA_ORI_ENTRY { u16 Sequence; u16 TimeOutValue; ORI_BLOCKACK_STATUS ORI_BA_Status; - RALINK_TIMER_STRUCT ORIBATimer; + struct rt_ralink_timer ORIBATimer; void *pAdapter; -} BA_ORI_ENTRY, *PBA_ORI_ENTRY; +}; -typedef struct _BA_REC_ENTRY { +struct rt_ba_rec_entry { u8 Wcid; u8 TID; u8 BAWinSize; /* 7.3.1.14. each buffer is capable of holding a max AMSDU or MSDU. */ @@ -996,7 +995,7 @@ typedef struct _BA_REC_ENTRY { u16 LastIndSeq; /* u16 LastIndSeqAtTimer; */ u16 TimeOutValue; - RALINK_TIMER_STRUCT RECBATimer; + struct rt_ralink_timer RECBATimer; unsigned long LastIndSeqAtTimer; unsigned long nDropPacket; unsigned long rcvSeq; @@ -1008,40 +1007,40 @@ typedef struct _BA_REC_ENTRY { /* struct _BA_REC_ENTRY *pNext; */ void *pAdapter; struct reordering_list list; -} BA_REC_ENTRY, *PBA_REC_ENTRY; +}; -typedef struct { +struct rt_ba_table { unsigned long numAsRecipient; /* I am recipient of numAsRecipient clients. These client are in the BARecEntry[] */ unsigned long numAsOriginator; /* I am originator of numAsOriginator clients. These clients are in the BAOriEntry[] */ unsigned long numDoneOriginator; /* count Done Originator sessions */ - BA_ORI_ENTRY BAOriEntry[MAX_LEN_OF_BA_ORI_TABLE]; - BA_REC_ENTRY BARecEntry[MAX_LEN_OF_BA_REC_TABLE]; -} BA_TABLE, *PBA_TABLE; + struct rt_ba_ori_entry BAOriEntry[MAX_LEN_OF_BA_ORI_TABLE]; + struct rt_ba_rec_entry BARecEntry[MAX_LEN_OF_BA_REC_TABLE]; +}; /*For QureyBATableOID use; */ -typedef struct PACKED _OID_BA_REC_ENTRY { +struct PACKED rt_oid_ba_rec_entry { u8 MACAddr[MAC_ADDR_LEN]; u8 BaBitmap; /* if (BaBitmap&(1<MaxHTPhyMode.field.MODE >= MODE_HTMIX) @@ -1079,7 +1078,7 @@ typedef struct { (_pMacEntry->HTPhyMode.field.MODE >= MODE_HTMIX) /*This structure is for all 802.11n card InterOptibilityTest action. Reset all Num every n second. (Details see MLMEPeriodic) */ -typedef struct _IOT_STRUC { +struct rt_iot { u8 Threshold[2]; u8 ReorderTimeOutNum[MAX_LEN_OF_BA_REC_TABLE]; /* compare with threshold[0] */ u8 RefreshNum[MAX_LEN_OF_BA_REC_TABLE]; /* compare with threshold[1] */ @@ -1096,7 +1095,7 @@ typedef struct _IOT_STRUC { BOOLEAN bNowAtherosBurstOn; BOOLEAN bNextDisableRxBA; BOOLEAN bToggle; -} IOT_STRUC, *PIOT_STRUC; +}; /* This is the registry setting for 802.11n transmit setting. Used in advanced page. */ typedef union _REG_TRANSMIT_SETTING { @@ -1131,7 +1130,7 @@ typedef union _DESIRED_TRANSMIT_SETTING { * USB-based chip Beacon related data structures **************************************************************************/ #define BEACON_BITMAP_MASK 0xff -typedef struct _BEACON_SYNC_STRUCT_ { +struct rt_beacon_sync { u8 BeaconBuf[HW_BEACON_MAX_COUNT][HW_BEACON_OFFSET]; u8 BeaconTxWI[HW_BEACON_MAX_COUNT][TXWI_SIZE]; unsigned long TimIELocationInBeacon[HW_BEACON_MAX_COUNT]; @@ -1139,7 +1138,7 @@ typedef struct _BEACON_SYNC_STRUCT_ { BOOLEAN EnableBeacon; /* trigger to enable beacon transmission. */ u8 BeaconBitMap; /* NOTE: If the MAX_MBSSID_NUM is larger than 8, this parameter need to change. */ u8 DtimBitOn; /* NOTE: If the MAX_MBSSID_NUM is larger than 8, this parameter need to change. */ -} BEACON_SYNC_STRUCT; +}; #endif /* RTMP_MAC_USB // */ /*************************************************************************** @@ -1169,7 +1168,7 @@ typedef struct _BEACON_SYNC_STRUCT_ { ad_p->ApCfg.MBSSID[apidx].TimBitmaps[tim_offset] |= BIT8[bit_offset]; } /* configuration common to OPMODE_AP as well as OPMODE_STA */ -typedef struct _COMMON_CONFIG { +struct rt_common_config { BOOLEAN bCountryFlag; u8 CountryCode[3]; @@ -1246,7 +1245,7 @@ typedef struct _COMMON_CONFIG { BACAP_STRUC BACapability; /* NO USE = 0XFF ; IMMED_BA =1 ; DELAY_BA=0 */ BACAP_STRUC REGBACapability; /* NO USE = 0XFF ; IMMED_BA =1 ; DELAY_BA=0 */ - IOT_STRUC IOTestParm; /* 802.11n InterOpbility Test Parameter; */ + struct rt_iot IOTestParm; /* 802.11n InterOpbility Test Parameter; */ unsigned long TxPreamble; /* Rt802_11PreambleLong, Rt802_11PreambleShort, Rt802_11PreambleAuto */ BOOLEAN bUseZeroToDisableFragment; /* Microsoft use 0 as disable */ unsigned long UseBGProtection; /* 0: auto, 1: always use, 2: always not use */ @@ -1260,9 +1259,9 @@ typedef struct _COMMON_CONFIG { BOOLEAN bRdg; BOOLEAN bWmmCapable; /* 0:disable WMM, 1:enable WMM */ - QOS_CAPABILITY_PARM APQosCapability; /* QOS capability of the current associated AP */ - EDCA_PARM APEdcaParm; /* EDCA parameters of the current associated AP */ - QBSS_LOAD_PARM APQbssLoad; /* QBSS load of the current associated AP */ + struct rt_qos_capability_parm APQosCapability; /* QOS capability of the current associated AP */ + struct rt_edca_parm APEdcaParm; /* EDCA parameters of the current associated AP */ + struct rt_qbss_load_parm APQbssLoad; /* QBSS load of the current associated AP */ u8 AckPolicy[4]; /* ACK policy of the specified AC. see ACK_xxx */ BOOLEAN bDLSCapable; /* 0:disable DLS, 1:enable DLS */ /* a bitmap of BOOLEAN flags. each bit represent an operation status of a particular */ @@ -1275,17 +1274,17 @@ typedef struct _COMMON_CONFIG { ABGBAND_STATE BandState; /* For setting BBP used on B/G or A mode. */ /* IEEE802.11H--DFS. */ - RADAR_DETECT_STRUCT RadarDetect; + struct rt_radar_detect RadarDetect; /* HT */ u8 BASize; /* USer desired BAWindowSize. Should not exceed our max capability */ - /*RT_HT_CAPABILITY SupportedHtPhy; */ - RT_HT_CAPABILITY DesiredHtPhy; - HT_CAPABILITY_IE HtCapability; - ADD_HT_INFO_IE AddHTInfo; /* Useful as AP. */ + /*struct rt_ht_capability SupportedHtPhy; */ + struct rt_ht_capability DesiredHtPhy; + struct rt_ht_capability_ie HtCapability; + struct rt_add_ht_info_ie AddHTInfo; /* Useful as AP. */ /*This IE is used with channel switch announcement element when changing to a new 40MHz. */ /*This IE is included in channel switch ammouncement frames 7.4.1.5, beacons, probe Rsp. */ - NEW_EXT_CHAN_IE NewExtChanOffset; /*7.3.2.20A, 1 if extension channel is above the control channel, 3 if below, 0 if not present */ + struct rt_new_ext_chan_ie NewExtChanOffset; /*7.3.2.20A, 1 if extension channel is above the control channel, 3 if below, 0 if not present */ BOOLEAN bHTProtect; BOOLEAN bMIMOPSEnable; @@ -1314,24 +1313,24 @@ typedef struct _COMMON_CONFIG { #ifdef RTMP_MAC_USB BOOLEAN bMultipleIRP; /* Multiple Bulk IN flag */ u8 NumOfBulkInIRP; /* if bMultipleIRP == TRUE, NumOfBulkInIRP will be 4 otherwise be 1 */ - RT_HT_CAPABILITY SupportedHtPhy; + struct rt_ht_capability SupportedHtPhy; unsigned long MaxPktOneTxBulk; u8 TxBulkFactor; u8 RxBulkFactor; BOOLEAN IsUpdateBeacon; - BEACON_SYNC_STRUCT *pBeaconSync; - RALINK_TIMER_STRUCT BeaconUpdateTimer; + struct rt_beacon_sync *pBeaconSync; + struct rt_ralink_timer BeaconUpdateTimer; u32 BeaconAdjust; u32 BeaconFactor; u32 BeaconRemain; #endif /* RTMP_MAC_USB // */ spinlock_t MeasureReqTabLock; - PMEASURE_REQ_TAB pMeasureReqTab; + struct rt_measure_req_tab *pMeasureReqTab; spinlock_t TpcReqTabLock; - PTPC_REQ_TAB pTpcReqTab; + struct rt_tpc_req_tab *pTpcReqTab; BOOLEAN PSPXlink; /* 0: Disable. 1: Enable */ @@ -1341,11 +1340,11 @@ typedef struct _COMMON_CONFIG { #endif BOOLEAN HT_DisallowTKIP; /* Restrict the encryption type in 11n HT mode */ -} COMMON_CONFIG, *PCOMMON_CONFIG; +}; /* Modified by Wu Xi-Kun 4/21/2006 */ /* STA configuration and status */ -typedef struct _STA_ADMIN_CONFIG { +struct rt_sta_admin_config { /* GROUP 1 - */ /* User configuration loaded from Registry, E2PROM or OID_xxx. These settings describe */ /* the user intended configuration, but not necessary fully equal to the final */ @@ -1396,7 +1395,7 @@ typedef struct _STA_ADMIN_CONFIG { u8 PMK[32]; /* WPA PSK mode PMK */ u8 PTK[64]; /* WPA PSK mode PTK */ u8 GTK[32]; /* GTK from authenticator */ - BSSID_INFO SavedPMK[PMKID_NO]; + struct rt_bssid_info SavedPMK[PMKID_NO]; u32 SavedPMKNum; /* Saved PMKID number */ u8 DefaultKeyId; @@ -1416,7 +1415,7 @@ typedef struct _STA_ADMIN_CONFIG { u8 LastSNR0; /* last received BEACON's SNR */ u8 LastSNR1; /* last received BEACON's SNR for 2nd antenna */ - RSSI_SAMPLE RssiSample; + struct rt_rssi_sample RssiSample; unsigned long NumOfAvgRssiSample; unsigned long LastBeaconRxTime; /* OS's timestamp of the last BEACON RX time */ @@ -1434,7 +1433,7 @@ typedef struct _STA_ADMIN_CONFIG { /* New for WPA, windows want us to keep association information and */ /* Fixed IEs from last association response */ - NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo; + struct rt_ndis_802_11_association_information AssocInfo; u16 ReqVarIELen; /* Length of next VIE include EID & Length */ u8 ReqVarIEs[MAX_VIE_LEN]; /* The content saved here should be little-endian format. */ u16 ResVarIELen; /* Length of next VIE include EID & Length */ @@ -1457,7 +1456,7 @@ typedef struct _STA_ADMIN_CONFIG { u8 NHFactor; /* Parameter for Noise histogram */ u8 CLFactor; /* Parameter for channel load */ - RALINK_TIMER_STRUCT StaQuickResponeForRateUpTimer; + struct rt_ralink_timer StaQuickResponeForRateUpTimer; BOOLEAN StaQuickResponeForRateUpTimerRunning; u8 DtimCount; /* 0.. DtimPeriod-1 */ @@ -1468,14 +1467,14 @@ typedef struct _STA_ADMIN_CONFIG { BOOLEAN WhqlTest; /*////////////////////////////////////////////////////////////////////////////////////// */ - RALINK_TIMER_STRUCT WpaDisassocAndBlockAssocTimer; + struct rt_ralink_timer WpaDisassocAndBlockAssocTimer; /* Fast Roaming */ BOOLEAN bAutoRoaming; /* 0:disable auto roaming by RSSI, 1:enable auto roaming by RSSI */ char dBmToRoam; /* the condition to roam when receiving Rssi less than this value. It's negative value. */ BOOLEAN IEEE8021X; BOOLEAN IEEE8021x_required_keys; - CIPHER_KEY DesireSharedKey[4]; /* Record user desired WEP keys */ + struct rt_cipher_key DesireSharedKey[4]; /* Record user desired WEP keys */ u8 DesireSharedKeyId; /* 0: driver ignores wpa_supplicant */ @@ -1493,7 +1492,7 @@ typedef struct _STA_ADMIN_CONFIG { HTTRANSMIT_SETTING HTPhyMode, MaxHTPhyMode, MinHTPhyMode; /* For transmit phy setting in TXWI. */ DESIRED_TRANSMIT_SETTING DesiredTransmitSetting; - RT_HT_PHY_INFO DesiredHtPhyInfo; + struct rt_ht_phy_info DesiredHtPhyInfo; BOOLEAN bAutoTxRateSwitch; #ifdef RTMP_MAC_PCI @@ -1507,7 +1506,7 @@ typedef struct _STA_ADMIN_CONFIG { BOOLEAN bAutoConnectByBssid; unsigned long BeaconLostTime; /* seconds */ BOOLEAN bForceTxBurst; /* 1: force enble TX PACKET BURST, 0: disable */ -} STA_ADMIN_CONFIG, *PSTA_ADMIN_CONFIG; +}; /* This data structure keep the current active BSS/IBSS's configuration that this STA */ /* had agreed upon joining the network. Which means these parameters are usually decided */ @@ -1515,7 +1514,7 @@ typedef struct _STA_ADMIN_CONFIG { /* is valid only when either ADHOC_ON(pAd) or INFRA_ON(pAd) is TRUE. */ /* Normally, after SCAN or failed roaming attempts, we need to recover back to */ /* the current active settings. */ -typedef struct _STA_ACTIVE_CONFIG { +struct rt_sta_active_config { u16 Aid; u16 AtimWin; /* in kusec; IBSS parameter set element */ u16 CapabilityInfo; @@ -1529,11 +1528,13 @@ typedef struct _STA_ACTIVE_CONFIG { u8 SupRateLen; u8 ExtRateLen; /* Copy supported ht from desired AP's beacon. We are trying to match */ - RT_HT_PHY_INFO SupportedPhyInfo; - RT_HT_CAPABILITY SupportedHtPhy; -} STA_ACTIVE_CONFIG, *PSTA_ACTIVE_CONFIG; + struct rt_ht_phy_info SupportedPhyInfo; + struct rt_ht_capability SupportedHtPhy; +}; -typedef struct _MAC_TABLE_ENTRY { +struct rt_mac_table_entry; + +struct rt_mac_table_entry { /*Choose 1 from ValidAsWDS and ValidAsCLI to validize. */ BOOLEAN ValidAsCLI; /* Sta mode, set this TRUE after Linkup,too. */ BOOLEAN ValidAsWDS; /* This is WDS Entry. only for AP mode. */ @@ -1555,8 +1556,8 @@ typedef struct _MAC_TABLE_ENTRY { u8 R_Counter[LEN_KEY_DESC_REPLAY]; u8 PTK[64]; u8 ReTryCounter; - RALINK_TIMER_STRUCT RetryTimer; - RALINK_TIMER_STRUCT EnqueueStartForPSKTimer; /* A timer which enqueue EAPoL-Start for triggering PSK SM */ + struct rt_ralink_timer RetryTimer; + struct rt_ralink_timer EnqueueStartForPSKTimer; /* A timer which enqueue EAPoL-Start for triggering PSK SM */ NDIS_802_11_AUTHENTICATION_MODE AuthMode; /* This should match to whatever microsoft defined */ NDIS_802_11_WEP_STATUS WepStatus; NDIS_802_11_WEP_STATUS GroupKeyWepStatus; @@ -1564,7 +1565,7 @@ typedef struct _MAC_TABLE_ENTRY { GTK_STATE GTKState; u16 PortSecured; NDIS_802_11_PRIVACY_FILTER PrivacyFilter; /* PrivacyFilter enum for 802.1X */ - CIPHER_KEY PairwiseKey; + struct rt_cipher_key PairwiseKey; void *pAd; int PMKID_CacheIdx; u8 PMKID[LEN_PMKID]; @@ -1580,7 +1581,7 @@ typedef struct _MAC_TABLE_ENTRY { unsigned long NoDataIdleCount; u16 StationKeepAliveCount; /* unit: second */ unsigned long PsQIdleCount; - QUEUE_HEADER PsQueue; + struct rt_queue_header PsQueue; u32 StaConnectTime; /* the live time of this station since associated with AP */ @@ -1642,16 +1643,16 @@ typedef struct _MAC_TABLE_ENTRY { u8 AMsduSize; u8 MmpsMode; /* MIMO power save more. */ - HT_CAPABILITY_IE HTCapability; + struct rt_ht_capability_ie HTCapability; BOOLEAN bAutoTxRateSwitch; u8 RateLen; - struct _MAC_TABLE_ENTRY *pNext; + struct rt_mac_table_entry *pNext; u16 TxSeq[NUM_OF_TID]; u16 NonQosDataSeq; - RSSI_SAMPLE RssiSample; + struct rt_rssi_sample RssiSample; u32 TXMCSExpected[16]; u32 TXMCSSuccessful[16]; @@ -1661,13 +1662,13 @@ typedef struct _MAC_TABLE_ENTRY { unsigned long LastBeaconRxTime; unsigned long AssocDeadLine; -} MAC_TABLE_ENTRY, *PMAC_TABLE_ENTRY; +}; -typedef struct _MAC_TABLE { +struct rt_mac_table { u16 Size; - MAC_TABLE_ENTRY *Hash[HASH_TABLE_SIZE]; - MAC_TABLE_ENTRY Content[MAX_LEN_OF_MAC_TABLE]; - QUEUE_HEADER McastPsQueue; + struct rt_mac_table_entry *Hash[HASH_TABLE_SIZE]; + struct rt_mac_table_entry Content[MAX_LEN_OF_MAC_TABLE]; + struct rt_queue_header McastPsQueue; unsigned long PsQIdleCount; BOOLEAN fAnyStationInPsm; BOOLEAN fAnyStationBadAtheros; /* Check if any Station is atheros 802.11n Chip. We need to use RTS/CTS with Atheros 802,.11n chip. */ @@ -1680,46 +1681,46 @@ typedef struct _MAC_TABLE { BOOLEAN fAnyBASession; /* Check if there is BA session. Force turn on RTS/CTS */ /*2008/10/28: KH add to support Antenna power-saving of AP<-- */ /*2008/10/28: KH add to support Antenna power-saving of AP--> */ -} MAC_TABLE, *PMAC_TABLE; +}; struct wificonf { BOOLEAN bShortGI; BOOLEAN bGreenField; }; -typedef struct _RTMP_DEV_INFO_ { +struct rt_rtmp_dev_info { u8 chipName[16]; RTMP_INF_TYPE infType; -} RTMP_DEV_INFO; +}; -struct _RTMP_CHIP_OP_ { +struct rt_rtmp_chip_op { /* Calibration access related callback functions */ - int (*eeinit) (RTMP_ADAPTER * pAd); /* int (*eeinit)(RTMP_ADAPTER *pAd); */ - int (*eeread) (RTMP_ADAPTER * pAd, u16 offset, u16 *pValue); /* int (*eeread)(RTMP_ADAPTER *pAd, int offset, u16 *pValue); */ + int (*eeinit) (struct rt_rtmp_adapter *pAd); /* int (*eeinit)(struct rt_rtmp_adapter *pAd); */ + int (*eeread) (struct rt_rtmp_adapter *pAd, u16 offset, u16 *pValue); /* int (*eeread)(struct rt_rtmp_adapter *pAd, int offset, u16 *pValue); */ /* MCU related callback functions */ - int (*loadFirmware) (RTMP_ADAPTER * pAd); /* int (*loadFirmware)(RTMP_ADAPTER *pAd); */ - int (*eraseFirmware) (RTMP_ADAPTER * pAd); /* int (*eraseFirmware)(RTMP_ADAPTER *pAd); */ - int (*sendCommandToMcu) (RTMP_ADAPTER * pAd, u8 cmd, u8 token, u8 arg0, u8 arg1);; /* int (*sendCommandToMcu)(RTMP_ADAPTER *pAd, u8 cmd, u8 token, u8 arg0, u8 arg1); */ + int (*loadFirmware) (struct rt_rtmp_adapter *pAd); /* int (*loadFirmware)(struct rt_rtmp_adapter *pAd); */ + int (*eraseFirmware) (struct rt_rtmp_adapter *pAd); /* int (*eraseFirmware)(struct rt_rtmp_adapter *pAd); */ + int (*sendCommandToMcu) (struct rt_rtmp_adapter *pAd, u8 cmd, u8 token, u8 arg0, u8 arg1);; /* int (*sendCommandToMcu)(struct rt_rtmp_adapter *pAd, u8 cmd, u8 token, u8 arg0, u8 arg1); */ /* RF access related callback functions */ - REG_PAIR *pRFRegTable; - void (*AsicRfInit) (RTMP_ADAPTER * pAd); - void (*AsicRfTurnOn) (RTMP_ADAPTER * pAd); - void (*AsicRfTurnOff) (RTMP_ADAPTER * pAd); - void (*AsicReverseRfFromSleepMode) (RTMP_ADAPTER * pAd); - void (*AsicHaltAction) (RTMP_ADAPTER * pAd); + struct rt_reg_pair *pRFRegTable; + void (*AsicRfInit) (struct rt_rtmp_adapter *pAd); + void (*AsicRfTurnOn) (struct rt_rtmp_adapter *pAd); + void (*AsicRfTurnOff) (struct rt_rtmp_adapter *pAd); + void (*AsicReverseRfFromSleepMode) (struct rt_rtmp_adapter *pAd); + void (*AsicHaltAction) (struct rt_rtmp_adapter *pAd); }; /* */ /* The miniport adapter structure */ /* */ -struct _RTMP_ADAPTER { +struct rt_rtmp_adapter { void *OS_Cookie; /* save specific structure relative to OS */ struct net_device *net_dev; unsigned long VirtualIfCnt; - RTMP_CHIP_OP chipOps; + struct rt_rtmp_chip_op chipOps; u16 ThisTbttNumToNextWakeUp; #ifdef RTMP_MAC_PCI @@ -1750,10 +1751,10 @@ struct _RTMP_ADAPTER { u32 int_disable_mask; u32 int_pending; - RTMP_DMABUF TxBufSpace[NUM_OF_TX_RING]; /* Shared memory of all 1st pre-allocated TxBuf associated with each TXD */ - RTMP_DMABUF RxDescRing; /* Shared memory for RX descriptors */ - RTMP_DMABUF TxDescRing[NUM_OF_TX_RING]; /* Shared memory for Tx descriptors */ - RTMP_TX_RING TxRing[NUM_OF_TX_RING]; /* AC0~4 + HCCA */ + struct rt_rtmp_dmabuf TxBufSpace[NUM_OF_TX_RING]; /* Shared memory of all 1st pre-allocated TxBuf associated with each TXD */ + struct rt_rtmp_dmabuf RxDescRing; /* Shared memory for RX descriptors */ + struct rt_rtmp_dmabuf TxDescRing[NUM_OF_TX_RING]; /* Shared memory for Tx descriptors */ + struct rt_rtmp_tx_ring TxRing[NUM_OF_TX_RING]; /* AC0~4 + HCCA */ #endif /* RTMP_MAC_PCI // */ spinlock_t irq_lock; @@ -1777,9 +1778,9 @@ struct _RTMP_ADAPTER { BOOLEAN bUsbTxBulkAggre; /* Flags for bulk out data priority */ /*======Cmd Thread */ - CmdQ CmdQ; + struct rt_cmdq CmdQ; spinlock_t CmdQLock; /* CmdQLock spinlock */ - RTMP_OS_TASK cmdQTask; + struct rt_rtmp_os_task cmdQTask; /*======Semaphores (event) */ struct semaphore UsbVendorReq_semaphore; @@ -1794,18 +1795,18 @@ struct _RTMP_ADAPTER { /*****************************************************************************************/ /* Both PCI/USB related parameters */ /*****************************************************************************************/ - /*RTMP_DEV_INFO chipInfo; */ + /*struct rt_rtmp_dev_info chipInfo; */ RTMP_INF_TYPE infType; /*****************************************************************************************/ /* Driver Mgmt related parameters */ /*****************************************************************************************/ - RTMP_OS_TASK mlmeTask; + struct rt_rtmp_os_task mlmeTask; #ifdef RTMP_TIMER_TASK_SUPPORT /* If you want use timer task to handle the timer related jobs, enable this. */ - RTMP_TIMER_TASK_QUEUE TimerQ; + struct rt_rtmp_timer_task_queue TimerQ; spinlock_t TimerQLock; - RTMP_OS_TASK timerTask; + struct rt_rtmp_os_task timerTask; #endif /* RTMP_TIMER_TASK_SUPPORT // */ /*****************************************************************************************/ @@ -1819,7 +1820,7 @@ struct _RTMP_ADAPTER { spinlock_t BulkOutLock[6]; /* BulkOut spinlock for 4 ACs */ spinlock_t MLMEBulkOutLock; /* MLME BulkOut lock */ - HT_TX_CONTEXT TxContext[NUM_OF_TX_RING]; + struct rt_ht_tx_context TxContext[NUM_OF_TX_RING]; spinlock_t TxContextQueueLock[NUM_OF_TX_RING]; /* TxContextQueue spinlock */ /* 4 sets of Bulk Out index and pending flag */ @@ -1832,11 +1833,11 @@ struct _RTMP_ADAPTER { #endif /* RTMP_MAC_USB // */ /* resource for software backlog queues */ - QUEUE_HEADER TxSwQueue[NUM_OF_TX_RING]; /* 4 AC + 1 HCCA */ + struct rt_queue_header TxSwQueue[NUM_OF_TX_RING]; /* 4 AC + 1 HCCA */ spinlock_t TxSwQueueLock[NUM_OF_TX_RING]; /* TxSwQueue spinlock */ - RTMP_DMABUF MgmtDescRing; /* Shared memory for MGMT descriptors */ - RTMP_MGMT_RING MgmtRing; + struct rt_rtmp_dmabuf MgmtDescRing; /* Shared memory for MGMT descriptors */ + struct rt_rtmp_mgmt_ring MgmtRing; spinlock_t MgmtRingLock; /* Prio Ring spinlock */ /*****************************************************************************************/ @@ -1844,14 +1845,14 @@ struct _RTMP_ADAPTER { /*****************************************************************************************/ #ifdef RTMP_MAC_PCI - RTMP_RX_RING RxRing; + struct rt_rtmp_rx_ring RxRing; spinlock_t RxRingLock; /* Rx Ring spinlock */ #ifdef RT3090 spinlock_t McuCmdLock; /*MCU Command Queue spinlock */ #endif /* RT3090 // */ #endif /* RTMP_MAC_PCI // */ #ifdef RTMP_MAC_USB - RX_CONTEXT RxContext[RX_RING_SIZE]; /* 1 for redundant multiple IRP bulk in. */ + struct rt_rx_context RxContext[RX_RING_SIZE]; /* 1 for redundant multiple IRP bulk in. */ spinlock_t BulkInLock; /* BulkIn spinlock for 4 ACs */ u8 PendingRx; /* The Maximum pending Rx value should be RX_RING_SIZE. */ u8 NextRxBulkInIndex; /* Indicate the current RxContext Index which hold by Host controller. */ @@ -1881,27 +1882,27 @@ struct _RTMP_ADAPTER { /* --------------------------- */ u8 BbpWriteLatch[140]; /* record last BBP register value written via BBP_IO_WRITE/BBP_IO_WRITE_VY_REG_ID */ char BbpRssiToDbmDelta; /* change from u8 to char for high power */ - BBP_R66_TUNING BbpTuning; + struct rt_bbp_r66_tuning BbpTuning; /* ---------------------------- */ /* RFIC control */ /* ---------------------------- */ u8 RfIcType; /* RFIC_xxx */ unsigned long RfFreqOffset; /* Frequency offset for channel switching */ - RTMP_RF_REGS LatchRfRegs; /* latch th latest RF programming value since RF IC doesn't support READ */ + struct rt_rtmp_rf_regs LatchRfRegs; /* latch th latest RF programming value since RF IC doesn't support READ */ EEPROM_ANTENNA_STRUC Antenna; /* Since ANtenna definition is different for a & g. We need to save it for future reference. */ EEPROM_NIC_CONFIG2_STRUC NicConfig2; /* This soft Rx Antenna Diversity mechanism is used only when user set */ /* RX Antenna = DIVERSITY ON */ - SOFT_RX_ANT_DIVERSITY RxAnt; + struct rt_soft_rx_ant_diversity RxAnt; u8 RFProgSeq; - CHANNEL_TX_POWER TxPower[MAX_NUM_OF_CHANNELS]; /* Store Tx power value for all channels. */ - CHANNEL_TX_POWER ChannelList[MAX_NUM_OF_CHANNELS]; /* list all supported channels for site survey */ - CHANNEL_11J_TX_POWER TxPower11J[MAX_NUM_OF_11JCHANNELS]; /* 802.11j channel and bw */ - CHANNEL_11J_TX_POWER ChannelList11J[MAX_NUM_OF_11JCHANNELS]; /* list all supported channels for site survey */ + struct rt_channel_tx_power TxPower[MAX_NUM_OF_CHANNELS]; /* Store Tx power value for all channels. */ + struct rt_channel_tx_power ChannelList[MAX_NUM_OF_CHANNELS]; /* list all supported channels for site survey */ + struct rt_channel_11j_tx_power TxPower11J[MAX_NUM_OF_11JCHANNELS]; /* 802.11j channel and bw */ + struct rt_channel_11j_tx_power ChannelList11J[MAX_NUM_OF_11JCHANNELS]; /* list all supported channels for site survey */ u8 ChannelListNum; /* number of channel in ChannelList[] */ u8 Bbp94; @@ -1961,19 +1962,19 @@ struct _RTMP_ADAPTER { /* 802.11 related parameters */ /*****************************************************************************************/ /* outgoing BEACON frame buffer and corresponding TXD */ - TXWI_STRUC BeaconTxWI; + struct rt_txwi BeaconTxWI; u8 *BeaconBuf; u16 BeaconOffset[HW_BEACON_MAX_COUNT]; /* pre-build PS-POLL and NULL frame upon link up. for efficiency purpose. */ - PSPOLL_FRAME PsPollFrame; - HEADER_802_11 NullFrame; + struct rt_pspoll_frame PsPollFrame; + struct rt_header_802_11 NullFrame; #ifdef RTMP_MAC_USB - TX_CONTEXT BeaconContext[BEACON_RING_SIZE]; - TX_CONTEXT NullContext; - TX_CONTEXT PsPollContext; - TX_CONTEXT RTSContext; + struct rt_tx_context BeaconContext[BEACON_RING_SIZE]; + struct rt_tx_context NullContext; + struct rt_tx_context PsPollContext; + struct rt_tx_context RTSContext; #endif /* RTMP_MAC_USB // */ /*=========AP=========== */ @@ -1983,8 +1984,8 @@ struct _RTMP_ADAPTER { /* STA specific configuration & operation status */ /* used only when pAd->OpMode == OPMODE_STA */ /* ----------------------------------------------- */ - STA_ADMIN_CONFIG StaCfg; /* user desired settings */ - STA_ACTIVE_CONFIG StaActive; /* valid only when ADHOC_ON(pAd) || INFRA_ON(pAd) */ + struct rt_sta_admin_config StaCfg; /* user desired settings */ + struct rt_sta_active_config StaActive; /* valid only when ADHOC_ON(pAd) || INFRA_ON(pAd) */ char nickname[IW_ESSID_MAX_SIZE + 1]; /* nickname, only used in the iwconfig i/f */ int PreMediaState; @@ -2004,34 +2005,34 @@ struct _RTMP_ADAPTER { /* ------------------------------------------------------ */ /* common configuration to both OPMODE_STA and OPMODE_AP */ /* ------------------------------------------------------ */ - COMMON_CONFIG CommonCfg; - MLME_STRUCT Mlme; + struct rt_common_config CommonCfg; + struct rt_mlme Mlme; /* AP needs those vaiables for site survey feature. */ - MLME_AUX MlmeAux; /* temporary settings used during MLME state machine */ - BSS_TABLE ScanTab; /* store the latest SCAN result */ + struct rt_mlme_aux MlmeAux; /* temporary settings used during MLME state machine */ + struct rt_bss_table ScanTab; /* store the latest SCAN result */ /*About MacTab, the sta driver will use #0 and #1 for multicast and AP. */ - MAC_TABLE MacTab; /* ASIC on-chip WCID entry table. At TX, ASIC always use key according to this on-chip table. */ + struct rt_mac_table MacTab; /* ASIC on-chip WCID entry table. At TX, ASIC always use key according to this on-chip table. */ spinlock_t MacTabLock; - BA_TABLE BATable; + struct rt_ba_table BATable; spinlock_t BATabLock; - RALINK_TIMER_STRUCT RECBATimer; + struct rt_ralink_timer RECBATimer; /* encryption/decryption KEY tables */ - CIPHER_KEY SharedKey[MAX_MBSSID_NUM][4]; /* STA always use SharedKey[BSS0][0..3] */ + struct rt_cipher_key SharedKey[MAX_MBSSID_NUM][4]; /* STA always use SharedKey[BSS0][0..3] */ /* RX re-assembly buffer for fragmentation */ - FRAGMENT_FRAME FragFrame; /* Frame storage for fragment frame */ + struct rt_fragment_frame FragFrame; /* Frame storage for fragment frame */ /* various Counters */ - COUNTER_802_3 Counters8023; /* 802.3 counters */ - COUNTER_802_11 WlanCounters; /* 802.11 MIB counters */ - COUNTER_RALINK RalinkCounters; /* Ralink propriety counters */ - COUNTER_DRS DrsCounters; /* counters for Dynamic TX Rate Switching */ - PRIVATE_STRUC PrivateInfo; /* Private information & counters */ + struct rt_counter_802_3 Counters8023; /* 802.3 counters */ + struct rt_counter_802_11 WlanCounters; /* 802.11 MIB counters */ + struct rt_counter_ralink RalinkCounters; /* Ralink propriety counters */ + struct rt_counter_drs DrsCounters; /* counters for Dynamic TX Rate Switching */ + struct rt_private PrivateInfo; /* Private information & counters */ /* flags, see fRTMP_ADAPTER_xxx flags */ unsigned long Flags; /* Represent current device status */ @@ -2060,7 +2061,7 @@ struct _RTMP_ADAPTER { /* --------------------------- */ /* System event log */ /* --------------------------- */ - RT_802_11_EVENT_TABLE EventTab; + struct rt_802_11_event_table EventTab; BOOLEAN HTCEnable; @@ -2165,17 +2166,16 @@ struct _RTMP_ADAPTER { /*************************************************************************** * Rx Path software control block related data structures **************************************************************************/ -typedef struct _RX_BLK_ { -/* RXD_STRUC RxD; // sample */ +struct rt_rx_blk { RT28XX_RXD_STRUC RxD; - PRXWI_STRUC pRxWI; - PHEADER_802_11 pHeader; + struct rt_rxwi * pRxWI; + struct rt_header_802_11 * pHeader; void *pRxPacket; u8 *pData; u16 DataSize; u16 Flags; u8 UserPriority; /* for calculate TKIP MIC using */ -} RX_BLK; +}; #define RX_BLK_SET_FLAG(_pRxBlk, _flag) (_pRxBlk->Flags |= _flag) #define RX_BLK_TEST_FLAG(_pRxBlk, _flag) (_pRxBlk->Flags & _flag) @@ -2210,16 +2210,16 @@ typedef struct _RX_BLK_ { #define TX_RALINK_FRAME 0x10 #define TX_FRAG_FRAME 0x20 -/* Currently the sizeof(TX_BLK) is 148 bytes. */ -typedef struct _TX_BLK_ { +/* Currently the sizeof(struct rt_tx_blk) is 148 bytes. */ +struct rt_tx_blk { u8 QueIdx; u8 TxFrameType; /* Indicate the Transmission type of the all frames in one batch */ u8 TotalFrameNum; /* Total frame number want to send-out in one batch */ u16 TotalFragNum; /* Total frame fragments required in one batch */ u16 TotalFrameLen; /* Total length of all frames want to send-out in one batch */ - QUEUE_HEADER TxPacketList; - MAC_TABLE_ENTRY *pMacEntry; /* NULL: packet with 802.11 RA field is multicast/broadcast address */ + struct rt_queue_header TxPacketList; + struct rt_mac_table_entry *pMacEntry; /* NULL: packet with 802.11 RA field is multicast/broadcast address */ HTTRANSMIT_SETTING *pTransmit; /* Following structure used for the characteristics of a specific packet. */ @@ -2241,13 +2241,13 @@ typedef struct _TX_BLK_ { u8 MpduReqNum; /* number of fragments of this frame */ u8 TxRate; /* TODO: Obsoleted? Should change to MCS? */ u8 CipherAlg; /* cipher alogrithm */ - PCIPHER_KEY pKey; + struct rt_cipher_key *pKey; u16 Flags; /*See following definitions for detail. */ /*YOU SHOULD NOT TOUCH IT! Following parameters are used for hardware-depended layer. */ unsigned long Priv; /* Hardware specific value saved in here. */ -} TX_BLK, *PTX_BLK; +}; #define fTX_bRtsRequired 0x0001 /* Indicate if need send RTS frame for protection. Not used in RT2860/RT2870. */ #define fTX_bAckRequired 0x0002 /* the packet need ack response */ @@ -2309,54 +2309,54 @@ char *GetBW(int BW); /* Private routines in rtmp_init.c */ /* */ int RTMPAllocAdapterBlock(void *handle, - OUT PRTMP_ADAPTER * ppAdapter); + struct rt_rtmp_adapter * * ppAdapter); -int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd); +int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd); -void RTMPFreeAdapter(IN PRTMP_ADAPTER pAd); +void RTMPFreeAdapter(struct rt_rtmp_adapter *pAd); -int NICReadRegParameters(IN PRTMP_ADAPTER pAd, +int NICReadRegParameters(struct rt_rtmp_adapter *pAd, void *WrapperConfigurationContext); #ifdef RTMP_RF_RW_SUPPORT -void NICInitRFRegisters(IN PRTMP_ADAPTER pAd); +void NICInitRFRegisters(struct rt_rtmp_adapter *pAd); -void RtmpChipOpsRFHook(IN RTMP_ADAPTER * pAd); +void RtmpChipOpsRFHook(struct rt_rtmp_adapter *pAd); -int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd, +int RT30xxWriteRFRegister(struct rt_rtmp_adapter *pAd, u8 regID, u8 value); -int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd, +int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd, u8 regID, u8 *pValue); #endif /* RTMP_RF_RW_SUPPORT // */ -void NICReadEEPROMParameters(IN PRTMP_ADAPTER pAd, u8 *mac_addr); +void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr); -void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd); +void NICInitAsicFromEEPROM(struct rt_rtmp_adapter *pAd); -int NICInitializeAdapter(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset); +int NICInitializeAdapter(struct rt_rtmp_adapter *pAd, IN BOOLEAN bHardReset); -int NICInitializeAsic(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset); +int NICInitializeAsic(struct rt_rtmp_adapter *pAd, IN BOOLEAN bHardReset); -void NICIssueReset(IN PRTMP_ADAPTER pAd); +void NICIssueReset(struct rt_rtmp_adapter *pAd); -void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType); +void RTMPRingCleanUp(struct rt_rtmp_adapter *pAd, u8 RingType); -void UserCfgInit(IN PRTMP_ADAPTER pAd); +void UserCfgInit(struct rt_rtmp_adapter *pAd); -void NICResetFromError(IN PRTMP_ADAPTER pAd); +void NICResetFromError(struct rt_rtmp_adapter *pAd); -int NICLoadFirmware(IN PRTMP_ADAPTER pAd); +int NICLoadFirmware(struct rt_rtmp_adapter *pAd); -void NICEraseFirmware(IN PRTMP_ADAPTER pAd); +void NICEraseFirmware(struct rt_rtmp_adapter *pAd); -int NICLoadRateSwitchingParams(IN PRTMP_ADAPTER pAd); +int NICLoadRateSwitchingParams(struct rt_rtmp_adapter *pAd); -BOOLEAN NICCheckForHang(IN PRTMP_ADAPTER pAd); +BOOLEAN NICCheckForHang(struct rt_rtmp_adapter *pAd); -void NICUpdateFifoStaCounters(IN PRTMP_ADAPTER pAd); +void NICUpdateFifoStaCounters(struct rt_rtmp_adapter *pAd); -void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd); +void NICUpdateRawCounters(struct rt_rtmp_adapter *pAd); void RTMPZeroMemory(void *pSrc, unsigned long Length); @@ -2368,154 +2368,154 @@ void AtoH(char *src, u8 *dest, int destlen); u8 BtoH(char ch); -void RTMPPatchMacBbpBug(IN PRTMP_ADAPTER pAd); +void RTMPPatchMacBbpBug(struct rt_rtmp_adapter *pAd); -void RTMPInitTimer(IN PRTMP_ADAPTER pAd, - IN PRALINK_TIMER_STRUCT pTimer, +void RTMPInitTimer(struct rt_rtmp_adapter *pAd, + struct rt_ralink_timer *pTimer, void *pTimerFunc, void *pData, IN BOOLEAN Repeat); -void RTMPSetTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value); +void RTMPSetTimer(struct rt_ralink_timer *pTimer, unsigned long Value); -void RTMPModTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value); +void RTMPModTimer(struct rt_ralink_timer *pTimer, unsigned long Value); -void RTMPCancelTimer(IN PRALINK_TIMER_STRUCT pTimer, OUT BOOLEAN * pCancelled); +void RTMPCancelTimer(struct rt_ralink_timer *pTimer, OUT BOOLEAN * pCancelled); -void RTMPSetLED(IN PRTMP_ADAPTER pAd, u8 Status); +void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status); -void RTMPSetSignalLED(IN PRTMP_ADAPTER pAd, IN NDIS_802_11_RSSI Dbm); +void RTMPSetSignalLED(struct rt_rtmp_adapter *pAd, IN NDIS_802_11_RSSI Dbm); -void RTMPEnableRxTx(IN PRTMP_ADAPTER pAd); +void RTMPEnableRxTx(struct rt_rtmp_adapter *pAd); /* */ /* prototype in action.c */ /* */ -void ActionStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, +void ActionStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]); -void MlmeADDBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeADDBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeDELBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeDLSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeDLSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeInvalidAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeInvalidAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeQOSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeQOSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerAddBAReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerAddBARspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerAddBARspAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerDelBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerDelBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void SendPSMPAction(IN PRTMP_ADAPTER pAd, u8 Wcid, u8 Psmp); +void SendPSMPAction(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 Psmp); -void PeerRMAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerRMAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerPublicAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerPublicAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerHTAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerHTAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerQOSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerQOSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); void RECBATimerTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void ORIBATimerTimeout(IN PRTMP_ADAPTER pAd); +void ORIBATimerTimeout(struct rt_rtmp_adapter *pAd); -void SendRefreshBAR(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry); +void SendRefreshBAR(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry); -void ActHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void ActHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 *Addr1, u8 *Addr2, u8 *Addr3); -void BarHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PFRAME_BAR pCntlBar, u8 *pDA, u8 *pSA); +void BarHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_frame_bar * pCntlBar, u8 *pDA, u8 *pSA); -void InsertActField(IN PRTMP_ADAPTER pAd, +void InsertActField(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 Category, u8 ActCode); -BOOLEAN CntlEnqueueForRecv(IN PRTMP_ADAPTER pAd, +BOOLEAN CntlEnqueueForRecv(struct rt_rtmp_adapter *pAd, unsigned long Wcid, - unsigned long MsgLen, IN PFRAME_BA_REQ pMsg); + unsigned long MsgLen, struct rt_frame_ba_req * pMsg); /* */ /* Private routines in rtmp_data.c */ /* */ -BOOLEAN RTMPHandleRxDoneInterrupt(IN PRTMP_ADAPTER pAd); +BOOLEAN RTMPHandleRxDoneInterrupt(struct rt_rtmp_adapter *pAd); -BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd, INT_SOURCE_CSR_STRUC TxRingBitmap); -void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd); +void RTMPHandleMgmtRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd); -void RTMPHandleTBTTInterrupt(IN PRTMP_ADAPTER pAd); +void RTMPHandleTBTTInterrupt(struct rt_rtmp_adapter *pAd); -void RTMPHandlePreTBTTInterrupt(IN PRTMP_ADAPTER pAd); +void RTMPHandlePreTBTTInterrupt(struct rt_rtmp_adapter *pAd); -void RTMPHandleTwakeupInterrupt(IN PRTMP_ADAPTER pAd); +void RTMPHandleTwakeupInterrupt(struct rt_rtmp_adapter *pAd); -void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd); +void RTMPHandleRxCoherentInterrupt(struct rt_rtmp_adapter *pAd); -BOOLEAN TxFrameIsAggregatible(IN PRTMP_ADAPTER pAd, +BOOLEAN TxFrameIsAggregatible(struct rt_rtmp_adapter *pAd, u8 *pPrevAddr1, u8 *p8023hdr); -BOOLEAN PeerIsAggreOn(IN PRTMP_ADAPTER pAd, - unsigned long TxRate, IN PMAC_TABLE_ENTRY pMacEntry); +BOOLEAN PeerIsAggreOn(struct rt_rtmp_adapter *pAd, + unsigned long TxRate, struct rt_mac_table_entry *pMacEntry); int Sniff2BytesFromNdisBuffer(char *pFirstBuffer, u8 DesiredOffset, u8 *pByte0, u8 *pByte1); -int STASendPacket(IN PRTMP_ADAPTER pAd, void *pPacket); +int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket); void STASendPackets(void *MiniportAdapterContext, void **ppPacketArray, u32 NumberOfPackets); -void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, +void RTMPDeQueuePacket(struct rt_rtmp_adapter *pAd, IN BOOLEAN bIntContext, u8 QueIdx, u8 Max_Tx_Packets); -int RTMPHardTransmit(IN PRTMP_ADAPTER pAd, +int RTMPHardTransmit(struct rt_rtmp_adapter *pAd, void *pPacket, u8 QueIdx, unsigned long *pFreeTXDLeft); -int STAHardTransmit(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, u8 QueIdx); +int STAHardTransmit(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 QueIdx); -void STARxEAPOLFrameIndicate(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void STARxEAPOLFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); -int RTMPFreeTXDRequest(IN PRTMP_ADAPTER pAd, +int RTMPFreeTXDRequest(struct rt_rtmp_adapter *pAd, u8 RingType, u8 NumberRequired, u8 *FreeNumberIs); -int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmit(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket); -int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmitMgmtRing(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket); #ifdef RTMP_MAC_PCI -int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmitTxRing(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket); -int MlmeDataHardTransmit(IN PRTMP_ADAPTER pAd, +int MlmeDataHardTransmit(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket); -void RTMPWriteTxDescriptor(IN PRTMP_ADAPTER pAd, - IN PTXD_STRUC pTxD, IN BOOLEAN bWIV, u8 QSEL); +void RTMPWriteTxDescriptor(struct rt_rtmp_adapter *pAd, + struct rt_txd * pTxD, IN BOOLEAN bWIV, u8 QSEL); #endif /* RTMP_MAC_PCI // */ -u16 RTMPCalcDuration(IN PRTMP_ADAPTER pAd, u8 Rate, unsigned long Size); +u16 RTMPCalcDuration(struct rt_rtmp_adapter *pAd, u8 Rate, unsigned long Size); -void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pTxWI, IN BOOLEAN FRAG, IN BOOLEAN CFACK, IN BOOLEAN InsTimestamp, IN BOOLEAN AMPDU, IN BOOLEAN Ack, IN BOOLEAN NSeq, /* HW new a sequence. */ +void RTMPWriteTxWI(struct rt_rtmp_adapter *pAd, struct rt_txwi * pTxWI, IN BOOLEAN FRAG, IN BOOLEAN CFACK, IN BOOLEAN InsTimestamp, IN BOOLEAN AMPDU, IN BOOLEAN Ack, IN BOOLEAN NSeq, /* HW new a sequence. */ u8 BASize, u8 WCID, unsigned long Length, @@ -2525,28 +2525,28 @@ void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pTxWI, IN BOOLEAN FRAG, u8 Txopmode, IN BOOLEAN CfAck, IN HTTRANSMIT_SETTING * pTransmit); -void RTMPWriteTxWI_Data(IN PRTMP_ADAPTER pAd, - IN OUT PTXWI_STRUC pTxWI, IN TX_BLK * pTxBlk); +void RTMPWriteTxWI_Data(struct rt_rtmp_adapter *pAd, + struct rt_txwi * pTxWI, struct rt_tx_blk *pTxBlk); -void RTMPWriteTxWI_Cache(IN PRTMP_ADAPTER pAd, - IN OUT PTXWI_STRUC pTxWI, IN TX_BLK * pTxBlk); +void RTMPWriteTxWI_Cache(struct rt_rtmp_adapter *pAd, + struct rt_txwi * pTxWI, struct rt_tx_blk *pTxBlk); -void RTMPSuspendMsduTransmission(IN PRTMP_ADAPTER pAd); +void RTMPSuspendMsduTransmission(struct rt_rtmp_adapter *pAd); -void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd); +void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd); -int MiniportMMRequest(IN PRTMP_ADAPTER pAd, +int MiniportMMRequest(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 *pData, u32 Length); /*+++mark by shiang, now this function merge to MiniportMMRequest() */ /*---mark by shiang, now this function merge to MiniportMMRequest() */ -void RTMPSendNullFrame(IN PRTMP_ADAPTER pAd, +void RTMPSendNullFrame(struct rt_rtmp_adapter *pAd, u8 TxRate, IN BOOLEAN bQosNull); -void RTMPSendDisassociationFrame(IN PRTMP_ADAPTER pAd); +void RTMPSendDisassociationFrame(struct rt_rtmp_adapter *pAd); -void RTMPSendRTSFrame(IN PRTMP_ADAPTER pAd, +void RTMPSendRTSFrame(struct rt_rtmp_adapter *pAd, u8 *pDA, IN unsigned int NextMpduSize, u8 TxRate, @@ -2554,67 +2554,67 @@ void RTMPSendRTSFrame(IN PRTMP_ADAPTER pAd, u16 AckDuration, u8 QueIdx, u8 FrameGap); -PQUEUE_HEADER RTMPCheckTxSwQueue(IN PRTMP_ADAPTER pAd, u8 * QueIdx); +struct rt_queue_header *RTMPCheckTxSwQueue(struct rt_rtmp_adapter *pAd, u8 * QueIdx); -void RTMPReportMicError(IN PRTMP_ADAPTER pAd, IN PCIPHER_KEY pWpaKey); +void RTMPReportMicError(struct rt_rtmp_adapter *pAd, struct rt_cipher_key *pWpaKey); -void WpaMicFailureReportFrame(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void WpaMicFailureReportFrame(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); void WpaDisassocApAndBlockAssoc(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void WpaStaPairwiseKeySetting(IN PRTMP_ADAPTER pAd); +void WpaStaPairwiseKeySetting(struct rt_rtmp_adapter *pAd); -void WpaStaGroupKeySetting(IN PRTMP_ADAPTER pAd); +void WpaStaGroupKeySetting(struct rt_rtmp_adapter *pAd); -int RTMPCloneNdisPacket(IN PRTMP_ADAPTER pAd, +int RTMPCloneNdisPacket(struct rt_rtmp_adapter *pAd, IN BOOLEAN pInsAMSDUHdr, void *pInPacket, void ** ppOutPacket); -int RTMPAllocateNdisPacket(IN PRTMP_ADAPTER pAd, +int RTMPAllocateNdisPacket(struct rt_rtmp_adapter *pAd, void ** pPacket, u8 *pHeader, u32 HeaderLen, u8 *pData, u32 DataLen); -void RTMPFreeNdisPacket(IN PRTMP_ADAPTER pAd, void *pPacket); +void RTMPFreeNdisPacket(struct rt_rtmp_adapter *pAd, void *pPacket); -BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx); +BOOLEAN RTMPFreeTXDUponTxDmaDone(struct rt_rtmp_adapter *pAd, u8 QueIdx); -BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, void *pPacket); +BOOLEAN RTMPCheckDHCPFrame(struct rt_rtmp_adapter *pAd, void *pPacket); -BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, void *pPacket); +BOOLEAN RTMPCheckEtherType(struct rt_rtmp_adapter *pAd, void *pPacket); /* */ /* Private routines in rtmp_wep.c */ /* */ -void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitWepEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 KeyId, u8 KeyLen, u8 *pDest); -void RTMPEncryptData(IN PRTMP_ADAPTER pAd, +void RTMPEncryptData(struct rt_rtmp_adapter *pAd, u8 *pSrc, u8 *pDest, u32 Len); -BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptWEP(struct rt_rtmp_adapter *pAd, u8 *pData, - unsigned long DataByteCnt, IN PCIPHER_KEY pGroupKey); + unsigned long DataByteCnt, struct rt_cipher_key *pGroupKey); -void RTMPSetICV(IN PRTMP_ADAPTER pAd, u8 *pDest); +void RTMPSetICV(struct rt_rtmp_adapter *pAd, u8 *pDest); -void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen); +void ARCFOUR_INIT(struct rt_arcfourcontext *Ctx, u8 *pKey, u32 KeyLen); -u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx); +u8 ARCFOUR_BYTE(struct rt_arcfourcontext *Ctx); -void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx, +void ARCFOUR_DECRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len); -void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, +void ARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len); -void WPAARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, +void WPAARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len); u32 RTMP_CALC_FCS32(u32 Fcs, u8 *Cp, int Len); @@ -2625,130 +2625,130 @@ u32 RTMP_CALC_FCS32(u32 Fcs, u8 *Cp, int Len); /* Asic/RF/BBP related functions */ -void AsicAdjustTxPower(IN PRTMP_ADAPTER pAd); +void AsicAdjustTxPower(struct rt_rtmp_adapter *pAd); -void AsicUpdateProtect(IN PRTMP_ADAPTER pAd, +void AsicUpdateProtect(struct rt_rtmp_adapter *pAd, u16 OperaionMode, u8 SetMask, IN BOOLEAN bDisableBGProtect, IN BOOLEAN bNonGFExist); -void AsicSwitchChannel(IN PRTMP_ADAPTER pAd, +void AsicSwitchChannel(struct rt_rtmp_adapter *pAd, u8 Channel, IN BOOLEAN bScan); -void AsicLockChannel(IN PRTMP_ADAPTER pAd, u8 Channel); +void AsicLockChannel(struct rt_rtmp_adapter *pAd, u8 Channel); void AsicRfTuningExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void AsicResetBBPAgent(IN PRTMP_ADAPTER pAd); +void AsicResetBBPAgent(struct rt_rtmp_adapter *pAd); -void AsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void AsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp); -void AsicForceSleep(IN PRTMP_ADAPTER pAd); +void AsicForceSleep(struct rt_rtmp_adapter *pAd); -void AsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx); +void AsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx); -void AsicSetBssid(IN PRTMP_ADAPTER pAd, u8 *pBssid); +void AsicSetBssid(struct rt_rtmp_adapter *pAd, u8 *pBssid); -void AsicSetMcastWC(IN PRTMP_ADAPTER pAd); +void AsicSetMcastWC(struct rt_rtmp_adapter *pAd); -void AsicDelWcidTab(IN PRTMP_ADAPTER pAd, u8 Wcid); +void AsicDelWcidTab(struct rt_rtmp_adapter *pAd, u8 Wcid); -void AsicEnableRDG(IN PRTMP_ADAPTER pAd); +void AsicEnableRDG(struct rt_rtmp_adapter *pAd); -void AsicDisableRDG(IN PRTMP_ADAPTER pAd); +void AsicDisableRDG(struct rt_rtmp_adapter *pAd); -void AsicDisableSync(IN PRTMP_ADAPTER pAd); +void AsicDisableSync(struct rt_rtmp_adapter *pAd); -void AsicEnableBssSync(IN PRTMP_ADAPTER pAd); +void AsicEnableBssSync(struct rt_rtmp_adapter *pAd); -void AsicEnableIbssSync(IN PRTMP_ADAPTER pAd); +void AsicEnableIbssSync(struct rt_rtmp_adapter *pAd); -void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm); +void AsicSetEdcaParm(struct rt_rtmp_adapter *pAd, struct rt_edca_parm *pEdcaParm); -void AsicSetSlotTime(IN PRTMP_ADAPTER pAd, IN BOOLEAN bUseShortSlotTime); +void AsicSetSlotTime(struct rt_rtmp_adapter *pAd, IN BOOLEAN bUseShortSlotTime); -void AsicAddSharedKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddSharedKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIndex, u8 KeyIdx, u8 CipherAlg, u8 *pKey, u8 *pTxMic, u8 *pRxMic); -void AsicRemoveSharedKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicRemoveSharedKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIndex, u8 KeyIdx); -void AsicUpdateWCIDAttribute(IN PRTMP_ADAPTER pAd, +void AsicUpdateWCIDAttribute(struct rt_rtmp_adapter *pAd, u16 WCID, u8 BssIndex, u8 CipherAlg, IN BOOLEAN bUsePairewiseKeyTable); -void AsicUpdateWCIDIVEIV(IN PRTMP_ADAPTER pAd, +void AsicUpdateWCIDIVEIV(struct rt_rtmp_adapter *pAd, u16 WCID, unsigned long uIV, unsigned long uEIV); -void AsicUpdateRxWCIDTable(IN PRTMP_ADAPTER pAd, +void AsicUpdateRxWCIDTable(struct rt_rtmp_adapter *pAd, u16 WCID, u8 *pAddr); -void AsicAddKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddKeyEntry(struct rt_rtmp_adapter *pAd, u16 WCID, u8 BssIndex, u8 KeyIdx, - IN PCIPHER_KEY pCipherKey, + struct rt_cipher_key *pCipherKey, IN BOOLEAN bUsePairewiseKeyTable, IN BOOLEAN bTxKey); -void AsicAddPairwiseKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddPairwiseKeyEntry(struct rt_rtmp_adapter *pAd, u8 *pAddr, - u8 WCID, IN CIPHER_KEY * pCipherKey); + u8 WCID, struct rt_cipher_key *pCipherKey); -void AsicRemovePairwiseKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicRemovePairwiseKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIdx, u8 Wcid); -BOOLEAN AsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, +BOOLEAN AsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, u8 Command, u8 Token, u8 Arg0, u8 Arg1); #ifdef RTMP_MAC_PCI -BOOLEAN AsicCheckCommanOk(IN PRTMP_ADAPTER pAd, u8 Command); +BOOLEAN AsicCheckCommanOk(struct rt_rtmp_adapter *pAd, u8 Command); #endif /* RTMP_MAC_PCI // */ -void MacAddrRandomBssid(IN PRTMP_ADAPTER pAd, u8 *pAddr); +void MacAddrRandomBssid(struct rt_rtmp_adapter *pAd, u8 *pAddr); -void MgtMacHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void MgtMacHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 SubType, u8 ToDs, u8 *pDA, u8 *pBssid); -void MlmeRadioOff(IN PRTMP_ADAPTER pAd); +void MlmeRadioOff(struct rt_rtmp_adapter *pAd); -void MlmeRadioOn(IN PRTMP_ADAPTER pAd); +void MlmeRadioOn(struct rt_rtmp_adapter *pAd); -void BssTableInit(IN BSS_TABLE * Tab); +void BssTableInit(struct rt_bss_table *Tab); -void BATableInit(IN PRTMP_ADAPTER pAd, IN BA_TABLE * Tab); +void BATableInit(struct rt_rtmp_adapter *pAd, struct rt_ba_table *Tab); -unsigned long BssTableSearch(IN BSS_TABLE * Tab, u8 *pBssid, u8 Channel); +unsigned long BssTableSearch(struct rt_bss_table *Tab, u8 *pBssid, u8 Channel); -unsigned long BssSsidTableSearch(IN BSS_TABLE * Tab, +unsigned long BssSsidTableSearch(struct rt_bss_table *Tab, u8 *pBssid, u8 *pSsid, u8 SsidLen, u8 Channel); -unsigned long BssTableSearchWithSSID(IN BSS_TABLE * Tab, +unsigned long BssTableSearchWithSSID(struct rt_bss_table *Tab, u8 *Bssid, u8 *pSsid, u8 SsidLen, u8 Channel); -unsigned long BssSsidTableSearchBySSID(IN BSS_TABLE * Tab, +unsigned long BssSsidTableSearchBySSID(struct rt_bss_table *Tab, u8 *pSsid, u8 SsidLen); -void BssTableDeleteEntry(IN OUT PBSS_TABLE pTab, +void BssTableDeleteEntry(struct rt_bss_table *pTab, u8 *pBssid, u8 Channel); -void BATableDeleteORIEntry(IN OUT PRTMP_ADAPTER pAd, - IN BA_ORI_ENTRY * pBAORIEntry); +void BATableDeleteORIEntry(struct rt_rtmp_adapter *pAd, + struct rt_ba_ori_entry *pBAORIEntry); -void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT PBSS_ENTRY pBss, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, IN PCF_PARM CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, IN HT_CAPABILITY_IE * pHtCapability, IN ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +void BssEntrySet(struct rt_rtmp_adapter *pAd, struct rt_bss_entry *pBss, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, struct rt_cf_parm * CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 HtCapabilityLen, u8 AddHtInfoLen, u8 NewExtChanOffset, @@ -2756,12 +2756,12 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT PBSS_ENTRY pBss, u8 *pBssid, char Ssi char Rssi, IN LARGE_INTEGER TimeStamp, u8 CkipFlag, - IN PEDCA_PARM pEdcaParm, - IN PQOS_CAPABILITY_PARM pQosCapability, - IN PQBSS_LOAD_PARM pQbssLoad, - u16 LengthVIE, IN PNDIS_802_11_VARIABLE_IEs pVIE); + struct rt_edca_parm *pEdcaParm, + struct rt_qos_capability_parm *pQosCapability, + struct rt_qbss_load_parm *pQbssLoad, + u16 LengthVIE, struct rt_ndis_802_11_variable_ies *pVIE); -unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT PBSS_TABLE pTab, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, IN CF_PARM * CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, IN HT_CAPABILITY_IE * pHtCapability, IN ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +unsigned long BssTableSetEntry(struct rt_rtmp_adapter *pAd, struct rt_bss_table *pTab, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, struct rt_cf_parm * CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 HtCapabilityLen, u8 AddHtInfoLen, u8 NewExtChanOffset, @@ -2769,12 +2769,12 @@ unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT PBSS_TABLE pTab, u8 *pB char Rssi, IN LARGE_INTEGER TimeStamp, u8 CkipFlag, - IN PEDCA_PARM pEdcaParm, - IN PQOS_CAPABILITY_PARM pQosCapability, - IN PQBSS_LOAD_PARM pQbssLoad, - u16 LengthVIE, IN PNDIS_802_11_VARIABLE_IEs pVIE); + struct rt_edca_parm *pEdcaParm, + struct rt_qos_capability_parm *pQosCapability, + struct rt_qbss_load_parm *pQbssLoad, + u16 LengthVIE, struct rt_ndis_802_11_variable_ies *pVIE); -void BATableInsertEntry(IN PRTMP_ADAPTER pAd, +void BATableInsertEntry(struct rt_rtmp_adapter *pAd, u16 Aid, u16 TimeOutValue, u16 StartingSeq, @@ -2782,22 +2782,22 @@ void BATableInsertEntry(IN PRTMP_ADAPTER pAd, u8 BAWinSize, u8 OriginatorStatus, IN BOOLEAN IsRecipient); -void BssTableSsidSort(IN PRTMP_ADAPTER pAd, - OUT BSS_TABLE * OutTab, char Ssid[], u8 SsidLen); +void BssTableSsidSort(struct rt_rtmp_adapter *pAd, + struct rt_bss_table *OutTab, char Ssid[], u8 SsidLen); -void BssTableSortByRssi(IN OUT BSS_TABLE * OutTab); +void BssTableSortByRssi(struct rt_bss_table *OutTab); -void BssCipherParse(IN OUT PBSS_ENTRY pBss); +void BssCipherParse(struct rt_bss_entry *pBss); -int MlmeQueueInit(IN MLME_QUEUE * Queue); +int MlmeQueueInit(struct rt_mlme_queue *Queue); -void MlmeQueueDestroy(IN MLME_QUEUE * Queue); +void MlmeQueueDestroy(struct rt_mlme_queue *Queue); -BOOLEAN MlmeEnqueue(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeEnqueue(struct rt_rtmp_adapter *pAd, unsigned long Machine, unsigned long MsgType, unsigned long MsgLen, void * Msg); -BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd, unsigned long Wcid, unsigned long TimeStampHigh, unsigned long TimeStampLow, @@ -2806,35 +2806,35 @@ BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, u8 Rssi2, unsigned long MsgLen, void *Msg, u8 Signal); -BOOLEAN MlmeDequeue(IN MLME_QUEUE * Queue, OUT MLME_QUEUE_ELEM ** Elem); +BOOLEAN MlmeDequeue(struct rt_mlme_queue *Queue, struct rt_mlme_queue_elem ** Elem); -void MlmeRestartStateMachine(IN PRTMP_ADAPTER pAd); +void MlmeRestartStateMachine(struct rt_rtmp_adapter *pAd); -BOOLEAN MlmeQueueEmpty(IN MLME_QUEUE * Queue); +BOOLEAN MlmeQueueEmpty(struct rt_mlme_queue *Queue); -BOOLEAN MlmeQueueFull(IN MLME_QUEUE * Queue); +BOOLEAN MlmeQueueFull(struct rt_mlme_queue *Queue); -BOOLEAN MsgTypeSubst(IN PRTMP_ADAPTER pAd, - IN PFRAME_802_11 pFrame, +BOOLEAN MsgTypeSubst(struct rt_rtmp_adapter *pAd, + struct rt_frame_802_11 * pFrame, int * Machine, int * MsgType); -void StateMachineInit(IN STATE_MACHINE * Sm, +void StateMachineInit(struct rt_state_machine *Sm, IN STATE_MACHINE_FUNC Trans[], unsigned long StNr, unsigned long MsgNr, IN STATE_MACHINE_FUNC DefFunc, unsigned long InitState, unsigned long Base); -void StateMachineSetAction(IN STATE_MACHINE * S, +void StateMachineSetAction(struct rt_state_machine *S, unsigned long St, unsigned long Msg, IN STATE_MACHINE_FUNC F); -void StateMachinePerformAction(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, IN MLME_QUEUE_ELEM * Elem); +void StateMachinePerformAction(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, struct rt_mlme_queue_elem *Elem); -void Drop(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void Drop(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void AssocStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * Sm, +void AssocStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *Sm, OUT STATE_MACHINE_FUNC Trans[]); void ReassocTimeout(void *SystemSpecific1, @@ -2850,42 +2850,42 @@ void DisassocTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3); /*---------------------------------------------- */ -void MlmeAssocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeAssocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeReassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeReassocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeDisassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeDisassocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerAssocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerAssocRspAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerReassocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerReassocRspAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerDisassocAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerDisassocAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void DisassocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void DisassocTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void AssocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void AssocTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void ReassocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void ReassocTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void Cls3errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr); +void Cls3errAction(struct rt_rtmp_adapter *pAd, u8 *pAddr); -void InvalidStateWhenAssoc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void InvalidStateWhenAssoc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void InvalidStateWhenReassoc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void InvalidStateWhenReassoc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void InvalidStateWhenDisassociate(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem); +void InvalidStateWhenDisassociate(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem); #ifdef RTMP_MAC_USB -void MlmeCntlConfirm(IN PRTMP_ADAPTER pAd, unsigned long MsgType, u16 Msg); +void MlmeCntlConfirm(struct rt_rtmp_adapter *pAd, unsigned long MsgType, u16 Msg); #endif /* RTMP_MAC_USB // */ -void ComposePsPoll(IN PRTMP_ADAPTER pAd); +void ComposePsPoll(struct rt_rtmp_adapter *pAd); -void ComposeNullFrame(IN PRTMP_ADAPTER pAd); +void ComposeNullFrame(struct rt_rtmp_adapter *pAd); -void AssocPostProc(IN PRTMP_ADAPTER pAd, +void AssocPostProc(struct rt_rtmp_adapter *pAd, u8 *pAddr2, u16 CapabilityInfo, u16 Aid, @@ -2893,41 +2893,41 @@ void AssocPostProc(IN PRTMP_ADAPTER pAd, u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, - IN PEDCA_PARM pEdcaParm, - IN HT_CAPABILITY_IE * pHtCapability, - u8 HtCapabilityLen, IN ADD_HT_INFO_IE * pAddHtInfo); + struct rt_edca_parm *pEdcaParm, + struct rt_ht_capability_ie * pHtCapability, + u8 HtCapabilityLen, struct rt_add_ht_info_ie * pAddHtInfo); -void AuthStateMachineInit(IN PRTMP_ADAPTER pAd, - IN PSTATE_MACHINE sm, OUT STATE_MACHINE_FUNC Trans[]); +void AuthStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *sm, OUT STATE_MACHINE_FUNC Trans[]); void AuthTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void MlmeAuthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeAuthReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerAuthRspAtSeq2Action(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerAuthRspAtSeq4Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerAuthRspAtSeq4Action(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void AuthTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void AuthTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void Cls2errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr); +void Cls2errAction(struct rt_rtmp_adapter *pAd, u8 *pAddr); -void MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeDeauthReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void InvalidStateWhenAuth(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void InvalidStateWhenAuth(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); /*============================================= */ -void AuthRspStateMachineInit(IN PRTMP_ADAPTER pAd, - IN PSTATE_MACHINE Sm, +void AuthRspStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *Sm, IN STATE_MACHINE_FUNC Trans[]); -void PeerDeauthAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerDeauthAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerAuthSimpleRspGenAndSend(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHdr80211, +void PeerAuthSimpleRspGenAndSend(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u16 Alg, u16 Seq, u16 Reason, u16 Status); @@ -2938,8 +2938,8 @@ void PeerAuthSimpleRspGenAndSend(IN PRTMP_ADAPTER pAd, /*======================================== */ -void SyncStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * Sm, +void SyncStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *Sm, OUT STATE_MACHINE_FUNC Trans[]); void BeaconTimeout(void *SystemSpecific1, @@ -2950,116 +2950,116 @@ void ScanTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void InvalidStateWhenScan(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void InvalidStateWhenScan(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void InvalidStateWhenJoin(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void InvalidStateWhenJoin(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void InvalidStateWhenStart(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void InvalidStateWhenStart(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void EnqueueProbeRequest(IN PRTMP_ADAPTER pAd); +void EnqueueProbeRequest(struct rt_rtmp_adapter *pAd); -BOOLEAN ScanRunning(IN PRTMP_ADAPTER pAd); +BOOLEAN ScanRunning(struct rt_rtmp_adapter *pAd); /*========================================= */ -void MlmeCntlInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, OUT STATE_MACHINE_FUNC Trans[]); +void MlmeCntlInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]); -void MlmeCntlMachinePerformAction(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, - IN MLME_QUEUE_ELEM * Elem); +void MlmeCntlMachinePerformAction(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, + struct rt_mlme_queue_elem *Elem); -void CntlIdleProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlIdleProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlOidScanProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlOidScanProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlOidSsidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlOidRTBssidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlMlmeRoamingProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlMlmeRoamingProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlWaitDisassocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlWaitDisassocProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlWaitJoinProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlWaitJoinProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlWaitReassocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlWaitReassocProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlWaitStartProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlWaitStartProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlWaitAuthProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlWaitAuthProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlWaitAuthProc2(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlWaitAuthProc2(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void CntlWaitAssocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void CntlWaitAssocProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void LinkUp(IN PRTMP_ADAPTER pAd, u8 BssType); +void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType); -void LinkDown(IN PRTMP_ADAPTER pAd, IN BOOLEAN IsReqFromAP); +void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP); -void IterateOnBssTab(IN PRTMP_ADAPTER pAd); +void IterateOnBssTab(struct rt_rtmp_adapter *pAd); -void IterateOnBssTab2(IN PRTMP_ADAPTER pAd);; +void IterateOnBssTab2(struct rt_rtmp_adapter *pAd);; -void JoinParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_JOIN_REQ_STRUCT * JoinReq, unsigned long BssIdx); +void JoinParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_join_req *JoinReq, unsigned long BssIdx); -void AssocParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_ASSOC_REQ_STRUCT * AssocReq, +void AssocParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_assoc_req *AssocReq, u8 *pAddr, u16 CapabilityInfo, unsigned long Timeout, u16 ListenIntv); -void ScanParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_SCAN_REQ_STRUCT * ScanReq, +void ScanParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_scan_req *ScanReq, char Ssid[], u8 SsidLen, u8 BssType, u8 ScanType); -void DisassocParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_DISASSOC_REQ_STRUCT * DisassocReq, +void DisassocParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_disassoc_req *DisassocReq, u8 *pAddr, u16 Reason); -void StartParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_START_REQ_STRUCT * StartReq, +void StartParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_start_req *StartReq, char Ssid[], u8 SsidLen); -void AuthParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_AUTH_REQ_STRUCT * AuthReq, +void AuthParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_auth_req *AuthReq, u8 *pAddr, u16 Alg); -void EnqueuePsPoll(IN PRTMP_ADAPTER pAd); +void EnqueuePsPoll(struct rt_rtmp_adapter *pAd); -void EnqueueBeaconFrame(IN PRTMP_ADAPTER pAd); +void EnqueueBeaconFrame(struct rt_rtmp_adapter *pAd); -void MlmeJoinReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeJoinReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeScanReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeScanReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void MlmeStartReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void MlmeStartReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void ScanTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void ScanTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void BeaconTimeoutAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void BeaconTimeoutAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerBeaconAtScanAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerBeaconAtScanAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerBeaconAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerBeaconAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerBeacon(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void PeerProbeReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerProbeReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -void ScanNextChannel(IN PRTMP_ADAPTER pAd); +void ScanNextChannel(struct rt_rtmp_adapter *pAd); -unsigned long MakeIbssBeacon(IN PRTMP_ADAPTER pAd); +unsigned long MakeIbssBeacon(struct rt_rtmp_adapter *pAd); -BOOLEAN MlmeScanReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeScanReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 * BssType, char ssid[], u8 * SsidLen, u8 * ScanType); -BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerBeaconAndProbeRspSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 MsgChannel, @@ -3072,7 +3072,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, u8 * pChannel, u8 * pNewChannel, OUT LARGE_INTEGER * pTimestamp, - OUT CF_PARM * pCfParm, + struct rt_cf_parm * pCfParm, u16 * pAtimWin, u16 * pCapabilityInfo, u8 * pErp, @@ -3086,48 +3086,48 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, u8 * pExtRateLen, u8 * pCkipFlag, u8 * pAironetCellPowerLimit, - OUT PEDCA_PARM pEdcaParm, - OUT PQBSS_LOAD_PARM pQbssLoad, - OUT PQOS_CAPABILITY_PARM pQosCapability, + struct rt_edca_parm *pEdcaParm, + struct rt_qbss_load_parm *pQbssLoad, + struct rt_qos_capability_parm *pQosCapability, unsigned long * pRalinkIe, u8 * pHtCapabilityLen, u8 * pPreNHtCapabilityLen, - OUT HT_CAPABILITY_IE * pHtCapability, + struct rt_ht_capability_ie * pHtCapability, u8 * AddHtInfoLen, - OUT ADD_HT_INFO_IE * AddHtInfo, + struct rt_add_ht_info_ie * AddHtInfo, u8 * NewExtChannel, u16 * LengthVIE, - OUT PNDIS_802_11_VARIABLE_IEs pVIE); + struct rt_ndis_802_11_variable_ies *pVIE); -BOOLEAN PeerAddBAReqActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAddBAReqActionSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pAddr2); -BOOLEAN PeerAddBARspActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAddBARspActionSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen); -BOOLEAN PeerDelBAActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDelBAActionSanity(struct rt_rtmp_adapter *pAd, u8 Wcid, void * pMsg, unsigned long MsgLen); -BOOLEAN MlmeAssocReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAssocReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pApAddr, u16 * CapabilityInfo, unsigned long * Timeout, u16 * ListenIntv); -BOOLEAN MlmeAuthReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAuthReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr, unsigned long * Timeout, u16 * Alg); -BOOLEAN MlmeStartReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeStartReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, char Ssid[], u8 * Ssidlen); -BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAuthSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr, @@ -3135,28 +3135,28 @@ BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, u16 * Seq, u16 * Status, char ChlgText[]); -BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, void * pMsg, unsigned long MsgLen, u8 *pAddr2, u16 * pCapabilityInfo, u16 * pStatus, u16 * pAid, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, OUT HT_CAPABILITY_IE * pHtCapability, OUT ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +BOOLEAN PeerAssocRspSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pAddr2, u16 * pCapabilityInfo, u16 * pStatus, u16 * pAid, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 * pHtCapabilityLen, u8 * pAddHtInfoLen, u8 * pNewExtChannelOffset, - OUT PEDCA_PARM pEdcaParm, u8 * pCkipFlag); + struct rt_edca_parm *pEdcaParm, u8 * pCkipFlag); -BOOLEAN PeerDisassocSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDisassocSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, u16 * Reason); -BOOLEAN PeerWpaMessageSanity(IN PRTMP_ADAPTER pAd, - IN PEAPOL_PACKET pMsg, +BOOLEAN PeerWpaMessageSanity(struct rt_rtmp_adapter *pAd, + struct rt_eapol_packet * pMsg, unsigned long MsgLen, - u8 MsgType, IN MAC_TABLE_ENTRY * pEntry); + u8 MsgType, struct rt_mac_table_entry *pEntry); -BOOLEAN PeerDeauthSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDeauthSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, u16 * Reason); -BOOLEAN PeerProbeReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerProbeReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, @@ -3169,23 +3169,23 @@ BOOLEAN GetTimBit(char * Ptr, u8 * DtimCount, u8 * DtimPeriod, u8 * MessageToMe); -u8 ChannelSanity(IN PRTMP_ADAPTER pAd, u8 channel); +u8 ChannelSanity(struct rt_rtmp_adapter *pAd, u8 channel); -NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(IN PBSS_ENTRY pBss); +NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(struct rt_bss_entry *pBss); -BOOLEAN MlmeDelBAReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeDelBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen); -BOOLEAN MlmeAddBAReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAddBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2); unsigned long MakeOutgoingFrame(u8 * Buffer, unsigned long * Length, ...); -void LfsrInit(IN PRTMP_ADAPTER pAd, unsigned long Seed); +void LfsrInit(struct rt_rtmp_adapter *pAd, unsigned long Seed); -u8 RandomByte(IN PRTMP_ADAPTER pAd); +u8 RandomByte(struct rt_rtmp_adapter *pAd); -void AsicUpdateAutoFallBackTable(IN PRTMP_ADAPTER pAd, u8 *pTxRate); +void AsicUpdateAutoFallBackTable(struct rt_rtmp_adapter *pAd, u8 *pTxRate); void MlmePeriodicExec(void *SystemSpecific1, void *FunctionContext, @@ -3195,109 +3195,109 @@ void LinkDownExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void STAMlmePeriodicExec(PRTMP_ADAPTER pAd); +void STAMlmePeriodicExec(struct rt_rtmp_adapter *pAd); -void MlmeAutoScan(IN PRTMP_ADAPTER pAd); +void MlmeAutoScan(struct rt_rtmp_adapter *pAd); -void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd); +void MlmeAutoReconnectLastSSID(struct rt_rtmp_adapter *pAd); BOOLEAN MlmeValidateSSID(u8 *pSsid, u8 SsidLen); -void MlmeCheckForRoaming(IN PRTMP_ADAPTER pAd, unsigned long Now32); +void MlmeCheckForRoaming(struct rt_rtmp_adapter *pAd, unsigned long Now32); -BOOLEAN MlmeCheckForFastRoaming(IN PRTMP_ADAPTER pAd); +BOOLEAN MlmeCheckForFastRoaming(struct rt_rtmp_adapter *pAd); -void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd); +void MlmeDynamicTxRateSwitching(struct rt_rtmp_adapter *pAd); -void MlmeSetTxRate(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, IN PRTMP_TX_RATE_SWITCH pTxRate); +void MlmeSetTxRate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_rtmp_tx_rate_switch * pTxRate); -void MlmeSelectTxRateTable(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 ** ppTable, u8 *pTableSize, u8 *pInitTxRateIdx); -void MlmeCalculateChannelQuality(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pMacEntry, unsigned long Now); +void MlmeCalculateChannelQuality(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pMacEntry, unsigned long Now); -void MlmeCheckPsmChange(IN PRTMP_ADAPTER pAd, unsigned long Now32); +void MlmeCheckPsmChange(struct rt_rtmp_adapter *pAd, unsigned long Now32); -void MlmeSetPsmBit(IN PRTMP_ADAPTER pAd, u16 psm); +void MlmeSetPsmBit(struct rt_rtmp_adapter *pAd, u16 psm); -void MlmeSetTxPreamble(IN PRTMP_ADAPTER pAd, u16 TxPreamble); +void MlmeSetTxPreamble(struct rt_rtmp_adapter *pAd, u16 TxPreamble); -void UpdateBasicRateBitmap(IN PRTMP_ADAPTER pAd); +void UpdateBasicRateBitmap(struct rt_rtmp_adapter *pAd); -void MlmeUpdateTxRates(IN PRTMP_ADAPTER pAd, +void MlmeUpdateTxRates(struct rt_rtmp_adapter *pAd, IN BOOLEAN bLinkUp, u8 apidx); -void MlmeUpdateHtTxRates(IN PRTMP_ADAPTER pAd, u8 apidx); +void MlmeUpdateHtTxRates(struct rt_rtmp_adapter *pAd, u8 apidx); -void RTMPCheckRates(IN PRTMP_ADAPTER pAd, +void RTMPCheckRates(struct rt_rtmp_adapter *pAd, IN u8 SupRate[], IN u8 * SupRateLen); -BOOLEAN RTMPCheckChannel(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckChannel(struct rt_rtmp_adapter *pAd, u8 CentralChannel, u8 Channel); -BOOLEAN RTMPCheckHt(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckHt(struct rt_rtmp_adapter *pAd, u8 Wcid, - IN OUT HT_CAPABILITY_IE * pHtCapability, - IN OUT ADD_HT_INFO_IE * pAddHtInfo); + struct rt_ht_capability_ie * pHtCapability, + struct rt_add_ht_info_ie * pAddHtInfo); void StaQuickResponeForRateUpExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void RTMPUpdateMlmeRate(IN PRTMP_ADAPTER pAd); +void RTMPUpdateMlmeRate(struct rt_rtmp_adapter *pAd); -char RTMPMaxRssi(IN PRTMP_ADAPTER pAd, +char RTMPMaxRssi(struct rt_rtmp_adapter *pAd, char Rssi0, char Rssi1, char Rssi2); #ifdef RT30xx -void AsicSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant); +void AsicSetRxAnt(struct rt_rtmp_adapter *pAd, u8 Ant); -void RTMPFilterCalibration(IN PRTMP_ADAPTER pAd); +void RTMPFilterCalibration(struct rt_rtmp_adapter *pAd); #ifdef RTMP_EFUSE_SUPPORT /*2008/09/11:KH add to support efuse<-- */ -int set_eFuseGetFreeBlockCount_Proc(IN PRTMP_ADAPTER pAd, char *arg); +int set_eFuseGetFreeBlockCount_Proc(struct rt_rtmp_adapter *pAd, char *arg); -int set_eFusedump_Proc(IN PRTMP_ADAPTER pAd, char *arg); +int set_eFusedump_Proc(struct rt_rtmp_adapter *pAd, char *arg); -void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd, +void eFusePhysicalReadRegisters(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Length, u16 * pData); -int RtmpEfuseSupportCheck(IN RTMP_ADAPTER * pAd); +int RtmpEfuseSupportCheck(struct rt_rtmp_adapter *pAd); -void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock); +void eFuseGetFreeBlockCount(struct rt_rtmp_adapter *pAd, u32 *EfuseFreeBlock); -int eFuse_init(IN PRTMP_ADAPTER pAd); +int eFuse_init(struct rt_rtmp_adapter *pAd); /*2008/09/11:KH add to support efuse--> */ #endif /* RTMP_EFUSE_SUPPORT // */ /* add by johnli, RF power sequence setup */ -void RT30xxLoadRFNormalModeSetup(IN PRTMP_ADAPTER pAd); +void RT30xxLoadRFNormalModeSetup(struct rt_rtmp_adapter *pAd); -void RT30xxLoadRFSleepModeSetup(IN PRTMP_ADAPTER pAd); +void RT30xxLoadRFSleepModeSetup(struct rt_rtmp_adapter *pAd); -void RT30xxReverseRFSleepModeSetup(IN PRTMP_ADAPTER pAd); +void RT30xxReverseRFSleepModeSetup(struct rt_rtmp_adapter *pAd); /* end johnli */ #ifdef RT3070 -void NICInitRT3070RFRegisters(IN RTMP_ADAPTER * pAd); +void NICInitRT3070RFRegisters(struct rt_rtmp_adapter *pAd); #endif /* RT3070 // */ #ifdef RT3090 -void NICInitRT3090RFRegisters(IN RTMP_ADAPTER * pAd); +void NICInitRT3090RFRegisters(struct rt_rtmp_adapter *pAd); #endif /* RT3090 // */ -void RT30xxHaltAction(IN PRTMP_ADAPTER pAd); +void RT30xxHaltAction(struct rt_rtmp_adapter *pAd); -void RT30xxSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant); +void RT30xxSetRxAnt(struct rt_rtmp_adapter *pAd, u8 Ant); #endif /* RT30xx // */ -void AsicEvaluateRxAnt(IN PRTMP_ADAPTER pAd); +void AsicEvaluateRxAnt(struct rt_rtmp_adapter *pAd); void AsicRxAntEvalTimeout(void *SystemSpecific1, void *FunctionContext, @@ -3307,88 +3307,88 @@ void APSDPeriodicExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry); +BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry); -u8 RTMPStaFixedTxMode(IN PRTMP_ADAPTER pAd, IN PMAC_TABLE_ENTRY pEntry); +u8 RTMPStaFixedTxMode(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry); -void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, PMAC_TABLE_ENTRY pEntry); +void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, struct rt_mac_table_entry *pEntry); -BOOLEAN RTMPAutoRateSwitchCheck(IN PRTMP_ADAPTER pAd); +BOOLEAN RTMPAutoRateSwitchCheck(struct rt_rtmp_adapter *pAd); -int MlmeInit(IN PRTMP_ADAPTER pAd); +int MlmeInit(struct rt_rtmp_adapter *pAd); -void MlmeHandler(IN PRTMP_ADAPTER pAd); +void MlmeHandler(struct rt_rtmp_adapter *pAd); -void MlmeHalt(IN PRTMP_ADAPTER pAd); +void MlmeHalt(struct rt_rtmp_adapter *pAd); -void MlmeResetRalinkCounters(IN PRTMP_ADAPTER pAd); +void MlmeResetRalinkCounters(struct rt_rtmp_adapter *pAd); -void BuildChannelList(IN PRTMP_ADAPTER pAd); +void BuildChannelList(struct rt_rtmp_adapter *pAd); -u8 FirstChannel(IN PRTMP_ADAPTER pAd); +u8 FirstChannel(struct rt_rtmp_adapter *pAd); -u8 NextChannel(IN PRTMP_ADAPTER pAd, u8 channel); +u8 NextChannel(struct rt_rtmp_adapter *pAd, u8 channel); -void ChangeToCellPowerLimit(IN PRTMP_ADAPTER pAd, +void ChangeToCellPowerLimit(struct rt_rtmp_adapter *pAd, u8 AironetCellPowerLimit); /* */ /* Prototypes of function definition in rtmp_tkip.c */ /* */ -void RTMPInitTkipEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitTkipEngine(struct rt_rtmp_adapter *pAd, u8 *pTKey, u8 KeyId, u8 *pTA, u8 *pMICKey, u8 *pTSC, unsigned long *pIV16, unsigned long *pIV32); -void RTMPInitMICEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitMICEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 *pDA, u8 *pSA, u8 UserPriority, u8 *pMICKey); -BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPTkipCompareMICValue(struct rt_rtmp_adapter *pAd, u8 *pSrc, u8 *pDA, u8 *pSA, u8 *pMICKey, u8 UserPriority, u32 Len); -void RTMPCalculateMICValue(IN PRTMP_ADAPTER pAd, +void RTMPCalculateMICValue(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pEncap, - IN PCIPHER_KEY pKey, u8 apidx); + struct rt_cipher_key *pKey, u8 apidx); -void RTMPTkipAppendByte(IN PTKIP_KEY_INFO pTkip, u8 uChar); +void RTMPTkipAppendByte(struct rt_tkip_key_info *pTkip, u8 uChar); -void RTMPTkipAppend(IN PTKIP_KEY_INFO pTkip, u8 *pSrc, u32 nBytes); +void RTMPTkipAppend(struct rt_tkip_key_info *pTkip, u8 *pSrc, u32 nBytes); -void RTMPTkipGetMIC(IN PTKIP_KEY_INFO pTkip); +void RTMPTkipGetMIC(struct rt_tkip_key_info *pTkip); -BOOLEAN RTMPSoftDecryptTKIP(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptTKIP(struct rt_rtmp_adapter *pAd, u8 *pData, unsigned long DataByteCnt, - u8 UserPriority, IN PCIPHER_KEY pWpaKey); + u8 UserPriority, struct rt_cipher_key *pWpaKey); -BOOLEAN RTMPSoftDecryptAES(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptAES(struct rt_rtmp_adapter *pAd, u8 *pData, - unsigned long DataByteCnt, IN PCIPHER_KEY pWpaKey); + unsigned long DataByteCnt, struct rt_cipher_key *pWpaKey); /* */ /* Prototypes of function definition in cmm_info.c */ /* */ -int RT_CfgSetCountryRegion(IN PRTMP_ADAPTER pAd, char *arg, int band); +int RT_CfgSetCountryRegion(struct rt_rtmp_adapter *pAd, char *arg, int band); -int RT_CfgSetWirelessMode(IN PRTMP_ADAPTER pAd, char *arg); +int RT_CfgSetWirelessMode(struct rt_rtmp_adapter *pAd, char *arg); -int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg); +int RT_CfgSetShortSlot(struct rt_rtmp_adapter *pAd, char *arg); -int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd, +int RT_CfgSetWepKey(struct rt_rtmp_adapter *pAd, char *keyString, - IN CIPHER_KEY * pSharedKey, int keyIdx); + struct rt_cipher_key *pSharedKey, int keyIdx); -int RT_CfgSetWPAPSKKey(IN RTMP_ADAPTER * pAd, +int RT_CfgSetWPAPSKKey(struct rt_rtmp_adapter *pAd, char *keyString, u8 * pHashStr, int hashStrLen, u8 *pPMKBuf); @@ -3396,55 +3396,55 @@ int RT_CfgSetWPAPSKKey(IN RTMP_ADAPTER * pAd, /* */ /* Prototypes of function definition in cmm_info.c */ /* */ -void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd); +void RTMPWPARemoveAllKeys(struct rt_rtmp_adapter *pAd); -void RTMPSetPhyMode(IN PRTMP_ADAPTER pAd, unsigned long phymode); +void RTMPSetPhyMode(struct rt_rtmp_adapter *pAd, unsigned long phymode); -void RTMPUpdateHTIE(IN RT_HT_CAPABILITY * pRtHt, +void RTMPUpdateHTIE(struct rt_ht_capability *pRtHt, u8 * pMcsSet, - OUT HT_CAPABILITY_IE * pHtCapability, - OUT ADD_HT_INFO_IE * pAddHtInfo); + struct rt_ht_capability_ie * pHtCapability, + struct rt_add_ht_info_ie * pAddHtInfo); -void RTMPAddWcidAttributeEntry(IN PRTMP_ADAPTER pAd, +void RTMPAddWcidAttributeEntry(struct rt_rtmp_adapter *pAd, u8 BssIdx, u8 KeyIdx, - u8 CipherAlg, IN MAC_TABLE_ENTRY * pEntry); + u8 CipherAlg, struct rt_mac_table_entry *pEntry); char *GetEncryptType(char enc); char *GetAuthMode(char auth); -void RTMPSetHT(IN PRTMP_ADAPTER pAd, IN OID_SET_HT_PHYMODE * pHTPhyMode); +void RTMPSetHT(struct rt_rtmp_adapter *pAd, struct rt_oid_set_ht_phymode *pHTPhyMode); -void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx); +void RTMPSetIndividualHT(struct rt_rtmp_adapter *pAd, u8 apidx); -void RTMPSendWirelessEvent(IN PRTMP_ADAPTER pAd, +void RTMPSendWirelessEvent(struct rt_rtmp_adapter *pAd, u16 Event_flag, u8 *pAddr, u8 BssIdx, char Rssi); -char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber); +char ConvertToRssi(struct rt_rtmp_adapter *pAd, char Rssi, u8 RssiNumber); /*=================================== Function prototype in cmm_wpa.c =================================== */ -void RTMPToWirelessSta(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +void RTMPToWirelessSta(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 *pHeader802_3, u32 HdrLen, u8 *pData, u32 DataLen, IN BOOLEAN bClearFrame); -void WpaDerivePTK(IN PRTMP_ADAPTER pAd, +void WpaDerivePTK(struct rt_rtmp_adapter *pAd, u8 * PMK, u8 * ANonce, u8 * AA, u8 * SNonce, u8 * SA, u8 * output, u32 len); -void GenRandom(IN PRTMP_ADAPTER pAd, u8 * macAddr, u8 * random); +void GenRandom(struct rt_rtmp_adapter *pAd, u8 * macAddr, u8 * random); -BOOLEAN RTMPCheckWPAframe(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +BOOLEAN RTMPCheckWPAframe(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 *pData, unsigned long DataByteCount, u8 FromWhichBSSID); @@ -3452,14 +3452,14 @@ void AES_GTK_KEY_UNWRAP(u8 * key, u8 * plaintext, u32 c_len, u8 * ciphertext); -BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPParseEapolKeyData(struct rt_rtmp_adapter *pAd, u8 *pKeyData, u8 KeyDataLen, u8 GroupKeyIndex, u8 MsgType, - IN BOOLEAN bWPA2, IN MAC_TABLE_ENTRY * pEntry); + IN BOOLEAN bWPA2, struct rt_mac_table_entry *pEntry); -void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, +void ConstructEapolMsg(struct rt_mac_table_entry *pEntry, u8 GroupKeyWepStatus, u8 MsgType, u8 DefaultKeyIdx, @@ -3467,53 +3467,53 @@ void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, u8 * TxRSC, u8 * GTK, u8 * RSNIE, - u8 RSNIE_Len, OUT PEAPOL_PACKET pMsg); + u8 RSNIE_Len, struct rt_eapol_packet * pMsg); -int RTMPSoftDecryptBroadCastData(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, +int RTMPSoftDecryptBroadCastData(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, IN NDIS_802_11_ENCRYPTION_STATUS GroupCipher, - IN PCIPHER_KEY pShard_key); + struct rt_cipher_key *pShard_key); -void RTMPMakeRSNIE(IN PRTMP_ADAPTER pAd, +void RTMPMakeRSNIE(struct rt_rtmp_adapter *pAd, u32 AuthMode, u32 WepStatus, u8 apidx); /* */ /* function prototype in ap_wpa.c */ /* */ -void RTMPGetTxTscFromAsic(IN PRTMP_ADAPTER pAd, +void RTMPGetTxTscFromAsic(struct rt_rtmp_adapter *pAd, u8 apidx, u8 *pTxTsc); -void APInstallPairwiseKey(PRTMP_ADAPTER pAd, PMAC_TABLE_ENTRY pEntry); +void APInstallPairwiseKey(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry); -u32 APValidateRSNIE(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +u32 APValidateRSNIE(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 *pRsnIe, u8 rsnie_len); -void HandleCounterMeasure(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry); +void HandleCounterMeasure(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry); -void WPAStart4WayHS(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, unsigned long TimeInterval); +void WPAStart4WayHS(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, unsigned long TimeInterval); -void WPAStart2WayGroupHS(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry); +void WPAStart2WayGroupHS(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry); -void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem); +void PeerPairMsg1Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem); -void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem); +void PeerPairMsg2Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem); -void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem); +void PeerPairMsg3Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem); -void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem); +void PeerPairMsg4Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem); -void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, IN MLME_QUEUE_ELEM * Elem); +void PeerGroupMsg1Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem); -void PeerGroupMsg2Action(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +void PeerGroupMsg2Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, void * Msg, u32 MsgLen); void WpaDeriveGTK(u8 * PMK, @@ -3530,7 +3530,7 @@ void AES_GTK_KEY_WRAP(u8 * key, void RTMP_SetPeriodicTimer(struct timer_list * pTimer, IN unsigned long timeout); -void RTMP_OS_Init_Timer(IN PRTMP_ADAPTER pAd, +void RTMP_OS_Init_Timer(struct rt_rtmp_adapter *pAd, struct timer_list * pTimer, IN TIMER_FUNCTION function, void *data); @@ -3543,171 +3543,171 @@ void RTMP_OS_Mod_Timer(struct timer_list * pTimer, void RTMP_OS_Del_Timer(struct timer_list * pTimer, OUT BOOLEAN * pCancelled); -void RTMP_OS_Release_Packet(IN PRTMP_ADAPTER pAd, IN PQUEUE_ENTRY pEntry); +void RTMP_OS_Release_Packet(struct rt_rtmp_adapter *pAd, struct rt_queue_entry *pEntry); void RTMPusecDelay(unsigned long usec); -int os_alloc_mem(IN RTMP_ADAPTER * pAd, +int os_alloc_mem(struct rt_rtmp_adapter *pAd, u8 ** mem, unsigned long size); -int os_free_mem(IN PRTMP_ADAPTER pAd, void *mem); +int os_free_mem(struct rt_rtmp_adapter *pAd, void *mem); -void RTMP_AllocateSharedMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateSharedMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, dma_addr_t *PhysicalAddress); -void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd); +void RTMPFreeTxRxRingMemory(struct rt_rtmp_adapter *pAd); int AdapterBlockAllocateMemory(void *handle, void ** ppAd); -void RTMP_AllocateTxDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateTxDescMemory(struct rt_rtmp_adapter *pAd, u32 Index, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, dma_addr_t *PhysicalAddress); -void RTMP_AllocateFirstTxBuffer(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateFirstTxBuffer(struct rt_rtmp_adapter *pAd, u32 Index, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, dma_addr_t *PhysicalAddress); -void RTMP_FreeFirstTxBuffer(IN PRTMP_ADAPTER pAd, +void RTMP_FreeFirstTxBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void *VirtualAddress, dma_addr_t PhysicalAddress); -void RTMP_AllocateMgmtDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateMgmtDescMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, dma_addr_t *PhysicalAddress); -void RTMP_AllocateRxDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_AllocateRxDescMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, dma_addr_t *PhysicalAddress); -void RTMP_FreeDescMemory(IN PRTMP_ADAPTER pAd, +void RTMP_FreeDescMemory(struct rt_rtmp_adapter *pAd, unsigned long Length, void *VirtualAddress, dma_addr_t PhysicalAddress); -void *RtmpOSNetPktAlloc(IN RTMP_ADAPTER * pAd, IN int size); +void *RtmpOSNetPktAlloc(struct rt_rtmp_adapter *pAd, IN int size); -void *RTMP_AllocateRxPacketBuffer(IN PRTMP_ADAPTER pAd, +void *RTMP_AllocateRxPacketBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress, OUT dma_addr_t * PhysicalAddress); -void *RTMP_AllocateTxPacketBuffer(IN PRTMP_ADAPTER pAd, +void *RTMP_AllocateTxPacketBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length, IN BOOLEAN Cached, void ** VirtualAddress); -void *RTMP_AllocateFragPacketBuffer(IN PRTMP_ADAPTER pAd, +void *RTMP_AllocateFragPacketBuffer(struct rt_rtmp_adapter *pAd, unsigned long Length); void RTMP_QueryPacketInfo(void *pPacket, - OUT PACKET_INFO * pPacketInfo, + struct rt_packet_info *pPacketInfo, u8 ** pSrcBufVA, u32 * pSrcBufLen); void RTMP_QueryNextPacketInfo(void ** ppPacket, - OUT PACKET_INFO * pPacketInfo, + struct rt_packet_info *pPacketInfo, u8 ** pSrcBufVA, u32 * pSrcBufLen); -BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk); +BOOLEAN RTMP_FillTxBlkInfo(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk); -PRTMP_SCATTER_GATHER_LIST -rt_get_sg_list_from_packet(void *pPacket, RTMP_SCATTER_GATHER_LIST * sg); +struct rt_rtmp_sg_list * +rt_get_sg_list_from_packet(void *pPacket, struct rt_rtmp_sg_list *sg); -void announce_802_3_packet(IN PRTMP_ADAPTER pAd, void *pPacket); +void announce_802_3_packet(struct rt_rtmp_adapter *pAd, void *pPacket); -u32 BA_Reorder_AMSDU_Annnounce(IN PRTMP_ADAPTER pAd, void *pPacket); +u32 BA_Reorder_AMSDU_Annnounce(struct rt_rtmp_adapter *pAd, void *pPacket); -struct net_device *get_netdev_from_bssid(IN PRTMP_ADAPTER pAd, u8 FromWhichBSSID); +struct net_device *get_netdev_from_bssid(struct rt_rtmp_adapter *pAd, u8 FromWhichBSSID); -void *duplicate_pkt(IN PRTMP_ADAPTER pAd, +void *duplicate_pkt(struct rt_rtmp_adapter *pAd, u8 *pHeader802_3, u32 HdrLen, u8 *pData, unsigned long DataSize, u8 FromWhichBSSID); -void *duplicate_pkt_with_TKIP_MIC(IN PRTMP_ADAPTER pAd, +void *duplicate_pkt_with_TKIP_MIC(struct rt_rtmp_adapter *pAd, void *pOldPkt); -void ba_flush_reordering_timeout_mpdus(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, +void ba_flush_reordering_timeout_mpdus(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, unsigned long Now32); -void BAOriSessionSetUp(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, +void BAOriSessionSetUp(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 TID, u16 TimeOut, unsigned long DelayTime, IN BOOLEAN isForced); -void BASessionTearDownALL(IN OUT PRTMP_ADAPTER pAd, u8 Wcid); +void BASessionTearDownALL(struct rt_rtmp_adapter *pAd, u8 Wcid); BOOLEAN OS_Need_Clone_Packet(void); -void build_tx_packet(IN PRTMP_ADAPTER pAd, +void build_tx_packet(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pFrame, unsigned long FrameLen); -void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, +void BAOriSessionTearDown(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 TID, IN BOOLEAN bPassive, IN BOOLEAN bForceSend); -void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, +void BARecSessionTearDown(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 TID, IN BOOLEAN bPassive); -BOOLEAN ba_reordering_resource_init(PRTMP_ADAPTER pAd, int num); -void ba_reordering_resource_release(PRTMP_ADAPTER pAd); +BOOLEAN ba_reordering_resource_init(struct rt_rtmp_adapter *pAd, int num); +void ba_reordering_resource_release(struct rt_rtmp_adapter *pAd); char *rstrtok(char *s, IN const char *ct); /*//////// common ioctl functions ////////// */ -int SetCommonHT(IN PRTMP_ADAPTER pAd); +int SetCommonHT(struct rt_rtmp_adapter *pAd); -int WpaCheckEapCode(IN PRTMP_ADAPTER pAd, +int WpaCheckEapCode(struct rt_rtmp_adapter *pAd, u8 *pFrame, u16 FrameLen, u16 OffSet); -void WpaSendMicFailureToWpaSupplicant(IN PRTMP_ADAPTER pAd, +void WpaSendMicFailureToWpaSupplicant(struct rt_rtmp_adapter *pAd, IN BOOLEAN bUnicast); -int wext_notify_event_assoc(IN RTMP_ADAPTER * pAd); +int wext_notify_event_assoc(struct rt_rtmp_adapter *pAd); -BOOLEAN STARxDoneInterruptHandle(IN PRTMP_ADAPTER pAd, IN BOOLEAN argc); +BOOLEAN STARxDoneInterruptHandle(struct rt_rtmp_adapter *pAd, IN BOOLEAN argc); /* AMPDU packet indication */ -void Indicate_AMPDU_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void Indicate_AMPDU_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); /* AMSDU packet indication */ -void Indicate_AMSDU_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void Indicate_AMSDU_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); /* Normal legacy Rx packet indication */ -void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void Indicate_Legacy_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); -void Indicate_EAPOL_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void Indicate_EAPOL_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); -void update_os_packet_info(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void update_os_packet_info(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); -void wlan_802_11_to_802_3_packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, +void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 *pHeader802_3, u8 FromWhichBSSID); @@ -3719,7 +3719,7 @@ void wlan_802_11_to_802_3_packet(IN PRTMP_ADAPTER pAd, if (RX_BLK_TEST_FLAG(_pRxBlk, fRX_MESH)) \ { \ _pDA = _pRxBlk->pHeader->Addr3; \ - _pSA = (u8 *)_pRxBlk->pHeader + sizeof(HEADER_802_11); \ + _pSA = (u8 *)_pRxBlk->pHeader + sizeof(struct rt_header_802_11); \ } \ else \ { \ @@ -3742,7 +3742,7 @@ void wlan_802_11_to_802_3_packet(IN PRTMP_ADAPTER pAd, _pRxBlk->DataSize, _pRemovedLLCSNAP); \ } -void Sta_Announce_or_Forward_802_3_Packet(IN PRTMP_ADAPTER pAd, +void Sta_Announce_or_Forward_802_3_Packet(struct rt_rtmp_adapter *pAd, void *pPacket, u8 FromWhichBSSID); @@ -3750,30 +3750,30 @@ void Sta_Announce_or_Forward_802_3_Packet(IN PRTMP_ADAPTER pAd, Sta_Announce_or_Forward_802_3_Packet(_pAd, _pPacket, _FromWhichBSS); /*announce_802_3_packet(_pAd, _pPacket); */ -void *DuplicatePacket(IN PRTMP_ADAPTER pAd, +void *DuplicatePacket(struct rt_rtmp_adapter *pAd, void *pPacket, u8 FromWhichBSSID); -void *ClonePacket(IN PRTMP_ADAPTER pAd, +void *ClonePacket(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pData, unsigned long DataSize); /* Normal, AMPDU or AMSDU */ -void CmmRxnonRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void CmmRxnonRalinkFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); -void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID); +void CmmRxRalinkFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID); -void Update_Rssi_Sample(IN PRTMP_ADAPTER pAd, - IN RSSI_SAMPLE * pRssi, IN PRXWI_STRUC pRxWI); +void Update_Rssi_Sample(struct rt_rtmp_adapter *pAd, + struct rt_rssi_sample *pRssi, struct rt_rxwi * pRxWI); -void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, +void *GetPacketFromRxRing(struct rt_rtmp_adapter *pAd, OUT PRT28XX_RXD_STRUC pSaveRxD, OUT BOOLEAN * pbReschedule, IN u32 * pRxPending); -void *RTMPDeFragmentDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk); +void *RTMPDeFragmentDataFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk); enum { DIDmsg_lnxind_wlansniffrm = 0x00000044, @@ -3797,32 +3797,32 @@ enum { }; /* Definition from madwifi */ -typedef struct { +struct rt_p80211item_uint32 { u32 did; u16 status; u16 len; u32 data; -} p80211item_uint32_t; +}; -typedef struct { +struct rt_wlan_ng_prism2_header { u32 msgcode; u32 msglen; #define WLAN_DEVNAMELEN_MAX 16 u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t hosttime; - p80211item_uint32_t mactime; - p80211item_uint32_t channel; - p80211item_uint32_t rssi; - p80211item_uint32_t sq; - p80211item_uint32_t signal; - p80211item_uint32_t noise; - p80211item_uint32_t rate; - p80211item_uint32_t istx; - p80211item_uint32_t frmlen; -} wlan_ng_prism2_header; + struct rt_p80211item_uint32 hosttime; + struct rt_p80211item_uint32 mactime; + struct rt_p80211item_uint32 channel; + struct rt_p80211item_uint32 rssi; + struct rt_p80211item_uint32 sq; + struct rt_p80211item_uint32 signal; + struct rt_p80211item_uint32 noise; + struct rt_p80211item_uint32 rate; + struct rt_p80211item_uint32 istx; + struct rt_p80211item_uint32 frmlen; +}; /* The radio capture header precedes the 802.11 header. */ -typedef struct PACKED _ieee80211_radiotap_header { +struct PACKED rt_ieee80211_radiotap_header { u8 it_version; /* Version 0. Only increases * for drastic changes, * introduction of compatible @@ -3841,7 +3841,7 @@ typedef struct PACKED _ieee80211_radiotap_header { * Additional extensions are made * by setting bit 31. */ -} ieee80211_radiotap_header; +}; enum ieee80211_radiotap_type { IEEE80211_RADIOTAP_TSFT = 0, @@ -3866,111 +3866,111 @@ enum ieee80211_radiotap_type { (1 << IEEE80211_RADIOTAP_RATE) | \ 0) -typedef struct _wlan_radiotap_header { - ieee80211_radiotap_header wt_ihdr; +struct rt_wlan_radiotap_header { + struct rt_ieee80211_radiotap_header wt_ihdr; long long wt_tsft; u8 wt_flags; u8 wt_rate; -} wlan_radiotap_header; +}; /* Definition from madwifi */ -void send_monitor_packets(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk); +void send_monitor_packets(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk); -void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates); +void RTMPSetDesiredRates(struct rt_rtmp_adapter *pAdapter, long Rates); -int Set_FixedTxMode_Proc(IN PRTMP_ADAPTER pAd, char *arg); +int Set_FixedTxMode_Proc(struct rt_rtmp_adapter *pAd, char *arg); BOOLEAN RT28XXChipsetCheck(IN void *_dev_p); -void RT28XXDMADisable(IN RTMP_ADAPTER * pAd); +void RT28XXDMADisable(struct rt_rtmp_adapter *pAd); -void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd); +void RT28XXDMAEnable(struct rt_rtmp_adapter *pAd); -void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, +void RT28xx_UpdateBeaconToAsic(struct rt_rtmp_adapter *pAd, int apidx, unsigned long BeaconLen, unsigned long UpdatePos); -int rt28xx_init(IN PRTMP_ADAPTER pAd, +int rt28xx_init(struct rt_rtmp_adapter *pAd, char *pDefaultMac, char *pHostName); -int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd); +int RtmpNetTaskInit(struct rt_rtmp_adapter *pAd); -void RtmpNetTaskExit(IN PRTMP_ADAPTER pAd); +void RtmpNetTaskExit(struct rt_rtmp_adapter *pAd); -int RtmpMgmtTaskInit(IN RTMP_ADAPTER * pAd); +int RtmpMgmtTaskInit(struct rt_rtmp_adapter *pAd); -void RtmpMgmtTaskExit(IN RTMP_ADAPTER * pAd); +void RtmpMgmtTaskExit(struct rt_rtmp_adapter *pAd); void tbtt_tasklet(unsigned long data); -struct net_device *RtmpPhyNetDevInit(IN RTMP_ADAPTER * pAd, - IN RTMP_OS_NETDEV_OP_HOOK * pNetHook); +struct net_device *RtmpPhyNetDevInit(struct rt_rtmp_adapter *pAd, + struct rt_rtmp_os_netdev_op_hook *pNetHook); -BOOLEAN RtmpPhyNetDevExit(IN RTMP_ADAPTER * pAd, struct net_device *net_dev); +BOOLEAN RtmpPhyNetDevExit(struct rt_rtmp_adapter *pAd, struct net_device *net_dev); -int RtmpRaDevCtrlInit(IN RTMP_ADAPTER * pAd, IN RTMP_INF_TYPE infType); +int RtmpRaDevCtrlInit(struct rt_rtmp_adapter *pAd, IN RTMP_INF_TYPE infType); -BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd); +BOOLEAN RtmpRaDevCtrlExit(struct rt_rtmp_adapter *pAd); #ifdef RTMP_MAC_PCI /* */ /* Function Prototype in cmm_data_pci.c */ /* */ -u16 RtmpPCI_WriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber); -u16 RtmpPCI_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteSingleTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber); -u16 RtmpPCI_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteMultiTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 frameNum, u16 * FreeNumber); -u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteFragTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 fragNum, u16 * FreeNumber); -u16 RtmpPCI_WriteSubTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteSubTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber); -void RtmpPCI_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +void RtmpPCI_FinalWriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u16 totalMPDUSize, u16 FirstTxIdx); -void RtmpPCIDataLastTxIdx(IN PRTMP_ADAPTER pAd, +void RtmpPCIDataLastTxIdx(struct rt_rtmp_adapter *pAd, u8 QueIdx, u16 LastTxIdx); -void RtmpPCIDataKickOut(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, u8 QueIdx); +void RtmpPCIDataKickOut(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 QueIdx); -int RtmpPCIMgmtKickOut(IN RTMP_ADAPTER * pAd, +int RtmpPCIMgmtKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket, u8 *pSrcBufVA, u32 SrcBufLen); -int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHeader, - IN PRXWI_STRUC pRxWI, IN PRT28XX_RXD_STRUC pRxD); +int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHeader, + struct rt_rxwi * pRxWI, IN PRT28XX_RXD_STRUC pRxD); -BOOLEAN RT28xxPciAsicRadioOff(IN PRTMP_ADAPTER pAd, +BOOLEAN RT28xxPciAsicRadioOff(struct rt_rtmp_adapter *pAd, u8 Level, u16 TbttNumToNextWakeUp); -BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level); +BOOLEAN RT28xxPciAsicRadioOn(struct rt_rtmp_adapter *pAd, u8 Level); -void RTMPInitPCIeLinkCtrlValue(IN PRTMP_ADAPTER pAd); +void RTMPInitPCIeLinkCtrlValue(struct rt_rtmp_adapter *pAd); -void RTMPFindHostPCIDev(IN PRTMP_ADAPTER pAd); +void RTMPFindHostPCIDev(struct rt_rtmp_adapter *pAd); -void RTMPPCIeLinkCtrlValueRestore(IN PRTMP_ADAPTER pAd, u8 Level); +void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level); -void RTMPPCIeLinkCtrlSetting(IN PRTMP_ADAPTER pAd, u16 Max); +void RTMPPCIeLinkCtrlSetting(struct rt_rtmp_adapter *pAd, u16 Max); -void RTMPrt3xSetPCIePowerLinkCtrl(IN PRTMP_ADAPTER pAd); +void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd); void PsPollWakeExec(void *SystemSpecific1, void *FunctionContext, @@ -3980,83 +3980,83 @@ void RadioOnExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3); -void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx); +void RT28xxPciStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx); -void RT28xxPciStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void RT28xxPciStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp); -void RT28xxPciMlmeRadioOn(IN PRTMP_ADAPTER pAd); +void RT28xxPciMlmeRadioOn(struct rt_rtmp_adapter *pAd); -void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd); +void RT28xxPciMlmeRadioOFF(struct rt_rtmp_adapter *pAd); #endif /* RTMP_MAC_PCI // */ #ifdef RTMP_MAC_USB /* */ /* Function Prototype in rtusb_bulk.c */ /* */ -void RTUSBInitTxDesc(IN PRTMP_ADAPTER pAd, - IN PTX_CONTEXT pTxContext, +void RTUSBInitTxDesc(struct rt_rtmp_adapter *pAd, + struct rt_tx_context *pTxContext, u8 BulkOutPipeId, IN usb_complete_t Func); -void RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd, - IN PHT_TX_CONTEXT pTxContext, +void RTUSBInitHTTxDesc(struct rt_rtmp_adapter *pAd, + struct rt_ht_tx_context *pTxContext, u8 BulkOutPipeId, unsigned long BulkOutSize, IN usb_complete_t Func); -void RTUSBInitRxDesc(IN PRTMP_ADAPTER pAd, IN PRX_CONTEXT pRxContext); +void RTUSBInitRxDesc(struct rt_rtmp_adapter *pAd, struct rt_rx_context *pRxContext); -void RTUSBCleanUpDataBulkOutQueue(IN PRTMP_ADAPTER pAd); +void RTUSBCleanUpDataBulkOutQueue(struct rt_rtmp_adapter *pAd); -void RTUSBCancelPendingBulkOutIRP(IN PRTMP_ADAPTER pAd); +void RTUSBCancelPendingBulkOutIRP(struct rt_rtmp_adapter *pAd); -void RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd, +void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd, u8 BulkOutPipeId, u8 Index); -void RTUSBBulkOutNullFrame(IN PRTMP_ADAPTER pAd); +void RTUSBBulkOutNullFrame(struct rt_rtmp_adapter *pAd); -void RTUSBBulkOutRTSFrame(IN PRTMP_ADAPTER pAd); +void RTUSBBulkOutRTSFrame(struct rt_rtmp_adapter *pAd); -void RTUSBCancelPendingBulkInIRP(IN PRTMP_ADAPTER pAd); +void RTUSBCancelPendingBulkInIRP(struct rt_rtmp_adapter *pAd); -void RTUSBCancelPendingIRPs(IN PRTMP_ADAPTER pAd); +void RTUSBCancelPendingIRPs(struct rt_rtmp_adapter *pAd); -void RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, u8 Index); +void RTUSBBulkOutMLMEPacket(struct rt_rtmp_adapter *pAd, u8 Index); -void RTUSBBulkOutPsPoll(IN PRTMP_ADAPTER pAd); +void RTUSBBulkOutPsPoll(struct rt_rtmp_adapter *pAd); -void RTUSBCleanUpMLMEBulkOutQueue(IN PRTMP_ADAPTER pAd); +void RTUSBCleanUpMLMEBulkOutQueue(struct rt_rtmp_adapter *pAd); -void RTUSBKickBulkOut(IN PRTMP_ADAPTER pAd); +void RTUSBKickBulkOut(struct rt_rtmp_adapter *pAd); -void RTUSBBulkReceive(IN PRTMP_ADAPTER pAd); +void RTUSBBulkReceive(struct rt_rtmp_adapter *pAd); -void DoBulkIn(IN RTMP_ADAPTER * pAd); +void DoBulkIn(struct rt_rtmp_adapter *pAd); -void RTUSBInitRxDesc(IN PRTMP_ADAPTER pAd, IN PRX_CONTEXT pRxContext); +void RTUSBInitRxDesc(struct rt_rtmp_adapter *pAd, struct rt_rx_context *pRxContext); void RTUSBBulkRxHandle(IN unsigned long data); /* */ /* Function Prototype in rtusb_io.c */ /* */ -int RTUSBMultiRead(IN PRTMP_ADAPTER pAd, +int RTUSBMultiRead(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length); -int RTUSBMultiWrite(IN PRTMP_ADAPTER pAd, +int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length); -int RTUSBMultiWrite_OneByte(IN PRTMP_ADAPTER pAd, +int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData); -int RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd, +int RTUSBReadBBPRegister(struct rt_rtmp_adapter *pAd, u8 Id, u8 *pValue); -int RTUSBWriteBBPRegister(IN PRTMP_ADAPTER pAd, +int RTUSBWriteBBPRegister(struct rt_rtmp_adapter *pAd, u8 Id, u8 Value); -int RTUSBWriteRFRegister(IN PRTMP_ADAPTER pAd, u32 Value); +int RTUSBWriteRFRegister(struct rt_rtmp_adapter *pAd, u32 Value); -int RTUSB_VendorRequest(IN PRTMP_ADAPTER pAd, +int RTUSB_VendorRequest(struct rt_rtmp_adapter *pAd, u32 TransferFlags, u8 ReservedBits, u8 Request, @@ -4065,104 +4065,104 @@ int RTUSB_VendorRequest(IN PRTMP_ADAPTER pAd, void *TransferBuffer, u32 TransferBufferLength); -int RTUSBReadEEPROM(IN PRTMP_ADAPTER pAd, +int RTUSBReadEEPROM(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length); -int RTUSBWriteEEPROM(IN PRTMP_ADAPTER pAd, +int RTUSBWriteEEPROM(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length); -void RTUSBPutToSleep(IN PRTMP_ADAPTER pAd); +void RTUSBPutToSleep(struct rt_rtmp_adapter *pAd); -int RTUSBWakeUp(IN PRTMP_ADAPTER pAd); +int RTUSBWakeUp(struct rt_rtmp_adapter *pAd); -void RTUSBInitializeCmdQ(IN PCmdQ cmdq); +void RTUSBInitializeCmdQ(struct rt_cmdq *cmdq); -int RTUSBEnqueueCmdFromNdis(IN PRTMP_ADAPTER pAd, +int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd, IN NDIS_OID Oid, IN BOOLEAN SetInformation, void *pInformationBuffer, u32 InformationBufferLength); -int RTUSBEnqueueInternalCmd(IN PRTMP_ADAPTER pAd, +int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd, IN NDIS_OID Oid, void *pInformationBuffer, u32 InformationBufferLength); -void RTUSBDequeueCmd(IN PCmdQ cmdq, OUT PCmdQElmt * pcmdqelmt); +void RTUSBDequeueCmd(struct rt_cmdq *cmdq, struct rt_cmdqelmt * * pcmdqelmt); int RTUSBCmdThread(IN void *Context); -void RTUSBBssBeaconExit(IN RTMP_ADAPTER * pAd); +void RTUSBBssBeaconExit(struct rt_rtmp_adapter *pAd); -void RTUSBBssBeaconStop(IN RTMP_ADAPTER * pAd); +void RTUSBBssBeaconStop(struct rt_rtmp_adapter *pAd); -void RTUSBBssBeaconStart(IN RTMP_ADAPTER * pAd); +void RTUSBBssBeaconStart(struct rt_rtmp_adapter *pAd); -void RTUSBBssBeaconInit(IN RTMP_ADAPTER * pAd); +void RTUSBBssBeaconInit(struct rt_rtmp_adapter *pAd); -void RTUSBWatchDog(IN RTMP_ADAPTER * pAd); +void RTUSBWatchDog(struct rt_rtmp_adapter *pAd); -int RTUSBWriteMACRegister(IN PRTMP_ADAPTER pAd, +int RTUSBWriteMACRegister(struct rt_rtmp_adapter *pAd, u16 Offset, u32 Value); -int RTUSBReadMACRegister(IN PRTMP_ADAPTER pAd, +int RTUSBReadMACRegister(struct rt_rtmp_adapter *pAd, u16 Offset, u32 *pValue); -int RTUSBSingleWrite(IN RTMP_ADAPTER * pAd, +int RTUSBSingleWrite(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Value); -int RTUSBFirmwareWrite(IN PRTMP_ADAPTER pAd, +int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd, u8 *pFwImage, unsigned long FwLen); -int RTUSBVenderReset(IN PRTMP_ADAPTER pAd); +int RTUSBVenderReset(struct rt_rtmp_adapter *pAd); -int RTUSBSetHardWareRegister(IN PRTMP_ADAPTER pAdapter, void *pBuf); +int RTUSBSetHardWareRegister(struct rt_rtmp_adapter *pAdapter, void *pBuf); -int RTUSBQueryHardWareRegister(IN PRTMP_ADAPTER pAdapter, +int RTUSBQueryHardWareRegister(struct rt_rtmp_adapter *pAdapter, void *pBuf); -void CMDHandler(IN PRTMP_ADAPTER pAd); +void CMDHandler(struct rt_rtmp_adapter *pAd); -int RTUSBWriteHWMACAddress(IN PRTMP_ADAPTER pAdapter); +int RTUSBWriteHWMACAddress(struct rt_rtmp_adapter *pAdapter); -void MacTableInitialize(IN PRTMP_ADAPTER pAd); +void MacTableInitialize(struct rt_rtmp_adapter *pAd); -void MlmeSetPsm(IN PRTMP_ADAPTER pAd, u16 psm); +void MlmeSetPsm(struct rt_rtmp_adapter *pAd, u16 psm); -int RTMPWPAAddKeyProc(IN PRTMP_ADAPTER pAd, void *pBuf); +int RTMPWPAAddKeyProc(struct rt_rtmp_adapter *pAd, void *pBuf); -void AsicRxAntEvalAction(IN PRTMP_ADAPTER pAd); +void AsicRxAntEvalAction(struct rt_rtmp_adapter *pAd); -void append_pkt(IN PRTMP_ADAPTER pAd, +void append_pkt(struct rt_rtmp_adapter *pAd, u8 *pHeader802_3, u32 HdrLen, u8 *pData, unsigned long DataSize, void ** ppPacket); -u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, +u32 deaggregate_AMSDU_announce(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pData, unsigned long DataSize); -int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHeader, - IN PRXWI_STRUC pRxWI, +int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHeader, + struct rt_rxwi * pRxWI, IN PRT28XX_RXD_STRUC pRxINFO); -void RTUSBMlmeHardTransmit(IN PRTMP_ADAPTER pAd, IN PMGMT_STRUC pMgmt); +void RTUSBMlmeHardTransmit(struct rt_rtmp_adapter *pAd, struct rt_mgmt *pMgmt); int MlmeThread(void *Context); /* */ /* Function Prototype in rtusb_data.c */ /* */ -int RTUSBFreeDescriptorRequest(IN PRTMP_ADAPTER pAd, +int RTUSBFreeDescriptorRequest(struct rt_rtmp_adapter *pAd, u8 BulkOutPipeId, u32 NumberRequired); -BOOLEAN RTUSBNeedQueueBackForAgg(IN RTMP_ADAPTER * pAd, u8 BulkOutPipeId); +BOOLEAN RTUSBNeedQueueBackForAgg(struct rt_rtmp_adapter *pAd, u8 BulkOutPipeId); -void RTMPWriteTxInfo(IN PRTMP_ADAPTER pAd, - IN PTXINFO_STRUC pTxInfo, +void RTMPWriteTxInfo(struct rt_rtmp_adapter *pAd, + struct rt_txinfo *pTxInfo, u16 USBDMApktLen, IN BOOLEAN bWiv, u8 QueueSel, u8 NextValid, u8 TxBurst); @@ -4170,39 +4170,39 @@ void RTMPWriteTxInfo(IN PRTMP_ADAPTER pAd, /* */ /* Function Prototype in cmm_data_usb.c */ /* */ -u16 RtmpUSB_WriteSubTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteSubTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber); -u16 RtmpUSB_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteSingleTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber); -u16 RtmpUSB_WriteFragTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteFragTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 fragNum, u16 * FreeNumber); -u16 RtmpUSB_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteMultiTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 frameNum, u16 * FreeNumber); -void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +void RtmpUSB_FinalWriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u16 totalMPDUSize, u16 TxIdx); -void RtmpUSBDataLastTxIdx(IN PRTMP_ADAPTER pAd, +void RtmpUSBDataLastTxIdx(struct rt_rtmp_adapter *pAd, u8 QueIdx, u16 TxIdx); -void RtmpUSBDataKickOut(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, u8 QueIdx); +void RtmpUSBDataKickOut(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 QueIdx); -int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, +int RtmpUSBMgmtKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket, u8 *pSrcBufVA, u32 SrcBufLen); -void RtmpUSBNullFrameKickOut(IN RTMP_ADAPTER * pAd, +void RtmpUSBNullFrameKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 * pNullFrame, u32 frameLen); @@ -4211,56 +4211,56 @@ void RtmpUsbStaAsicForceWakeupTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3); -void RT28xxUsbStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx); +void RT28xxUsbStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx); -void RT28xxUsbStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void RT28xxUsbStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp); -void RT28xxUsbMlmeRadioOn(IN PRTMP_ADAPTER pAd); +void RT28xxUsbMlmeRadioOn(struct rt_rtmp_adapter *pAd); -void RT28xxUsbMlmeRadioOFF(IN PRTMP_ADAPTER pAd); +void RT28xxUsbMlmeRadioOFF(struct rt_rtmp_adapter *pAd); #endif /* RTMP_MAC_USB // */ -void AsicTurnOffRFClk(IN PRTMP_ADAPTER pAd, u8 Channel); +void AsicTurnOffRFClk(struct rt_rtmp_adapter *pAd, u8 Channel); -void AsicTurnOnRFClk(IN PRTMP_ADAPTER pAd, u8 Channel); +void AsicTurnOnRFClk(struct rt_rtmp_adapter *pAd, u8 Channel); #ifdef RTMP_TIMER_TASK_SUPPORT int RtmpTimerQThread(IN void *Context); -RTMP_TIMER_TASK_ENTRY *RtmpTimerQInsert(IN RTMP_ADAPTER * pAd, - IN RALINK_TIMER_STRUCT * pTimer); +struct rt_rtmp_timer_task_entry *RtmpTimerQInsert(struct rt_rtmp_adapter *pAd, + struct rt_ralink_timer *pTimer); -BOOLEAN RtmpTimerQRemove(IN RTMP_ADAPTER * pAd, - IN RALINK_TIMER_STRUCT * pTimer); +BOOLEAN RtmpTimerQRemove(struct rt_rtmp_adapter *pAd, + struct rt_ralink_timer *pTimer); -void RtmpTimerQExit(IN RTMP_ADAPTER * pAd); +void RtmpTimerQExit(struct rt_rtmp_adapter *pAd); -void RtmpTimerQInit(IN RTMP_ADAPTER * pAd); +void RtmpTimerQInit(struct rt_rtmp_adapter *pAd); #endif /* RTMP_TIMER_TASK_SUPPORT // */ -void AsicStaBbpTuning(IN PRTMP_ADAPTER pAd); +void AsicStaBbpTuning(struct rt_rtmp_adapter *pAd); -BOOLEAN StaAddMacTableEntry(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +BOOLEAN StaAddMacTableEntry(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 MaxSupportedRateIn500Kbps, - IN HT_CAPABILITY_IE * pHtCapability, + struct rt_ht_capability_ie * pHtCapability, u8 HtCapabilityLen, - IN ADD_HT_INFO_IE * pAddHtInfo, + struct rt_add_ht_info_ie * pAddHtInfo, u8 AddHtInfoLen, u16 CapabilityInfo); -BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd, - IN PMLME_QUEUE_ELEM pElem, - IN PRALINK_TIMER_STRUCT pAuthTimer, +BOOLEAN AUTH_ReqSend(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *pElem, + struct rt_ralink_timer *pAuthTimer, char *pSMName, u16 SeqNo, u8 *pNewElement, unsigned long ElementLen); -void RTMP_IndicateMediaState(IN PRTMP_ADAPTER pAd); +void RTMP_IndicateMediaState(struct rt_rtmp_adapter *pAd); -void ReSyncBeaconTime(IN PRTMP_ADAPTER pAd); +void ReSyncBeaconTime(struct rt_rtmp_adapter *pAd); -void RTMPSetAGCInitValue(IN PRTMP_ADAPTER pAd, u8 BandWidth); +void RTMPSetAGCInitValue(struct rt_rtmp_adapter *pAd, u8 BandWidth); int rt28xx_close(struct net_device *dev); int rt28xx_open(struct net_device *dev); @@ -4270,7 +4270,7 @@ int rt28xx_open(struct net_device *dev); #define VIRTUAL_IF_NUM(__pAd) ((__pAd)->VirtualIfCnt) #ifdef LINUX -__inline int VIRTUAL_IF_UP(PRTMP_ADAPTER pAd) +__inline int VIRTUAL_IF_UP(struct rt_rtmp_adapter *pAd) { if (VIRTUAL_IF_NUM(pAd) == 0) { if (rt28xx_open(pAd->net_dev) != 0) { @@ -4284,7 +4284,7 @@ __inline int VIRTUAL_IF_UP(PRTMP_ADAPTER pAd) return 0; } -__inline void VIRTUAL_IF_DOWN(PRTMP_ADAPTER pAd) +__inline void VIRTUAL_IF_DOWN(struct rt_rtmp_adapter *pAd) { VIRTUAL_IF_DEC(pAd); if (VIRTUAL_IF_NUM(pAd) == 0) @@ -4297,7 +4297,7 @@ __inline void VIRTUAL_IF_DOWN(PRTMP_ADAPTER pAd) OS Related funciton prototype definitions. TODO: Maybe we need to move these function prototypes to other proper place. */ -int RtmpOSWrielessEventSend(IN RTMP_ADAPTER * pAd, +int RtmpOSWrielessEventSend(struct rt_rtmp_adapter *pAd, u32 eventType, int flags, u8 *pSrcMac, @@ -4306,7 +4306,7 @@ int RtmpOSWrielessEventSend(IN RTMP_ADAPTER * pAd, int RtmpOSNetDevAddrSet(struct net_device *pNetDev, u8 *pMacAddr); int RtmpOSNetDevAttach(struct net_device *pNetDev, - IN RTMP_OS_NETDEV_OP_HOOK * pDevOpHook); + struct rt_rtmp_os_netdev_op_hook *pDevOpHook); void RtmpOSNetDevClose(struct net_device *pNetDev); @@ -4320,7 +4320,7 @@ struct net_device *RtmpOSNetDevGetByName(struct net_device *pNetDev, char *pDevN void RtmpOSNetDeviceRefPut(struct net_device *pNetDev); -struct net_device *RtmpOSNetDevCreate(IN RTMP_ADAPTER * pAd, +struct net_device *RtmpOSNetDevCreate(struct rt_rtmp_adapter *pAd, int devType, int devNum, int privMemSize, char *pNamePrefix); @@ -4328,16 +4328,16 @@ struct net_device *RtmpOSNetDevCreate(IN RTMP_ADAPTER * pAd, /* Task operation related function prototypes */ -void RtmpOSTaskCustomize(IN RTMP_OS_TASK * pTask); +void RtmpOSTaskCustomize(struct rt_rtmp_os_task *pTask); -int RtmpOSTaskNotifyToExit(IN RTMP_OS_TASK * pTask); +int RtmpOSTaskNotifyToExit(struct rt_rtmp_os_task *pTask); -int RtmpOSTaskKill(IN RTMP_OS_TASK * pTask); +int RtmpOSTaskKill(struct rt_rtmp_os_task *pTask); -int RtmpOSTaskInit(IN RTMP_OS_TASK * pTask, +int RtmpOSTaskInit(struct rt_rtmp_os_task *pTask, char *pTaskName, void * pPriv); -int RtmpOSTaskAttach(IN RTMP_OS_TASK * pTask, +int RtmpOSTaskAttach(struct rt_rtmp_os_task *pTask, IN int (*fn) (void *), IN void *arg); /* diff --git a/drivers/staging/rt2860/rtmp_chip.h b/drivers/staging/rt2860/rtmp_chip.h index a089472b6d4b..32ff3504e9e8 100644 --- a/drivers/staging/rt2860/rtmp_chip.h +++ b/drivers/staging/rt2860/rtmp_chip.h @@ -161,7 +161,7 @@ * EEPROM operation related marcos */ #define RT28xx_EEPROM_READ16(_pAd, _offset, _value) \ - (_pAd)->chipOps.eeread((RTMP_ADAPTER *)(_pAd), (u16)(_offset), (u16 *)&(_value)) + (_pAd)->chipOps.eeread((struct rt_rtmp_adapter *)(_pAd), (u16)(_offset), (u16 *)&(_value)) /* ------------------------------------------------------------------- */ /* E2PROM data layout */ diff --git a/drivers/staging/rt2860/rtmp_ckipmic.h b/drivers/staging/rt2860/rtmp_ckipmic.h index 301ba5f77bb7..6ff935dd3dd1 100644 --- a/drivers/staging/rt2860/rtmp_ckipmic.h +++ b/drivers/staging/rt2860/rtmp_ckipmic.h @@ -37,14 +37,14 @@ #ifndef __RTMP_CKIPMIC_H__ #define __RTMP_CKIPMIC_H__ -typedef struct _MIC_CONTEXT { +struct rt_mic_context { /* --- MMH context */ u8 CK[16]; /* the key */ u8 coefficient[16]; /* current aes counter mode coefficients */ unsigned long long accum; /* accumulated mic, reduced to u32 in final() */ u32 position; /* current position (byte offset) in message */ u8 part[4]; /* for conversion of message to u32 for mmh */ -} MIC_CONTEXT, *PMIC_CONTEXT; +}; void xor_128(u8 *a, u8 *b, u8 *out); diff --git a/drivers/staging/rt2860/rtmp_def.h b/drivers/staging/rt2860/rtmp_def.h index 92f6114b5547..c79eceb6e71c 100644 --- a/drivers/staging/rt2860/rtmp_def.h +++ b/drivers/staging/rt2860/rtmp_def.h @@ -144,7 +144,7 @@ #define APNORMAL 0x15f97 #define PSPXLINK 0x17f93 /* */ -/* RTMP_ADAPTER flags */ +/* struct rt_rtmp_adapter flags */ /* */ #define fRTMP_ADAPTER_MAP_REGISTER 0x00000001 #define fRTMP_ADAPTER_INTERRUPT_IN_USE 0x00000002 @@ -197,7 +197,7 @@ #define fOP_STATUS_ADVANCE_POWER_SAVE_PCIE_DEVICE fOP_STATUS_PCIE_DEVICE /* */ -/* RTMP_ADAPTER PSFlags : related to advanced power save. */ +/* struct rt_rtmp_adapter PSFlags : related to advanced power save. */ /* */ /* Indicate whether driver can go to sleep mode from now. This flag is useful AFTER link up */ #define fRTMP_PS_CAN_GO_SLEEP 0x00000001 diff --git a/drivers/staging/rt2860/rtmp_dot11.h b/drivers/staging/rt2860/rtmp_dot11.h index e97034375e36..4f8abd77ada5 100644 --- a/drivers/staging/rt2860/rtmp_dot11.h +++ b/drivers/staging/rt2860/rtmp_dot11.h @@ -31,7 +31,7 @@ #include "rtmp_type.h" /* 4-byte HTC field. maybe included in any frame except non-QOS data frame. The Order bit must set 1. */ -typedef struct PACKED { +struct PACKED rt_ht_control { u32 MA:1; /*management action payload exist in (QoS Null+HTC) */ u32 TRQ:1; /*sounding request */ u32 MRQ:1; /*MCS feedback. Request for a MCS feedback */ @@ -46,19 +46,19 @@ typedef struct PACKED { u32 rsv:5; /*calibration sequence */ u32 ACConstraint:1; /*feedback request */ u32 RDG:1; /*RDG / More PPDU */ -} HT_CONTROL, *PHT_CONTROL; +}; /* 2-byte QOS CONTROL field */ -typedef struct PACKED { +struct PACKED rt_qos_control { u16 TID:4; u16 EOSP:1; u16 AckPolicy:2; /*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA */ u16 AMsduPresent:1; u16 Txop_QueueSize:8; -} QOS_CONTROL, *PQOS_CONTROL; +}; /* 2-byte Frame control field */ -typedef struct PACKED { +struct PACKED rt_frame_control { u16 Ver:2; /* Protocol version */ u16 Type:2; /* MSDU type */ u16 SubType:4; /* MSDU subtype */ @@ -70,10 +70,10 @@ typedef struct PACKED { u16 MoreData:1; /* More data bit */ u16 Wep:1; /* Wep data */ u16 Order:1; /* Strict order expected */ -} FRAME_CONTROL, *PFRAME_CONTROL; +}; -typedef struct PACKED _HEADER_802_11 { - FRAME_CONTROL FC; +struct PACKED rt_header_802_11 { + struct rt_frame_control FC; u16 Duration; u8 Addr1[MAC_ADDR_LEN]; u8 Addr2[MAC_ADDR_LEN]; @@ -81,20 +81,20 @@ typedef struct PACKED _HEADER_802_11 { u16 Frag:4; u16 Sequence:12; u8 Octet[0]; -} HEADER_802_11, *PHEADER_802_11; +}; -typedef struct PACKED _PSPOLL_FRAME { - FRAME_CONTROL FC; +struct PACKED rt_pspoll_frame { + struct rt_frame_control FC; u16 Aid; u8 Bssid[MAC_ADDR_LEN]; u8 Ta[MAC_ADDR_LEN]; -} PSPOLL_FRAME, *PPSPOLL_FRAME; +}; -typedef struct PACKED _RTS_FRAME { - FRAME_CONTROL FC; +struct PACKED rt_rts_frame { + struct rt_frame_control FC; u16 Duration; u8 Addr1[MAC_ADDR_LEN]; u8 Addr2[MAC_ADDR_LEN]; -} RTS_FRAME, *PRTS_FRAME; +}; #endif /* __DOT11_BASE_H__ // */ diff --git a/drivers/staging/rt2860/rtmp_iface.h b/drivers/staging/rt2860/rtmp_iface.h index cafb618adf70..808c05529848 100644 --- a/drivers/staging/rt2860/rtmp_iface.h +++ b/drivers/staging/rt2860/rtmp_iface.h @@ -44,20 +44,20 @@ #include "iface/rtmp_usb.h" #endif /* RTMP_USB_SUPPORT // */ -typedef struct _INF_PCI_CONFIG_ { +struct rt_inf_pci_config { unsigned long CSRBaseAddress; /* PCI MMIO Base Address, all access will use */ unsigned int irq_num; -} INF_PCI_CONFIG; +}; -typedef struct _INF_USB_CONFIG_ { +struct rt_inf_usb_config { u8 BulkInEpAddr; /* bulk-in endpoint address */ u8 BulkOutEpAddr[6]; /* bulk-out endpoint address */ -} INF_USB_CONFIG; +}; -typedef struct _INF_RBUS_CONFIG_ { +struct rt_inf_rbus_config { unsigned long csr_addr; unsigned int irq; -} INF_RBUS_CONFIG; +}; typedef enum _RTMP_INF_TYPE_ { RTMP_DEV_INF_UNKNOWN = 0, @@ -67,9 +67,9 @@ typedef enum _RTMP_INF_TYPE_ { } RTMP_INF_TYPE; typedef union _RTMP_INF_CONFIG_ { - struct _INF_PCI_CONFIG_ pciConfig; - struct _INF_USB_CONFIG_ usbConfig; - struct _INF_RBUS_CONFIG_ rbusConfig; + struct rt_inf_pci_config pciConfig; + struct rt_inf_usb_config usbConfig; + struct rt_inf_rbus_config rbusConfig; } RTMP_INF_CONFIG; #endif /* __RTMP_IFACE_H__ // */ diff --git a/drivers/staging/rt2860/rtmp_mcu.h b/drivers/staging/rt2860/rtmp_mcu.h index 378f01ecc282..d0987e55cdad 100644 --- a/drivers/staging/rt2860/rtmp_mcu.h +++ b/drivers/staging/rt2860/rtmp_mcu.h @@ -38,11 +38,11 @@ #ifndef __RTMP_MCU_H__ #define __RTMP_MCU_H__ -int RtmpAsicEraseFirmware(IN PRTMP_ADAPTER pAd); +int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd); -int RtmpAsicLoadFirmware(IN PRTMP_ADAPTER pAd); +int RtmpAsicLoadFirmware(struct rt_rtmp_adapter *pAd); -int RtmpAsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, +int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, u8 Command, u8 Token, u8 Arg0, u8 Arg1); diff --git a/drivers/staging/rt2860/rtmp_os.h b/drivers/staging/rt2860/rtmp_os.h index cff01289de95..94c30c8ca662 100644 --- a/drivers/staging/rt2860/rtmp_os.h +++ b/drivers/staging/rt2860/rtmp_os.h @@ -48,14 +48,14 @@ The definition of this data structure may various depends on different OS. Use it carefully. */ -typedef struct _RTMP_OS_NETDEV_OP_HOOK_ { +struct rt_rtmp_os_netdev_op_hook { const struct net_device_ops *netdev_ops; void *priv; int priv_flags; unsigned char devAddr[6]; unsigned char devName[16]; unsigned char needProtcted; -} RTMP_OS_NETDEV_OP_HOOK, *PRTMP_OS_NETDEV_OP_HOOK; +}; typedef enum _RTMP_TASK_STATUS_ { RTMP_TASK_STAT_UNKNOWN = 0, @@ -66,7 +66,7 @@ typedef enum _RTMP_TASK_STATUS_ { #define RTMP_TASK_CAN_DO_INSERT (RTMP_TASK_STAT_INITED |RTMP_TASK_STAT_RUNNING) #define RTMP_OS_TASK_NAME_LEN 16 -typedef struct _RTMP_OS_TASK_ { +struct rt_rtmp_os_task { char taskName[RTMP_OS_TASK_NAME_LEN]; void *priv; /*unsigned long taskFlags; */ @@ -82,7 +82,7 @@ typedef struct _RTMP_OS_TASK_ { wait_queue_head_t kthread_q; BOOLEAN kthread_running; #endif -} RTMP_OS_TASK; +}; int RtmpOSIRQRequest(struct net_device *pNetDev); int RtmpOSIRQRelease(struct net_device *pNetDev); diff --git a/drivers/staging/rt2860/rtmp_timer.h b/drivers/staging/rt2860/rtmp_timer.h index c81e507dbadb..28b8ac6e8352 100644 --- a/drivers/staging/rt2860/rtmp_timer.h +++ b/drivers/staging/rt2860/rtmp_timer.h @@ -61,7 +61,7 @@ typedef void(*RTMP_TIMER_TASK_HANDLE) (void *SystemSpecific1, void *SystemSpecific3); #endif /* RTMP_TIMER_TASK_SUPPORT // */ -typedef struct _RALINK_TIMER_STRUCT { +struct rt_ralink_timer { struct timer_list TimerObj; /* Ndis Timer object */ BOOLEAN Valid; /* Set to True when call RTMPInitTimer */ BOOLEAN State; /* True if timer cancelled */ @@ -73,32 +73,32 @@ typedef struct _RALINK_TIMER_STRUCT { RTMP_TIMER_TASK_HANDLE handle; void *pAd; #endif /* RTMP_TIMER_TASK_SUPPORT // */ -} RALINK_TIMER_STRUCT, *PRALINK_TIMER_STRUCT; +}; #ifdef RTMP_TIMER_TASK_SUPPORT -typedef struct _RTMP_TIMER_TASK_ENTRY_ { - RALINK_TIMER_STRUCT *pRaTimer; - struct _RTMP_TIMER_TASK_ENTRY_ *pNext; -} RTMP_TIMER_TASK_ENTRY; +struct rt_rtmp_timer_task_entry { + struct rt_ralink_timer *pRaTimer; + struct rt_rtmp_timer_task_entry *pNext; +}; #define TIMER_QUEUE_SIZE_MAX 128 -typedef struct _RTMP_TIMER_TASK_QUEUE_ { +struct rt_rtmp_timer_task_queue { unsigned int status; unsigned char *pTimerQPoll; - RTMP_TIMER_TASK_ENTRY *pQPollFreeList; - RTMP_TIMER_TASK_ENTRY *pQHead; - RTMP_TIMER_TASK_ENTRY *pQTail; -} RTMP_TIMER_TASK_QUEUE; + struct rt_rtmp_timer_task_entry *pQPollFreeList; + struct rt_rtmp_timer_task_entry *pQHead; + struct rt_rtmp_timer_task_entry *pQTail; +}; #define BUILD_TIMER_FUNCTION(_func) \ void rtmp_timer_##_func(unsigned long data) \ { \ - PRALINK_TIMER_STRUCT _pTimer = (PRALINK_TIMER_STRUCT)data; \ - RTMP_TIMER_TASK_ENTRY *_pQNode; \ - RTMP_ADAPTER *_pAd; \ + struct rt_ralink_timer *_pTimer = (struct rt_ralink_timer *)data; \ + struct rt_rtmp_timer_task_entry *_pQNode; \ + struct rt_rtmp_adapter *_pAd; \ \ _pTimer->handle = _func; \ - _pAd = (RTMP_ADAPTER *)_pTimer->pAd; \ + _pAd = (struct rt_rtmp_adapter *)_pTimer->pAd; \ _pQNode = RtmpTimerQInsert(_pAd, _pTimer); \ if ((_pQNode == NULL) && (_pAd->TimerQ.status & RTMP_TASK_CAN_DO_INSERT)) \ RTMP_OS_Add_Timer(&_pTimer->TimerObj, OS_HZ); \ @@ -107,7 +107,7 @@ void rtmp_timer_##_func(unsigned long data) \ #define BUILD_TIMER_FUNCTION(_func) \ void rtmp_timer_##_func(unsigned long data) \ { \ - PRALINK_TIMER_STRUCT pTimer = (PRALINK_TIMER_STRUCT) data; \ + struct rt_ralink_timer *pTimer = (struct rt_ralink_timer *)data; \ \ _func(NULL, (void *)pTimer->cookie, NULL, pTimer); \ if (pTimer->Repeat) \ diff --git a/drivers/staging/rt2860/rtmp_type.h b/drivers/staging/rt2860/rtmp_type.h index 8de142840d39..d9bb2d64c8b8 100644 --- a/drivers/staging/rt2860/rtmp_type.h +++ b/drivers/staging/rt2860/rtmp_type.h @@ -55,33 +55,33 @@ typedef union _LARGE_INTEGER { /* */ /* Register set pair for initialzation register set definition */ /* */ -typedef struct _RTMP_REG_PAIR { +struct rt_rtmp_reg_pair { unsigned long Register; unsigned long Value; -} RTMP_REG_PAIR, *PRTMP_REG_PAIR; +}; -typedef struct _REG_PAIR { +struct rt_reg_pair { u8 Register; u8 Value; -} REG_PAIR, *PREG_PAIR; +}; /* */ /* Register set pair for initialzation register set definition */ /* */ -typedef struct _RTMP_RF_REGS { +struct rt_rtmp_rf_regs { u8 Channel; unsigned long R1; unsigned long R2; unsigned long R3; unsigned long R4; -} RTMP_RF_REGS, *PRTMP_RF_REGS; +}; -typedef struct _FREQUENCY_ITEM { +struct rt_frequency_item { u8 Channel; u8 N; u8 R; u8 K; -} FREQUENCY_ITEM, *PFREQUENCY_ITEM; +}; #define STATUS_SUCCESS 0x00 #define STATUS_UNSUCCESSFUL 0x01 diff --git a/drivers/staging/rt2860/rtusb_io.h b/drivers/staging/rt2860/rtusb_io.h index 547f6ab4ef32..64a2fe435284 100644 --- a/drivers/staging/rt2860/rtusb_io.h +++ b/drivers/staging/rt2860/rtusb_io.h @@ -78,27 +78,29 @@ /*CMDTHREAD_MULTI_WRITE_MAC */ /*CMDTHREAD_VENDOR_EEPROM_READ */ /*CMDTHREAD_VENDOR_EEPROM_WRITE */ -typedef struct _CMDHandler_TLV { +struct rt_cmdhandler_tlv { u16 Offset; u16 Length; u8 DataFirst; -} CMDHandler_TLV, *PCMDHandler_TLV; +}; -typedef struct _CmdQElmt { +struct rt_cmdqelmt; + +struct rt_cmdqelmt { u32 command; void *buffer; unsigned long bufferlength; BOOLEAN CmdFromNdis; BOOLEAN SetOperation; - struct _CmdQElmt *next; -} CmdQElmt, *PCmdQElmt; + struct rt_cmdqelmt *next; +}; -typedef struct _CmdQ { +struct rt_cmdq { u32 size; - CmdQElmt *head; - CmdQElmt *tail; + struct rt_cmdqelmt *head; + struct rt_cmdqelmt *tail; u32 CmdQState; -} CmdQ, *PCmdQ; +}; #define EnqueueCmd(cmdq, cmdqelmt) \ { \ @@ -118,17 +120,17 @@ typedef struct _CmdQ { ******************************************************************************/ /* reset MAC of a station entry to 0xFFFFFFFFFFFF */ #define RTMP_STA_ENTRY_MAC_RESET(pAd, Wcid) \ - { RT_SET_ASIC_WCID SetAsicWcid; \ + { struct rt_set_asic_wcid SetAsicWcid; \ SetAsicWcid.WCID = Wcid; \ SetAsicWcid.SetTid = 0xffffffff; \ SetAsicWcid.DeleteTid = 0xffffffff; \ RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID, \ - &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); } + &SetAsicWcid, sizeof(struct rt_set_asic_wcid)); } /* add this entry into ASIC RX WCID search table */ #define RTMP_STA_ENTRY_ADD(pAd, pEntry) \ RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_CLIENT_MAC_ENTRY, \ - pEntry, sizeof(MAC_TABLE_ENTRY)); + pEntry, sizeof(struct rt_mac_table_entry)); /* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */ /* Set MAC register value according operation mode */ @@ -144,7 +146,7 @@ typedef struct _CmdQ { #define RTMP_STA_SECURITY_INFO_ADD(pAd, apidx, KeyID, pEntry) \ { RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid); \ if (pEntry->Aid >= 1) { \ - RT_SET_ASIC_WCID_ATTRI SetAsicWcidAttri; \ + struct rt_set_asic_wcid_attri SetAsicWcidAttri; \ SetAsicWcidAttri.WCID = pEntry->Aid; \ if ((pEntry->AuthMode <= Ndis802_11AuthModeAutoSwitch) && \ (pEntry->WepStatus == Ndis802_11Encryption1Enabled)) \ @@ -158,26 +160,26 @@ typedef struct _CmdQ { else SetAsicWcidAttri.Cipher = 0; \ DBGPRINT(RT_DEBUG_TRACE, ("aid cipher = %ld\n",SetAsicWcidAttri.Cipher)); \ RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID_CIPHER, \ - &SetAsicWcidAttri, sizeof(RT_SET_ASIC_WCID_ATTRI)); } } + &SetAsicWcidAttri, sizeof(struct rt_set_asic_wcid_attri)); } } /* Insert the BA bitmap to ASIC for the Wcid entry */ #define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID) \ do{ \ - RT_SET_ASIC_WCID SetAsicWcid; \ + struct rt_set_asic_wcid SetAsicWcid; \ SetAsicWcid.WCID = (_Aid); \ SetAsicWcid.SetTid = (0x10000<<(_TID)); \ SetAsicWcid.DeleteTid = 0xffffffff; \ - RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \ + RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(struct rt_set_asic_wcid)); \ }while(0) /* Remove the BA bitmap from ASIC for the Wcid entry */ #define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID) \ do{ \ - RT_SET_ASIC_WCID SetAsicWcid; \ + struct rt_set_asic_wcid SetAsicWcid; \ SetAsicWcid.WCID = (_Wcid); \ SetAsicWcid.SetTid = (0xffffffff); \ SetAsicWcid.DeleteTid = (0x10000<<(_TID) ); \ - RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \ + RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(struct rt_set_asic_wcid)); \ }while(0) #endif /* __RTUSB_IO_H__ // */ diff --git a/drivers/staging/rt2860/spectrum.h b/drivers/staging/rt2860/spectrum.h index b4e9fbc2fd81..648fd632b606 100644 --- a/drivers/staging/rt2860/spectrum.h +++ b/drivers/staging/rt2860/spectrum.h @@ -31,7 +31,7 @@ #include "rtmp_type.h" #include "spectrum_def.h" -char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode); +char RTMP_GetTxPwr(struct rt_rtmp_adapter *pAd, IN HTTRANSMIT_SETTING HTTxMode); /* ========================================================================== @@ -45,7 +45,7 @@ char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode); Return : None. ========================================================================== */ -void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, +void MakeMeasurementReqFrame(struct rt_rtmp_adapter *pAd, u8 *pOutBuffer, unsigned long *pFrameLen, u8 TotalLen, @@ -68,7 +68,7 @@ void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, +void EnqueueMeasurementRep(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken, u8 MeasureToken, @@ -88,7 +88,7 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken); +void EnqueueTPCReq(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken); /* ========================================================================== @@ -102,7 +102,7 @@ void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken); Return : None. ========================================================================== */ -void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, +void EnqueueTPCRep(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken, u8 TxPwr, u8 LinkMargin); @@ -120,7 +120,7 @@ void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, +void EnqueueChSwAnn(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 ChSwMode, u8 NewCh); /* @@ -135,7 +135,7 @@ void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void PeerSpectrumAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +void PeerSpectrumAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); /* ========================================================================== @@ -146,44 +146,44 @@ void PeerSpectrumAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); Return : None. ========================================================================== */ -int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg); +int Set_MeasureReq_Proc(struct rt_rtmp_adapter *pAd, char *arg); -int Set_TpcReq_Proc(IN PRTMP_ADAPTER pAd, char *arg); +int Set_TpcReq_Proc(struct rt_rtmp_adapter *pAd, char *arg); -int Set_PwrConstraint(IN PRTMP_ADAPTER pAd, char *arg); +int Set_PwrConstraint(struct rt_rtmp_adapter *pAd, char *arg); -void MeasureReqTabInit(IN PRTMP_ADAPTER pAd); +void MeasureReqTabInit(struct rt_rtmp_adapter *pAd); -void MeasureReqTabExit(IN PRTMP_ADAPTER pAd); +void MeasureReqTabExit(struct rt_rtmp_adapter *pAd); -PMEASURE_REQ_ENTRY MeasureReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken); +struct rt_measure_req_entry *MeasureReqLookUp(struct rt_rtmp_adapter *pAd, u8 DialogToken); -PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken); +struct rt_measure_req_entry *MeasureReqInsert(struct rt_rtmp_adapter *pAd, u8 DialogToken); -void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken); +void MeasureReqDelete(struct rt_rtmp_adapter *pAd, u8 DialogToken); -void InsertChannelRepIE(IN PRTMP_ADAPTER pAd, +void InsertChannelRepIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, char *pCountry, u8 RegulatoryClass); -void InsertTpcReportIE(IN PRTMP_ADAPTER pAd, +void InsertTpcReportIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 TxPwr, u8 LinkMargin); -void InsertDialogToken(IN PRTMP_ADAPTER pAd, +void InsertDialogToken(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 DialogToken); -void TpcReqTabInit(IN PRTMP_ADAPTER pAd); +void TpcReqTabInit(struct rt_rtmp_adapter *pAd); -void TpcReqTabExit(IN PRTMP_ADAPTER pAd); +void TpcReqTabExit(struct rt_rtmp_adapter *pAd); -void NotifyChSwAnnToPeerAPs(IN PRTMP_ADAPTER pAd, +void NotifyChSwAnnToPeerAPs(struct rt_rtmp_adapter *pAd, u8 *pRA, u8 *pTA, u8 ChSwMode, u8 Channel); -void RguClass_BuildBcnChList(IN PRTMP_ADAPTER pAd, +void RguClass_BuildBcnChList(struct rt_rtmp_adapter *pAd, u8 *pBuf, unsigned long *pBufLen); #endif /* __SPECTRUM_H__ // */ diff --git a/drivers/staging/rt2860/spectrum_def.h b/drivers/staging/rt2860/spectrum_def.h index 30678b93fb83..8ffcfb0d04f8 100644 --- a/drivers/staging/rt2860/spectrum_def.h +++ b/drivers/staging/rt2860/spectrum_def.h @@ -53,44 +53,48 @@ #define TPC_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_HASH_TPC_REQ_TAB_SIZE) #define MQ_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_MEASURE_REQ_TAB_SIZE) -typedef struct _MEASURE_REQ_ENTRY { - struct _MEASURE_REQ_ENTRY *pNext; +struct rt_measure_req_entry; + +struct rt_measure_req_entry { + struct rt_measure_req_entry *pNext; unsigned long lastTime; BOOLEAN Valid; u8 DialogToken; u8 MeasureDialogToken[3]; /* 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure. */ -} MEASURE_REQ_ENTRY, *PMEASURE_REQ_ENTRY; +}; -typedef struct _MEASURE_REQ_TAB { +struct rt_measure_req_tab { u8 Size; - PMEASURE_REQ_ENTRY Hash[MAX_HASH_MEASURE_REQ_TAB_SIZE]; - MEASURE_REQ_ENTRY Content[MAX_MEASURE_REQ_TAB_SIZE]; -} MEASURE_REQ_TAB, *PMEASURE_REQ_TAB; + struct rt_measure_req_entry *Hash[MAX_HASH_MEASURE_REQ_TAB_SIZE]; + struct rt_measure_req_entry Content[MAX_MEASURE_REQ_TAB_SIZE]; +}; + +struct rt_tpc_req_entry; -typedef struct _TPC_REQ_ENTRY { - struct _TPC_REQ_ENTRY *pNext; +struct rt_tpc_req_entry { + struct rt_tpc_req_entry *pNext; unsigned long lastTime; BOOLEAN Valid; u8 DialogToken; -} TPC_REQ_ENTRY, *PTPC_REQ_ENTRY; +}; -typedef struct _TPC_REQ_TAB { +struct rt_tpc_req_tab { u8 Size; - PTPC_REQ_ENTRY Hash[MAX_HASH_TPC_REQ_TAB_SIZE]; - TPC_REQ_ENTRY Content[MAX_TPC_REQ_TAB_SIZE]; -} TPC_REQ_TAB, *PTPC_REQ_TAB; + struct rt_tpc_req_entry *Hash[MAX_HASH_TPC_REQ_TAB_SIZE]; + struct rt_tpc_req_entry Content[MAX_TPC_REQ_TAB_SIZE]; +}; /* The regulatory information */ -typedef struct _DOT11_CHANNEL_SET { +struct rt_dot11_channel_set { u8 NumberOfChannels; u8 MaxTxPwr; u8 ChannelList[16]; -} DOT11_CHANNEL_SET, *PDOT11_CHANNEL_SET; +}; -typedef struct _DOT11_REGULATORY_INFORMATION { +struct rt_dot11_regulatory_information { u8 RegulatoryClass; - DOT11_CHANNEL_SET ChannelSet; -} DOT11_REGULATORY_INFORMATION, *PDOT11_REGULATORY_INFORMATION; + struct rt_dot11_channel_set ChannelSet; +}; #define RM_TPC_REQ 0 #define RM_MEASURE_REQ 1 @@ -101,16 +105,16 @@ typedef struct _DOT11_REGULATORY_INFORMATION { #define RM_CH_LOAD 3 #define RM_NOISE_HISTOGRAM 4 -typedef struct PACKED _TPC_REPORT_INFO { +struct PACKED rt_tpc_report_info { u8 TxPwr; u8 LinkMargin; -} TPC_REPORT_INFO, *PTPC_REPORT_INFO; +}; -typedef struct PACKED _CH_SW_ANN_INFO { +struct PACKED rt_ch_sw_ann_info { u8 ChSwMode; u8 Channel; u8 ChSwCnt; -} CH_SW_ANN_INFO, *PCH_SW_ANN_INFO; +}; typedef union PACKED _MEASURE_REQ_MODE { struct PACKED { @@ -124,18 +128,18 @@ typedef union PACKED _MEASURE_REQ_MODE { u8 word; } MEASURE_REQ_MODE, *PMEASURE_REQ_MODE; -typedef struct PACKED _MEASURE_REQ { +struct PACKED rt_measure_req { u8 ChNum; u64 MeasureStartTime; u16 MeasureDuration; -} MEASURE_REQ, *PMEASURE_REQ; +}; -typedef struct PACKED _MEASURE_REQ_INFO { +struct PACKED rt_measure_req_info { u8 Token; MEASURE_REQ_MODE ReqMode; u8 ReqType; u8 Oct[0]; -} MEASURE_REQ_INFO, *PMEASURE_REQ_INFO; +}; typedef union PACKED _MEASURE_BASIC_REPORT_MAP { struct PACKED { @@ -150,26 +154,26 @@ typedef union PACKED _MEASURE_BASIC_REPORT_MAP { u8 word; } MEASURE_BASIC_REPORT_MAP, *PMEASURE_BASIC_REPORT_MAP; -typedef struct PACKED _MEASURE_BASIC_REPORT { +struct PACKED rt_measure_basic_report { u8 ChNum; u64 MeasureStartTime; u16 MeasureDuration; MEASURE_BASIC_REPORT_MAP Map; -} MEASURE_BASIC_REPORT, *PMEASURE_BASIC_REPORT; +}; -typedef struct PACKED _MEASURE_CCA_REPORT { +struct PACKED rt_measure_cca_report { u8 ChNum; u64 MeasureStartTime; u16 MeasureDuration; u8 CCA_Busy_Fraction; -} MEASURE_CCA_REPORT, *PMEASURE_CCA_REPORT; +}; -typedef struct PACKED _MEASURE_RPI_REPORT { +struct PACKED rt_measure_rpi_report { u8 ChNum; u64 MeasureStartTime; u16 MeasureDuration; u8 RPI_Density[8]; -} MEASURE_RPI_REPORT, *PMEASURE_RPI_REPORT; +}; typedef union PACKED _MEASURE_REPORT_MODE { struct PACKED { @@ -181,18 +185,18 @@ typedef union PACKED _MEASURE_REPORT_MODE { u8 word; } MEASURE_REPORT_MODE, *PMEASURE_REPORT_MODE; -typedef struct PACKED _MEASURE_REPORT_INFO { +struct PACKED rt_measure_report_info { u8 Token; u8 ReportMode; u8 ReportType; u8 Octect[0]; -} MEASURE_REPORT_INFO, *PMEASURE_REPORT_INFO; +}; -typedef struct PACKED _QUIET_INFO { +struct PACKED rt_quiet_info { u8 QuietCnt; u8 QuietPeriod; u16 QuietDuration; u16 QuietOffset; -} QUIET_INFO, *PQUIET_INFO; +}; #endif /* __SPECTRUM_DEF_H__ // */ diff --git a/drivers/staging/rt2860/sta/assoc.c b/drivers/staging/rt2860/sta/assoc.c index f2192ff16577..733bc083a6a7 100644 --- a/drivers/staging/rt2860/sta/assoc.c +++ b/drivers/staging/rt2860/sta/assoc.c @@ -73,8 +73,8 @@ u8 Ccx2IeInfo[] = { 0x00, 0x40, 0x96, 0x03, 0x02 }; ========================================================================== */ -void AssocStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, OUT STATE_MACHINE_FUNC Trans[]) +void AssocStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]) { StateMachineInit(S, Trans, MAX_ASSOC_STATE, MAX_ASSOC_MSG, (STATE_MACHINE_FUNC) Drop, ASSOC_IDLE, @@ -169,7 +169,7 @@ void AssocTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -197,7 +197,7 @@ void ReassocTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -225,7 +225,7 @@ void DisassocTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -259,10 +259,10 @@ void DisassocTimeout(void *SystemSpecific1, ========================================================================== */ -void MlmeAssocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeAssocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 ApAddr[6]; - HEADER_802_11 AssocHdr; + struct rt_header_802_11 AssocHdr; u8 WmeIe[9] = { IE_VENDOR_SPECIFIC, 0x07, 0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00 }; @@ -306,7 +306,7 @@ void MlmeAssocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } /* Add by James 03/06/27 */ pAd->StaCfg.AssocInfo.Length = - sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); + sizeof(struct rt_ndis_802_11_association_information); /* Association don't need to report MAC address */ pAd->StaCfg.AssocInfo.AvailableRequestFixedIEs = NDIS_802_11_AI_REQFI_CAPABILITIES | @@ -318,7 +318,7 @@ void MlmeAssocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* Only reassociate need this */ /*COPY_MAC_ADDR(pAd->StaCfg.AssocInfo.RequestFixedIEs.CurrentAPAddress, ApAddr); */ pAd->StaCfg.AssocInfo.OffsetRequestIEs = - sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); + sizeof(struct rt_ndis_802_11_association_information); NdisZeroMemory(pAd->StaCfg.ReqVarIEs, MAX_VIE_LEN); /* First add SSID */ @@ -355,7 +355,7 @@ void MlmeAssocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* Build basic frame first */ MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &AssocHdr, + sizeof(struct rt_header_802_11), &AssocHdr, 2, &CapabilityInfo, 2, &ListenIntv, 1, &SsidIe, @@ -440,10 +440,10 @@ void MlmeAssocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) if (pAd->MlmeAux.APEdcaParm.bValid) { if (pAd->CommonCfg.bAPSDCapable && pAd->MlmeAux.APEdcaParm.bAPSDCapable) { - QBSS_STA_INFO_PARM QosInfo; + struct rt_qbss_sta_info_parm QosInfo; NdisZeroMemory(&QosInfo, - sizeof(QBSS_STA_INFO_PARM)); + sizeof(struct rt_qbss_sta_info_parm)); QosInfo.UAPSD_AC_BE = pAd->CommonCfg.bAPSDAC_BE; QosInfo.UAPSD_AC_BK = pAd->CommonCfg.bAPSDAC_BK; QosInfo.UAPSD_AC_VI = pAd->CommonCfg.bAPSDAC_VI; @@ -589,10 +589,10 @@ void MlmeAssocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void MlmeReassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeReassocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 ApAddr[6]; - HEADER_802_11 ReassocHdr; + struct rt_header_802_11 ReassocHdr; u8 WmeIe[9] = { IE_VENDOR_SPECIFIC, 0x07, 0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00 }; @@ -638,7 +638,7 @@ void MlmeReassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ("ASSOC - Send RE-ASSOC request...\n")); MgtMacHeaderInit(pAd, &ReassocHdr, SUBTYPE_REASSOC_REQ, 0, ApAddr, ApAddr); - MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(HEADER_802_11), + MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(struct rt_header_802_11), &ReassocHdr, 2, &CapabilityInfo, 2, &ListenIntv, MAC_ADDR_LEN, ApAddr, 1, &SsidIe, 1, &pAd->MlmeAux.SsidLen, @@ -659,10 +659,10 @@ void MlmeReassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) if (pAd->MlmeAux.APEdcaParm.bValid) { if (pAd->CommonCfg.bAPSDCapable && pAd->MlmeAux.APEdcaParm.bAPSDCapable) { - QBSS_STA_INFO_PARM QosInfo; + struct rt_qbss_sta_info_parm QosInfo; NdisZeroMemory(&QosInfo, - sizeof(QBSS_STA_INFO_PARM)); + sizeof(struct rt_qbss_sta_info_parm)); QosInfo.UAPSD_AC_BE = pAd->CommonCfg.bAPSDAC_BE; QosInfo.UAPSD_AC_BK = pAd->CommonCfg.bAPSDAC_BK; QosInfo.UAPSD_AC_VI = pAd->CommonCfg.bAPSDAC_VI; @@ -765,11 +765,11 @@ void MlmeReassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void MlmeDisassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeDisassocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - PMLME_DISASSOC_REQ_STRUCT pDisassocReq; - HEADER_802_11 DisassocHdr; - PHEADER_802_11 pDisassocHdr; + struct rt_mlme_disassoc_req *pDisassocReq; + struct rt_header_802_11 DisassocHdr; + struct rt_header_802_11 * pDisassocHdr; u8 *pOutBuffer = NULL; unsigned long FrameLen = 0; int NStatus; @@ -778,7 +778,7 @@ void MlmeDisassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) u16 Status; /* skip sanity check */ - pDisassocReq = (PMLME_DISASSOC_REQ_STRUCT) (Elem->Msg); + pDisassocReq = (struct rt_mlme_disassoc_req *)(Elem->Msg); NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ if (NStatus != NDIS_STATUS_SUCCESS) { @@ -801,14 +801,14 @@ void MlmeDisassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) pDisassocReq->Reason)); MgtMacHeaderInit(pAd, &DisassocHdr, SUBTYPE_DISASSOC, 0, pDisassocReq->Addr, pDisassocReq->Addr); /* patch peap ttls switching issue */ MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &DisassocHdr, + sizeof(struct rt_header_802_11), &DisassocHdr, 2, &pDisassocReq->Reason, END_OF_ARGS); MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); /* To patch Instance and Buffalo(N) AP */ /* Driver has to send deauth to Instance AP, but Buffalo(N) needs to send disassoc to reset Authenticator's state machine */ /* Therefore, we send both of them. */ - pDisassocHdr = (PHEADER_802_11) pOutBuffer; + pDisassocHdr = (struct rt_header_802_11 *) pOutBuffer; pDisassocHdr->FC.SubType = SUBTYPE_DEAUTH; MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); @@ -835,7 +835,7 @@ void MlmeDisassocReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void PeerAssocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerAssocRspAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 CapabilityInfo, Status, Aid; u8 SupRate[MAX_LEN_OF_SUPPORTED_RATES], SupRateLen; @@ -843,9 +843,9 @@ void PeerAssocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) u8 Addr2[MAC_ADDR_LEN]; BOOLEAN TimerCancelled; u8 CkipFlag; - EDCA_PARM EdcaParm; - HT_CAPABILITY_IE HtCapability; - ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */ + struct rt_edca_parm EdcaParm; + struct rt_ht_capability_ie HtCapability; + struct rt_add_ht_info_ie AddHtInfo; /* AP might use this additional ht info IE */ u8 HtCapabilityLen = 0; u8 AddHtInfoLen; u8 NewExtChannelOffset = 0xff; @@ -924,7 +924,7 @@ void PeerAssocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void PeerReassocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerReassocRspAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 CapabilityInfo; u16 Status; @@ -934,9 +934,9 @@ void PeerReassocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) u8 Addr2[MAC_ADDR_LEN]; u8 CkipFlag; BOOLEAN TimerCancelled; - EDCA_PARM EdcaParm; - HT_CAPABILITY_IE HtCapability; - ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */ + struct rt_edca_parm EdcaParm; + struct rt_ht_capability_ie HtCapability; + struct rt_add_ht_info_ie AddHtInfo; /* AP might use this additional ht info IE */ u8 HtCapabilityLen; u8 AddHtInfoLen; u8 NewExtChannelOffset = 0xff; @@ -994,7 +994,7 @@ void PeerReassocRspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void AssocPostProc(IN PRTMP_ADAPTER pAd, u8 *pAddr2, u16 CapabilityInfo, u16 Aid, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, IN PEDCA_PARM pEdcaParm, IN HT_CAPABILITY_IE * pHtCapability, u8 HtCapabilityLen, IN ADD_HT_INFO_IE * pAddHtInfo) /* AP might use this additional ht info IE */ +void AssocPostProc(struct rt_rtmp_adapter *pAd, u8 *pAddr2, u16 CapabilityInfo, u16 Aid, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, struct rt_edca_parm *pEdcaParm, struct rt_ht_capability_ie * pHtCapability, u8 HtCapabilityLen, struct rt_add_ht_info_ie * pAddHtInfo) /* AP might use this additional ht info IE */ { unsigned long Idx; @@ -1029,7 +1029,7 @@ void AssocPostProc(IN PRTMP_ADAPTER pAd, u8 *pAddr2, u16 CapabilityInfo, u16 Aid } - NdisMoveMemory(&pAd->MlmeAux.APEdcaParm, pEdcaParm, sizeof(EDCA_PARM)); + NdisMoveMemory(&pAd->MlmeAux.APEdcaParm, pEdcaParm, sizeof(struct rt_edca_parm)); /* filter out un-supported rates */ pAd->MlmeAux.SupRateLen = SupRateLen; @@ -1069,7 +1069,7 @@ void AssocPostProc(IN PRTMP_ADAPTER pAd, u8 *pAddr2, u16 CapabilityInfo, u16 Aid && (pAd->ScanTab.BssEntry[Idx].VarIELen != 0)) { u8 *pVIE; u16 len; - PEID_STRUCT pEid; + struct rt_eid * pEid; pVIE = pAd->ScanTab.BssEntry[Idx].VarIEs; len = pAd->ScanTab.BssEntry[Idx].VarIELen; @@ -1079,7 +1079,7 @@ void AssocPostProc(IN PRTMP_ADAPTER pAd, u8 *pAddr2, u16 CapabilityInfo, u16 Aid RTMP_CLEAR_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP); while (len > 0) { - pEid = (PEID_STRUCT) pVIE; + pEid = (struct rt_eid *) pVIE; /* For WPA/WPAPSK */ if ((pEid->Eid == IE_WPA) && @@ -1144,7 +1144,7 @@ void AssocPostProc(IN PRTMP_ADAPTER pAd, u8 *pAddr2, u16 CapabilityInfo, u16 Aid ========================================================================== */ -void PeerDisassocAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerDisassocAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Addr2[MAC_ADDR_LEN]; u16 Reason; @@ -1189,7 +1189,7 @@ void PeerDisassocAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void AssocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void AssocTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, ("ASSOC - AssocTimeoutAction\n")); @@ -1207,7 +1207,7 @@ void AssocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void ReassocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void ReassocTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, ("ASSOC - ReassocTimeoutAction\n")); @@ -1225,7 +1225,7 @@ void ReassocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void DisassocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void DisassocTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, ("ASSOC - DisassocTimeoutAction\n")); @@ -1235,7 +1235,7 @@ void DisassocTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) &Status); } -void InvalidStateWhenAssoc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void InvalidStateWhenAssoc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, @@ -1246,7 +1246,7 @@ void InvalidStateWhenAssoc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_ASSOC_CONF, 2, &Status); } -void InvalidStateWhenReassoc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void InvalidStateWhenReassoc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, @@ -1257,8 +1257,8 @@ void InvalidStateWhenReassoc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_REASSOC_CONF, 2, &Status); } -void InvalidStateWhenDisassociate(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem) +void InvalidStateWhenDisassociate(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, @@ -1283,10 +1283,10 @@ void InvalidStateWhenDisassociate(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void Cls3errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr) +void Cls3errAction(struct rt_rtmp_adapter *pAd, u8 *pAddr) { - HEADER_802_11 DisassocHdr; - PHEADER_802_11 pDisassocHdr; + struct rt_header_802_11 DisassocHdr; + struct rt_header_802_11 * pDisassocHdr; u8 *pOutBuffer = NULL; unsigned long FrameLen = 0; int NStatus; @@ -1300,14 +1300,14 @@ void Cls3errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr) ("ASSOC - Class 3 Error, Send DISASSOC frame\n")); MgtMacHeaderInit(pAd, &DisassocHdr, SUBTYPE_DISASSOC, 0, pAddr, pAd->CommonCfg.Bssid); /* patch peap ttls switching issue */ MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &DisassocHdr, + sizeof(struct rt_header_802_11), &DisassocHdr, 2, &Reason, END_OF_ARGS); MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); /* To patch Instance and Buffalo(N) AP */ /* Driver has to send deauth to Instance AP, but Buffalo(N) needs to send disassoc to reset Authenticator's state machine */ /* Therefore, we send both of them. */ - pDisassocHdr = (PHEADER_802_11) pOutBuffer; + pDisassocHdr = (struct rt_header_802_11 *) pOutBuffer; pDisassocHdr->FC.SubType = SUBTYPE_DEAUTH; MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); @@ -1317,7 +1317,7 @@ void Cls3errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr) COPY_MAC_ADDR(pAd->StaCfg.DisassocSta, pAddr); } -int wext_notify_event_assoc(IN RTMP_ADAPTER * pAd) +int wext_notify_event_assoc(struct rt_rtmp_adapter *pAd) { char custom[IW_CUSTOM_MAX] = { 0 }; @@ -1334,12 +1334,12 @@ int wext_notify_event_assoc(IN RTMP_ADAPTER * pAd) } -BOOLEAN StaAddMacTableEntry(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +BOOLEAN StaAddMacTableEntry(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 MaxSupportedRateIn500Kbps, - IN HT_CAPABILITY_IE * pHtCapability, + struct rt_ht_capability_ie * pHtCapability, u8 HtCapabilityLen, - IN ADD_HT_INFO_IE * pAddHtInfo, + struct rt_add_ht_info_ie * pAddHtInfo, u8 AddHtInfoLen, u16 CapabilityInfo) { u8 MaxSupportedRate = RATE_11; diff --git a/drivers/staging/rt2860/sta/auth.c b/drivers/staging/rt2860/sta/auth.c index ddb357ac041c..404bd220679d 100644 --- a/drivers/staging/rt2860/sta/auth.c +++ b/drivers/staging/rt2860/sta/auth.c @@ -55,8 +55,8 @@ ========================================================================== */ -void AuthStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]) +void AuthStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *Sm, OUT STATE_MACHINE_FUNC Trans[]) { StateMachineInit(Sm, Trans, MAX_AUTH_STATE, MAX_AUTH_MSG, (STATE_MACHINE_FUNC) Drop, AUTH_REQ_IDLE, @@ -99,7 +99,7 @@ void AuthTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; DBGPRINT(RT_DEBUG_TRACE, ("AUTH - AuthTimeout\n")); @@ -125,7 +125,7 @@ void AuthTimeout(void *SystemSpecific1, ========================================================================== */ -void MlmeAuthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeAuthReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { if (AUTH_ReqSend (pAd, Elem, &pAd->MlmeAux.AuthTimer, "AUTH", 1, NULL, 0)) @@ -148,14 +148,14 @@ void MlmeAuthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerAuthRspAtSeq2Action(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Addr2[MAC_ADDR_LEN]; u16 Seq, Status, RemoteStatus, Alg; u8 ChlgText[CIPHER_TEXT_LEN]; u8 CyperChlgText[CIPHER_TEXT_LEN + 8 + 8]; u8 Element[2]; - HEADER_802_11 AuthHdr; + struct rt_header_802_11 AuthHdr; BOOLEAN TimerCancelled; u8 *pOutBuffer = NULL; int NStatus; @@ -246,7 +246,7 @@ void PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) 128); RTMPSetICV(pAd, CyperChlgText + 140); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), + sizeof(struct rt_header_802_11), &AuthHdr, CIPHER_TEXT_LEN + 16, CyperChlgText, @@ -282,7 +282,7 @@ void PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void PeerAuthRspAtSeq4Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerAuthRspAtSeq4Action(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Addr2[MAC_ADDR_LEN]; u16 Alg, Seq, Status; @@ -321,16 +321,16 @@ void PeerAuthRspAtSeq4Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeDeauthReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_DEAUTH_REQ_STRUCT *pInfo; - HEADER_802_11 DeauthHdr; + struct rt_mlme_deauth_req *pInfo; + struct rt_header_802_11 DeauthHdr; u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen = 0; u16 Status; - pInfo = (MLME_DEAUTH_REQ_STRUCT *) Elem->Msg; + pInfo = (struct rt_mlme_deauth_req *)Elem->Msg; NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ if (NStatus != NDIS_STATUS_SUCCESS) { @@ -348,7 +348,7 @@ void MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) pInfo->Reason)); MgtMacHeaderInit(pAd, &DeauthHdr, SUBTYPE_DEAUTH, 0, pInfo->Addr, pAd->MlmeAux.Bssid); - MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(HEADER_802_11), + MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(struct rt_header_802_11), &DeauthHdr, 2, &pInfo->Reason, END_OF_ARGS); MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); @@ -374,7 +374,7 @@ void MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void AuthTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void AuthTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, ("AUTH - AuthTimeoutAction\n")); @@ -391,7 +391,7 @@ void AuthTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void InvalidStateWhenAuth(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void InvalidStateWhenAuth(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, @@ -414,9 +414,9 @@ void InvalidStateWhenAuth(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void Cls2errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr) +void Cls2errAction(struct rt_rtmp_adapter *pAd, u8 *pAddr) { - HEADER_802_11 DeauthHdr; + struct rt_header_802_11 DeauthHdr; u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen = 0; @@ -430,7 +430,7 @@ void Cls2errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr) ("AUTH - Class 2 error, Send DEAUTH frame...\n")); MgtMacHeaderInit(pAd, &DeauthHdr, SUBTYPE_DEAUTH, 0, pAddr, pAd->MlmeAux.Bssid); - MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(HEADER_802_11), + MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(struct rt_header_802_11), &DeauthHdr, 2, &Reason, END_OF_ARGS); MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); @@ -439,9 +439,9 @@ void Cls2errAction(IN PRTMP_ADAPTER pAd, u8 *pAddr) COPY_MAC_ADDR(pAd->StaCfg.DeauthSta, pAddr); } -BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd, - IN PMLME_QUEUE_ELEM pElem, - IN PRALINK_TIMER_STRUCT pAuthTimer, +BOOLEAN AUTH_ReqSend(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *pElem, + struct rt_ralink_timer *pAuthTimer, char *pSMName, u16 SeqNo, u8 *pNewElement, unsigned long ElementLen) @@ -449,7 +449,7 @@ BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd, u16 Alg, Seq, Status; u8 Addr[6]; unsigned long Timeout; - HEADER_802_11 AuthHdr; + struct rt_header_802_11 AuthHdr; BOOLEAN TimerCancelled; int NStatus; u8 *pOutBuffer = NULL; @@ -492,7 +492,7 @@ BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd, Alg)); MgtMacHeaderInit(pAd, &AuthHdr, SUBTYPE_AUTH, 0, Addr, pAd->MlmeAux.Bssid); - MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(HEADER_802_11), + MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(struct rt_header_802_11), &AuthHdr, 2, &Alg, 2, &Seq, 2, &Status, END_OF_ARGS); diff --git a/drivers/staging/rt2860/sta/auth_rsp.c b/drivers/staging/rt2860/sta/auth_rsp.c index d155dc6cdf1d..5b018b757308 100644 --- a/drivers/staging/rt2860/sta/auth_rsp.c +++ b/drivers/staging/rt2860/sta/auth_rsp.c @@ -47,8 +47,8 @@ ========================================================================== */ -void AuthRspStateMachineInit(IN PRTMP_ADAPTER pAd, - IN PSTATE_MACHINE Sm, +void AuthRspStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *Sm, IN STATE_MACHINE_FUNC Trans[]) { StateMachineInit(Sm, Trans, MAX_AUTH_RSP_STATE, MAX_AUTH_RSP_MSG, @@ -73,13 +73,13 @@ void AuthRspStateMachineInit(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void PeerAuthSimpleRspGenAndSend(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHdr80211, +void PeerAuthSimpleRspGenAndSend(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u16 Alg, u16 Seq, u16 Reason, u16 Status) { - HEADER_802_11 AuthHdr; + struct rt_header_802_11 AuthHdr; unsigned long FrameLen = 0; u8 *pOutBuffer = NULL; int NStatus; @@ -96,7 +96,7 @@ void PeerAuthSimpleRspGenAndSend(IN PRTMP_ADAPTER pAd, DBGPRINT(RT_DEBUG_TRACE, ("Send AUTH response (seq#2)...\n")); MgtMacHeaderInit(pAd, &AuthHdr, SUBTYPE_AUTH, 0, pHdr80211->Addr2, pAd->MlmeAux.Bssid); - MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(HEADER_802_11), + MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof(struct rt_header_802_11), &AuthHdr, 2, &Alg, 2, &Seq, 2, &Reason, END_OF_ARGS); MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); @@ -110,7 +110,7 @@ void PeerAuthSimpleRspGenAndSend(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void PeerDeauthAction(IN PRTMP_ADAPTER pAd, IN PMLME_QUEUE_ELEM Elem) +void PeerDeauthAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Addr2[MAC_ADDR_LEN]; u16 Reason; diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c index c11389f89789..9c7752076b00 100644 --- a/drivers/staging/rt2860/sta/connect.c +++ b/drivers/staging/rt2860/sta/connect.c @@ -84,9 +84,9 @@ u8 CipherSuiteWpaNoneAesLen = NdisMoveMemory((_pAd)->StaActive.SupRate, (_pAd)->MlmeAux.SupRate, (_pAd)->MlmeAux.SupRateLen);\ (_pAd)->StaActive.ExtRateLen = (_pAd)->MlmeAux.ExtRateLen; \ NdisMoveMemory((_pAd)->StaActive.ExtRate, (_pAd)->MlmeAux.ExtRate, (_pAd)->MlmeAux.ExtRateLen);\ - NdisMoveMemory(&(_pAd)->CommonCfg.APEdcaParm, &(_pAd)->MlmeAux.APEdcaParm, sizeof(EDCA_PARM));\ - NdisMoveMemory(&(_pAd)->CommonCfg.APQosCapability, &(_pAd)->MlmeAux.APQosCapability, sizeof(QOS_CAPABILITY_PARM));\ - NdisMoveMemory(&(_pAd)->CommonCfg.APQbssLoad, &(_pAd)->MlmeAux.APQbssLoad, sizeof(QBSS_LOAD_PARM));\ + NdisMoveMemory(&(_pAd)->CommonCfg.APEdcaParm, &(_pAd)->MlmeAux.APEdcaParm, sizeof(struct rt_edca_parm));\ + NdisMoveMemory(&(_pAd)->CommonCfg.APQosCapability, &(_pAd)->MlmeAux.APQosCapability, sizeof(struct rt_qos_capability_parm));\ + NdisMoveMemory(&(_pAd)->CommonCfg.APQbssLoad, &(_pAd)->MlmeAux.APQbssLoad, sizeof(struct rt_qbss_load_parm));\ COPY_MAC_ADDR((_pAd)->MacTab.Content[BSSID_WCID].Addr, (_pAd)->MlmeAux.Bssid); \ (_pAd)->MacTab.Content[BSSID_WCID].Aid = (_pAd)->MlmeAux.Aid; \ (_pAd)->MacTab.Content[BSSID_WCID].PairwiseKey.CipherAlg = (_pAd)->StaCfg.PairCipher;\ @@ -102,8 +102,8 @@ u8 CipherSuiteWpaNoneAesLen = ========================================================================== */ -void MlmeCntlInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, OUT STATE_MACHINE_FUNC Trans[]) +void MlmeCntlInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]) { /* Control state machine differs from other state machines, the interface */ /* follows the standard interface */ @@ -118,9 +118,9 @@ void MlmeCntlInit(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void MlmeCntlMachinePerformAction(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, - IN MLME_QUEUE_ELEM * Elem) +void MlmeCntlMachinePerformAction(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, + struct rt_mlme_queue_elem *Elem) { switch (pAd->Mlme.CntlMachine.CurrState) { case CNTL_IDLE: @@ -228,9 +228,9 @@ void MlmeCntlMachinePerformAction(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void CntlIdleProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlIdleProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_DISASSOC_REQ_STRUCT DisassocReq; + struct rt_mlme_disassoc_req DisassocReq; if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF)) return; @@ -252,7 +252,7 @@ void CntlIdleProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) DisassocParmFill(pAd, &DisassocReq, pAd->CommonCfg.Bssid, REASON_DISASSOC_STA_LEAVING); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), &DisassocReq); + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_DISASSOC; if (pAd->StaCfg.WpaSupplicantUP != @@ -281,11 +281,11 @@ void CntlIdleProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void CntlOidScanProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlOidScanProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_SCAN_REQ_STRUCT ScanReq; + struct rt_mlme_scan_req ScanReq; unsigned long BssIdx = BSS_NOT_FOUND; - BSS_ENTRY CurrBss; + struct rt_bss_entry CurrBss; /* record current BSS if network is connected. */ /* 2003-2-13 do not include current IBSS if this is the only STA in this IBSS. */ @@ -297,7 +297,7 @@ void CntlOidScanProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) pAd->CommonCfg.Channel); if (BssIdx != BSS_NOT_FOUND) { NdisMoveMemory(&CurrBss, &pAd->ScanTab.BssEntry[BssIdx], - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); } } /* clean up previous SCAN result, add current BSS back to table if any */ @@ -309,14 +309,14 @@ void CntlOidScanProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* appended to the list of BSSIDs in the NIC's database. */ /* To ensure this, we append this BSS as the first entry in SCAN result */ NdisMoveMemory(&pAd->ScanTab.BssEntry[0], &CurrBss, - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); pAd->ScanTab.BssNr = 1; } ScanParmFill(pAd, &ScanReq, (char *)Elem->Msg, Elem->MsgLen, BSS_ANY, SCAN_ACTIVE); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_SCAN_REQ, - sizeof(MLME_SCAN_REQ_STRUCT), &ScanReq); + sizeof(struct rt_mlme_scan_req), &ScanReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_LIST_SCAN; } @@ -329,10 +329,10 @@ void CntlOidScanProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlOidSsidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - PNDIS_802_11_SSID pOidSsid = (NDIS_802_11_SSID *) Elem->Msg; - MLME_DISASSOC_REQ_STRUCT DisassocReq; + struct rt_ndis_802_11_ssid * pOidSsid = (struct rt_ndis_802_11_ssid *) Elem->Msg; + struct rt_mlme_disassoc_req DisassocReq; unsigned long Now; /* Step 1. record the desired user settings to MlmeAux */ @@ -390,7 +390,7 @@ void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) REASON_DISASSOC_STA_LEAVING); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_DISASSOC; } else if (pAd->bConfigChanged == TRUE) { @@ -402,7 +402,7 @@ void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) REASON_DISASSOC_STA_LEAVING); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_DISASSOC; } else { @@ -455,7 +455,7 @@ void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) DisassocParmFill(pAd, &DisassocReq, pAd->CommonCfg.Bssid, REASON_DISASSOC_STA_LEAVING); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), &DisassocReq); + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_DISASSOC; } else { if (ADHOC_ON(pAd)) { @@ -477,7 +477,7 @@ void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) (MlmeValidateSSID(pAd->MlmeAux.Ssid, pAd->MlmeAux.SsidLen) == TRUE) ) { - MLME_SCAN_REQ_STRUCT ScanReq; + struct rt_mlme_scan_req ScanReq; DBGPRINT(RT_DEBUG_TRACE, ("CntlOidSsidProc():CNTL - No matching BSS, start a new scan\n")); @@ -485,7 +485,7 @@ void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) pAd->MlmeAux.SsidLen, BSS_ANY, SCAN_ACTIVE); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_SCAN_REQ, - sizeof(MLME_SCAN_REQ_STRUCT), &ScanReq); + sizeof(struct rt_mlme_scan_req), &ScanReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_LIST_SCAN; /* Reset Missed scan number */ @@ -505,12 +505,12 @@ void CntlOidSsidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlOidRTBssidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { unsigned long BssIdx; u8 *pOidBssid = (u8 *)Elem->Msg; - MLME_DISASSOC_REQ_STRUCT DisassocReq; - MLME_JOIN_REQ_STRUCT JoinReq; + struct rt_mlme_disassoc_req DisassocReq; + struct rt_mlme_join_req JoinReq; /* record user desired settings */ COPY_MAC_ADDR(pAd->MlmeAux.Bssid, pOidBssid); @@ -519,7 +519,7 @@ void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* find the desired BSS in the latest SCAN result table */ BssIdx = BssTableSearch(&pAd->ScanTab, pOidBssid, pAd->MlmeAux.Channel); if (BssIdx == BSS_NOT_FOUND) { - MLME_SCAN_REQ_STRUCT ScanReq; + struct rt_mlme_scan_req ScanReq; DBGPRINT(RT_DEBUG_TRACE, ("CNTL - BSSID not found. reply NDIS_STATUS_NOT_ACCEPTED\n")); @@ -530,7 +530,7 @@ void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ScanParmFill(pAd, &ScanReq, (char *)pAd->MlmeAux.Ssid, pAd->MlmeAux.SsidLen, BSS_ANY, SCAN_ACTIVE); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_SCAN_REQ, - sizeof(MLME_SCAN_REQ_STRUCT), &ScanReq); + sizeof(struct rt_mlme_scan_req), &ScanReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_LIST_SCAN; /* Reset Missed scan number */ NdisGetSystemUpTime(&pAd->StaCfg.LastScanTime); @@ -551,7 +551,7 @@ void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) pAd->MlmeAux.BssIdx = 0; pAd->MlmeAux.SsidBssTab.BssNr = 1; NdisMoveMemory(&pAd->MlmeAux.SsidBssTab.BssEntry[0], - &pAd->ScanTab.BssEntry[BssIdx], sizeof(BSS_ENTRY)); + &pAd->ScanTab.BssEntry[BssIdx], sizeof(struct rt_bss_entry)); /* Add SSID into MlmeAux for site surey joining hidden SSID */ pAd->MlmeAux.SsidLen = pAd->ScanTab.BssEntry[BssIdx].SsidLen; @@ -568,7 +568,7 @@ void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) REASON_DISASSOC_STA_LEAVING); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_DISASSOC; @@ -660,7 +660,7 @@ void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) JoinParmFill(pAd, &JoinReq, pAd->MlmeAux.BssIdx); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_JOIN_REQ, - sizeof(MLME_JOIN_REQ_STRUCT), &JoinReq); + sizeof(struct rt_mlme_join_req), &JoinReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_JOIN; } @@ -675,7 +675,7 @@ void CntlOidRTBssidProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* or been corrupted by other "SET OID"? */ /* */ /* IRQL = DISPATCH_LEVEL */ -void CntlMlmeRoamingProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlMlmeRoamingProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 BBPValue = 0; @@ -705,9 +705,9 @@ void CntlMlmeRoamingProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlWaitDisassocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlWaitDisassocProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_START_REQ_STRUCT StartReq; + struct rt_mlme_start_req StartReq; if (Elem->MsgType == MT2_DISASSOC_CONF) { DBGPRINT(RT_DEBUG_TRACE, ("CNTL - Dis-associate successful\n")); @@ -729,7 +729,7 @@ void CntlWaitDisassocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) StartParmFill(pAd, &StartReq, (char *)pAd->MlmeAux.Ssid, pAd->MlmeAux.SsidLen); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_START_REQ, - sizeof(MLME_START_REQ_STRUCT), &StartReq); + sizeof(struct rt_mlme_start_req), &StartReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_START; } /* case 2. try each matched BSS */ @@ -749,10 +749,10 @@ void CntlWaitDisassocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlWaitJoinProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlWaitJoinProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Reason; - MLME_AUTH_REQ_STRUCT AuthReq; + struct rt_mlme_auth_req AuthReq; if (Elem->MsgType == MT2_JOIN_CONF) { NdisMoveMemory(&Reason, Elem->Msg, sizeof(u16)); @@ -809,7 +809,7 @@ void CntlWaitJoinProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) MlmeEnqueue(pAd, AUTH_STATE_MACHINE, MT2_MLME_AUTH_REQ, sizeof - (MLME_AUTH_REQ_STRUCT), + (struct rt_mlme_auth_req), &AuthReq); } @@ -832,7 +832,7 @@ void CntlWaitJoinProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlWaitStartProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlWaitStartProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Result; @@ -859,7 +859,7 @@ void CntlWaitStartProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) SetCommonHT(pAd); NdisMoveMemory(&pAd->MlmeAux.AddHtInfo, &pAd->CommonCfg.AddHTInfo, - sizeof(ADD_HT_INFO_IE)); + sizeof(struct rt_add_ht_info_ie)); RTMPCheckHt(pAd, BSSID_WCID, &pAd->CommonCfg.HtCapability, &pAd->CommonCfg.AddHTInfo); @@ -925,11 +925,11 @@ void CntlWaitStartProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlWaitAuthProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlWaitAuthProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Reason; - MLME_ASSOC_REQ_STRUCT AssocReq; - MLME_AUTH_REQ_STRUCT AuthReq; + struct rt_mlme_assoc_req AssocReq; + struct rt_mlme_auth_req AuthReq; if (Elem->MsgType == MT2_AUTH_CONF) { NdisMoveMemory(&Reason, Elem->Msg, sizeof(u16)); @@ -943,7 +943,7 @@ void CntlWaitAuthProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) { MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_ASSOC_REQ, - sizeof(MLME_ASSOC_REQ_STRUCT), + sizeof(struct rt_mlme_assoc_req), &AssocReq); pAd->Mlme.CntlMachine.CurrState = @@ -972,7 +972,7 @@ void CntlWaitAuthProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } MlmeEnqueue(pAd, AUTH_STATE_MACHINE, MT2_MLME_AUTH_REQ, - sizeof(MLME_AUTH_REQ_STRUCT), + sizeof(struct rt_mlme_auth_req), &AuthReq); } @@ -989,11 +989,11 @@ void CntlWaitAuthProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlWaitAuthProc2(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlWaitAuthProc2(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Reason; - MLME_ASSOC_REQ_STRUCT AssocReq; - MLME_AUTH_REQ_STRUCT AuthReq; + struct rt_mlme_assoc_req AssocReq; + struct rt_mlme_auth_req AuthReq; if (Elem->MsgType == MT2_AUTH_CONF) { NdisMoveMemory(&Reason, Elem->Msg, sizeof(u16)); @@ -1006,7 +1006,7 @@ void CntlWaitAuthProc2(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) { MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_ASSOC_REQ, - sizeof(MLME_ASSOC_REQ_STRUCT), + sizeof(struct rt_mlme_assoc_req), &AssocReq); pAd->Mlme.CntlMachine.CurrState = @@ -1022,7 +1022,7 @@ void CntlWaitAuthProc2(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Ndis802_11AuthModeOpen); MlmeEnqueue(pAd, AUTH_STATE_MACHINE, MT2_MLME_AUTH_REQ, - sizeof(MLME_AUTH_REQ_STRUCT), + sizeof(struct rt_mlme_auth_req), &AuthReq); pAd->Mlme.CntlMachine.CurrState = @@ -1047,7 +1047,7 @@ void CntlWaitAuthProc2(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlWaitAssocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlWaitAssocProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Reason; @@ -1085,7 +1085,7 @@ void CntlWaitAssocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void CntlWaitReassocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void CntlWaitReassocProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Result; @@ -1121,7 +1121,7 @@ void CntlWaitReassocProc(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void AdhocTurnOnQos(IN PRTMP_ADAPTER pAd) +void AdhocTurnOnQos(struct rt_rtmp_adapter *pAd) { #define AC0_DEF_TXOP 0 #define AC1_DEF_TXOP 0 @@ -1162,13 +1162,13 @@ void AdhocTurnOnQos(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void LinkUp(IN PRTMP_ADAPTER pAd, u8 BssType) +void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType) { unsigned long Now; u32 Data; BOOLEAN Cancelled; u8 Value = 0, idx = 0, HashIdx = 0; - MAC_TABLE_ENTRY *pEntry = NULL, *pCurrEntry = NULL; + struct rt_mac_table_entry *pEntry = NULL, *pCurrEntry = NULL; /* Init ChannelQuality to prevent DEAD_CQI at initial LinkUp */ pAd->Mlme.ChannelQuality = 50; @@ -1373,7 +1373,7 @@ void LinkUp(IN PRTMP_ADAPTER pAd, u8 BssType) FALSE); } - NdisZeroMemory(&pAd->DrsCounters, sizeof(COUNTER_DRS)); + NdisZeroMemory(&pAd->DrsCounters, sizeof(struct rt_counter_drs)); NdisGetSystemUpTime(&Now); pAd->StaCfg.LastBeaconRxTime = Now; /* last RX timestamp */ @@ -1439,7 +1439,7 @@ void LinkUp(IN PRTMP_ADAPTER pAd, u8 BssType) pAd->StaCfg.DefaultKeyId = 0; /* always be zero */ NdisZeroMemory(&pAd->SharedKey[BSS0][0], - sizeof(CIPHER_KEY)); + sizeof(struct rt_cipher_key)); pAd->SharedKey[BSS0][0].KeyLen = LEN_TKIP_EK; NdisMoveMemory(pAd->SharedKey[BSS0][0].Key, pAd->StaCfg.PMK, LEN_TKIP_EK); @@ -1873,7 +1873,7 @@ void LinkUp(IN PRTMP_ADAPTER pAd, u8 BssType) ========================================================================== */ -void LinkDown(IN PRTMP_ADAPTER pAd, IN BOOLEAN IsReqFromAP) +void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP) { u8 i, ByteValue = 0; @@ -1996,8 +1996,8 @@ void LinkDown(IN PRTMP_ADAPTER pAd, IN BOOLEAN IsReqFromAP) pAd->CommonCfg.SsidLen = 0; } - NdisZeroMemory(&pAd->MlmeAux.HtCapability, sizeof(HT_CAPABILITY_IE)); - NdisZeroMemory(&pAd->MlmeAux.AddHtInfo, sizeof(ADD_HT_INFO_IE)); + NdisZeroMemory(&pAd->MlmeAux.HtCapability, sizeof(struct rt_ht_capability_ie)); + NdisZeroMemory(&pAd->MlmeAux.AddHtInfo, sizeof(struct rt_add_ht_info_ie)); pAd->MlmeAux.HtCapabilityLen = 0; pAd->MlmeAux.NewExtChannelOffset = 0xff; @@ -2030,7 +2030,7 @@ void LinkDown(IN PRTMP_ADAPTER pAd, IN BOOLEAN IsReqFromAP) } NdisAcquireSpinLock(&pAd->MacTabLock); - NdisZeroMemory(&pAd->MacTab, sizeof(MAC_TABLE)); + NdisZeroMemory(&pAd->MacTab, sizeof(struct rt_mac_table)); pAd->MacTab.Content[BSSID_WCID].PortSecured = pAd->StaCfg.PortSecured; NdisReleaseSpinLock(&pAd->MacTabLock); @@ -2048,9 +2048,9 @@ void LinkDown(IN PRTMP_ADAPTER pAd, IN BOOLEAN IsReqFromAP) /* Clean association information */ NdisZeroMemory(&pAd->StaCfg.AssocInfo, - sizeof(NDIS_802_11_ASSOCIATION_INFORMATION)); + sizeof(struct rt_ndis_802_11_association_information)); pAd->StaCfg.AssocInfo.Length = - sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); + sizeof(struct rt_ndis_802_11_association_information); pAd->StaCfg.ReqVarIELen = 0; pAd->StaCfg.ResVarIELen = 0; @@ -2122,10 +2122,10 @@ void LinkDown(IN PRTMP_ADAPTER pAd, IN BOOLEAN IsReqFromAP) ========================================================================== */ -void IterateOnBssTab(IN PRTMP_ADAPTER pAd) +void IterateOnBssTab(struct rt_rtmp_adapter *pAd) { - MLME_START_REQ_STRUCT StartReq; - MLME_JOIN_REQ_STRUCT JoinReq; + struct rt_mlme_start_req StartReq; + struct rt_mlme_join_req JoinReq; unsigned long BssIdx; /* Change the wepstatus to original wepstatus */ @@ -2200,7 +2200,7 @@ void IterateOnBssTab(IN PRTMP_ADAPTER pAd) pAd->MlmeAux.SsidBssTab.BssNr)); JoinParmFill(pAd, &JoinReq, BssIdx); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_JOIN_REQ, - sizeof(MLME_JOIN_REQ_STRUCT), &JoinReq); + sizeof(struct rt_mlme_join_req), &JoinReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_JOIN; } else if (pAd->StaCfg.BssType == BSS_ADHOC) { DBGPRINT(RT_DEBUG_TRACE, @@ -2209,7 +2209,7 @@ void IterateOnBssTab(IN PRTMP_ADAPTER pAd) StartParmFill(pAd, &StartReq, (char *)pAd->MlmeAux.Ssid, pAd->MlmeAux.SsidLen); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_START_REQ, - sizeof(MLME_START_REQ_STRUCT), &StartReq); + sizeof(struct rt_mlme_start_req), &StartReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_START; } else /* no more BSS */ { @@ -2228,11 +2228,11 @@ void IterateOnBssTab(IN PRTMP_ADAPTER pAd) /* for re-association only */ /* IRQL = DISPATCH_LEVEL */ -void IterateOnBssTab2(IN PRTMP_ADAPTER pAd) +void IterateOnBssTab2(struct rt_rtmp_adapter *pAd) { - MLME_REASSOC_REQ_STRUCT ReassocReq; + struct rt_mlme_assoc_req ReassocReq; unsigned long BssIdx; - BSS_ENTRY *pBss; + struct rt_bss_entry *pBss; BssIdx = pAd->MlmeAux.RoamIdx; pBss = &pAd->MlmeAux.RoamTab.BssEntry[BssIdx]; @@ -2250,7 +2250,7 @@ void IterateOnBssTab2(IN PRTMP_ADAPTER pAd) pBss->CapabilityInfo, ASSOC_TIMEOUT, pAd->StaCfg.DefaultListenCount); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_REASSOC_REQ, - sizeof(MLME_REASSOC_REQ_STRUCT), &ReassocReq); + sizeof(struct rt_mlme_assoc_req), &ReassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_REASSOC; } else /* no more BSS */ @@ -2276,8 +2276,8 @@ void IterateOnBssTab2(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void JoinParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_JOIN_REQ_STRUCT * JoinReq, unsigned long BssIdx) +void JoinParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_join_req *JoinReq, unsigned long BssIdx) { JoinReq->BssIdx = BssIdx; } @@ -2290,8 +2290,8 @@ void JoinParmFill(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void ScanParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_SCAN_REQ_STRUCT * ScanReq, +void ScanParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_scan_req *ScanReq, char Ssid[], u8 SsidLen, u8 BssType, u8 ScanType) { @@ -2310,8 +2310,8 @@ void ScanParmFill(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void StartParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_START_REQ_STRUCT * StartReq, +void StartParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_start_req *StartReq, char Ssid[], u8 SsidLen) { ASSERT(SsidLen <= MAX_LEN_OF_SSID); @@ -2327,8 +2327,8 @@ void StartParmFill(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void AuthParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_AUTH_REQ_STRUCT * AuthReq, +void AuthParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_auth_req *AuthReq, u8 *pAddr, u16 Alg) { COPY_MAC_ADDR(AuthReq->Addr, pAddr); @@ -2345,9 +2345,9 @@ void AuthParmFill(IN PRTMP_ADAPTER pAd, ========================================================================== */ #ifdef RTMP_MAC_PCI -void ComposePsPoll(IN PRTMP_ADAPTER pAd) +void ComposePsPoll(struct rt_rtmp_adapter *pAd) { - NdisZeroMemory(&pAd->PsPollFrame, sizeof(PSPOLL_FRAME)); + NdisZeroMemory(&pAd->PsPollFrame, sizeof(struct rt_pspoll_frame)); pAd->PsPollFrame.FC.Type = BTYPE_CNTL; pAd->PsPollFrame.FC.SubType = SUBTYPE_PS_POLL; pAd->PsPollFrame.Aid = pAd->StaActive.Aid | 0xC000; @@ -2356,9 +2356,9 @@ void ComposePsPoll(IN PRTMP_ADAPTER pAd) } /* IRQL = DISPATCH_LEVEL */ -void ComposeNullFrame(IN PRTMP_ADAPTER pAd) +void ComposeNullFrame(struct rt_rtmp_adapter *pAd) { - NdisZeroMemory(&pAd->NullFrame, sizeof(HEADER_802_11)); + NdisZeroMemory(&pAd->NullFrame, sizeof(struct rt_header_802_11)); pAd->NullFrame.FC.Type = BTYPE_DATA; pAd->NullFrame.FC.SubType = SUBTYPE_NULL_FUNC; pAd->NullFrame.FC.ToDs = 1; @@ -2368,19 +2368,19 @@ void ComposeNullFrame(IN PRTMP_ADAPTER pAd) } #endif /* RTMP_MAC_PCI // */ #ifdef RTMP_MAC_USB -void MlmeCntlConfirm(IN PRTMP_ADAPTER pAd, unsigned long MsgType, u16 Msg) +void MlmeCntlConfirm(struct rt_rtmp_adapter *pAd, unsigned long MsgType, u16 Msg) { MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MsgType, sizeof(u16), &Msg); } -void ComposePsPoll(IN PRTMP_ADAPTER pAd) +void ComposePsPoll(struct rt_rtmp_adapter *pAd) { - PTXINFO_STRUC pTxInfo; - PTXWI_STRUC pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi * pTxWI; DBGPRINT(RT_DEBUG_TRACE, ("ComposePsPoll\n")); - NdisZeroMemory(&pAd->PsPollFrame, sizeof(PSPOLL_FRAME)); + NdisZeroMemory(&pAd->PsPollFrame, sizeof(struct rt_pspoll_frame)); pAd->PsPollFrame.FC.PwrMgmt = 0; pAd->PsPollFrame.FC.Type = BTYPE_CNTL; @@ -2392,33 +2392,33 @@ void ComposePsPoll(IN PRTMP_ADAPTER pAd) RTMPZeroMemory(&pAd->PsPollContext.TransferBuffer->field. WirelessPacket[0], 100); pTxInfo = - (PTXINFO_STRUC) & pAd->PsPollContext.TransferBuffer->field. + (struct rt_txinfo *)& pAd->PsPollContext.TransferBuffer->field. WirelessPacket[0]; RTMPWriteTxInfo(pAd, pTxInfo, - (u16)(sizeof(PSPOLL_FRAME) + TXWI_SIZE), TRUE, + (u16)(sizeof(struct rt_pspoll_frame) + TXWI_SIZE), TRUE, EpToQueue[MGMTPIPEIDX], FALSE, FALSE); pTxWI = - (PTXWI_STRUC) & pAd->PsPollContext.TransferBuffer->field. + (struct rt_txwi *) & pAd->PsPollContext.TransferBuffer->field. WirelessPacket[TXINFO_SIZE]; RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0, - BSSID_WCID, (sizeof(PSPOLL_FRAME)), 0, 0, + BSSID_WCID, (sizeof(struct rt_pspoll_frame)), 0, 0, (u8)pAd->CommonCfg.MlmeTransmit.field.MCS, IFS_BACKOFF, FALSE, &pAd->CommonCfg.MlmeTransmit); RTMPMoveMemory(&pAd->PsPollContext.TransferBuffer->field. WirelessPacket[TXWI_SIZE + TXINFO_SIZE], - &pAd->PsPollFrame, sizeof(PSPOLL_FRAME)); + &pAd->PsPollFrame, sizeof(struct rt_pspoll_frame)); /* Append 4 extra zero bytes. */ pAd->PsPollContext.BulkOutSize = - TXINFO_SIZE + TXWI_SIZE + sizeof(PSPOLL_FRAME) + 4; + TXINFO_SIZE + TXWI_SIZE + sizeof(struct rt_pspoll_frame) + 4; } /* IRQL = DISPATCH_LEVEL */ -void ComposeNullFrame(IN PRTMP_ADAPTER pAd) +void ComposeNullFrame(struct rt_rtmp_adapter *pAd) { - PTXINFO_STRUC pTxInfo; - PTXWI_STRUC pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi * pTxWI; - NdisZeroMemory(&pAd->NullFrame, sizeof(HEADER_802_11)); + NdisZeroMemory(&pAd->NullFrame, sizeof(struct rt_header_802_11)); pAd->NullFrame.FC.Type = BTYPE_DATA; pAd->NullFrame.FC.SubType = SUBTYPE_NULL_FUNC; pAd->NullFrame.FC.ToDs = 1; @@ -2428,21 +2428,21 @@ void ComposeNullFrame(IN PRTMP_ADAPTER pAd) RTMPZeroMemory(&pAd->NullContext.TransferBuffer->field. WirelessPacket[0], 100); pTxInfo = - (PTXINFO_STRUC) & pAd->NullContext.TransferBuffer->field. + (struct rt_txinfo *)& pAd->NullContext.TransferBuffer->field. WirelessPacket[0]; RTMPWriteTxInfo(pAd, pTxInfo, - (u16)(sizeof(HEADER_802_11) + TXWI_SIZE), TRUE, + (u16)(sizeof(struct rt_header_802_11) + TXWI_SIZE), TRUE, EpToQueue[MGMTPIPEIDX], FALSE, FALSE); pTxWI = - (PTXWI_STRUC) & pAd->NullContext.TransferBuffer->field. + (struct rt_txwi *) & pAd->NullContext.TransferBuffer->field. WirelessPacket[TXINFO_SIZE]; RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0, - BSSID_WCID, (sizeof(HEADER_802_11)), 0, 0, + BSSID_WCID, (sizeof(struct rt_header_802_11)), 0, 0, (u8)pAd->CommonCfg.MlmeTransmit.field.MCS, IFS_BACKOFF, FALSE, &pAd->CommonCfg.MlmeTransmit); RTMPMoveMemory(&pAd->NullContext.TransferBuffer->field. WirelessPacket[TXWI_SIZE + TXINFO_SIZE], &pAd->NullFrame, - sizeof(HEADER_802_11)); + sizeof(struct rt_header_802_11)); pAd->NullContext.BulkOutSize = TXINFO_SIZE + TXWI_SIZE + sizeof(pAd->NullFrame) + 4; } @@ -2458,15 +2458,15 @@ void ComposeNullFrame(IN PRTMP_ADAPTER pAd) ========================================================================== */ -unsigned long MakeIbssBeacon(IN PRTMP_ADAPTER pAd) +unsigned long MakeIbssBeacon(struct rt_rtmp_adapter *pAd) { u8 DsLen = 1, IbssLen = 2; u8 LocalErpIe[3] = { IE_ERP, 1, 0x04 }; - HEADER_802_11 BcnHdr; + struct rt_header_802_11 BcnHdr; u16 CapabilityInfo; LARGE_INTEGER FakeTimestamp; unsigned long FrameLen = 0; - PTXWI_STRUC pTxWI = &pAd->BeaconTxWI; + struct rt_txwi * pTxWI = &pAd->BeaconTxWI; u8 *pBeaconFrame = pAd->BeaconBuf; BOOLEAN Privacy; u8 SupRate[MAX_LEN_OF_SUPPORTED_RATES]; @@ -2542,7 +2542,7 @@ unsigned long MakeIbssBeacon(IN PRTMP_ADAPTER pAd) 0, 0); MakeOutgoingFrame(pBeaconFrame, &FrameLen, - sizeof(HEADER_802_11), &BcnHdr, + sizeof(struct rt_header_802_11), &BcnHdr, TIMESTAMP_LEN, &FakeTimestamp, 2, &pAd->CommonCfg.BeaconPeriod, 2, &CapabilityInfo, diff --git a/drivers/staging/rt2860/sta/rtmp_data.c b/drivers/staging/rt2860/sta/rtmp_data.c index 3d2d67817768..8c0ab2df0011 100644 --- a/drivers/staging/rt2860/sta/rtmp_data.c +++ b/drivers/staging/rt2860/sta/rtmp_data.c @@ -36,12 +36,12 @@ */ #include "../rt_config.h" -void STARxEAPOLFrameIndicate(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void STARxEAPOLFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD); - PRXWI_STRUC pRxWI = pRxBlk->pRxWI; + struct rt_rxwi * pRxWI = pRxBlk->pRxWI; u8 *pTmpBuf; if (pAd->StaCfg.WpaSupplicantUP) { @@ -76,7 +76,7 @@ void STARxEAPOLFrameIndicate(IN PRTMP_ADAPTER pAd, if (pAd->StaCfg.DesireSharedKey[idx]. KeyLen > 0) { #ifdef RTMP_MAC_PCI - MAC_TABLE_ENTRY *pEntry = + struct rt_mac_table_entry *pEntry = &pAd->MacTab. Content[BSSID_WCID]; @@ -109,11 +109,11 @@ void STARxEAPOLFrameIndicate(IN PRTMP_ADAPTER pAd, #ifdef RTMP_MAC_USB union { char buf[sizeof - (NDIS_802_11_WEP) + (struct rt_ndis_802_11_wep) + MAX_LEN_OF_KEY - 1]; - NDIS_802_11_WEP keyinfo; + struct rt_ndis_802_11_wep keyinfo; } WepKey; int len; @@ -202,9 +202,9 @@ void STARxEAPOLFrameIndicate(IN PRTMP_ADAPTER pAd, } -void STARxDataFrameAnnounce(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void STARxDataFrameAnnounce(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { /* non-EAP frame */ @@ -265,14 +265,14 @@ void STARxDataFrameAnnounce(IN PRTMP_ADAPTER pAd, } /* For TKIP frame, calculate the MIC value */ -BOOLEAN STACheckTkipMICValue(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN RX_BLK * pRxBlk) +BOOLEAN STACheckTkipMICValue(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_rx_blk *pRxBlk) { - PHEADER_802_11 pHeader = pRxBlk->pHeader; + struct rt_header_802_11 * pHeader = pRxBlk->pHeader; u8 *pData = pRxBlk->pData; u16 DataSize = pRxBlk->DataSize; u8 UserPriority = pRxBlk->UserPriority; - PCIPHER_KEY pWpaKey; + struct rt_cipher_key *pWpaKey; u8 *pDA, *pSA; pWpaKey = &pAd->SharedKey[BSS0][pRxBlk->pRxWI->KeyIndex]; @@ -311,21 +311,21 @@ BOOLEAN STACheckTkipMICValue(IN PRTMP_ADAPTER pAd, } /* */ -/* All Rx routines use RX_BLK structure to hande rx events */ +/* All Rx routines use struct rt_rx_blk structure to hande rx events */ /* It is very important to build pRxBlk attributes */ /* 1. pHeader pointer to 802.11 Header */ /* 2. pData pointer to payload including LLC (just skip Header) */ /* 3. set payload size including LLC to DataSize */ /* 4. set some flags with RX_BLK_SET_FLAG() */ /* */ -void STAHandleRxDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) +void STAHandleRxDataFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) { PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD); - PRXWI_STRUC pRxWI = pRxBlk->pRxWI; - PHEADER_802_11 pHeader = pRxBlk->pHeader; + struct rt_rxwi * pRxWI = pRxBlk->pRxWI; + struct rt_header_802_11 * pHeader = pRxBlk->pHeader; void *pRxPacket = pRxBlk->pRxPacket; BOOLEAN bFragment = FALSE; - MAC_TABLE_ENTRY *pEntry = NULL; + struct rt_mac_table_entry *pEntry = NULL; u8 FromWhichBSSID = BSS0; u8 UserPriority = 0; @@ -610,11 +610,11 @@ void STAHandleRxDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) RELEASE_NDIS_PACKET(pAd, pRxPacket, NDIS_STATUS_FAILURE); } -void STAHandleRxMgmtFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) +void STAHandleRxMgmtFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) { PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD); - PRXWI_STRUC pRxWI = pRxBlk->pRxWI; - PHEADER_802_11 pHeader = pRxBlk->pHeader; + struct rt_rxwi * pRxWI = pRxBlk->pRxWI; + struct rt_header_802_11 * pHeader = pRxBlk->pHeader; void *pRxPacket = pRxBlk->pRxPacket; do { @@ -656,10 +656,10 @@ void STAHandleRxMgmtFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) RELEASE_NDIS_PACKET(pAd, pRxPacket, NDIS_STATUS_SUCCESS); } -void STAHandleRxControlFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) +void STAHandleRxControlFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) { - PRXWI_STRUC pRxWI = pRxBlk->pRxWI; - PHEADER_802_11 pHeader = pRxBlk->pHeader; + struct rt_rxwi * pRxWI = pRxBlk->pRxWI; + struct rt_header_802_11 * pHeader = pRxBlk->pHeader; void *pRxPacket = pRxBlk->pRxPacket; switch (pHeader->FC.SubType) { @@ -667,7 +667,7 @@ void STAHandleRxControlFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) { CntlEnqueueForRecv(pAd, pRxWI->WirelessCliID, (pRxWI->MPDUtotalByteCount), - (PFRAME_BA_REQ) pHeader); + (struct rt_frame_ba_req *) pHeader); } break; case SUBTYPE_BLOCK_ACK: @@ -698,17 +698,17 @@ void STAHandleRxControlFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) Need to consider QOS DATA format when converting to 802.3 ======================================================================== */ -BOOLEAN STARxDoneInterruptHandle(IN PRTMP_ADAPTER pAd, IN BOOLEAN argc) +BOOLEAN STARxDoneInterruptHandle(struct rt_rtmp_adapter *pAd, IN BOOLEAN argc) { int Status; u32 RxProcessed, RxPending; BOOLEAN bReschedule = FALSE; - RT28XX_RXD_STRUC *pRxD; + PRT28XX_RXD_STRUC pRxD; u8 *pData; - PRXWI_STRUC pRxWI; + struct rt_rxwi * pRxWI; void *pRxPacket; - PHEADER_802_11 pHeader; - RX_BLK RxCell; + struct rt_header_802_11 * pHeader; + struct rt_rx_blk RxCell; RxProcessed = RxPending = 0; @@ -750,8 +750,8 @@ BOOLEAN STARxDoneInterruptHandle(IN PRTMP_ADAPTER pAd, IN BOOLEAN argc) pRxD = &(RxCell.RxD); /* get rx data buffer */ pData = GET_OS_PKT_DATAPTR(pRxPacket); - pRxWI = (PRXWI_STRUC) pData; - pHeader = (PHEADER_802_11) (pData + RXWI_SIZE); + pRxWI = (struct rt_rxwi *) pData; + pHeader = (struct rt_header_802_11 *) (pData + RXWI_SIZE); /* build RxCell */ RxCell.pRxWI = pRxWI; @@ -833,7 +833,7 @@ BOOLEAN STARxDoneInterruptHandle(IN PRTMP_ADAPTER pAd, IN BOOLEAN argc) ======================================================================== */ -void RTMPHandleTwakeupInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandleTwakeupInterrupt(struct rt_rtmp_adapter *pAd) { AsicForceWakeup(pAd, FALSE); } @@ -860,7 +860,7 @@ void STASendPackets(void *MiniportAdapterContext, void **ppPacketArray, u32 NumberOfPackets) { u32 Index; - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) MiniportAdapterContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)MiniportAdapterContext; void *pPacket; BOOLEAN allowToSend = FALSE; @@ -920,16 +920,16 @@ Note: You only can put OS-indepened & STA related code in here. ======================================================================== */ -int STASendPacket(IN PRTMP_ADAPTER pAd, void *pPacket) +int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; u32 AllowFragSize; u8 NumberOfFrag; u8 RTSRequired; u8 QueIdx, UserPriority; - MAC_TABLE_ENTRY *pEntry = NULL; + struct rt_mac_table_entry *pEntry = NULL; unsigned int IrqFlags; u8 FlgIsIP = 0; u8 Rate; @@ -1144,7 +1144,7 @@ int STASendPacket(IN PRTMP_ADAPTER pAd, void *pPacket) if ((pAd->CommonCfg.BACapability.field.AutoBA == TRUE) && IS_HT_STA(pEntry)) { - /*PMAC_TABLE_ENTRY pMacEntry = &pAd->MacTab.Content[BSSID_WCID]; */ + /*struct rt_mac_table_entry *pMacEntry = &pAd->MacTab.Content[BSSID_WCID]; */ if (((pEntry->TXBAbitmap & (1 << UserPriority)) == 0) && ((pEntry->BADeclineBitmap & (1 << UserPriority)) == 0) && (pEntry->PortSecured == WPA_802_1X_PORT_SECURED) @@ -1189,7 +1189,7 @@ int STASendPacket(IN PRTMP_ADAPTER pAd, void *pPacket) ======================================================================== */ #ifdef RTMP_MAC_PCI -int RTMPFreeTXDRequest(IN PRTMP_ADAPTER pAd, +int RTMPFreeTXDRequest(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 NumberRequired, u8 *FreeNumberIs) { @@ -1244,14 +1244,14 @@ int RTMPFreeTXDRequest(IN PRTMP_ADAPTER pAd, Actually, this function used to check if the TxHardware Queue still has frame need to send. If no frame need to send, go to sleep, else, still wake up. */ -int RTMPFreeTXDRequest(IN PRTMP_ADAPTER pAd, +int RTMPFreeTXDRequest(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 NumberRequired, u8 *FreeNumberIs) { /*unsigned long FreeNumber = 0; */ int Status = NDIS_STATUS_FAILURE; unsigned long IrqFlags; - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; switch (QueIdx) { case QID_AC_BK: @@ -1289,16 +1289,16 @@ int RTMPFreeTXDRequest(IN PRTMP_ADAPTER pAd, } #endif /* RTMP_MAC_USB // */ -void RTMPSendDisassociationFrame(IN PRTMP_ADAPTER pAd) +void RTMPSendDisassociationFrame(struct rt_rtmp_adapter *pAd) { } -void RTMPSendNullFrame(IN PRTMP_ADAPTER pAd, +void RTMPSendNullFrame(struct rt_rtmp_adapter *pAd, u8 TxRate, IN BOOLEAN bQosNull) { u8 NullFrame[48]; unsigned long Length; - PHEADER_802_11 pHeader_802_11; + struct rt_header_802_11 * pHeader_802_11; /* WPA 802.1x secured port control */ if (((pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA) || @@ -1311,9 +1311,9 @@ void RTMPSendNullFrame(IN PRTMP_ADAPTER pAd, } NdisZeroMemory(NullFrame, 48); - Length = sizeof(HEADER_802_11); + Length = sizeof(struct rt_header_802_11); - pHeader_802_11 = (PHEADER_802_11) NullFrame; + pHeader_802_11 = (struct rt_header_802_11 *) NullFrame; pHeader_802_11->FC.Type = BTYPE_DATA; pHeader_802_11->FC.SubType = SUBTYPE_NULL_FUNC; @@ -1349,7 +1349,7 @@ void RTMPSendNullFrame(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -void RTMPSendRTSFrame(IN PRTMP_ADAPTER pAd, +void RTMPSendRTSFrame(struct rt_rtmp_adapter *pAd, u8 *pDA, IN unsigned int NextMpduSize, u8 TxRate, @@ -1367,13 +1367,13 @@ void RTMPSendRTSFrame(IN PRTMP_ADAPTER pAd, /* In Cisco CCX 2.0 Leap Authentication */ /* WepStatus is Ndis802_11Encryption1Enabled but the key will use PairwiseKey */ /* Instead of the SharedKey, SharedKey Length may be Zero. */ -void STAFindCipherAlgorithm(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) +void STAFindCipherAlgorithm(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { NDIS_802_11_ENCRYPTION_STATUS Cipher; /* To indicate cipher used for this packet */ u8 CipherAlg = CIPHER_NONE; /* cipher alogrithm */ u8 KeyIdx = 0xff; u8 *pSrcBufVA; - PCIPHER_KEY pKey = NULL; + struct rt_cipher_key *pKey = NULL; pSrcBufVA = GET_OS_PKT_DATAPTR(pTxBlk->pPacket); @@ -1429,21 +1429,21 @@ void STAFindCipherAlgorithm(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) pTxBlk->pKey = pKey; } -void STABuildCommon802_11Header(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) +void STABuildCommon802_11Header(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { - HEADER_802_11 *pHeader_802_11; + struct rt_header_802_11 *pHeader_802_11; /* */ /* MAKE A COMMON 802.11 HEADER */ /* */ /* normal wlan header size : 24 octets */ - pTxBlk->MpduHeaderLen = sizeof(HEADER_802_11); + pTxBlk->MpduHeaderLen = sizeof(struct rt_header_802_11); pHeader_802_11 = - (HEADER_802_11 *) & pTxBlk->HeaderBuf[TXINFO_SIZE + TXWI_SIZE]; + (struct rt_header_802_11 *) & pTxBlk->HeaderBuf[TXINFO_SIZE + TXWI_SIZE]; - NdisZeroMemory(pHeader_802_11, sizeof(HEADER_802_11)); + NdisZeroMemory(pHeader_802_11, sizeof(struct rt_header_802_11)); pHeader_802_11->FC.FrDs = 0; pHeader_802_11->FC.Type = BTYPE_DATA; @@ -1510,13 +1510,13 @@ void STABuildCommon802_11Header(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) pHeader_802_11->FC.PwrMgmt = (pAd->StaCfg.Psm == PWR_SAVE); } -void STABuildCache802_11Header(IN RTMP_ADAPTER * pAd, - IN TX_BLK * pTxBlk, u8 * pHeader) +void STABuildCache802_11Header(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 * pHeader) { - MAC_TABLE_ENTRY *pMacEntry; - PHEADER_802_11 pHeader80211; + struct rt_mac_table_entry *pMacEntry; + struct rt_header_802_11 * pHeader80211; - pHeader80211 = (PHEADER_802_11) pHeader; + pHeader80211 = (struct rt_header_802_11 *) pHeader; pMacEntry = pTxBlk->pMacEntry; /* */ @@ -1524,7 +1524,7 @@ void STABuildCache802_11Header(IN RTMP_ADAPTER * pAd, /* */ /* normal wlan header size : 24 octets */ - pTxBlk->MpduHeaderLen = sizeof(HEADER_802_11); + pTxBlk->MpduHeaderLen = sizeof(struct rt_header_802_11); /* More Bit */ pHeader80211->FC.MoreData = TX_BLK_TEST_FLAG(pTxBlk, fTX_bMoreData); @@ -1556,20 +1556,20 @@ void STABuildCache802_11Header(IN RTMP_ADAPTER * pAd, pHeader80211->FC.PwrMgmt = (pAd->StaCfg.Psm == PWR_SAVE); } -static inline u8 *STA_Build_ARalink_Frame_Header(IN RTMP_ADAPTER * pAd, - IN TX_BLK * pTxBlk) +static inline u8 *STA_Build_ARalink_Frame_Header(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk) { u8 *pHeaderBufPtr; - HEADER_802_11 *pHeader_802_11; + struct rt_header_802_11 *pHeader_802_11; void *pNextPacket; u32 nextBufLen; - PQUEUE_ENTRY pQEntry; + struct rt_queue_entry *pQEntry; STAFindCipherAlgorithm(pAd, pTxBlk); STABuildCommon802_11Header(pAd, pTxBlk); pHeaderBufPtr = &pTxBlk->HeaderBuf[TXINFO_SIZE + TXWI_SIZE]; - pHeader_802_11 = (HEADER_802_11 *) pHeaderBufPtr; + pHeader_802_11 = (struct rt_header_802_11 *) pHeaderBufPtr; /* steal "order" bit to mark "aggregation" */ pHeader_802_11->FC.Order = 1; @@ -1593,7 +1593,7 @@ static inline u8 *STA_Build_ARalink_Frame_Header(IN RTMP_ADAPTER * pAd, pTxBlk->HdrPadLen = (unsigned long)(pHeaderBufPtr - pTxBlk->HdrPadLen); /* For RA Aggregation, */ - /* put the 2nd MSDU length(extra 2-byte field) after QOS_CONTROL in little endian format */ + /* put the 2nd MSDU length(extra 2-byte field) after struct rt_qos_control in little endian format */ pQEntry = pTxBlk->TxPacketList.Head; pNextPacket = QUEUE_ENTRY_TO_PACKET(pQEntry); nextBufLen = GET_OS_PKT_LEN(pNextPacket); @@ -1610,17 +1610,17 @@ static inline u8 *STA_Build_ARalink_Frame_Header(IN RTMP_ADAPTER * pAd, } -static inline u8 *STA_Build_AMSDU_Frame_Header(IN RTMP_ADAPTER * pAd, - IN TX_BLK * pTxBlk) +static inline u8 *STA_Build_AMSDU_Frame_Header(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk) { u8 *pHeaderBufPtr; /*, pSaveBufPtr; */ - HEADER_802_11 *pHeader_802_11; + struct rt_header_802_11 *pHeader_802_11; STAFindCipherAlgorithm(pAd, pTxBlk); STABuildCommon802_11Header(pAd, pTxBlk); pHeaderBufPtr = &pTxBlk->HeaderBuf[TXINFO_SIZE + TXWI_SIZE]; - pHeader_802_11 = (HEADER_802_11 *) pHeaderBufPtr; + pHeader_802_11 = (struct rt_header_802_11 *) pHeaderBufPtr; /* skip common header */ pHeaderBufPtr += pTxBlk->MpduHeaderLen; @@ -1655,14 +1655,14 @@ static inline u8 *STA_Build_AMSDU_Frame_Header(IN RTMP_ADAPTER * pAd, } -void STA_AMPDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) +void STA_AMPDU_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { - HEADER_802_11 *pHeader_802_11; + struct rt_header_802_11 *pHeader_802_11; u8 *pHeaderBufPtr; u16 FreeNumber; - MAC_TABLE_ENTRY *pMacEntry; + struct rt_mac_table_entry *pMacEntry; BOOLEAN bVLANPkt; - PQUEUE_ENTRY pQEntry; + struct rt_queue_entry *pQEntry; ASSERT(pTxBlk); @@ -1684,7 +1684,7 @@ void STA_AMPDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) NdisMoveMemory((u8 *)& pTxBlk-> HeaderBuf[TXINFO_SIZE], (u8 *)& pMacEntry->CachedBuf[0], - TXWI_SIZE + sizeof(HEADER_802_11)); + TXWI_SIZE + sizeof(struct rt_header_802_11)); pHeaderBufPtr = (u8 *)(&pTxBlk-> HeaderBuf[TXINFO_SIZE + TXWI_SIZE]); @@ -1697,7 +1697,7 @@ void STA_AMPDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) &pTxBlk->HeaderBuf[TXINFO_SIZE + TXWI_SIZE]; } - pHeader_802_11 = (HEADER_802_11 *) pHeaderBufPtr; + pHeader_802_11 = (struct rt_header_802_11 *) pHeaderBufPtr; /* skip common header */ pHeaderBufPtr += pTxBlk->MpduHeaderLen; @@ -1773,13 +1773,13 @@ void STA_AMPDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) if (pMacEntry->isCached) { RTMPWriteTxWI_Cache(pAd, - (PTXWI_STRUC) (&pTxBlk-> + (struct rt_txwi *) (&pTxBlk-> HeaderBuf [TXINFO_SIZE]), pTxBlk); } else { RTMPWriteTxWI_Data(pAd, - (PTXWI_STRUC) (&pTxBlk-> + (struct rt_txwi *) (&pTxBlk-> HeaderBuf [TXINFO_SIZE]), pTxBlk); @@ -1819,7 +1819,7 @@ void STA_AMPDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) } -void STA_AMSDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) +void STA_AMSDU_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { u8 *pHeaderBufPtr; u16 FreeNumber; @@ -1830,7 +1830,7 @@ void STA_AMSDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) u16 FirstTx = 0, LastTxIdx = 0; BOOLEAN bVLANPkt; int frameNum = 0; - PQUEUE_ENTRY pQEntry; + struct rt_queue_entry *pQEntry; ASSERT(pTxBlk); @@ -1864,7 +1864,7 @@ void STA_AMSDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) /* NOTE: TxWI->MPDUtotalByteCount will be updated after final frame was handled. */ RTMPWriteTxWI_Data(pAd, - (PTXWI_STRUC) (&pTxBlk-> + (struct rt_txwi *) (&pTxBlk-> HeaderBuf [TXINFO_SIZE]), pTxBlk); @@ -1951,13 +1951,13 @@ void STA_AMSDU_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) HAL_KickOutTx(pAd, pTxBlk, pTxBlk->QueIdx); } -void STA_Legacy_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) +void STA_Legacy_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { - HEADER_802_11 *pHeader_802_11; + struct rt_header_802_11 *pHeader_802_11; u8 *pHeaderBufPtr; u16 FreeNumber; BOOLEAN bVLANPkt; - PQUEUE_ENTRY pQEntry; + struct rt_queue_entry *pQEntry; ASSERT(pTxBlk); @@ -1996,7 +1996,7 @@ void STA_Legacy_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) } pHeaderBufPtr = &pTxBlk->HeaderBuf[TXINFO_SIZE + TXWI_SIZE]; - pHeader_802_11 = (HEADER_802_11 *) pHeaderBufPtr; + pHeader_802_11 = (struct rt_header_802_11 *) pHeaderBufPtr; /* skip common header */ pHeaderBufPtr += pTxBlk->MpduHeaderLen; @@ -2052,7 +2052,7 @@ void STA_Legacy_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) /* use Wcid as Key Index */ /* */ - RTMPWriteTxWI_Data(pAd, (PTXWI_STRUC) (&pTxBlk->HeaderBuf[TXINFO_SIZE]), + RTMPWriteTxWI_Data(pAd, (struct rt_txwi *) (&pTxBlk->HeaderBuf[TXINFO_SIZE]), pTxBlk); /*FreeNumber = GET_TXRING_FREENO(pAd, QueIdx); */ @@ -2069,7 +2069,7 @@ void STA_Legacy_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) HAL_KickOutTx(pAd, pTxBlk, pTxBlk->QueIdx); } -void STA_ARalink_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) +void STA_ARalink_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { u8 *pHeaderBufPtr; u16 FreeNumber; @@ -2077,7 +2077,7 @@ void STA_ARalink_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) u16 FirstTx, LastTxIdx; int frameNum = 0; BOOLEAN bVLANPkt; - PQUEUE_ENTRY pQEntry; + struct rt_queue_entry *pQEntry; ASSERT(pTxBlk); @@ -2115,7 +2115,7 @@ void STA_ARalink_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) /* It's ok write the TxWI here, because the TxWI->MPDUtotalByteCount */ /* will be updated after final frame was handled. */ RTMPWriteTxWI_Data(pAd, - (PTXWI_STRUC) (&pTxBlk-> + (struct rt_txwi *) (&pTxBlk-> HeaderBuf [TXINFO_SIZE]), pTxBlk); @@ -2186,19 +2186,19 @@ void STA_ARalink_Frame_Tx(IN PRTMP_ADAPTER pAd, IN TX_BLK * pTxBlk) } -void STA_Fragment_Frame_Tx(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) +void STA_Fragment_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { - HEADER_802_11 *pHeader_802_11; + struct rt_header_802_11 *pHeader_802_11; u8 *pHeaderBufPtr; u16 FreeNumber; u8 fragNum = 0; - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u16 EncryptionOverhead = 0; u32 FreeMpduSize, SrcRemainingBytes; u16 AckDuration; u32 NextMpduSize; BOOLEAN bVLANPkt; - PQUEUE_ENTRY pQEntry; + struct rt_queue_entry *pQEntry; HTTRANSMIT_SETTING *pTransmit; ASSERT(pTxBlk); @@ -2236,7 +2236,7 @@ void STA_Fragment_Frame_Tx(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) } pHeaderBufPtr = &pTxBlk->HeaderBuf[TXINFO_SIZE + TXWI_SIZE]; - pHeader_802_11 = (HEADER_802_11 *) pHeaderBufPtr; + pHeader_802_11 = (struct rt_header_802_11 *) pHeaderBufPtr; /* skip common header */ pHeaderBufPtr += pTxBlk->MpduHeaderLen; @@ -2375,7 +2375,7 @@ void STA_Fragment_Frame_Tx(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) pTxBlk->FrameGap = IFS_SIFS; RTMPWriteTxWI_Data(pAd, - (PTXWI_STRUC) (&pTxBlk-> + (struct rt_txwi *) (&pTxBlk-> HeaderBuf[TXINFO_SIZE]), pTxBlk); @@ -2434,11 +2434,11 @@ 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) +int STAHardTransmit(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 QueIdx) { char *pPacket; - PQUEUE_ENTRY pQEntry; + struct rt_queue_entry *pQEntry; /* --------------------------------------------- */ /* STEP 0. DO SANITY CHECK AND SOME EARLY PREPARATION. */ @@ -2537,7 +2537,7 @@ unsigned long HashBytesPolynomial(u8 * value, unsigned int len) return ret; } -void Sta_Announce_or_Forward_802_3_Packet(IN PRTMP_ADAPTER pAd, +void Sta_Announce_or_Forward_802_3_Packet(struct rt_rtmp_adapter *pAd, void *pPacket, u8 FromWhichBSSID) { diff --git a/drivers/staging/rt2860/sta/sanity.c b/drivers/staging/rt2860/sta/sanity.c index a79348f43bc4..64a0e8739048 100644 --- a/drivers/staging/rt2860/sta/sanity.c +++ b/drivers/staging/rt2860/sta/sanity.c @@ -54,14 +54,14 @@ extern u8 BROADCOM_OUI[]; TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -BOOLEAN MlmeStartReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeStartReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, char Ssid[], u8 * pSsidLen) { - MLME_START_REQ_STRUCT *Info; + struct rt_mlme_start_req *Info; - Info = (MLME_START_REQ_STRUCT *) (Msg); + Info = (struct rt_mlme_start_req *)(Msg); if (Info->SsidLen > MAX_LEN_OF_SSID) { DBGPRINT(RT_DEBUG_TRACE, @@ -86,15 +86,15 @@ BOOLEAN MlmeStartReqSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, void * pMsg, unsigned long MsgLen, u8 *pAddr2, u16 * pCapabilityInfo, u16 * pStatus, u16 * pAid, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, OUT HT_CAPABILITY_IE * pHtCapability, OUT ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +BOOLEAN PeerAssocRspSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pAddr2, u16 * pCapabilityInfo, u16 * pStatus, u16 * pAid, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 * pHtCapabilityLen, u8 * pAddHtInfoLen, u8 * pNewExtChannelOffset, - OUT PEDCA_PARM pEdcaParm, u8 * pCkipFlag) + struct rt_edca_parm *pEdcaParm, u8 * pCkipFlag) { char IeType, *Ptr; - PFRAME_802_11 pFrame = (PFRAME_802_11) pMsg; - PEID_STRUCT pEid; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) pMsg; + struct rt_eid * pEid; unsigned long Length = 0; *pNewExtChannelOffset = 0xff; @@ -136,7 +136,7 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, void * pMsg, unsigned long MsgL /* many AP implement proprietary IEs in non-standard order, we'd better */ /* tolerate mis-ordered IEs to get best compatibility */ - pEid = (PEID_STRUCT) & pFrame->Octet[8 + (*pSupRateLen)]; + pEid = (struct rt_eid *) & pFrame->Octet[8 + (*pSupRateLen)]; /* get variable fields from payload and advance the pointer */ while ((Length + 2 + pEid->Len) <= MsgLen) { @@ -171,11 +171,11 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, void * pMsg, unsigned long MsgL break; case IE_ADD_HT: case IE_ADD_HT2: - if (pEid->Len >= sizeof(ADD_HT_INFO_IE)) { + if (pEid->Len >= sizeof(struct rt_add_ht_info_ie)) { /* This IE allows extension, but we can ignore extra bytes beyond our knowledge , so only */ - /* copy first sizeof(ADD_HT_INFO_IE) */ + /* copy first sizeof(struct rt_add_ht_info_ie) */ NdisMoveMemory(pAddHtInfo, pEid->Octet, - sizeof(ADD_HT_INFO_IE)); + sizeof(struct rt_add_ht_info_ie)); *(u16 *) (&pAddHtInfo->AddHtInfo2) = cpu2le16(*(u16 *) @@ -237,7 +237,7 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, void * pMsg, unsigned long MsgL } Length = Length + 2 + pEid->Len; - pEid = (PEID_STRUCT) ((u8 *) pEid + 2 + pEid->Len); + pEid = (struct rt_eid *) ((u8 *) pEid + 2 + pEid->Len); } return TRUE; @@ -254,7 +254,7 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, void * pMsg, unsigned long MsgL ========================================================================== */ -BOOLEAN PeerProbeReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerProbeReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, @@ -263,7 +263,7 @@ BOOLEAN PeerProbeReqSanity(IN PRTMP_ADAPTER pAd, u8 Idx; u8 RateLen; char IeType; - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2); diff --git a/drivers/staging/rt2860/sta/sync.c b/drivers/staging/rt2860/sta/sync.c index 448e75f0df16..cbe90a6496d2 100644 --- a/drivers/staging/rt2860/sta/sync.c +++ b/drivers/staging/rt2860/sta/sync.c @@ -50,8 +50,8 @@ ========================================================================== */ -void SyncStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]) +void SyncStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *Sm, OUT STATE_MACHINE_FUNC Trans[]) { StateMachineInit(Sm, Trans, MAX_SYNC_STATE, MAX_SYNC_MSG, (STATE_MACHINE_FUNC) Drop, SYNC_IDLE, @@ -115,7 +115,7 @@ void BeaconTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; DBGPRINT(RT_DEBUG_TRACE, ("SYNC - BeaconTimeout\n")); @@ -155,7 +155,7 @@ void ScanTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -183,13 +183,13 @@ void ScanTimeout(void *SystemSpecific1, MLME SCAN req state machine procedure ========================================================================== */ -void MlmeScanReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeScanReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Ssid[MAX_LEN_OF_SSID], SsidLen, ScanType, BssType, BBPValue = 0; BOOLEAN TimerCancelled; unsigned long Now; u16 Status; - PHEADER_802_11 pHdr80211; + struct rt_header_802_11 * pHdr80211; u8 *pOutBuffer = NULL; int NStatus; @@ -241,7 +241,7 @@ void MlmeScanReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) && (INFRA_ON(pAd))) { NStatus = MlmeAllocateMemory(pAd, (void *)& pOutBuffer); if (NStatus == NDIS_STATUS_SUCCESS) { - pHdr80211 = (PHEADER_802_11) pOutBuffer; + pHdr80211 = (struct rt_header_802_11 *) pOutBuffer; MgtMacHeaderInit(pAd, pHdr80211, SUBTYPE_NULL_FUNC, 1, pAd->CommonCfg.Bssid, @@ -252,7 +252,7 @@ void MlmeScanReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* Send using priority queue */ MiniportMMRequest(pAd, 0, pOutBuffer, - sizeof(HEADER_802_11)); + sizeof(struct rt_header_802_11)); DBGPRINT(RT_DEBUG_TRACE, ("MlmeScanReqAction -- Send PSM Data frame for off channel RM\n")); MlmeFreeMemory(pAd, pOutBuffer); @@ -297,12 +297,12 @@ void MlmeScanReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) MLME JOIN req state machine procedure ========================================================================== */ -void MlmeJoinReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeJoinReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 BBPValue = 0; - BSS_ENTRY *pBss; + struct rt_bss_entry *pBss; BOOLEAN TimerCancelled; - HEADER_802_11 Hdr80211; + struct rt_header_802_11 Hdr80211; int NStatus; unsigned long FrameLen = 0; u8 *pOutBuffer = NULL; @@ -312,7 +312,7 @@ void MlmeJoinReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) u8 ExtRateLen; u8 ASupRate[] = { 0x8C, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6C }; u8 ASupRateLen = sizeof(ASupRate) / sizeof(u8); - MLME_JOIN_REQ_STRUCT *pInfo = (MLME_JOIN_REQ_STRUCT *) (Elem->Msg); + struct rt_mlme_join_req *pInfo = (struct rt_mlme_join_req *)(Elem->Msg); DBGPRINT(RT_DEBUG_TRACE, ("SYNC - MlmeJoinReqAction(BSS #%ld)\n", pInfo->BssIdx)); @@ -400,7 +400,7 @@ void MlmeJoinReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) BROADCAST_ADDR); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &Hdr80211, + sizeof(struct rt_header_802_11), &Hdr80211, 1, &SsidIe, 1, &pAd->MlmeAux.SsidLen, pAd->MlmeAux.SsidLen, @@ -437,20 +437,20 @@ void MlmeJoinReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) MLME START Request state machine procedure, starting an IBSS ========================================================================== */ -void MlmeStartReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeStartReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Ssid[MAX_LEN_OF_SSID], SsidLen; BOOLEAN TimerCancelled; /* New for WPA security suites */ u8 VarIE[MAX_VIE_LEN]; /* Total VIE length = MAX_VIE_LEN - -5 */ - NDIS_802_11_VARIABLE_IEs *pVIE = NULL; + struct rt_ndis_802_11_variable_ies *pVIE = NULL; LARGE_INTEGER TimeStamp; BOOLEAN Privacy; u16 Status; /* Init Variable IE structure */ - pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE; + pVIE = (struct rt_ndis_802_11_variable_ies *)VarIE; pVIE->Length = 0; TimeStamp.u.LowPart = 0; TimeStamp.u.HighPart = 0; @@ -506,7 +506,7 @@ void MlmeStartReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) &pAd->StaCfg.DesiredHtPhyInfo.MCSSet[0], &pAd->MlmeAux.HtCapability, &pAd->MlmeAux.AddHtInfo); - pAd->MlmeAux.HtCapabilityLen = sizeof(HT_CAPABILITY_IE); + pAd->MlmeAux.HtCapabilityLen = sizeof(struct rt_ht_capability_ie); /* Not turn pAd->StaActive.SupportedHtPhy.bHtEnable = TRUE here. */ DBGPRINT(RT_DEBUG_TRACE, ("SYNC -pAd->StaActive.SupportedHtPhy.bHtEnable = TRUE\n")); @@ -517,11 +517,11 @@ void MlmeStartReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) MCSSet[0], 16); } /* temporarily not support QOS in IBSS */ - NdisZeroMemory(&pAd->MlmeAux.APEdcaParm, sizeof(EDCA_PARM)); + NdisZeroMemory(&pAd->MlmeAux.APEdcaParm, sizeof(struct rt_edca_parm)); NdisZeroMemory(&pAd->MlmeAux.APQbssLoad, - sizeof(QBSS_LOAD_PARM)); + sizeof(struct rt_qbss_load_parm)); NdisZeroMemory(&pAd->MlmeAux.APQosCapability, - sizeof(QOS_CAPABILITY_PARM)); + sizeof(struct rt_qos_capability_parm)); AsicSwitchChannel(pAd, pAd->MlmeAux.Channel, FALSE); AsicLockChannel(pAd, pAd->MlmeAux.Channel); @@ -550,14 +550,14 @@ void MlmeStartReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) peer sends beacon back when scanning ========================================================================== */ -void PeerBeaconAtScanAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerBeaconAtScanAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Bssid[MAC_ADDR_LEN], Addr2[MAC_ADDR_LEN]; u8 Ssid[MAX_LEN_OF_SSID], BssType, Channel, NewChannel, SsidLen, DtimCount, DtimPeriod, BcastFlag, MessageToMe; - CF_PARM CfParm; + struct rt_cf_parm CfParm; u16 BeaconPeriod, AtimWin, CapabilityInfo; - PFRAME_802_11 pFrame; + struct rt_frame_802_11 * pFrame; LARGE_INTEGER TimeStamp; u8 Erp; u8 SupRate[MAX_LEN_OF_SUPPORTED_RATES], @@ -566,26 +566,26 @@ void PeerBeaconAtScanAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) u16 LenVIE; u8 CkipFlag; u8 AironetCellPowerLimit; - EDCA_PARM EdcaParm; - QBSS_LOAD_PARM QbssLoad; - QOS_CAPABILITY_PARM QosCapability; + struct rt_edca_parm EdcaParm; + struct rt_qbss_load_parm QbssLoad; + struct rt_qos_capability_parm QosCapability; unsigned long RalinkIe; u8 VarIE[MAX_VIE_LEN]; /* Total VIE length = MAX_VIE_LEN - -5 */ - NDIS_802_11_VARIABLE_IEs *pVIE = NULL; - HT_CAPABILITY_IE HtCapability; - ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */ + struct rt_ndis_802_11_variable_ies *pVIE = NULL; + struct rt_ht_capability_ie HtCapability; + struct rt_add_ht_info_ie AddHtInfo; /* AP might use this additional ht info IE */ u8 HtCapabilityLen = 0, PreNHtCapabilityLen = 0; u8 AddHtInfoLen; u8 NewExtChannelOffset = 0xff; /* NdisFillMemory(Ssid, MAX_LEN_OF_SSID, 0x00); */ - pFrame = (PFRAME_802_11) Elem->Msg; + pFrame = (struct rt_frame_802_11 *) Elem->Msg; /* Init Variable IE structure */ - pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE; + pVIE = (struct rt_ndis_802_11_variable_ies *)VarIE; pVIE->Length = 0; RTMPZeroMemory(&HtCapability, sizeof(HtCapability)); - RTMPZeroMemory(&AddHtInfo, sizeof(ADD_HT_INFO_IE)); + RTMPZeroMemory(&AddHtInfo, sizeof(struct rt_add_ht_info_ie)); if (PeerBeaconAndProbeRspSanity(pAd, Elem->Msg, @@ -668,14 +668,14 @@ void PeerBeaconAtScanAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) When waiting joining the (I)BSS, beacon received from external ========================================================================== */ -void PeerBeaconAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerBeaconAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Bssid[MAC_ADDR_LEN], Addr2[MAC_ADDR_LEN]; u8 Ssid[MAX_LEN_OF_SSID], SsidLen, BssType, Channel, MessageToMe, DtimCount, DtimPeriod, BcastFlag, NewChannel; LARGE_INTEGER TimeStamp; u16 BeaconPeriod, AtimWin, CapabilityInfo; - CF_PARM Cf; + struct rt_cf_parm Cf; BOOLEAN TimerCancelled; u8 Erp; u8 SupRate[MAX_LEN_OF_SUPPORTED_RATES], @@ -684,16 +684,16 @@ void PeerBeaconAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) u8 CkipFlag; u16 LenVIE; u8 AironetCellPowerLimit; - EDCA_PARM EdcaParm; - QBSS_LOAD_PARM QbssLoad; - QOS_CAPABILITY_PARM QosCapability; + struct rt_edca_parm EdcaParm; + struct rt_qbss_load_parm QbssLoad; + struct rt_qos_capability_parm QosCapability; u16 Status; u8 VarIE[MAX_VIE_LEN]; /* Total VIE length = MAX_VIE_LEN - -5 */ - NDIS_802_11_VARIABLE_IEs *pVIE = NULL; + struct rt_ndis_802_11_variable_ies *pVIE = NULL; unsigned long RalinkIe; unsigned long Idx; - HT_CAPABILITY_IE HtCapability; - ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */ + struct rt_ht_capability_ie HtCapability; + struct rt_add_ht_info_ie AddHtInfo; /* AP might use this additional ht info IE */ u8 HtCapabilityLen = 0, PreNHtCapabilityLen = 0; u8 AddHtInfoLen; u8 NewExtChannelOffset = 0xff; @@ -701,10 +701,10 @@ void PeerBeaconAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) BOOLEAN bAllowNrate = FALSE; /* Init Variable IE structure */ - pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE; + pVIE = (struct rt_ndis_802_11_variable_ies *)VarIE; pVIE->Length = 0; RTMPZeroMemory(&HtCapability, sizeof(HtCapability)); - RTMPZeroMemory(&AddHtInfo, sizeof(ADD_HT_INFO_IE)); + RTMPZeroMemory(&AddHtInfo, sizeof(struct rt_add_ht_info_ie)); if (PeerBeaconAndProbeRspSanity(pAd, Elem->Msg, @@ -993,20 +993,20 @@ void PeerBeaconAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) || (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED) ) { NdisMoveMemory(&pAd->MlmeAux.APEdcaParm, - &EdcaParm, sizeof(EDCA_PARM)); + &EdcaParm, sizeof(struct rt_edca_parm)); NdisMoveMemory(&pAd->MlmeAux.APQbssLoad, &QbssLoad, - sizeof(QBSS_LOAD_PARM)); + sizeof(struct rt_qbss_load_parm)); NdisMoveMemory(&pAd->MlmeAux.APQosCapability, &QosCapability, - sizeof(QOS_CAPABILITY_PARM)); + sizeof(struct rt_qos_capability_parm)); } else { NdisZeroMemory(&pAd->MlmeAux.APEdcaParm, - sizeof(EDCA_PARM)); + sizeof(struct rt_edca_parm)); NdisZeroMemory(&pAd->MlmeAux.APQbssLoad, - sizeof(QBSS_LOAD_PARM)); + sizeof(struct rt_qbss_load_parm)); NdisZeroMemory(&pAd->MlmeAux.APQosCapability, - sizeof(QOS_CAPABILITY_PARM)); + sizeof(struct rt_qos_capability_parm)); } DBGPRINT(RT_DEBUG_TRACE, @@ -1041,11 +1041,11 @@ void PeerBeaconAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerBeacon(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Bssid[MAC_ADDR_LEN], Addr2[MAC_ADDR_LEN]; char Ssid[MAX_LEN_OF_SSID]; - CF_PARM CfParm; + struct rt_cf_parm CfParm; u8 SsidLen, MessageToMe = 0, BssType, Channel, NewChannel, index = 0; u8 DtimCount = 0, DtimPeriod = 0, BcastFlag = 0; u16 CapabilityInfo, AtimWin, BeaconPeriod; @@ -1058,15 +1058,15 @@ void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) u8 CkipFlag; u16 LenVIE; u8 AironetCellPowerLimit; - EDCA_PARM EdcaParm; - QBSS_LOAD_PARM QbssLoad; - QOS_CAPABILITY_PARM QosCapability; + struct rt_edca_parm EdcaParm; + struct rt_qbss_load_parm QbssLoad; + struct rt_qos_capability_parm QosCapability; unsigned long RalinkIe; /* New for WPA security suites */ u8 VarIE[MAX_VIE_LEN]; /* Total VIE length = MAX_VIE_LEN - -5 */ - NDIS_802_11_VARIABLE_IEs *pVIE = NULL; - HT_CAPABILITY_IE HtCapability; - ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */ + struct rt_ndis_802_11_variable_ies *pVIE = NULL; + struct rt_ht_capability_ie HtCapability; + struct rt_add_ht_info_ie AddHtInfo; /* AP might use this additional ht info IE */ u8 HtCapabilityLen, PreNHtCapabilityLen; u8 AddHtInfoLen; u8 NewExtChannelOffset = 0xff; @@ -1076,10 +1076,10 @@ void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) return; /* Init Variable IE structure */ - pVIE = (PNDIS_802_11_VARIABLE_IEs) VarIE; + pVIE = (struct rt_ndis_802_11_variable_ies *)VarIE; pVIE->Length = 0; RTMPZeroMemory(&HtCapability, sizeof(HtCapability)); - RTMPZeroMemory(&AddHtInfo, sizeof(ADD_HT_INFO_IE)); + RTMPZeroMemory(&AddHtInfo, sizeof(struct rt_add_ht_info_ie)); if (PeerBeaconAndProbeRspSanity(pAd, Elem->Msg, @@ -1120,7 +1120,7 @@ void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) &NewExtChannelOffset, &LenVIE, pVIE)) { BOOLEAN is_my_bssid, is_my_ssid; unsigned long Bssidx, Now; - BSS_ENTRY *pBss; + struct rt_bss_entry *pBss; char RealRssi = RTMPMaxRssi(pAd, ConvertToRssi(pAd, Elem->Rssi0, RSSI_0), ConvertToRssi(pAd, Elem->Rssi1, RSSI_1), @@ -1251,7 +1251,7 @@ void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* BEACON from my BSSID - either IBSS or INFRA network */ /* */ if (is_my_bssid) { - RXWI_STRUC RxWI; + struct rt_rxwi RxWI; pAd->StaCfg.DtimCount = DtimCount; pAd->StaCfg.DtimPeriod = DtimPeriod; @@ -1281,7 +1281,7 @@ void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) if (ADHOC_ON(pAd) && (CAP_IS_IBSS_ON(CapabilityInfo))) { u8 MaxSupportedRateIn500Kbps = 0; u8 idx; - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; /* supported rates array may not be sorted. sort it and find the maximum rate */ for (idx = 0; idx < SupRateLen; idx++) { @@ -1535,10 +1535,10 @@ void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /* copy QOS related information */ NdisMoveMemory(&pAd->CommonCfg.APQbssLoad, &QbssLoad, - sizeof(QBSS_LOAD_PARM)); + sizeof(struct rt_qbss_load_parm)); NdisMoveMemory(&pAd->CommonCfg.APQosCapability, &QosCapability, - sizeof(QOS_CAPABILITY_PARM)); + sizeof(struct rt_qos_capability_parm)); } /* only INFRASTRUCTURE mode support power-saving feature */ if ((INFRA_ON(pAd) && (pAd->StaCfg.Psm == PWR_SAVE)) @@ -1703,13 +1703,13 @@ void PeerBeacon(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Receive PROBE REQ from remote peer when operating in IBSS mode ========================================================================== */ -void PeerProbeReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerProbeReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Addr2[MAC_ADDR_LEN]; char Ssid[MAX_LEN_OF_SSID]; u8 SsidLen; u8 HtLen, AddHtLen, NewExtLen; - HEADER_802_11 ProbeRspHdr; + struct rt_header_802_11 ProbeRspHdr; int NStatus; u8 *pOutBuffer = NULL; unsigned long FrameLen = 0; @@ -1748,7 +1748,7 @@ void PeerProbeReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Rt802_11PreambleShort), 0, 0); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &ProbeRspHdr, + sizeof(struct rt_header_802_11), &ProbeRspHdr, TIMESTAMP_LEN, &FakeTimestamp, 2, &pAd->CommonCfg.BeaconPeriod, 2, &CapabilityInfo, @@ -1807,19 +1807,19 @@ void PeerProbeReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) &TmpLen, 1, &HtCapIe, 1, &HtLen, sizeof - (HT_CAPABILITY_IE), + (struct rt_ht_capability_ie), &pAd->CommonCfg. HtCapability, 1, &AddHtInfoIe, 1, &AddHtLen, sizeof - (ADD_HT_INFO_IE), + (struct rt_add_ht_info_ie), &pAd->CommonCfg. AddHTInfo, 1, &NewExtChanIe, 1, &NewExtLen, sizeof - (NEW_EXT_CHAN_IE), + (struct rt_new_ext_chan_ie), &pAd->CommonCfg. NewExtChanOffset, END_OF_ARGS); @@ -1833,7 +1833,7 @@ void PeerProbeReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void BeaconTimeoutAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void BeaconTimeoutAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, ("SYNC - BeaconTimeoutAtJoinAction\n")); @@ -1848,7 +1848,7 @@ void BeaconTimeoutAtJoinAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Scan timeout procedure. basically add channel index by 1 and rescan ========================================================================== */ -void ScanTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void ScanTimeoutAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { pAd->MlmeAux.Channel = NextChannel(pAd, pAd->MlmeAux.Channel); @@ -1868,7 +1868,7 @@ void ScanTimeoutAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Description: ========================================================================== */ -void InvalidStateWhenScan(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void InvalidStateWhenScan(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, @@ -1884,7 +1884,7 @@ void InvalidStateWhenScan(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Description: ========================================================================== */ -void InvalidStateWhenJoin(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void InvalidStateWhenJoin(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, @@ -1900,7 +1900,7 @@ void InvalidStateWhenJoin(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Description: ========================================================================== */ -void InvalidStateWhenStart(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void InvalidStateWhenStart(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u16 Status; DBGPRINT(RT_DEBUG_TRACE, @@ -1919,13 +1919,13 @@ void InvalidStateWhenStart(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void EnqueuePsPoll(IN PRTMP_ADAPTER pAd) +void EnqueuePsPoll(struct rt_rtmp_adapter *pAd) { if (pAd->StaCfg.WindowsPowerMode == Ndis802_11PowerModeLegacy_PSP) pAd->PsPollFrame.FC.PwrMgmt = PWR_SAVE; MiniportMMRequest(pAd, 0, (u8 *)& pAd->PsPollFrame, - sizeof(PSPOLL_FRAME)); + sizeof(struct rt_pspoll_frame)); } /* @@ -1933,12 +1933,12 @@ void EnqueuePsPoll(IN PRTMP_ADAPTER pAd) Description: ========================================================================== */ -void EnqueueProbeRequest(IN PRTMP_ADAPTER pAd) +void EnqueueProbeRequest(struct rt_rtmp_adapter *pAd) { int NState; u8 *pOutBuffer; unsigned long FrameLen = 0; - HEADER_802_11 Hdr80211; + struct rt_header_802_11 Hdr80211; DBGPRINT(RT_DEBUG_TRACE, ("force out a ProbeRequest ...\n")); @@ -1949,7 +1949,7 @@ void EnqueueProbeRequest(IN PRTMP_ADAPTER pAd) /* this ProbeRequest explicitly specify SSID to reduce unwanted ProbeResponse */ MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &Hdr80211, + sizeof(struct rt_header_802_11), &Hdr80211, 1, &SsidIe, 1, &pAd->CommonCfg.SsidLen, pAd->CommonCfg.SsidLen, pAd->CommonCfg.Ssid, @@ -1963,7 +1963,7 @@ void EnqueueProbeRequest(IN PRTMP_ADAPTER pAd) } -BOOLEAN ScanRunning(IN PRTMP_ADAPTER pAd) +BOOLEAN ScanRunning(struct rt_rtmp_adapter *pAd) { return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE; } diff --git a/drivers/staging/rt2860/sta/wpa.c b/drivers/staging/rt2860/sta/wpa.c index abc730b6565f..69b8a24daa21 100644 --- a/drivers/staging/rt2860/sta/wpa.c +++ b/drivers/staging/rt2860/sta/wpa.c @@ -58,7 +58,7 @@ void inc_byte_array(u8 * counter, int len); ======================================================================== */ -void RTMPReportMicError(IN PRTMP_ADAPTER pAd, IN PCIPHER_KEY pWpaKey) +void RTMPReportMicError(struct rt_rtmp_adapter *pAd, struct rt_cipher_key *pWpaKey) { unsigned long Now; u8 unicastKey = (pWpaKey->Type == PAIRWISE_KEY ? 1 : 0); @@ -113,7 +113,7 @@ void RTMPReportMicError(IN PRTMP_ADAPTER pAd, IN PCIPHER_KEY pWpaKey) #define LENGTH_EAP_H 4 /* If the received frame is EAP-Packet ,find out its EAP-Code (Request(0x01), Response(0x02), Success(0x03), Failure(0x04)). */ -int WpaCheckEapCode(IN PRTMP_ADAPTER pAd, +int WpaCheckEapCode(struct rt_rtmp_adapter *pAd, u8 *pFrame, u16 FrameLen, u16 OffSet) { @@ -133,7 +133,7 @@ int WpaCheckEapCode(IN PRTMP_ADAPTER pAd, return result; } -void WpaSendMicFailureToWpaSupplicant(IN PRTMP_ADAPTER pAd, IN BOOLEAN bUnicast) +void WpaSendMicFailureToWpaSupplicant(struct rt_rtmp_adapter *pAd, IN BOOLEAN bUnicast) { char custom[IW_CUSTOM_MAX] = { 0 }; @@ -147,12 +147,12 @@ void WpaSendMicFailureToWpaSupplicant(IN PRTMP_ADAPTER pAd, IN BOOLEAN bUnicast) return; } -void WpaMicFailureReportFrame(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaMicFailureReportFrame(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 *pOutBuffer = NULL; u8 Header802_3[14]; unsigned long FrameLen = 0; - EAPOL_PACKET Packet; + struct rt_eapol_packet Packet; u8 Mic[16]; BOOLEAN bUnicast; @@ -259,8 +259,8 @@ void WpaDisassocApAndBlockAssoc(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (PRTMP_ADAPTER) FunctionContext; - MLME_DISASSOC_REQ_STRUCT DisassocReq; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; + struct rt_mlme_disassoc_req DisassocReq; /* disassoc from current AP first */ DBGPRINT(RT_DEBUG_TRACE, @@ -268,16 +268,16 @@ void WpaDisassocApAndBlockAssoc(void *SystemSpecific1, DisassocParmFill(pAd, &DisassocReq, pAd->CommonCfg.Bssid, REASON_MIC_FAILURE); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), &DisassocReq); + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_DISASSOC; pAd->StaCfg.bBlockAssoc = TRUE; } -void WpaStaPairwiseKeySetting(IN PRTMP_ADAPTER pAd) +void WpaStaPairwiseKeySetting(struct rt_rtmp_adapter *pAd) { - PCIPHER_KEY pSharedKey; - PMAC_TABLE_ENTRY pEntry; + struct rt_cipher_key *pSharedKey; + struct rt_mac_table_entry *pEntry; pEntry = &pAd->MacTab.Content[BSSID_WCID]; @@ -287,7 +287,7 @@ void WpaStaPairwiseKeySetting(IN PRTMP_ADAPTER pAd) NdisMoveMemory(pAd->StaCfg.PTK, pEntry->PTK, LEN_PTK); /* Prepare pair-wise key information into shared key table */ - NdisZeroMemory(pSharedKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(pSharedKey, sizeof(struct rt_cipher_key)); pSharedKey->KeyLen = LEN_TKIP_EK; NdisMoveMemory(pSharedKey->Key, &pAd->StaCfg.PTK[32], LEN_TKIP_EK); NdisMoveMemory(pSharedKey->RxMic, &pAd->StaCfg.PTK[48], @@ -303,7 +303,7 @@ void WpaStaPairwiseKeySetting(IN PRTMP_ADAPTER pAd) else pSharedKey->CipherAlg = CIPHER_NONE; - /* Update these related information to MAC_TABLE_ENTRY */ + /* Update these related information to struct rt_mac_table_entry */ NdisMoveMemory(pEntry->PairwiseKey.Key, &pAd->StaCfg.PTK[32], LEN_TKIP_EK); NdisMoveMemory(pEntry->PairwiseKey.RxMic, &pAd->StaCfg.PTK[48], @@ -330,14 +330,14 @@ void WpaStaPairwiseKeySetting(IN PRTMP_ADAPTER pAd) } -void WpaStaGroupKeySetting(IN PRTMP_ADAPTER pAd) +void WpaStaGroupKeySetting(struct rt_rtmp_adapter *pAd) { - PCIPHER_KEY pSharedKey; + struct rt_cipher_key *pSharedKey; pSharedKey = &pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId]; /* Prepare pair-wise key information into shared key table */ - NdisZeroMemory(pSharedKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(pSharedKey, sizeof(struct rt_cipher_key)); pSharedKey->KeyLen = LEN_TKIP_EK; NdisMoveMemory(pSharedKey->Key, pAd->StaCfg.GTK, LEN_TKIP_EK); NdisMoveMemory(pSharedKey->RxMic, &pAd->StaCfg.GTK[16], diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index d542f4f5f6b5..04f81bdeb0c8 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -51,7 +51,7 @@ extern unsigned long RTDebugLevel; extern u8 CipherWpa2Template[]; -typedef struct PACKED _RT_VERSION_INFO { +struct PACKED rt_version_info { u8 DriverVersionW; u8 DriverVersionX; u8 DriverVersionY; @@ -59,7 +59,7 @@ typedef struct PACKED _RT_VERSION_INFO { u32 DriverBuildYear; u32 DriverBuildMonth; u32 DriverBuildDay; -} RT_VERSION_INFO, *PRT_VERSION_INFO; +}; static __s32 ralinkrate[] = { 2, 4, 11, 22, /* CCK */ 12, 18, 24, 36, 48, 72, 96, 108, /* OFDM */ @@ -73,14 +73,14 @@ static __s32 ralinkrate[] = { 2, 4, 11, 22, /* CCK */ 90, 180, 270, 360, 540, 720, 810, 900 }; -int Set_SSID_Proc(IN PRTMP_ADAPTER pAdapter, char *arg); +int Set_SSID_Proc(struct rt_rtmp_adapter *pAdapter, char *arg); -int Set_NetworkType_Proc(IN PRTMP_ADAPTER pAdapter, char *arg); +int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg); -void RTMPAddKey(IN PRTMP_ADAPTER pAd, IN PNDIS_802_11_KEY pKey) +void RTMPAddKey(struct rt_rtmp_adapter *pAd, struct rt_ndis_802_11_key *pKey) { unsigned long KeyIdx; - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; DBGPRINT(RT_DEBUG_TRACE, ("RTMPAddKey ------>\n")); @@ -95,7 +95,7 @@ void RTMPAddKey(IN PRTMP_ADAPTER pAd, IN PNDIS_802_11_KEY pKey) } /* Update PTK */ NdisZeroMemory(&pAd->SharedKey[BSS0][0], - sizeof(CIPHER_KEY)); + sizeof(struct rt_cipher_key)); pAd->SharedKey[BSS0][0].KeyLen = LEN_TKIP_EK; NdisMoveMemory(pAd->SharedKey[BSS0][0].Key, pKey->KeyMaterial, LEN_TKIP_EK); @@ -129,7 +129,7 @@ void RTMPAddKey(IN PRTMP_ADAPTER pAd, IN PNDIS_802_11_KEY pKey) else pAd->SharedKey[BSS0][0].CipherAlg = CIPHER_NONE; - /* Update these related information to MAC_TABLE_ENTRY */ + /* Update these related information to struct rt_mac_table_entry */ pEntry = &pAd->MacTab.Content[BSSID_WCID]; NdisMoveMemory(pEntry->PairwiseKey.Key, pAd->SharedKey[BSS0][0].Key, @@ -174,7 +174,7 @@ void RTMPAddKey(IN PRTMP_ADAPTER pAd, IN PNDIS_802_11_KEY pKey) NdisZeroMemory(&pAd-> SharedKey[BSS0][pAd->StaCfg. DefaultKeyId], - sizeof(CIPHER_KEY)); + sizeof(struct rt_cipher_key)); pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].KeyLen = LEN_TKIP_EK; NdisMoveMemory(pAd-> @@ -373,7 +373,7 @@ int rt_ioctl_siwfreq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *freq, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; int chan = -1; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -407,7 +407,7 @@ int rt_ioctl_giwfreq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *freq, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; u8 ch; unsigned long m = 2412000; @@ -426,7 +426,7 @@ int rt_ioctl_giwfreq(struct net_device *dev, int rt_ioctl_siwmode(struct net_device *dev, struct iw_request_info *info, __u32 * mode, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -462,7 +462,7 @@ int rt_ioctl_siwmode(struct net_device *dev, int rt_ioctl_giwmode(struct net_device *dev, struct iw_request_info *info, __u32 * mode, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -482,7 +482,7 @@ int rt_ioctl_giwmode(struct net_device *dev, int rt_ioctl_siwsens(struct net_device *dev, struct iw_request_info *info, char *name, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -505,7 +505,7 @@ int rt_ioctl_giwrange(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; struct iw_range *range = (struct iw_range *)extra; u16 val; int i; @@ -586,7 +586,7 @@ int rt_ioctl_siwap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *ap_addr, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; NDIS_802_11_MAC_ADDRESS Bssid; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -626,7 +626,7 @@ int rt_ioctl_giwap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *ap_addr, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -662,7 +662,7 @@ int rt_ioctl_giwap(struct net_device *dev, * NB: various calculations are based on the orinoco/wavelan * drivers for compatibility */ -static void set_quality(PRTMP_ADAPTER pAdapter, +static void set_quality(struct rt_rtmp_adapter *pAdapter, struct iw_quality *iq, signed char rssi) { __u8 ChannelQuality; @@ -689,7 +689,7 @@ int rt_ioctl_iwaplist(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; struct sockaddr addr[IW_MAX_AP]; struct iw_quality qual[IW_MAX_AP]; @@ -726,7 +726,7 @@ int rt_ioctl_siwscan(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; unsigned long Now; int Status = NDIS_STATUS_SUCCESS; @@ -802,7 +802,7 @@ int rt_ioctl_giwscan(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; int i = 0; char *current_ev = extra, *previous_ev = extra; char *end_buf; @@ -867,7 +867,7 @@ int rt_ioctl_giwscan(struct net_device *dev, iwe.cmd = SIOCGIWNAME; { - PBSS_ENTRY pBssEntry = &pAdapter->ScanTab.BssEntry[i]; + struct rt_bss_entry *pBssEntry = &pAdapter->ScanTab.BssEntry[i]; BOOLEAN isGonly = FALSE; int rateCnt = 0; @@ -1052,7 +1052,7 @@ int rt_ioctl_giwscan(struct net_device *dev, 0) { int rate_count = sizeof(ralinkrate) / sizeof(__s32); - HT_CAP_INFO capInfo = + struct rt_ht_cap_info capInfo = pAdapter->ScanTab.BssEntry[i].HtCapability. HtCapInfo; int shortGI = @@ -1129,7 +1129,7 @@ int rt_ioctl_siwessid(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *essid) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1166,7 +1166,7 @@ int rt_ioctl_giwessid(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *essid) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1204,7 +1204,7 @@ int rt_ioctl_siwnickn(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *nickname) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1227,7 +1227,7 @@ int rt_ioctl_giwnickn(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *nickname) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1244,7 +1244,7 @@ int rt_ioctl_siwrts(struct net_device *dev, struct iw_request_info *info, struct iw_param *rts, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; u16 val; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1274,7 +1274,7 @@ int rt_ioctl_giwrts(struct net_device *dev, struct iw_request_info *info, struct iw_param *rts, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1295,7 +1295,7 @@ int rt_ioctl_siwfrag(struct net_device *dev, struct iw_request_info *info, struct iw_param *frag, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; u16 val; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1324,7 +1324,7 @@ int rt_ioctl_giwfrag(struct net_device *dev, struct iw_request_info *info, struct iw_param *frag, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1347,7 +1347,7 @@ int rt_ioctl_siwencode(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1451,7 +1451,7 @@ rt_ioctl_giwencode(struct net_device *dev, struct iw_point *erq, char *key) { int kid; - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1506,14 +1506,14 @@ rt_ioctl_giwencode(struct net_device *dev, } -void getBaInfo(IN PRTMP_ADAPTER pAd, char *pOutBuf) +void getBaInfo(struct rt_rtmp_adapter *pAd, char *pOutBuf) { int i, j; - BA_ORI_ENTRY *pOriBAEntry; - BA_REC_ENTRY *pRecBAEntry; + struct rt_ba_ori_entry *pOriBAEntry; + struct rt_ba_rec_entry *pRecBAEntry; for (i = 0; i < MAX_LEN_OF_MAC_TABLE; i++) { - PMAC_TABLE_ENTRY pEntry = &pAd->MacTab.Content[i]; + struct rt_mac_table_entry *pEntry = &pAd->MacTab.Content[i]; if (((pEntry->ValidAsCLI || pEntry->ValidAsApCli) && (pEntry->Sst == SST_ASSOC)) || (pEntry->ValidAsWDS) || (pEntry->ValidAsMesh)) { @@ -1566,11 +1566,11 @@ int rt_ioctl_siwmlme(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; struct iw_mlme *pMlme = (struct iw_mlme *)wrqu->data.pointer; - MLME_QUEUE_ELEM MsgElem; - MLME_DISASSOC_REQ_STRUCT DisAssocReq; - MLME_DEAUTH_REQ_STRUCT DeAuthReq; + struct rt_mlme_queue_elem MsgElem; + struct rt_mlme_disassoc_req DisAssocReq; + struct rt_mlme_deauth_req DeAuthReq; GET_PAD_FROM_NET_DEV(pAd, dev); @@ -1586,9 +1586,9 @@ int rt_ioctl_siwmlme(struct net_device *dev, ("====> %s - IW_MLME_DEAUTH\n", __func__)); COPY_MAC_ADDR(DeAuthReq.Addr, pAd->CommonCfg.Bssid); DeAuthReq.Reason = pMlme->reason_code; - MsgElem.MsgLen = sizeof(MLME_DEAUTH_REQ_STRUCT); + MsgElem.MsgLen = sizeof(struct rt_mlme_deauth_req); NdisMoveMemory(MsgElem.Msg, &DeAuthReq, - sizeof(MLME_DEAUTH_REQ_STRUCT)); + sizeof(struct rt_mlme_deauth_req)); MlmeDeauthReqAction(pAd, &MsgElem); if (INFRA_ON(pAd)) { LinkDown(pAd, FALSE); @@ -1605,9 +1605,9 @@ int rt_ioctl_siwmlme(struct net_device *dev, MsgElem.Machine = ASSOC_STATE_MACHINE; MsgElem.MsgType = MT2_MLME_DISASSOC_REQ; - MsgElem.MsgLen = sizeof(MLME_DISASSOC_REQ_STRUCT); + MsgElem.MsgLen = sizeof(struct rt_mlme_disassoc_req); NdisMoveMemory(MsgElem.Msg, &DisAssocReq, - sizeof(MLME_DISASSOC_REQ_STRUCT)); + sizeof(struct rt_mlme_disassoc_req)); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_DISASSOC; MlmeDisassocReqAction(pAd, &MsgElem); @@ -1626,7 +1626,7 @@ int rt_ioctl_siwauth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; struct iw_param *param = &wrqu->param; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1776,7 +1776,7 @@ int rt_ioctl_giwauth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; struct iw_param *param = &wrqu->param; GET_PAD_FROM_NET_DEV(pAdapter, dev); @@ -1815,12 +1815,12 @@ int rt_ioctl_giwauth(struct net_device *dev, return 0; } -void fnSetCipherKey(IN PRTMP_ADAPTER pAdapter, +void fnSetCipherKey(struct rt_rtmp_adapter *pAdapter, int keyIdx, u8 CipherAlg, IN BOOLEAN bGTK, IN struct iw_encode_ext *ext) { - NdisZeroMemory(&pAdapter->SharedKey[BSS0][keyIdx], sizeof(CIPHER_KEY)); + NdisZeroMemory(&pAdapter->SharedKey[BSS0][keyIdx], sizeof(struct rt_cipher_key)); pAdapter->SharedKey[BSS0][keyIdx].KeyLen = LEN_TKIP_EK; NdisMoveMemory(pAdapter->SharedKey[BSS0][keyIdx].Key, ext->key, LEN_TKIP_EK); @@ -1862,7 +1862,7 @@ int rt_ioctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAdapter = NULL; + struct rt_rtmp_adapter *pAdapter = NULL; struct iw_point *encoding = &wrqu->encoding; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; int keyIdx, alg = ext->alg; @@ -1883,7 +1883,7 @@ int rt_ioctl_siwencodeext(struct net_device *dev, pAdapter->SharedKey[BSS0][keyIdx].CipherAlg = CIPHER_NONE; AsicRemoveSharedKeyEntry(pAdapter, 0, (u8)keyIdx); NdisZeroMemory(&pAdapter->SharedKey[BSS0][keyIdx], - sizeof(CIPHER_KEY)); + sizeof(struct rt_cipher_key)); DBGPRINT(RT_DEBUG_TRACE, ("%s::Remove all keys!(encoding->flags = %x)\n", __func__, encoding->flags)); @@ -2018,7 +2018,7 @@ rt_ioctl_giwencodeext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; char *pKey = NULL; struct iw_point *encoding = &wrqu->encoding; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; @@ -2096,7 +2096,7 @@ int rt_ioctl_siwgenie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, dev); @@ -2123,7 +2123,7 @@ int rt_ioctl_giwgenie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; GET_PAD_FROM_NET_DEV(pAd, dev); @@ -2163,7 +2163,7 @@ int rt_ioctl_siwpmksa(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; struct iw_pmksa *pPmksa = (struct iw_pmksa *)wrqu->data.pointer; int CachedIdx = 0, idx = 0; @@ -2176,7 +2176,7 @@ int rt_ioctl_siwpmksa(struct net_device *dev, switch (pPmksa->cmd) { case IW_PMKSA_FLUSH: NdisZeroMemory(pAd->StaCfg.SavedPMK, - sizeof(BSSID_INFO) * PMKID_NO); + sizeof(struct rt_bssid_info) * PMKID_NO); DBGPRINT(RT_DEBUG_TRACE, ("rt_ioctl_siwpmksa - IW_PMKSA_FLUSH\n")); break; @@ -2267,7 +2267,7 @@ int rt_ioctl_siwrate(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; u32 rate = wrqu->bitrate.value, fixed = wrqu->bitrate.fixed; GET_PAD_FROM_NET_DEV(pAd, dev); @@ -2323,7 +2323,7 @@ int rt_ioctl_giwrate(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - PRTMP_ADAPTER pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; int rate_index = 0, rate_count = 0; HTTRANSMIT_SETTING ht_setting; /* Remove to global variable @@ -2451,7 +2451,7 @@ int rt28xx_sta_ioctl(IN struct net_device *net_dev, IN OUT struct ifreq *rq, int cmd) { struct os_cookie *pObj; - RTMP_ADAPTER *pAd = NULL; + struct rt_rtmp_adapter *pAd = NULL; struct iwreq *wrq = (struct iwreq *)rq; BOOLEAN StateMachineTouched = FALSE; int Status = NDIS_STATUS_SUCCESS; @@ -2639,14 +2639,14 @@ int rt28xx_sta_ioctl(IN struct net_device *net_dev, TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int Set_SSID_Proc(IN PRTMP_ADAPTER pAdapter, char *arg) +int Set_SSID_Proc(struct rt_rtmp_adapter *pAdapter, char *arg) { - NDIS_802_11_SSID Ssid, *pSsid = NULL; + struct rt_ndis_802_11_ssid Ssid, *pSsid = NULL; BOOLEAN StateMachineTouched = FALSE; int success = TRUE; if (strlen(arg) <= MAX_LEN_OF_SSID) { - NdisZeroMemory(&Ssid, sizeof(NDIS_802_11_SSID)); + NdisZeroMemory(&Ssid, sizeof(struct rt_ndis_802_11_ssid)); if (strlen(arg) != 0) { NdisMoveMemory(Ssid.Ssid, arg, strlen(arg)); Ssid.SsidLength = strlen(arg); @@ -2695,7 +2695,7 @@ int Set_SSID_Proc(IN PRTMP_ADAPTER pAdapter, char *arg) MlmeEnqueue(pAdapter, MLME_CNTL_STATE_MACHINE, OID_802_11_SSID, - sizeof(NDIS_802_11_SSID), (void *) pSsid); + sizeof(struct rt_ndis_802_11_ssid), (void *) pSsid); StateMachineTouched = TRUE; DBGPRINT(RT_DEBUG_TRACE, @@ -2718,7 +2718,7 @@ int Set_SSID_Proc(IN PRTMP_ADAPTER pAdapter, char *arg) TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int Set_NetworkType_Proc(IN PRTMP_ADAPTER pAdapter, char *arg) +int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg) { u32 Value = 0; diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index 65b0fd717821..c1d1fb535a37 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c @@ -148,12 +148,12 @@ int const rtusb_usb_id_len = MODULE_DEVICE_TABLE(usb, rtusb_usb_id); -static void rt2870_disconnect(IN struct usb_device *dev, IN PRTMP_ADAPTER pAd); +static void rt2870_disconnect(struct usb_device *dev, struct rt_rtmp_adapter *pAd); static int __devinit rt2870_probe(IN struct usb_interface *intf, IN struct usb_device *usb_dev, IN const struct usb_device_id *dev_id, - IN RTMP_ADAPTER ** ppAd); + struct rt_rtmp_adapter ** ppAd); #ifndef PF_NOFREEZE #define PF_NOFREEZE 0 @@ -164,7 +164,7 @@ extern int rt28xx_open(struct net_device *net_dev); static BOOLEAN USBDevConfigInit(IN struct usb_device *dev, IN struct usb_interface *intf, - IN RTMP_ADAPTER * pAd); + struct rt_rtmp_adapter *pAd); /* ======================================================================== @@ -222,7 +222,7 @@ static void rtusb_disconnect(struct usb_interface *intf); static BOOLEAN USBDevConfigInit(IN struct usb_device *dev, IN struct usb_interface *intf, - IN RTMP_ADAPTER * pAd) + struct rt_rtmp_adapter *pAd) { struct usb_host_interface *iface_desc; unsigned long BulkOutIdx; @@ -299,7 +299,7 @@ static BOOLEAN USBDevConfigInit(IN struct usb_device *dev, static int rtusb_probe(struct usb_interface *intf, const struct usb_device_id *id) { - RTMP_ADAPTER *pAd; + struct rt_rtmp_adapter *pAd; struct usb_device *dev; int rv; @@ -316,7 +316,7 @@ static int rtusb_probe(struct usb_interface *intf, static void rtusb_disconnect(struct usb_interface *intf) { struct usb_device *dev = interface_to_usbdev(intf); - PRTMP_ADAPTER pAd; + struct rt_rtmp_adapter *pAd; pAd = usb_get_intfdata(intf); usb_set_intfdata(intf, NULL); @@ -338,7 +338,7 @@ resume:rt2870_resume, #ifdef CONFIG_PM -void RT2870RejectPendingPackets(IN PRTMP_ADAPTER pAd) +void RT2870RejectPendingPackets(struct rt_rtmp_adapter *pAd) { /* clear PS packets */ /* clear TxSw packets */ @@ -347,7 +347,7 @@ void RT2870RejectPendingPackets(IN PRTMP_ADAPTER pAd) static int rt2870_suspend(struct usb_interface *intf, pm_message_t state) { struct net_device *net_dev; - PRTMP_ADAPTER pAd = usb_get_intfdata(intf); + struct rt_rtmp_adapter *pAd = usb_get_intfdata(intf); DBGPRINT(RT_DEBUG_TRACE, ("===> rt2870_suspend()\n")); net_dev = pAd->net_dev; @@ -365,7 +365,7 @@ static int rt2870_suspend(struct usb_interface *intf, pm_message_t state) static int rt2870_resume(struct usb_interface *intf) { struct net_device *net_dev; - PRTMP_ADAPTER pAd = usb_get_intfdata(intf); + struct rt_rtmp_adapter *pAd = usb_get_intfdata(intf); DBGPRINT(RT_DEBUG_TRACE, ("===> rt2870_resume()\n")); @@ -418,13 +418,13 @@ Note: */ int MlmeThread(IN void *Context) { - RTMP_ADAPTER *pAd; - RTMP_OS_TASK *pTask; + struct rt_rtmp_adapter *pAd; + struct rt_rtmp_os_task *pTask; int status; status = 0; - pTask = (RTMP_OS_TASK *) Context; - pAd = (PRTMP_ADAPTER) pTask->priv; + pTask = (struct rt_rtmp_os_task *)Context; + pAd = (struct rt_rtmp_adapter *)pTask->priv; RtmpOSTaskCustomize(pTask); @@ -487,13 +487,13 @@ Note: */ int RTUSBCmdThread(IN void *Context) { - RTMP_ADAPTER *pAd; - RTMP_OS_TASK *pTask; + struct rt_rtmp_adapter *pAd; + struct rt_rtmp_os_task *pTask; int status; status = 0; - pTask = (RTMP_OS_TASK *) Context; - pAd = (PRTMP_ADAPTER) pTask->priv; + pTask = (struct rt_rtmp_os_task *)Context; + pAd = (struct rt_rtmp_adapter *)pTask->priv; RtmpOSTaskCustomize(pTask); @@ -522,7 +522,7 @@ int RTUSBCmdThread(IN void *Context) } if (pAd && !pAd->PM_FlgSuspend) { /* Clear the CmdQElements. */ - CmdQElmt *pCmdQElmt = NULL; + struct rt_cmdqelmt *pCmdQElmt = NULL; NdisAcquireSpinLock(&pAd->CmdQLock); pAd->CmdQ.CmdQState = RTMP_TASK_STAT_STOPED; @@ -570,9 +570,9 @@ int RTUSBCmdThread(IN void *Context) } -void RTUSBWatchDog(IN RTMP_ADAPTER * pAd) +void RTUSBWatchDog(struct rt_rtmp_adapter *pAd) { - PHT_TX_CONTEXT pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; int idx; unsigned long irqFlags; PURB pUrb; @@ -635,7 +635,7 @@ void RTUSBWatchDog(IN RTMP_ADAPTER * pAd) ) { /* FIXME: Following code just support single bulk out. If you wanna support multiple bulk out. Modify it! */ pHTTXContext = - (PHT_TX_CONTEXT) (&pAd->TxContext[idx]); + (struct rt_ht_tx_context *)(&pAd->TxContext[idx]); if (pHTTXContext->IRPPending) { /* Check TxContext. */ pUrb = pHTTXContext->pUrb; @@ -644,19 +644,19 @@ void RTUSBWatchDog(IN RTMP_ADAPTER * pAd) pUrb->transfer_buffer_length; isDataPacket = TRUE; } else if (idx == MGMTPIPEIDX) { - PTX_CONTEXT pMLMEContext, pNULLContext, - pPsPollContext; + struct rt_tx_context *pMLMEContext, *pNULLContext, + *pPsPollContext; /*Check MgmtContext. */ pMLMEContext = - (PTX_CONTEXT) (pAd->MgmtRing. + (struct rt_tx_context *)(pAd->MgmtRing. Cell[pAd->MgmtRing. TxDmaIdx]. AllocVa); pPsPollContext = - (PTX_CONTEXT) (&pAd->PsPollContext); + (struct rt_tx_context *)(&pAd->PsPollContext); pNULLContext = - (PTX_CONTEXT) (&pAd->NullContext); + (struct rt_tx_context *)(&pAd->NullContext); if (pMLMEContext->IRPPending) { ASSERT(pMLMEContext-> @@ -724,7 +724,7 @@ void RTUSBWatchDog(IN RTMP_ADAPTER * pAd) /* For Sigma debug, dump the ba_reordering sequence. */ if ((needDumpSeq == TRUE) && (pAd->CommonCfg.bDisableReordering == 0)) { u16 Idx; - PBA_REC_ENTRY pBAEntry = NULL; + struct rt_ba_rec_entry *pBAEntry = NULL; u8 count = 0; struct reordering_mpdu *mpdu_blk; @@ -768,7 +768,7 @@ Return Value: Note: ======================================================================== */ -static void rt2870_disconnect(struct usb_device *dev, PRTMP_ADAPTER pAd) +static void rt2870_disconnect(struct usb_device *dev, struct rt_rtmp_adapter *pAd) { DBGPRINT(RT_DEBUG_ERROR, ("rtusb_disconnect: unregister usbnet usb-%s-%s\n", @@ -805,13 +805,13 @@ static void rt2870_disconnect(struct usb_device *dev, PRTMP_ADAPTER pAd) static int __devinit rt2870_probe(IN struct usb_interface *intf, IN struct usb_device *usb_dev, IN const struct usb_device_id *dev_id, - IN RTMP_ADAPTER ** ppAd) + struct rt_rtmp_adapter ** ppAd) { struct net_device *net_dev = NULL; - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) NULL; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)NULL; int status, rv; void *handle; - RTMP_OS_NETDEV_OP_HOOK netDevHook; + struct rt_rtmp_os_netdev_op_hook netDevHook; DBGPRINT(RT_DEBUG_TRACE, ("===>rt2870_probe()!\n")); @@ -820,7 +820,7 @@ static int __devinit rt2870_probe(IN struct usb_interface *intf, /* goto err_out; */ /*RtmpDevInit============================================= */ - /* Allocate RTMP_ADAPTER adapter structure */ + /* Allocate struct rt_rtmp_adapter adapter structure */ handle = kmalloc(sizeof(struct os_cookie), GFP_KERNEL); if (handle == NULL) { printk diff --git a/drivers/staging/rt2860/wpa.h b/drivers/staging/rt2860/wpa.h index 05254c8b079a..6199ae6cdcd0 100644 --- a/drivers/staging/rt2860/wpa.h +++ b/drivers/staging/rt2860/wpa.h @@ -48,7 +48,7 @@ /* The length is the EAPoL-Key frame except key data field. */ /* Please refer to 802.11i-2004 ,Figure 43u in p.78 */ -#define LEN_EAPOL_KEY_MSG (sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE) +#define LEN_EAPOL_KEY_MSG (sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE) /* EAP Code Type. */ #define EAP_CODE_REQUEST 1 @@ -195,7 +195,7 @@ #define IS_WPA_CAPABILITY(a) (((a) >= Ndis802_11AuthModeWPA) && ((a) <= Ndis802_11AuthModeWPA1PSKWPA2PSK)) /* EAPOL Key Information definition within Key descriptor format */ -typedef struct PACKED _KEY_INFO { +struct PACKED rt_key_info { u8 KeyMic:1; u8 Secure:1; u8 Error:1; @@ -207,12 +207,12 @@ typedef struct PACKED _KEY_INFO { u8 KeyIndex:2; u8 Install:1; u8 KeyAck:1; -} KEY_INFO, *PKEY_INFO; +}; /* EAPOL Key descriptor format */ -typedef struct PACKED _KEY_DESCRIPTER { +struct PACKED rt_key_descripter { u8 Type; - KEY_INFO KeyInfo; + struct rt_key_info KeyInfo; u8 KeyLength[2]; u8 ReplayCounter[LEN_KEY_DESC_REPLAY]; u8 KeyNonce[LEN_KEY_DESC_NONCE]; @@ -222,34 +222,34 @@ typedef struct PACKED _KEY_DESCRIPTER { u8 KeyMic[LEN_KEY_DESC_MIC]; u8 KeyDataLen[2]; u8 KeyData[MAX_LEN_OF_RSNIE]; -} KEY_DESCRIPTER, *PKEY_DESCRIPTER; +}; -typedef struct PACKED _EAPOL_PACKET { +struct PACKED rt_eapol_packet { u8 ProVer; u8 ProType; u8 Body_Len[2]; - KEY_DESCRIPTER KeyDesc; -} EAPOL_PACKET, *PEAPOL_PACKET; + struct rt_key_descripter KeyDesc; +}; /*802.11i D10 page 83 */ -typedef struct PACKED _GTK_ENCAP { +struct PACKED rt_gtk_encap { u8 Kid:2; u8 tx:1; u8 rsv:5; u8 rsv1; u8 GTK[TKIP_GTK_LENGTH]; -} GTK_ENCAP, *PGTK_ENCAP; +}; -typedef struct PACKED _KDE_ENCAP { +struct PACKED rt_kde_encap { u8 Type; u8 Len; u8 OUI[3]; u8 DataType; - GTK_ENCAP GTKEncap; -} KDE_ENCAP, *PKDE_ENCAP; + struct rt_gtk_encap GTKEncap; +}; /* For WPA1 */ -typedef struct PACKED _RSNIE { +struct PACKED rt_rsnie { u8 oui[4]; u16 version; u8 mcast[4]; @@ -257,25 +257,25 @@ typedef struct PACKED _RSNIE { struct PACKED { u8 oui[4]; } ucast[1]; -} RSNIE, *PRSNIE; +}; /* For WPA2 */ -typedef struct PACKED _RSNIE2 { +struct PACKED rt_rsnie2 { u16 version; u8 mcast[4]; u16 ucount; struct PACKED { u8 oui[4]; } ucast[1]; -} RSNIE2, *PRSNIE2; +}; /* AKM Suite */ -typedef struct PACKED _RSNIE_AUTH { +struct PACKED rt_rsnie_auth { u16 acount; struct PACKED { u8 oui[4]; } auth[1]; -} RSNIE_AUTH, *PRSNIE_AUTH; +}; typedef union PACKED _RSN_CAPABILITIES { struct PACKED { @@ -288,14 +288,14 @@ typedef union PACKED _RSN_CAPABILITIES { u16 word; } RSN_CAPABILITIES, *PRSN_CAPABILITIES; -typedef struct PACKED _EAP_HDR { +struct PACKED rt_eap_hdr { u8 ProVer; u8 ProType; u8 Body_Len[2]; u8 code; u8 identifier; u8 length[2]; /* including code and identifier, followed by length-2 octets of data */ -} EAP_HDR, *PEAP_HDR; +}; /* For supplicant state machine states. 802.11i Draft 4.1, p. 97 */ /* We simplified it */ @@ -338,32 +338,32 @@ typedef enum _WpaMixPairCipher { WPA_TKIPAES_WPA2_TKIPAES = 0x0F, } WPA_MIX_PAIR_CIPHER; -typedef struct PACKED _RSN_IE_HEADER_STRUCT { +struct PACKED rt_rsn_ie_header { u8 Eid; u8 Length; u16 Version; /* Little endian format */ -} RSN_IE_HEADER_STRUCT, *PRSN_IE_HEADER_STRUCT; +}; /* Cipher suite selector types */ -typedef struct PACKED _CIPHER_SUITE_STRUCT { +struct PACKED rt_cipher_suite_struct { u8 Oui[3]; u8 Type; -} CIPHER_SUITE_STRUCT, *PCIPHER_SUITE_STRUCT; +}; /* Authentication and Key Management suite selector */ -typedef struct PACKED _AKM_SUITE_STRUCT { +struct PACKED rt_akm_suite { u8 Oui[3]; u8 Type; -} AKM_SUITE_STRUCT, *PAKM_SUITE_STRUCT; +}; /* RSN capability */ -typedef struct PACKED _RSN_CAPABILITY { +struct PACKED rt_rsn_capability { u16 Rsv:10; u16 GTKSAReplayCnt:2; u16 PTKSAReplayCnt:2; u16 NoPairwise:1; u16 PreAuth:1; -} RSN_CAPABILITY, *PRSN_CAPABILITY; +}; /*======================================== The prototype is defined in cmm_wpa.c diff --git a/drivers/staging/rt2870/common/rtusb_bulk.c b/drivers/staging/rt2870/common/rtusb_bulk.c index d2e967b13a95..379780c72b3c 100644 --- a/drivers/staging/rt2870/common/rtusb_bulk.c +++ b/drivers/staging/rt2870/common/rtusb_bulk.c @@ -58,8 +58,8 @@ void RTUSB_FILL_BULK_URB(struct urb *pUrb, } -void RTUSBInitTxDesc(IN PRTMP_ADAPTER pAd, - IN PTX_CONTEXT pTxContext, +void RTUSBInitTxDesc(struct rt_rtmp_adapter *pAd, + struct rt_tx_context *pTxContext, u8 BulkOutPipeId, IN usb_complete_t Func) { PURB pUrb; @@ -96,8 +96,8 @@ void RTUSBInitTxDesc(IN PRTMP_ADAPTER pAd, } -void RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd, - IN PHT_TX_CONTEXT pTxContext, +void RTUSBInitHTTxDesc(struct rt_rtmp_adapter *pAd, + struct rt_ht_tx_context *pTxContext, u8 BulkOutPipeId, unsigned long BulkOutSize, IN usb_complete_t Func) { @@ -128,7 +128,7 @@ void RTUSBInitHTTxDesc(IN PRTMP_ADAPTER pAd, } -void RTUSBInitRxDesc(IN PRTMP_ADAPTER pAd, IN PRX_CONTEXT pRxContext) +void RTUSBInitRxDesc(struct rt_rtmp_adapter *pAd, struct rt_rx_context *pRxContext) { PURB pUrb; struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie; @@ -179,15 +179,15 @@ void RTUSBInitRxDesc(IN PRTMP_ADAPTER pAd, IN PRX_CONTEXT pRxContext) if(1 /*!(in_interrupt() & 0xffff0000)*/) \ RTMP_IRQ_UNLOCK((pLock), IrqFlags); -void RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd, +void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd, u8 BulkOutPipeId, u8 Index) { - PHT_TX_CONTEXT pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; PURB pUrb; int ret = 0; - PTXINFO_STRUC pTxInfo, pLastTxInfo = NULL; - PTXWI_STRUC pTxWI; + struct rt_txinfo *pTxInfo, *pLastTxInfo = NULL; + struct rt_txwi * pTxWI; unsigned long TmpBulkEndPos, ThisBulkSize; unsigned long IrqFlags = 0, IrqFlags2 = 0; u8 *pWirelessPkt, *pAppendant; @@ -273,9 +273,9 @@ void RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd, } do { - pTxInfo = (PTXINFO_STRUC) & pWirelessPkt[TmpBulkEndPos]; + pTxInfo = (struct rt_txinfo *)& pWirelessPkt[TmpBulkEndPos]; pTxWI = - (PTXWI_STRUC) & pWirelessPkt[TmpBulkEndPos + TXINFO_SIZE]; + (struct rt_txwi *) & pWirelessPkt[TmpBulkEndPos + TXINFO_SIZE]; if (pAd->bForcePrintTX == TRUE) DBGPRINT(RT_DEBUG_TRACE, @@ -497,12 +497,12 @@ void RTUSBBulkOutDataPacket(IN PRTMP_ADAPTER pAd, void RTUSBBulkOutDataPacketComplete(struct urb *pUrb, struct pt_regs * pt_regs) { - PHT_TX_CONTEXT pHTTXContext; - PRTMP_ADAPTER pAd; + struct rt_ht_tx_context *pHTTXContext; + struct rt_rtmp_adapter *pAd; struct os_cookie *pObj; u8 BulkOutPipeId; - pHTTXContext = (PHT_TX_CONTEXT) pUrb->context; + pHTTXContext = (struct rt_ht_tx_context *)pUrb->context; pAd = pHTTXContext->pAd; pObj = (struct os_cookie *)pAd->OS_Cookie; @@ -544,9 +544,9 @@ void RTUSBBulkOutDataPacketComplete(struct urb *pUrb, struct pt_regs * pt_regs) ======================================================================== */ -void RTUSBBulkOutNullFrame(IN PRTMP_ADAPTER pAd) +void RTUSBBulkOutNullFrame(struct rt_rtmp_adapter *pAd) { - PTX_CONTEXT pNullContext = &(pAd->NullContext); + struct rt_tx_context *pNullContext = &(pAd->NullContext); PURB pUrb; int ret = 0; unsigned long IrqFlags; @@ -591,12 +591,12 @@ void RTUSBBulkOutNullFrame(IN PRTMP_ADAPTER pAd) /* NULL frame use BulkOutPipeId = 0 */ void RTUSBBulkOutNullFrameComplete(struct urb *pUrb, struct pt_regs * pt_regs) { - PRTMP_ADAPTER pAd; - PTX_CONTEXT pNullContext; + struct rt_rtmp_adapter *pAd; + struct rt_tx_context *pNullContext; int Status; struct os_cookie *pObj; - pNullContext = (PTX_CONTEXT) pUrb->context; + pNullContext = (struct rt_tx_context *)pUrb->context; pAd = pNullContext->pAd; Status = pUrb->status; @@ -618,15 +618,15 @@ void RTUSBBulkOutNullFrameComplete(struct urb *pUrb, struct pt_regs * pt_regs) ======================================================================== */ -void RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, u8 Index) +void RTUSBBulkOutMLMEPacket(struct rt_rtmp_adapter *pAd, u8 Index) { - PTX_CONTEXT pMLMEContext; + struct rt_tx_context *pMLMEContext; PURB pUrb; int ret = 0; unsigned long IrqFlags; pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[pAd->MgmtRing.TxDmaIdx].AllocVa; + (struct rt_tx_context *)pAd->MgmtRing.Cell[pAd->MgmtRing.TxDmaIdx].AllocVa; pUrb = pMLMEContext->pUrb; if ((pAd->MgmtRing.TxSwFreeIdx >= MGMT_RING_SIZE) || @@ -686,14 +686,14 @@ void RTUSBBulkOutMLMEPacket(IN PRTMP_ADAPTER pAd, u8 Index) void RTUSBBulkOutMLMEPacketComplete(struct urb *pUrb, struct pt_regs * pt_regs) { - PTX_CONTEXT pMLMEContext; - PRTMP_ADAPTER pAd; + struct rt_tx_context *pMLMEContext; + struct rt_rtmp_adapter *pAd; int Status; struct os_cookie *pObj; int index; /*DBGPRINT_RAW(RT_DEBUG_INFO, ("--->RTUSBBulkOutMLMEPacketComplete\n")); */ - pMLMEContext = (PTX_CONTEXT) pUrb->context; + pMLMEContext = (struct rt_tx_context *)pUrb->context; pAd = pMLMEContext->pAd; pObj = (struct os_cookie *)pAd->OS_Cookie; Status = pUrb->status; @@ -716,9 +716,9 @@ void RTUSBBulkOutMLMEPacketComplete(struct urb *pUrb, struct pt_regs * pt_regs) ======================================================================== */ -void RTUSBBulkOutPsPoll(IN PRTMP_ADAPTER pAd) +void RTUSBBulkOutPsPoll(struct rt_rtmp_adapter *pAd) { - PTX_CONTEXT pPsPollContext = &(pAd->PsPollContext); + struct rt_tx_context *pPsPollContext = &(pAd->PsPollContext); PURB pUrb; int ret = 0; unsigned long IrqFlags; @@ -760,12 +760,12 @@ void RTUSBBulkOutPsPoll(IN PRTMP_ADAPTER pAd) /* PS-Poll frame use BulkOutPipeId = 0 */ void RTUSBBulkOutPsPollComplete(struct urb *pUrb, struct pt_regs * pt_regs) { - PRTMP_ADAPTER pAd; - PTX_CONTEXT pPsPollContext; + struct rt_rtmp_adapter *pAd; + struct rt_tx_context *pPsPollContext; int Status; struct os_cookie *pObj; - pPsPollContext = (PTX_CONTEXT) pUrb->context; + pPsPollContext = (struct rt_tx_context *)pUrb->context; pAd = pPsPollContext->pAd; Status = pUrb->status; @@ -774,9 +774,9 @@ void RTUSBBulkOutPsPollComplete(struct urb *pUrb, struct pt_regs * pt_regs) tasklet_hi_schedule(&pObj->pspoll_frame_complete_task); } -void DoBulkIn(IN RTMP_ADAPTER * pAd) +void DoBulkIn(struct rt_rtmp_adapter *pAd) { - PRX_CONTEXT pRxContext; + struct rt_rx_context *pRxContext; PURB pUrb; int ret = 0; unsigned long IrqFlags; @@ -845,9 +845,9 @@ void DoBulkIn(IN RTMP_ADAPTER * pAd) fRTMP_ADAPTER_RADIO_OFF | fRTMP_ADAPTER_RESET_IN_PROGRESS | \ fRTMP_ADAPTER_REMOVE_IN_PROGRESS) -void RTUSBBulkReceive(IN PRTMP_ADAPTER pAd) +void RTUSBBulkReceive(struct rt_rtmp_adapter *pAd) { - PRX_CONTEXT pRxContext; + struct rt_rx_context *pRxContext; unsigned long IrqFlags; /* sanity check */ @@ -917,11 +917,11 @@ 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; + struct rt_rx_context *pRxContext; + struct rt_rtmp_adapter *pAd; struct os_cookie *pObj; - pRxContext = (PRX_CONTEXT) pUrb->context; + pRxContext = (struct rt_rx_context *)pUrb->context; pAd = pRxContext->pAd; pObj = (struct os_cookie *)pAd->OS_Cookie; @@ -943,7 +943,7 @@ void RTUSBBulkRxComplete(struct urb *pUrb, struct pt_regs *pt_regs) ======================================================================== */ -void RTUSBKickBulkOut(IN PRTMP_ADAPTER pAd) +void RTUSBKickBulkOut(struct rt_rtmp_adapter *pAd) { /* BulkIn Reset will reset whole USB PHY. So we need to make sure fRTMP_ADAPTER_BULKIN_RESET not flaged. */ if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NEED_STOP_TX) @@ -1033,10 +1033,10 @@ void RTUSBKickBulkOut(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTUSBCleanUpDataBulkOutQueue(IN PRTMP_ADAPTER pAd) +void RTUSBCleanUpDataBulkOutQueue(struct rt_rtmp_adapter *pAd) { u8 Idx; - PHT_TX_CONTEXT pTxContext; + struct rt_ht_tx_context *pTxContext; DBGPRINT(RT_DEBUG_TRACE, ("--->CleanUpDataBulkOutQueue\n")); @@ -1066,7 +1066,7 @@ void RTUSBCleanUpDataBulkOutQueue(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTUSBCleanUpMLMEBulkOutQueue(IN PRTMP_ADAPTER pAd) +void RTUSBCleanUpMLMEBulkOutQueue(struct rt_rtmp_adapter *pAd) { DBGPRINT(RT_DEBUG_TRACE, ("--->CleanUpMLMEBulkOutQueue\n")); DBGPRINT(RT_DEBUG_TRACE, ("<---CleanUpMLMEBulkOutQueue\n")); @@ -1085,7 +1085,7 @@ void RTUSBCleanUpMLMEBulkOutQueue(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTUSBCancelPendingIRPs(IN PRTMP_ADAPTER pAd) +void RTUSBCancelPendingIRPs(struct rt_rtmp_adapter *pAd) { RTUSBCancelPendingBulkInIRP(pAd); RTUSBCancelPendingBulkOutIRP(pAd); @@ -1104,9 +1104,9 @@ void RTUSBCancelPendingIRPs(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTUSBCancelPendingBulkInIRP(IN PRTMP_ADAPTER pAd) +void RTUSBCancelPendingBulkInIRP(struct rt_rtmp_adapter *pAd) { - PRX_CONTEXT pRxContext; + struct rt_rx_context *pRxContext; u32 i; DBGPRINT_RAW(RT_DEBUG_TRACE, ("--->RTUSBCancelPendingBulkInIRP\n")); @@ -1136,14 +1136,14 @@ void RTUSBCancelPendingBulkInIRP(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTUSBCancelPendingBulkOutIRP(IN PRTMP_ADAPTER pAd) +void RTUSBCancelPendingBulkOutIRP(struct rt_rtmp_adapter *pAd) { - PHT_TX_CONTEXT pHTTXContext; - PTX_CONTEXT pMLMEContext; - PTX_CONTEXT pBeaconContext; - PTX_CONTEXT pNullContext; - PTX_CONTEXT pPsPollContext; - PTX_CONTEXT pRTSContext; + struct rt_ht_tx_context *pHTTXContext; + struct rt_tx_context *pMLMEContext; + struct rt_tx_context *pBeaconContext; + struct rt_tx_context *pNullContext; + struct rt_tx_context *pPsPollContext; + struct rt_tx_context *pRTSContext; u32 i, Idx; /* unsigned int IrqFlags; */ /* spinlock_t *pLock; */ @@ -1173,7 +1173,7 @@ void RTUSBCancelPendingBulkOutIRP(IN PRTMP_ADAPTER pAd) /*RTMP_IRQ_LOCK(pLock, IrqFlags); */ for (i = 0; i < MGMT_RING_SIZE; i++) { - pMLMEContext = (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa; + pMLMEContext = (struct rt_tx_context *)pAd->MgmtRing.Cell[i].AllocVa; if (pMLMEContext && (pMLMEContext->IRPPending == TRUE)) { /* Get the USB_CONTEXT and cancel it's IRP; the completion routine will itself */ diff --git a/drivers/staging/rt2870/common/rtusb_data.c b/drivers/staging/rt2870/common/rtusb_data.c index 471fd4ead812..4583764c78d2 100644 --- a/drivers/staging/rt2870/common/rtusb_data.c +++ b/drivers/staging/rt2870/common/rtusb_data.c @@ -44,7 +44,7 @@ extern u8 Phy11BGNextRateUpward[]; /* defined in mlme.c */ extern u8 EpToQueue[]; -void REPORT_AMSDU_FRAMES_TO_LLC(IN PRTMP_ADAPTER pAd, +void REPORT_AMSDU_FRAMES_TO_LLC(struct rt_rtmp_adapter *pAd, u8 *pData, unsigned long DataSize) { void *pPacket; @@ -85,7 +85,7 @@ void REPORT_AMSDU_FRAMES_TO_LLC(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBFreeDescriptorRequest(IN PRTMP_ADAPTER pAd, +int RTUSBFreeDescriptorRequest(struct rt_rtmp_adapter *pAd, u8 BulkOutPipeId, u32 NumberRequired) { @@ -93,7 +93,7 @@ int RTUSBFreeDescriptorRequest(IN PRTMP_ADAPTER pAd, /* u32 Index; */ int Status = NDIS_STATUS_FAILURE; unsigned long IrqFlags; - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; pHTTXContext = &pAd->TxContext[BulkOutPipeId]; RTMP_IRQ_LOCK(&pAd->TxContextQueueLock[BulkOutPipeId], IrqFlags); @@ -127,11 +127,11 @@ int RTUSBFreeDescriptorRequest(IN PRTMP_ADAPTER pAd, return (Status); } -int RTUSBFreeDescriptorRelease(IN RTMP_ADAPTER * pAd, +int RTUSBFreeDescriptorRelease(struct rt_rtmp_adapter *pAd, u8 BulkOutPipeId) { unsigned long IrqFlags; - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; pHTTXContext = &pAd->TxContext[BulkOutPipeId]; RTMP_IRQ_LOCK(&pAd->TxContextQueueLock[BulkOutPipeId], IrqFlags); @@ -141,10 +141,10 @@ int RTUSBFreeDescriptorRelease(IN RTMP_ADAPTER * pAd, return (NDIS_STATUS_SUCCESS); } -BOOLEAN RTUSBNeedQueueBackForAgg(IN RTMP_ADAPTER * pAd, u8 BulkOutPipeId) +BOOLEAN RTUSBNeedQueueBackForAgg(struct rt_rtmp_adapter *pAd, u8 BulkOutPipeId) { unsigned long IrqFlags; - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; BOOLEAN needQueBack = FALSE; pHTTXContext = &pAd->TxContext[BulkOutPipeId]; @@ -191,17 +191,17 @@ BOOLEAN RTUSBNeedQueueBackForAgg(IN RTMP_ADAPTER * pAd, u8 BulkOutPipeId) ======================================================================== */ -void RTUSBRejectPendingPackets(IN PRTMP_ADAPTER pAd) +void RTUSBRejectPendingPackets(struct rt_rtmp_adapter *pAd) { u8 Index; - PQUEUE_ENTRY pEntry; + struct rt_queue_entry *pEntry; void *pPacket; - PQUEUE_HEADER pQueue; + struct rt_queue_header *pQueue; for (Index = 0; Index < 4; Index++) { NdisAcquireSpinLock(&pAd->TxSwQueueLock[Index]); while (pAd->TxSwQueue[Index].Head != NULL) { - pQueue = (PQUEUE_HEADER) & (pAd->TxSwQueue[Index]); + pQueue = (struct rt_queue_header *)& (pAd->TxSwQueue[Index]); pEntry = RemoveHeadQueue(pQueue); pPacket = QUEUE_ENTRY_TO_PACKET(pEntry); RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_FAILURE); @@ -240,8 +240,8 @@ void RTUSBRejectPendingPackets(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPWriteTxInfo(IN PRTMP_ADAPTER pAd, - IN PTXINFO_STRUC pTxInfo, +void RTMPWriteTxInfo(struct rt_rtmp_adapter *pAd, + struct rt_txinfo *pTxInfo, u16 USBDMApktLen, IN BOOLEAN bWiv, u8 QueueSel, u8 NextValid, u8 TxBurst) diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c index d15a92eef04a..34443f2243f1 100644 --- a/drivers/staging/rt2870/common/rtusb_io.c +++ b/drivers/staging/rt2870/common/rtusb_io.c @@ -56,7 +56,7 @@ ======================================================================== */ -static int RTUSBFirmwareRun(IN PRTMP_ADAPTER pAd) +static int RTUSBFirmwareRun(struct rt_rtmp_adapter *pAd) { int Status; @@ -83,7 +83,7 @@ static int RTUSBFirmwareRun(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int RTUSBFirmwareWrite(IN PRTMP_ADAPTER pAd, +int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd, u8 *pFwImage, unsigned long FwLen) { u32 MacReg; @@ -109,7 +109,7 @@ int RTUSBFirmwareWrite(IN PRTMP_ADAPTER pAd, return Status; } -int RTUSBVenderReset(IN PRTMP_ADAPTER pAd) +int RTUSBVenderReset(struct rt_rtmp_adapter *pAd) { int Status; DBGPRINT_RAW(RT_DEBUG_ERROR, ("-->RTUSBVenderReset\n")); @@ -137,7 +137,7 @@ int RTUSBVenderReset(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int RTUSBMultiRead(IN PRTMP_ADAPTER pAd, +int RTUSBMultiRead(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length) { int Status; @@ -166,7 +166,7 @@ int RTUSBMultiRead(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBMultiWrite_OneByte(IN PRTMP_ADAPTER pAd, +int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData) { int Status; @@ -180,7 +180,7 @@ int RTUSBMultiWrite_OneByte(IN PRTMP_ADAPTER pAd, return Status; } -int RTUSBMultiWrite(IN PRTMP_ADAPTER pAd, +int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length) { int Status; @@ -202,7 +202,7 @@ int RTUSBMultiWrite(IN PRTMP_ADAPTER pAd, return Status; } -int RTUSBSingleWrite(IN RTMP_ADAPTER * pAd, +int RTUSBSingleWrite(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Value) { int Status; @@ -231,7 +231,7 @@ int RTUSBSingleWrite(IN RTMP_ADAPTER * pAd, ======================================================================== */ -int RTUSBReadMACRegister(IN PRTMP_ADAPTER pAd, +int RTUSBReadMACRegister(struct rt_rtmp_adapter *pAd, u16 Offset, u32 *pValue) { int Status = 0; @@ -266,7 +266,7 @@ int RTUSBReadMACRegister(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBWriteMACRegister(IN PRTMP_ADAPTER pAd, +int RTUSBWriteMACRegister(struct rt_rtmp_adapter *pAd, u16 Offset, u32 Value) { int Status; @@ -297,7 +297,7 @@ int RTUSBWriteMACRegister(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd, +int RTUSBReadBBPRegister(struct rt_rtmp_adapter *pAd, u8 Id, u8 *pValue) { BBP_CSR_CFG_STRUC BbpCsr; @@ -383,7 +383,7 @@ int RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBWriteBBPRegister(IN PRTMP_ADAPTER pAd, +int RTUSBWriteBBPRegister(struct rt_rtmp_adapter *pAd, u8 Id, u8 Value) { BBP_CSR_CFG_STRUC BbpCsr; @@ -438,7 +438,7 @@ int RTUSBWriteBBPRegister(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBWriteRFRegister(IN PRTMP_ADAPTER pAd, u32 Value) +int RTUSBWriteRFRegister(struct rt_rtmp_adapter *pAd, u32 Value) { PHY_CSR4_STRUC PhyCsr4; u32 i = 0; @@ -486,7 +486,7 @@ int RTUSBWriteRFRegister(IN PRTMP_ADAPTER pAd, u32 Value) ======================================================================== */ -int RTUSBReadEEPROM(IN PRTMP_ADAPTER pAd, +int RTUSBReadEEPROM(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length) { int Status = STATUS_SUCCESS; @@ -515,7 +515,7 @@ int RTUSBReadEEPROM(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBWriteEEPROM(IN PRTMP_ADAPTER pAd, +int RTUSBWriteEEPROM(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length) { int Status = STATUS_SUCCESS; @@ -528,7 +528,7 @@ int RTUSBWriteEEPROM(IN PRTMP_ADAPTER pAd, return Status; } -int RTUSBReadEEPROM16(IN PRTMP_ADAPTER pAd, +int RTUSBReadEEPROM16(struct rt_rtmp_adapter *pAd, u16 offset, u16 *pData) { int status; @@ -557,7 +557,7 @@ int RTUSBReadEEPROM16(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTUSBPutToSleep(IN PRTMP_ADAPTER pAd) +void RTUSBPutToSleep(struct rt_rtmp_adapter *pAd) { u32 value; @@ -585,7 +585,7 @@ void RTUSBPutToSleep(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int RTUSBWakeUp(IN PRTMP_ADAPTER pAd) +int RTUSBWakeUp(struct rt_rtmp_adapter *pAd) { int Status; @@ -612,7 +612,7 @@ int RTUSBWakeUp(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTUSBInitializeCmdQ(IN PCmdQ cmdq) +void RTUSBInitializeCmdQ(struct rt_cmdq *cmdq) { cmdq->head = NULL; cmdq->tail = NULL; @@ -635,15 +635,15 @@ void RTUSBInitializeCmdQ(IN PCmdQ cmdq) ======================================================================== */ -int RTUSBEnqueueCmdFromNdis(IN PRTMP_ADAPTER pAd, +int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd, IN NDIS_OID Oid, IN BOOLEAN SetInformation, void *pInformationBuffer, u32 InformationBufferLength) { int status; - PCmdQElmt cmdqelmt = NULL; - RTMP_OS_TASK *pTask = &pAd->cmdQTask; + struct rt_cmdqelmt *cmdqelmt = NULL; + struct rt_rtmp_os_task *pTask = &pAd->cmdQTask; #ifdef KTHREAD_SUPPORT if (pTask->kthread_task == NULL) @@ -654,7 +654,7 @@ int RTUSBEnqueueCmdFromNdis(IN PRTMP_ADAPTER pAd, #endif return (NDIS_STATUS_RESOURCES); - status = os_alloc_mem(pAd, (u8 **) (&cmdqelmt), sizeof(CmdQElmt)); + status = os_alloc_mem(pAd, (u8 **) (&cmdqelmt), sizeof(struct rt_cmdqelmt)); if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL)) return (NDIS_STATUS_RESOURCES); @@ -716,18 +716,18 @@ int RTUSBEnqueueCmdFromNdis(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSBEnqueueInternalCmd(IN PRTMP_ADAPTER pAd, +int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd, IN NDIS_OID Oid, void *pInformationBuffer, u32 InformationBufferLength) { int status; - PCmdQElmt cmdqelmt = NULL; + struct rt_cmdqelmt *cmdqelmt = NULL; - status = os_alloc_mem(pAd, (u8 **) & cmdqelmt, sizeof(CmdQElmt)); + status = os_alloc_mem(pAd, (u8 **) & cmdqelmt, sizeof(struct rt_cmdqelmt)); if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL)) return (NDIS_STATUS_RESOURCES); - NdisZeroMemory(cmdqelmt, sizeof(CmdQElmt)); + NdisZeroMemory(cmdqelmt, sizeof(struct rt_cmdqelmt)); if (InformationBufferLength > 0) { status = @@ -785,7 +785,7 @@ int RTUSBEnqueueInternalCmd(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTUSBDequeueCmd(IN PCmdQ cmdq, OUT PCmdQElmt * pcmdqelmt) +void RTUSBDequeueCmd(struct rt_cmdq *cmdq, struct rt_cmdqelmt * * pcmdqelmt) { *pcmdqelmt = cmdq->head; @@ -833,7 +833,7 @@ void RTUSBDequeueCmd(IN PCmdQ cmdq, OUT PCmdQElmt * pcmdqelmt) ======================================================================== */ -int RTUSB_VendorRequest(IN PRTMP_ADAPTER pAd, +int RTUSB_VendorRequest(struct rt_rtmp_adapter *pAd, u32 TransferFlags, u8 RequestType, u8 Request, @@ -954,7 +954,7 @@ int RTUSB_VendorRequest(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RTUSB_ResetDevice(IN PRTMP_ADAPTER pAd) +int RTUSB_ResetDevice(struct rt_rtmp_adapter *pAd) { int Status = TRUE; @@ -963,9 +963,9 @@ int RTUSB_ResetDevice(IN PRTMP_ADAPTER pAd) return Status; } -void CMDHandler(IN PRTMP_ADAPTER pAd) +void CMDHandler(struct rt_rtmp_adapter *pAd) { - PCmdQElmt cmdqelmt; + struct rt_cmdqelmt *cmdqelmt; u8 *pData; int NdisStatus = NDIS_STATUS_SUCCESS; /* unsigned long Now = 0; */ @@ -1055,8 +1055,8 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) u32 MACValue; u8 Index; int ret = 0; - PHT_TX_CONTEXT pHTTXContext; -/* RTMP_TX_RING *pTxRing; */ + struct rt_ht_tx_context *pHTTXContext; +/* struct rt_rtmp_tx_ring *pTxRing; */ unsigned long IrqFlags; DBGPRINT_RAW(RT_DEBUG_TRACE, @@ -1276,34 +1276,34 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) u8 pendingContext = 0; - PHT_TX_CONTEXT + struct rt_ht_tx_context * pHTTXContext = - (PHT_TX_CONTEXT) + (struct rt_ht_tx_context *) (&pAd-> TxContext [pAd-> bulkResetPipeid]); - PTX_CONTEXT + struct rt_tx_context * pMLMEContext = - (PTX_CONTEXT) + (struct rt_tx_context *) (pAd-> MgmtRing. Cell[pAd-> MgmtRing. TxDmaIdx]. AllocVa); - PTX_CONTEXT + struct rt_tx_context * pNULLContext = - (PTX_CONTEXT) + (struct rt_tx_context *) (&pAd-> PsPollContext); - PTX_CONTEXT + struct rt_tx_context * pPsPollContext = - (PTX_CONTEXT) + (struct rt_tx_context *) (&pAd-> NullContext); @@ -1383,7 +1383,7 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) pAd->NextRxBulkInIndex = 0; // Rx Bulk pointer for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); pRxContext->pAd = pAd; pRxContext->InUse = FALSE; @@ -1490,7 +1490,7 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) pAd->NextRxBulkInIndex = 0; // Rx Bulk pointer for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); pRxContext->pAd = pAd; pRxContext->InUse = FALSE; @@ -1506,7 +1506,7 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) pAd->CommonCfg. NumOfBulkInIRP; i++) { /*RTUSBBulkReceive(pAd); */ - PRX_CONTEXT pRxContext; + struct rt_rx_context *pRxContext; PURB pUrb; int ret = 0; unsigned long IrqFlags; @@ -1606,11 +1606,11 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) case CMDTHREAD_SET_ASIC_WCID: { - RT_SET_ASIC_WCID SetAsicWcid; + struct rt_set_asic_wcid SetAsicWcid; u16 offset; u32 MACValue, MACRValue = 0; SetAsicWcid = - *((PRT_SET_ASIC_WCID) (pData)); + *((struct rt_set_asic_wcid *)(pData)); if (SetAsicWcid.WCID >= MAX_LEN_OF_MAC_TABLE) @@ -1672,12 +1672,12 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) case CMDTHREAD_SET_ASIC_WCID_CIPHER: { - RT_SET_ASIC_WCID_ATTRI SetAsicWcidAttri; + struct rt_set_asic_wcid_attri SetAsicWcidAttri; u16 offset; u32 MACRValue = 0; SHAREDKEY_MODE_STRUC csr1; SetAsicWcidAttri = - *((PRT_SET_ASIC_WCID_ATTRI) + *((struct rt_set_asic_wcid_attri *) (pData)); if (SetAsicWcidAttri.WCID >= @@ -1773,9 +1773,9 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) /*Benson modified for USB interface, avoid in interrupt when write key, 20080724 --> */ case RT_CMD_SET_KEY_TABLE: /*General call for AsicAddPairwiseKeyEntry() */ { - RT_ADD_PAIRWISE_KEY_ENTRY KeyInfo; + struct rt_add_pairwise_key_entry KeyInfo; KeyInfo = - *((PRT_ADD_PAIRWISE_KEY_ENTRY) + *((struct rt_add_pairwise_key_entry *) (pData)); AsicAddPairwiseKeyEntry(pAd, KeyInfo.MacAddr, @@ -1788,12 +1788,12 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) case RT_CMD_SET_RX_WCID_TABLE: /*General call for RTMPAddWcidAttributeEntry() */ { - PMAC_TABLE_ENTRY pEntry; + struct rt_mac_table_entry *pEntry; u8 KeyIdx = 0; u8 CipherAlg = CIPHER_NONE; u8 ApIdx = BSS0; - pEntry = (PMAC_TABLE_ENTRY) (pData); + pEntry = (struct rt_mac_table_entry *)(pData); RTMPAddWcidAttributeEntry(pAd, ApIdx, @@ -1806,8 +1806,8 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) case CMDTHREAD_SET_CLIENT_MAC_ENTRY: { - MAC_TABLE_ENTRY *pEntry; - pEntry = (MAC_TABLE_ENTRY *) pData; + struct rt_mac_table_entry *pEntry; + pEntry = (struct rt_mac_table_entry *)pData; { AsicRemovePairwiseKeyEntry(pAd, @@ -1908,12 +1908,12 @@ void CMDHandler(IN PRTMP_ADAPTER pAd) { u32 i; u32 KeyIdx; - PNDIS_802_11_WEP pWepKey; + struct rt_ndis_802_11_wep *pWepKey; DBGPRINT(RT_DEBUG_TRACE, ("CmdThread::OID_802_11_ADD_WEP \n")); - pWepKey = (PNDIS_802_11_WEP) pData; + pWepKey = (struct rt_ndis_802_11_wep *)pData; KeyIdx = pWepKey->KeyIndex & 0x0fffffff; /* it is a shared key */