rt2570sw.h

来自「AMLOGIC DPF source code」· C头文件 代码 · 共 1,922 行 · 第 1/5 页

H
1,922
字号
	FRAME_CONTROL	Frame;				// Frame control structure	USHORT			Duration;			// Duration value	MACADDR			Addr1;				// Address 1 field	MACADDR			Addr2;				// Address 2 field}	CONTROL_HEADER, *PCONTROL_HEADER;typedef	struct	_PS_POLL_BUFFER	{    TXD_STRUC		TxDesc;	PSPOLL_FRAME	PsPollPacket;}	PS_POLL_BUFFER, *PPS_POLL_BUFFER;//// P802.11 header format//typedef	struct	_HEADER_802_11	{	CONTROL_HEADER	Controlhead;	MACADDR			Addr3;				// Address 3 field	USHORT			Frag:4;				// Fragment number	USHORT			Sequence:12;		// Sequence number}	HEADER_802_11, *PHEADER_802_11;typedef	struct	_NULL_FRAME_BUFFER	{    TXD_STRUC		TxDesc;	HEADER_802_11	NullFrame;}	NULL_FRAME_BUFFER, *PNULL_FRAME_BUFFER;typedef	struct	_WPAPSK_BUFFER	{    TXD_STRUC		TxDesc;	UCHAR	WpaPskFrame[512];}	WPAPSK_BUFFER, *PWPAPSK_BUFFER;typedef	struct	_STUFF_BUFFER	{	NULL_FRAME_BUFFER	NullFrameBuffer;    UCHAR	StuffBuffer[512];}	STUFF_BUFFER, *PSTUFF_BUFFER;//// Receive Tuple Cache Format//typedef	struct	_TUPLE_CACHE	{	BOOLEAN			Valid;	MACADDR			MAC;	USHORT			Sequence; 	USHORT			Frag;}	TUPLE_CACHE, *PTUPLE_CACHE;//// Fragment Frame structure//typedef	struct	_FRAGMENT_FRAME	{	UCHAR		Header802_3[14];	UCHAR		Header_LLC[8];	UCHAR		Buffer[MAX_FRAME_SIZE];	ULONG		RxSize;	USHORT		Sequence;	USHORT		LastFrag;	ULONG		Flags;			// Some extra frame information. bit 0: LLC presented}	FRAGMENT_FRAME, *PFRAGMENT_FRAME;//// Packet information for NdisQueryPacket//typedef	struct	_PACKET_INFO	{	UINT			PhysicalBufferCount;	// Physical breaks of buffer descripor chained	UINT			BufferCount ;			// Number of Buffer descriptor chained	UINT			TotalPacketLength ;  	// Self explained	//PNDIS_BUFFER	pFirstBuffer;			// Pointer to first buffer descriptor}	PACKET_INFO, *PPACKET_INFO;//// Tkip Key structure which RC4 key & MIC calculation//typedef	struct	_TKIP_KEY_INFO	{	UINT		nBytesInM;	// # bytes in M for MICKEY	ULONG		IV16;	ULONG		IV32;		ULONG		K0;			// for MICKEY Low	ULONG		K1;			// for MICKEY Hig	ULONG		L;			// Current state for MICKEY	ULONG		R;			// Current state for MICKEY	ULONG		M;			// Message accumulator for MICKEY	UCHAR		RC4KEY[16];	UCHAR		MIC[8];}	TKIP_KEY_INFO, *PTKIP_KEY_INFO;//// Private / Misc data, counters for driver internal use//typedef	struct	__PRIVATE_STRUC	{	ULONG		SystemResetCnt;			// System reset counter	ULONG		ResetCountDown;			// Count down before issue reset, patch for RT2430//	ULONG		CCAErrCnt;				// CCA error count, for debug purpose, might move to global counter	ULONG		PhyRxErrCnt;			// PHY Rx error count, for debug purpose, might move to global counter	ULONG		PhyTxErrCnt;			// PHY Tx error count, for debug purpose, might move to global counter	// Variables for WEP encryption / decryption in rtmp_wep.c	ULONG			FCSCRC32;	ULONG			RxSetCnt;	ULONG			DecryptCnt;	ARCFOURCONTEXT	WEPCONTEXT;	// Tkip stuff	TKIP_KEY_INFO	Tx;	TKIP_KEY_INFO	Rx;}	PRIVATE_STRUC, *PPRIVATE_STRUC;///////////////////Vendor Commands/////////////////#define COMMAND_QUEUE_SIZE  11typedef	struct _CmdQElmt	{	UINT				command;	PVOID				buffer;	ULONG				bufferlength;	BOOLEAN				CmdFromNdis;	BOOLEAN				SetOperation;	BOOLEAN				InUse;//blue	struct _CmdQElmt	*next;}	CmdQElmt, *PCmdQElmt;typedef	struct	_CmdQ	{	UINT		size;	CmdQElmt	*head;	CmdQElmt	*tail;}	CmdQ, *PCmdQ;typedef enum _BULK_OUT_TYPE {    DATA,    MLME,	BEACON,	PS_POLL,    ALL} BULK_OUT_TYPE;#if 0typedef	struct _BULK_OUT_QUEUE_ELEMENT	{	BULK_OUT_TYPE			BulkOutType;	PVOID				buffer;	struct _BULK_OUT_QUEUE_ELEMENT	*next;}	BULK_OUT_QUEUE_ELEMENT, *PBULK_OUT_QUEUE_ELEMENT;typedef	struct	_BULK_OUT_QUEUE	{	UINT		size;	BULK_OUT_QUEUE_ELEMENT	*head;	BULK_OUT_QUEUE_ELEMENT	*tail;}	BULK_OUT_QUEUE, *PBULK_OUT_QUEUE;typedef	struct _BULK_OUT_QUEUE_ELEMENT	{	PVOID				buffer;	struct _BULK_OUT_QUEUE_ELEMENT	*next;}	BULK_OUT_QUEUE_ELEMENT, *PBULK_OUT_QUEUE_ELEMENT;typedef	struct	_BULK_OUT_QUEUE	{	UINT		size;	BULK_OUT_QUEUE_ELEMENT	*head;	BULK_OUT_QUEUE_ELEMENT	*tail;}	BULK_OUT_QUEUE, *PBULK_OUT_QUEUE;#endif//bluetypedef	struct	_DATA_BULKOUT_QUEUE	{	UINT		size;	struct sk_buff 	*head;	struct sk_buff	*tail;}	DATA_BULKOUT_QUEUE, *PDATA_BULKOUT_QUEUE;typedef	struct	_MLME_BULKOUT_QUEUE	{	UINT		size;	PMGMT_STRUC	head;	PMGMT_STRUC	tail;}	MLME_BULKOUT_QUEUE, *PMLME_BULKOUT_QUEUE;#if 0typedef enum bufferStates {    FREE,    USED,	COMPLETED,    PENDING} BufferState;#endif// used to track driver-generated write irps typedef struct _TX_CONTEXT{	PVOID				pAdapter;//Initialized in MiniportInitialize	//    struct sk_buff *skb;	PURB				pUrb;//Initialized in MiniportInitialize	PIRP	            pIrp;//used to cancel pending bulk out.//Initialized in MiniportInitialize	PTX_BUFFER          TransferBuffer;//Initialized in MiniportInitialize	ULONG			    BulkOutSize;	BOOLEAN				InUse;	BOOLEAN				IRPPending;	BOOLEAN				LastOne;}TX_CONTEXT, *PTX_CONTEXT, **PPTX_CONTEXT;// used to track driver-generated write irps typedef struct _MLME_CONTEXT{    PVOID				pAdapter;//Initialized in MiniportInitialize    PMGMT_STRUC			pMgmt;    PURB				pUrb;//Initialized in MiniportInitialize    PIRP	            pIrp;//used to cancel pending bulk out.//Initialized in MiniportInitialize    PTX_BUFFER          TransferBuffer;//Initialized in MiniportInitialize//    UINT	            TransferBufferLength;//TransferBufferLength//    CONTEXT_TYPE    Type;//    BufferState	            fInUse; // Declared as ULONG so can use with InterlockedExchange()	BOOLEAN				InUse;	BOOLEAN				IRPPending;	BOOLEAN				LastOne;	UCHAR				Index;}MLME_CONTEXT, *PMLME_CONTEXT, **PPMLME_CONTEXT;typedef struct _NULL_CONTEXT{    PVOID				pAdapter;//Initialized in MiniportInitialize    PURB				pUrb;//Initialized in MiniportInitialize    PIRP	            pIrp;//used to cancel pending bulk out.    PNULL_FRAME_BUFFER          TransferBuffer;//Initialized in MiniportInitialize//    UINT	            TransferBufferLength;//TransferBufferLength//    BufferState	            fInUse; // Declared as ULONG so can use with InterlockedExchange()	BOOLEAN				InUse;	BOOLEAN				IRPPending;}NULL_CONTEXT, *PNULL_CONTEXT;typedef struct _WPAPSK_CONTEXT{    PVOID				pAdapter;//Initialized in MiniportInitialize    PURB				pUrb;//Initialized in MiniportInitialize    PIRP	            pIrp;//used to cancel pending bulk out.    PWPAPSK_BUFFER          TransferBuffer;//Initialized in MiniportInitialize//    UINT	            TransferBufferLength;//TransferBufferLength//    BufferState	            fInUse; // Declared as ULONG so can use with InterlockedExchange()	BOOLEAN				InUse;	BOOLEAN				Ready;	BOOLEAN				IRPPending;}WPAPSK_CONTEXT, *PWPAPSK_CONTEXT;typedef struct _PS_POLL_CONTEXT{    PVOID				pAdapter;//Initialized in MiniportInitialize    PURB				pUrb;//Initialized in MiniportInitialize    PIRP	            pIrp;//used to cancel pending bulk out.    PPS_POLL_BUFFER          TransferBuffer;//Initialized in MiniportInitialize//    UINT	            TransferBufferLength;//TransferBufferLength//    BufferState	            fInUse; // Declared as ULONG so can use with InterlockedExchange()	BOOLEAN				InUse;	BOOLEAN				Ready;	BOOLEAN				IRPPending;}PS_POLL_CONTEXT, *PPS_POLL_CONTEXT;typedef struct _STUFF_CONTEXT{    PVOID				pAdapter;//Initialized in MiniportInitialize    PURB				pUrb;//Initialized in MiniportInitialize    PIRP	            pIrp;//used to cancel pending bulk out.    PSTUFF_BUFFER          TransferBuffer;//Initialized in MiniportInitialize//    UINT	            TransferBufferLength;//TransferBufferLength//    BufferState	            fInUse; // Declared as ULONG so can use with InterlockedExchange()	BOOLEAN				InUse;	BOOLEAN				Ready;	BOOLEAN				IRPPending;}STUFF_CONTEXT, *PSTUFF_CONTEXT;//// Structure to keep track of receive packets and buffers to indicate// receive data to the protocol.//#define   IRPLOCK_COMPLETED     0#define   IRPLOCK_CANCELABLE    1#define   IRPLOCK_CANCE_START   2#define   IRPLOCK_CANCE_COMPLETE    3typedef struct _RX_CONTEXT{	PVOID				pAdapter;	PIRP				pIrp; //used to cancel pending bulk in.	PURB				pUrb;	BOOLEAN				InUse;	atomic_t			IrpLock;	PUCHAR				TransferBuffer; }RX_CONTEXT, *PRX_CONTEXT;#if 0// NDIStypedef struct _RX_CONTEXT{    PUCHAR				TransferBuffer;     PVOID				pAdapter;    PIRP				pIrp;//used to cancel pending bulk in.    PURB				pUrb;	BOOLEAN				InUse;	IRPLOCK				IrpLock;}	RX_CONTEXT, *PRX_CONTEXT;#endiftypedef struct _VENDOR_REQUEST_URB{    PURB				pUrb;//    BOOLEAN	            InUse;    PIRP				pIrp;//used to cancel pending IRP	BOOLEAN				IRPPending;}VENDOR_REQUEST_URB;typedef struct _TX_RATE_SWITCHING_STRUC{	ULONG			LastStableTime;	UCHAR			DownRate1Ratio;	UCHAR			DownRate2Ratio;	UCHAR			UpRateRatio;	UCHAR			StableTimeRequired;	UCHAR			PenaltyPeriod;	UCHAR			DownWaitingTime;}TX_RATE_SWITCHING_STRUC, *PTX_RATE_SWITCHING_STRUC;typedef struct _TX_RATE_SWITCHING_COUNTERS{	USHORT			NoRetryOKCnt;	USHORT			OneRetryOKCnt;	USHORT			MRetryOKCnt;	USHORT			FailCnt;}TX_RATE_SWITCHING_COUNTERS, *PTX_RATE_SWITCHING_COUNTERS;typedef struct _BBP_TUNING_PARAMETERS_STRUC{	UCHAR			BBPTuningThreshold;	UCHAR			R24LowerValue;	UCHAR			R24HigherValue;	UCHAR			R25LowerValue;	UCHAR			R25HigherValue;	UCHAR			R61LowerValue;	UCHAR			R61HigherValue;	UCHAR			BBPR17LowSensitivity;	UCHAR			BBPR17MidSensitivity;	UCHAR			RSSIToDbmOffset;	BOOLEAN			LargeCurrentRSSI;}BBP_TUNING_PARAMETERS_STRUC, *PBBP_TUNING_PARAMETERS_STRUC;#define	IEEE80211_NWID_LEN			32#define UNLINK_TIMEOUT_MS		3////  The miniport adapter structure//typedef struct _RT2570_ADAPTER{	int  nicknamelen;	char nickn[IEEE80211_NWID_LEN+1]; // nickname, only used in the iwconfig i/f 	//struct tasklet_struct	rx_bh;			struct usb_device *usb;	//KERNEL266	struct usb_config_descriptor *config;	//struct usb_host_config *config;	devctrlrequest *devreq;#ifdef AVOS	/* The device we're working with	 * It's important to note:	 *    (o) you must hold dev_semaphore to change pusb_dev	 */	OS_EVENT           *usbdev_semaphore;    /* protect  usb */	// Thread	OS_EVENT           *mlme_semaphore;	     /* to sleep thread on   */	OS_EVENT           *RTUSBCmd_semaphore;	 /* to sleep thread on   */    //struct completion	notify;		/* thread begin/end */    INT16U         MLMEThr_pid;    INT16U         RTUSBCmdThr_pid;#else  // AVOS	/* The device we're working with	 * It's important to note:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?