summaryrefslogtreecommitdiff
path: root/include/hardware_legacy/wifi_nan.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hardware_legacy/wifi_nan.h')
-rw-r--r--include/hardware_legacy/wifi_nan.h717
1 files changed, 694 insertions, 23 deletions
diff --git a/include/hardware_legacy/wifi_nan.h b/include/hardware_legacy/wifi_nan.h
index 8437a1d..6754252 100644
--- a/include/hardware_legacy/wifi_nan.h
+++ b/include/hardware_legacy/wifi_nan.h
@@ -40,9 +40,9 @@ typedef u16 transaction_id;
typedef u32 NanDataPathId;
#define NAN_MAC_ADDR_LEN 6
-#define NAN_MAJOR_VERSION 2
+#define NAN_MAJOR_VERSION 4
#define NAN_MINOR_VERSION 0
-#define NAN_MICRO_VERSION 1
+#define NAN_MICRO_VERSION 0
#define NAN_MAX_SOCIAL_CHANNELS 3
/* NAN Maximum Lengths */
@@ -65,29 +65,39 @@ typedef u32 NanDataPathId;
#define NAN_SECURITY_MIN_PASSPHRASE_LEN 8
#define NAN_SECURITY_MAX_PASSPHRASE_LEN 63
#define NAN_MAX_CHANNEL_INFO_SUPPORTED 4
-
+#define NAN_IDENTITY_KEY_LEN 16
+#define NAN_IDENTITY_TAG_LEN 8
+#define NAN_IDENTITY_NONCE_LEN 8
+#define NAN_MAX_MATCH_IDENTITY_LEN 1024
/*
Definition of various NanResponseType
*/
typedef enum {
- NAN_RESPONSE_ENABLED = 0,
- NAN_RESPONSE_DISABLED = 1,
- NAN_RESPONSE_PUBLISH = 2,
- NAN_RESPONSE_PUBLISH_CANCEL = 3,
- NAN_RESPONSE_TRANSMIT_FOLLOWUP = 4,
- NAN_RESPONSE_SUBSCRIBE = 5,
- NAN_RESPONSE_SUBSCRIBE_CANCEL = 6,
- NAN_RESPONSE_STATS = 7,
- NAN_RESPONSE_CONFIG = 8,
- NAN_RESPONSE_TCA = 9,
- NAN_RESPONSE_ERROR = 10,
- NAN_RESPONSE_BEACON_SDF_PAYLOAD = 11,
- NAN_GET_CAPABILITIES = 12,
- NAN_DP_INTERFACE_CREATE = 13,
- NAN_DP_INTERFACE_DELETE = 14,
- NAN_DP_INITIATOR_RESPONSE = 15,
- NAN_DP_RESPONDER_RESPONSE = 16,
- NAN_DP_END = 17
+ NAN_RESPONSE_ENABLED = 0,
+ NAN_RESPONSE_DISABLED = 1,
+ NAN_RESPONSE_PUBLISH = 2,
+ NAN_RESPONSE_PUBLISH_CANCEL = 3,
+ NAN_RESPONSE_TRANSMIT_FOLLOWUP = 4,
+ NAN_RESPONSE_SUBSCRIBE = 5,
+ NAN_RESPONSE_SUBSCRIBE_CANCEL = 6,
+ NAN_RESPONSE_STATS = 7,
+ NAN_RESPONSE_CONFIG = 8,
+ NAN_RESPONSE_TCA = 9,
+ NAN_RESPONSE_ERROR = 10,
+ NAN_RESPONSE_BEACON_SDF_PAYLOAD = 11,
+ NAN_GET_CAPABILITIES = 12,
+ NAN_DP_INTERFACE_CREATE = 13,
+ NAN_DP_INTERFACE_DELETE = 14,
+ NAN_DP_INITIATOR_RESPONSE = 15,
+ NAN_DP_RESPONDER_RESPONSE = 16,
+ NAN_DP_END = 17,
+ NAN_PAIRING_INITIATOR_RESPONSE = 18,
+ NAN_PAIRING_RESPONDER_RESPONSE = 19,
+ NAN_BOOTSTRAPPING_INITIATOR_RESPONSE = 20,
+ NAN_BOOTSTRAPPING_RESPONDER_RESPONSE = 21,
+ NAN_PAIRING_END = 22,
+ NAN_SUSPEND_REQUEST_RESPONSE = 23,
+ NAN_RESUME_REQUEST_RESPONSE = 24
} NanResponseType;
/* NAN Publish Types */
@@ -137,6 +147,18 @@ typedef enum {
NAN_TCA_ID_CLUSTER_SIZE = 0
} NanTcaType;
+/* pairing request type*/
+typedef enum {
+ NAN_PAIRING_SETUP = 0,
+ NAN_PAIRING_VERIFICATION = 1
+} NanPairingRequestType;
+
+/* Nan AKM type */
+typedef enum {
+ SAE = 0,
+ PASN = 1
+} NanAkm;
+
/* NAN Channel Info */
typedef struct {
u32 channel;
@@ -173,7 +195,17 @@ typedef enum {
/* If followup message internal queue is full */
NAN_STATUS_FOLLOWUP_QUEUE_FULL = 11,
/* Unsupported concurrency session enabled, NAN disabled notified */
- NAN_STATUS_UNSUPPORTED_CONCURRENCY_NAN_DISABLED = 12
+ NAN_STATUS_UNSUPPORTED_CONCURRENCY_NAN_DISABLED = 12,
+ /* if the pairing id is invalid */
+ NAN_STATUS_INVALID_PAIRING_ID = 13,
+ /* if the bootstrapping id is invalid */
+ NAN_STATUS_INVALID_BOOTSTRAPPING_ID = 14,
+ /* If same request is received again */
+ NAN_STATUS_REDUNDANT_REQUEST = 15,
+ /* If current request is not supported */
+ NAN_STATUS_NOT_SUPPORTED = 16,
+ /* If no Wifi Aware connection is active */
+ NAN_STATUS_NO_CONNECTION = 17,
} NanStatusType;
/* NAN Transmit Types */
@@ -243,6 +275,19 @@ typedef enum {
NAN_DP_REQUEST_REJECT
} NanDataPathResponseCode;
+/* Pairing request Responder's response */
+typedef enum {
+ NAN_PAIRING_REQUEST_ACCEPT = 0,
+ NAN_PAIRING_REQUEST_REJECT
+} NanPairingResponseCode;
+
+/* Pairing bootstrapping Responder's response */
+typedef enum {
+ NAN_BOOTSTRAPPING_REQUEST_ACCEPT = 0,
+ NAN_BOOTSTRAPPING_REQUEST_REJECT = 1,
+ NAN_BOOTSTRAPPING_REQUEST_COMEBACK = 2
+} NanBootstrappingResponseCode;
+
/* NAN DP channel config options */
typedef enum {
NAN_DP_CHANNEL_NOT_REQUESTED = 0,
@@ -311,6 +356,8 @@ typedef struct {
#define NAN_CIPHER_SUITE_SHARED_KEY_256_MASK 0x02
#define NAN_CIPHER_SUITE_PUBLIC_KEY_2WDH_128_MASK 0x04
#define NAN_CIPHER_SUITE_PUBLIC_KEY_2WDH_256_MASK 0x08
+#define NAN_CIPHER_SUITE_PUBLIC_KEY_PASN_128_MASK 0x40
+#define NAN_CIPHER_SUITE_PUBLIC_KEY_PASN_256_MASK 0x80
/* NAN ranging indication condition MASKS */
#define NAN_RANGING_INDICATE_CONTINUOUS_MASK 0x01
@@ -321,6 +368,19 @@ typedef struct {
#define NAN_SCHEDULE_UPDATE_NSS_MASK 0x01
#define NAN_SCHEDULE_UPDATE_CHANNEL_MASK 0x02
+/* NAN pairing bootstrapping method */
+#define NAN_PAIRING_BOOTSTRAPPING_OPPORTUNISTIC_MASK 0x01
+#define NAN_PAIRING_BOOTSTRAPPING_PIN_CODE_DISPLAY_MASK 0x02
+#define NAN_PAIRING_BOOTSTRAPPING_PASSPHRASE_DISPLAY_MASK 0x04
+#define NAN_PAIRING_BOOTSTRAPPING_QR_DISPLAY_MASK 0x08
+#define NAN_PAIRING_BOOTSTRAPPING_NFC_TAG_MASK 0x10
+#define NAN_PAIRING_BOOTSTRAPPING_PIN_CODE_KEYPAD_MASK 0x20
+#define NAN_PAIRING_BOOTSTRAPPING_PASSPHRASE_KEYPAD_MASK 0x40
+#define NAN_PAIRING_BOOTSTRAPPING_QR_SCAN_MASK 0x80
+#define NAN_PAIRING_BOOTSTRAPPING_NFC_READER_MASK 0x100
+#define NAN_PAIRING_BOOTSTRAPPING_SERVICE_MANAGED_MASK 0x4000
+#define NAN_PAIRING_BOOTSTRAPPING_HANDSHAKE_SHIP_MASK 0x8000
+
/*
Structure to set the Service Descriptor Extension
Attribute (SDEA) passed as part of NanPublishRequest/
@@ -354,6 +414,25 @@ typedef struct {
if QOS is required or not.
*/
NanQosCfgStatus qos_cfg;
+ /*
+ Config to set FSD with Gas bit
+ in the SDEA Control Field.
+ */
+ u8 config_fsd_gas;
+ u8 enable_fsd_gas;
+
+ /*
+ Config to set FSD Required bit
+ in the SDEA Control Field.
+ */
+ u8 config_fsd_req;
+ u8 enable_fsd_req;
+
+ /*
+ Config to set gtk protection bit
+ in the SDEA Control Field.
+ */
+ u8 gtk_protection;
} NanSdeaCtrlParams;
/*
@@ -392,6 +471,11 @@ typedef struct {
u32 max_subscribe_address;
u32 ndpe_attr_supported;
bool is_instant_mode_supported;
+ bool is_6g_supported;
+ bool is_he_supported;
+ bool is_pairing_supported;
+ bool is_set_cluster_id_supported;
+ bool is_suspension_supported;
} NanCapabilities;
/*
@@ -1054,9 +1138,49 @@ typedef struct {
*/
u8 config_instant_mode_channel;
wifi_channel instant_mode_channel;
+
+ /*
+ Enable/Disable unsync service discovery.
+ 0 - Disable
+ 1 - Enable
+ */
+ u8 config_unsync_srvdsc;
+ u8 enable_unsync_srvdsc;
+
+ /*
+ Configure regulatory information.
+ */
+ u8 config_reg_info;
+ u8 reg_info_val;
} NanEnableRequest;
/*
+ NAN pairing config.
+*/
+typedef struct {
+
+ /*
+ Enable Nan pairing setup
+ */
+ u32 enable_pairing_setup;
+
+ /*
+ Enable cache NIK/NPK after Nan pairing setup
+ */
+ u32 enable_pairing_cache;
+
+ /*
+ Enable Nan pairing verification with cached NIK/NPK
+ */
+ u32 enable_pairing_verification;
+
+ /*
+ The set of supported bootstrapping methods.
+ */
+ u16 supported_bootstrapping_methods;
+} NanPairingConfig;
+
+/*
Publish Msg Structure
Message is used to request the DE to publish the Service Name
using the parameters passed into the Discovery Window
@@ -1187,6 +1311,29 @@ typedef struct {
*/
u16 sdea_service_specific_info_len;
u8 sdea_service_specific_info[NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN];
+
+ /*
+ The Identity key for pairing, used to generate NIRA
+ */
+ u8 nan_identity_key[NAN_IDENTITY_KEY_LEN];
+
+ /*
+ The config for Nan pairing
+ */
+ NanPairingConfig nan_pairing_config;
+
+ /*
+ Specifies whether suspension can be possible in this publish session.
+ The request would fail if enable_suspendability is true but
+ is_suspension_supported is false in NanCapabilities.
+ */
+ bool enable_suspendability;
+
+ /* s3 capabilities */
+ u16 s3_capabilities;
+
+ /* cipher capabilities */
+ u8 cipher_capabilities;
} NanPublishRequest;
/*
@@ -1350,6 +1497,25 @@ typedef struct {
*/
u16 sdea_service_specific_info_len;
u8 sdea_service_specific_info[NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN];
+ /*
+ The Identity key for pairing, used to generate NIRA
+ */
+ u8 nan_identity_key[NAN_IDENTITY_KEY_LEN];
+
+ /*
+ The config for Nan pairing
+ */
+ NanPairingConfig nan_pairing_config;
+
+ /*
+ Specifies whether suspension can be possible in this subscribe session.
+ The request would fail if enable_suspendability is true but
+ is_suspension_supported is false in NanCapabilities.
+ */
+ bool enable_suspendability;
+
+ /* cipher capabilities */
+ u8 cipher_capabilities;
} NanSubscribeRequest;
/*
@@ -1395,6 +1561,12 @@ typedef struct {
*/
u16 sdea_service_specific_info_len;
u8 sdea_service_specific_info[NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN];
+
+ /*
+ Add shared key descriptor attribute to the Followup request when the
+ flag is set
+ */
+ u8 shared_key_desc_flag;
} NanTransmitFollowupRequest;
/*
@@ -1408,6 +1580,23 @@ typedef struct {
} NanStatsRequest;
/*
+ Suspend Request Structure
+ The SuspendRequest message is used to request that the specified session is suspended.
+ The session can be resumed using the NanResumeRequest message.
+*/
+typedef struct {
+ u16 publish_subscribe_id;
+} NanSuspendRequest;
+
+/*
+ Resume Request Structure
+ The ResumeRequest message is used to request that the specified session is resumed.
+*/
+typedef struct {
+ u16 publish_subscribe_id;
+} NanResumeRequest;
+
+/*
Config Structure
The NanConfigurationReq message is sent by the Host to the
Discovery Engine in order to configure the Discovery Engine during runtime.
@@ -1557,6 +1746,11 @@ typedef struct {
*/
u8 config_instant_mode_channel;
wifi_channel instant_mode_channel;
+ /*
+ Config cluster ID with the cluster ID selected over NFC/OOB method.
+ */
+ u8 config_cluster_id;
+ u16 cluster_id_val; // default value 0x0
} NanConfigRequest;
/*
@@ -1814,6 +2008,24 @@ typedef struct {
NanDataPathId ndp_instance_id;
} NanDataPathRequestResponse;
+/* Response returned for Initiators pairing request */
+typedef struct {
+ /*
+ Unique token Id generated on the initiator
+ side used for a pairing session between two NAN devices
+ */
+ u32 paring_instance_id;
+} NanPairingRequestResponse;
+
+/* Response returned for Initiators bootstrapping request */
+typedef struct {
+ /*
+ Unique token Id generated on the initiator
+ side used for a bootstrapping session between two NAN devices
+ */
+ u32 bootstrapping_instance_id;
+} NanBootstrappingRequestResponse;
+
/*
NAN Response messages
*/
@@ -1827,6 +2039,8 @@ typedef struct {
NanStatsResponse stats_response;
NanDataPathRequestResponse data_request_response;
NanCapabilities nan_capabilities;
+ NanPairingRequestResponse pairing_request_response;
+ NanBootstrappingRequestResponse bootstrapping_request_response;
} body;
} NanResponseMsg;
@@ -1867,6 +2081,12 @@ typedef struct {
char nan_reason[NAN_ERROR_STR_LEN]; /* Describe the NAN reason type */
} NanPublishTerminatedInd;
+/* The NIRA used to identify the pairing devices*/
+typedef struct {
+ u8 nonce[NAN_IDENTITY_NONCE_LEN];
+ u8 tag[NAN_IDENTITY_TAG_LEN];
+} NanIdentityResolutionAttribute;
+
/*
Match Indication
The MatchInd message is sent once per responding MAC address whenever
@@ -1990,6 +2210,16 @@ typedef struct {
*/
u16 sdea_service_specific_info_len;
u8 sdea_service_specific_info[NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN];
+
+ /*
+ The config for Nan pairing set by the peer
+ */
+ NanPairingConfig peer_pairing_config;
+
+ /*
+ The NIRA from peer for Nan pairing verification
+ */
+ NanIdentityResolutionAttribute nira;
} NanMatchInd;
/*
@@ -2259,6 +2489,9 @@ typedef struct {
for setting up the Secure Data Path.
*/
u8 scid[NAN_MAX_SCID_BUF_LEN];
+
+ /* Publish or Subscribe Id of an earlier Publish/Subscribe */
+ u16 publish_subscribe_id;
} NanDataPathInitiatorRequest;
/*
@@ -2311,8 +2544,23 @@ typedef struct {
for setting up the Secure Data Path.
*/
u8 scid[NAN_MAX_SCID_BUF_LEN];
+
+ /* Publish or Subscribe Id of an earlier Publish/Subscribe */
+ u16 publish_subscribe_id;
+
+ /*
+ Discovery MAC addr of the publisher/peer
+ */
+ u8 peer_disc_mac_addr[NAN_MAC_ADDR_LEN];
} NanDataPathIndicationResponse;
+/* Sub slot parameters */
+typedef struct {
+ u8 entry_control;
+ u16 time_bitmap_control;
+ u32 time_bitmap;
+} NanS3Params;
+
/* NDP termination info */
typedef struct {
u8 num_ndp_instances;
@@ -2462,6 +2710,333 @@ typedef struct {
u32 range_measurement_mm;
} NanRangeReportInd;
+/*
+ NAN pairing initator request
+*/
+typedef struct {
+ /*
+ This Id is the Requestor Instance that is passed as
+ part of earlier MatchInd/FollowupInd message.
+ */
+ u32 requestor_instance_id;
+
+ /*
+ Discovery MAC addr of the publisher/peer
+ */
+ u8 peer_disc_mac_addr[NAN_MAC_ADDR_LEN];
+
+ /*
+ Indicate the pairing session is of setup or verification
+ */
+ NanPairingRequestType nan_pairing_request_type;
+
+ /*
+ whether the pairing is opportunistic or password
+ */
+ u8 is_opportunistic;
+
+ /*
+ Security key info used for the pairing setup or verification
+ */
+ NanSecurityKeyInfo key_info;
+ /*
+ AKM used for the pairing verification
+ */
+ NanAkm akm;
+
+ /*
+ Whether should cache the negotiated NIK/NPK for future verification
+ */
+ u8 enable_pairing_cache;
+
+ /*
+ The Identity key for pairing, can be used for pairing verification
+ */
+ u8 nan_identity_key[NAN_IDENTITY_KEY_LEN];
+
+ /*
+ NAN Cipher Suite Type
+ */
+ u32 cipher_type;
+
+} NanPairingRequest;
+
+/*
+ Data struct to initiate a pairing response on the responder side for an indication received with a
+ pairing request
+*/
+typedef struct {
+
+ /*
+ Unique token Id generated on the initiator/responder side
+ used for a pairing session between two NAN devices
+ */
+ u32 pairing_instance_id;
+
+ /*
+ Indicate the pairing session is setup or verification
+ */
+ NanPairingRequestType nan_pairing_request_type;
+
+ /* Response Code indicating ACCEPT/REJECT */
+ NanPairingResponseCode rsp_code;
+
+ /*
+ whether the pairing is opportunistic or password
+ */
+ u8 is_opportunistic;
+
+ /*
+ Security key info used for the pairing setup or verification
+ */
+ NanSecurityKeyInfo key_info;
+
+ /*
+ AKM used for the pairing verification
+ */
+ NanAkm akm;
+
+ /*
+ Whether should cache the negotiated NIK/NPK for future verification
+ */
+ u8 enable_pairing_cache;
+
+ /*
+ The Identity key for pairing, can be used for pairing verification
+ */
+ u8 nan_identity_key[NAN_IDENTITY_KEY_LEN];
+
+ /*
+ NAN Cipher Suite Type
+ */
+ u32 cipher_type;
+} NanPairingIndicationResponse;
+
+typedef struct {
+ /*
+ Unique token Id generated on the initiator/responder side
+ used for a pairing session between two NAN devices
+ */
+ u32 pairing_instance_id;
+} NanPairingEndRequest;
+
+/*
+ Event indication received on the responder side when a Nan pairing session is initiated on the
+ Initiator side
+*/
+typedef struct {
+ /* Publish or Subscribe Id of an earlier Publish/Subscribe */
+ u16 publish_subscribe_id;
+ /*
+ This Id is the Requestor Instance that is passed as
+ part of earlier MatchInd/FollowupInd message.
+ */
+ u32 requestor_instance_id;
+ /*
+ Unique Instance Id corresponding to a service/session.
+ This is similar to the publish_id generated on the
+ publisher side
+ */
+ u32 pairing_instance_id;
+ /* Discovery MAC addr of the peer/initiator */
+ u8 peer_disc_mac_addr[NAN_MAC_ADDR_LEN];
+ /* Indicate the pairing session is setup or verification */
+ NanPairingRequestType nan_pairing_request_type;
+ /* Whether should cache the negotiated NIK/NPK for future verification */
+ u8 enable_pairing_cache;
+ /* The NIRA from peer for Nan pairing verification */
+ NanIdentityResolutionAttribute nira;
+} NanPairingRequestInd;
+
+/*
+ The security info negotiate after the pairing setup for caching
+*/
+typedef struct {
+ /* The inentity key of peer device*/
+ u8 peer_nan_identity_key[NAN_IDENTITY_KEY_LEN];
+ /* The inentity key of local device*/
+ u8 local_nan_identity_key[NAN_IDENTITY_KEY_LEN];
+ /* The PMK excahnge between two devices*/
+ NanSecurityPmk npk;
+ /* The AKM used during the key exchange*/
+ NanAkm akm;
+ /* NAN Cipher Suite Type */
+ u32 cipher_type;
+} NpkSecurityAssociation;
+
+/*
+ Event indication of pairing confirm is received on both
+ initiator and responder side confirming a pairing session
+*/
+typedef struct {
+ /*
+ Unique token Id generated on the initiator/responder side
+ used for a pairing session between two NAN devices
+ */
+ u32 pairing_instance_id;
+ /* Response code indicating ACCEPT/REJECT */
+ NanPairingResponseCode rsp_code;
+ /*
+ Reason code indicating the cause for REJECT.
+ NAN_STATUS_SUCCESS and NAN_STATUS_PROTOCOL_FAILURE are
+ expected reason codes.
+ */
+ NanStatusType reason_code;
+ /*
+ Indicate the pairing session is setup or verification
+ */
+ NanPairingRequestType nan_pairing_request_type;
+ /* Whether should cache the negotiated NIK/NPK for future verification */
+ u8 enable_pairing_cache;
+ /*
+ The security association info negotiated in the pairing setup, used for future verification
+ */
+ NpkSecurityAssociation npk_security_association;
+} NanPairingConfirmInd;
+
+/*
+ NAN pairing bootstrapping initiator request
+*/
+typedef struct {
+ /*
+ This Id is the Requestor Instance that is passed as
+ part of earlier MatchInd/FollowupInd message.
+ */
+ u32 requestor_instance_id;
+
+ /*
+ Discovery MAC addr of the publisher/peer
+ */
+ u8 peer_disc_mac_addr[NAN_MAC_ADDR_LEN];
+
+ /* Proposed bootstrapping method */
+ u16 request_bootstrapping_method;
+
+ /*
+ Sequence of values which further specify the published service beyond
+ the service name.
+ */
+ u16 service_specific_info_len;
+ u8 service_specific_info[NAN_MAX_SERVICE_SPECIFIC_INFO_LEN];
+
+ /*
+ Sequence of values indicating the service specific info in SDEA
+ Used for service managed bootstrapping method
+ */
+ u16 sdea_service_specific_info_len;
+ u8 sdea_service_specific_info[NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN];
+
+ /* The length of cookie. */
+ u32 cookie_length;
+
+ /* Cookie for the follow up request */
+ u8 cookie[];
+
+} NanBootstrappingRequest;
+/*
+ NAN pairing bootstrapping response from responder to a initate request
+*/
+typedef struct {
+
+ /*
+ This Id is the Requestor Instance that is passed as
+ part of earlier MatchInd/FollowupInd message.
+ */
+ u32 service_instance_id;
+
+ /* Discovery MAC addr of the peer/initiator */
+ u8 peer_disc_mac_addr[NAN_MAC_ADDR_LEN];
+
+ /*
+ Sequence of values which further specify the published service beyond
+ the service name.
+ */
+ u16 service_specific_info_len;
+ u8 service_specific_info[NAN_MAX_SERVICE_SPECIFIC_INFO_LEN];
+
+ /*
+ Sequence of values indicating the service specific info in SDEA
+ Used for service managed bootstrapping method
+ */
+ u16 sdea_service_specific_info_len;
+ u8 sdea_service_specific_info[NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN];
+
+ /* Response Code indicating ACCEPT/REJECT */
+ NanBootstrappingResponseCode rsp_code;
+
+ /* The delay of bootstrapping in seconds */
+ u32 come_back_delay;
+
+ /* The length of cookie. */
+ u32 cookie_length;
+
+ /* Cookie for the follow up response */
+ u8 cookie[];
+
+} NanBootstrappingIndicationResponse;
+
+/*
+ Event indication received on the responder side when a Nan boostrapping session is initiated on
+ the Initiator side
+*/
+typedef struct {
+ /* Publish or Subscribe Id of an earlier Publish/Subscribe */
+ u16 publish_subscribe_id;
+ /*
+ Unique Instance Id corresponding to a service/session.
+ This is similar to the publish_id generated on the
+ publisher side
+ */
+ u32 bootstrapping_instance_id;
+ /*
+ This Id is the Requestor Instance that is passed as
+ part of earlier MatchInd/FollowupInd message.
+ */
+ u32 requestor_instance_id;
+ /* Discovery MAC addr of the peer/initiator */
+ u8 peer_disc_mac_addr[NAN_MAC_ADDR_LEN];
+ /* Proposed bootstrapping method from peer*/
+ u16 request_bootstrapping_method;
+
+} NanBootstrappingRequestInd;
+
+/*
+ Event indication of bootstapping confirm is received on both
+ initiator side confirming a bootstrapping method
+*/
+typedef struct {
+ /*
+ Unique token Id generated on the initiator/responder side
+ used for a bootstrapping session between two NAN devices
+ */
+ u32 bootstrapping_instance_id;
+ /* Response Code indicating ACCEPT/REJECT */
+ NanBootstrappingResponseCode rsp_code;
+ /*
+ Reason code indicating the cause for REJECT.
+ NAN_STATUS_SUCCESS and NAN_STATUS_PROTOCOL_FAILURE are
+ expected reason codes.
+ */
+ NanStatusType reason_code;
+ /* The delay of bootstrapping in seconds */
+ u32 come_back_delay;
+
+ /* The length of cookie. */
+ u32 cookie_length;
+
+ /* Cookie received from the comeback response */
+ u8 cookie[];
+
+} NanBootstrappingConfirmInd;
+
+/*
+ Event indication the device enter or exist the suspension mode
+*/
+typedef struct {
+ /* Indication the device is suspended or not */
+ bool is_suspended;
+} NanSuspensionModeChangeInd;
+
/* Response and Event Callbacks */
typedef struct {
/* NotifyResponse invoked to notify the status of the Request */
@@ -2483,7 +3058,12 @@ typedef struct {
void (*EventTransmitFollowup) (NanTransmitFollowupInd* event);
void (*EventRangeRequest) (NanRangeRequestInd* event);
void (*EventRangeReport) (NanRangeReportInd* event);
- void (*EventScheduleUpdate)(NanDataPathScheduleUpdateInd* event);
+ void (*EventScheduleUpdate) (NanDataPathScheduleUpdateInd* event);
+ void (*EventPairingRequest) (NanPairingRequestInd* event);
+ void (*EventPairingConfirm) (NanPairingConfirmInd* event);
+ void (*EventBootstrappingRequest) (NanBootstrappingRequestInd* event);
+ void (*EventBootstrappingConfirm) (NanBootstrappingConfirmInd* event);
+ void (*EventSuspensionModeChange) (NanSuspensionModeChangeInd* event);
} NanCallbackHandler;
/**@brief nan_enable_request
@@ -2789,6 +3369,97 @@ wifi_error nan_data_indication_response(transaction_id id,
wifi_error nan_data_end(transaction_id id,
wifi_interface_handle iface,
NanDataPathEndRequest* msg);
+/**@brief nan_pairing_request
+ * Initiate a NAN Pairingsession.
+ *
+ * @param transaction_id:
+ * @param wifi_interface_handle:
+ * @param NanPairingRequest:
+ * @return Synchronous wifi_error
+ * @return Asynchronous NotifyResponse CB return
+ * NAN_STATUS_SUCCESS
+ * NAN_STATUS_INVALID_PARAM
+ * NAN_STATUS_INTERNAL_FAILURE
+ * NAN_STATUS_PROTOCOL_FAILURE
+ * NAN_STATUS_INVALID_REQUESTOR_INSTANCE_ID
+ */
+wifi_error nan_pairing_request(transaction_id id, wifi_interface_handle iface,
+ NanPairingRequest* msg);
+
+/**@brief nan_pairing_indication_response
+ * Response to a pairing indication received
+ * corresponding to a pairing session. An indication
+ * is received with a pairing request and the responder
+ * will send a pairing response
+ *
+ * @param transaction_id:
+ * @param wifi_interface_handle:
+ * @param NanPairingIndicationResponse:
+ * @return Synchronous wifi_error
+ * @return Asynchronous NotifyResponse CB return
+ * NAN_STATUS_SUCCESS
+ * NAN_STATUS_INVALID_PARAM
+ * NAN_STATUS_INTERNAL_FAILURE
+ * NAN_STATUS_PROTOCOL_FAILURE
+ * NAN_STATUS_INVALID_PAIRING_ID
+ */
+wifi_error nan_pairing_indication_response(transaction_id id, wifi_interface_handle iface,
+ NanPairingIndicationResponse* msg);
+
+/**@brief nan_pairing_end
+ * Cancel and remove the existing Pairing setups
+ *
+ * @param transaction_id:
+ * @param wifi_interface_handle:
+ * @param NanPairingEndRequest:
+ * @return Synchronous wifi_error
+ * @return Asynchronous NotifyResponse CB return
+ * NAN_STATUS_SUCCESS
+ * NAN_STATUS_INVALID_PARAM
+ * NAN_STATUS_INTERNAL_FAILURE
+ * NAN_STATUS_PROTOCOL_FAILURE
+ * NAN_STATUS_INVALID_PAIRING_ID
+ */
+wifi_error nan_pairing_end(transaction_id id, wifi_interface_handle iface,
+ NanPairingEndRequest* msg);
+
+/**@brief nan_bootstrapping_request
+ * Initiate a NAN Bootstrapping session.
+ *
+ * @param transaction_id:
+ * @param wifi_interface_handle:
+ * @param NanBootstrappingRequest:
+ * @return Synchronous wifi_error
+ * @return Asynchronous NotifyResponse CB return
+ * NAN_STATUS_SUCCESS
+ * NAN_STATUS_INVALID_PARAM
+ * NAN_STATUS_INTERNAL_FAILURE
+ * NAN_STATUS_PROTOCOL_FAILURE
+ * NAN_STATUS_INVALID_REQUESTOR_INSTANCE_ID
+ */
+wifi_error nan_bootstrapping_request(transaction_id id, wifi_interface_handle iface,
+ NanBootstrappingRequest* msg);
+
+/**@brief nan_bootstrapping_indication_response
+ * Response to a pairing indication received
+ * corresponding to a pairing session. An indication
+ * is received with a pairing request and the responder
+ * will send a pairing response
+ *
+ * @param transaction_id:
+ * @param wifi_interface_handle:
+ * @param NanBootstrappingIndicationResponse:
+ * @return Synchronous wifi_error
+ * @return Asynchronous NotifyResponse CB return
+ * NAN_STATUS_SUCCESS
+ * NAN_STATUS_INVALID_PARAM
+ * NAN_STATUS_INTERNAL_FAILURE
+ * NAN_STATUS_PROTOCOL_FAILURE
+ * NAN_STATUS_INVALID_BOOTSTRAPPING_ID
+ */
+wifi_error nan_bootstrapping_indication_response(transaction_id id, wifi_interface_handle iface,
+ NanBootstrappingIndicationResponse* msg);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */