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

📄 hostcmd.h

📁 此压缩包为杰得开发得z228的BSP的源代码,可以实现很多功能,尤其是视频解码有很好的效果.
💻 H
📖 第 1 页 / 共 5 页
字号:
/******************** (c) Marvell Semiconductor, Inc., 2004 ********************
 *
 *  Purpose:
 *
 *      This file contains the function prototypes, data structure and defines 
 *      for all the host/station commands. Please check the MrvDrv 802.11 
 *      GUI/Driver/Station Interface Specification for detailed command 
 *      information
 *
 *  Notes:
 *
 *
 *	$Author: schiu $
 *
 *	$Date: 2004/12/09 $
 *
 *	$Revision: #9 $
 *
 *****************************************************************************/

#ifndef __HOSTCMD__H
#define __HOSTCMD__H

#ifdef CCX
#include "wlan_ccx.h"
#endif

//=============================================================================
//          PUBLIC DEFINITIONS
//=============================================================================
#define DEFAULT_WEP_STATUS          1
#define DEFAULT_POWERSAVE_MODE      0
#define DEFAULT_DATA_RATE           0xff
#define DEFAULT_CHANNEL             1
#define DEFAULT_AUTHENTICATE_MODE   0   
#define DEFAULT_NETWORK_MODE        1   
#define DEFAULT_RTS_THRESHOLD       2346    
#define DEFAULT_FRAG_THRESHOLD      2346
#define DEFAULT_RX_ANTENNA          0x0000ffff          
#define DEFAULT_TX_ANTENNA          2
#define DEFAULT_PREAMBLE            1


//
//   For diagnostic test purposes
//
#define HostCmd_CMD_DUTY_CYCLE_TEST             	0x002A
#define HostCmd_RET_DUTY_CYCLE_TEST             	0x802A

/*  Define data structure for HostCmd_CMD_DUTY_CYCLE_TEST */
typedef struct _HostCmd_DS_DUTY_CYCLE_TEST {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    USHORT Action;
    ULONG  BeaconOffsetInSQ;
    ULONG  RFParam;  //Replace beaconFrame[2] with RFParam 
    USHORT Reserved;
    
} HostCmd_DS_DUTY_CYCLE_TEST, *PHostCmd_DS_DUTY_CYCLE_TEST;


//
//   Define Command Processing States and Options
//
#define HostCmd_STATE_IDLE                      	0x0000
#define HostCmd_STATE_IN_USE_BY_HOST            	0x0001
#define HostCmd_STATE_IN_USE_BY_MINIPORT        	0x0002
#define HostCmd_STATE_FINISHED                  	0x000f

#define HostCmd_Q_NONE                          	0x0000
#define HostCmd_Q_INIT                          	0x0001
#define HostCmd_Q_RESET                         	0x0002
#define HostCmd_Q_STAT                          	0x0003

//
//          Command pending states
//
#define HostCmd_PENDING_ON_NONE                 	0x0000
#define HostCmd_PENDING_ON_MISC_OP              	0x0001
#define HostCmd_PENDING_ON_INIT                 	0x0002
#define HostCmd_PENDING_ON_RESET                	0x0003
#define HostCmd_PENDING_ON_SET_OID              	0x0004
#define HostCmd_PENDING_ON_GET_OID              	0x0005
#define HostCmd_PENDING_ON_CMD                  	0x0006
#define HostCmd_PENDING_ON_STAT                 	0x0007
#ifdef AUTO_REASSOCIATION
#define HostCmd_PENDING_ON_REASSOCIATION	0x0008
#endif

#define HostCmd_OPTION_USE_INT                  	0x0000
#define HostCmd_OPTION_NO_INT                   	0x0001

#define HostCmd_DELAY_NORMAL                    	0x00000200  //  512 micro sec
#define HostCmd_DELAY_MIN                       	0x00000100  //  256 micro sec
#define HostCmd_DELAY_MAX                       	0x00000400  // 1024 micro sec

