Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51126deb authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman
Browse files

Staging: rt28x0: remove typedefs (part one)



Remove typedefs from rtmp_type.h.

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cc277069
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -41,26 +41,26 @@
#define __AP_H__

/* ap_wpa.c */
VOID WpaStateMachineInit(IN PRTMP_ADAPTER pAd,
void WpaStateMachineInit(IN PRTMP_ADAPTER pAd,
			 IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]);

#ifdef RTMP_MAC_USB
VOID BeaconUpdateExec(IN PVOID SystemSpecific1,
		      IN PVOID FunctionContext,
		      IN PVOID SystemSpecific2, IN PVOID SystemSpecific3);
void BeaconUpdateExec(void *SystemSpecific1,
		      void *FunctionContext,
		      void *SystemSpecific2, void *SystemSpecific3);
#endif /* RTMP_MAC_USB // */

VOID RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack);
void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack);

VOID MacTableReset(IN PRTMP_ADAPTER pAd);
void MacTableReset(IN PRTMP_ADAPTER pAd);

MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd,
				     IN PUCHAR pAddr,
				     IN UCHAR apidx, IN BOOLEAN CleanAll);
				     u8 *pAddr,
				     u8 apidx, IN BOOLEAN CleanAll);

BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd,
			    IN USHORT wcid, IN PUCHAR pAddr);
			    u16 wcid, u8 *pAddr);

MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, IN PUCHAR pAddr);
MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, u8 *pAddr);

#endif /* __AP_H__ */
+52 −52
Original line number Diff line number Diff line
@@ -71,24 +71,24 @@
//
typedef struct PACKED _TXD_STRUC {
	// Word 0
	UINT32 SDPtr0;
	u32 SDPtr0;
	// Word 1
	UINT32 SDLen1:14;
	UINT32 LastSec1:1;
	UINT32 Burst:1;
	UINT32 SDLen0:14;
	UINT32 LastSec0:1;
	UINT32 DMADONE:1;
	u32 SDLen1:14;
	u32 LastSec1:1;
	u32 Burst:1;
	u32 SDLen0:14;
	u32 LastSec0:1;
	u32 DMADONE:1;
	//Word2
	UINT32 SDPtr1;
	u32 SDPtr1;
	//Word3
	UINT32 rsv2:24;
	UINT32 WIV:1;		// Wireless Info Valid. 1 if Driver already fill WI,  o if DMA needs to copy WI to correctposition
	UINT32 QSEL:2;		// select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA
	UINT32 rsv:2;
	UINT32 TCO:1;		//
	UINT32 UCO:1;		//
	UINT32 ICO:1;		//
	u32 rsv2:24;
	u32 WIV:1;		/* Wireless Info Valid. 1 if Driver already fill WI,  o if DMA needs to copy WI to correctposition */
	u32 QSEL:2;		/* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
	u32 rsv:2;
	u32 TCO:1;		/* */
	u32 UCO:1;		/* */
	u32 ICO:1;		/* */
} TXD_STRUC, *PTXD_STRUC;

//
@@ -96,47 +96,47 @@ typedef struct PACKED _TXD_STRUC {
//
typedef struct PACKED _RXD_STRUC {
	// Word 0
	UINT32 SDP0;
	u32 SDP0;
	// Word 1
	UINT32 SDL1:14;
	UINT32 Rsv:2;
	UINT32 SDL0:14;
	UINT32 LS0:1;
	UINT32 DDONE:1;
	u32 SDL1:14;
	u32 Rsv:2;
	u32 SDL0:14;
	u32 LS0:1;
	u32 DDONE:1;
	// Word 2
	UINT32 SDP1;
	u32 SDP1;
	// Word 3
	UINT32 BA:1;
	UINT32 DATA:1;
	UINT32 NULLDATA:1;
	UINT32 FRAG:1;
	UINT32 U2M:1;		// 1: this RX frame is unicast to me
	UINT32 Mcast:1;		// 1: this is a multicast frame
	UINT32 Bcast:1;		// 1: this is a broadcast frame
	UINT32 MyBss:1;		// 1: this frame belongs to the same BSSID
	UINT32 Crc:1;		// 1: CRC error
	UINT32 CipherErr:2;	// 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid
	UINT32 AMSDU:1;		// rx with 802.3 header, not 802.11 header.
	UINT32 HTC:1;
	UINT32 RSSI:1;
	UINT32 L2PAD:1;
	UINT32 AMPDU:1;
	UINT32 Decrypted:1;	// this frame is being decrypted.
	UINT32 PlcpSignal:1;	// To be moved
	UINT32 PlcpRssil:1;	// To be moved
	UINT32 Rsv1:13;
	u32 BA:1;
	u32 DATA:1;
	u32 NULLDATA:1;
	u32 FRAG:1;
	u32 U2M:1;		/* 1: this RX frame is unicast to me */
	u32 Mcast:1;		/* 1: this is a multicast frame */
	u32 Bcast:1;		/* 1: this is a broadcast frame */
	u32 MyBss:1;		/* 1: this frame belongs to the same BSSID */
	u32 Crc:1;		/* 1: CRC error */
	u32 CipherErr:2;	/* 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid */
	u32 AMSDU:1;		/* rx with 802.3 header, not 802.11 header. */
	u32 HTC:1;
	u32 RSSI:1;
	u32 L2PAD:1;
	u32 AMPDU:1;
	u32 Decrypted:1;	/* this frame is being decrypted. */
	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;

typedef union _TX_ATTENUATION_CTRL_STRUC {
	struct {
		ULONG RF_ISOLATION_ENABLE:1;
		ULONG Reserve2:7;
		ULONG PCIE_PHY_TX_ATTEN_VALUE:3;
		ULONG PCIE_PHY_TX_ATTEN_EN:1;
		ULONG Reserve1:20;
		unsigned long RF_ISOLATION_ENABLE:1;
		unsigned long Reserve2:7;
		unsigned long PCIE_PHY_TX_ATTEN_VALUE:3;
		unsigned long PCIE_PHY_TX_ATTEN_EN:1;
		unsigned long Reserve1:20;
	} field;

	ULONG word;
	unsigned long word;
} TX_ATTENUATION_CTRL_STRUC, *PTX_ATTENUATION_CTRL_STRUC;

/* ----------------- EEPROM Related MACRO ----------------- */
@@ -148,7 +148,7 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
/* ----------------- Frimware Related MACRO ----------------- */
#define RTMP_WRITE_FIRMWARE(_pAd, _pFwImage, _FwLen)			\
	do{								\
		ULONG	_i, _firm;					\
		unsigned long	_i, _firm;					\
		RTMP_IO_WRITE32(_pAd, PBF_SYS_CTRL, 0x10000);		\
									\
		for(_i=0; _i<_FwLen; _i+=4)				\
@@ -172,7 +172,7 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
#define RTMP_STOP_DEQUEUE(pAd, QueIdx, irqFlags)		do{}while(0)

#define RTMP_HAS_ENOUGH_FREE_DESC(pAd, pTxBlk, freeNum, pPacket) \
		((freeNum) >= (ULONG)(pTxBlk->TotalFragNum + RTMP_GET_PACKET_FRAGMENTS(pPacket) + 3))	/* rough estimate we will use 3 more descriptor. */
		((freeNum) >= (unsigned long)(pTxBlk->TotalFragNum + RTMP_GET_PACKET_FRAGMENTS(pPacket) + 3))	/* rough estimate we will use 3 more descriptor. */
#define RTMP_RELEASE_DESC_RESOURCE(pAd, QueIdx)	\
		do{}while(0)

@@ -238,7 +238,7 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {

// remove Pair-wise key material from ASIC
#define RTMP_STA_ENTRY_KEY_DEL(pAd, BssIdx, Wcid)	\
	AsicRemovePairwiseKeyEntry(pAd, BssIdx, (UCHAR)Wcid);
	AsicRemovePairwiseKeyEntry(pAd, BssIdx, (u8)Wcid);

// add Client security information into ASIC WCID table and IVEIV table
#define RTMP_STA_SECURITY_INFO_ADD(pAd, apidx, KeyID, pEntry)		\
@@ -260,7 +260,7 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
// Insert the BA bitmap to ASIC for the Wcid entry
#define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID)	\
		do{					\
			UINT32	_Value = 0, _Offset;					\
			u32 _Value = 0, _Offset;					\
			_Offset = MAC_WCID_BASE + (_Aid) * HW_WCID_ENTRY_SIZE + 4;	\
			RTMP_IO_READ32((_pAd), _Offset, &_Value);\
			_Value |= (0x10000<<(_TID));	\
@@ -271,7 +271,7 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
//              bitmap field starts at 0x10000 in ASIC WCID table
#define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID)				\
		do{								\
			UINT32	_Value = 0, _Offset;				\
			u32 _Value = 0, _Offset;				\
			_Offset = MAC_WCID_BASE + (_Wcid) * HW_WCID_ENTRY_SIZE + 4;	\
			RTMP_IO_READ32((_pAd), _Offset, &_Value);			\
			_Value &= (~(0x10000 << (_TID)));				\
+57 −57
Original line number Diff line number Diff line
@@ -62,26 +62,26 @@
#define RT2870_RXDMALEN_FIELD_SIZE	4

typedef struct PACKED _RXINFO_STRUC {
	UINT32 BA:1;
	UINT32 DATA:1;
	UINT32 NULLDATA:1;
	UINT32 FRAG:1;
	UINT32 U2M:1;		/* 1: this RX frame is unicast to me */
	UINT32 Mcast:1;		/* 1: this is a multicast frame */
	UINT32 Bcast:1;		/* 1: this is a broadcast frame */
	UINT32 MyBss:1;		/* 1: this frame belongs to the same BSSID */
	UINT32 Crc:1;		/* 1: CRC error */
	UINT32 CipherErr:2;	/* 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid */
	UINT32 AMSDU:1;		/* rx with 802.3 header, not 802.11 header. */
	UINT32 HTC:1;
	UINT32 RSSI:1;
	UINT32 L2PAD:1;
	UINT32 AMPDU:1;		/* To be moved */
	UINT32 Decrypted:1;
	UINT32 PlcpRssil:1;
	UINT32 CipherAlg:1;
	UINT32 LastAMSDU:1;
	UINT32 PlcpSignal:12;
	u32 BA:1;
	u32 DATA:1;
	u32 NULLDATA:1;
	u32 FRAG:1;
	u32 U2M:1;		/* 1: this RX frame is unicast to me */
	u32 Mcast:1;		/* 1: this is a multicast frame */
	u32 Bcast:1;		/* 1: this is a broadcast frame */
	u32 MyBss:1;		/* 1: this frame belongs to the same BSSID */
	u32 Crc:1;		/* 1: CRC error */
	u32 CipherErr:2;	/* 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid */
	u32 AMSDU:1;		/* rx with 802.3 header, not 802.11 header. */
	u32 HTC:1;
	u32 RSSI:1;
	u32 L2PAD:1;
	u32 AMPDU:1;		/* To be moved */
	u32 Decrypted:1;
	u32 PlcpRssil:1;
	u32 CipherAlg:1;
	u32 LastAMSDU:1;
	u32 PlcpSignal:12;
} RXINFO_STRUC, *PRXINFO_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;

/* */
@@ -91,14 +91,14 @@ typedef struct PACKED _RXINFO_STRUC {

typedef struct _TXINFO_STRUC {
	/* Word 0 */
	UINT32 USBDMATxPktLen:16;	/*used ONLY in USB bulk Aggregation,  Total byte counts of all sub-frame. */
	UINT32 rsv:8;
	UINT32 WIV:1;		/* Wireless Info Valid. 1 if Driver already fill WI,  o if DMA needs to copy WI to correctposition */
	UINT32 QSEL:2;		/* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
	UINT32 SwUseLastRound:1;	/* Software use. */
	UINT32 rsv2:2;		/* Software use. */
	UINT32 USBDMANextVLD:1;	/*used ONLY in USB bulk Aggregation, NextValid */
	UINT32 USBDMATxburst:1;	/*used ONLY in USB bulk Aggre. Force USB DMA transmit frame from current selected endpoint */
	u32 USBDMATxPktLen:16;	/*used ONLY in USB bulk Aggregation,  Total byte counts of all sub-frame. */
	u32 rsv:8;
	u32 WIV:1;		/* Wireless Info Valid. 1 if Driver already fill WI,  o if DMA needs to copy WI to correctposition */
	u32 QSEL:2;		/* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
	u32 SwUseLastRound:1;	/* Software use. */
	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;

/* */
@@ -106,8 +106,8 @@ typedef struct _TXINFO_STRUC {
/* */
typedef struct _MGMT_STRUC {
	BOOLEAN Valid;
	PUCHAR pBuffer;
	ULONG Length;
	u8 *pBuffer;
	unsigned long Length;
} MGMT_STRUC, *PMGMT_STRUC;

/*////////////////////////////////////////////////////////////////////////// */
@@ -115,69 +115,69 @@ typedef struct _MGMT_STRUC {
/*////////////////////////////////////////////////////////////////////////// */
typedef struct __TX_BUFFER {
	union {
		UCHAR WirelessPacket[TX_BUFFER_NORMSIZE];
		u8 WirelessPacket[TX_BUFFER_NORMSIZE];
		HEADER_802_11 NullFrame;
		PSPOLL_FRAME PsPollPacket;
		RTS_FRAME RTSFrame;
	} field;
	UCHAR Aggregation[4];	/*Buffer for save Aggregation size. */
	u8 Aggregation[4];	/*Buffer for save Aggregation size. */
} TX_BUFFER, *PTX_BUFFER;

typedef struct __HTTX_BUFFER {
	union {
		UCHAR WirelessPacket[MAX_TXBULK_SIZE];
		u8 WirelessPacket[MAX_TXBULK_SIZE];
		HEADER_802_11 NullFrame;
		PSPOLL_FRAME PsPollPacket;
		RTS_FRAME RTSFrame;
	} field;
	UCHAR Aggregation[4];	/*Buffer for save Aggregation size. */
	u8 Aggregation[4];	/*Buffer for save Aggregation size. */
} HTTX_BUFFER, *PHTTX_BUFFER;

/* used to track driver-generated write irps */
typedef struct _TX_CONTEXT {
	PVOID pAd;		/*Initialized in MiniportInitialize */
	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 */
	ULONG BulkOutSize;
	UCHAR BulkOutPipeId;
	UCHAR SelfIdx;
	unsigned long BulkOutSize;
	u8 BulkOutPipeId;
	u8 SelfIdx;
	BOOLEAN InUse;
	BOOLEAN bWaitingBulkOut;	/* at least one packet is in this TxContext, ready for making IRP anytime. */
	BOOLEAN bFullForBulkOut;	/* all tx buffer are full , so waiting for tx bulkout. */
	BOOLEAN IRPPending;
	BOOLEAN LastOne;
	BOOLEAN bAggregatible;
	UCHAR Header_802_3[LENGTH_802_3];
	UCHAR Rsv[2];
	ULONG DataOffset;
	UINT TxRate;
	u8 Header_802_3[LENGTH_802_3];
	u8 Rsv[2];
	unsigned long DataOffset;
	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 {
	PVOID pAd;		/*Initialized in MiniportInitialize */
	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 */
	ULONG BulkOutSize;	/* Indicate the total bulk-out size in bytes in one bulk-transmission */
	UCHAR BulkOutPipeId;
	unsigned long BulkOutSize;	/* Indicate the total bulk-out size in bytes in one bulk-transmission */
	u8 BulkOutPipeId;
	BOOLEAN IRPPending;
	BOOLEAN LastOne;
	BOOLEAN bCurWriting;
	BOOLEAN bRingEmpty;
	BOOLEAN bCopySavePad;
	UCHAR SavedPad[8];
	UCHAR Header_802_3[LENGTH_802_3];
	ULONG CurWritePosition;	/* Indicate the buffer offset which packet will be inserted start from. */
	ULONG CurWriteRealPos;	/* Indicate the buffer offset which packet now are writing to. */
	ULONG NextBulkOutPosition;	/* Indicate the buffer start offset of a bulk-transmission */
	ULONG ENextBulkOutPosition;	/* Indicate the buffer end offset of a bulk-transmission */
	UINT TxRate;
	u8 SavedPad[8];
	u8 Header_802_3[LENGTH_802_3];
	unsigned long CurWritePosition;	/* Indicate the buffer offset which packet will be inserted start from. */
	unsigned long CurWriteRealPos;	/* Indicate the buffer offset which packet now are writing to. */
	unsigned long NextBulkOutPosition;	/* Indicate the buffer start offset of a bulk-transmission */
	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;

@@ -186,12 +186,12 @@ typedef struct _HT_TX_CONTEXT {
/* receive data to the protocol. */
/* */
typedef struct _RX_CONTEXT {
	PUCHAR TransferBuffer;
	PVOID pAd;
	u8 *TransferBuffer;
	void *pAd;
	PIRP pIrp;		/*used to cancel pending bulk in. */
	PURB pUrb;
	/*These 2 Boolean shouldn't both be 1 at the same time. */
	ULONG BulkInOffset;	/* number of packets waiting for reordering . */
	unsigned long BulkInOffset;	/* number of packets waiting for reordering . */
/*      BOOLEAN                         ReorderInUse;   // At least one packet in this buffer are in reordering buffer and wait for receive indication */
	BOOLEAN bRxHandling;	/* Notify this packet is being process now. */
	BOOLEAN InUse;		/* USB Hardware Occupied. Wait for USB HW to put packet. */
@@ -332,9 +332,9 @@ typedef struct _RX_CONTEXT {
			MlmeSetPsmBit(_pAd, _val);\
		else \
		{ \
			USHORT _psm_val; \
			u16 _psm_val; \
			_psm_val = _val; \
			RTUSBEnqueueInternalCmd(_pAd, CMDTHREAD_SET_PSM_BIT, &(_psm_val), sizeof(USHORT)); \
			RTUSBEnqueueInternalCmd(_pAd, CMDTHREAD_SET_PSM_BIT, &(_psm_val), sizeof(u16)); \
		}\
	}

+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
#ifdef RT30xx

extern REG_PAIR RT30xx_RFRegTable[];
extern UCHAR NUM_RF_REG_PARMS;
extern u8 NUM_RF_REG_PARMS;

#endif /* RT30xx // */

+490 −490

File changed.

Preview size limit exceeded, changes collapsed.

Loading