hfa384x.h
来自「Linux的无线局域网方案是一个Linux设备驱动程序和子系统 一揽子方案的用」· C头文件 代码 · 共 1,540 行 · 第 1/5 页
H
1,540 行
typedef struct hfa384x_STAIdentity{ UINT16 STACompID __WLAN_ATTRIB_PACK__; UINT16 STAVariant __WLAN_ATTRIB_PACK__; UINT16 STAMajorVersion __WLAN_ATTRIB_PACK__; UINT16 STAMinorVersion __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_STAIdentity_t;/*-- Information Record: STASupRange --*/typedef struct hfa384x_STASupRange{ UINT16 STARole __WLAN_ATTRIB_PACK__; UINT16 STAID __WLAN_ATTRIB_PACK__; UINT16 STAVariant __WLAN_ATTRIB_PACK__; UINT16 STABottom __WLAN_ATTRIB_PACK__; UINT16 STATop __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_STASupRange_t;/*-- Information Record: MFIActRanges --*/typedef struct hfa384x_MFIActRanges{ UINT16 MFIRole __WLAN_ATTRIB_PACK__; UINT16 MFIID __WLAN_ATTRIB_PACK__; UINT16 MFIVariant __WLAN_ATTRIB_PACK__; UINT16 MFIBottom __WLAN_ATTRIB_PACK__; UINT16 MFITop __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_MFIActRanges_t;/*--------------------------------------------------------------------Information Record Structures: NIC Information--------------------------------------------------------------------*//*-- Information Record: PortStatus --*/typedef struct hfa384x_PortStatus{ UINT16 PortStatus __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_PortStatus_t;#define HFA384x_PSTATUS_DISABLED ((UINT16)1)#define HFA384x_PSTATUS_SEARCHING ((UINT16)2)#define HFA384x_PSTATUS_CONN_IBSS ((UINT16)3)#define HFA384x_PSTATUS_CONN_ESS ((UINT16)4)#define HFA384x_PSTATUS_OUTOFRANGE ((UINT16)5)#define HFA384x_PSTATUS_CONN_WDS ((UINT16)6)/*-- Information Record: CurrentSSID --*/typedef struct hfa384x_CurrentSSID{ UINT8 CurrentSSID[34] __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CurrentSSID_t;/*-- Information Record: CurrentBSSID --*/typedef struct hfa384x_CurrentBSSID{ UINT8 CurrentBSSID[6] __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CurrentBSSID_t;/*-- Information Record: commsquality --*/typedef struct hfa384x_commsquality{ UINT16 CQ_currBSS __WLAN_ATTRIB_PACK__; UINT16 ASL_currBSS __WLAN_ATTRIB_PACK__; UINT16 ANL_currFC __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_commsquality_t;/*-- Information Record: dmbcommsquality --*/typedef struct hfa384x_dbmcommsquality{ UINT16 CQdbm_currBSS __WLAN_ATTRIB_PACK__; UINT16 ASLdbm_currBSS __WLAN_ATTRIB_PACK__; UINT16 ANLdbm_currFC __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_dbmcommsquality_t;/*-- Information Record: CurrentTxRate --*/typedef struct hfa384x_CurrentTxRate{ UINT16 CurrentTxRate __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CurrentTxRate_t;/*-- Information Record: CurrentBeaconInterval --*/typedef struct hfa384x_CurrentBeaconInterval{ UINT16 CurrentBeaconInterval __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CurrentBeaconInterval_t;/*-- Information Record: CurrentScaleThresholds --*/typedef struct hfa384x_CurrentScaleThresholds{ UINT16 EnergyDetectThreshold __WLAN_ATTRIB_PACK__; UINT16 CarrierDetectThreshold __WLAN_ATTRIB_PACK__; UINT16 DeferDetectThreshold __WLAN_ATTRIB_PACK__; UINT16 CellSearchThreshold __WLAN_ATTRIB_PACK__; /* Stations only */ UINT16 DeadSpotThreshold __WLAN_ATTRIB_PACK__; /* Stations only */} __WLAN_ATTRIB_PACK__ hfa384x_CurrentScaleThresholds_t;/*-- Information Record: ProtocolRspTime --*/typedef struct hfa384x_ProtocolRspTime{ UINT16 ProtocolRspTime __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_ProtocolRspTime_t;/*-- Information Record: ShortRetryLimit --*/typedef struct hfa384x_ShortRetryLimit{ UINT16 ShortRetryLimit __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_ShortRetryLimit_t;/*-- Information Record: LongRetryLimit --*/typedef struct hfa384x_LongRetryLimit{ UINT16 LongRetryLimit __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_LongRetryLimit_t;/*-- Information Record: MaxTransmitLifetime --*/typedef struct hfa384x_MaxTransmitLifetime{ UINT16 MaxTransmitLifetime __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_MaxTransmitLifetime_t;/*-- Information Record: MaxReceiveLifetime --*/typedef struct hfa384x_MaxReceiveLifetime{ UINT16 MaxReceiveLifetime __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_MaxReceiveLifetime_t;/*-- Information Record: CFPollable --*/typedef struct hfa384x_CFPollable{ UINT16 CFPollable __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CFPollable_t;/*-- Information Record: AuthenticationAlgorithms --*/typedef struct hfa384x_AuthenticationAlgorithms{ UINT16 AuthenticationType __WLAN_ATTRIB_PACK__; UINT16 TypeEnabled __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_AuthenticationAlgorithms_t;/*-- Information Record: AuthenticationAlgorithms(data only --*/typedef struct hfa384x_AuthenticationAlgorithms_data{ UINT16 AuthenticationType __WLAN_ATTRIB_PACK__; UINT16 TypeEnabled __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_AuthenticationAlgorithms_data_t;/*-- Information Record: PrivacyOptionImplemented --*/typedef struct hfa384x_PrivacyOptionImplemented{ UINT16 PrivacyOptionImplemented __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_PrivacyOptionImplemented_t;/*-- Information Record: OwnMACAddress --*/typedef struct hfa384x_OwnMACAddress{ UINT8 OwnMACAddress[6] __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_OwnMACAddress_t;/*-- Information Record: PCFInfo --*/typedef struct hfa384x_PCFInfo{ UINT16 MediumOccupancyLimit __WLAN_ATTRIB_PACK__; UINT16 CFPPeriod __WLAN_ATTRIB_PACK__; UINT16 CFPMaxDuration __WLAN_ATTRIB_PACK__; UINT16 CFPFlags __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_PCFInfo_t;/*-- Information Record: PCFInfo (data portion only) --*/typedef struct hfa384x_PCFInfo_data{ UINT16 MediumOccupancyLimit __WLAN_ATTRIB_PACK__; UINT16 CFPPeriod __WLAN_ATTRIB_PACK__; UINT16 CFPMaxDuration __WLAN_ATTRIB_PACK__; UINT16 CFPFlags __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_PCFInfo_data_t;/*--------------------------------------------------------------------Information Record Structures: Modem Information Records --------------------------------------------------------------------*//*-- Information Record: PHYType --*/typedef struct hfa384x_PHYType{ UINT16 PHYType __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_PHYType_t;/*-- Information Record: CurrentChannel --*/typedef struct hfa384x_CurrentChannel{ UINT16 CurrentChannel __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CurrentChannel_t;/*-- Information Record: CurrentPowerState --*/typedef struct hfa384x_CurrentPowerState{ UINT16 CurrentPowerState __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CurrentPowerState_t;/*-- Information Record: CCAMode --*/typedef struct hfa384x_CCAMode{ UINT16 CCAMode __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_CCAMode_t;/*-- Information Record: SupportedDataRates --*/typedef struct hfa384x_SupportedDataRates{ UINT8 SupportedDataRates[10] __WLAN_ATTRIB_PACK__;} __WLAN_ATTRIB_PACK__ hfa384x_SupportedDataRates_t;/*-------------------------------------------------------------------- FRAME DESCRIPTORS AND FRAME STRUCTURESFRAME DESCRIPTORS: Offsets----------------------------------------------------------------------Control Info (offset 44-51)--------------------------------------------------------------------*/#define HFA384x_FD_STATUS_OFF ((UINT16)0x44)#define HFA384x_FD_TIME_OFF ((UINT16)0x46)#define HFA384x_FD_SWSUPPORT_OFF ((UINT16)0x4A)#define HFA384x_FD_SILENCE_OFF ((UINT16)0x4A)#define HFA384x_FD_SIGNAL_OFF ((UINT16)0x4B)#define HFA384x_FD_RATE_OFF ((UINT16)0x4C)#define HFA384x_FD_RXFLOW_OFF ((UINT16)0x4D)#define HFA384x_FD_RESERVED_OFF ((UINT16)0x4E)#define HFA384x_FD_TXCONTROL_OFF ((UINT16)0x50)/*--------------------------------------------------------------------802.11 Header (offset 52-6B)--------------------------------------------------------------------*/#define HFA384x_FD_FRAMECONTROL_OFF ((UINT16)0x52)#define HFA384x_FD_DURATIONID_OFF ((UINT16)0x54)#define HFA384x_FD_ADDRESS1_OFF ((UINT16)0x56)#define HFA384x_FD_ADDRESS2_OFF ((UINT16)0x5C)#define HFA384x_FD_ADDRESS3_OFF ((UINT16)0x62)#define HFA384x_FD_SEQCONTROL_OFF ((UINT16)0x68)#define HFA384x_FD_ADDRESS4_OFF ((UINT16)0x6A)#define HFA384x_FD_DATALEN_OFF ((UINT16)0x70) /*--------------------------------------------------------------------802.3 Header (offset 72-7F)--------------------------------------------------------------------*/#define HFA384x_FD_DESTADDRESS_OFF ((UINT16)0x72)#define HFA384x_FD_SRCADDRESS_OFF ((UINT16)0x78)#define HFA384x_FD_DATALENGTH_OFF ((UINT16)0x7E)/*--------------------------------------------------------------------FRAME STRUCTURES: Communication Frames----------------------------------------------------------------------Communication Frames: Transmit Frames--------------------------------------------------------------------*//*-- Communication Frame: Transmit Frame Structure --*/typedef struct hfa384x_tx_frame{ UINT16 status __WLAN_ATTRIB_PACK__; UINT16 reserved1 __WLAN_ATTRIB_PACK__; UINT16 reserved2 __WLAN_ATTRIB_PACK__; UINT32 sw_support __WLAN_ATTRIB_PACK__; UINT16 reserved3 __WLAN_ATTRIB_PACK__; UINT16 tx_control __WLAN_ATTRIB_PACK__; /*-- 802.11 Header Information --*/ UINT16 frame_control __WLAN_ATTRIB_PACK__; UINT16 duration_id __WLAN_ATTRIB_PACK__; UINT8 address1[6] __WLAN_ATTRIB_PACK__; UINT8 address2[6] __WLAN_ATTRIB_PACK__; UINT8 address3[6] __WLAN_ATTRIB_PACK__; UINT16 sequence_control __WLAN_ATTRIB_PACK__; UINT8 address4[6] __WLAN_ATTRIB_PACK__; UINT16 data_len __WLAN_ATTRIB_PACK__; /* little endian format */ /*-- 802.3 Header Information --*/ UINT8 dest_addr[6] __WLAN_ATTRIB_PACK__; UINT8 src_addr[6] __WLAN_ATTRIB_PACK__; UINT16 data_length __WLAN_ATTRIB_PACK__; /* big endian format */} __WLAN_ATTRIB_PACK__ hfa384x_tx_frame_t;/*--------------------------------------------------------------------Communication Frames: Field Masks for Transmit Frames--------------------------------------------------------------------*//*-- Status Field --*/#define HFA384x_TXSTATUS_ACKERR ((UINT16)BIT5)#define HFA384x_TXSTATUS_FORMERR ((UINT16)BIT3)#define HFA384x_TXSTATUS_DISCON ((UINT16)BIT2)#define HFA384x_TXSTATUS_AGEDERR ((UINT16)BIT1)#define HFA384x_TXSTATUS_RETRYERR ((UINT16)BIT0)/*-- Transmit Control Field --*/#define HFA384x_TX_CFPOLL ((UINT16)BIT12)#define HFA384x_TX_PRST ((UINT16)BIT11)#define HFA384x_TX_MACPORT ((UINT16)(BIT10 | BIT9 | BIT8))#define HFA384x_TX_NOENCRYPT ((UINT16)BIT7)#define HFA384x_TX_RETRYSTRAT ((UINT16)(BIT6 | BIT5))#define HFA384x_TX_STRUCTYPE ((UINT16)(BIT4 | BIT3))#define HFA384x_TX_TXEX ((UINT16)BIT2)#define HFA384x_TX_TXOK ((UINT16)BIT1)/*--------------------------------------------------------------------Communication Frames: Test/Get/Set Field Values for Transmit Frames--------------------------------------------------------------------*//*-- Status Field --*/#define HFA384x_TXSTATUS_ISERROR(v) \ (((UINT16)(v))&\ (HFA384x_TXSTATUS_ACKERR|HFA384x_TXSTATUS_FORMERR|\ HFA384x_TXSTATUS_DISCON|HFA384x_TXSTATUS_AGEDERR|\ HFA384x_TXSTATUS_RETRYERR))#define HFA384x_TXSTATUS_ISACKERR(v) ((UINT16)(((UINT16)(v)) & HFA384x_TXSTATUS_ACKERR))#define HFA384x_TXSTATUS_ISFORMERR(v) ((UINT16)(((UINT16)(v)) & HFA384x_TXSTATUS_FORMERR))#define HFA384x_TXSTATUS_ISDISCON(v) ((UINT16)(((UINT16)(v)) & HFA384x_T
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?