//***************************************************************************
//
//          16 bit host command code - HHH updated on 110201
//
#define HostCmd_CMD_NONE                        	0x0000
#define HostCmd_CMD_CODE_DNLD                   	0x0001
#define HostCmd_CMD_OP_PARAM_DNLD               	0x0002
#define HostCmd_CMD_GET_HW_SPEC                 	0x0003
#define HostCmd_CMD_EEPROM_ACCESS               	0x0004
#define HostCmd_CMD_802_11_RESET                	0x0005
#define HostCmd_CMD_802_11_SCAN                 	0x0006
#define HostCmd_CMD_802_11_QUERY_SCAN_RESULT    	0x0029
#define HostCmd_CMD_802_11_QUERY_TRAFFIC        	0x0009
#define HostCmd_CMD_802_11_QUERY_STATUS         	0x000a
#define HostCmd_CMD_802_11_GET_LOG              	0x000b
#define HostCmd_CMD_MAC_CONTROL                 	0x0028
#define HostCmd_CMD_MAC_MULTICAST_ADR           	0x0010
#define HostCmd_CMD_802_11_AUTHENTICATE         	0x0011
#define HostCmd_CMD_802_11_DEAUTHENTICATE       	0x0024
#define HostCmd_CMD_802_11_ASSOCIATE            	0x0012
#define HostCmd_CMD_802_11_REASSOCIATE          	0x0025
#define HostCmd_CMD_802_11_DISASSOCIATE         	0x0026
#define HostCmd_CMD_802_11_SET_WEP              	0x0013
#define HostCmd_CMD_802_11_GET_STAT             	0x0014
#define HostCmd_CMD_802_3_GET_STAT              	0x0015
#define HostCmd_CMD_802_11_SNMP_MIB             	0x0016
#define HostCmd_CMD_MAC_REG_MAP                 	0x0017
#define HostCmd_CMD_BBP_REG_MAP                 	0x0018
#define HostCmd_CMD_RF_REG_MAP                  	0x0023
#define HostCmd_CMD_MAC_REG_ACCESS              	0x0019
#define HostCmd_CMD_BBP_REG_ACCESS              	0x001a
#define HostCmd_CMD_RF_REG_ACCESS               	0x001b
#define HostCmd_CMD_802_11_RADIO_CONTROL        	0x001c
#define HostCmd_CMD_802_11_RF_CHANNEL           	0x001d
#define HostCmd_CMD_802_11_RF_TX_POWER          	0x001e
#define HostCmd_CMD_802_11_RSSI                 	0x001f
#define HostCmd_CMD_802_11_RF_ANTENNA           	0x0020
#define HostCmd_CMD_802_11_PS_MODE              	0x0021
#define HostCmd_CMD_802_11_DATA_RATE            	0x0022
#define HostCmd_CMD_802_11_AD_HOC_START         	0x002B
#define HostCmd_CMD_802_11_AD_HOC_JOIN          	0x002C
//#define HostCmd_CMD_SET_ACTIVE_SCAN_SSID      	0x002D

#define HostCmd_CMD_802_11_QUERY_RSN_OPTION         0x002d
#define HostCmd_CMD_802_11_QUERY_TKIP_REPLY_CNTRS   0x002e
#define HostCmd_CMD_802_11_ENABLE_RSN               0x002f
#define HostCmd_CMD_802_11_CONFIG_RSN               0x0030
#define HostCmd_CMD_802_11_UNICAST_CIPHER           0x0031
#define HostCmd_CMD_802_11_RSN_AUTH_SUITES          0x0032
#define HostCmd_CMD_802_11_RSN_STATS                0x0033
#define HostCmd_CMD_802_11_PWK_KEY                  0x0034
#define HostCmd_CMD_802_11_GRP_KEY                  0x0035
#define HostCmd_CMD_802_11_PAIRWISE_TSC             0x0036
#define HostCmd_CMD_802_11_GROUP_TSC                0x0037

#define HostCmd_CMD_802_11_ENABLE_QOS_WME           0x0038
#define HostCmd_CMD_802_11_WME_AC_PARAMS            0x0039
#define HostCmd_CMD_802_11_AD_HOC_STOP				0x0040
#define HostCmd_CMD_802_11_MCAST_CIPHER           	0x003A

