Remove misc typedefs.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#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,
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__ */
//
// TX descriptor format, Tx ring, Mgmt Ring
//
-typedef struct PACKED _TXD_STRUC {
+struct PACKED rt_txd {
// Word 0
u32 SDPtr0;
// Word 1
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
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 {
#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;
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;
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;
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;
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. */
atomic_t IrpLock;
spinlock_t RxContextLock;
dma_addr_t data_dma; /* urb dma on linux */
-} RX_CONTEXT, *PRX_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); \
}
#ifdef RT30xx
-extern REG_PAIR RT30xx_RFRegTable[];
+extern struct rt_reg_pair RT30xx_RFRegTable[];
extern u8 NUM_RF_REG_PARMS;
#endif /* RT30xx // */
/*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. */
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;
u32 FOFFSET:8; /* RT35xx */
u32 rsv2:8;
/*u32 rsv2:16; */
-} RXWI_STRUC, *PRXWI_STRUC;
+};
/* ================================================================================= */
/* Register format */
} 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 */
#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.
/*
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.
#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;
#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 */
/* */
/* RF register initialization set */
/* */
-REG_PAIR RT30xx_RFRegTable[] = {
+struct rt_reg_pair RT30xx_RFRegTable[] = {
{RF_R04, 0x40}
,
{RF_R05, 0x03}
,
};
-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, */
/* 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
========================================================================
*/
-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;
==========================================================================
*/
-void RT30xxLoadRFNormalModeSetup(IN PRTMP_ADAPTER pAd)
+void RT30xxLoadRFNormalModeSetup(struct rt_rtmp_adapter *pAd)
{
u8 RFValue;
==========================================================================
*/
-void RT30xxLoadRFSleepModeSetup(IN PRTMP_ADAPTER pAd)
+void RT30xxLoadRFSleepModeSetup(struct rt_rtmp_adapter *pAd)
{
u8 RFValue;
u32 MACValue;
==========================================================================
*/
-void RT30xxReverseRFSleepModeSetup(IN PRTMP_ADAPTER pAd)
+void RT30xxReverseRFSleepModeSetup(struct rt_rtmp_adapter *pAd)
{
u8 RFValue;
u32 MACValue;
/* end johnli */
-void RT30xxHaltAction(IN PRTMP_ADAPTER pAd)
+void RT30xxHaltAction(struct rt_rtmp_adapter *pAd)
{
u32 TxPinCfg = 0x00050F0F;
#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) \
(_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__ */
#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);
/*
==========================================================================
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,
(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 */
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 |
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));
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,
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,
}
}
-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];
}
}
-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;
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 */
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))
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];
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,
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;
}
}
-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];
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. */
}
}
-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;
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;
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);
Return : None.
==========================================================================
*/
-void InsertActField(IN PRTMP_ADAPTER pAd,
+void InsertActField(struct rt_rtmp_adapter *pAd,
u8 *pFrameBuf,
unsigned long *pFrameLen, u8 Category, u8 ActCode)
{
#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__ */
#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,
#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;
}
}
-void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd,
+void Announce_Reordering_Packet(struct rt_rtmp_adapter *pAd,
IN struct reordering_mpdu *mpdu)
{
void *pPacket;
/*
* 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;
/*
* 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;
/*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;
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);
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;
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;
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;
}
/*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;
* 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;
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];
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);
}
}
-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;
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);
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);
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;
}
}
-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;
}
}
-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) {
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);
/* */
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);
}
}
-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;
/* */
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; */
/* 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);
BATableFreeRecEntry(pAd, Idx);
}
-void BASessionTearDownALL(IN OUT PRTMP_ADAPTER pAd, u8 Wcid)
+void BASessionTearDownALL(struct rt_rtmp_adapter *pAd, u8 Wcid)
{
int i;
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;
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);
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",
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)
}
}
-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));
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
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) {
return;
}
- NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP));
+ NdisZeroMemory(&ADDframe, sizeof(struct rt_frame_addba_rsp));
/* 2-1. Prepare ADDBA Response frame. */
{
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);
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)
/*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));
}
}
-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"));
}
}
-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; */
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;
}
/*
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 */
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));
#define RADIO_MEASUREMENT_REQUEST_ACTION 0
-typedef struct PACKED {
+struct PACKED rt_beacon_request {
u8 RegulatoryClass;
u8 ChannelNumber;
u16 RandomInterval;
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)
{
} \
} 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;
==========================================================================
*/
-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;
#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 *********/
}
-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;
(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;
/* 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;
/* 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;
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);
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 */
#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}
,
/* 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 // */
/**************************************************/
,
};
-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;
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;
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)
==========================================================================
*/
-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;
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"));
==========================================================================
*/
-void AsicLockChannel(IN PRTMP_ADAPTER pAd, u8 Channel)
+void AsicLockChannel(struct rt_rtmp_adapter *pAd, u8 Channel)
{
}
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;
==========================================================================
*/
-void AsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd,
+void AsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd,
u16 TbttNumToNextWakeUp)
{
RTMP_STA_SLEEP_THEN_AUTO_WAKEUP(pAd, TbttNumToNextWakeUp);
in INFRA BSS, we should use AsicSleepThenAutoWakeup() instead.
==========================================================================
*/
-void AsicForceSleep(IN PRTMP_ADAPTER pAd)
+void AsicForceSleep(struct rt_rtmp_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);
==========================================================================
*/
-void AsicSetBssid(IN PRTMP_ADAPTER pAd, u8 *pBssid)
+void AsicSetBssid(struct rt_rtmp_adapter *pAd, u8 *pBssid)
{
unsigned long Addr4;
DBGPRINT(RT_DEBUG_TRACE,
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;
==========================================================================
*/
-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;
==========================================================================
*/
-void AsicEnableRDG(IN PRTMP_ADAPTER pAd)
+void AsicEnableRDG(struct rt_rtmp_adapter *pAd)
{
TX_LINK_CFG_STRUC TxLinkCfg;
u32 Data = 0;
==========================================================================
*/
-void AsicDisableRDG(IN PRTMP_ADAPTER pAd)
+void AsicDisableRDG(struct rt_rtmp_adapter *pAd)
{
TX_LINK_CFG_STRUC TxLinkCfg;
u32 Data = 0;
==========================================================================
*/
-void AsicDisableSync(IN PRTMP_ADAPTER pAd)
+void AsicDisableSync(struct rt_rtmp_adapter *pAd)
{
BCN_TIME_CFG_STRUC csr;
==========================================================================
*/
-void AsicEnableBssSync(IN PRTMP_ADAPTER pAd)
+void AsicEnableBssSync(struct rt_rtmp_adapter *pAd)
{
BCN_TIME_CFG_STRUC csr;
==========================================================================
*/
-void AsicEnableIbssSync(IN PRTMP_ADAPTER pAd)
+void AsicEnableIbssSync(struct rt_rtmp_adapter *pAd)
{
BCN_TIME_CFG_STRUC csr9;
u8 *ptr;
==========================================================================
*/
-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;
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);
/*======================================================== */
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",
==========================================================================
*/
-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;
Return:
========================================================================
*/
-void AsicAddSharedKeyEntry(IN PRTMP_ADAPTER pAd,
+void AsicAddSharedKeyEntry(struct rt_rtmp_adapter *pAd,
u8 BssIndex,
u8 KeyIdx,
u8 CipherAlg,
}
/* IRQL = DISPATCH_LEVEL */
-void AsicRemoveSharedKeyEntry(IN PRTMP_ADAPTER pAd,
+void AsicRemoveSharedKeyEntry(struct rt_rtmp_adapter *pAd,
u8 BssIndex, u8 KeyIdx)
{
/*unsigned long SecCsr0; */
}
-void AsicUpdateWCIDAttribute(IN PRTMP_ADAPTER pAd,
+void AsicUpdateWCIDAttribute(struct rt_rtmp_adapter *pAd,
u16 WCID,
u8 BssIndex,
u8 CipherAlg,
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;
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;
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;
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;
Return:
========================================================================
*/
-void AsicRemovePairwiseKeyEntry(IN PRTMP_ADAPTER pAd,
+void AsicRemovePairwiseKeyEntry(struct rt_rtmp_adapter *pAd,
u8 BssIdx, u8 Wcid)
{
unsigned long WCIDAttri;
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)
{
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. */
#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);
/* 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;
}
}
-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 */
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;
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;
}
-int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg)
+int RT_CfgSetShortSlot(struct rt_rtmp_adapter *pAd, char *arg)
{
long ShortSlot;
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;
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 */
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)
========================================================================
*/
-int MiniportMMRequest(IN PRTMP_ADAPTER pAd,
+int MiniportMMRequest(struct rt_rtmp_adapter *pAd,
u8 QueIdx, u8 *pData, u32 Length)
{
void *pPacket;
========================================================================
*/
-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)
) {
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)
}
-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);
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;
(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);
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,
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)); */
========================================================================
*/
-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;
}
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;
========================================================================
*/
-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;
========================================================================
*/
-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,
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];
}
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);
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 */
/* 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)
{
========================================================================
*/
-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);
========================================================================
*/
-PQUEUE_HEADER RTMPCheckTxSwQueue(IN PRTMP_ADAPTER pAd, u8 *pQueIdx)
+struct rt_queue_header *RTMPCheckTxSwQueue(struct rt_rtmp_adapter *pAd, u8 *pQueIdx)
{
unsigned long Number;
========================================================================
*/
-void RTMPSuspendMsduTransmission(IN PRTMP_ADAPTER pAd)
+void RTMPSuspendMsduTransmission(struct rt_rtmp_adapter *pAd)
{
DBGPRINT(RT_DEBUG_TRACE, ("SCANNING, suspend MSDU transmission ...\n"));
========================================================================
*/
-void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd)
+void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd)
{
/* u8 IrqState; */
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];
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] +
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 +
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;
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];
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; */
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;
}
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 */
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",
the power-saving queues are freed here.
==========================================================================
*/
-void MacTableReset(IN PRTMP_ADAPTER pAd)
+void MacTableReset(struct rt_rtmp_adapter *pAd)
{
int i;
==========================================================================
*/
-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 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);
========================================================================
*/
-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;
return TRUE;
}
-BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, void *pPacket)
+BOOLEAN RTMPCheckEtherType(struct rt_rtmp_adapter *pAd, void *pPacket)
{
u16 TypeLen;
u8 Byte0, Byte1;
}
-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;
}
/* 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];
#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;
}
/* 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)) {
}
}
-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;
_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;
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;
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;
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];
}
#define BCN_TBTT_OFFSET 64 /*defer 64 us */
-void ReSyncBeaconTime(IN PRTMP_ADAPTER pAd)
+void ReSyncBeaconTime(struct rt_rtmp_adapter *pAd)
{
u32 Offset;
*/
#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;
/* */
/* 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;
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;
/* */
/* */
/* 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;
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;
/* */
/* 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;
}
-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 */
/* */
/* 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;
/* */
/* 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) {
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;
========================================================================
*/
-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 */
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;
/* 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;
/* 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); */
}
========================================================================
*/
-BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd,
+BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd,
INT_SOURCE_CSR_STRUC TxRingBitmap)
{
/* u8 Count = 0; */
========================================================================
*/
-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);
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;
========================================================================
*/
-void RTMPHandleTBTTInterrupt(IN PRTMP_ADAPTER pAd)
+void RTMPHandleTBTTInterrupt(struct rt_rtmp_adapter *pAd)
{
{
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) {
========================================================================
*/
-void RTMPHandlePreTBTTInterrupt(IN PRTMP_ADAPTER pAd)
+void RTMPHandlePreTBTTInterrupt(struct rt_rtmp_adapter *pAd)
{
{
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) {
}
-void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd)
+void RTMPHandleRxCoherentInterrupt(struct rt_rtmp_adapter *pAd)
{
WPDMA_GLO_CFG_STRUC GloCfg;
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);
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;
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);
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"));
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 {
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)
========================================================================
*/
-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)
{
/* */
=>
=>
*/
-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;
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)
{
}
-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;
}
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];
}
-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;
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 ==
}
-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;
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 ==
}
-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;
/* 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;
/* */
/* 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;
/* */
}
-void RtmpUSBDataLastTxIdx(IN PRTMP_ADAPTER pAd,
+void RtmpUSBDataLastTxIdx(struct rt_rtmp_adapter *pAd,
u8 QueIdx, u16 TxIdx)
{
/* DO nothing for USB. */
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);
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;
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;
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);
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;
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))
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;
}
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",
}
/* 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",
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;
========================================================================
*/
-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)
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);
}
}
-void RT28xxUsbStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx)
+void RT28xxUsbStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx)
{
BOOLEAN Canceled;
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_DOZE);
}
-void RT28xxUsbStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd,
+void RT28xxUsbStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd,
u16 TbttNumToNextWakeUp)
{
========================================================================
*/
-void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates)
+void RTMPSetDesiredRates(struct rt_rtmp_adapter *pAdapter, long Rates)
{
NDIS_802_11_RATES aryRates;
========================================================================
*/
-void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd)
+void RTMPWPARemoveAllKeys(struct rt_rtmp_adapter *pAd)
{
u8 i;
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);
}
========================================================================
*/
-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 */
========================================================================
*/
-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;
========================================================================
*/
-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;
("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));
========================================================================
*/
-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;
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;
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;
========================================================================
*/
-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; */
/* 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;
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 */
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;
} 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);
========================================================================
*/
-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; */
/* 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 */
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;
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;
}
}
}
-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;
/* 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];
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) {
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) {
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)
Note:
========================================================================
*/
-void RT28XXDMADisable(IN RTMP_ADAPTER * pAd)
+void RT28XXDMADisable(struct rt_rtmp_adapter *pAd)
{
WPDMA_GLO_CFG_STRUC GloCfg;
Note:
========================================================================
*/
-void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd)
+void RT28XXDMAEnable(struct rt_rtmp_adapter *pAd)
{
WPDMA_GLO_CFG_STRUC GloCfg;
int i = 0;
}
-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;
Note:
========================================================================
*/
-void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd,
+void RT28xx_UpdateBeaconToAsic(struct rt_rtmp_adapter *pAd,
int apidx,
unsigned long FrameLen, unsigned long UpdatePos)
{
}
-void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx)
+void RT28xxPciStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx)
{
AUTO_WAKEUP_STRUC AutoWakeupCfg;
/* 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->
DBGPRINT(RT_DEBUG_TRACE, ("<=======RT28xxPciStaAsicForceWakeup\n"));
}
-void RT28xxPciStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd,
+void RT28xxPciStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd,
u16 TbttNumToNextWakeUp)
{
BOOLEAN brc;
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"));
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;
==========================================================================
*/
-BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level)
+BOOLEAN RT28xxPciAsicRadioOn(struct rt_rtmp_adapter *pAd, u8 Level)
{
/*WPDMA_GLO_CFG_STRUC DmaCfg; */
BOOLEAN Cancelled;
/* 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);
==========================================================================
*/
-BOOLEAN RT28xxPciAsicRadioOff(IN PRTMP_ADAPTER pAd,
+BOOLEAN RT28xxPciAsicRadioOff(struct rt_rtmp_adapter *pAd,
u8 Level, u16 TbttNumToNextWakeUp)
{
WPDMA_GLO_CFG_STRUC DmaCfg;
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;
}
}
-void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd)
+void RT28xxPciMlmeRadioOFF(struct rt_rtmp_adapter *pAd)
{
BOOLEAN brc = TRUE;
/* 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) {
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);
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;
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);
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,
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); \
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;
/* 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->
/* 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) {
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,
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));
/* */
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;
/* */
/* 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;
/* */
/* 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;
/* */
/* 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;
/* --------------------------- 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:
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;
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. */
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);
} 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);
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) { \
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);
/* 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)
Note:
========================================================================
*/
-int RTUSBWriteHWMACAddress(IN PRTMP_ADAPTER pAd)
+int RTUSBWriteHWMACAddress(struct rt_rtmp_adapter *pAd)
{
MAC_DW0_STRUC StaMacReg0;
MAC_DW1_STRUC StaMacReg1;
Note:
========================================================================
*/
-void RT28XXDMADisable(IN RTMP_ADAPTER * pAd)
+void RT28XXDMADisable(struct rt_rtmp_adapter *pAd)
{
/* no use */
}
Note:
========================================================================
*/
-void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd)
+void RT28XXDMAEnable(struct rt_rtmp_adapter *pAd)
{
WPDMA_GLO_CFG_STRUC GloCfg;
USB_DMA_CFG_STRUC UsbCfg;
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;
}
-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;
}
}
-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;
}
}
-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);
}
}
-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;
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; */
* 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"));
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;
/* 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) {
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);
==========================================================================
*/
-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;
==========================================================================
*/
-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;
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));
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));
}
-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));
==========================================================================
*/
-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; */
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;
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) {
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) =
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;
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.
}
}
NdisMoveMemory(pHtCapability,
&pEid->Octet[4],
sizeof
- (HT_CAPABILITY_IE));
+ (struct rt_ht_capability_ie));
*pPreNHtCapabilityLen = SIZE_HT_CAP_IE;
}
&& (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)) {
}
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 */
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);
}
/* IRQL = DISPATCH_LEVEL */
-u8 ChannelSanity(IN PRTMP_ADAPTER pAd, u8 channel)
+u8 ChannelSanity(struct rt_rtmp_adapter *pAd, u8 channel)
{
int i;
==========================================================================
*/
-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);
==========================================================================
*/
-BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd,
+BOOLEAN PeerAuthSanity(struct rt_rtmp_adapter *pAd,
void * Msg,
unsigned long MsgLen,
u8 *pAddr,
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);
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;
==========================================================================
*/
-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 */
==========================================================================
*/
-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);
========================================================================
*/
-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;
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));
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));
==========================================================================
*/
-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)
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;
+ i],
&pAd->TxPower[j],
sizeof
- (CHANNEL_TX_POWER));
+ (struct rt_channel_tx_power));
}
for (j = 0; j < 15; j++) {
if (pChannelList[i] == RadarCh[j])
==========================================================================
*/
-u8 FirstChannel(IN PRTMP_ADAPTER pAd)
+u8 FirstChannel(struct rt_rtmp_adapter *pAd)
{
return pAd->ChannelList[0].Channel;
}
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;
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 */
}
-char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber)
+char ConvertToRssi(struct rt_rtmp_adapter *pAd, char Rssi, u8 RssiNumber)
{
u8 RssiOffset, LNAGain;
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;
{
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,
/* 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);
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,
}
}
-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;
/* */
/* Expanded IV for TKIP function. */
/* */
-typedef struct PACKED _IV_CONTROL_ {
+struct PACKED rt_tkip_iv {
union PACKED {
struct PACKED {
u8 rc0;
} IV16;
unsigned long IV32;
-} TKIP_IV, *PTKIP_IV;
+};
/*
========================================================================
========================================================================
*/
-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);
========================================================================
*/
-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));
========================================================================
*/
-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) {
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);
========================================================================
*/
-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;
========================================================================
*/
-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,
========================================================================
*/
-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;
/* 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;
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];
========================================================================
*/
-void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd,
+void RTMPInitWepEngine(struct rt_rtmp_adapter *pAd,
u8 *pKey,
u8 KeyId, u8 KeyLen, IN u8 *pDest)
{
========================================================================
*/
-void RTMPEncryptData(IN PRTMP_ADAPTER pAd,
+void RTMPEncryptData(struct rt_rtmp_adapter *pAd,
u8 *pSrc, u8 *pDest, u32 Len)
{
pAd->PrivateInfo.FCSCRC32 =
========================================================================
*/
-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;
========================================================================
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
========================================================================
*/
-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;
========================================================================
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;
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
========================================================================
*/
-void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx,
+void ARCFOUR_DECRYPT(struct rt_arcfourcontext *Ctx,
u8 *pDest, u8 *pSrc, u32 Len)
{
u32 i;
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
========================================================================
*/
-void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
+void ARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx,
u8 *pDest, u8 *pSrc, u32 Len)
{
u32 i;
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
========================================================================
*/
-void WPAARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
+void WPAARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx,
u8 *pDest, u8 *pSrc, u32 Len)
{
u32 i;
========================================================================
*/
-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);
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);
/*
==========================================================================
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,
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)
{
}
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)
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));
========================================================================
*/
-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 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;
/* 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 */
========================================================================
*/
-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;
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;
{
}
/* 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 */
/* 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 */
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];
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 */
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 */
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,
========================================================================
*/
-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;
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;
{
}
/* 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 */
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 */
/* 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);
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);
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;
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 */
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);
==========================================================================
*/
-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;
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,
========================================================================
*/
-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;
}
/* 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 */
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 */
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"));
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;
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 */
========================================================================
*/
-void WpaDerivePTK(IN PRTMP_ADAPTER pAd,
+void WpaDerivePTK(struct rt_rtmp_adapter *pAd,
u8 * PMK,
u8 * ANonce,
u8 * AA,
========================================================================
*/
-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];
========================================================================
*/
-static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd,
+static void RTMPMakeRsnIeCipher(struct rt_rtmp_adapter *pAd,
u8 ElementID,
u32 WepStatus,
IN BOOLEAN bMixCipher,
/* 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;
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 */
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 */
}
pRsnie_cipher->ucount = PairwiseCnt;
- *rsn_len = sizeof(RSNIE2) + (4 * (PairwiseCnt - 1));
+ *rsn_len = sizeof(struct rt_rsnie2) + (4 * (PairwiseCnt - 1));
break;
}
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);
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 */
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 */
}
pRsnie_cipher->ucount = PairwiseCnt;
- *rsn_len = sizeof(RSNIE) + (4 * (PairwiseCnt - 1));
+ *rsn_len = sizeof(struct rt_rsnie) + (4 * (PairwiseCnt - 1));
break;
}
========================================================================
*/
-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) {
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)));
}
========================================================================
*/
-static void RTMPMakeRsnIeCap(IN PRTMP_ADAPTER pAd,
+static void RTMPMakeRsnIeCap(struct rt_rtmp_adapter *pAd,
u8 ElementID,
u8 apidx,
u8 *pRsnIe, u8 * rsn_len)
========================================================================
*/
-void RTMPMakeRSNIE(IN PRTMP_ADAPTER pAd,
+void RTMPMakeRSNIE(struct rt_rtmp_adapter *pAd,
u32 AuthMode, u32 WepStatus, u8 apidx)
{
u8 *pRsnIe = NULL; /* primary RSNIE */
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)
{
========================================================================
*/
-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))) {
========================================================================
*/
-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;
&& (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;
}
{
- PCIPHER_KEY pSharedKey;
+ struct rt_cipher_key *pSharedKey;
/* set key material, TxMic and RxMic */
NdisMoveMemory(pAd->StaCfg.GTK, pMyKeyData, 32);
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],
========================================================================
*/
-void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry,
+void ConstructEapolMsg(struct rt_mac_table_entry *pEntry,
u8 GroupKeyWepStatus,
u8 MsgType,
u8 DefaultKeyIdx,
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;
========================================================================
*/
-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 */
========================================================================
*/
static void CalculateMIC(u8 KeyDescVer,
- u8 * PTK, OUT PEAPOL_PACKET pMsg)
+ u8 * PTK, struct rt_eapol_packet * pMsg)
{
u8 *OutBuffer;
unsigned long FrameLen = 0;
========================================================================
*/
-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) {
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];
}
/* 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;
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;
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));
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);
*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;
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,
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,
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));
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];
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
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;
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
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;
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);
/*
========================================================================
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
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));
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
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];
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
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;
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
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;
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);
========================================================================
*/
-BOOLEAN RadarChannelCheck(IN PRTMP_ADAPTER pAd, u8 Ch)
+BOOLEAN RadarChannelCheck(struct rt_rtmp_adapter *pAd, u8 Ch)
{
int i;
BOOLEAN result = FALSE;
========================================================================
*/
-u8 eFuseReadRegisters(IN PRTMP_ADAPTER pAd,
+u8 eFuseReadRegisters(struct rt_rtmp_adapter *pAd,
u16 Offset, u16 Length, u16 * pData)
{
EFUSE_CTRL_STRUC eFuseCtrlStruc;
========================================================================
*/
-void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd,
+void eFusePhysicalReadRegisters(struct rt_rtmp_adapter *pAd,
u16 Offset,
u16 Length, u16 * pData)
{
========================================================================
*/
-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)
========================================================================
*/
-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;
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;
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;
return 0;
}
-void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock)
+void eFuseGetFreeBlockCount(struct rt_rtmp_adapter *pAd, u32 *EfuseFreeBlock)
{
u16 i;
u16 LogicalAddress;
("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,
#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);
}
/* 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);
}
/* 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;
}
/* 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;
}
/* IRQL = PASSIVE_LEVEL */
-static inline void EEpromCleanup(IN PRTMP_ADAPTER pAd)
+static inline void EEpromCleanup(struct rt_rtmp_adapter *pAd)
{
u32 x;
LowerClock(pAd, &x);
}
-static inline void EWEN(IN PRTMP_ADAPTER pAd)
+static inline void EWEN(struct rt_rtmp_adapter *pAd)
{
u32 x;
EEpromCleanup(pAd);
}
-static inline void EWDS(IN PRTMP_ADAPTER pAd)
+static inline void EWDS(struct rt_rtmp_adapter *pAd)
{
u32 x;
}
/* 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;
*/
#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;
==========================================================================
*/
-int MlmeInit(IN PRTMP_ADAPTER pAd)
+int MlmeInit(struct rt_rtmp_adapter *pAd)
{
int Status = NDIS_STATUS_SUCCESS;
==========================================================================
*/
-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 */
==========================================================================
*/
-void MlmeHalt(IN PRTMP_ADAPTER pAd)
+void MlmeHalt(struct rt_rtmp_adapter *pAd)
{
BOOLEAN Cancelled;
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);
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;
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
{
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)
{
} while (FALSE);
}
-void STAMlmePeriodicExec(PRTMP_ADAPTER pAd)
+void STAMlmePeriodicExec(struct rt_rtmp_adapter *pAd)
{
unsigned long TxTotalCnt;
int i;
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"));
(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;
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,
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;
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))) {
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;
}
/* 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) {
}
/* IRQL = DISPATCH_LEVEL */
-void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd)
+void MlmeAutoReconnectLastSSID(struct rt_rtmp_adapter *pAd)
{
if (pAd->StaCfg.bAutoConnectByBssid) {
DBGPRINT(RT_DEBUG_TRACE,
(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);
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);
}
}
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 */
/* 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;
}
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 */
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;
}
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;
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;
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 */
/* 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) */
) {
/* 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);
}
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 =
/* 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) {
{
pEntry->CurrTxRateIndex = TxRateIdx;
pNextTxRate =
- (PRTMP_TX_RATE_SWITCH) &
+ (struct rt_rtmp_tx_rate_switch *) &
pTable[(pEntry->CurrTxRateIndex + 1) * 5];
MlmeSetTxRate(pAd, pEntry, pNextTxRate);
}
}
pNextTxRate =
- (PRTMP_TX_RATE_SWITCH) & pTable[(tmpTxRate + 1) *
+ (struct rt_rtmp_tx_rate_switch *) & pTable[(tmpTxRate + 1) *
5];
}
if (bTxRateChanged && pNextTxRate) {
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;
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;
}
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 =
}
pNextTxRate =
- (PRTMP_TX_RATE_SWITCH) &
+ (struct rt_rtmp_tx_rate_switch *) &
pTable[(pAd->CommonCfg.TxRateIndex + 1) * 5];
if (bTxRateChanged && pNextTxRate) {
MlmeSetTxRate(pAd, pEntry, pNextTxRate);
==========================================================================
*/
-void MlmeCheckPsmChange(IN PRTMP_ADAPTER pAd, unsigned long Now32)
+void MlmeCheckPsmChange(struct rt_rtmp_adapter *pAd, unsigned long Now32)
{
unsigned long PowerMode;
/* 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;
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;
}
/* 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;
==========================================================================
*/
-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 */
/* 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;
==========================================================================
*/
-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;
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;
}
/* 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);
}
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 */
}
}
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;
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)
{
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)
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;
}
/* IRQL = DISPATCH_LEVEL */
-void BssTableDeleteEntry(IN OUT BSS_TABLE * Tab,
+void BssTableDeleteEntry(struct rt_bss_table *Tab,
u8 *pBssid, u8 Channel)
{
u8 i, j;
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;
}
// 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) {
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,
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 */
/* 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:
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);
}
}
}
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,
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;
}
/* 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) &&
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) &&
}
}
/* 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) &&
}
}
/* copy matching BSS from InTab to OutTab */
- NdisMoveMemory(pOutBss, pInBss, sizeof(BSS_ENTRY));
+ NdisMoveMemory(pOutBss, pInBss, sizeof(struct rt_bss_entry));
OutTab->BssNr++;
}
}
/* 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;
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)
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;
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; */
/* 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:
} else {
pBss->WPA2.PairCipherAux = TmpCipher;
}
- pTmp += sizeof(CIPHER_SUITE_STRUCT);
+ pTmp += sizeof(struct rt_cipher_suite_struct);
Count--;
}
/* 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;
Ndis802_11AuthModeMax;
break;
}
- pTmp += (Count * sizeof(AKM_SUITE_STRUCT));
+ pTmp += (Count * sizeof(struct rt_akm_suite));
Count--;
}
* \pre
* \post
*/
-void MacAddrRandomBssid(IN PRTMP_ADAPTER pAd, u8 *pAddr)
+void MacAddrRandomBssid(struct rt_rtmp_adapter *pAd, u8 *pAddr)
{
int i;
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;
IRQL = PASSIVE_LEVEL
*/
-int MlmeQueueInit(IN MLME_QUEUE * Queue)
+int MlmeQueueInit(struct rt_mlme_queue *Queue)
{
int i;
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 */
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,
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 */
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]);
}
/* 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;
IRQL = DISPATCH_LEVEL
*/
-BOOLEAN MlmeQueueEmpty(IN MLME_QUEUE * Queue)
+BOOLEAN MlmeQueueEmpty(struct rt_mlme_queue *Queue)
{
BOOLEAN Ans;
IRQL = DISPATCH_LEVEL
*/
-BOOLEAN MlmeQueueFull(IN MLME_QUEUE * Queue)
+BOOLEAN MlmeQueueFull(struct rt_mlme_queue *Queue)
{
BOOLEAN Ans;
IRQL = PASSIVE_LEVEL
*/
-void MlmeQueueDestroy(IN MLME_QUEUE * pQueue)
+void MlmeQueueDestroy(struct rt_mlme_queue *pQueue)
{
NdisAcquireSpinLock(&(pQueue->Lock));
pQueue->Num = 0;
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;
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,
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)
{
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);
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)
{
}
==========================================================================
*/
-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;
Description:
==========================================================================
*/
-u8 RandomByte(IN PRTMP_ADAPTER pAd)
+u8 RandomByte(struct rt_rtmp_adapter *pAd)
{
unsigned long i;
u8 R, Result;
========================================================================
*/
-void RTMPCheckRates(IN PRTMP_ADAPTER pAd,
+void RTMPCheckRates(struct rt_rtmp_adapter *pAd,
IN u8 SupRate[], IN u8 * SupRateLen)
{
u8 RateIdx, i, j;
NdisMoveMemory(SupRate, NewRate, NewRateLen);
}
-BOOLEAN RTMPCheckChannel(IN PRTMP_ADAPTER pAd,
+BOOLEAN RTMPCheckChannel(struct rt_rtmp_adapter *pAd,
u8 CentralChannel, u8 Channel)
{
u8 k;
========================================================================
*/
-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;
========================================================================
*/
-void RTMPUpdateMlmeRate(IN PRTMP_ADAPTER pAd)
+void RTMPUpdateMlmeRate(struct rt_rtmp_adapter *pAd)
{
u8 MinimumRate;
u8 ProperMlmeRate; /*= RATE_54; */
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;
========================================================================
*/
-void AsicEvaluateRxAnt(IN PRTMP_ADAPTER pAd)
+void AsicEvaluateRxAnt(struct rt_rtmp_adapter *pAd)
{
u8 BBPR3 = 0;
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;
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;
========================================================================
*/
-void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack)
+void RTMPSetPiggyBack(struct rt_rtmp_adapter *pAd, IN BOOLEAN bPiggyBack)
{
TX_LINK_CFG_STRUC TxLinkCfg;
========================================================================
*/
-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;
return result;
}
-BOOLEAN RTMPAutoRateSwitchCheck(IN PRTMP_ADAPTER pAd)
+BOOLEAN RTMPAutoRateSwitchCheck(struct rt_rtmp_adapter *pAd)
{
{
if (pAd->StaCfg.bAutoTxRateSwitch)
========================================================================
*/
-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;
========================================================================
*/
-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;
==========================================================================
*/
-void AsicStaBbpTuning(IN PRTMP_ADAPTER pAd)
+void AsicStaBbpTuning(struct rt_rtmp_adapter *pAd)
{
u8 OrigR66Value = 0, R66; /*, R66UpperBound = 0x30, R66LowerBound = 0x30; */
char Rssi;
}
}
-void RTMPSetAGCInitValue(IN PRTMP_ADAPTER pAd, u8 BandWidth)
+void RTMPSetAGCInitValue(struct rt_rtmp_adapter *pAd, u8 BandWidth)
{
u8 R66 = 0x30;
*/
#include "../rt_config.h"
-CH_FREQ_MAP CH_HZ_ID_MAP[] = {
+struct rt_ch_freq_map CH_HZ_ID_MAP[] = {
{1, 2412}
,
{2, 2417}
, /* 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,
,
};
-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
}
}
-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;
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;
}
}
-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);
}
}
-static BOOLEAN IsValidChannel(IN PRTMP_ADAPTER pAd, u8 channel)
+static BOOLEAN IsValidChannel(struct rt_rtmp_adapter *pAd, u8 channel)
{
int i;
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;
}
-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 ==
}
}
-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++) {
========================================================================
*/
-int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd,
+int RT30xxWriteRFRegister(struct rt_rtmp_adapter *pAd,
u8 regID, u8 value)
{
RF_CSR_CFG_STRUC rfcsr;
========================================================================
*/
-int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd,
+int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd,
u8 regID, u8 *pValue)
{
RF_CSR_CFG_STRUC rfcsr;
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;
/* */
/* 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},
{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 */
{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
========================================================================
*/
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;
*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;
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);
========================================================================
*/
-void RTMPReadTxPwrPerRate(IN PRTMP_ADAPTER pAd)
+void RTMPReadTxPwrPerRate(struct rt_rtmp_adapter *pAd)
{
unsigned long data, Adata, Gdata;
u16 i, value, value2;
========================================================================
*/
-void RTMPReadChannelPwr(IN PRTMP_ADAPTER pAd)
+void RTMPReadChannelPwr(struct rt_rtmp_adapter *pAd)
{
u8 i, choffset;
EEPROM_TX_PWR_STRUC Power;
========================================================================
*/
-int NICReadRegParameters(IN PRTMP_ADAPTER pAd,
+int NICReadRegParameters(struct rt_rtmp_adapter *pAd,
void *WrapperConfigurationContext)
{
int Status = NDIS_STATUS_SUCCESS;
========================================================================
*/
-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;
========================================================================
*/
-void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd)
+void NICInitAsicFromEEPROM(struct rt_rtmp_adapter *pAd)
{
u32 data = 0;
u8 BBPR1 = 0;
#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);
}
========================================================================
*/
-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;
========================================================================
*/
-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;
========================================================================
*/
-void NICIssueReset(IN PRTMP_ADAPTER pAd)
+void NICIssueReset(struct rt_rtmp_adapter *pAd)
{
u32 Value = 0;
DBGPRINT(RT_DEBUG_TRACE, ("--> NICIssueReset\n"));
========================================================================
*/
-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;
========================================================================
*/
-void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd)
+void NICUpdateRawCounters(struct rt_rtmp_adapter *pAd)
{
u32 OldValue; /*, Value2; */
/*unsigned long PageSum, OneSecTransmitCount; */
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;
========================================================================
*/
-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 */
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)
========================================================================
*/
-void NICEraseFirmware(IN PRTMP_ADAPTER pAd)
+void NICEraseFirmware(struct rt_rtmp_adapter *pAd)
{
if (pAd->chipOps.eraseFirmware)
pAd->chipOps.eraseFirmware(pAd);
========================================================================
*/
-int NICLoadRateSwitchingParams(IN PRTMP_ADAPTER pAd)
+int NICLoadRateSwitchingParams(struct rt_rtmp_adapter *pAd)
{
return NDIS_STATUS_SUCCESS;
}
========================================================================
*/
-void UserCfgInit(IN PRTMP_ADAPTER pAd)
+void UserCfgInit(struct rt_rtmp_adapter *pAd)
{
u32 key_index, bss_index;
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;
/*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);
========================================================================
*/
-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)
{
if (pTimer->Valid) {
pTimer->TimerValue = Value;
========================================================================
*/
-void RTMPModTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value)
+void RTMPModTimer(struct rt_ralink_timer *pTimer, unsigned long Value)
{
BOOLEAN Cancel;
========================================================================
*/
-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)
========================================================================
*/
-void RTMPSetLED(IN PRTMP_ADAPTER pAd, u8 Status)
+void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status)
{
/*unsigned long data; */
u8 HighByte = 0;
> -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;
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; */
}
/*+++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;
/*---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);
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; */
return 0;
}
-BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd)
+BOOLEAN RtmpRaDevCtrlExit(struct rt_rtmp_adapter *pAd)
{
RTMPFreeAdapter(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;
========================================================================
*/
-int RtmpAsicEraseFirmware(IN PRTMP_ADAPTER pAd)
+int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd)
{
unsigned long i;
========================================================================
*/
-int RtmpAsicLoadFirmware(IN PRTMP_ADAPTER pAd)
+int RtmpAsicLoadFirmware(struct rt_rtmp_adapter *pAd)
{
int Status = NDIS_STATUS_SUCCESS;
return Status;
}
-int RtmpAsicSendCommandToMcu(IN PRTMP_ADAPTER pAd,
+int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
u8 Command,
u8 Token, u8 Arg0, u8 Arg1)
{
#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) {
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);
}
-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) {
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);
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);
}
-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);
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);
#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}
}
}
};
-#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}
}
}
};
-#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}
}
}
};
-#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;
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},
{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;
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",
return;
}
-void MeasureReqTabExit(IN PRTMP_ADAPTER pAd)
+void MeasureReqTabExit(struct rt_rtmp_adapter *pAd)
{
NdisFreeSpinLock(&pAd->CommonCfg.MeasureReqTabLock);
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,
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) {
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 */
} while (pProbeEntry);
NdisZeroMemory(pEntry,
- sizeof(MEASURE_REQ_ENTRY));
+ sizeof(struct rt_measure_req_entry));
pTab->Size--;
break;
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,
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 */
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);
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",
return;
}
-void TpcReqTabExit(IN PRTMP_ADAPTER pAd)
+void TpcReqTabExit(struct rt_rtmp_adapter *pAd)
{
NdisFreeSpinLock(&pAd->CommonCfg.TpcReqTabLock);
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,
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) {
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 */
pProbeEntry = pProbeEntry->pNext;
} while (pProbeEntry);
- NdisZeroMemory(pEntry, sizeof(TPC_REQ_ENTRY));
+ NdisZeroMemory(pEntry, sizeof(struct rt_tpc_req_entry));
pTab->Size--;
break;
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,
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 */
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);
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;
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 */
}
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)
Return : None.
==========================================================================
*/
-void InsertDialogToken(IN PRTMP_ADAPTER pAd,
+void InsertDialogToken(struct rt_rtmp_adapter *pAd,
u8 *pFrameBuf,
unsigned long *pFrameLen, u8 DialogToken)
{
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;
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;
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;
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;
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;
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,
Return : None.
==========================================================================
*/
-void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd,
+void MakeMeasurementReqFrame(struct rt_rtmp_adapter *pAd,
u8 *pOutBuffer,
unsigned long *pFrameLen,
u8 TotalLen,
u8 MeasureReqType, u8 NumOfRepetitions)
{
unsigned long TempLen;
- MEASURE_REQ_INFO MeasureReqIE;
+ struct rt_measure_req_info MeasureReqIE;
InsertActField(pAd, (pOutBuffer + *pFrameLen), pFrameLen, Category,
Action);
*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;
Return : None.
==========================================================================
*/
-void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd,
+void EnqueueMeasurementRep(struct rt_rtmp_adapter *pAd,
u8 *pDA,
u8 DialogToken,
u8 MeasureToken,
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,
("%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);
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;
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,
("%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);
Return : None.
==========================================================================
*/
-void EnqueueTPCRep(IN PRTMP_ADAPTER pAd,
+void EnqueueTPCRep(struct rt_rtmp_adapter *pAd,
u8 *pDA,
u8 DialogToken, u8 TxPwr, u8 LinkMargin)
{
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,
("%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);
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,
("%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);
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;
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 */
+----+-----+-----------+------------+-----------+
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;
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) {
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;
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;
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) {
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;
+-----+---------------+---------------------+-------+------------+----------+
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;
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) {
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,
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,
} 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,
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;
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;
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) {
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;
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;
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) {
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;
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"));
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
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;
/* 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. */
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
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);
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) {
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];
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;
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;
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);
{
unsigned long TempLen;
MakeOutgoingFrame(pOutBuffer + FrameLen, &TempLen,
- sizeof(MEASURE_REQ), &MeasureReq,
+ sizeof(struct rt_measure_req), &MeasureReq,
END_OF_ARGS);
FrameLen += TempLen;
}
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;
#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 */
#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 */
Fonchi 03-12-2007 created
*/
-BOOLEAN RadarChannelCheck(IN PRTMP_ADAPTER pAd, u8 Ch);
+BOOLEAN RadarChannelCheck(struct rt_rtmp_adapter *pAd, u8 Ch);
/*************************************************************************
* 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 // */
/*************************************************************************
* 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__ // */
#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; \
#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)); \
#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); \
#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)); \
/* 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 */
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;
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 */
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;
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;
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 */
/* (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 */
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 {
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 */
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;
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 */
/*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 */
/* */
/* 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;
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;
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. */
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;
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 */
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;
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. */
/* 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;
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;
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;
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 */
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
#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
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,
/* */
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;
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;
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,
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;
#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 {
/* 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)
} 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 {
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 */
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 */
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 */
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 */
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 */
#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 */
u8 STBC;
u8 SHORTGI;
u8 rsv;
-} OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE;
+};
#define MAX_CUSTOM_LEN 128
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 */
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_ */
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);
***************************************************************************/
#ifdef CONFIG_PM
-void RT2860RejectPendingPackets(IN PRTMP_ADAPTER pAd)
+void RT2860RejectPendingPackets(struct rt_rtmp_adapter *pAd)
{
/* clear PS packets */
/* clear TxSw packets */
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"));
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 */
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"));
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,
((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",
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:
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);
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 {
* 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;
}
}
-void RTMPInitPCIeLinkCtrlValue(IN PRTMP_ADAPTER pAd)
+void RTMPInitPCIeLinkCtrlValue(struct rt_rtmp_adapter *pAd)
{
int pos;
u16 reg16, data2, PCIePowerSaveLevel, Configuration;
}
}
-void RTMPFindHostPCIDev(IN PRTMP_ADAPTER pAd)
+void RTMPFindHostPCIDev(struct rt_rtmp_adapter *pAd)
{
u16 reg16;
u8 reg8;
========================================================================
*/
-void RTMPPCIeLinkCtrlValueRestore(IN PRTMP_ADAPTER pAd, u8 Level)
+void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level)
{
u16 PCIePowerSaveLevel, reg16;
u16 Configuration;
========================================================================
*/
-void RTMPPCIeLinkCtrlSetting(IN PRTMP_ADAPTER pAd, u16 Max)
+void RTMPPCIeLinkCtrlSetting(struct rt_rtmp_adapter *pAd, u16 Max)
{
u16 PCIePowerSaveLevel, reg16;
u16 Configuration;
========================================================================
*/
-void RTMPrt3xSetPCIePowerLinkCtrl(IN PRTMP_ADAPTER pAd)
+void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd)
{
unsigned long HostConfiguration = 0;
}
/* 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)
{
}
-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); */
}
}
/* 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)
}
/* 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);
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 */
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;
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)
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)
{
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;
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);
}
========================================================================
*/
-int RTMPCloneNdisPacket(IN PRTMP_ADAPTER pAd,
+int RTMPCloneNdisPacket(struct rt_rtmp_adapter *pAd,
IN BOOLEAN pInsAMSDUHdr,
void *pInPacket,
void ** ppOutPacket)
}
/* 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,
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));
}
}
void RTMP_QueryPacketInfo(void *pPacket,
- OUT PACKET_INFO * pPacketInfo,
+ struct rt_packet_info *pPacketInfo,
u8 ** pSrcBufVA, u32 * pSrcBufLen)
{
pPacketInfo->BufferCount = 1;
}
void RTMP_QueryNextPacketInfo(void ** ppPacket,
- OUT PACKET_INFO * pPacketInfo,
+ struct rt_packet_info *pPacketInfo,
u8 ** pSrcBufVA, u32 * pSrcBufLen)
{
void *pPacket = NULL;
}
}
-void *DuplicatePacket(IN PRTMP_ADAPTER pAd,
+void *DuplicatePacket(struct rt_rtmp_adapter *pAd,
void *pPacket, u8 FromWhichBSSID)
{
struct sk_buff *skb;
}
-void *duplicate_pkt(IN PRTMP_ADAPTER pAd,
+void *duplicate_pkt(struct rt_rtmp_adapter *pAd,
u8 *pHeader802_3,
u32 HdrLen,
u8 *pData,
}
#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;
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)
{
/* */
/* 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;
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)
{
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;
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);
========================================================================
*/
-void RTMPSendWirelessEvent(IN PRTMP_ADAPTER pAd,
+void RTMPSendWirelessEvent(struct rt_rtmp_adapter *pAd,
u16 Event_flag,
u8 *pAddr, u8 BssIdx, char Rssi)
{
__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 };
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;
}
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",
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;
{
#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);
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);
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) {
}
-int RtmpOSTaskNotifyToExit(IN RTMP_OS_TASK * pTask)
+int RtmpOSTaskNotifyToExit(struct rt_rtmp_os_task *pTask)
{
#ifndef KTHREAD_SUPPORT
return 0;
}
-void RtmpOSTaskCustomize(IN RTMP_OS_TASK * pTask)
+void RtmpOSTaskCustomize(struct rt_rtmp_os_task *pTask)
{
#ifndef KTHREAD_SUPPORT
#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;
return status;
}
-int RtmpOSTaskInit(IN RTMP_OS_TASK * pTask,
+int RtmpOSTaskInit(struct rt_rtmp_os_task *pTask,
char *pTaskName, void * pPriv)
{
int len;
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);
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) {
}
}
-int RtmpOSWrielessEventSend(IN RTMP_ADAPTER * pAd,
+int RtmpOSWrielessEventSend(struct rt_rtmp_adapter *pAd,
u32 eventType,
int flags,
u8 *pSrcMac,
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);
/*
* 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)
{
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 */
}
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);
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)
/***********************************************************************************
* 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))
}
/***********************************************************************************
- * OS specific cookie data structure binding to RTMP_ADAPTER
+ * OS specific cookie data structure binding to struct rt_rtmp_adapter
***********************************************************************************/
struct os_cookie {
(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)
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__ // */
*/
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);
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) {
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;
*/
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);
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;
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; */
.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
}
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;
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;
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);
/* 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);
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);
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 */
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);
*
**************************************************************************/
/* 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,
}
/* 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,
}
/* 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,
}
/* 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)
}
/* 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,
PhysicalAddress);
}
-void RTMP_FreeFirstTxBuffer(IN PRTMP_ADAPTER pAd,
+void RTMP_FreeFirstTxBuffer(struct rt_rtmp_adapter *pAd,
unsigned long Length,
IN BOOLEAN Cached,
void *VirtualAddress,
* 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,
* 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,
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;
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;
return NDIS_STATUS_SUCCESS;
}
-void RtmpNetTaskExit(IN RTMP_ADAPTER * pAd)
+void RtmpNetTaskExit(struct rt_rtmp_adapter *pAd)
{
struct os_cookie *pObj;
tasklet_kill(&pObj->fifo_statistic_full_task);
}
-int RtmpMgmtTaskInit(IN RTMP_ADAPTER * pAd)
+int RtmpMgmtTaskInit(struct rt_rtmp_adapter *pAd)
{
return NDIS_STATUS_SUCCESS;
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;
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;
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;
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;
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. */
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;
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;
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;
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;
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;
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;
/*
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 {
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);
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;
/*
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);
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;
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;
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;
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;
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;
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;
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;
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);
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);
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);
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);
}
-int RtmpNetTaskInit(IN RTMP_ADAPTER * pAd)
+int RtmpNetTaskInit(struct rt_rtmp_adapter *pAd)
{
struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
return NDIS_STATUS_SUCCESS;
}
-void RtmpNetTaskExit(IN RTMP_ADAPTER * pAd)
+void RtmpNetTaskExit(struct rt_rtmp_adapter *pAd)
{
struct os_cookie *pObj;
#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 */
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 */
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) \
{ \
#define RemoveHeadQueue(QueueHeader) \
(QueueHeader)->Head; \
{ \
- PQUEUE_ENTRY pNext; \
+ struct rt_queue_entry *pNext; \
if ((QueueHeader)->Head != NULL) \
{ \
pNext = (QueueHeader)->Head->Next; \
#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++; \
}
/* 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) */
/* */
/* */
/* 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 */
/* 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 */
/* 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;
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;
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;
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];
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];
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 {
} 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 */
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;
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 */
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) */
BOOLEAN bFastDfs;
u8 ChMovingTime;
u8 LongPulseRadarTh;
-} RADAR_DETECT_STRUCT, *PRADAR_DETECT_STRUCT;
+};
typedef enum _ABGBAND_STATE_ {
UNKNOWN_BAND,
/***************************************************************************
* 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 */
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;
u8 RealRxPath;
BOOLEAN bLowThroughput;
BOOLEAN bEnableAutoAntennaCheck;
- RALINK_TIMER_STRUCT RxAntEvalTimer;
+ struct rt_ralink_timer RxAntEvalTimer;
#ifdef RT30xx
u8 CaliBW40RfR24;
#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
Originator_Done
} ORI_BLOCKACK_STATUS, *PORI_BLOCKACK_STATUS;
-typedef struct _BA_ORI_ENTRY {
+struct rt_ba_ori_entry {
u8 Wcid;
u8 TID;
u8 BAWinSize;
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. */
u16 LastIndSeq;
/* u16 LastIndSeqAtTimer; */
u16 TimeOutValue;
- RALINK_TIMER_STRUCT RECBATimer;
+ struct rt_ralink_timer RECBATimer;
unsigned long LastIndSeqAtTimer;
unsigned long nDropPacket;
unsigned long rcvSeq;
/* 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<<TID)), this session with{MACAddr, TID}exists, so read BufSize[TID] for BufferSize */
u8 rsv;
u8 BufSize[8];
REC_BLOCKACK_STATUS REC_BA_Status[8];
-} OID_BA_REC_ENTRY, *POID_BA_REC_ENTRY;
+};
/*For QureyBATableOID use; */
-typedef struct PACKED _OID_BA_ORI_ENTRY {
+struct PACKED rt_oid_ba_ori_entry {
u8 MACAddr[MAC_ADDR_LEN];
u8 BaBitmap; /* if (BaBitmap&(1<<TID)), this session with{MACAddr, TID}exists, so read BufSize[TID] for BufferSize, read ORI_BA_Status[TID] for status */
u8 rsv;
u8 BufSize[8];
ORI_BLOCKACK_STATUS ORI_BA_Status[8];
-} OID_BA_ORI_ENTRY, *POID_BA_ORI_ENTRY;
+};
-typedef struct _QUERYBA_TABLE {
- OID_BA_ORI_ENTRY BAOriEntry[32];
- OID_BA_REC_ENTRY BARecEntry[32];
+struct rt_queryba_table {
+ struct rt_oid_ba_ori_entry BAOriEntry[32];
+ struct rt_oid_ba_rec_entry BARecEntry[32];
u8 OriNum; /* Number of below BAOriEntry */
u8 RecNum; /* Number of below BARecEntry */
-} QUERYBA_TABLE, *PQUERYBA_TABLE;
+};
typedef union _BACAP_STRUC {
struct {
u32 word;
} BACAP_STRUC, *PBACAP_STRUC;
-typedef struct {
+struct rt_oid_add_ba_entry {
BOOLEAN IsRecipient;
u8 MACAddr[MAC_ADDR_LEN];
u8 TID;
u8 nMSDU;
u16 TimeOut;
BOOLEAN bAllTid; /* If True, delete all TID for BA sessions with this MACaddr. */
-} OID_ADD_BA_ENTRY, *POID_ADD_BA_ENTRY;
+};
#define IS_HT_STA(_pMacEntry) \
(_pMacEntry->MaxHTPhyMode.field.MODE >= MODE_HTMIX)
(_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] */
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 {
* 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];
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 // */
/***************************************************************************
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];
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 */
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 */
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;
#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 */
#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 */
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;
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 */
/* 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 */
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 */
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 */
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
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 */
/* 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;
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. */
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;
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];
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 */
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];
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. */
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
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;
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;
/*****************************************************************************************/
/* 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 // */
/*****************************************************************************************/
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 */
#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 */
/*****************************************************************************************/
/*****************************************************************************************/
#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. */
/* --------------------------- */
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;
/* 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=========== */
/* 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;
/* ------------------------------------------------------ */
/* 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 */
/* --------------------------- */
/* System event log */
/* --------------------------- */
- RT_802_11_EVENT_TABLE EventTab;
+ struct rt_802_11_event_table EventTab;
BOOLEAN HTCEnable;
/***************************************************************************
* 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)
#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. */
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 */
/* 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);
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,
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,
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);
/* 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,
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,
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,
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,
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,
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,
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);
/*======================================== */
-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,
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,
u8 * pChannel,
u8 * pNewChannel,
OUT LARGE_INTEGER * pTimestamp,
- OUT CF_PARM * pCfParm,
+ struct rt_cf_parm * pCfParm,
u16 * pAtimWin,
u16 * pCapabilityInfo,
u8 * pErp,
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,
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,
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,
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,
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);
/* */
/* 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);
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,
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,
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);
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);
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 \
{ \
_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);
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,
};
/* 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
* Additional extensions are made
* by setting bit 31.
*/
-} ieee80211_radiotap_header;
+};
enum ieee80211_radiotap_type {
IEEE80211_RADIOTAP_TSFT = 0,
(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,
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,
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);
/* */
/* 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);
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);
#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) {
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)
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,
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);
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);
/*
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);
/*
* 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 */
#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);
#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
#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
#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 */
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 */
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];
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__ // */
#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,
} 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__ // */
#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);
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,
#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; */
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);
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 */
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); \
#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) \
/* */
/* 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
/*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) \
{ \
******************************************************************************/
/* 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 */
#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)) \
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__ // */
#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);
/*
==========================================================================
Return : None.
==========================================================================
*/
-void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd,
+void MakeMeasurementReqFrame(struct rt_rtmp_adapter *pAd,
u8 *pOutBuffer,
unsigned long *pFrameLen,
u8 TotalLen,
Return : None.
==========================================================================
*/
-void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd,
+void EnqueueMeasurementRep(struct rt_rtmp_adapter *pAd,
u8 *pDA,
u8 DialogToken,
u8 MeasureToken,
Return : None.
==========================================================================
*/
-void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken);
+void EnqueueTPCReq(struct rt_rtmp_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);
Return : None.
==========================================================================
*/
-void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd,
+void EnqueueChSwAnn(struct rt_rtmp_adapter *pAd,
u8 *pDA, u8 ChSwMode, u8 NewCh);
/*
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);
/*
==========================================================================
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__ // */
#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
#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 {
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 {
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 {
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__ // */
==========================================================================
*/
-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,
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 */
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 */
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 */
==========================================================================
*/
-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 };
}
/* 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 |
/* 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 */
/* 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,
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;
==========================================================================
*/
-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 };
("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,
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;
==========================================================================
*/
-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;
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) {
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);
==========================================================================
*/
-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;
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;
==========================================================================
*/
-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;
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;
==========================================================================
*/
-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;
}
- 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;
&& (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;
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)
&&
==========================================================================
*/
-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;
==========================================================================
*/
-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"));
==========================================================================
*/
-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"));
==========================================================================
*/
-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"));
&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,
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,
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,
==========================================================================
*/
-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;
("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);
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 };
}
-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;
==========================================================================
*/
-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,
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"));
==========================================================================
*/
-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))
==========================================================================
*/
-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;
128);
RTMPSetICV(pAd, CyperChlgText + 140);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
- sizeof(HEADER_802_11),
+ sizeof(struct rt_header_802_11),
&AuthHdr,
CIPHER_TEXT_LEN + 16,
CyperChlgText,
==========================================================================
*/
-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;
==========================================================================
*/
-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) {
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);
==========================================================================
*/
-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"));
==========================================================================
*/
-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,
==========================================================================
*/
-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;
("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);
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)
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;
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);
==========================================================================
*/
-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,
==========================================================================
*/
-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;
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);
==========================================================================
*/
-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;
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;\
==========================================================================
*/
-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 */
==========================================================================
*/
-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:
==========================================================================
*/
-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;
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 !=
}
}
-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. */
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 */
/* 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;
}
==========================================================================
*/
-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 */
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) {
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 {
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)) {
(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"));
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 */
==========================================================================
*/
-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);
/* 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"));
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);
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;
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;
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;
}
/* 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;
==========================================================================
*/
-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"));
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 */
==========================================================================
*/
-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));
MlmeEnqueue(pAd, AUTH_STATE_MACHINE,
MT2_MLME_AUTH_REQ,
sizeof
- (MLME_AUTH_REQ_STRUCT),
+ (struct rt_mlme_auth_req),
&AuthReq);
}
==========================================================================
*/
-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;
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);
==========================================================================
*/
-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));
{
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 =
}
MlmeEnqueue(pAd, AUTH_STATE_MACHINE,
MT2_MLME_AUTH_REQ,
- sizeof(MLME_AUTH_REQ_STRUCT),
+ sizeof(struct rt_mlme_auth_req),
&AuthReq);
}
==========================================================================
*/
-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));
{
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 =
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 =
==========================================================================
*/
-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;
==========================================================================
*/
-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;
}
}
-void AdhocTurnOnQos(IN PRTMP_ADAPTER pAd)
+void AdhocTurnOnQos(struct rt_rtmp_adapter *pAd)
{
#define AC0_DEF_TXOP 0
#define AC1_DEF_TXOP 0
==========================================================================
*/
-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;
FALSE);
}
- NdisZeroMemory(&pAd->DrsCounters, sizeof(COUNTER_DRS));
+ NdisZeroMemory(&pAd->DrsCounters, sizeof(struct rt_counter_drs));
NdisGetSystemUpTime(&Now);
pAd->StaCfg.LastBeaconRxTime = Now; /* last RX timestamp */
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);
==========================================================================
*/
-void LinkDown(IN PRTMP_ADAPTER pAd, IN BOOLEAN IsReqFromAP)
+void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP)
{
u8 i, ByteValue = 0;
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;
}
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);
/* 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;
==========================================================================
*/
-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 */
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,
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 */
{
/* 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];
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 */
==========================================================================
*/
-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;
}
==========================================================================
*/
-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 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);
==========================================================================
*/
-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);
==========================================================================
*/
#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;
}
/* 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;
}
#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;
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;
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;
}
==========================================================================
*/
-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];
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,
*/
#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) {
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];
#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;
}
-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 */
}
/* 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];
}
/* */
-/* 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;
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 {
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) {
{
CntlEnqueueForRecv(pAd, pRxWI->WirelessCliID,
(pRxWI->MPDUtotalByteCount),
- (PFRAME_BA_REQ) pHeader);
+ (struct rt_frame_ba_req *) pHeader);
}
break;
case SUBTYPE_BLOCK_ACK:
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;
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;
========================================================================
*/
-void RTMPHandleTwakeupInterrupt(IN PRTMP_ADAPTER pAd)
+void RTMPHandleTwakeupInterrupt(struct rt_rtmp_adapter *pAd)
{
AsicForceWakeup(pAd, FALSE);
}
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;
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;
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)
========================================================================
*/
#ifdef RTMP_MAC_PCI
-int RTMPFreeTXDRequest(IN PRTMP_ADAPTER pAd,
+int RTMPFreeTXDRequest(struct rt_rtmp_adapter *pAd,
u8 QueIdx,
u8 NumberRequired, u8 *FreeNumberIs)
{
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:
}
#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) ||
}
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;
}
/* IRQL = DISPATCH_LEVEL */
-void RTMPSendRTSFrame(IN PRTMP_ADAPTER pAd,
+void RTMPSendRTSFrame(struct rt_rtmp_adapter *pAd,
u8 *pDA,
IN unsigned int NextMpduSize,
u8 TxRate,
/* 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);
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;
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;
/* */
/* */
/* 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);
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;
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);
}
-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;
}
-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);
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]);
&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;
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);
}
-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;
u16 FirstTx = 0, LastTxIdx = 0;
BOOLEAN bVLANPkt;
int frameNum = 0;
- PQUEUE_ENTRY pQEntry;
+ struct rt_queue_entry *pQEntry;
ASSERT(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);
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);
}
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;
/* 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); */
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;
u16 FirstTx, LastTxIdx;
int frameNum = 0;
BOOLEAN bVLANPkt;
- PQUEUE_ENTRY pQEntry;
+ struct rt_queue_entry *pQEntry;
ASSERT(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);
}
-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);
}
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;
pTxBlk->FrameGap = IFS_SIFS;
RTMPWriteTxWI_Data(pAd,
- (PTXWI_STRUC) (&pTxBlk->
+ (struct rt_txwi *) (&pTxBlk->
HeaderBuf[TXINFO_SIZE]),
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. */
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)
{
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,
==========================================================================
*/
-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;
/* 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) {
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 *)
}
Length = Length + 2 + pEid->Len;
- pEid = (PEID_STRUCT) ((u8 *) pEid + 2 + pEid->Len);
+ pEid = (struct rt_eid *) ((u8 *) pEid + 2 + pEid->Len);
}
return TRUE;
==========================================================================
*/
-BOOLEAN PeerProbeReqSanity(IN PRTMP_ADAPTER pAd,
+BOOLEAN PeerProbeReqSanity(struct rt_rtmp_adapter *pAd,
void * Msg,
unsigned long MsgLen,
u8 *pAddr2,
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);
==========================================================================
*/
-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,
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"));
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 */
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;
&& (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,
/* 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);
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;
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));
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,
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;
&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"));
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);
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],
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,
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],
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;
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,
|| (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,
==========================================================================
*/
-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;
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;
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,
&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),
/* 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;
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++) {
/* 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))
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;
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,
&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);
}
}
-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"));
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);
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,
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,
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,
==========================================================================
*/
-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));
}
/*
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"));
/* 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,
}
-BOOLEAN ScanRunning(IN PRTMP_ADAPTER pAd)
+BOOLEAN ScanRunning(struct rt_rtmp_adapter *pAd)
{
return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE;
}
========================================================================
*/
-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);
#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)
{
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 };
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;
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,
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];
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],
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],
}
-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],
extern u8 CipherWpa2Template[];
-typedef struct PACKED _RT_VERSION_INFO {
+struct PACKED rt_version_info {
u8 DriverVersionW;
u8 DriverVersionX;
u8 DriverVersionY;
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 */
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"));
}
/* 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);
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,
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->
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);
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;
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);
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);
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);
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;
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);
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);
* 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;
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];
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;
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;
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;
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 =
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
}
-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)) {
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);
("====> %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);
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);
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);
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);
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);
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;
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));
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;
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);
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);
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;
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;
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);
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
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;
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);
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,
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;
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
static BOOLEAN USBDevConfigInit(IN struct usb_device *dev,
IN struct usb_interface *intf,
- IN RTMP_ADAPTER * pAd);
+ struct rt_rtmp_adapter *pAd);
/*
========================================================================
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;
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;
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);
#ifdef CONFIG_PM
-void RT2870RejectPendingPackets(IN PRTMP_ADAPTER pAd)
+void RT2870RejectPendingPackets(struct rt_rtmp_adapter *pAd)
{
/* clear PS packets */
/* clear TxSw packets */
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;
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"));
*/
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);
*/
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);
}
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;
}
-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;
) {
/* 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;
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->
/* 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;
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",
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"));
/* 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
/* 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
#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;
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];
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];
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 {
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 */
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
}
-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;
}
-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)
{
PURB pUrb;
struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie;
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;
}
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,
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;
========================================================================
*/
-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;
/* 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;
========================================================================
*/
-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) ||
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;
========================================================================
*/
-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;
/* 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;
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;
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 */
/* 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;
========================================================================
*/
-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)
========================================================================
*/
-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"));
========================================================================
*/
-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"));
========================================================================
*/
-void RTUSBCancelPendingIRPs(IN PRTMP_ADAPTER pAd)
+void RTUSBCancelPendingIRPs(struct rt_rtmp_adapter *pAd)
{
RTUSBCancelPendingBulkInIRP(pAd);
RTUSBCancelPendingBulkOutIRP(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"));
========================================================================
*/
-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; */
/*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 */
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;
========================================================================
*/
-int RTUSBFreeDescriptorRequest(IN PRTMP_ADAPTER pAd,
+int RTUSBFreeDescriptorRequest(struct rt_rtmp_adapter *pAd,
u8 BulkOutPipeId,
u32 NumberRequired)
{
/* 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);
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);
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];
========================================================================
*/
-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);
========================================================================
*/
-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)
========================================================================
*/
-static int RTUSBFirmwareRun(IN PRTMP_ADAPTER pAd)
+static int RTUSBFirmwareRun(struct rt_rtmp_adapter *pAd)
{
int Status;
========================================================================
*/
-int RTUSBFirmwareWrite(IN PRTMP_ADAPTER pAd,
+int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd,
u8 *pFwImage, unsigned long FwLen)
{
u32 MacReg;
return Status;
}
-int RTUSBVenderReset(IN PRTMP_ADAPTER pAd)
+int RTUSBVenderReset(struct rt_rtmp_adapter *pAd)
{
int Status;
DBGPRINT_RAW(RT_DEBUG_ERROR, ("-->RTUSBVenderReset\n"));
========================================================================
*/
-int RTUSBMultiRead(IN PRTMP_ADAPTER pAd,
+int RTUSBMultiRead(struct rt_rtmp_adapter *pAd,
u16 Offset, u8 *pData, u16 length)
{
int Status;
========================================================================
*/
-int RTUSBMultiWrite_OneByte(IN PRTMP_ADAPTER pAd,
+int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
u16 Offset, u8 *pData)
{
int Status;
return Status;
}
-int RTUSBMultiWrite(IN PRTMP_ADAPTER pAd,
+int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd,
u16 Offset, u8 *pData, u16 length)
{
int Status;
return Status;
}
-int RTUSBSingleWrite(IN RTMP_ADAPTER * pAd,
+int RTUSBSingleWrite(struct rt_rtmp_adapter *pAd,
u16 Offset, u16 Value)
{
int Status;
========================================================================
*/
-int RTUSBReadMACRegister(IN PRTMP_ADAPTER pAd,
+int RTUSBReadMACRegister(struct rt_rtmp_adapter *pAd,
u16 Offset, u32 *pValue)
{
int Status = 0;
========================================================================
*/
-int RTUSBWriteMACRegister(IN PRTMP_ADAPTER pAd,
+int RTUSBWriteMACRegister(struct rt_rtmp_adapter *pAd,
u16 Offset, u32 Value)
{
int Status;
========================================================================
*/
-int RTUSBReadBBPRegister(IN PRTMP_ADAPTER pAd,
+int RTUSBReadBBPRegister(struct rt_rtmp_adapter *pAd,
u8 Id, u8 *pValue)
{
BBP_CSR_CFG_STRUC BbpCsr;
========================================================================
*/
-int RTUSBWriteBBPRegister(IN PRTMP_ADAPTER pAd,
+int RTUSBWriteBBPRegister(struct rt_rtmp_adapter *pAd,
u8 Id, u8 Value)
{
BBP_CSR_CFG_STRUC BbpCsr;
========================================================================
*/
-int RTUSBWriteRFRegister(IN PRTMP_ADAPTER pAd, u32 Value)
+int RTUSBWriteRFRegister(struct rt_rtmp_adapter *pAd, u32 Value)
{
PHY_CSR4_STRUC PhyCsr4;
u32 i = 0;
========================================================================
*/
-int RTUSBReadEEPROM(IN PRTMP_ADAPTER pAd,
+int RTUSBReadEEPROM(struct rt_rtmp_adapter *pAd,
u16 Offset, u8 *pData, u16 length)
{
int Status = STATUS_SUCCESS;
========================================================================
*/
-int RTUSBWriteEEPROM(IN PRTMP_ADAPTER pAd,
+int RTUSBWriteEEPROM(struct rt_rtmp_adapter *pAd,
u16 Offset, u8 *pData, u16 length)
{
int Status = STATUS_SUCCESS;
return Status;
}
-int RTUSBReadEEPROM16(IN PRTMP_ADAPTER pAd,
+int RTUSBReadEEPROM16(struct rt_rtmp_adapter *pAd,
u16 offset, u16 *pData)
{
int status;
========================================================================
*/
-void RTUSBPutToSleep(IN PRTMP_ADAPTER pAd)
+void RTUSBPutToSleep(struct rt_rtmp_adapter *pAd)
{
u32 value;
========================================================================
*/
-int RTUSBWakeUp(IN PRTMP_ADAPTER pAd)
+int RTUSBWakeUp(struct rt_rtmp_adapter *pAd)
{
int Status;
========================================================================
*/
-void RTUSBInitializeCmdQ(IN PCmdQ cmdq)
+void RTUSBInitializeCmdQ(struct rt_cmdq *cmdq)
{
cmdq->head = NULL;
cmdq->tail = NULL;
========================================================================
*/
-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)
#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);
========================================================================
*/
-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 =
========================================================================
*/
-void RTUSBDequeueCmd(IN PCmdQ cmdq, OUT PCmdQElmt * pcmdqelmt)
+void RTUSBDequeueCmd(struct rt_cmdq *cmdq, struct rt_cmdqelmt * * pcmdqelmt)
{
*pcmdqelmt = cmdq->head;
========================================================================
*/
-int RTUSB_VendorRequest(IN PRTMP_ADAPTER pAd,
+int RTUSB_VendorRequest(struct rt_rtmp_adapter *pAd,
u32 TransferFlags,
u8 RequestType,
u8 Request,
========================================================================
*/
-int RTUSB_ResetDevice(IN PRTMP_ADAPTER pAd)
+int RTUSB_ResetDevice(struct rt_rtmp_adapter *pAd)
{
int Status = TRUE;
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; */
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,
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);
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;
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;
pAd->CommonCfg.
NumOfBulkInIRP; i++) {
/*RTUSBBulkReceive(pAd); */
- PRX_CONTEXT pRxContext;
+ struct rt_rx_context *pRxContext;
PURB pUrb;
int ret = 0;
unsigned long IrqFlags;
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)
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 >=
/*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,
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,
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,
{
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 */