mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 22:43:04 +00:00
rtl8188eu: Fix C90 comments in include/*.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
49ab4b6c4f
commit
f9d86b986b
81 changed files with 3809 additions and 3960 deletions
190
include/wifi.h
190
include/wifi.h
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
#ifdef BIT
|
||||
//#error "BIT define occurred earlier elsewhere!\n"
|
||||
/* error "BIT define occurred earlier elsewhere!\n" */
|
||||
#undef BIT
|
||||
#endif
|
||||
#define BIT(x) (1 << (x))
|
||||
|
@ -51,20 +51,20 @@
|
|||
|
||||
#define P80211CAPTURE_VERSION 0x80211001
|
||||
|
||||
// This value is tested by WiFi 11n Test Plan 5.2.3.
|
||||
// This test verifies the WLAN NIC can update the NAV through sending the CTS with large duration.
|
||||
#define WiFiNavUpperUs 30000 // 30 ms
|
||||
/* This value is tested by WiFi 11n Test Plan 5.2.3. */
|
||||
/* This test verifies the WLAN NIC can update the NAV through sending the CTS with large duration. */
|
||||
#define WiFiNavUpperUs 30000 /* 30 ms */
|
||||
|
||||
enum WIFI_FRAME_TYPE {
|
||||
WIFI_MGT_TYPE = (0),
|
||||
WIFI_CTRL_TYPE = (BIT(2)),
|
||||
WIFI_DATA_TYPE = (BIT(3)),
|
||||
WIFI_QOS_DATA_TYPE = (BIT(7)|BIT(3)), //!< QoS Data
|
||||
WIFI_QOS_DATA_TYPE = (BIT(7)|BIT(3)), /* QoS Data */
|
||||
};
|
||||
|
||||
enum WIFI_FRAME_SUBTYPE {
|
||||
|
||||
// below is for mgt frame
|
||||
/* below is for mgt frame */
|
||||
WIFI_ASSOCREQ = (0 | WIFI_MGT_TYPE),
|
||||
WIFI_ASSOCRSP = (BIT(4) | WIFI_MGT_TYPE),
|
||||
WIFI_REASSOCREQ = (BIT(5) | WIFI_MGT_TYPE),
|
||||
|
@ -78,7 +78,7 @@ enum WIFI_FRAME_SUBTYPE {
|
|||
WIFI_DEAUTH = (BIT(7) | BIT(6) | WIFI_MGT_TYPE),
|
||||
WIFI_ACTION = (BIT(7) | BIT(6) | BIT(4) | WIFI_MGT_TYPE),
|
||||
|
||||
// below is for control frame
|
||||
/* below is for control frame */
|
||||
WIFI_PSPOLL = (BIT(7) | BIT(5) | WIFI_CTRL_TYPE),
|
||||
WIFI_RTS = (BIT(7) | BIT(5) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
WIFI_CTS = (BIT(7) | BIT(6) | WIFI_CTRL_TYPE),
|
||||
|
@ -86,7 +86,7 @@ enum WIFI_FRAME_SUBTYPE {
|
|||
WIFI_CFEND = (BIT(7) | BIT(6) | BIT(5) | WIFI_CTRL_TYPE),
|
||||
WIFI_CFEND_CFACK = (BIT(7) | BIT(6) | BIT(5) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
|
||||
// below is for data frame
|
||||
/* below is for data frame */
|
||||
WIFI_DATA = (0 | WIFI_DATA_TYPE),
|
||||
WIFI_DATA_CFACK = (BIT(4) | WIFI_DATA_TYPE),
|
||||
WIFI_DATA_CFPOLL = (BIT(5) | WIFI_DATA_TYPE),
|
||||
|
@ -110,7 +110,7 @@ enum WIFI_REASON_CODE {
|
|||
_RSON_DISAOC_STA_LEAVING_ = 8,
|
||||
_RSON_ASOC_NOT_AUTH_ = 9,
|
||||
|
||||
// WPA reason
|
||||
/* WPA reason */
|
||||
_RSON_INVALID_IE_ = 13,
|
||||
_RSON_MIC_FAILURE_ = 14,
|
||||
_RSON_4WAY_HNDSHK_TIMEOUT_ = 15,
|
||||
|
@ -123,7 +123,7 @@ enum WIFI_REASON_CODE {
|
|||
_RSON_INVALID_RSNE_CAP_ = 22,
|
||||
_RSON_IEEE_802DOT1X_AUTH_FAIL_ = 23,
|
||||
|
||||
//belowing are Realtek definition
|
||||
/* belowing are Realtek definition */
|
||||
_RSON_PMK_NOT_AVAILABLE_ = 24,
|
||||
_RSON_TDLS_TEAR_TOOFAR_ = 25,
|
||||
_RSON_TDLS_TEAR_UN_RSN_ = 26,
|
||||
|
@ -185,7 +185,7 @@ enum WIFI_STATUS_CODE {
|
|||
#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
|
||||
#define WLAN_STATUS_ASSOC_DENIED_RATES 18 */
|
||||
|
||||
//entended
|
||||
/* entended */
|
||||
/* IEEE 802.11b */
|
||||
#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
|
||||
#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
|
||||
|
@ -438,16 +438,16 @@ __inline static unsigned char * get_da(unsigned char *pframe)
|
|||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
||||
switch (to_fr_ds) {
|
||||
case 0x00: // ToDs=0, FromDs=0
|
||||
case 0x00: /* ToDs=0, FromDs=0 */
|
||||
da = GetAddr1Ptr(pframe);
|
||||
break;
|
||||
case 0x01: // ToDs=0, FromDs=1
|
||||
case 0x01: /* ToDs=0, FromDs=1 */
|
||||
da = GetAddr1Ptr(pframe);
|
||||
break;
|
||||
case 0x02: // ToDs=1, FromDs=0
|
||||
case 0x02: /* ToDs=1, FromDs=0 */
|
||||
da = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
default: // ToDs=1, FromDs=1
|
||||
default: /* ToDs=1, FromDs=1 */
|
||||
da = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
}
|
||||
|
@ -462,16 +462,16 @@ __inline static unsigned char * get_sa(unsigned char *pframe)
|
|||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
||||
switch (to_fr_ds) {
|
||||
case 0x00: // ToDs=0, FromDs=0
|
||||
case 0x00: /* ToDs=0, FromDs=0 */
|
||||
sa = GetAddr2Ptr(pframe);
|
||||
break;
|
||||
case 0x01: // ToDs=0, FromDs=1
|
||||
case 0x01: /* ToDs=0, FromDs=1 */
|
||||
sa = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
case 0x02: // ToDs=1, FromDs=0
|
||||
case 0x02: /* ToDs=1, FromDs=0 */
|
||||
sa = GetAddr2Ptr(pframe);
|
||||
break;
|
||||
default: // ToDs=1, FromDs=1
|
||||
default: /* ToDs=1, FromDs=1 */
|
||||
sa = GetAddr4Ptr(pframe);
|
||||
break;
|
||||
}
|
||||
|
@ -485,20 +485,20 @@ __inline static unsigned char * get_hdr_bssid(unsigned char *pframe)
|
|||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
||||
switch (to_fr_ds) {
|
||||
case 0x00: // ToDs=0, FromDs=0
|
||||
case 0x00: /* ToDs=0, FromDs=0 */
|
||||
sa = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
case 0x01: // ToDs=0, FromDs=1
|
||||
case 0x01: /* ToDs=0, FromDs=1 */
|
||||
sa = GetAddr2Ptr(pframe);
|
||||
break;
|
||||
case 0x02: // ToDs=1, FromDs=0
|
||||
case 0x02: /* ToDs=1, FromDs=0 */
|
||||
sa = GetAddr1Ptr(pframe);
|
||||
break;
|
||||
case 0x03: // ToDs=1, FromDs=1
|
||||
case 0x03: /* ToDs=1, FromDs=1 */
|
||||
sa = GetAddr1Ptr(pframe);
|
||||
break;
|
||||
default:
|
||||
sa =NULL; //???????
|
||||
sa =NULL; /* */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -525,10 +525,10 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
#define _PRE_ALLOCMICHDR_ 6
|
||||
|
||||
#define _SIFSTIME_ ((priv->pmib->dot11BssType.net_work_type&WIRELESS_11A)?16:10)
|
||||
#define _ACKCTSLNG_ 14 //14 bytes long, including crclng
|
||||
#define _ACKCTSLNG_ 14 /* 14 bytes long, including crclng */
|
||||
#define _CRCLNG_ 4
|
||||
|
||||
#define _ASOCREQ_IE_OFFSET_ 4 // excluding wlan_hdr
|
||||
#define _ASOCREQ_IE_OFFSET_ 4 /* excluding wlan_hdr */
|
||||
#define _ASOCRSP_IE_OFFSET_ 6
|
||||
#define _REASOCREQ_IE_OFFSET_ 10
|
||||
#define _REASOCRSP_IE_OFFSET_ 6
|
||||
|
@ -549,7 +549,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
#define _COUNTRY_IE_ 7
|
||||
#define _CHLGETXT_IE_ 16
|
||||
#define _SUPPORTED_CH_IE_ 36
|
||||
#define _CH_SWTICH_ANNOUNCE_ 37 //Secondary Channel Offset
|
||||
#define _CH_SWTICH_ANNOUNCE_ 37 /* Secondary Channel Offset */
|
||||
#define _RSN_IE_2_ 48
|
||||
#define _SSN_IE_1_ 221
|
||||
#define _ERPINFO_IE_ 42
|
||||
|
@ -560,11 +560,11 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
#define _TIMEOUT_ITVL_IE_ 56
|
||||
#define _SRC_IE_ 59
|
||||
#define _HT_EXTRA_INFO_IE_ 61
|
||||
#define _HT_ADD_INFO_IE_ 61 //_HT_EXTRA_INFO_IE_
|
||||
#define _HT_ADD_INFO_IE_ 61 /* _HT_EXTRA_INFO_IE_ */
|
||||
#define _WAPI_IE_ 68
|
||||
|
||||
|
||||
#define EID_BSSCoexistence 72 // 20/40 BSS Coexistence
|
||||
#define EID_BSSCoexistence 72 /* 20/40 BSS Coexistence */
|
||||
#define EID_BSSIntolerantChlReport 73
|
||||
#define _RIC_Descriptor_IE_ 75
|
||||
|
||||
|
@ -612,8 +612,8 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
/*-----------------------------------------------------------------------------
|
||||
Below is the definition for 802.11i / 802.1x
|
||||
------------------------------------------------------------------------------*/
|
||||
#define _IEEE8021X_MGT_ 1 // WPA
|
||||
#define _IEEE8021X_PSK_ 2 // WPA with pre-shared key
|
||||
#define _IEEE8021X_MGT_ 1 /* WPA */
|
||||
#define _IEEE8021X_PSK_ 2 /* WPA with pre-shared key */
|
||||
|
||||
/*
|
||||
#define _NO_PRIVACY_ 0
|
||||
|
@ -622,13 +622,13 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
#define _WRAP_PRIVACY_ 3
|
||||
#define _CCMP_PRIVACY_ 4
|
||||
#define _WEP_104_PRIVACY_ 5
|
||||
#define _WEP_WPA_MIXED_PRIVACY_ 6 // WEP + WPA
|
||||
#define _WEP_WPA_MIXED_PRIVACY_ 6 WEP + WPA
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
Below is the definition for WMM
|
||||
------------------------------------------------------------------------------*/
|
||||
#define _WMM_IE_Length_ 7 // for WMM STA
|
||||
#define _WMM_IE_Length_ 7 /* for WMM STA */
|
||||
#define _WMM_Para_Element_Length_ 24
|
||||
|
||||
|
||||
|
@ -822,10 +822,10 @@ enum ht_cap_ampdu_factor {
|
|||
#define HT_INFO_STBC_PARAM_PCO_ACTIVE ((u16) BIT(10))
|
||||
#define HT_INFO_STBC_PARAM_PCO_PHASE ((u16) BIT(11))
|
||||
|
||||
// ===============WPS Section===============
|
||||
// For WPSv1.0
|
||||
/* ===============WPS Section=============== */
|
||||
/* For WPSv1.0 */
|
||||
#define WPSOUI 0x0050f204
|
||||
// WPS attribute ID
|
||||
/* WPS attribute ID */
|
||||
#define WPS_ATTR_VER1 0x104A
|
||||
#define WPS_ATTR_SIMPLE_CONF_STATE 0x1044
|
||||
#define WPS_ATTR_RESP_TYPE 0x103B
|
||||
|
@ -846,29 +846,29 @@ enum ht_cap_ampdu_factor {
|
|||
#define WPS_ATTR_VENDOR_EXT 0x1049
|
||||
#define WPS_ATTR_SELECTED_REGISTRAR 0x1041
|
||||
|
||||
// Value of WPS attribute "WPS_ATTR_DEVICE_NAME
|
||||
/* Value of WPS attribute "WPS_ATTR_DEVICE_NAME */
|
||||
#define WPS_MAX_DEVICE_NAME_LEN 32
|
||||
|
||||
// Value of WPS Request Type Attribute
|
||||
/* Value of WPS Request Type Attribute */
|
||||
#define WPS_REQ_TYPE_ENROLLEE_INFO_ONLY 0x00
|
||||
#define WPS_REQ_TYPE_ENROLLEE_OPEN_8021X 0x01
|
||||
#define WPS_REQ_TYPE_REGISTRAR 0x02
|
||||
#define WPS_REQ_TYPE_WLAN_MANAGER_REGISTRAR 0x03
|
||||
|
||||
// Value of WPS Response Type Attribute
|
||||
/* Value of WPS Response Type Attribute */
|
||||
#define WPS_RESPONSE_TYPE_INFO_ONLY 0x00
|
||||
#define WPS_RESPONSE_TYPE_8021X 0x01
|
||||
#define WPS_RESPONSE_TYPE_REGISTRAR 0x02
|
||||
#define WPS_RESPONSE_TYPE_AP 0x03
|
||||
|
||||
// Value of WPS WiFi Simple Configuration State Attribute
|
||||
/* Value of WPS WiFi Simple Configuration State Attribute */
|
||||
#define WPS_WSC_STATE_NOT_CONFIG 0x01
|
||||
#define WPS_WSC_STATE_CONFIG 0x02
|
||||
|
||||
// Value of WPS Version Attribute
|
||||
/* Value of WPS Version Attribute */
|
||||
#define WPS_VERSION_1 0x10
|
||||
|
||||
// Value of WPS Configuration Method Attribute
|
||||
/* Value of WPS Configuration Method Attribute */
|
||||
#define WPS_CONFIG_METHOD_FLASH 0x0001
|
||||
#define WPS_CONFIG_METHOD_ETHERNET 0x0002
|
||||
#define WPS_CONFIG_METHOD_LABEL 0x0004
|
||||
|
@ -883,16 +883,16 @@ enum ht_cap_ampdu_factor {
|
|||
#define WPS_CONFIG_METHOD_VDISPLAY 0x2008
|
||||
#define WPS_CONFIG_METHOD_PDISPLAY 0x4008
|
||||
|
||||
// Value of Category ID of WPS Primary Device Type Attribute
|
||||
/* Value of Category ID of WPS Primary Device Type Attribute */
|
||||
#define WPS_PDT_CID_DISPLAYS 0x0007
|
||||
#define WPS_PDT_CID_MULIT_MEDIA 0x0008
|
||||
#define WPS_PDT_CID_RTK_WIDI WPS_PDT_CID_MULIT_MEDIA
|
||||
|
||||
// Value of Sub Category ID of WPS Primary Device Type Attribute
|
||||
/* Value of Sub Category ID of WPS Primary Device Type Attribute */
|
||||
#define WPS_PDT_SCID_MEDIA_SERVER 0x0005
|
||||
#define WPS_PDT_SCID_RTK_DMP WPS_PDT_SCID_MEDIA_SERVER
|
||||
|
||||
// Value of Device Password ID
|
||||
/* Value of Device Password ID */
|
||||
#define WPS_DPID_P 0x0000
|
||||
#define WPS_DPID_USER_SPEC 0x0001
|
||||
#define WPS_DPID_MACHINE_SPEC 0x0002
|
||||
|
@ -900,22 +900,22 @@ enum ht_cap_ampdu_factor {
|
|||
#define WPS_DPID_PBC 0x0004
|
||||
#define WPS_DPID_REGISTRAR_SPEC 0x0005
|
||||
|
||||
// Value of WPS RF Bands Attribute
|
||||
/* Value of WPS RF Bands Attribute */
|
||||
#define WPS_RF_BANDS_2_4_GHZ 0x01
|
||||
#define WPS_RF_BANDS_5_GHZ 0x02
|
||||
|
||||
// Value of WPS Association State Attribute
|
||||
/* Value of WPS Association State Attribute */
|
||||
#define WPS_ASSOC_STATE_NOT_ASSOCIATED 0x00
|
||||
#define WPS_ASSOC_STATE_CONNECTION_SUCCESS 0x01
|
||||
#define WPS_ASSOC_STATE_CONFIGURATION_FAILURE 0x02
|
||||
#define WPS_ASSOC_STATE_ASSOCIATION_FAILURE 0x03
|
||||
#define WPS_ASSOC_STATE_IP_FAILURE 0x04
|
||||
|
||||
// =====================P2P Section=====================
|
||||
// For P2P
|
||||
/* =====================P2P Section===================== */
|
||||
/* For P2P */
|
||||
#define P2POUI 0x506F9A09
|
||||
|
||||
// P2P Attribute ID
|
||||
/* P2P Attribute ID */
|
||||
#define P2P_ATTR_STATUS 0x00
|
||||
#define P2P_ATTR_MINOR_REASON_CODE 0x01
|
||||
#define P2P_ATTR_CAPABILITY 0x02
|
||||
|
@ -936,7 +936,7 @@ enum ht_cap_ampdu_factor {
|
|||
#define P2P_ATTR_OPERATING_CH 0x11
|
||||
#define P2P_ATTR_INVITATION_FLAGS 0x12
|
||||
|
||||
// Value of Status Attribute
|
||||
/* Value of Status Attribute */
|
||||
#define P2P_STATUS_SUCCESS 0x00
|
||||
#define P2P_STATUS_FAIL_INFO_UNAVAILABLE 0x01
|
||||
#define P2P_STATUS_FAIL_INCOMPATIBLE_PARAM 0x02
|
||||
|
@ -950,7 +950,7 @@ enum ht_cap_ampdu_factor {
|
|||
#define P2P_STATUS_FAIL_INCOMPATIBLE_PROVSION 0x0A
|
||||
#define P2P_STATUS_FAIL_USER_REJECT 0x0B
|
||||
|
||||
// Value of Inviation Flags Attribute
|
||||
/* Value of Inviation Flags Attribute */
|
||||
#define P2P_INVITATION_FLAGS_PERSISTENT BIT(0)
|
||||
|
||||
#define DMP_P2P_DEVCAP_SUPPORT (P2P_DEVCAP_SERVICE_DISCOVERY | \
|
||||
|
@ -960,7 +960,7 @@ enum ht_cap_ampdu_factor {
|
|||
|
||||
#define DMP_P2P_GRPCAP_SUPPORT (P2P_GRPCAP_INTRABSS)
|
||||
|
||||
// Value of Device Capability Bitmap
|
||||
/* Value of Device Capability Bitmap */
|
||||
#define P2P_DEVCAP_SERVICE_DISCOVERY BIT(0)
|
||||
#define P2P_DEVCAP_CLIENT_DISCOVERABILITY BIT(1)
|
||||
#define P2P_DEVCAP_CONCURRENT_OPERATION BIT(2)
|
||||
|
@ -968,7 +968,7 @@ enum ht_cap_ampdu_factor {
|
|||
#define P2P_DEVCAP_DEVICE_LIMIT BIT(4)
|
||||
#define P2P_DEVCAP_INVITATION_PROC BIT(5)
|
||||
|
||||
// Value of Group Capability Bitmap
|
||||
/* Value of Group Capability Bitmap */
|
||||
#define P2P_GRPCAP_GO BIT(0)
|
||||
#define P2P_GRPCAP_PERSISTENT_GROUP BIT(1)
|
||||
#define P2P_GRPCAP_GROUP_LIMIT BIT(2)
|
||||
|
@ -977,10 +977,10 @@ enum ht_cap_ampdu_factor {
|
|||
#define P2P_GRPCAP_PERSISTENT_RECONN BIT(5)
|
||||
#define P2P_GRPCAP_GROUP_FORMATION BIT(6)
|
||||
|
||||
// P2P Public Action Frame ( Management Frame )
|
||||
/* P2P Public Action Frame ( Management Frame ) */
|
||||
#define P2P_PUB_ACTION_ACTION 0x09
|
||||
|
||||
// P2P Public Action Frame Type
|
||||
/* P2P Public Action Frame Type */
|
||||
#define P2P_GO_NEGO_REQ 0
|
||||
#define P2P_GO_NEGO_RESP 1
|
||||
#define P2P_GO_NEGO_CONF 2
|
||||
|
@ -991,7 +991,7 @@ enum ht_cap_ampdu_factor {
|
|||
#define P2P_PROVISION_DISC_REQ 7
|
||||
#define P2P_PROVISION_DISC_RESP 8
|
||||
|
||||
// P2P Action Frame Type
|
||||
/* P2P Action Frame Type */
|
||||
#define P2P_NOTICE_OF_ABSENCE 0
|
||||
#define P2P_PRESENCE_REQUEST 1
|
||||
#define P2P_PRESENCE_RESPONSE 2
|
||||
|
@ -1004,25 +1004,25 @@ enum ht_cap_ampdu_factor {
|
|||
|
||||
#define P2P_WILDCARD_SSID_LEN 7
|
||||
|
||||
#define P2P_FINDPHASE_EX_NONE 0 // default value, used when: (1)p2p disabed or (2)p2p enabled but only do 1 scan phase
|
||||
#define P2P_FINDPHASE_EX_FULL 1 // used when p2p enabled and want to do 1 scan phase and P2P_FINDPHASE_EX_MAX-1 find phase
|
||||
#define P2P_FINDPHASE_EX_NONE 0 /* default value, used when: (1)p2p disabed or (2)p2p enabled but only do 1 scan phase */
|
||||
#define P2P_FINDPHASE_EX_FULL 1 /* used when p2p enabled and want to do 1 scan phase and P2P_FINDPHASE_EX_MAX-1 find phase */
|
||||
#define P2P_FINDPHASE_EX_SOCIAL_FIRST (P2P_FINDPHASE_EX_FULL+1)
|
||||
#define P2P_FINDPHASE_EX_MAX 4
|
||||
#define P2P_FINDPHASE_EX_SOCIAL_LAST P2P_FINDPHASE_EX_MAX
|
||||
|
||||
#define P2P_PROVISION_TIMEOUT 5000 // 5 seconds timeout for sending the provision discovery request
|
||||
#define P2P_CONCURRENT_PROVISION_TIME 3000 // 3 seconds timeout for sending the provision discovery request under concurrent mode
|
||||
#define P2P_GO_NEGO_TIMEOUT 5000 // 5 seconds timeout for receiving the group negotation response
|
||||
#define P2P_CONCURRENT_GO_NEGO_TIME 3000 // 3 seconds timeout for sending the negotiation request under concurrent mode
|
||||
#define P2P_TX_PRESCAN_TIMEOUT 100 // 100ms
|
||||
#define P2P_INVITE_TIMEOUT 5000 // 5 seconds timeout for sending the invitation request
|
||||
#define P2P_CONCURRENT_INVITE_TIME 3000 // 3 seconds timeout for sending the invitation request under concurrent mode
|
||||
#define P2P_RESET_SCAN_CH 25000 // 25 seconds timeout to reset the scan channel ( based on channel plan )
|
||||
#define P2P_PROVISION_TIMEOUT 5000 /* 5 seconds timeout for sending the provision discovery request */
|
||||
#define P2P_CONCURRENT_PROVISION_TIME 3000 /* 3 seconds timeout for sending the provision discovery request under concurrent mode */
|
||||
#define P2P_GO_NEGO_TIMEOUT 5000 /* 5 seconds timeout for receiving the group negotation response */
|
||||
#define P2P_CONCURRENT_GO_NEGO_TIME 3000 /* 3 seconds timeout for sending the negotiation request under concurrent mode */
|
||||
#define P2P_TX_PRESCAN_TIMEOUT 100 /* 100ms */
|
||||
#define P2P_INVITE_TIMEOUT 5000 /* 5 seconds timeout for sending the invitation request */
|
||||
#define P2P_CONCURRENT_INVITE_TIME 3000 /* 3 seconds timeout for sending the invitation request under concurrent mode */
|
||||
#define P2P_RESET_SCAN_CH 25000 /* 25 seconds timeout to reset the scan channel ( based on channel plan ) */
|
||||
#define P2P_MAX_INTENT 15
|
||||
|
||||
#define P2P_MAX_NOA_NUM 2
|
||||
|
||||
// WPS Configuration Method
|
||||
/* WPS Configuration Method */
|
||||
#define WPS_CM_NONE 0x0000
|
||||
#define WPS_CM_LABEL 0x0004
|
||||
#define WPS_CM_DISPLYA 0x0008
|
||||
|
@ -1044,29 +1044,29 @@ enum P2P_ROLE {
|
|||
};
|
||||
|
||||
enum P2P_STATE {
|
||||
P2P_STATE_NONE = 0, // P2P disable
|
||||
P2P_STATE_IDLE = 1, // P2P had enabled and do nothing
|
||||
P2P_STATE_LISTEN = 2, // In pure listen state
|
||||
P2P_STATE_SCAN = 3, // In scan phase
|
||||
P2P_STATE_FIND_PHASE_LISTEN = 4, // In the listen state of find phase
|
||||
P2P_STATE_FIND_PHASE_SEARCH = 5, // In the search state of find phase
|
||||
P2P_STATE_TX_PROVISION_DIS_REQ = 6, // In P2P provisioning discovery
|
||||
P2P_STATE_NONE = 0, /* P2P disable */
|
||||
P2P_STATE_IDLE = 1, /* P2P had enabled and do nothing */
|
||||
P2P_STATE_LISTEN = 2, /* In pure listen state */
|
||||
P2P_STATE_SCAN = 3, /* In scan phase */
|
||||
P2P_STATE_FIND_PHASE_LISTEN = 4, /* In the listen state of find phase */
|
||||
P2P_STATE_FIND_PHASE_SEARCH = 5, /* In the search state of find phase */
|
||||
P2P_STATE_TX_PROVISION_DIS_REQ = 6, /* In P2P provisioning discovery */
|
||||
P2P_STATE_RX_PROVISION_DIS_RSP = 7,
|
||||
P2P_STATE_RX_PROVISION_DIS_REQ = 8,
|
||||
P2P_STATE_GONEGO_ING = 9, // Doing the group owner negoitation handshake
|
||||
P2P_STATE_GONEGO_OK = 10, // finish the group negoitation handshake with success
|
||||
P2P_STATE_GONEGO_FAIL = 11, // finish the group negoitation handshake with failure
|
||||
P2P_STATE_RECV_INVITE_REQ_MATCH = 12, // receiving the P2P Inviation request and match with the profile.
|
||||
P2P_STATE_PROVISIONING_ING = 13, // Doing the P2P WPS
|
||||
P2P_STATE_PROVISIONING_DONE = 14, // Finish the P2P WPS
|
||||
P2P_STATE_TX_INVITE_REQ = 15, // Transmit the P2P Invitation request
|
||||
P2P_STATE_RX_INVITE_RESP_OK = 16, // Receiving the P2P Invitation response
|
||||
P2P_STATE_RECV_INVITE_REQ_DISMATCH = 17, // receiving the P2P Inviation request and dismatch with the profile.
|
||||
P2P_STATE_RECV_INVITE_REQ_GO = 18, // receiving the P2P Inviation request and this wifi is GO.
|
||||
P2P_STATE_RECV_INVITE_REQ_JOIN = 19, // receiving the P2P Inviation request to join an existing P2P Group.
|
||||
P2P_STATE_RX_INVITE_RESP_FAIL = 20, // recveing the P2P Inviation response with failure
|
||||
P2P_STATE_RX_INFOR_NOREADY = 21, // receiving p2p negoitation response with information is not available
|
||||
P2P_STATE_TX_INFOR_NOREADY = 22, // sending p2p negoitation response with information is not available
|
||||
P2P_STATE_GONEGO_ING = 9, /* Doing the group owner negoitation handshake */
|
||||
P2P_STATE_GONEGO_OK = 10, /* finish the group negoitation handshake with success */
|
||||
P2P_STATE_GONEGO_FAIL = 11, /* finish the group negoitation handshake with failure */
|
||||
P2P_STATE_RECV_INVITE_REQ_MATCH = 12, /* receiving the P2P Inviation request and match with the profile. */
|
||||
P2P_STATE_PROVISIONING_ING = 13, /* Doing the P2P WPS */
|
||||
P2P_STATE_PROVISIONING_DONE = 14, /* Finish the P2P WPS */
|
||||
P2P_STATE_TX_INVITE_REQ = 15, /* Transmit the P2P Invitation request */
|
||||
P2P_STATE_RX_INVITE_RESP_OK = 16, /* Receiving the P2P Invitation response */
|
||||
P2P_STATE_RECV_INVITE_REQ_DISMATCH = 17, /* receiving the P2P Inviation request and dismatch with the profile. */
|
||||
P2P_STATE_RECV_INVITE_REQ_GO = 18, /* receiving the P2P Inviation request and this wifi is GO. */
|
||||
P2P_STATE_RECV_INVITE_REQ_JOIN = 19, /* receiving the P2P Inviation request to join an existing P2P Group. */
|
||||
P2P_STATE_RX_INVITE_RESP_FAIL = 20, /* recveing the P2P Inviation response with failure */
|
||||
P2P_STATE_RX_INFOR_NOREADY = 21, /* receiving p2p negoitation response with information is not available */
|
||||
P2P_STATE_TX_INFOR_NOREADY = 22, /* sending p2p negoitation response with information is not available */
|
||||
};
|
||||
|
||||
enum P2P_WPSINFO {
|
||||
|
@ -1095,7 +1095,7 @@ enum P2P_PS_STATE
|
|||
P2P_PS_ENABLE = 1,
|
||||
P2P_PS_SCAN = 2,
|
||||
P2P_PS_SCAN_DONE = 3,
|
||||
P2P_PS_ALLSTASLEEP = 4, // for P2P GO
|
||||
P2P_PS_ALLSTASLEEP = 4, /* for P2P GO */
|
||||
};
|
||||
|
||||
enum P2P_PS_MODE
|
||||
|
@ -1103,11 +1103,11 @@ enum P2P_PS_MODE
|
|||
P2P_PS_NONE = 0,
|
||||
P2P_PS_CTWINDOW = 1,
|
||||
P2P_PS_NOA = 2,
|
||||
P2P_PS_MIX = 3, // CTWindow and NoA
|
||||
P2P_PS_MIX = 3, /* CTWindow and NoA */
|
||||
};
|
||||
|
||||
// =====================WFD Section=====================
|
||||
// For Wi-Fi Display
|
||||
/* =====================WFD Section===================== */
|
||||
/* For Wi-Fi Display */
|
||||
#define WFD_ATTR_DEVICE_INFO 0x00
|
||||
#define WFD_ATTR_ASSOC_BSSID 0x01
|
||||
#define WFD_ATTR_COUPLED_SINK_INFO 0x06
|
||||
|
@ -1115,7 +1115,7 @@ enum P2P_PS_MODE
|
|||
#define WFD_ATTR_SESSION_INFO 0x09
|
||||
#define WFD_ATTR_ALTER_MAC 0x0a
|
||||
|
||||
// For WFD Device Information Attribute
|
||||
/* For WFD Device Information Attribute */
|
||||
#define WFD_DEVINFO_SOURCE 0x0000
|
||||
#define WFD_DEVINFO_PSINK 0x0001
|
||||
#define WFD_DEVINFO_SSINK 0x0002
|
||||
|
@ -1129,4 +1129,4 @@ enum P2P_PS_MODE
|
|||
#define IP_MCAST_MAC(mac) ((mac[0]==0x01)&&(mac[1]==0x00)&&(mac[2]==0x5e))
|
||||
#define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff))
|
||||
|
||||
#endif // _WIFI_H_
|
||||
#endif /* _WIFI_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue