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

📄 hostcmd.h

📁 marvell8385 GSPI开发驱动
💻 H
📖 第 1 页 / 共 5 页
字号:

typedef union IEEEtypes_PhyParamSet_t
{
   IEEEtypes_FhParamSet_t  FhParamSet;
   IEEEtypes_DsParamSet_t  DsParamSet;
} IEEEtypes_PhyParamSet_t;

typedef struct _WPA_SUPPLICANT
{
	UCHAR   Wpa_ie[256];
	UCHAR	Wpa_ie_len;
} WPA_SUPPLICANT, *PWPA_SUPPLICANT;

typedef struct _BSS_DESCRIPTION_SET_ALL_FIELDS
{
    UCHAR                     BSSID[MRVDRV_ETH_ADDR_LEN];
    UCHAR                     SSID[MRVDRV_MAX_SSID_LENGTH];
    UCHAR                     BSSType;
    USHORT                    BeaconPeriod;
    UCHAR                     DTIMPeriod;
    UCHAR                     TimeStamp[8];
    UCHAR                     LocalTime[8];
    IEEEtypes_PhyParamSet_t   PhyParamSet;
    IEEEtypes_SsParamSet_t    SsParamSet;
    IEEEtypes_CapInfo_t       Cap;
    // ToDo    
    UCHAR                     DataRates[NDIS_SUPPORTED_RATES];

	USHORT 					 bss_band;	

#ifdef ENABLE_802_11D
    UCHAR                    bHaveCountryIE;
	IEEEtypes_CountryInfoFullSet_t CountryInfo;
#endif

	WPA_SUPPLICANT			 wpa_supplicant;
#ifdef WPA2
    WPA_SUPPLICANT			 wpa2_supplicant;
#endif 

#ifdef WMM
	UCHAR Wmm_IE[WMM_PARA_IE_LENGTH + 2];
	UCHAR Wmm_ie_len;
#endif 

#ifdef ENABLE_802_11H_TPC
	UCHAR Sensed11H;
	IEEEtypes_PowerConstraint_t PowerConstraint;
	IEEEtypes_PowerCapability_t PowerCapability;
	IEEEtypes_TPCReport_t 		TPCReport;
#endif

} BSS_DESCRIPTION_SET_ALL_FIELDS, *PBSS_DESCRIPTION_SET_ALL_FIELDS;


typedef struct _BSS_DESCRIPTION_SET_FIXED_FIELDS {
    UCHAR BSSID[MRVDRV_ETH_ADDR_LEN];
    UCHAR SSID[MRVDRV_MAX_SSID_LENGTH];
    UCHAR BSSType;
    USHORT BeaconPeriod;
    UCHAR DTIMPeriod;
    UCHAR TimeStamp[8];
    UCHAR LocalTime[8];
} BSS_DESCRIPTION_SET_FIXED_FIELDS, *PBSS_DESCRIPTION_SET_FIXED_FIELDS;

#pragma pack()

//=============================================================================
//          HOST COMMAND DEFINITIONS
//=============================================================================

#pragma pack(1)
//
// Definition of data structure for each command
//
// Define general data structure
typedef struct _HostCmd_DS_GEN {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
} HostCmd_DS_GEN, *PHostCmd_DS_GEN;


#ifdef DEEP_SLEEP
#define HostCmd_DS_802_11_DEEP_SLEEP 		HostCmd_DS_GEN
#endif 

#ifdef HOST_SLEEP
typedef struct _HostCmd_DS_HOST_SLEEP {
	USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    ULONG  Criteria;
    UCHAR  GPIO;
	UCHAR  Gap;
} HostCmd_DS_HOST_SLEEP, *PHostCmd_DS_HOST_SLEEP;

#define HostCmd_DS_WAKEUP_CONFIRM 		HostCmd_DS_GEN

#endif 

// Define data structure for HostCmd_CMD_CODE_DNLD
typedef struct _HostCmd_DS_CODE_DNLD {
	USHORT	Len;
	USHORT	Type;
  UCHAR Code[4096];
} HostCmd_DS_CODE_DNLD, *PHostCmd_DS_CODE_DNLD;


