📄 hostcmd.h
字号:
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
BSS_DESCRIPTION_SET_ALL_FIELDS BssDescriptor;
USHORT FailTimeOut;
USHORT ProbeDelay;
UCHAR DataRates[8];
} HostCmd_DS_802_11_AD_HOC_JOIN, *PHostCmd_DS_802_11_AD_HOC_JOIN;
// Define data structure for HostCmd_CMD_SET_ACTIVE_SCAN_SSID
typedef struct _HostCmd_DS_SET_ACTIVE_SCAN_SSID {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
NDIS_802_11_SSID ActiveScanSSID;
} HostCmd_DS_SET_ACTIVE_SCAN_SSID, *PHostCmd_DS_SET_ACTIVE_SCAN_SSID;
// Define data structure for HostCmd_CMD_QOS_WME_ENABLE_STATE
typedef struct _HostCmd_CMD_QOS_WME_ENABLE_STATE {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // ACTION_GET or ACTION_SET
USHORT Enabled; // 0 = disabled, 1 = enabled
} HostCmd_CMD_QOS_WME_ENABLE_STATE, *PHostCmd_CMD_QOS_WME_ENABLE_STATE;
// Define data structure for HostCmd_CMD_QOS_WME_ENABLE_STATE
typedef struct _HostCmd_CMD_QOS_WME_ACCESS_CATEGORY_PARAMETERS {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // ACTION_GET or ACTION_SET
ULONG AC_BE; // Best Effort AC parameters
ULONG AC_BE_XTRA; // Extra AC_BE parameters
ULONG AC_BK; // Background AC parameters
ULONG AC_BK_XTRA; // Extra AC_BK parameters
ULONG AC_VI; // Video AC parameters
ULONG AC_VI_XTRA; // Extra Video AC parameters
ULONG AC_VO; // Voice AC parameters
ULONG AC_VO_XTRA; // Extra Voice AC parameters
} HostCmd_CMD_QOS_WME_ACCESS_CATEGORY_PARAMETERS,
*PHostCmd_CMD_QOS_WME_ACCESS_CATEGORY_PARAMETERS;
//Define data structure for CMD_802_11_ENABLE_RSN
typedef struct _HostCmd_DS_802_11_ENABLE_RSN
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
USHORT Enable;
} HostCmd_DS_802_11_ENABLE_RSN, *PHostCmd_DS_802_11_ENABLE_RSN;
typedef struct _HostCmd_DS_802_11_CONFIG_RSN
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
UCHAR Version;
UCHAR PairWiseKeysSupported;
UCHAR MultiCastCipher[4];
UCHAR GroupKeyMethod;
ULONG GroupReKeyTime;
ULONG GroupReKeyPkts;
UCHAR GroupReKeyStrict;
UCHAR TsnEnabled;
ULONG GroupMasterRekeyTime;
ULONG GroupUpdateTmo;
ULONG GroupUpdateCnt;
ULONG PairWiseUpdateTmo;
ULONG PairWiseUpdateCnt;
} HostCmd_DS_802_11_CONFIG_RSN, *PHostCmd_DS_802_11_CONFIG_RSN;
typedef struct _HostCmd_DS_802_11_UNICAST_CIPHER
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
UCHAR UnicastCipher[4];
USHORT Enabled;
} HostCmd_DS_802_11_UNICAST_CIPHER, *PHostCmd_DS_802_11_UNICAST_CIPHER;
typedef struct _HostCmd_DS_802_11_MCAST_CIPHER
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
UCHAR McastCipher[4];
USHORT Enabled;
} HostCmd_DS_802_11_MCAST_CIPHER, *PHostCmd_DS_802_11_MCAST_CIPHER;
typedef struct _HostCmd_DS_802_11_RSN_AUTH_SUITES
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
UCHAR AuthSuites[4];
USHORT Enabled;
} HostCmd_DS_802_11_RSN_AUTH_SUITES, *PHostCmd_DS_802_11_RSN_AUTH_SUITES;
typedef struct _HostCmd_DS_802_11_PWK_KEY
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
UCHAR TkipEncryptKey[16];
UCHAR TkipTxMicKey[8];
UCHAR TkipRxMicKey[8];
} HostCmd_DS_802_11_PWK_KEY, *PHostCmd_DS_802_11_PWK_KEY;
/*Define data structure for CMD_802_11_GRP_KEY*/
typedef struct _HostCmd_DS_802_11_GRP_KEY
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
UCHAR TkipEncryptKey[16];
UCHAR TkipTxMicKey[8];
UCHAR TkipRxMicKey[8];
} HostCmd_DS_802_11_GRP_KEY, *PHostCmd_DS_802_11_GRP_KEY;
/*Define data structure for CMD_802_11_PAIRWISE_TSC*/
typedef struct _HostCmd_DS_802_11_PAIRWISE_TSC
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
ULONG TxIv32;
USHORT TxIv16;
} HostCmd_DS_802_11_PAIRWISE_TSC, *PHostCmd_DS_802_11_PAIRWISE_TSC;
/*Define data structure for CMD_802_11_GROUP_TSC*/
typedef struct _HostCmd_DS_802_11_GROUP_TSC
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
ULONG TxIv32;
USHORT TxIv16;
} HostCmd_DS_802_11_GROUP_TSC, *PHostCmd_DS_802_11_GROUP_TSC;
/*Define data structure for CMD_802_11_QUERY_TKIP_REPLY_CNTRS*/
typedef struct _HostCmd_DS_802_11_QUERY_TKIP_REPLY_CNTRS
{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
ULONG NumTkipCntrs;
} HostCmd_DS_802_11_QUERY_TKIP_REPLY_CNTRS, *PHostCmd_DS_802_11_QUERY_TKIP_REPLY_CNTRS;
typedef struct _HostCmd_DS_CMD_MAC_REG_ACCESS {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // ACTION_GET or ACTION_SET
USHORT Offset;
ULONG Value;
} HostCmd_DS_CMD_MAC_REG_ACCESS, *PHostCmd_DS_CMD_MAC_REG_ACCESS;
typedef struct _HostCmd_DS_CMD_RF_REG_ACCESS {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // ACTION_GET or ACTION_SET
USHORT Offset;
UCHAR Value;
} HostCmd_DS_CMD_RF_REG_ACCESS, *PHostCmd_DS_CMD_RF_REG_ACCESS;
typedef struct _HostCmd_DS_CMD_BBP_REG_ACCESS {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // ACTION_GET or ACTION_SET
USHORT Offset;
UCHAR Value;
} HostCmd_DS_CMD_BBP_REG_ACCESS, *PHostCmd_DS_CMD_BBP_REG_ACCESS;
typedef struct _HostCmd_DS_CMD_REGION_CODE {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // ACTION_GET or ACTION_SET
USHORT RegionCode;
} HostCmd_DS_CMD_REGION_CODE, *PHostCmd_DS_CMD_REGION_CODE;
typedef struct _HostCmd_DS_CMD_MAC_ADDRESS {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // ACTION_GET or ACTION_SET
UCHAR MacAddress[MRVDRV_ETH_ADDR_LEN];
} HostCmd_DS_CMD_MAC_ADDRESS, *PHostCmd_DS_CMD_MAC_ADDRESS;
// TX and RX mode command uses the same type of buffer structure
typedef struct _HostCmd_DS_CMD_TXRX_MODE {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
UCHAR Mode;
} HostCmd_DS_CMD_TXRX_MODE, *PHostCmd_DS_CMD_TXRX_MODE;
#if 0 //tt ++ v5 firmware
// LED control
typedef struct _HostCmd_DS_CMD_802_11_LED_CONTROL {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
ULONG GpioNum; /* GPIO number for LED(=0, 0-7) */
ULONG LedCycle; /* LED Cycle: 0-5, or ON/OFF */
ULONG DutyCycle; /* LED Duty Cycle: 0-4 */
} HostCmd_DS_CMD_802_11_LED_CONTROL, *PHostCmd_DS_CMD_802_11_LED_CONTROL;
#endif //0 //tt -- v5 firmware
// multiple DTIM
typedef struct _HostCmd_DS_CMD_802_11_MULTIPLE_DTIM {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
#ifdef MRVL_USE_MULTIPLE_DTIM
USHORT Action;
USHORT PowerMode;
USHORT DtimNum;
#else
UCHAR DtimNum; /* multiple of DTIM from AP */
#endif
} HostCmd_DS_CMD_802_11_MULTIPLE_DTIM, *PHostCmd_DS_CMD_802_11_MULTIPLE_DTIM;
// BT configuration
typedef struct _HostCmd_DS_CMD_BCA_CONFIGURATION {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action;
USHORT Mode;
USHORT AntennaConfig;
USHORT FreqConfig;
ULONG TxPriorityLo;
ULONG TxPriorityHi;
ULONG RxPriorityLo;
ULONG RxPriorityHi;
} HostCmd_DS_CMD_BCA_CONFIGURATION, *PHostCmd_DS_CMD_BCA_CONFIGURATION;
// Bank configuration
typedef struct _HostCmd_DS_802_11_BAND_CONFIG {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; // 0: GET; 1: SET
USHORT BandSelection; // Select 802.11b = 0 (2.4GHz)
// Select 802.11g = 1 (2.4GHz)
// Select 802.11a = 2 (5 GHz )
USHORT Channel;
} HostCmd_DS_802_11_BAND_CONFIG, *PHostCmd_DS_802_11_BAND_CONFIG;
typedef struct _HostCmd_DS_802_11_SLEEP_PARAMS{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; /* ACT_GET/ACT_SET */
USHORT Error; /* Sleep clock error in ppm */
USHORT Offset; /* Wakeup offset in usec */
USHORT StableTime; /* Clock stabilization time in usec */
UCHAR CalControl; /* Control periodic calibration */
UCHAR ExternalSleepClk; /* Control the use of external sleep clock */
USHORT Reserved; /* Reserved field, should be set to zero */
}HostCmd_DS_802_11_SLEEP_PARAMS,*PHostCmd_DS_802_11_SLEEP_PARAMS;
typedef struct _HostCmd_DS_802_11_FW_WAKE_METHOD{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; /* ACT_GET/ACT_SET */
USHORT Method; /* awake method */
}HostCmd_DS_802_11_FW_WAKE_METHOD,*PHostCmd_DS_802_11_FW_WAKE_METHOD;
typedef struct _HostCmd_CMD_802_11_INACTIVITY_TIMEOUT{
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; /* ACT_GET/ACT_SET */
USHORT timeout; /* awake method */
} HostCmd_DS_802_11_INACTIVITY_TIMEOUT,*PHostCmd_DS_802_11_INACTIVITY_TIMEOUT;
#ifdef WMM
typedef struct _HostCmd_DS_802_11_WMM_ACK_POLICY {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
USHORT Action; /* 0 - ACT_GET
1 - ACT_SET */
UCHAR AC; /* 0 - AC_BE
1 - AC_BK
2 - AC_VI
3 - AC_VO */
UCHAR AckPolicy; /* 0 - WMM_ACK_POLICY_IMM_ACK
1 - WMM_ACK_POLICY_NO_ACK */
}HostCmd_DS_802_11_WMM_ACK_POLICY, *PHostCmd_DS_802_11_WMM_ACK_POLICY;
typedef struct _HostCmd_DS_802_11_WMM_GET_STATUS {
USHORT Command;
USHORT Size;
USHORT SeqNum;
USHORT Result;
WMM_AC_STATUS Status[4];
}HostCmd_DS_802_11_WMM_GET_STATUS,*PHostCmd_DS_802_11_WMM_GET_STATUS;
#endif
//tt ++ v5 firmware
//#define DRALEE_DBG
#ifdef DRALEE_DBG
#define DraleeMsg( in_args ) v5MrvPrintFileW in_args
#else
#define DraleeMsg( in_args )
#endif
#ifdef V5_FW_DBG_MSG
#ifdef V5_FW_DBG_LOG_FILE
#define V5DbgMsg( in_args ) v5MrvPrintFileW in_args
#else
#define V5DbgMsg( in_args ) NKDbgPrintfW in_args
#endif
#else
#define V5DbgMsg( in_args )
#endif
#define SIZEOF_OID_DS_LEADING sizeof(NDIS_OID)
/*
the type of oid_ds's data_member is different from cmd_ds's
*/
#define TT_CMDPARSE_STD_QUERY_BACKUP_SINGLE_MEMBER( oid_ds, cmd_ds, oid_data_member, cmd_data_member, oid_data_type )\
{\
P##cmd_ds pCmd;\
P##oid_ds pUserBuffer;\
\
pUserBuffer = (P##oid_ds) Adapter->OidCmdRespBuf;\
pCmd = (P##cmd_ds) pRetPtr;\
\
pUserBuffer->##oid_data_member = (##oid_data_type) pCmd->##cmd_data_member;\
Adapter->nOidCmdResult = pCmd->Result;\
Adapter->nSizeOfOidCmdResp = sizeof(##oid_ds);\
\
V5DbgMsg( (L"-v5- CMD resp value: %d\n", pUserBuffer->##oid_data_member) );\
}
#define TT_CMDPARSE_STD_QUERY_BACKUP_SINGLE_VALUE( dest_ptr, dest_ds, src_ptr, src_ds, src_member )\
{\
(dest_ptr) = (##dest_ds *) Adapter->OidCmdRespBuf;\
(src_ptr) = (P##src_ds) pRetPtr;\
\
*(dest_ptr) = (##dest_ds)((src_ptr)->##src_member);\
Adapter->nOidCmdResult = (src_ptr)->Result;\
Adapter->nSizeOfOidCmdResp = sizeof(##dest_ds);\
\
V5DbgMsg( (L"-v5- CMD resp value: %d\n", *(dest_ptr)) );\
}
#define TT_CMDPARSE_SYNC_STD_OID_QUERY_AND_RETURN( needed_size, cmd_id, cmd_op )\
{\
DWORD dwWaitStatus;\
\
V5DbgMsg( (L"-v5- S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -