From 0001cdb414d20e1b8a8f9426ecdf27795c50acf9 Mon Sep 17 00:00:00 2001 From: Subhani Shaik Date: Tue, 6 Dec 2016 16:15:06 -0800 Subject: [PATCH] [AWARE]: Enable Service Descriptor Extension Attribute Bug: 33554197 Test: builds Change-Id: I22e442391776d86aa69e888fade4f03ca4002cbe --- include/hardware_legacy/wifi_nan.h | 49 +++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/include/hardware_legacy/wifi_nan.h b/include/hardware_legacy/wifi_nan.h index bf77b76..5f490f5 100644 --- a/include/hardware_legacy/wifi_nan.h +++ b/include/hardware_legacy/wifi_nan.h @@ -115,6 +115,18 @@ typedef enum { NAN_EVENT_ID_JOINED_CLUSTER } NanDiscEngEventType; +/* NAN Data Path type */ +typedef enum { + NAN_DATA_PATH_UNICAST_MSG = 0, + NAN_DATA_PATH_MULTICAST_MSG +} NdpType; + +/* NAN Ranging Configuration */ +typedef enum { + NAN_RANGING_DISABLE = 0, + NAN_RANGING_ENABLE +} NanRangingState; + /* TCA Type */ typedef enum { NAN_TCA_ID_CLUSTER_SIZE = 0 @@ -226,6 +238,31 @@ typedef enum { #define NAN_CIPHER_SUITE_SHARED_KEY_128_MASK 0x01 #define NAN_CIPHER_SUITE_SHARED_KEY_256_MASK 0x02 +/* + Structure to set the Service Descriptor Extension + Attribute (SDEA) passed as part of NanPublishRequest/ + NanSubscribeRequest/NanMatchInd. +*/ +typedef struct { + /* + Optional configuration of Data Path Enable request. + configure flag determines whether configuration needs + to be passed or not. + */ + u8 config_nan_data_path; + NdpType ndp_type; + /* + NAN secuirty required flag to indicate + if the security is enabled or disabled + */ + NanDataPathSecurityCfgStatus security_cfg; + /* + NAN ranging required flag to indicate + if ranging is enabled on disabled + */ + NanRangingState ranging_state; +} NanSdeaCtrlParams; + /* Nan/NDP Capabilites info */ typedef struct { u32 max_concurrent_nan_clusters; @@ -905,8 +942,8 @@ typedef struct { */ u8 scid[NAN_MAX_SCID_BUF_LEN]; - /* NAN secuirty required flag */ - NanDataPathSecurityCfgStatus security_cfg; + /* NAN configure service discovery extended attributes */ + NanSdeaCtrlParams sdea_params; } NanPublishRequest; /* @@ -1050,8 +1087,8 @@ typedef struct { */ u8 scid[NAN_MAX_SCID_BUF_LEN]; - /* NAN security required flag */ - NanDataPathSecurityCfgStatus security_cfg; + /* NAN configure service discovery extended attributes */ + NanSdeaCtrlParams sdea_params; } NanSubscribeRequest; /* @@ -1560,8 +1597,8 @@ typedef struct { */ u8 scid[NAN_MAX_SCID_BUF_LEN]; - /* NAN security required flag */ - NanDataPathSecurityCfgStatus security_cfg; + /* Peer service discovery extended attributes */ + NanSdeaCtrlParams peer_sdea_params; } NanMatchInd; /* -- 2.11.0