⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtmp.h

📁 ralink 2870 usb无线网卡 最新驱动
💻 H
📖 第 1 页 / 共 5 页
字号:
/* ************************************************************************* * Ralink Tech Inc. * 5F., No.36, Taiyuan St., Jhubei City, * Hsinchu County 302, * Taiwan, R.O.C. * * (c) Copyright 2002-2007, Ralink Technology, Inc. * * This program is free software; you can redistribute it and/or modify  *  * it under the terms of the GNU General Public License as published by  *  * the Free Software Foundation; either version 2 of the License, or     *  * (at your option) any later version.                                   *  *                                                                       *  * This program is distributed in the hope that it will be useful,       *  * but WITHOUT ANY WARRANTY; without even the implied warranty of        *  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *  * GNU General Public License for more details.                          *  *                                                                       *  * You should have received a copy of the GNU General Public License     *  * along with this program; if not, write to the                         *  * Free Software Foundation, Inc.,                                       *  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *  *                                                                       *  *************************************************************************    Module Name:    rtmp.h    Abstract:    Miniport generic portion header file    Revision History:    Who         When          What    --------    ----------    ----------------------------------------------    Paul Lin    2002-08-01    created    James Tan   2002-09-06    modified (Revise NTCRegTable)    John Chang  2004-09-06    modified for RT2600     */#ifndef __RTMP_H__#define __RTMP_H__#include "link_list.h"#include "spectrum_def.h"#include "rtmp_dot11.h"#ifdef MLME_EX#include "mlme_ex_def.h"#endif // MLME_EX //#ifdef CONFIG_STA_SUPPORT#endif // CONFIG_STA_SUPPORT //#undef AP_WSC_INCLUDED#undef STA_WSC_INCLUDED#undef WSC_INCLUDED#ifdef CONFIG_STA_SUPPORT#endif // CONFIG_STA_SUPPORT //#if defined(AP_WSC_INCLUDED) || defined(STA_WSC_INCLUDED)#define WSC_INCLUDED#endif#include "rtmp_chip.h"typedef struct _RTMP_ADAPTER		RTMP_ADAPTER;typedef struct _RTMP_ADAPTER		*PRTMP_ADAPTER;typedef struct _RTMP_CHIP_OP_ RTMP_CHIP_OP;//#define DBG		1//#define DBG_DIAGNOSE		1//+++Add by shiang for merge MiniportMMRequest() and MiniportDataMMRequest() into one function#define MAX_DATAMM_RETRY	3#define MGMT_USE_QUEUE_FLAG	0x80//---Add by shiang for merge MiniportMMRequest() and MiniportDataMMRequest() into one function#define	MAXSEQ		(0xFFF)#if defined(CONFIG_AP_SUPPORT) && defined(CONFIG_STA_SUPPORT)#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd)	if(_pAd->OpMode == OPMODE_AP)#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd)	if(_pAd->OpMode == OPMODE_STA)#else#define IF_DEV_CONFIG_OPMODE_ON_AP(_pAd)#define IF_DEV_CONFIG_OPMODE_ON_STA(_pAd)#endifextern  unsigned char   SNAP_AIRONET[];extern  unsigned char   CISCO_OUI[];extern  UCHAR	BaSizeArray[4];extern UCHAR BROADCAST_ADDR[MAC_ADDR_LEN];extern UCHAR ZERO_MAC_ADDR[MAC_ADDR_LEN];extern ULONG BIT32[32];extern UCHAR BIT8[8];extern char* CipherName[];extern char* MCSToMbps[];extern UCHAR	 RxwiMCSToOfdmRate[12];extern UCHAR SNAP_802_1H[6];extern UCHAR SNAP_BRIDGE_TUNNEL[6];extern UCHAR SNAP_AIRONET[8];extern UCHAR CKIP_LLC_SNAP[8];extern UCHAR EAPOL_LLC_SNAP[8];extern UCHAR EAPOL[2];extern UCHAR IPX[2];extern UCHAR APPLE_TALK[2];extern UCHAR RateIdToPlcpSignal[12]; // see IEEE802.11a-1999 p.14extern UCHAR	 OfdmRateToRxwiMCS[];extern UCHAR OfdmSignalToRateId[16] ;extern UCHAR default_cwmin[4];extern UCHAR default_cwmax[4];extern UCHAR default_sta_aifsn[4];extern UCHAR MapUserPriorityToAccessCategory[8];extern USHORT RateUpPER[];extern USHORT RateDownPER[];extern UCHAR  Phy11BNextRateDownward[];extern UCHAR  Phy11BNextRateUpward[];extern UCHAR  Phy11BGNextRateDownward[];extern UCHAR  Phy11BGNextRateUpward[];extern UCHAR  Phy11ANextRateDownward[];extern UCHAR  Phy11ANextRateUpward[];extern CHAR   RssiSafeLevelForTxRate[];extern UCHAR  RateIdToMbps[];extern USHORT RateIdTo500Kbps[];extern UCHAR  CipherSuiteWpaNoneTkip[];extern UCHAR  CipherSuiteWpaNoneTkipLen;extern UCHAR  CipherSuiteWpaNoneAes[];extern UCHAR  CipherSuiteWpaNoneAesLen;extern UCHAR  SsidIe;extern UCHAR  SupRateIe;extern UCHAR  ExtRateIe;#ifdef DOT11_N_SUPPORTextern UCHAR  HtCapIe;extern UCHAR  AddHtInfoIe;extern UCHAR  NewExtChanIe;#ifdef DOT11N_DRAFT3extern UCHAR  ExtHtCapIe;#endif // DOT11N_DRAFT3 //#endif // DOT11_N_SUPPORT //extern UCHAR  ErpIe;extern UCHAR  DsIe;extern UCHAR  TimIe;extern UCHAR  WpaIe;extern UCHAR  Wpa2Ie;extern UCHAR  IbssIe;extern UCHAR  Ccx2Ie;extern UCHAR  WapiIe;extern UCHAR  WPA_OUI[];extern UCHAR  RSN_OUI[];extern UCHAR  WAPI_OUI[];extern UCHAR  WME_INFO_ELEM[];extern UCHAR  WME_PARM_ELEM[];extern UCHAR  Ccx2QosInfo[];extern UCHAR  Ccx2IeInfo[];extern UCHAR  RALINK_OUI[];extern UCHAR  PowerConstraintIE[];extern UCHAR  RateSwitchTable[];extern UCHAR  RateSwitchTable11B[];extern UCHAR  RateSwitchTable11G[];extern UCHAR  RateSwitchTable11BG[];#ifdef DOT11_N_SUPPORTextern UCHAR  RateSwitchTable11BGN1S[];extern UCHAR  RateSwitchTable11BGN2S[];extern UCHAR  RateSwitchTable11BGN2SForABand[];extern UCHAR  RateSwitchTable11N1S[];extern UCHAR  RateSwitchTable11N2S[];extern UCHAR  RateSwitchTable11N2SForABand[];#ifdef CONFIG_STA_SUPPORTextern UCHAR  PRE_N_HT_OUI[];#endif // CONFIG_STA_SUPPORT //#endif // DOT11_N_SUPPORT //#ifdef RALINK_ATEtypedef	struct _ATE_INFO {	UCHAR	Mode;	CHAR	TxPower0;	CHAR	TxPower1;	CHAR    TxAntennaSel;	CHAR    RxAntennaSel;	TXWI_STRUC  TxWI; 	  // TXWI	USHORT	QID;	UCHAR	Addr1[MAC_ADDR_LEN];	UCHAR	Addr2[MAC_ADDR_LEN];	UCHAR	Addr3[MAC_ADDR_LEN];	UCHAR	Channel;	UINT32	TxLength;	UINT32	TxCount;	UINT32	TxDoneCount; // Tx DMA Done	UINT32	RFFreqOffset;	BOOLEAN	bRxFER;		// Show Rx Frame Error Rate	BOOLEAN	bQATxStart; // Have compiled QA in and use it to ATE tx.	BOOLEAN	bQARxStart;	// Have compiled QA in and use it to ATE rx.	UINT32	RxTotalCnt;	UINT32	RxCntPerSec;	CHAR	LastSNR0;             // last received SNR	CHAR    LastSNR1;             // last received SNR for 2nd  antenna	CHAR    LastRssi0;            // last received RSSI	CHAR    LastRssi1;            // last received RSSI for 2nd  antenna	CHAR    LastRssi2;            // last received RSSI for 3rd  antenna	CHAR    AvgRssi0;             // last 8 frames' average RSSI	CHAR    AvgRssi1;             // last 8 frames' average RSSI	CHAR    AvgRssi2;             // last 8 frames' average RSSI	SHORT   AvgRssi0X8;           // sum of last 8 frames' RSSI	SHORT   AvgRssi1X8;           // sum of last 8 frames' RSSI	SHORT   AvgRssi2X8;           // sum of last 8 frames' RSSI	UINT32	NumOfAvgRssiSample;#ifdef RTMP_MAC_USB#endif // RTMP_MAC_USB //#ifdef RALINK_28xx_QA	// Tx frame#ifdef RTMP_MAC_USB	TXINFO_STRUC		TxInfo; // TxInfo#endif // RTMP_MAC_USB //	USHORT		HLen; // Header Length	USHORT		PLen; // Pattern Length	UCHAR 		Header[32]; // Header buffer	UCHAR		Pattern[32]; // Pattern buffer	USHORT		DLen; // Data Length	USHORT		seq;	UINT32		CID;	RTMP_OS_PID	AtePid;	// counters	UINT32		U2M;	UINT32		OtherData;	UINT32		Beacon;	UINT32		OtherCount;	UINT32		TxAc0;	UINT32		TxAc1;	UINT32		TxAc2;	UINT32		TxAc3;	UINT32		TxHCCA;	UINT32		TxMgmt;	UINT32		RSSI0;	UINT32		RSSI1;	UINT32		RSSI2;	UINT32		SNR0;	UINT32		SNR1;	// TxStatus : 0 --> task is idle, 1 --> task is running	UCHAR		TxStatus;#endif // RALINK_28xx_QA //}	ATE_INFO, *PATE_INFO;#ifdef RALINK_28xx_QAstruct ate_racfghdr { 	UINT32		magic_no;	USHORT		command_type;	USHORT		command_id;	USHORT		length;	USHORT		sequence;	USHORT		status;	UCHAR		data[2046];}  __attribute__((packed));#endif // RALINK_28xx_QA //#endif // RALINK_ATE //typedef struct 	_RSSI_SAMPLE {	CHAR			LastRssi0;             // last received RSSI	CHAR			LastRssi1;             // last received RSSI	CHAR			LastRssi2;             // last received RSSI	CHAR			AvgRssi0;	CHAR			AvgRssi1;	CHAR			AvgRssi2;	SHORT			AvgRssi0X8;	SHORT			AvgRssi1X8;	SHORT			AvgRssi2X8;} RSSI_SAMPLE;////  Queue structure and macros//typedef struct  _QUEUE_ENTRY    {	struct _QUEUE_ENTRY     *Next;}   QUEUE_ENTRY, *PQUEUE_ENTRY;// Queue structuretypedef struct  _QUEUE_HEADER   {	PQUEUE_ENTRY    Head;	PQUEUE_ENTRY    Tail;	ULONG           Number;}   QUEUE_HEADER, *PQUEUE_HEADER;#define InitializeQueueHeader(QueueHeader)              \{                                                       \	(QueueHeader)->Head = (QueueHeader)->Tail = NULL;   \	(QueueHeader)->Number = 0;                          \}#define RemoveHeadQueue(QueueHeader)                \(QueueHeader)->Head;                                \{                                                   \	PQUEUE_ENTRY pNext;                             \	if ((QueueHeader)->Head != NULL)				\	{												\		pNext = (QueueHeader)->Head->Next;          \		(QueueHeader)->Head->Next = NULL;		\		(QueueHeader)->Head = pNext;                \		if (pNext == NULL)                          \			(QueueHeader)->Tail = NULL;             \		(QueueHeader)->Number--;                    \	}												\}#define InsertHeadQueue(QueueHeader, QueueEntry)            \{                                                           \		((PQUEUE_ENTRY)QueueEntry)->Next = (QueueHeader)->Head; \		(QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry);       \		if ((QueueHeader)->Tail == NULL)                        \			(QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry);   \		(QueueHeader)->Number++;                                \}#define InsertTailQueue(QueueHeader, QueueEntry)				\{                                                               \	((PQUEUE_ENTRY)QueueEntry)->Next = NULL;                    \	if ((QueueHeader)->Tail)                                    \		(QueueHeader)->Tail->Next = (PQUEUE_ENTRY)(QueueEntry); \	else                                                        \		(QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry);       \	(QueueHeader)->Tail = (PQUEUE_ENTRY)(QueueEntry);           \	(QueueHeader)->Number++;                                    \}#define InsertTailQueueAc(pAd, pEntry, QueueHeader, QueueEntry)			\{																		\	((PQUEUE_ENTRY)QueueEntry)->Next = NULL;							\	if ((QueueHeader)->Tail)											\		(QueueHeader)->Tail->Next = (PQUEUE_ENTRY)(QueueEntry);			\	else																\		(QueueHeader)->Head = (PQUEUE_ENTRY)(QueueEntry);				\

⌨️ 快捷键说明

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