#ifdef DEEP_SLEEP
#define HostCmd_CMD_802_11_DEEP_SLEEP 				0x003E
#endif 

#ifdef HOST_SLEEP
#define	HostCmd_CMD_802_11_HOST_SLEEP_CFG			0x0043
#define	HostCmd_CMD_802_11_HOST_SLEEP_AWAKE_CONFIRM	0x0044
#endif

// test mode
#define HostCmd_CMD_TEST_TX_MODE                    0x004A
#define HostCmd_CMD_TEST_RX_MODE                    0x004B //tt It's value is the same as TX_CONTROL_MODE (ref. linux driver)

// read or write region code
#define HostCmd_CMD_REGION_CODE                     0x004C  

// read or write MAC address
#define HostCmd_CMD_MAC_ADDRESS                     0x004D

// set LED Control
#define HostCmd_CMD_802_11_LED_CONTROL              0x004E

// set multiple DTIM
#define HostCmd_CMD_802_11_MULTIPLE_DTIM            0x004F

// Extended Associate CMD
#define HostCmd_CMD_802_11_ASSOCIATE_EXT            0x0050
#define HostCmd_CMD_802_11_BAND_CONFIG              0x0058

#ifdef IF_GSPI
#define HostCmd_CMD_GSPI_BUS_CONFIG					0x005A
#endif

#ifdef ENABLE_802_11D
#define HostCmd_CMD_802_11D_DOMAIN_INFO       		0x005b
#endif

#ifdef WPA2
#define HostCmd_CMD_802_11_KEY_MATERIAL       		0x005e
#endif

#ifdef ENABLE_802_11H_TPC
#define HostCmd_CMD_802_11H_TPC_INFO          		0x005f
#define HostCmd_CMD_802_11H_TPC_REQUEST       		0x0060
#endif

// BT mode configuration (value could change)
#define HostCmd_CMD_BCA_CONFIG                      0x0065

#define HostCmd_CMD_802_11_SLEEP_PARAMS          	0x0066

#define HostCmd_CMD_802_11_INACTIVITY_TIMEOUT    	0x0067

#define HostCmd_CMD_802_11_SLEEP_PERIOD          	0x0068

#ifdef  BCA
#define HostCmd_CMD_802_11_BCA_CONFIG_TIMESHARE  	0x0069
#endif
#ifdef	BG_SCAN
#define HostCmd_CMD_802_11_BG_SCAN_CONFIG			0x006b
#define HostCmd_CMD_802_11_BG_SCAN_QUERY			0x006c
#endif 

#ifdef CAL_DATA
#define HostCmd_CMD_802_11_CAL_DATA_EXT         	0x006d
#endif

#define HostCmd_CMD_802_11_TPC_CFG              	0x0072
#define HostCmd_CMD_802_11_PWR_CFG              	0x0073

#define HostCmd_CMD_802_11_FW_WAKE_METHOD        	0x0074

#ifdef WMM
#define HostCmd_CMD_802_11_WMM_ACK_POLICY			0x005C
#define HostCmd_CMD_802_11_WMM_GET_STATUS			0x0071
#endif


#ifdef CIPHER_TEST
#define HostCmd_CMD_802_11_KEY_ENCRYPT				0x0054
#define HostCmd_CMD_802_11_CRYPTO					0x0078
#endif

//dralee_20060601
#ifdef IBSS_COALESCE  
#define HostCmd_CMD_802_11_IBSS_COALESING_STATUS   0x0083                    
#endif

#ifdef GET_TX_RATE
#define HostCmd_CMD_802_11_TX_RATE_QUERY			0x007f
#endif

#ifdef PA_CFG_EXT
#define HostCmd_CMD_802_11_POWER_ADAPT_CFG_EXT		0x007e
#endif

