OSDN Git Service

[AWARE]: Enable Service Descriptor Extension Attribute
authorSubhani Shaik <subhanis@codeaurora.org>
Wed, 7 Dec 2016 00:15:06 +0000 (16:15 -0800)
committerEtan Cohen <etancohen@google.com>
Mon, 12 Dec 2016 23:06:57 +0000 (15:06 -0800)
Bug: 33554197
Test: builds
Change-Id: I22e442391776d86aa69e888fade4f03ca4002cbe

include/hardware_legacy/wifi_nan.h

index bf77b76..5f490f5 100644 (file)
@@ -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;
 
 /*