Commit 62eb734b authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt28x0: remove typedefs (part three)

Remove misc typedefs.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8a10a546
......@@ -41,8 +41,8 @@
#define __AP_H__
/* ap_wpa.c */
void WpaStateMachineInit(IN PRTMP_ADAPTER pAd,
IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]);
void WpaStateMachineInit(struct rt_rtmp_adapter *pAd,
struct rt_state_machine *Sm, OUT STATE_MACHINE_FUNC Trans[]);
#ifdef RTMP_MAC_USB
void BeaconUpdateExec(void *SystemSpecific1,
......@@ -50,17 +50,17 @@ void BeaconUpdateExec(void *SystemSpecific1,
void *SystemSpecific2, void *SystemSpecific3);
#endif /* RTMP_MAC_USB // */
void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack);
void RTMPSetPiggyBack(struct rt_rtmp_adapter *pAd, IN BOOLEAN bPiggyBack);
void MacTableReset(IN PRTMP_ADAPTER pAd);
void MacTableReset(struct rt_rtmp_adapter *pAd);
MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd,
struct rt_mac_table_entry *MacTableInsertEntry(struct rt_rtmp_adapter *pAd,
u8 *pAddr,
u8 apidx, IN BOOLEAN CleanAll);
BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd,
BOOLEAN MacTableDeleteEntry(struct rt_rtmp_adapter *pAd,
u16 wcid, u8 *pAddr);
MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, u8 *pAddr);
struct rt_mac_table_entry *MacTableLookup(struct rt_rtmp_adapter *pAd, u8 *pAddr);
#endif /* __AP_H__ */
......@@ -69,7 +69,7 @@
//
// TX descriptor format, Tx ring, Mgmt Ring
//
typedef struct PACKED _TXD_STRUC {
struct PACKED rt_txd {
// Word 0
u32 SDPtr0;
// Word 1
......@@ -89,12 +89,12 @@ typedef struct PACKED _TXD_STRUC {
u32 TCO:1; /* */
u32 UCO:1; /* */
u32 ICO:1; /* */
} TXD_STRUC, *PTXD_STRUC;
};
//
// Rx descriptor format, Rx Ring
//
typedef struct PACKED _RXD_STRUC {
typedef struct PACKED rt_rxd {
// Word 0
u32 SDP0;
// Word 1
......@@ -125,7 +125,7 @@ typedef struct PACKED _RXD_STRUC {
u32 PlcpSignal:1; /* To be moved */
u32 PlcpRssil:1; /* To be moved */
u32 Rsv1:13;
} RXD_STRUC, *PRXD_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;
} RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;
typedef union _TX_ATTENUATION_CTRL_STRUC {
struct {
......
......@@ -61,7 +61,7 @@
#define RXINFO_SIZE 4
#define RT2870_RXDMALEN_FIELD_SIZE 4
typedef struct PACKED _RXINFO_STRUC {
typedef struct PACKED rt_rxinfo {
u32 BA:1;
u32 DATA:1;
u32 NULLDATA:1;
......@@ -82,14 +82,14 @@ typedef struct PACKED _RXINFO_STRUC {
u32 CipherAlg:1;
u32 LastAMSDU:1;
u32 PlcpSignal:12;
} RXINFO_STRUC, *PRXINFO_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;
} RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;
/* */
/* TXINFO */
/* */
#define TXINFO_SIZE 4
typedef struct _TXINFO_STRUC {
struct rt_txinfo {
/* Word 0 */
u32 USBDMATxPktLen:16; /*used ONLY in USB bulk Aggregation, Total byte counts of all sub-frame. */
u32 rsv:8;
......@@ -99,47 +99,47 @@ typedef struct _TXINFO_STRUC {
u32 rsv2:2; /* Software use. */
u32 USBDMANextVLD:1; /*used ONLY in USB bulk Aggregation, NextValid */
u32 USBDMATxburst:1; /*used ONLY in USB bulk Aggre. Force USB DMA transmit frame from current selected endpoint */
} TXINFO_STRUC, *PTXINFO_STRUC;
};
/* */
/* Management ring buffer format */
/* */
typedef struct _MGMT_STRUC {
struct rt_mgmt {
BOOLEAN Valid;
u8 *pBuffer;
unsigned long Length;
} MGMT_STRUC, *PMGMT_STRUC;
};
/*////////////////////////////////////////////////////////////////////////// */
/* The TX_BUFFER structure forms the transmitted USB packet to the device */
/* The struct rt_tx_buffer structure forms the transmitted USB packet to the device */
/*////////////////////////////////////////////////////////////////////////// */
typedef struct __TX_BUFFER {
struct rt_tx_buffer {
union {
u8 WirelessPacket[TX_BUFFER_NORMSIZE];
HEADER_802_11 NullFrame;
PSPOLL_FRAME PsPollPacket;
RTS_FRAME RTSFrame;
struct rt_header_802_11 NullFrame;
struct rt_pspoll_frame PsPollPacket;
struct rt_rts_frame RTSFrame;
} field;
u8 Aggregation[4]; /*Buffer for save Aggregation size. */
} TX_BUFFER, *PTX_BUFFER;
};
typedef struct __HTTX_BUFFER {
struct rt_httx_buffer {
union {
u8 WirelessPacket[MAX_TXBULK_SIZE];
HEADER_802_11 NullFrame;
PSPOLL_FRAME PsPollPacket;
RTS_FRAME RTSFrame;
struct rt_header_802_11 NullFrame;
struct rt_pspoll_frame PsPollPacket;
struct rt_rts_frame RTSFrame;
} field;
u8 Aggregation[4]; /*Buffer for save Aggregation size. */
} HTTX_BUFFER, *PHTTX_BUFFER;
};
/* used to track driver-generated write irps */
typedef struct _TX_CONTEXT {
struct rt_tx_context {
void *pAd; /*Initialized in MiniportInitialize */
PURB pUrb; /*Initialized in MiniportInitialize */
PIRP pIrp; /*used to cancel pending bulk out. */
/*Initialized in MiniportInitialize */
PTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */
struct rt_tx_buffer *TransferBuffer; /*Initialized in MiniportInitialize */
unsigned long BulkOutSize;
u8 BulkOutPipeId;
u8 SelfIdx;
......@@ -155,15 +155,15 @@ typedef struct _TX_CONTEXT {
u32 TxRate;
dma_addr_t data_dma; /* urb dma on linux */
} TX_CONTEXT, *PTX_CONTEXT, **PPTX_CONTEXT;
};
/* used to track driver-generated write irps */
typedef struct _HT_TX_CONTEXT {
struct rt_ht_tx_context {
void *pAd; /*Initialized in MiniportInitialize */
PURB pUrb; /*Initialized in MiniportInitialize */
PIRP pIrp; /*used to cancel pending bulk out. */
/*Initialized in MiniportInitialize */
PHTTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */
struct rt_httx_buffer *TransferBuffer; /*Initialized in MiniportInitialize */
unsigned long BulkOutSize; /* Indicate the total bulk-out size in bytes in one bulk-transmission */
u8 BulkOutPipeId;
BOOLEAN IRPPending;
......@@ -179,13 +179,13 @@ typedef struct _HT_TX_CONTEXT {
unsigned long ENextBulkOutPosition; /* Indicate the buffer end offset of a bulk-transmission */
u32 TxRate;
dma_addr_t data_dma; /* urb dma on linux */
} HT_TX_CONTEXT, *PHT_TX_CONTEXT, **PPHT_TX_CONTEXT;
};
/* */
/* Structure to keep track of receive packets and buffers to indicate */
/* receive data to the protocol. */
/* */
typedef struct _RX_CONTEXT {
struct rt_rx_context {
u8 *TransferBuffer;
void *pAd;
PIRP pIrp; /*used to cancel pending bulk in. */
......@@ -200,7 +200,7 @@ typedef struct _RX_CONTEXT {
atomic_t IrpLock;
spinlock_t RxContextLock;
dma_addr_t data_dma; /* urb dma on linux */
} RX_CONTEXT, *PRX_CONTEXT;
};
/******************************************************************************
......@@ -309,7 +309,7 @@ typedef struct _RX_CONTEXT {
RTUSBMlmeUp(pAd);
#define RTMP_HANDLE_COUNTER_MEASURE(_pAd, _pEntry) \
{ RTUSBEnqueueInternalCmd(_pAd, CMDTHREAD_802_11_COUNTER_MEASURE, _pEntry, sizeof(MAC_TABLE_ENTRY)); \
{ RTUSBEnqueueInternalCmd(_pAd, CMDTHREAD_802_11_COUNTER_MEASURE, _pEntry, sizeof(struct rt_mac_table_entry)); \
RTUSBMlmeUp(_pAd); \
}
......
......@@ -39,7 +39,7 @@
#ifdef RT30xx
extern REG_PAIR RT30xx_RFRegTable[];
extern struct rt_reg_pair RT30xx_RFRegTable[];
extern u8 NUM_RF_REG_PARMS;
#endif /* RT30xx // */
......
......@@ -54,7 +54,7 @@
/*txop : for txop mode */
/* 0:txop for the MPDU frame will be handles by ASIC by register */
/* 1/2/3:the MPDU frame is send after PIFS/backoff/SIFS */
typedef struct PACKED _TXWI_STRUC {
struct PACKED rt_txwi {
/* Word 0 */
/* ex: 00 03 00 40 means txop = 3, PHYMODE = 1 */
u32 FRAG:1; /* 1 to inform TKIP engine this is a fragment. */
......@@ -88,12 +88,12 @@ typedef struct PACKED _TXWI_STRUC {
u32 IV;
/*Word3 */
u32 EIV;
} TXWI_STRUC, *PTXWI_STRUC;
};
/* */
/* RXWI wireless information format, in PBF. invisible in driver. */
/* */
typedef struct PACKED _RXWI_STRUC {
struct PACKED rt_rxwi {
/* Word 0 */
u32 WirelessCliID:8;
u32 KeyIndex:2;
......@@ -121,7 +121,7 @@ typedef struct PACKED _RXWI_STRUC {
u32 FOFFSET:8; /* RT35xx */
u32 rsv2:8;
/*u32 rsv2:16; */
} RXWI_STRUC, *PRXWI_STRUC;
};
/* ================================================================================= */
/* Register format */
......@@ -999,40 +999,41 @@ typedef union _SHAREDKEY_MODE_STRUC {
} field;
u32 word;
} SHAREDKEY_MODE_STRUC, *PSHAREDKEY_MODE_STRUC;
/* 64-entry for pairwise key table */
typedef struct _HW_WCID_ENTRY { /* 8-byte per entry */
/* 8-byte per entry, 64-entry for pairwise key table */
struct rt_hw_wcid_entry {
u8 Address[6];
u8 Rsv[2];
} HW_WCID_ENTRY, PHW_WCID_ENTRY;
};
/* ================================================================================= */
/* WCID format */
/* ================================================================================= */
/*7.1 WCID ENTRY format : 8bytes */
typedef struct _WCID_ENTRY_STRUC {
struct rt_wcid_entry {
u8 RXBABitmap7; /* bit0 for TID8, bit7 for TID 15 */
u8 RXBABitmap0; /* bit0 for TID0, bit7 for TID 7 */
u8 MAC[6]; /* 0 for shared key table. 1 for pairwise key table */
} WCID_ENTRY_STRUC, *PWCID_ENTRY_STRUC;
};
/*8.1.1 SECURITY KEY format : 8DW */
/* 32-byte per entry, total 16-entry for shared key table, 64-entry for pairwise key table */
typedef struct _HW_KEY_ENTRY { /* 32-byte per entry */
struct rt_hw_key_entry {
u8 Key[16];
u8 TxMic[8];
u8 RxMic[8];
} HW_KEY_ENTRY, *PHW_KEY_ENTRY;
};
/*8.1.2 IV/EIV format : 2DW */
/*8.1.3 RX attribute entry format : 1DW */
typedef struct _MAC_ATTRIBUTE_STRUC {
struct rt_mac_attribute {
u32 KeyTab:1; /* 0 for shared key table. 1 for pairwise key table */
u32 PairKeyMode:3;
u32 BSSIDIdx:3; /*multipleBSS index for the WCID */
u32 RXWIUDF:3;
u32 rsv:22;
} MAC_ATTRIBUTE_STRUC, *PMAC_ATTRIBUTE_STRUC;
};
/* ================================================================================= */
/* HOST-MCU communication data structure */
......
......@@ -212,7 +212,7 @@
#ifdef RTMP_MAC_PCI
/*
basic marco for BBP read operation.
_pAd: the data structure pointer of RTMP_ADAPTER
_pAd: the data structure pointer of struct rt_rtmp_adapter
_bbpID : the bbp register ID
_pV: data pointer used to save the value of queried bbp register.
_bViaMCU: if we need access the bbp via the MCU.
......@@ -370,7 +370,7 @@
/*
basic marco for BBP write operation.
_pAd: the data structure pointer of RTMP_ADAPTER
_pAd: the data structure pointer of struct rt_rtmp_adapter
_bbpID : the bbp register ID
_pV: data used to save the value of queried bbp register.
_bViaMCU: if we need access the bbp via the MCU.
......
......@@ -43,7 +43,7 @@
#error "You Should Enable compile flag RTMP_RF_RW_SUPPORT for this chip"
#endif /* RTMP_RF_RW_SUPPORT // */
void NICInitRT3070RFRegisters(IN PRTMP_ADAPTER pAd)
void NICInitRT3070RFRegisters(struct rt_rtmp_adapter *pAd)
{
int i;
u8 RFValue;
......
......@@ -43,7 +43,7 @@
#error "You Should Enable compile flag RTMP_RF_RW_SUPPORT for this chip"
#endif /* RTMP_RF_RW_SUPPORT // */
void NICInitRT3090RFRegisters(IN PRTMP_ADAPTER pAd)
void NICInitRT3090RFRegisters(struct rt_rtmp_adapter *pAd)
{
int i;
/* Driver must read EEPROM to get RfIcType before initial RF registers */
......
......@@ -46,7 +46,7 @@
/* */
/* RF register initialization set */
/* */
REG_PAIR RT30xx_RFRegTable[] = {
struct rt_reg_pair RT30xx_RFRegTable[] = {
{RF_R04, 0x40}
,
{RF_R05, 0x03}
......@@ -87,7 +87,7 @@ REG_PAIR RT30xx_RFRegTable[] = {
,
};
u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(REG_PAIR));
u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(struct rt_reg_pair));
/* Antenna divesity use GPIO3 and EESK pin for control */
/* Antenna and EEPROM access are both using EESK pin, */
......@@ -95,7 +95,7 @@ u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(REG_PAIR));
/* Then restore antenna after EEPROM access */
/* The original name of this function is AsicSetRxAnt(), now change to */
/*void AsicSetRxAnt( */
void RT30xxSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant)
void RT30xxSetRxAnt(struct rt_rtmp_adapter *pAd, u8 Ant)
{
u32 Value;
#ifdef RTMP_MAC_PCI
......@@ -159,7 +159,7 @@ void RT30xxSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant)
========================================================================
*/
void RTMPFilterCalibration(IN PRTMP_ADAPTER pAd)
void RTMPFilterCalibration(struct rt_rtmp_adapter *pAd)
{
u8 R55x = 0, value, FilterTarget = 0x1E, BBPValue = 0;
u32 loop = 0, count = 0, loopcnt = 0, ReTry = 0;
......@@ -306,7 +306,7 @@ void RTMPFilterCalibration(IN PRTMP_ADAPTER pAd)
==========================================================================
*/
void RT30xxLoadRFNormalModeSetup(IN PRTMP_ADAPTER pAd)
void RT30xxLoadRFNormalModeSetup(struct rt_rtmp_adapter *pAd)
{
u8 RFValue;
......@@ -372,7 +372,7 @@ void RT30xxLoadRFNormalModeSetup(IN PRTMP_ADAPTER pAd)
==========================================================================
*/
void RT30xxLoadRFSleepModeSetup(IN PRTMP_ADAPTER pAd)
void RT30xxLoadRFSleepModeSetup(struct rt_rtmp_adapter *pAd)
{
u8 RFValue;
u32 MACValue;
......@@ -428,7 +428,7 @@ void RT30xxLoadRFSleepModeSetup(IN PRTMP_ADAPTER pAd)
==========================================================================
*/
void RT30xxReverseRFSleepModeSetup(IN PRTMP_ADAPTER pAd)
void RT30xxReverseRFSleepModeSetup(struct rt_rtmp_adapter *pAd)
{
u8 RFValue;
u32 MACValue;
......@@ -493,7 +493,7 @@ void RT30xxReverseRFSleepModeSetup(IN PRTMP_ADAPTER pAd)
/* end johnli */
void RT30xxHaltAction(IN PRTMP_ADAPTER pAd)
void RT30xxHaltAction(struct rt_rtmp_adapter *pAd)
{
u32 TxPinCfg = 0x00050F0F;
......
......@@ -49,28 +49,28 @@
#define BAND_24G 1
#define BAND_BOTH 2
typedef struct _CH_DESP {
struct rt_ch_desp {
u8 FirstChannel;
u8 NumOfCh;
char MaxTxPwr; /* dBm */
u8 Geography; /* 0:out door, 1:in door, 2:both */
BOOLEAN DfsReq; /* Dfs require, 0: No, 1: yes. */
} CH_DESP, *PCH_DESP;
};
typedef struct _CH_REGION {
struct rt_ch_region {
u8 CountReg[3];
u8 DfsType; /* 0: CE, 1: FCC, 2: JAP, 3:JAP_W53, JAP_W56 */
CH_DESP ChDesp[10];
} CH_REGION, *PCH_REGION;
struct rt_ch_desp ChDesp[10];
};
extern CH_REGION ChRegion[];
extern struct rt_ch_region ChRegion[];
typedef struct _CH_FREQ_MAP_ {
struct rt_ch_freq_map {
u16 channel;
u16 freqKHz;
} CH_FREQ_MAP;
};
extern CH_FREQ_MAP CH_HZ_ID_MAP[];
extern struct rt_ch_freq_map CH_HZ_ID_MAP[];
extern int CH_HZ_ID_MAP_NUM;
#define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \
......@@ -103,15 +103,15 @@ extern int CH_HZ_ID_MAP_NUM;
(_ch) = 1; \
}while(0)
void BuildChannelListEx(IN PRTMP_ADAPTER pAd);
void BuildChannelListEx(struct rt_rtmp_adapter *pAd);
void BuildBeaconChList(IN PRTMP_ADAPTER pAd,
void BuildBeaconChList(struct rt_rtmp_adapter *pAd,
u8 *pBuf, unsigned long *pBufLen);
void N_ChannelCheck(IN PRTMP_ADAPTER pAd);
void N_ChannelCheck(struct rt_rtmp_adapter *pAd);
void N_SetCenCh(IN PRTMP_ADAPTER pAd);
void N_SetCenCh(struct rt_rtmp_adapter *pAd);
u8 GetCuntryMaxTxPwr(IN PRTMP_ADAPTER pAd, u8 channel);
u8 GetCuntryMaxTxPwr(struct rt_rtmp_adapter *pAd, u8 channel);
#endif /* __CHLIST_H__ */
This diff is collapsed.
......@@ -39,18 +39,18 @@
#ifndef __ACTION_H__
#define __ACTION_H__
typedef struct PACKED __HT_INFO_OCTET {
struct PACKED rt_ht_information_octet {
u8 Request:1;
u8 Forty_MHz_Intolerant:1;
u8 STA_Channel_Width:1;
u8 Reserved:5;
} HT_INFORMATION_OCTET;
};
typedef struct PACKED __FRAME_HT_INFO {
HEADER_802_11 Hdr;
struct PACKED rt_frame_ht_info {
struct rt_header_802_11 Hdr;
u8 Category;
u8 Action;
HT_INFORMATION_OCTET HT_Info;
} FRAME_HT_INFO, *PFRAME_HT_INFO;
struct rt_ht_information_octet HT_Info;
};
#endif /* __ACTION_H__ */
This diff is collapsed.
......@@ -37,11 +37,11 @@
#include "../rt_config.h"
typedef struct {
struct aes_context {
u32 erk[64]; /* encryption round keys */
u32 drk[64]; /* decryption round keys */
int nr; /* number of rounds */
} aes_context;
};
/*****************************/
/******** SBOX Table *********/
......@@ -408,9 +408,9 @@ void construct_ctr_preload(unsigned char *ctr_preload,
}
BOOLEAN RTMPSoftDecryptAES(IN PRTMP_ADAPTER pAd,
BOOLEAN RTMPSoftDecryptAES(struct rt_rtmp_adapter *pAd,
u8 *pData,
unsigned long DataByteCnt, IN PCIPHER_KEY pWpaKey)
unsigned long DataByteCnt, struct rt_cipher_key *pWpaKey)
{
u8 KeyID;
u32 HeaderLen;
......@@ -878,7 +878,7 @@ static uint32 KT3[256];
(b)[(i) + 3] = (uint8) ( (n) ); \
}
int rt_aes_set_key(aes_context * ctx, uint8 * key, int nbits)
int rt_aes_set_key(struct aes_context * ctx, uint8 * key, int nbits)
{
int i;
uint32 *RK, *SK;
......@@ -1020,7 +1020,7 @@ int rt_aes_set_key(aes_context * ctx, uint8 * key, int nbits)
/* AES 128-bit block encryption routine */
void rt_aes_encrypt(aes_context * ctx, uint8 input[16], uint8 output[16])
void rt_aes_encrypt(struct aes_context * ctx, uint8 input[16], uint8 output[16])
{
uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3;
......@@ -1107,7 +1107,7 @@ void rt_aes_encrypt(aes_context * ctx, uint8 input[16], uint8 output[16])
/* AES 128-bit block decryption routine */
void rt_aes_decrypt(aes_context * ctx, uint8 input[16], uint8 output[16])
void rt_aes_decrypt(struct aes_context * ctx, uint8 input[16], uint8 output[16])
{
uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3;
......@@ -1210,7 +1210,7 @@ void AES_GTK_KEY_WRAP(u8 * key,
u8 R[512];
int num_blocks = p_len / 8; /* unit:64bits */
int i, j;
aes_context aesctx;
struct aes_context aesctx;
u8 xor;
rt_aes_set_key(&aesctx, key, 128);
......@@ -1271,7 +1271,7 @@ void AES_GTK_KEY_UNWRAP(u8 * key,
u8 A[8], BIN[16], BOUT[16];
u8 xor;
int i, j;
aes_context aesctx;
struct aes_context aesctx;
u8 *R;
int num_blocks = c_len / 8; /* unit:64bits */
......
This diff is collapsed.
......@@ -80,7 +80,7 @@ char *GetBW(int BW)
TRUE if all parameters are OK, FALSE otherwise
==========================================================================
*/
int RT_CfgSetCountryRegion(IN PRTMP_ADAPTER pAd, char *arg, int band)
int RT_CfgSetCountryRegion(struct rt_rtmp_adapter *pAd, char *arg, int band)
{
long region, regionMax;
u8 *pCountryRegion;
......@@ -126,7 +126,7 @@ int RT_CfgSetCountryRegion(IN PRTMP_ADAPTER pAd, char *arg, int band)
TRUE if all parameters are OK, FALSE otherwise
==========================================================================
*/
int RT_CfgSetWirelessMode(IN PRTMP_ADAPTER pAd, char *arg)
int RT_CfgSetWirelessMode(struct rt_rtmp_adapter *pAd, char *arg)
{
int MaxPhyMode = PHY_11G;
long WirelessMode;
......@@ -143,7 +143,7 @@ int RT_CfgSetWirelessMode(IN PRTMP_ADAPTER pAd, char *arg)
}
int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg)
int RT_CfgSetShortSlot(struct rt_rtmp_adapter *pAd, char *arg)
{
long ShortSlot;
......@@ -167,9 +167,9 @@ int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg)
TRUE if all parameters are OK, FALSE otherwise
==========================================================================
*/
int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd,
int RT_CfgSetWepKey(struct rt_rtmp_adapter *pAd,
char *keyString,
IN CIPHER_KEY * pSharedKey, int keyIdx)
struct rt_cipher_key *pSharedKey, int keyIdx)
{
int KeyLen;
int i;
......@@ -177,7 +177,7 @@ int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd,
BOOLEAN bKeyIsHex = FALSE;
/* TODO: Shall we do memset for the original key info?? */
memset(pSharedKey, 0, sizeof(CIPHER_KEY));
memset(pSharedKey, 0, sizeof(struct rt_cipher_key));
KeyLen = strlen(keyString);
switch (KeyLen) {
case 5: /*wep 40 Ascii type */
......@@ -230,7 +230,7 @@ int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd,
TRUE if all parameters are OK, FALSE otherwise
==========================================================================
*/
int RT_CfgSetWPAPSKKey(IN RTMP_ADAPTER * pAd,
int RT_CfgSetWPAPSKKey(struct rt_rtmp_adapter *pAd,
char *keyString,
u8 * pHashStr,
int hashStrLen, u8 *pPMKBuf)
......
This diff is collapsed.
......@@ -47,7 +47,7 @@
========================================================================
*/
void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates)
void RTMPSetDesiredRates(struct rt_rtmp_adapter *pAdapter, long Rates)
{
NDIS_802_11_RATES aryRates;
......@@ -235,7 +235,7 @@ void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates)
========================================================================
*/
void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd)
void RTMPWPARemoveAllKeys(struct rt_rtmp_adapter *pAd)
{
u8 i;
......@@ -262,7 +262,7 @@ void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd)
DBGPRINT(RT_DEBUG_TRACE,
("remove %s key #%d\n",
CipherName[pAd->SharedKey[BSS0][i].CipherAlg], i));
NdisZeroMemory(&pAd->SharedKey[BSS0][i], sizeof(CIPHER_KEY));
NdisZeroMemory(&pAd->SharedKey[BSS0][i], sizeof(struct rt_cipher_key));
AsicRemoveSharedKeyEntry(pAd, BSS0, i);
}
......@@ -307,7 +307,7 @@ void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd)
========================================================================
*/
void RTMPSetPhyMode(IN PRTMP_ADAPTER pAd, unsigned long phymode)
void RTMPSetPhyMode(struct rt_rtmp_adapter *pAd, unsigned long phymode)
{
int i;
/* the selected phymode must be supported by the RF IC encoded in E2PROM */
......@@ -435,7 +435,7 @@ void RTMPSetPhyMode(IN PRTMP_ADAPTER pAd, unsigned long phymode)
========================================================================
*/
void RTMPSetHT(IN PRTMP_ADAPTER pAd, IN OID_SET_HT_PHYMODE * pHTPhyMode)
void RTMPSetHT(struct rt_rtmp_adapter *pAd, struct rt_oid_set_ht_phymode *pHTPhyMode)
{
/*unsigned long *pmcs; */
u32 Value = 0;
......@@ -648,9 +648,9 @@ void RTMPSetHT(IN PRTMP_ADAPTER pAd, IN OID_SET_HT_PHYMODE * pHTPhyMode)
========================================================================
*/
void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx)
void RTMPSetIndividualHT(struct rt_rtmp_adapter *pAd, u8 apidx)
{
PRT_HT_PHY_INFO pDesired_ht_phy = NULL;
struct rt_ht_phy_info *pDesired_ht_phy = NULL;
u8 TxStream = pAd->CommonCfg.TxStream;
u8 DesiredMcs = MCS_AUTO;
......@@ -669,7 +669,7 @@ void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx)
("RTMPSetIndividualHT: invalid apidx(%d)\n", apidx));
return;
}
RTMPZeroMemory(pDesired_ht_phy, sizeof(RT_HT_PHY_INFO));
RTMPZeroMemory(pDesired_ht_phy, sizeof(struct rt_ht_phy_info));
DBGPRINT(RT_DEBUG_TRACE,
("RTMPSetIndividualHT : Desired MCS = %d\n", DesiredMcs));
......@@ -755,13 +755,13 @@ void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx)
========================================================================
*/
void RTMPUpdateHTIE(IN RT_HT_CAPABILITY * pRtHt,
void RTMPUpdateHTIE(struct rt_ht_capability *pRtHt,
u8 * pMcsSet,
OUT HT_CAPABILITY_IE * pHtCapability,
OUT ADD_HT_INFO_IE * pAddHtInfo)
struct rt_ht_capability_ie * pHtCapability,
struct rt_add_ht_info_ie * pAddHtInfo)
{
RTMPZeroMemory(pHtCapability, sizeof(HT_CAPABILITY_IE));
RTMPZeroMemory(pAddHtInfo, sizeof(ADD_HT_INFO_IE));
RTMPZeroMemory(pHtCapability, sizeof(struct rt_ht_capability_ie));
RTMPZeroMemory(pAddHtInfo, sizeof(struct rt_add_ht_info_ie));
pHtCapability->HtCapInfo.ChannelWidth = pRtHt->ChannelWidth;
pHtCapability->HtCapInfo.MimoPs = pRtHt->MimoPs;
......@@ -790,10 +790,10 @@ void RTMPUpdateHTIE(IN RT_HT_CAPABILITY * pRtHt,
Return:
========================================================================
*/
void RTMPAddWcidAttributeEntry(IN PRTMP_ADAPTER pAd,
void RTMPAddWcidAttributeEntry(struct rt_rtmp_adapter *pAd,
u8 BssIdx,
u8 KeyIdx,
u8 CipherAlg, IN MAC_TABLE_ENTRY * pEntry)
u8 CipherAlg, struct rt_mac_table_entry *pEntry)
{
u32 WCIDAttri = 0;
u16 offset;
......@@ -914,9 +914,9 @@ char *GetAuthMode(char auth)
return "UNKNOW";
}
int SetCommonHT(IN PRTMP_ADAPTER pAd)
int SetCommonHT(struct rt_rtmp_adapter *pAd)
{
OID_SET_HT_PHYMODE SetHT;
struct rt_oid_set_ht_phymode SetHT;
if (pAd->CommonCfg.PhyMode < PHY_11ABGN_MIXED)
return FALSE;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -105,13 +105,13 @@ u8 BaSizeArray[4] = { 8, 16, 32, 64 };
==========================================================================
*/
void BuildChannelList(IN PRTMP_ADAPTER pAd)
void BuildChannelList(struct rt_rtmp_adapter *pAd)
{
u8 i, j, index = 0, num = 0;
u8 *pChannelList = NULL;
NdisZeroMemory(pAd->ChannelList,
MAX_NUM_OF_CHANNELS * sizeof(CHANNEL_TX_POWER));
MAX_NUM_OF_CHANNELS * sizeof(struct rt_channel_tx_power));
/* if not 11a-only mode, channel list starts from 2.4Ghz band */
if ((pAd->CommonCfg.PhyMode != PHY_11A)
......@@ -122,63 +122,63 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd)
case REGION_0_BG_BAND: /* 1 -11 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_0_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_0_SIZE);
index += BG_BAND_REGION_0_SIZE;
break;
case REGION_1_BG_BAND: /* 1 - 13 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_1_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_1_SIZE);
index += BG_BAND_REGION_1_SIZE;
break;
case REGION_2_BG_BAND: /* 10 - 11 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_2_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_2_SIZE);
index += BG_BAND_REGION_2_SIZE;
break;
case REGION_3_BG_BAND: /* 10 - 13 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_3_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_3_SIZE);
index += BG_BAND_REGION_3_SIZE;
break;
case REGION_4_BG_BAND: /* 14 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_4_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_4_SIZE);
index += BG_BAND_REGION_4_SIZE;
break;
case REGION_5_BG_BAND: /* 1 - 14 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_5_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_5_SIZE);
index += BG_BAND_REGION_5_SIZE;
break;
case REGION_6_BG_BAND: /* 3 - 9 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_6_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_6_SIZE);
index += BG_BAND_REGION_6_SIZE;
break;
case REGION_7_BG_BAND: /* 5 - 13 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_7_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_7_SIZE);
index += BG_BAND_REGION_7_SIZE;
break;
case REGION_31_BG_BAND: /* 1 - 14 */
NdisMoveMemory(&pAd->ChannelList[index],
&pAd->TxPower[BG_BAND_REGION_31_START],
sizeof(CHANNEL_TX_POWER) *
sizeof(struct rt_channel_tx_power) *
BG_BAND_REGION_31_SIZE);
index += BG_BAND_REGION_31_SIZE;
break;
......@@ -315,7 +315,7 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd)
+ i],
&pAd->TxPower[j],
sizeof
(CHANNEL_TX_POWER));
(struct rt_channel_tx_power));
}
for (j = 0; j < 15; j++) {
if (pChannelList[i] == RadarCh[j])
......@@ -359,7 +359,7 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd)
==========================================================================
*/
u8 FirstChannel(IN PRTMP_ADAPTER pAd)
u8 FirstChannel(struct rt_rtmp_adapter *pAd)
{
return pAd->ChannelList[0].Channel;
}
......@@ -375,7 +375,7 @@ u8 FirstChannel(IN PRTMP_ADAPTER pAd)
return 0 if no more next channel
==========================================================================
*/
u8 NextChannel(IN PRTMP_ADAPTER pAd, u8 channel)
u8 NextChannel(struct rt_rtmp_adapter *pAd, u8 channel)
{
int i;
u8 next_channel = 0;
......@@ -408,7 +408,7 @@ u8 NextChannel(IN PRTMP_ADAPTER pAd, u8 channel)
the minimum value or next lower value.
==========================================================================
*/
void ChangeToCellPowerLimit(IN PRTMP_ADAPTER pAd,
void ChangeToCellPowerLimit(struct rt_rtmp_adapter *pAd,
u8 AironetCellPowerLimit)
{
/*valud 0xFF means that hasn't found power limit information */
......@@ -435,7 +435,7 @@ void ChangeToCellPowerLimit(IN PRTMP_ADAPTER pAd,
}
char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber)
char ConvertToRssi(struct rt_rtmp_adapter *pAd, char Rssi, u8 RssiNumber)
{
u8 RssiOffset, LNAGain;
......@@ -469,15 +469,15 @@ char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber)
Scan next channel
==========================================================================
*/
void ScanNextChannel(IN PRTMP_ADAPTER pAd)
void ScanNextChannel(struct rt_rtmp_adapter *pAd)
{
HEADER_802_11 Hdr80211;
struct rt_header_802_11 Hdr80211;
u8 *pOutBuffer = NULL;
int NStatus;
unsigned long FrameLen = 0;
u8 SsidLen = 0, ScanType = pAd->MlmeAux.ScanType, BBPValue = 0;
u16 Status;
PHEADER_802_11 pHdr80211;
struct rt_header_802_11 * pHdr80211;
u32 ScanTimeIn5gChannel = SHORT_CHANNEL_TIME;
{
......@@ -522,7 +522,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd)
MlmeAllocateMemory(pAd,
(void *)& pOutBuffer);
if (NStatus == NDIS_STATUS_SUCCESS) {
pHdr80211 = (PHEADER_802_11) pOutBuffer;
pHdr80211 = (struct rt_header_802_11 *) pOutBuffer;
MgtMacHeaderInit(pAd, pHdr80211,
SUBTYPE_NULL_FUNC, 1,
pAd->CommonCfg.Bssid,
......@@ -535,7 +535,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd)
/* Send using priority queue */
MiniportMMRequest(pAd, 0, pOutBuffer,
sizeof
(HEADER_802_11));
(struct rt_header_802_11));
DBGPRINT(RT_DEBUG_TRACE,
("MlmeScanReqAction -- Send PSM Data frame\n"));
MlmeFreeMemory(pAd, pOutBuffer);
......@@ -642,7 +642,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd)
MgtMacHeaderInit(pAd, &Hdr80211, SUBTYPE_PROBE_REQ, 0,
BROADCAST_ADDR, BROADCAST_ADDR);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &Hdr80211, 1,
sizeof(struct rt_header_802_11), &Hdr80211, 1,
&SsidIe, 1, &SsidLen, SsidLen,
pAd->MlmeAux.Ssid, 1, &SupRateIe, 1,
&pAd->CommonCfg.SupRateLen,
......@@ -700,12 +700,12 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd)
}
}
void MgtProbReqMacHeaderInit(IN PRTMP_ADAPTER pAd,
IN OUT PHEADER_802_11 pHdr80211,
void MgtProbReqMacHeaderInit(struct rt_rtmp_adapter *pAd,
struct rt_header_802_11 * pHdr80211,
u8 SubType,
u8 ToDs, u8 *pDA, u8 *pBssid)
{
NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11));
NdisZeroMemory(pHdr80211, sizeof(struct rt_header_802_11));
pHdr80211->FC.Type = BTYPE_MGMT;
pHdr80211->FC.SubType = SubType;
......
......@@ -115,7 +115,7 @@ u32 Tkip_Sbox_Upper[256] = {
/* */
/* Expanded IV for TKIP function. */
/* */
typedef struct PACKED _IV_CONTROL_ {
struct PACKED rt_tkip_iv {
union PACKED {
struct PACKED {
u8 rc0;
......@@ -136,7 +136,7 @@ typedef struct PACKED _IV_CONTROL_ {
} IV16;
unsigned long IV32;
} TKIP_IV, *PTKIP_IV;
};
/*
========================================================================
......@@ -214,7 +214,7 @@ void RTMPTkipPutUInt32(IN u8 *pDst, unsigned long val)
========================================================================
*/
void RTMPTkipSetMICKey(IN PTKIP_KEY_INFO pTkip, u8 *pMICKey)
void RTMPTkipSetMICKey(struct rt_tkip_key_info *pTkip, u8 *pMICKey)
{
/* Set the key */
pTkip->K0 = RTMPTkipGetUInt32(pMICKey);
......@@ -245,7 +245,7 @@ void RTMPTkipSetMICKey(IN PTKIP_KEY_INFO pTkip, u8 *pMICKey)
========================================================================
*/
void RTMPTkipAppendByte(IN PTKIP_KEY_INFO pTkip, u8 uChar)
void RTMPTkipAppendByte(struct rt_tkip_key_info *pTkip, u8 uChar)
{
/* Append the byte to our word-sized buffer */
pTkip->M |= (uChar << (8 * pTkip->nBytesInM));
......@@ -289,7 +289,7 @@ void RTMPTkipAppendByte(IN PTKIP_KEY_INFO pTkip, u8 uChar)
========================================================================
*/
void RTMPTkipAppend(IN PTKIP_KEY_INFO pTkip, u8 *pSrc, u32 nBytes)
void RTMPTkipAppend(struct rt_tkip_key_info *pTkip, u8 *pSrc, u32 nBytes)
{
/* This is simple */
while (nBytes > 0) {
......@@ -316,7 +316,7 @@ void RTMPTkipAppend(IN PTKIP_KEY_INFO pTkip, u8 *pSrc, u32 nBytes)
the MIC Value is store in pAd->PrivateInfo.MIC
========================================================================
*/
void RTMPTkipGetMIC(IN PTKIP_KEY_INFO pTkip)
void RTMPTkipGetMIC(struct rt_tkip_key_info *pTkip)
{
/* Append the minimum padding */
RTMPTkipAppendByte(pTkip, 0x5a);
......@@ -355,17 +355,17 @@ void RTMPTkipGetMIC(IN PTKIP_KEY_INFO pTkip)
========================================================================
*/
void RTMPInitTkipEngine(IN PRTMP_ADAPTER pAd,
void RTMPInitTkipEngine(struct rt_rtmp_adapter *pAd,
u8 *pKey,
u8 KeyId,
u8 *pTA,
u8 *pMICKey,
u8 *pTSC, unsigned long *pIV16, unsigned long *pIV32)
{
TKIP_IV tkipIv;
struct rt_tkip_iv tkipIv;
/* Prepare 8 bytes TKIP encapsulation for MPDU */
NdisZeroMemory(&tkipIv, sizeof(TKIP_IV));
NdisZeroMemory(&tkipIv, sizeof(struct rt_tkip_iv));
tkipIv.IV16.field.rc0 = *(pTSC + 1);
tkipIv.IV16.field.rc1 = (tkipIv.IV16.field.rc0 | 0x20) & 0x7f;
tkipIv.IV16.field.rc2 = *pTSC;
......@@ -399,7 +399,7 @@ void RTMPInitTkipEngine(IN PRTMP_ADAPTER pAd,
========================================================================
*/
void RTMPInitMICEngine(IN PRTMP_ADAPTER pAd,
void RTMPInitMICEngine(struct rt_rtmp_adapter *pAd,
u8 *pKey,
u8 *pDA,
u8 *pSA, u8 UserPriority, u8 *pMICKey)
......@@ -440,7 +440,7 @@ void RTMPInitMICEngine(IN PRTMP_ADAPTER pAd,
========================================================================
*/
BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd,
BOOLEAN RTMPTkipCompareMICValue(struct rt_rtmp_adapter *pAd,
u8 *pSrc,
u8 *pDA,
u8 *pSA,
......@@ -500,12 +500,12 @@ BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd,
========================================================================
*/
void RTMPCalculateMICValue(IN PRTMP_ADAPTER pAd,
void RTMPCalculateMICValue(struct rt_rtmp_adapter *pAd,
void *pPacket,
u8 *pEncap,
IN PCIPHER_KEY pKey, u8 apidx)
struct rt_cipher_key *pKey, u8 apidx)
{
PACKET_INFO PacketInfo;
struct rt_packet_info PacketInfo;
u8 *pSrcBufVA;
u32 SrcBufLen;
u8 *pSrc;
......@@ -698,10 +698,10 @@ void RTMPTkipMixKey(u8 * key, u8 * ta, unsigned long pnl, /* Least significant 1
/* TRUE: Success! */
/* FALSE: Decrypt Error! */
/* */
BOOLEAN RTMPSoftDecryptTKIP(IN PRTMP_ADAPTER pAd,
BOOLEAN RTMPSoftDecryptTKIP(struct rt_rtmp_adapter *pAd,
u8 *pData,
unsigned long DataByteCnt,
u8 UserPriority, IN PCIPHER_KEY pWpaKey)
u8 UserPriority, struct rt_cipher_key *pWpaKey)
{
u8 KeyID;
u32 HeaderLen;
......@@ -726,7 +726,7 @@ BOOLEAN RTMPSoftDecryptTKIP(IN PRTMP_ADAPTER pAd,
unsigned long pnh; /* Most significant 32 bits of PN */
u32 num_blocks;
u32 payload_remainder;
ARCFOURCONTEXT ArcFourContext;
struct rt_arcfourcontext ArcFourContext;
u32 crc32 = 0;
u32 trailfcs = 0;
u8 MIC[8];
......
......@@ -135,7 +135,7 @@ u8 WEPKEY[] = {
========================================================================
*/
void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd,
void RTMPInitWepEngine(struct rt_rtmp_adapter *pAd,
u8 *pKey,
u8 KeyId, u8 KeyLen, IN u8 *pDest)
{
......@@ -184,7 +184,7 @@ void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd,
========================================================================
*/
void RTMPEncryptData(IN PRTMP_ADAPTER pAd,
void RTMPEncryptData(struct rt_rtmp_adapter *pAd,
u8 *pSrc, u8 *pDest, u32 Len)
{
pAd->PrivateInfo.FCSCRC32 =
......@@ -211,9 +211,9 @@ void RTMPEncryptData(IN PRTMP_ADAPTER pAd,
========================================================================
*/
BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd,
BOOLEAN RTMPSoftDecryptWEP(struct rt_rtmp_adapter *pAd,
u8 *pData,
unsigned long DataByteCnt, IN PCIPHER_KEY pGroupKey)
unsigned long DataByteCnt, struct rt_cipher_key *pGroupKey)
{
u32 trailfcs;
u32 crc32;
......@@ -255,10 +255,10 @@ BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd,
========================================================================
Routine Description:
The Stream Cipher Encryption Algorithm "ARCFOUR" initialize
The Stream Cipher Encryption Algorithm "struct rt_arcfour" initialize
Arguments:
Ctx Pointer to ARCFOUR CONTEXT (SBOX)
Ctx Pointer to struct rt_arcfour CONTEXT (SBOX)
pKey Pointer to the WEP KEY
KeyLen Indicate the length fo the WEP KEY
......@@ -271,7 +271,7 @@ BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd,
========================================================================
*/
void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen)
void ARCFOUR_INIT(struct rt_arcfourcontext *Ctx, u8 *pKey, u32 KeyLen)
{
u8 t, u;
u32 keyindex;
......@@ -301,19 +301,19 @@ void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen)
========================================================================
Routine Description:
Get bytes from ARCFOUR CONTEXT (S-BOX)
Get bytes from struct rt_arcfour CONTEXT (S-BOX)
Arguments:
Ctx Pointer to ARCFOUR CONTEXT (SBOX)
Ctx Pointer to struct rt_arcfour CONTEXT (SBOX)
Return Value:
u8 - the value of the ARCFOUR CONTEXT (S-BOX)
u8 - the value of the struct rt_arcfour CONTEXT (S-BOX)
Note:
========================================================================
*/
u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx)
u8 ARCFOUR_BYTE(struct rt_arcfourcontext *Ctx)
{
u32 x;
u32 y;
......@@ -341,7 +341,7 @@ u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx)
The Stream Cipher Decryption Algorithm
Arguments:
Ctx Pointer to ARCFOUR CONTEXT (SBOX)
Ctx Pointer to struct rt_arcfour CONTEXT (SBOX)
pDest Pointer to the Destination
pSrc Pointer to the Source data
Len Indicate the length of the Source data
......@@ -353,7 +353,7 @@ u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx)
========================================================================
*/
void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx,
void ARCFOUR_DECRYPT(struct rt_arcfourcontext *Ctx,
u8 *pDest, u8 *pSrc, u32 Len)
{
u32 i;
......@@ -369,7 +369,7 @@ void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx,
The Stream Cipher Encryption Algorithm
Arguments:
Ctx Pointer to ARCFOUR CONTEXT (SBOX)
Ctx Pointer to struct rt_arcfour CONTEXT (SBOX)
pDest Pointer to the Destination
pSrc Pointer to the Source data
Len Indicate the length of the Source dta
......@@ -383,7 +383,7 @@ void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx,
========================================================================
*/
void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
void ARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx,
u8 *pDest, u8 *pSrc, u32 Len)
{
u32 i;
......@@ -399,7 +399,7 @@ void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
The Stream Cipher Encryption Algorithm which conform to the special requirement to encrypt GTK.
Arguments:
Ctx Pointer to ARCFOUR CONTEXT (SBOX)
Ctx Pointer to struct rt_arcfour CONTEXT (SBOX)
pDest Pointer to the Destination
pSrc Pointer to the Source data
Len Indicate the length of the Source dta
......@@ -407,7 +407,7 @@ void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
========================================================================
*/
void WPAARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
void WPAARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx,
u8 *pDest, u8 *pSrc, u32 Len)
{
u32 i;
......@@ -463,7 +463,7 @@ u32 RTMP_CALC_FCS32(u32 Fcs, u8 *Cp, int Len)
========================================================================
*/
void RTMPSetICV(IN PRTMP_ADAPTER pAd, u8 *pDest)
void RTMPSetICV(struct rt_rtmp_adapter *pAd, u8 *pDest)
{
pAd->PrivateInfo.FCSCRC32 ^= 0xffffffff; /* complement */
pAd->PrivateInfo.FCSCRC32 = cpu2le32(pAd->PrivateInfo.FCSCRC32);
......
This diff is collapsed.
......@@ -51,14 +51,14 @@ void HMAC_SHA1(IN const u8 Key[],
IN const u8 Message[],
u32 MessageLen, u8 MAC[], u32 MACLen)
{
SHA1_CTX_STRUC sha_ctx1;
SHA1_CTX_STRUC sha_ctx2;
struct rt_sha1_ctx sha_ctx1;
struct rt_sha1_ctx sha_ctx2;
u8 K0[SHA1_BLOCK_SIZE];
u8 Digest[SHA1_DIGEST_SIZE];
u32 index;
NdisZeroMemory(&sha_ctx1, sizeof(SHA1_CTX_STRUC));
NdisZeroMemory(&sha_ctx2, sizeof(SHA1_CTX_STRUC));
NdisZeroMemory(&sha_ctx1, sizeof(struct rt_sha1_ctx));
NdisZeroMemory(&sha_ctx2, sizeof(struct rt_sha1_ctx));
/*
* If the length of K = B(Block size): K0 = K.
* If the length of K > B: hash K to obtain an L byte string,
......@@ -130,14 +130,14 @@ void HMAC_MD5(IN const u8 Key[],
IN const u8 Message[],
u32 MessageLen, u8 MAC[], u32 MACLen)
{
MD5_CTX_STRUC md5_ctx1;
MD5_CTX_STRUC md5_ctx2;
struct rt_md5_ctx_struc md5_ctx1;
struct rt_md5_ctx_struc md5_ctx2;
u8 K0[MD5_BLOCK_SIZE];
u8 Digest[MD5_DIGEST_SIZE];
u32 index;
NdisZeroMemory(&md5_ctx1, sizeof(MD5_CTX_STRUC));
NdisZeroMemory(&md5_ctx2, sizeof(MD5_CTX_STRUC));
NdisZeroMemory(&md5_ctx1, sizeof(struct rt_md5_ctx_struc));
NdisZeroMemory(&md5_ctx2, sizeof(struct rt_md5_ctx_struc));
/*
* If the length of K = B(Block size): K0 = K.
* If the length of K > B: hash K to obtain an L byte string,
......
......@@ -79,7 +79,7 @@ Note:
None
========================================================================
*/
void MD5_Init(IN MD5_CTX_STRUC * pMD5_CTX)
void MD5_Init(struct rt_md5_ctx_struc *pMD5_CTX)
{
NdisMoveMemory(pMD5_CTX->HashValue, MD5_DefaultHashValue,
sizeof(MD5_DefaultHashValue));
......@@ -103,7 +103,7 @@ Note:
T[i] := floor(abs(sin(i + 1)) * (2 pow 32)), i is number of round
========================================================================
*/
void MD5_Hash(IN MD5_CTX_STRUC * pMD5_CTX)
void MD5_Hash(struct rt_md5_ctx_struc *pMD5_CTX)
{
u32 X_i;
u32 X[16];
......@@ -227,7 +227,7 @@ Routine Description:
will be called.
Arguments:
pMD5_CTX Pointer to MD5_CTX_STRUC
pMD5_CTX Pointer to struct rt_md5_ctx_struc
message Message context
messageLen The length of message in bytes
......@@ -238,7 +238,7 @@ Note:
None
========================================================================
*/
void MD5_Append(IN MD5_CTX_STRUC * pMD5_CTX,
void MD5_Append(struct rt_md5_ctx_struc *pMD5_CTX,
IN const u8 Message[], u32 MessageLen)
{
u32 appendLen = 0;
......@@ -271,7 +271,7 @@ Routine Description:
3. Transform the Hash Value to digest message
Arguments:
pMD5_CTX Pointer to MD5_CTX_STRUC
pMD5_CTX Pointer to struct rt_md5_ctx_struc
Return Value:
digestMessage Digest message
......@@ -280,7 +280,7 @@ Note:
None
========================================================================
*/
void MD5_End(IN MD5_CTX_STRUC * pMD5_CTX, u8 DigestMessage[])
void MD5_End(struct rt_md5_ctx_struc *pMD5_CTX, u8 DigestMessage[])
{
u32 index;
u64 message_length_bits;
......@@ -326,9 +326,9 @@ Note:
void RT_MD5(IN const u8 Message[],
u32 MessageLen, u8 DigestMessage[])
{
MD5_CTX_STRUC md5_ctx;
struct rt_md5_ctx_struc md5_ctx;
NdisZeroMemory(&md5_ctx, sizeof(MD5_CTX_STRUC));
NdisZeroMemory(&md5_ctx, sizeof(struct rt_md5_ctx_struc));
MD5_Init(&md5_ctx);
MD5_Append(&md5_ctx, Message, MessageLen);
MD5_End(&md5_ctx, DigestMessage);
......
......@@ -52,10 +52,10 @@ static const u32 SHA1_DefaultHashValue[5] = {
/*
========================================================================
Routine Description:
Initial SHA1_CTX_STRUC
Initial struct rt_sha1_ctx
Arguments:
pSHA_CTX Pointer to SHA1_CTX_STRUC
pSHA_CTX Pointer to struct rt_sha1_ctx
Return Value:
None
......@@ -64,7 +64,7 @@ Note:
None
========================================================================
*/
void RT_SHA1_Init(IN SHA1_CTX_STRUC * pSHA_CTX)
void RT_SHA1_Init(struct rt_sha1_ctx *pSHA_CTX)
{
NdisMoveMemory(pSHA_CTX->HashValue, SHA1_DefaultHashValue,
sizeof(SHA1_DefaultHashValue));
......@@ -79,7 +79,7 @@ Routine Description:
SHA1 computation for one block (512 bits)
Arguments:
pSHA_CTX Pointer to SHA1_CTX_STRUC
pSHA_CTX Pointer to struct rt_sha1_ctx
Return Value:
None
......@@ -88,7 +88,7 @@ Note:
None
========================================================================
*/
void SHA1_Hash(IN SHA1_CTX_STRUC * pSHA_CTX)
void SHA1_Hash(struct rt_sha1_ctx *pSHA_CTX)
{
u32 W_i, t, s;
u32 W[16];
......@@ -157,7 +157,7 @@ Routine Description:
will be called.
Arguments:
pSHA_CTX Pointer to SHA1_CTX_STRUC
pSHA_CTX Pointer to struct rt_sha1_ctx
message Message context
messageLen The length of message in bytes
......@@ -168,7 +168,7 @@ Note:
None
========================================================================
*/
void SHA1_Append(IN SHA1_CTX_STRUC * pSHA_CTX,
void SHA1_Append(struct rt_sha1_ctx *pSHA_CTX,
IN const u8 Message[], u32 MessageLen)
{
u32 appendLen = 0;
......@@ -201,7 +201,7 @@ Routine Description:
3. Transform the Hash Value to digest message
Arguments:
pSHA_CTX Pointer to SHA1_CTX_STRUC
pSHA_CTX Pointer to struct rt_sha1_ctx
Return Value:
digestMessage Digest message
......@@ -210,7 +210,7 @@ Note:
None
========================================================================
*/
void SHA1_End(IN SHA1_CTX_STRUC * pSHA_CTX, u8 DigestMessage[])
void SHA1_End(struct rt_sha1_ctx *pSHA_CTX, u8 DigestMessage[])
{
u32 index;
u64 message_length_bits;
......@@ -257,9 +257,9 @@ void RT_SHA1(IN const u8 Message[],
u32 MessageLen, u8 DigestMessage[])
{
SHA1_CTX_STRUC sha_ctx;
struct rt_sha1_ctx sha_ctx;
NdisZeroMemory(&sha_ctx, sizeof(SHA1_CTX_STRUC));
NdisZeroMemory(&sha_ctx, sizeof(struct rt_sha1_ctx));
RT_SHA1_Init(&sha_ctx);
SHA1_Append(&sha_ctx, Message, MessageLen);
SHA1_End(&sha_ctx, DigestMessage);
......
......@@ -52,7 +52,7 @@
========================================================================
*/
BOOLEAN RadarChannelCheck(IN PRTMP_ADAPTER pAd, u8 Ch)
BOOLEAN RadarChannelCheck(struct rt_rtmp_adapter *pAd, u8 Ch)
{
int i;
BOOLEAN result = FALSE;
......
......@@ -73,7 +73,7 @@ typedef union _EFUSE_CTRL_STRUC {
========================================================================
*/
u8 eFuseReadRegisters(IN PRTMP_ADAPTER pAd,
u8 eFuseReadRegisters(struct rt_rtmp_adapter *pAd,
u16 Offset, u16 Length, u16 * pData)
{
EFUSE_CTRL_STRUC eFuseCtrlStruc;
......@@ -149,7 +149,7 @@ u8 eFuseReadRegisters(IN PRTMP_ADAPTER pAd,
========================================================================
*/
void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd,
void eFusePhysicalReadRegisters(struct rt_rtmp_adapter *pAd,
u16 Offset,
u16 Length, u16 * pData)
{
......@@ -214,7 +214,7 @@ void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd,
========================================================================
*/
static void eFuseReadPhysical(IN PRTMP_ADAPTER pAd,
static void eFuseReadPhysical(struct rt_rtmp_adapter *pAd,
u16 *lpInBuffer,
unsigned long nInBufferSize,
u16 *lpOutBuffer, unsigned long nOutBufferSize)
......@@ -244,7 +244,7 @@ static void eFuseReadPhysical(IN PRTMP_ADAPTER pAd,
========================================================================
*/
int set_eFuseGetFreeBlockCount_Proc(IN PRTMP_ADAPTER pAd, char *arg)
int set_eFuseGetFreeBlockCount_Proc(struct rt_rtmp_adapter *pAd, char *arg)
{
u16 i;
u16 LogicalAddress;
......@@ -268,7 +268,7 @@ int set_eFuseGetFreeBlockCount_Proc(IN PRTMP_ADAPTER pAd, char *arg)
return TRUE;
}
int set_eFusedump_Proc(IN PRTMP_ADAPTER pAd, char *arg)
int set_eFusedump_Proc(struct rt_rtmp_adapter *pAd, char *arg)
{
u16 InBuf[3];
int i = 0;
......@@ -287,14 +287,14 @@ int set_eFusedump_Proc(IN PRTMP_ADAPTER pAd, char *arg)
return TRUE;
}
int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd,
int rtmp_ee_efuse_read16(struct rt_rtmp_adapter *pAd,
u16 Offset, u16 * pValue)
{
eFuseReadRegisters(pAd, Offset, 2, pValue);
return (*pValue);
}
int RtmpEfuseSupportCheck(IN RTMP_ADAPTER * pAd)
int RtmpEfuseSupportCheck(struct rt_rtmp_adapter *pAd)
{
u16 value;
......@@ -305,7 +305,7 @@ int RtmpEfuseSupportCheck(IN RTMP_ADAPTER * pAd)
return 0;
}
void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock)
void eFuseGetFreeBlockCount(struct rt_rtmp_adapter *pAd, u32 *EfuseFreeBlock)
{
u16 i;
u16 LogicalAddress;
......@@ -331,7 +331,7 @@ void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock)
("eFuseGetFreeBlockCount is 0x%x\n", *EfuseFreeBlock));
}
int eFuse_init(IN PRTMP_ADAPTER pAd)
int eFuse_init(struct rt_rtmp_adapter *pAd)
{
u32 EfuseFreeBlock = 0;
DBGPRINT(RT_DEBUG_ERROR,
......
......@@ -38,7 +38,7 @@
#include "../rt_config.h"
/* IRQL = PASSIVE_LEVEL */
static inline void RaiseClock(IN PRTMP_ADAPTER pAd, u32 * x)
static inline void RaiseClock(struct rt_rtmp_adapter *pAd, u32 * x)
{
*x = *x | EESK;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, *x);
......@@ -46,7 +46,7 @@ static inline void RaiseClock(IN PRTMP_ADAPTER pAd, u32 * x)
}
/* IRQL = PASSIVE_LEVEL */
static inline void LowerClock(IN PRTMP_ADAPTER pAd, u32 * x)
static inline void LowerClock(struct rt_rtmp_adapter *pAd, u32 * x)
{
*x = *x & ~EESK;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, *x);
......@@ -54,7 +54,7 @@ static inline void LowerClock(IN PRTMP_ADAPTER pAd, u32 * x)
}
/* IRQL = PASSIVE_LEVEL */
static inline u16 ShiftInBits(IN PRTMP_ADAPTER pAd)
static inline u16 ShiftInBits(struct rt_rtmp_adapter *pAd)
{
u32 x, i;
u16 data = 0;
......@@ -79,7 +79,7 @@ static inline u16 ShiftInBits(IN PRTMP_ADAPTER pAd)
}
/* IRQL = PASSIVE_LEVEL */
static inline void ShiftOutBits(IN PRTMP_ADAPTER pAd,
static inline void ShiftOutBits(struct rt_rtmp_adapter *pAd,
u16 data, u16 count)
{
u32 x, mask;
......@@ -107,7 +107,7 @@ static inline void ShiftOutBits(IN PRTMP_ADAPTER pAd,
}
/* IRQL = PASSIVE_LEVEL */
static inline void EEpromCleanup(IN PRTMP_ADAPTER pAd)
static inline void EEpromCleanup(struct rt_rtmp_adapter *pAd)
{
u32 x;
......@@ -120,7 +120,7 @@ static inline void EEpromCleanup(IN PRTMP_ADAPTER pAd)
LowerClock(pAd, &x);
}
static inline void EWEN(IN PRTMP_ADAPTER pAd)
static inline void EWEN(struct rt_rtmp_adapter *pAd)
{
u32 x;
......@@ -141,7 +141,7 @@ static inline void EWEN(IN PRTMP_ADAPTER pAd)
EEpromCleanup(pAd);
}
static inline void EWDS(IN PRTMP_ADAPTER pAd)
static inline void EWDS(struct rt_rtmp_adapter *pAd)
{
u32 x;
......@@ -163,7 +163,7 @@ static inline void EWDS(IN PRTMP_ADAPTER pAd)
}
/* IRQL = PASSIVE_LEVEL */
int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd,
int rtmp_ee_prom_read16(struct rt_rtmp_adapter *pAd,
u16 Offset, u16 * pValue)
{
u32 x;
......
......@@ -36,9 +36,9 @@
*/
#include "../rt_config.h"
int RtmpChipOpsEepromHook(IN RTMP_ADAPTER * pAd, int infType)
int RtmpChipOpsEepromHook(struct rt_rtmp_adapter *pAd, int infType)
{
RTMP_CHIP_OP *pChipOps = &pAd->chipOps;
struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps;
#ifdef RT30xx
#ifdef RTMP_EFUSE_SUPPORT
u32 eFuseCtrl, MacCsr0;
......
This diff is collapsed.
This diff is collapsed.
......@@ -53,7 +53,7 @@
========================================================================
*/
int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd,
int RT30xxWriteRFRegister(struct rt_rtmp_adapter *pAd,
u8 regID, u8 value)
{
RF_CSR_CFG_STRUC rfcsr;
......@@ -101,7 +101,7 @@ int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd,
========================================================================
*/
int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd,
int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd,
u8 regID, u8 *pValue)
{
RF_CSR_CFG_STRUC rfcsr;
......@@ -139,15 +139,15 @@ int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd,
return STATUS_SUCCESS;
}
void NICInitRFRegisters(IN RTMP_ADAPTER * pAd)
void NICInitRFRegisters(struct rt_rtmp_adapter *pAd)
{
if (pAd->chipOps.AsicRfInit)
pAd->chipOps.AsicRfInit(pAd);
}
void RtmpChipOpsRFHook(IN RTMP_ADAPTER * pAd)
void RtmpChipOpsRFHook(struct rt_rtmp_adapter *pAd)
{
RTMP_CHIP_OP *pChipOps = &pAd->chipOps;
struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps;
pChipOps->pRFRegTable = NULL;
pChipOps->AsicRfInit = NULL;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -36,4 +36,4 @@
Fonchi 03-12-2007 created
*/
BOOLEAN RadarChannelCheck(IN PRTMP_ADAPTER pAd, u8 Ch);
BOOLEAN RadarChannelCheck(struct rt_rtmp_adapter *pAd, u8 Ch);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -161,7 +161,7 @@
* EEPROM operation related marcos
*/
#define RT28xx_EEPROM_READ16(_pAd, _offset, _value) \
(_pAd)->chipOps.eeread((RTMP_ADAPTER *)(_pAd), (u16)(_offset), (u16 *)&(_value))
(_pAd)->chipOps.eeread((struct rt_rtmp_adapter *)(_pAd), (u16)(_offset), (u16 *)&(_value))
/* ------------------------------------------------------------------- */
/* E2PROM data layout */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment