📄 mlme.h
字号:
UCHAR ExpCSIFbk:1; UCHAR AntIndFbk:1; UCHAR RxASel:1; UCHAR TxSoundPPDU:1; UCHAR rsv:1;#endif // RT_BIG_ENDIAN //} HT_AS_CAP, *PHT_AS_CAP;// Draft 1.0 set IE length 26, but is extensible..#define SIZE_HT_CAP_IE 26// The structure for HT Capability IE.typedef struct PACKED _HT_CAPABILITY_IE{ HT_CAP_INFO HtCapInfo; HT_CAP_PARM HtCapParm;// HT_MCS_SET HtMCSSet; UCHAR MCSSet[16]; EXT_HT_CAP_INFO ExtHtCapInfo; HT_BF_CAP TxBFCap; // beamforming cap. rt2860c not support beamforming. HT_AS_CAP ASCap; //antenna selection.} HT_CAPABILITY_IE, *PHT_CAPABILITY_IE;// 802.11n draft3 related structure definitions.// 7.3.2.60#define dot11OBSSScanPassiveDwell 20 // in TU. min amount of time that the STA continously scans each channel when performing an active OBSS scan.#define dot11OBSSScanActiveDwell 10 // in TU.min amount of time that the STA continously scans each channel when performing an passive OBSS scan.#define dot11BSSWidthTriggerScanInterval 300 // in sec. max interval between scan operations to be performed to detect BSS channel width trigger events.#define dot11OBSSScanPassiveTotalPerChannel 200 // in TU. min total amount of time that the STA scans each channel when performing a passive OBSS scan.#define dot11OBSSScanActiveTotalPerChannel 20 //in TU. min total amount of time that the STA scans each channel when performing a active OBSS scan#define dot11BSSWidthChannelTransactionDelayFactor 5 // min ratio between the delay time in performing a switch from 20MHz BSS to 20/40 BSS operation and the maxima // interval between overlapping BSS scan operations.#define dot11BSSScanActivityThreshold 25 // in %%, max total time that a STA may be active on the medium during a period of // (dot11BSSWidthChannelTransactionDelayFactor * dot11BSSWidthTriggerScanInterval) seconds without // being obligated to perform OBSS Scan operations. default is 25(== 0.25%)typedef struct PACKED _OVERLAP_BSS_SCAN_IE{ USHORT ScanPassiveDwell; USHORT ScanActiveDwell; USHORT TriggerScanInt; // Trigger scan interval USHORT PassiveTalPerChannel; // passive total per channel USHORT ActiveTalPerChannel; // active total per channel USHORT DelayFactor; // BSS width channel transition delay factor USHORT ScanActThre; // Scan Activity threshold}OVERLAP_BSS_SCAN_IE, *POVERLAP_BSS_SCAN_IE;// 7.3.2.56. 20/40 Coexistence element used in Element ID = 72 = IE_2040_BSS_COEXISTtypedef union PACKED _BSS_2040_COEXIST_IE{ struct PACKED { #ifdef RT_BIG_ENDIAN UCHAR rsv:5; UCHAR BSS20WidthReq:1; UCHAR Intolerant40:1; UCHAR InfoReq:1; #else UCHAR InfoReq:1; UCHAR Intolerant40:1; // Inter-BSS. set 1 when prohibits a receiving BSS from operating as a 20/40 Mhz BSS. UCHAR BSS20WidthReq:1; // Intra-BSS set 1 when prohibits a receiving AP from operating its BSS as a 20/40MHz BSS. UCHAR rsv:5;#endif // RT_BIG_ENDIAN // } field; UCHAR word;} BSS_2040_COEXIST_IE, *PBSS_2040_COEXIST_IE;typedef struct _TRIGGER_EVENTA{ BOOLEAN bValid; UCHAR BSSID[6]; UCHAR RegClass; // Regulatory Class USHORT Channel; ULONG CDCounter; // Maintain a seperate count down counter for each Event A.} TRIGGER_EVENTA, *PTRIGGER_EVENTA;// 20/40 trigger event table// If one Event A delete or created, or if Event B is detected or not detected, STA should send 2040BSSCoexistence to AP.#define MAX_TRIGGER_EVENT 64typedef struct _TRIGGER_EVENT_TAB{ UCHAR EventANo; TRIGGER_EVENTA EventA[MAX_TRIGGER_EVENT]; ULONG EventBCountDown; // Count down counter for Event B. } TRIGGER_EVENT_TAB, *PTRIGGER_EVENT_TAB;// 7.3.27 20/40 Bss Coexistence Mgmt capability used in extended capabilities information IE( ID = 127 = IE_EXT_CAPABILITY). // This is the first octet and was defined in 802.11n D3.03 and 802.11yD9.0typedef struct PACKED _EXT_CAP_INFO_ELEMENT{#ifdef RT_BIG_ENDIAN UCHAR rsv2:5; UCHAR ExtendChannelSwitch:1; UCHAR rsv:1; UCHAR BssCoexistMgmtSupport:1;#else UCHAR BssCoexistMgmtSupport:1; UCHAR rsv:1; UCHAR ExtendChannelSwitch:1; UCHAR rsv2:5;#endif // RT_BIG_ENDIAN //}EXT_CAP_INFO_ELEMENT, *PEXT_CAP_INFO_ELEMENT;// 802.11n 7.3.2.61typedef struct PACKED _BSS_2040_COEXIST_ELEMENT{ UCHAR ElementID; // ID = IE_2040_BSS_COEXIST = 72 UCHAR Len; BSS_2040_COEXIST_IE BssCoexistIe;}BSS_2040_COEXIST_ELEMENT, *PBSS_2040_COEXIST_ELEMENT;//802.11n 7.3.2.59typedef struct PACKED _BSS_2040_INTOLERANT_CH_REPORT{ UCHAR ElementID; // ID = IE_2040_BSS_INTOLERANT_REPORT = 73 UCHAR Len; UCHAR RegulatoryClass; UCHAR ChList[0];}BSS_2040_INTOLERANT_CH_REPORT, *PBSS_2040_INTOLERANT_CH_REPORT;// The structure for channel switch annoucement IE. This is in 802.11n D3.03typedef struct PACKED _CHA_SWITCH_ANNOUNCE_IE{ UCHAR SwitchMode; //channel switch mode UCHAR NewChannel; // UCHAR SwitchCount; // } CHA_SWITCH_ANNOUNCE_IE, *PCHA_SWITCH_ANNOUNCE_IE;// The structure for channel switch annoucement IE. This is in 802.11n D3.03typedef struct PACKED _SEC_CHA_OFFSET_IE{ UCHAR SecondaryChannelOffset; // 1: Secondary above, 3: Secondary below, 0: no Secondary } SEC_CHA_OFFSET_IE, *PSEC_CHA_OFFSET_IE;// This structure is extracted from struct RT_HT_CAPABILITYtypedef struct { BOOLEAN bHtEnable; // If we should use ht rate. BOOLEAN bPreNHt; // If we should use ht rate. //Substract from HT Capability IE UCHAR MCSSet[16]; //only supoort MCS=0-15,32 , } RT_HT_PHY_INFO, *PRT_HT_PHY_INFO;//This structure substracts ralink supports from all 802.11n-related features.//Features not listed here but contained in 802.11n spec are not supported in rt2860.typedef struct {#ifdef RT_BIG_ENDIAN USHORT rsv:5; USHORT AmsduSize:1; // Max receiving A-MSDU size USHORT AmsduEnable:1; // Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n USHORT RxSTBC:2; // 2 bits USHORT TxSTBC:1; USHORT ShortGIfor40:1; //for40MHz USHORT ShortGIfor20:1; USHORT GF:1; //green field USHORT MimoPs:2;//mimo power safe MMPS_ USHORT ChannelWidth:1;#else USHORT ChannelWidth:1; USHORT MimoPs:2;//mimo power safe MMPS_ USHORT GF:1; //green field USHORT ShortGIfor20:1; USHORT ShortGIfor40:1; //for40MHz USHORT TxSTBC:1; USHORT RxSTBC:2; // 2 bits USHORT AmsduEnable:1; // Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n USHORT AmsduSize:1; // Max receiving A-MSDU size USHORT rsv:5;#endif //Substract from Addiont HT INFO IE#ifdef RT_BIG_ENDIAN UCHAR RecomWidth:1; UCHAR ExtChanOffset:2; // Please not the difference with following UCHAR NewExtChannelOffset; from 802.11n UCHAR MpduDensity:3; UCHAR MaxRAmpduFactor:2;#else UCHAR MaxRAmpduFactor:2; UCHAR MpduDensity:3; UCHAR ExtChanOffset:2; // Please not the difference with following UCHAR NewExtChannelOffset; from 802.11n UCHAR RecomWidth:1;#endif#ifdef RT_BIG_ENDIAN USHORT rsv2:11; USHORT OBSS_NonHTExist:1; USHORT rsv3:1; USHORT NonGfPresent:1; USHORT OperaionMode:2;#else USHORT OperaionMode:2; USHORT NonGfPresent:1; USHORT rsv3:1; USHORT OBSS_NonHTExist:1; USHORT rsv2:11;#endif // New Extension Channel Offset IE UCHAR NewExtChannelOffset; // Extension Capability IE = 127 UCHAR BSSCoexist2040; } RT_HT_CAPABILITY, *PRT_HT_CAPABILITY;// field in Addtional HT Information IE . typedef struct PACKED {#ifdef RT_BIG_ENDIAN UCHAR SerInterGranu:3; UCHAR S_PSMPSup:1; UCHAR RifsMode:1; UCHAR RecomWidth:1; UCHAR ExtChanOffset:2;#else UCHAR ExtChanOffset:2; UCHAR RecomWidth:1; UCHAR RifsMode:1; UCHAR S_PSMPSup:1; //Indicate support for scheduled PSMP UCHAR SerInterGranu:3; //service interval granularity#endif} ADD_HTINFO, *PADD_HTINFO;typedef struct PACKED{#ifdef RT_BIG_ENDIAN USHORT rsv2:11; USHORT OBSS_NonHTExist:1; USHORT rsv:1; USHORT NonGfPresent:1; USHORT OperaionMode:2; #else USHORT OperaionMode:2; USHORT NonGfPresent:1; USHORT rsv:1; USHORT OBSS_NonHTExist:1; USHORT rsv2:11; #endif} ADD_HTINFO2, *PADD_HTINFO2;// TODO: Need sync with spec about the definition of StbcMcs. In Draft 3.03, it's reserved.typedef struct PACKED{#ifdef RT_BIG_ENDIAN USHORT rsv:4; USHORT PcoPhase:1; USHORT PcoActive:1; USHORT LsigTxopProt:1; USHORT STBCBeacon:1; USHORT DualCTSProtect:1; USHORT DualBeacon:1; USHORT StbcMcs:6;#else USHORT StbcMcs:6; USHORT DualBeacon:1; USHORT DualCTSProtect:1; USHORT STBCBeacon:1; USHORT LsigTxopProt:1; // L-SIG TXOP protection full support USHORT PcoActive:1; USHORT PcoPhase:1; USHORT rsv:4; #endif // RT_BIG_ENDIAN //} ADD_HTINFO3, *PADD_HTINFO3;#define SIZE_ADD_HT_INFO_IE 22typedef struct PACKED{ UCHAR ControlChan; ADD_HTINFO AddHtInfo; ADD_HTINFO2 AddHtInfo2; ADD_HTINFO3 AddHtInfo3; UCHAR MCSSet[16]; // Basic MCS set} ADD_HT_INFO_IE, *PADD_HT_INFO_IE;typedef struct PACKED{ UCHAR NewExtChanOffset;} NEW_EXT_CHAN_IE, *PNEW_EXT_CHAN_IE;// 4-byte HTC field. maybe included in any frame except non-QOS data frame. The Order bit must set 1.typedef struct PACKED {#ifdef RT_BIG_ENDIAN UINT32 RDG:1; //RDG / More PPDU UINT32 ACConstraint:1; //feedback request UINT32 rsv:5; //calibration sequence UINT32 ZLFAnnouce:1; // ZLF announcement UINT32 CSISTEERING:2; //CSI/ STEERING UINT32 FBKReq:2; //feedback request UINT32 CalSeq:2; //calibration sequence UINT32 CalPos:2; // calibration position UINT32 MFBorASC:7; //Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available UINT32 MFS:3; //SET to the received value of MRS. 0x111 for unsolicited MFB. UINT32 MRSorASI:3; // MRQ Sequence identifier. unchanged during entire procedure. 0x000-0x110. UINT32 MRQ:1; //MCS feedback. Request for a MCS feedback UINT32 TRQ:1; //sounding request UINT32 MA:1; //management action payload exist in (QoS Null+HTC)#else UINT32 MA:1; //management action payload exist in (QoS Null+HTC) UINT32 TRQ:1; //sounding request UINT32 MRQ:1; //MCS feedback. Request for a MCS feedback UINT32 MRSorASI:3; // MRQ Sequence identifier. unchanged during entire procedure. 0x000-0x110. UINT32 MFS:3; //SET to the received value of MRS. 0x111 for unsolicited MFB. UINT32 MFBorASC:7; //Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available UINT32 CalPos:2; // calibration position UINT32 CalSeq:2; //calibration sequence UINT32 FBKReq:2; //feedback request UINT32 CSISTEERING:2; //CSI/ STEERING UINT32 ZLFAnnouce:1; // ZLF announcement UINT32 rsv:5; //calibration sequence UINT32 ACConstraint:1; //feedback request UINT32 RDG:1; //RDG / More PPDU#endif /* !RT_BIG_ENDIAN */} HT_CONTROL, *PHT_CONTROL;// 2-byte QOS CONTROL fieldtypedef struct PACKED {#ifdef RT_BIG_ENDIAN USHORT Txop_QueueSize:8; USHORT AMsduPresent:1; USHORT AckPolicy:2; //0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA USHORT EOSP:1; USHORT TID:4;#else USHORT TID:4; USHORT EOSP:1; USHORT AckPolicy:2; //0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA USHORT AMsduPresent:1; USHORT Txop_QueueSize:8;#endif /* !RT_BIG_ENDIAN */} QOS_CONTROL, *PQOS_CONTROL; // 2-byte Frame control fieldtypedef struct PACKED {#ifdef RT_BIG_ENDIAN USHORT Order:1; // Strict order expected USHORT Wep:1; // Wep data USHORT MoreData:1; // More data bit USHORT PwrMgmt:1; // Power management bit USHORT Retry:1; // Retry status bit USHORT MoreFrag:1; // More fragment bit USHORT FrDs:1; // From DS indication USHORT ToDs:1; // To DS indication USHORT SubType:4; // MSDU subtype USHORT Type:2; // MSDU type USHORT Ver:2; // Protocol version#else USHORT Ver:2; // Protocol version USHORT Type:2; // MSDU type USHORT SubType:4; // MSDU subtype USHORT ToDs:1; // To DS indication USHORT FrDs:1; // From DS indication USHORT MoreFrag:1; // More fragment bit USHORT Retry:1; // Retry status bit USHORT PwrMgmt:1; // Power management bit USHORT MoreData:1; // More data bit USHORT Wep:1; // Wep data USHORT Order:1; // Strict order expected#endif /* !RT_BIG_ENDIAN */} FRAME_CONTROL, *PFRAME_CONTROL;typedef struct PACKED _HEADER_802_11 { FRAME_CONTROL FC; USHORT Duration; UCHAR Addr1[MAC_ADDR_LEN]; UCHAR Addr2[MAC_ADDR_LEN]; UCHAR Addr3[MAC_ADDR_LEN];#ifdef RT_BIG_ENDIAN USHORT Sequence:12; USHORT Frag:4;#else USHORT Frag:4; USHORT Sequence:12;#endif /* !RT_BIG_ENDIAN */ UCHAR Octet[0];} HEADER_802_11, *PHEADER_802_11;typedef struct PACKED _FRAME_802_11 { HEADER_802_11 Hdr;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -