rtmp.h
来自「Ralink RT61 SoftAP Driver source code. 」· C头文件 代码 · 共 1,769 行 · 第 1/5 页
H
1,769 行
UCHAR R_Counter[LEN_KEY_DESC_REPLAY];
struct timer_list CounterMeasureTimer;
UCHAR CMTimerRunning;
ULONG aMICFailTime;
ULONG PrevaMICFailTime;
ULONG MICFailureCounter;
// for Group Rekey
RT_WPA_REKEY WPAREKEY;
ULONG REKEYCOUNTER;
struct timer_list REKEYTimer;
UCHAR REKEYTimerRunning;
USHORT RtsThreshold; // in units of BYTE
USHORT FragmentThreshold;
UINT AllowFragSize; // payload allowed for each fragment, precalculate can save time
BOOLEAN bFragmentZeroDisable; // Microsoft use 0 as disable
// MIB:ieee802dot11.dot11phy(4).dot11PhyTxPowerTable(3)
ULONG TxPowerPercentage; // 0~100%
// MIB:ieee802dot11.dot11phy(4).dot11PhyDSSSTable(5)
UCHAR Channel; // current (I)BSS channel used in the station
UCHAR CountryRegion; // Enum of country region, 0:FCC, 1:IC, 2:ETSI, 3:SPAIN, 4:France, 5:MKK, 6:MKK1, 7:Israel
UCHAR CountryRegionForABand;
// MIB:ieee802dot11.dot11phy(4).dot11SupportedDataRatesTxTable(9)
// MIB:ieee802dot11.dot11phy(4).dot11SupportedDataRatesRxTable(10)
UCHAR SupportedRates[MAX_LEN_OF_SUPPORTED_RATES]; // Supported rates
ULONG BasicRateBitMap;
UCHAR SupportedRatesLen;
UCHAR ExpectedACKRate[MAX_LEN_OF_SUPPORTED_RATES];
//
// other parameters not defined in standard MIB
//
UCHAR Bssid[MAC_ADDR_LEN];
UCHAR Broadcast[MAC_ADDR_LEN]; // FF:FF:FF:FF:FF:FF
UCHAR LastRssi; // last received BEACON's RSSI
USHORT AvgRssi;
USHORT AvgRssiX8;
UCHAR LastRssi2; // last received BEACON's RSSI
USHORT AvgRssi2;
USHORT AvgRssi2X8;
UCHAR MlmeRate;
UCHAR RtsRate;
// PHY specification
UCHAR PhyMode; // PHY_11A, PHY_11B, PHY_11BG_MIXED, PHY_ABG_MIXED
USHORT Dsifs; // in units of usec
USHORT TxPreamble; // Rt802_11PreambleLong, Rt802_11PreambleShort
USHORT TxPreambleInUsed; // Rt802_11PreambleLong, Rt802_11PreambleShort
UCHAR ReqVarIELen; // Length of next VIE include EID & Length
UCHAR ReqVarIEs[MAX_VIE_LEN];
UCHAR ResVarIELen; // Length of next VIE include EID & Length
UCHAR ResVarIEs[MAX_VIE_LEN];
ULONG EnableTurboRate; // 1: enable 72/100 Mbps whenever applicable, 0: never use 72/100 Mbps
ULONG IsolateInterStaTrafficBTNBSSID;
ULONG UseBGProtection; // 0:AUTO, 1-always ON,2-always OFF
ULONG DisableOLBCDetect; // 0: enable OLBC detect; 1 disable OLBC detect
ULONG UseShortSlotTime; // 0: disable, 1 - use short slot (9us)
UCHAR Key_Counter[32]; //jan for wpa
ULONG PMKCachePeriod;
BOOLEAN bAutoChannelAtBootup; // 0: disable, 1: enable
ULONG EepromVersion; // byte 0: version, byte 1: revision, byte 2~3: unused
// EDCA Qos
EDCA_PARM BssEdcaParm; // EDCA parameters to be announced to its local BSS
QOS_CAPABILITY_PARM APQosCapability; // QOS capability of the current associated AP
EDCA_PARM APEdcaParm; // EDCA parameters of the current associated AP
QBSS_LOAD_PARM APQbssLoad; // QBSS load of the current associated AP
BOOLEAN bAPSDCapable;
BOOLEAN bEnableTxBurst; // 0: disable, 1: enable TX PACKET BURST
BOOLEAN bAggregationCapable; // 1: enable TX aggregation when the peer supports it
// a bitmap of BOOLEAN flags. each bit represent an operation status of a particular
// BOOLEAN control, either ON or OFF. These flags should always be accessed via
// OPSTATUS_TEST_FLAG(), OPSTATUS_SET_FLAG(), OP_STATUS_CLEAR_FLAG() macros.
// see fOP_STATUS_xxx in RTMP_DEF.C for detail bit definition
ULONG OpStatusFlags;
UCHAR AckPolicy[4]; // ACK policy of the specified AC. see ACK_xxx
RADAR_DETECT_STRUCT RadarDetect;
BOOLEAN bCountryFlag;
CHAR CountryCode[3];
// temporary latch for Auto channel selection
UCHAR AutoChannel_MaxRssi; // max RSSI during Auto Channel Selection period
UCHAR AutoChannel_Channel; // channel number during Auto Channel Selection
ABGBAND_STATE BandState; // For setting BBP used on B/G or A mode.
ULONG NumOfAvgRssiSample;
BOOLEAN bRetryLimit;
ULONG TxQueueSize;
#ifdef RTL865X_SOC
BOOLEAN bEthWithVLANTag; // 0: disable, 1: enable
#endif
BOOLEAN bGetAPConfig;
} PORT_CONFIG, *PPORT_CONFIG;
typedef struct _RT_802_11_WDS_ENTRY {
struct net_device *dev;
#ifdef RTL865X_SOC
unsigned int mylinkid;
#endif
UCHAR Valid;
UCHAR WdsAddr[ETH_LENGTH_OF_ADDRESS];
UCHAR MaxSupportedRate;
UCHAR CurrTxRate;
USHORT TxQuality[MAX_LEN_OF_SUPPORTED_RATES];
USHORT OneSecTxOkCount;
USHORT OneSecTxRetryOkCount;
USHORT OneSecTxFailCount;
ULONG CurrTxRateStableTime; // # of second in current TX rate
ULONG WdsRcvBeaconTime;
UCHAR TxRateUpPenalty; // extra # of second penalty due to last unstable condition
BOOLEAN RestrictEntry;
} RT_802_11_WDS_ENTRY, *PRT_802_11_WDS_ENTRY;
typedef struct _RT_802_11_APCLI_ENTRY {
struct net_device *dev;
#ifdef RTL865X_SOC
unsigned int mylinkid;
#endif
ULONG Enable;
UCHAR Valid;
UCHAR SsidLen;
CHAR Ssid[MAX_LEN_OF_SSID];
UCHAR ApCliBssid[ETH_LENGTH_OF_ADDRESS];
UCHAR CfgSsidLen;
CHAR CfgSsid[MAX_LEN_OF_SSID];
UCHAR CfgApCliBssid[ETH_LENGTH_OF_ADDRESS];
UCHAR CurrentAddress[ETH_LENGTH_OF_ADDRESS];
UCHAR MaxSupportedRate;
UCHAR CurrTxRate;
USHORT TxQuality[MAX_LEN_OF_SUPPORTED_RATES];
USHORT OneSecTxOkCount;
USHORT OneSecTxRetryOkCount;
USHORT OneSecTxFailCount;
ULONG CurrTxRateStableTime; // # of second in current TX rate
ULONG ApCliRcvBeaconTime;
UCHAR TxRateUpPenalty; // extra # of second penalty due to last unstable condition
ULONG NumOfAvgRssiSample;
BOOLEAN RestrictEntry;
BOOLEAN InterfaceReady; // indicate the corresponding interface status. 0: interface down, 1:interface up.
ULONG CtrlCurrState;
ULONG SyncCurrState;
ULONG AuthCurrState;
ULONG AssocCurrState;
ULONG WpaPskCurrState;
USHORT AuthReqCnt;
USHORT AssocReqCnt;
// Add to support different cipher suite for WPA2/WPA mode
NDIS_802_11_ENCRYPTION_STATUS GroupCipher; // Multicast cipher suite
NDIS_802_11_ENCRYPTION_STATUS PairCipher; // Unicast cipher suite
BOOLEAN bMixCipher; // Indicate current Pair & Group use different cipher suites
USHORT RsnCapability;
UCHAR PSK[100]; // reserve PSK key material
UCHAR PSKLen;
UCHAR PMK[32]; // WPA PSK mode PMK
UCHAR PTK[64]; // WPA PSK mode PTK
UCHAR GTK[32]; // GTK from authenticator
CIPHER_KEY PairwiseKey;
CIPHER_KEY SharedKey[SHARE_KEY_NUM];;
UCHAR DefaultKeyId;
// WPA 802.1x port control, WPA_802_1X_PORT_SECURED, WPA_802_1X_PORT_NOT_SECURED
UCHAR PortSecured;
// store RSN_IE form AP
UCHAR RSN_IE[MAX_LEN_OF_RSNIE];
UCHAR RSN_IELen;
// For WPA countermeasures
ULONG LastMicErrorTime; // record last MIC error time
ULONG MicErrCnt; // Should be 0, 1, 2, then reset to zero (after disassoiciation).
BOOLEAN bBlockAssoc; // Block associate attempt for 60 seconds after counter measure occurred.
// For WPA-PSK supplicant state
SS_WPA_STATE WpaState; // Default is SS_NOTUSE
UCHAR ReplayCounter[8];
UCHAR ANonce[32]; // ANonce for WPA-PSK from authenticator
UCHAR SNonce[32]; // SNonce for WPA-PSK
UCHAR GNonce[32]; // GNonce for WPA-PSK from authenticator
} RT_802_11_APCLI_ENTRY, *PRT_802_11_APCLI_ENTRY;
typedef struct _RT_802_11_APCLI_TABLE {
// ULONG Mode;
// NDIS_802_11_WEP_STATUS WepStatus;
// CIPHER_KEY Wpa_key;
RT_802_11_APCLI_ENTRY ApCliEntry[MAX_APCLI_ENTRY];
} RT_802_11_APCLI_TABLE, *PRT_802_11_APCLI_TABLE;
typedef struct _RT_802_11_WDS_TABLE {
ULONG Mode;
NDIS_802_11_WEP_STATUS WepStatus;
CIPHER_KEY Wpa_key;
RT_802_11_WDS_ENTRY WdsEntry[MAX_WDS_ENTRY];
} RT_802_11_WDS_TABLE, *PRT_802_11_WDS_TABLE;
typedef struct _RT_SIGNAL_STRUC {
USHORT Sequence;
UCHAR MacAddr[MAC_ADDR_LEN];
UCHAR CurrAPAddr[MAC_ADDR_LEN];
UCHAR Sig;
} RT_SIGNAL_STRUC, *PRT_SIGNAL_STRUC;
//
// The miniport adapter structure
//
typedef struct _RTMP_ADAPTER
{
// linux specific
struct pci_dev *pPci_Dev;
struct net_device *net_dev;
#if WIRELESS_EXT >= 12
struct iw_statistics iw_stats;
#endif
struct net_device_stats stats;
INT chip_id;
ULONG CSRBaseAddress;
// resource for DMA operation
RTMP_TX_RING TxRing[NUM_OF_TX_RING]; // AC0~4 + HCCA
RTMP_RX_RING RxRing;
RTMP_MGMT_RING MgmtRing;
RTMP_DMABUF TxDescRing[NUM_OF_TX_RING]; // Shared memory for Tx descriptors
RTMP_DMABUF TxBufSpace[NUM_OF_TX_RING]; // Shared memory of all 1st pre-allocated TxBuf associated with each TXD
RTMP_DMABUF RxDescRing; // Shared memory for RX descriptors
RTMP_DMABUF MgmtDescRing; // Shared memory for MGMT descriptors
// resource for software backlog queues
QUEUE_HEADER TxSwQueue[NUM_OF_TX_RING]; // 4 AC + 1 HCCA
// SpinLocks
spinlock_t TxRingLock; // Tx Ring spinlock
spinlock_t MgmtRingLock; // Prio Ring spinlock
spinlock_t RxRingLock; // Rx Ring spinlock
spinlock_t TxSwQueueLock; // TxSwQueue spinlock
// configuration: read from Registry & E2PROM
UCHAR CurrentAddress[MAC_ADDR_LEN]; // User changed MAC address
MLME_STRUCT Mlme;
// RX Tuple chahe for duplicate frame check
TUPLE_CACHE TupleCache[MAX_CLIENT]; // Maximum number of tuple caches, only useful in Ad-Hoc
UCHAR TupleCacheLastUpdateIndex; // 0..MAX_CLIENT-1
// RX re-assembly buffer for fragmentation
FRAGMENT_FRAME FragFrame; // Frame storage for fragment frame
// various Counters
COUNTER_802_3 Counters8023; // 802.3 counters
COUNTER_802_11 WlanCounters; // 802.11 MIB counters
COUNTER_RALINK RalinkCounters; // Ralink propriety counters
COUNTER_DRS DrsCounters; // counters for Dynamic TX Rate Switching
PRIVATE_STRUC PrivateInfo; // Private information & counters
// flags, see fRTMP_ADAPTER_xxx flags
ULONG Flags; // Represent current device status
// current TX sequence #
USHORT Sequence;
// Control disconnect / connect event generation
ULONG LinkDownTime;
ULONG LastRxRate;
// ---------------------------
// E2PROM
// ---------------------------
ULONG EepromVersion; // byte 0: version, byte 1: revision, byte 2~3: unused
UCHAR EEPROMAddressNum; // 93c46=6 93c66=8
USHORT EEPROMDefaultValue[NUM_EEPROM_BBP_PARMS];
// ---------------------------
// BBP Control
// ---------------------------
UCHAR BbpWriteLatch[110]; // record last BBP register value written via BBP_IO_WRITE/BBP_IO_WRITE_VY_REG_ID
UCHAR BbpRssiToDbmDelta;
BBP_R17_TUNING BbpTuning;
// ----------------------------
// RFIC control
// ----------------------------
UCHAR RfIcType; // RFIC_xxx
ULONG RfFreqOffset; // Frequency offset for channel switching
BOOLEAN bAutoTxAgc; // Enable driver auto Tx Agc control
RTMP_RF_REGS LatchRfRegs; // latch th latest RF programming value since RF IC doesn't support READ
CCK_TX_POWER_CALIBRATE CckTxPowerCalibrate; // 2004-05-25 add CCK TX power caliberation based on E2PROM settings
UCHAR RFProgSeq;
EEPROM_ANTENNA_STRUC Antenna; // Since ANtenna definition is different for a & g. We need to save it for future reference.
EEPROM_NIC_CONFIG2_STRUC NicConfig2;
EEPROM_TX_POWER_DELTA_STRUC TxPowerDelta;
UCHAR LatchBBPR94;
CHANNEL_TX_POWER TxPower[MAX_NUM_OF_CHANNELS]; // Store Tx power value for all channels.
CHANNEL_TX_POWER ChannelList[MAX_NUM_OF_CHANNELS]; // list all supported channels for site survey
UCHAR ChannelTssiRef[MAX_NUM_OF_CHANNELS]; // Store Tssi Reference value for all channels.
UCHAR ChannelTssiDelta; // Store Tx TSSI delta increment / decrement value
UCHAR ChannelListNum; // number of channel in ChannelList[]
BOOLEAN bAutoTxAgcA; // Enable driver auto Tx Agc control
UCHAR TssiRefA; // Store Tssi reference value as 25 tempature.
UCHAR TssiPlusBoundaryA[5]; // Tssi boundary for increase Tx power to compensate.
UCHAR TssiMinusBoundaryA[5]; // Tssi boundary for decrease Tx power to compensate.
UCHAR TxAgcStepA; // Store Tx TSSI delta increment / decrement value
CHAR TxAgcCompensateA; // Store the compensation (TxAgcStep * (idx-1))
BOOLEAN bAutoTxAgcG; // Enable driver auto Tx Agc control
UCHAR TssiRefG; // Store Tssi reference value as 25 tempature.
UCHAR TssiPlusBoundaryG[5]; // Tssi boundary for increase Tx power to compensate.
UCHAR TssiMinusBoundaryG[5]; // Tssi boundary for decrease Tx power to compensate.
UCHAR TxAgcStepG; // Store Tx TSSI delta increment / decrement value
CHAR TxAgcCompensateG; // Store the compensation (TxAgcStep * (idx-1))
UCHAR IoctlIF;
#ifdef APCLI_SUPPORT
UCHAR ApcliIF;
#endif
// ----------------------------
// LED control
// ----------------------------
MCU_LEDCS_STRUC LedCntl;
UCHAR LedIndicatorStregth;
// ----------------------------
// STA specific configuration
// ----------------------------
#ifdef APCLI_SUPPORT
MLME_AUX MlmeAux; // temporary settings used during MLME state machine
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?