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

📄 hostcmd.h

📁 Windows CE 6.0 BSP for VOIP sample phone. Intel PXA270 platform.
💻 H
📖 第 1 页 / 共 5 页
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
/** @file hostcmd.h
 *  @This file contains the function prototypes, data structure and defines 
 *   for all the host/station commands. 
 *
 *  Copyright (c) Marvell Semiconductor, Inc. 
 */

#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

#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_WAKEUP
#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_802_11_TX_MODE				0x004A
#define HostCmd_CMD_802_11_TX_CONTROL_MODE		0x004B

// 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 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

#define HostCmd_CMD_BCA_CONFIG                			0x0065

#define HostCmd_CMD_802_11_SLEEP_PARAMS          	0x0066

#ifdef V4_CMDS
#define HostCmd_CMD_802_11_INACTIVITY_TIMEOUT    	0x0067
#endif

#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         				0x0057
#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

#define HostCmd_CMD_802_11_SUBSCRIBE_EVENT			0x0075
#define HostCmd_CMD_802_11_RATE_ADAPT_RATESET		0x0076

//***************************************************************************
//
//          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_WAKEUP
#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_802_11_TX_MODE					0x804A
#define HostCmd_RET_802_11_TX_CONTROL_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 WPA2
#define HostCmd_RET_802_11_KEY_MATERIAL             		0x805e
#endif

#ifdef ENABLE_802_11H_TPC
#define HostCmd_RET_802_11H_TPC_INFO          			0x805f
#define HostCmd_RET_802_11H_TPC_REQUEST       			0x8060
#endif

#define HostCmd_RET_BCA_CONFIG                				0x8065

#define HostCmd_RET_802_11_SLEEP_PARAMS        	    		0x8066

#ifdef V4_CMDS
#define HostCmd_RET_802_11_INACTIVITY_TIMEOUT    		0x8067
#endif

#define HostCmd_RET_802_11_SLEEP_PERIOD          		0x8068


#ifdef  BCA
#define HostCmd_RET_802_11_BCA_CONFIG_TIMESHARE  	0x8069
#endif

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

#ifdef CAL_DATA
#define HostCmd_RET_802_11_CAL_DATA         				0x8057
#define HostCmd_RET_802_11_CAL_DATA_EXT         		0x806d
#endif

#define HostCmd_RET_802_11_TPC_CFG              			0x8072
#define HostCmd_RET_802_11_PWR_CFG              			0x8073

#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

#define HostCmd_RET_802_11_SUBSCRIBE_EVENT			0x8075
#define HostCmd_RET_802_11_RATE_ADAPT_RATESET		0x8076

//***************************************************************************
// 
// 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


//***************************************************************************
// 
// Definition of action or option for each command
//
// Define general purpose action
//
#define HostCmd_ACT_GEN_READ                    	0x0000
#define HostCmd_ACT_GEN_WRITE                   	0x0001
#define HostCmd_ACT_GEN_GET                     		0x0000
#define HostCmd_ACT_GEN_SET                     		0x0001
#define HostCmd_ACT_GEN_OFF                     		0x0000
#define HostCmd_ACT_GEN_ON                      		0x0001

// Define action or option for HostCmd_CMD_802_11_AUTHENTICATE
#define HostCmd_ACT_AUTHENTICATE                	0x0001
#define HostCmd_ACT_DEAUTHENTICATE              	0x0002

// Define action or option for HostCmd_CMD_802_11_ASSOCIATE
#define HostCmd_ACT_ASSOCIATE                   	0x0001
#define HostCmd_ACT_DISASSOCIATE                	0x0002
#define HostCmd_ACT_REASSOCIATE                 	0x0003

#define HostCmd_Assoc_RESULT_SUCCESS                        0x0000
#define HostCmd_Assoc_RESULT_INVAILD_PARAMETERS  0x0001

⌨️ 快捷键说明

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