#ifdef CCX_v4
#define HostCmd_CMD_802_11_GET_TSF					0x0080
#define HostCmd_CMD_802_11_WMM_ADDTS_REQ			0x006e
#define HostCmd_CMD_802_11_WMM_DELTS_REQ			0x006f
#define HostCmd_CMD_802_11_WMM_QUEUE_CONFIG			0x0070
#define HostCmd_CMD_802_11_WMM_QUEUE_STATS			0x0081
#endif ///CCX_v4
//***************************************************************************
//
//          16 bit RET code, MSB is set to 1
//
#define HostCmd_RET_NONE                        	0x8000
#define HostCmd_RET_HW_SPEC_INFO                	0x8003
#define HostCmd_RET_EEPROM_ACCESS               	0x8004
#define HostCmd_RET_802_11_RESET                	0x8005
#define HostCmd_RET_802_11_SCAN                 	0x8006
#define HostCmd_RET_802_11_QUERY_SCAN_RESULT    	0x8029
#define HostCmd_RET_802_11_QUERY_TRAFFIC        	0x8009
#define HostCmd_RET_802_11_STATUS_INFO          	0x800a
#define HostCmd_RET_802_11_GET_LOG              	0x800b
#define HostCmd_RET_MAC_CONTROL                 	0x8028
#define HostCmd_RET_MAC_MULTICAST_ADR           	0x8010
#define HostCmd_RET_802_11_AUTHENTICATE         	0x8011
#define HostCmd_RET_802_11_DEAUTHENTICATE       	0x8024
#define HostCmd_RET_802_11_ASSOCIATE            	0x8012
#define HostCmd_RET_802_11_REASSOCIATE          	0x8025
#define HostCmd_RET_802_11_DISASSOCIATE         	0x8026
#define HostCmd_RET_802_11_SET_WEP              	0x8013
#define HostCmd_RET_802_11_STAT                 	0x8014
#define HostCmd_RET_802_3_STAT                  	0x8015
#define HostCmd_RET_802_11_SNMP_MIB             	0x8016
#define HostCmd_RET_MAC_REG_MAP                 	0x8017
#define HostCmd_RET_BBP_REG_MAP                 	0x8018
#define HostCmd_RET_RF_REG_MAP                  	0x8023
#define HostCmd_RET_MAC_REG_ACCESS              	0x8019
#define HostCmd_RET_BBP_REG_ACCESS              	0x801a
#define HostCmd_RET_RF_REG_ACCESS               	0x801b
#define HostCmd_RET_802_11_RADIO_CONTROL        	0x801c
#define HostCmd_RET_802_11_RF_CHANNEL           	0x801d
#define HostCmd_RET_802_11_RSSI                 	0x801f
#define HostCmd_RET_802_11_RF_TX_POWER          	0x801e
#define HostCmd_RET_802_11_RF_ANTENNA           	0x8020
#define HostCmd_RET_802_11_PS_MODE              	0x8021
#define HostCmd_RET_802_11_DATA_RATE            	0x8022
#define HostCmd_RET_802_11_AD_HOC_START         	0x802B
#define HostCmd_RET_802_11_AD_HOC_JOIN          	0x802C
#define HostCmd_RET_802_11_QUERY_RSN_OPTION         0x802d
#define HostCmd_RET_802_11_QUERY_TKIP_REPLY_CNTRS   0x802e
#define HostCmd_RET_802_11_ENABLE_RSN               0x802f
#define HostCmd_RET_802_11_CONFIG_RSN               0x8030
#define HostCmd_RET_802_11_UNICAST_CIPHER           0x8031
#define HostCmd_RET_802_11_RSN_AUTH_SUITES          0x8032
#define HostCmd_RET_802_11_RSN_STATS                0x8033
#define HostCmd_RET_802_11_PWK_KEY                  0x8034
#define HostCmd_RET_802_11_GRP_KEY                  0x8035
#define HostCmd_RET_802_11_PAIRWISE_TSC             0x8036
#define HostCmd_RET_802_11_GROUP_TSC                0x8037

#define HostCmd_RET_802_11_ENABLE_QOS_WME           0x8038
#define HostCmd_RET_802_11_WME_AC_PARAMS            0x8039
#define HostCmd_RET_802_11_AD_HOC_STOP				0x8040
#define HostCmd_RET_802_11_MCAST_CIPHER           	0x803A

