📄 rtmp_mac.h
字号:
UINT32 CTS40MMode:1; // Response CTS 40MHz duplicate mode UINT32 CTS40MRef:1; // Response CTS 40MHz duplicate mode UINT32 AutoResponderPreamble:1; // 0:long, 1:short preamble UINT32 rsv:1; // Power bit value in conrtrol frame UINT32 DualCTSEn:1; // Power bit value in conrtrol frame UINT32 AckCtsPsmBit:1; // Power bit value in conrtrol frame UINT32 :24; } field; UINT32 word;} AUTO_RSP_CFG_STRUC, *PAUTO_RSP_CFG_STRUC;#endif#define LEGACY_BASIC_RATE 0x1408 // TXRX_CSR5 0x3054#define HT_BASIC_RATE 0x140c#define HT_CTRL_CFG 0x1410#define SIFS_COST_CFG 0x1414#define RX_PARSER_CFG 0x1418 //Set NAV for all received frames//// 4.5 MAC Security configuration (offset:0x1500)//#define TX_SEC_CNT0 0x1500 //#define RX_SEC_CNT0 0x1504 //#define CCMP_FC_MUTE 0x1508 ////// 4.6 HCCA/PSMP (offset:0x1600)//#define TXOP_HLDR_ADDR0 0x1600 #define TXOP_HLDR_ADDR1 0x1604 #define TXOP_HLDR_ET 0x1608 #define QOS_CFPOLL_RA_DW0 0x160c#define QOS_CFPOLL_A1_DW1 0x1610#define QOS_CFPOLL_QC 0x1614//// 4.7 MAC Statistis registers (offset:0x1700)//#define RX_STA_CNT0 0x1700 //#define RX_STA_CNT1 0x1704 //#define RX_STA_CNT2 0x1708 ////// RX_STA_CNT0_STRUC: RX PLCP error count & RX CRC error count//#ifdef RT_BIG_ENDIANtypedef union _RX_STA_CNT0_STRUC { struct { USHORT PhyErr; USHORT CrcErr; } field; UINT32 word;} RX_STA_CNT0_STRUC, *PRX_STA_CNT0_STRUC;#elsetypedef union _RX_STA_CNT0_STRUC { struct { USHORT CrcErr; USHORT PhyErr; } field; UINT32 word;} RX_STA_CNT0_STRUC, *PRX_STA_CNT0_STRUC;#endif//// RX_STA_CNT1_STRUC: RX False CCA count & RX LONG frame count//#ifdef RT_BIG_ENDIANtypedef union _RX_STA_CNT1_STRUC { struct { USHORT PlcpErr; USHORT FalseCca; } field; UINT32 word;} RX_STA_CNT1_STRUC, *PRX_STA_CNT1_STRUC;#elsetypedef union _RX_STA_CNT1_STRUC { struct { USHORT FalseCca; USHORT PlcpErr; } field; UINT32 word;} RX_STA_CNT1_STRUC, *PRX_STA_CNT1_STRUC;#endif//// RX_STA_CNT2_STRUC: //#ifdef RT_BIG_ENDIANtypedef union _RX_STA_CNT2_STRUC { struct { USHORT RxFifoOverflowCount; USHORT RxDupliCount; } field; UINT32 word;} RX_STA_CNT2_STRUC, *PRX_STA_CNT2_STRUC;#elsetypedef union _RX_STA_CNT2_STRUC { struct { USHORT RxDupliCount; USHORT RxFifoOverflowCount; } field; UINT32 word;} RX_STA_CNT2_STRUC, *PRX_STA_CNT2_STRUC;#endif#define TX_STA_CNT0 0x170C ////// STA_CSR3: TX Beacon count//#ifdef RT_BIG_ENDIANtypedef union _TX_STA_CNT0_STRUC { struct { USHORT TxBeaconCount; USHORT TxFailCount; } field; UINT32 word;} TX_STA_CNT0_STRUC, *PTX_STA_CNT0_STRUC;#elsetypedef union _TX_STA_CNT0_STRUC { struct { USHORT TxFailCount; USHORT TxBeaconCount; } field; UINT32 word;} TX_STA_CNT0_STRUC, *PTX_STA_CNT0_STRUC;#endif#define TX_STA_CNT1 0x1710 ////// TX_STA_CNT1: TX tx count//#ifdef RT_BIG_ENDIANtypedef union _TX_STA_CNT1_STRUC { struct { USHORT TxRetransmit; USHORT TxSuccess; } field; UINT32 word;} TX_STA_CNT1_STRUC, *PTX_STA_CNT1_STRUC;#elsetypedef union _TX_STA_CNT1_STRUC { struct { USHORT TxSuccess; USHORT TxRetransmit; } field; UINT32 word;} TX_STA_CNT1_STRUC, *PTX_STA_CNT1_STRUC;#endif#define TX_STA_CNT2 0x1714 ////// TX_STA_CNT2: TX tx count//#ifdef RT_BIG_ENDIANtypedef union _TX_STA_CNT2_STRUC { struct { USHORT TxUnderFlowCount; USHORT TxZeroLenCount; } field; UINT32 word;} TX_STA_CNT2_STRUC, *PTX_STA_CNT2_STRUC;#elsetypedef union _TX_STA_CNT2_STRUC { struct { USHORT TxZeroLenCount; USHORT TxUnderFlowCount; } field; UINT32 word;} TX_STA_CNT2_STRUC, *PTX_STA_CNT2_STRUC;#endif#define TX_STA_FIFO 0x1718 ////// TX_STA_FIFO_STRUC: TX Result for specific PID status fifo register//#ifdef RT_BIG_ENDIANtypedef union PACKED _TX_STA_FIFO_STRUC { struct { UINT32 Reserve:2; UINT32 TxBF:1; // 3*3 UINT32 SuccessRate:13; //include MCS, mode ,shortGI, BW settingSame format as TXWI Word 0 Bit 31-16. // UINT32 SuccessRate:16; //include MCS, mode ,shortGI, BW settingSame format as TXWI Word 0 Bit 31-16. UINT32 wcid:8; //wireless client index UINT32 TxAckRequired:1; // ack required UINT32 TxAggre:1; // Tx is aggregated UINT32 TxSuccess:1; // Tx success. whether success or not UINT32 PidType:4; UINT32 bValid:1; // 1:This register contains a valid TX result } field; UINT32 word;} TX_STA_FIFO_STRUC, *PTX_STA_FIFO_STRUC;#elsetypedef union PACKED _TX_STA_FIFO_STRUC { struct { UINT32 bValid:1; // 1:This register contains a valid TX result UINT32 PidType:4; UINT32 TxSuccess:1; // Tx No retry success UINT32 TxAggre:1; // Tx Retry Success UINT32 TxAckRequired:1; // Tx fail UINT32 wcid:8; //wireless client index// UINT32 SuccessRate:16; //include MCS, mode ,shortGI, BW settingSame format as TXWI Word 0 Bit 31-16. UINT32 SuccessRate:13; //include MCS, mode ,shortGI, BW settingSame format as TXWI Word 0 Bit 31-16. UINT32 TxBF:1; UINT32 Reserve:2; } field; UINT32 word;} TX_STA_FIFO_STRUC, *PTX_STA_FIFO_STRUC;#endif// Debug counter#define TX_AGG_CNT 0x171c#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT_STRUC { struct { USHORT AggTxCount; USHORT NonAggTxCount; } field; UINT32 word;} TX_AGG_CNT_STRUC, *PTX_AGG_CNT_STRUC;#elsetypedef union _TX_AGG_CNT_STRUC { struct { USHORT NonAggTxCount; USHORT AggTxCount; } field; UINT32 word;} TX_AGG_CNT_STRUC, *PTX_AGG_CNT_STRUC;#endif// Debug counter#define TX_AGG_CNT0 0x1720#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT0_STRUC { struct { USHORT AggSize2Count; USHORT AggSize1Count; } field; UINT32 word;} TX_AGG_CNT0_STRUC, *PTX_AGG_CNT0_STRUC;#elsetypedef union _TX_AGG_CNT0_STRUC { struct { USHORT AggSize1Count; USHORT AggSize2Count; } field; UINT32 word;} TX_AGG_CNT0_STRUC, *PTX_AGG_CNT0_STRUC;#endif// Debug counter#define TX_AGG_CNT1 0x1724#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT1_STRUC { struct { USHORT AggSize4Count; USHORT AggSize3Count; } field; UINT32 word;} TX_AGG_CNT1_STRUC, *PTX_AGG_CNT1_STRUC;#elsetypedef union _TX_AGG_CNT1_STRUC { struct { USHORT AggSize3Count; USHORT AggSize4Count; } field; UINT32 word;} TX_AGG_CNT1_STRUC, *PTX_AGG_CNT1_STRUC;#endif#define TX_AGG_CNT2 0x1728#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT2_STRUC { struct { USHORT AggSize6Count; USHORT AggSize5Count; } field; UINT32 word;} TX_AGG_CNT2_STRUC, *PTX_AGG_CNT2_STRUC;#elsetypedef union _TX_AGG_CNT2_STRUC { struct { USHORT AggSize5Count; USHORT AggSize6Count; } field; UINT32 word;} TX_AGG_CNT2_STRUC, *PTX_AGG_CNT2_STRUC;#endif// Debug counter#define TX_AGG_CNT3 0x172c#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT3_STRUC { struct { USHORT AggSize8Count; USHORT AggSize7Count; } field; UINT32 word;} TX_AGG_CNT3_STRUC, *PTX_AGG_CNT3_STRUC;#elsetypedef union _TX_AGG_CNT3_STRUC { struct { USHORT AggSize7Count; USHORT AggSize8Count; } field; UINT32 word;} TX_AGG_CNT3_STRUC, *PTX_AGG_CNT3_STRUC;#endif// Debug counter#define TX_AGG_CNT4 0x1730#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT4_STRUC { struct { USHORT AggSize10Count; USHORT AggSize9Count; } field; UINT32 word;} TX_AGG_CNT4_STRUC, *PTX_AGG_CNT4_STRUC;#elsetypedef union _TX_AGG_CNT4_STRUC { struct { USHORT AggSize9Count; USHORT AggSize10Count; } field; UINT32 word;} TX_AGG_CNT4_STRUC, *PTX_AGG_CNT4_STRUC;#endif#define TX_AGG_CNT5 0x1734#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT5_STRUC { struct { USHORT AggSize12Count; USHORT AggSize11Count; } field; UINT32 word;} TX_AGG_CNT5_STRUC, *PTX_AGG_CNT5_STRUC;#elsetypedef union _TX_AGG_CNT5_STRUC { struct { USHORT AggSize11Count; USHORT AggSize12Count; } field; UINT32 word;} TX_AGG_CNT5_STRUC, *PTX_AGG_CNT5_STRUC;#endif#define TX_AGG_CNT6 0x1738#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT6_STRUC { struct { USHORT AggSize14Count; USHORT AggSize13Count; } field; UINT32 word;} TX_AGG_CNT6_STRUC, *PTX_AGG_CNT6_STRUC;#elsetypedef union _TX_AGG_CNT6_STRUC { struct { USHORT AggSize13Count; USHORT AggSize14Count; } field; UINT32 word;} TX_AGG_CNT6_STRUC, *PTX_AGG_CNT6_STRUC;#endif#define TX_AGG_CNT7 0x173c#ifdef RT_BIG_ENDIANtypedef union _TX_AGG_CNT7_STRUC { struct { USHORT AggSize16Count; USHORT AggSize15Count; } field; UINT32 word;} TX_AGG_CNT7_STRUC, *PTX_AGG_CNT7_STRUC;#elsetypedef union _TX_AGG_CNT7_STRUC { struct { USHORT AggSize15Count; USHORT AggSize16Count; } field; UINT32 word;} TX_AGG_CNT7_STRUC, *PTX_AGG_CNT7_STRUC;#endif#define MPDU_DENSITY_CNT 0x1740#ifdef RT_BIG_ENDIANtypedef union _MPDU_DEN_CNT_STRUC { struct { USHORT RXZeroDelCount; //RX zero length delimiter count USHORT TXZeroDelCount; //TX zero length delimiter count } field; UINT32 word;} MPDU_DEN_CNT_STRUC, *PMPDU_DEN_CNT_STRUC;#elsetypedef union _MPDU_DEN_CNT_STRUC { struct { USHORT TXZeroDelCount; //TX zero length delimiter count USHORT RXZeroDelCount; //RX zero length delimiter count } field; UINT32 word;} MPDU_DEN_CNT_STRUC, *PMPDU_DEN_CNT_STRUC;#endif//// TXRX control registers - base address 0x3000//// rt2860b UNKNOWN reg use R/O Reg Addr 0x77d0 first..#define TXRX_CSR1 0x77d0//// Security key table memory, base address = 0x1000//#define MAC_WCID_BASE 0x1800 //8-bytes(use only 6-bytes) * 256 entry = #define HW_WCID_ENTRY_SIZE 8#define PAIRWISE_KEY_TABLE_BASE 0x4000 // 32-byte * 256-entry = -byte#define HW_KEY_ENTRY_SIZE 0x20#define PAIRWISE_IVEIV_TABLE_BASE 0x6000 // 8-byte * 256-entry = -byte#define MAC_IVEIV_TABLE_BASE 0x6000 // 8-byte * 256-entry = -byte#define HW_IVEIV_ENTRY_SIZE 8#define MAC_WCID_ATTRIBUTE_BASE 0x6800 // 4-byte * 256-entry = -byte#define HW_WCID_ATTRI_SIZE 4#define WCID_RESERVED 0x6bfc #define SHARED_KEY_TABLE_BASE 0x6c00 // 32-byte * 16-entry = 512-byte#define SHARED_KEY_MODE_BASE 0x7000 // 32-byte * 16-entry = 512-byte#define HW_SHARED_KEY_MODE_SIZE 4#define SHAREDKEYTABLE 0#define PAIRWISEKEYTABLE 1#ifdef RT_BIG_ENDIANtypedef union _SHAREDKEY_MODE_STRUC { struct { UINT32 :1; UINT32 Bss1Key3CipherAlg:3; UINT32 :1; UINT32 Bss1Key2CipherAlg:3; UINT32 :1; UINT32 Bss1Key1CipherAlg:3; UINT32 :1; UINT32 Bss1Key0CipherAlg:3; UINT32 :1; UINT32 Bss0Key3CipherAlg:3; UINT32 :1; UINT32 Bss0Key2CipherAlg:3; UINT32 :1; UINT32 Bss0Key1CipherAlg:3; UINT32 :1; UINT32 Bss0Key0CipherAlg:3; } field; UINT32 word;} SHAREDKEY_MODE_STRUC, *PSHAREDKEY_MODE_STRUC;#elsetypedef union _SHAREDKEY_MODE_STRUC {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -