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

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

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
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -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__ */
+4 −4
Original line number Diff line number Diff line
@@ -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 {
+26 −26
Original line number Diff line number Diff line
@@ -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);									\
	}

+1 −1
Original line number Diff line number Diff line
@@ -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 // */
+14 −13
Original line number Diff line number Diff line
@@ -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 */
Loading