#ifdef DEEP_SLEEP
#define HostCmd_RET_802_11_DEEP_SLEEP 				0x803E
#endif 

#ifdef HOST_SLEEP
#define	HostCmd_RET_802_11_HOST_SLEEP_CFG				0x8043
#define	HostCmd_RET_802_11_HOST_SLEEP_AWAKE_CONFIRM		0x8044
#endif

// test mode
#define HostCmd_RET_TEST_TX_MODE                    0x804A
#define HostCmd_RET_TEST_RX_MODE                    0x804B
#define HostCmd_RET_REGION_CODE                     0x804C
#define HostCmd_RET_MAC_ADDRESS                     0x804D
#define HostCmd_RET_802_11_LED_CONTROL              0x804E
#define HostCmd_RET_802_11_MULTIPLE_DTIM            0x804F

// Extended Associate CMD
#define HostCmd_RET_802_11_ASSOCIATE_EXT            0x8012 
#define HostCmd_RET_BCA_CONFIG                      0x8065 

#define HostCmd_RET_802_11_BAND_CONFIG              0x8058
#ifdef CAL_DATA
#define HostCmd_RET_802_11_CAL_DATA           		0x8057
#endif

#ifdef WPA2
#define HostCmd_RET_802_11_KEY_MATERIAL             0x805e
#endif

#define HostCmd_RET_802_11_SLEEP_PARAMS        	    0x8066

#define HostCmd_RET_802_11_INACTIVITY_TIMEOUT    	0x8067
 
#ifdef BG_SCAN
#define HostCmd_RET_802_11_BG_SCAN_CONFIG			0x806b
#define HostCmd_RET_802_11_BG_SCAN_QUERY			0x806c
#endif 


#define HostCmd_RET_802_11_FW_WAKE_METHOD           0x8074

#ifdef WMM
#define HostCmd_RET_802_11_WMM_ACK_POLICY			0x805C
#define HostCmd_RET_802_11_WMM_GET_STATUS			0x8071
#endif //WMM                    

//#ifdef WMM_UAPSD  //++dralee_20060307
#define HostCmd_RET_802_11_SLEEP_PERIOD				0x8068
//#endif //WMM_UAPSD

#ifdef CIPHER_TEST
#define HostCmd_RET_802_11_KEY_ENCRYPT				0x8054
#define HostCmd_RET_802_11_CRYPTO					0x8078
#endif

#ifdef ENABLE_802_11D
#define HostCmd_RET_802_11D_DOMAIN_INFO       		0x805b
#endif 

//dralee_20060601
#ifdef IBSS_COALESCE  
#define HostCmd_RET_802_11_IBSS_COALESING_STATUS   0x8083                    
#endif


#ifdef GET_TX_RATE
#define HostCmd_RET_802_11_TX_RATE_QUERY			0x807f
#endif

#ifdef PA_CFG_EXT
#define HostCmd_RET_802_11_POWER_ADAPT_CFG_EXT		0x807e
#endif
#ifdef CCX_v4
#define HostCmd_RET_802_11_GET_TSF					0x8080
#define HostCmd_RET_802_11_WMM_ADDTS_REQ			0x806e
#define HostCmd_RET_802_11_WMM_DELTS_REQ			0x806f
#define HostCmd_RET_802_11_WMM_QUEUE_CONFIG			0x8070
#define HostCmd_RET_802_11_WMM_QUEUE_STATS			0x8081
#endif ///CCX_v4
//***************************************************************************
// 
// Define general result code for each command
//
#define HostCmd_RESULT_OK                       	0x0000 // OK
#define HostCmd_RESULT_ERROR                    	0x0001 // Genenral error
#define HostCmd_RESULT_NOT_SUPPORT              	0x0002 // Command is not valid
#define HostCmd_RESULT_PENDING                  	0x0003 // Command is pending (will be processed)
#define HostCmd_RESULT_BUSY                     	0x0004 // System is busy (command ignored)
#define HostCmd_RESULT_PARTIAL_DATA             	0x0005 // Data buffer is not big enough


⌨️ 快捷键说明

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