// Define data structure for HostCmd_CMD_OP_PARAM_DNLD
typedef struct _HostCmd_DS_OP_PARAM_DNLD {
    UCHAR OpParam[4096];
} HostCmd_DS_OP_PARAM_DNLD, *PHostCmd_DS_OP_PARAM_DNLD;

#define MRVDRV_FW_CAPINFO_WPA  (1 << 0)
#define MRVDRV_FW_CAPINFO_PS   (1 << 1)
#define MRVDRV_FW_CAPINFO_GM   (1 << 2)


#ifdef IF_SPI
typedef struct _HostCmd_DS_CMD_GSPI_BUS_CONFIG {
    USHORT Command;                 // Command number
    USHORT Size;                    // Size of the data structure
    USHORT SeqNum;                  // Command sequence number
    USHORT Result;                  // Result code

    USHORT Action;  /* ACT_GET / ACT_SET */
    USHORT BusDelayMode; /* Data format Bit[1:0], Delay method Bit[2] */
    USHORT HostTimeDelayToReadPort; /* Number of dummy clocks 
					    to wait for read r/w port */
    USHORT HostTimeDelayToReadregister; /* Number of dummy 
						clocks to wait for read reg */
} HostCmd_DS_CMD_GSPI_BUS_CONFIG, *PHostCmd_DS_CMD_GSPI_BUS_CONFIG;
#endif

// Define data structure for HostCmd_CMD_GET_HW_SPEC
typedef struct _HostCmd_DS_GET_HW_SPEC {
    USHORT Command;                 // Command number
    USHORT Size;                    // Size of the data structure
    USHORT SeqNum;                  // Command sequence number
    USHORT Result;                  // Result code

#ifdef INTERFACE20
    USHORT  HWIfVersion;            // version of the hardware interface
#endif // #ifdef INTERFACE20

    USHORT  Version;                 // HW version
    USHORT  NumOfWCB;                // Max. number of WCB FW can handle
    USHORT  NumOfMCastAdr;           // Max. number of Multicast address FW can handle
    UCHAR   PermanentAddr[6];        // MAC address
    USHORT  RegionCode;              // Region Code
    USHORT  NumberOfAntenna;         // Number of antenna used
    ULONG   FWReleaseNumber;         // 4 byte of FW release number, example 0x1234=1.2.3.4
    ULONG   WcbBase;
    ULONG   RxPdRdPtr;
    ULONG   RxPdWrPtr;
    ULONG   fwCapInfo;              /* Firmware Capability Info */
} HostCmd_DS_GET_HW_SPEC, *PHostCmd_DS_GET_HW_SPEC;

// Define data structure for HostCmd_CMD_EEPROM_UPDATE
typedef struct _HostCmd_DS_EEPROM_ACCESS {
    USHORT  Command;
    USHORT  Size;
    USHORT  SeqNum;
    USHORT  Result;
    USHORT  Action;                  // Detailed action or option
    USHORT  DataLength;
    ULONG   Address;                 // target address
	UCHAR   Data[1];
} HostCmd_DS_EEPROM_ACCESS, *PHostCmd_DS_EEPROM_ACCESS;

// Define data structure for HostCmd_CMD_802_11_RESET
typedef struct _HostCmd_DS_802_11_RESET {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    USHORT Action;                  // ACT_NOT_REVERT_MIB, ACT_REVERT_MIB  or ACT_HALT
    USHORT Reserved;
} HostCmd_DS_802_11_RESET, *PHostCmd_DS_802_11_RESET;

#ifdef TLV_SCAN

typedef struct 	_MrvlIEtypes_RatesParamSet_t {
	MrvlIEtypesHeader_t	Header;
	UCHAR	Rates[1];
} MrvlIEtypes_RatesParamSet_t;

typedef struct 	_MrvlIEtypes_SsIdParamSet_t {
	MrvlIEtypesHeader_t	Header;
	UCHAR	SsId[1];
} MrvlIEtypes_SsIdParamSet_t;

typedef struct _ChanScanParamSet_t {
	UCHAR	RadioType;
	UCHAR	ChanNumber;
	UCHAR	ScanType;
	USHORT	MinScanTime;
	USHORT  ScanTime;
} ChanScanParamSet_t;

typedef struct 	_MrvlIEtypes_ChanListParamSet_t {
	MrvlIEtypesHeader_t	Header;
	ChanScanParamSet_t 	*ChanScanParam;
} MrvlIEtypes_ChanListParamSet_t;

typedef struct _HostCmd_DS_802_11_SCAN {
    USHORT  Command;
    USHORT  Size;
    USHORT  SeqNum;
    USHORT  Result;
	UCHAR	BSSType;
	UCHAR	BSSID[MRVDRV_ETH_ADDR_LEN];
	MrvlIEtypes_SsIdParamSet_t 	    SsIdParamSet;
	MrvlIEtypes_ChanListParamSet_t  ChanListParamSet;
	MrvlIEtypes_RatesParamSet_t     OpRateSet;
} HostCmd_DS_802_11_SCAN, *PHostCmd_DS_802_11_SCAN;

typedef struct _HostCmd_DS_802_11_SCAN_RSP {
	USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
	USHORT BSSDescriptSize;
	UCHAR  NumberOfSets;
} HostCmd_DS_802_11_SCAN_RSP, *PHostCmd_DS_802_11_SCAN_RSP;

#else // TLV_SCAN
// Define data structure for HostCmd_CMD_802_11_SCAN
typedef struct _HostCmd_DS_802_11_SCAN {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    USHORT IsAutoAssociation;
    UCHAR BSSType;
    UCHAR BSSID[MRVDRV_ETH_ADDR_LEN];
    UCHAR SSID[MRVDRV_MAX_SSID_LENGTH];
    UCHAR ScanType;
    USHORT ProbeDelay;
    UCHAR CHList[MRVDRV_MAX_CHANNEL_NUMBER];
    USHORT MinCHTime;
    USHORT MaxCHTime;
    USHORT Reserved;
} HostCmd_DS_802_11_SCAN, *PHostCmd_DS_802_11_SCAN;

// Define data structure for HostCmd_CMD_802_11_SCAN
typedef struct _HostCmd_DS_802_11_SCAN_RSP {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    UCHAR BSSID[MRVDRV_ETH_ADDR_LEN];
    CHAR  RSSI[MRVDRV_MAX_BSS_DESCRIPTS];
    USHORT BSSDescriptSize;
    UCHAR  NumberOfSets;
} HostCmd_DS_802_11_SCAN_RSP, *PHostCmd_DS_802_11_SCAN_RSP;
#endif //TLV_SCAN

// Define data structure for HostCmd_CMD_802_11_QUERY_TRAFFIC
typedef struct _HostCmd_DS_802_11_QUERY_TRAFFIC {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    ULONG Traffic;                  // Traffic in bps
} HostCmd_DS_802_11_QUERY_TRAFFIC, *PHostCmd_DS_802_11_QUERY_TRAFFIC;

// Define data structure for HostCmd_CMD_802_11_QUERY_STATUS
typedef struct _HostCmd_DS_802_11_QUERY_STATUS {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    USHORT FWStatus;
    USHORT MACStatus;
    USHORT RFStatus;
    USHORT CurentChannel;           // 1..99
    UCHAR APMACAdr[6];              // Associated AP MAC address
    USHORT Reserved;
    ULONG MaxLinkSpeed;             // Allowable max.link speed in unit of 100bps
} HostCmd_DS_802_11_QUERY_STATUS, *PHostCmd_DS_802_11_QUERY_STATUS;

// Define data structure for HostCmd_CMD_802_11_GET_LOG
typedef struct _HostCmd_DS_802_11_GET_LOG {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    UCHAR Log[512];
} HostCmd_DS_802_11_GET_LOG, *PHostCmd_DS_802_11_GET_LOG;

// Define data structure for HostCmd_CMD_MAC_CONTROL
typedef struct _HostCmd_DS_MAC_CONTROL {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    USHORT Action;                  // RX, TX, INT, WEP, LOOPBACK on/off
    USHORT Reserved;
} HostCmd_DS_MAC_CONTROL, *PHostCmd_DS_MAC_CONTROL;

// Define data structure for HostCmd_CMD_MAC_MULTICAST_ADR
typedef struct _HostCmd_DS_MAC_MULTICAST_ADR {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    USHORT Action;
    USHORT NumOfAdrs;
    UCHAR MACList[HostCmd_SIZE_MAC_ADR*HostCmd_MAX_MCAST_ADRS];
} HostCmd_DS_MAC_MULTICAST_ADR, *PHostCmd_DS_MAC_MULTICAST_ADR;

// Define data structure for HostCmd_CMD_802_11_AUTHENTICATE
typedef struct _HostCmd_DS_802_11_AUTHENTICATE {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    UCHAR MacAddr[6];
    UCHAR AuthType;
    USHORT TimeOut;
    UCHAR  Reserved[3];
} HostCmd_DS_802_11_AUTHENTICATE, *PHostCmd_DS_802_11_AUTHENTICATE;

// Define data structure for HostCmd_RET_802_11_AUTHENTICATE
typedef struct _HostCmd_DS_802_11_AUTHENTICATE_RESULT {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    UCHAR MacAddr[6];
    UCHAR AuthType;
    UCHAR AuthStatus;
} HostCmd_DS_802_11_AUTHENTICATE_RESULT, *PHostCmd_DS_802_11_AUTHENTICATE_RESULT;

// Define data structure for HostCmd_CMD_802_11_DEAUTHENTICATE
typedef struct _HostCmd_DS_802_11_DEAUTHENTICATE {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    UCHAR MacAddr[6];
    ULONG ReasonCode;
} HostCmd_DS_802_11_DEAUTHENTICATE, *PHostCmd_DS_802_11_DEAUTHENTICATE;

// Define data structure for HostCmd_RET_802_11_DEAUTHENTICATE
typedef struct _HostCmd_DS_802_11_DEAUTHENTICATE_RESULT {
    USHORT Command;
    USHORT Size;
    USHORT SeqNum;
    USHORT Result;
    UCHAR MacAddr[6];
    UCHAR AuthStatus;
    UCHAR Reserved;
} HostCmd_DS_802_11_DEAUTHENTICATE_RESULT, *PHostCmd_DS_802_11_DEAUTHENTICATE_RESULT;

// Define data structure for HostCmd_CMD_802_11_ASSOCIATE and  
//  HostCmd_CMD_802_11_REASSOCIATE
#ifdef TLV_ASSOCIATE

#define	WLAN_SUPPORTED_RATES		14

typedef struct _CfParamSet_t {
	UCHAR	CfpCnt;
	UCHAR	CfpPeriod;
	USHORT	CfpMaxDuration;
	USHORT	CfpDurationRemaining;
} CfParamSet_t;

typedef struct _IbssParamSet_t {
	USHORT	AtimWindow;
} IbssParamSet_t;

typedef struct _MrvlIEtypes_SsParamSet_t {
	MrvlIEtypesHeader_t	Header;
	union {
		CfParamSet_t	CfParamSet[1];
		IbssParamSet_t	IbssParamSet[1];
	} cf_ibss;
} MrvlIEtypes_SsParamSet_t;

typedef struct _FhParamSet_t {
	USHORT	DwellTime;
	UCHAR	HopSet;
	UCHAR	HopPattern;
	UCHAR	HopIndex;
}  FhParamSet_t;

typedef struct _DsParamSet_t {
	UCHAR	CurrentChan;
}  DsParamSet_t;

typedef struct _MrvlIEtypes_PhyParamSet_t {
	MrvlIEtypesHeader_t	Header;
	union {
		FhParamSet_t	FhParamSet[1];
		DsParamSet_t	DsParamSet[1];
	} fh_ds;
}  MrvlIEtypes_PhyParamSet_t;


⌨️ 快捷键说明

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