From 79e0e1be8c34f46670bea3d7813f35efbe4d1311 Mon Sep 17 00:00:00 2001 From: Subhani Shaik Date: Thu, 3 Nov 2016 10:08:48 -0700 Subject: [PATCH] [AWARE] Config/Publish/Subscribe DW interval config As part of the Power save enhancements: 1) The device level DW intervals to be configured through config API. 2) Awake DW intervals for publish and subscribe(period parameter) can be configured using the interval values 1, 2, 4, 8, 16. Bug: 33552536 Test: builds Change-Id: I3177ba13c861275a5860b825d3c466e0643bcec1 --- include/hardware_legacy/wifi_nan.h | 50 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/include/hardware_legacy/wifi_nan.h b/include/hardware_legacy/wifi_nan.h index bb1bffb..70e1f6b 100644 --- a/include/hardware_legacy/wifi_nan.h +++ b/include/hardware_legacy/wifi_nan.h @@ -591,6 +591,31 @@ typedef struct { } NanReceivePostDiscovery; /* + NAN device level configuration of SDF and Sync beacons in both + 2.4/5GHz bands +*/ +typedef struct { + /* Configure 2.4GHz DW Band */ + u8 config_2dot4g_dw_band; + /* + Indicates the interval for Sync beacons and SDF's in 2.4GHz band. + Valid values of DW Interval are: 1, 2, 3, 4 and 5, 0 is reserved. + The SDF includes in OTA when enabled. The publish/subscribe period + values don't override the device level configurations. + */ + u32 dw_2dot4g_interval_val; + /* Configure 5GHz DW Band */ + u8 config_5g_dw_band; + /* + Indicates the interval for Sync beacons and SDF's in 5GHz band + Valid values of DW Interval are: 1, 2, 3, 4 and 5, 0 no wake up for + any interval. The SDF includes in OTA when enabled. The publish/subscribe + period values don't override the device level configurations. + */ + u32 dw_5g_interval_val; +} NanConfigDW; + +/* Enable Request Message Structure The NanEnableReq message instructs the Discovery Engine to enter an operational state */ @@ -750,6 +775,9 @@ typedef struct { u8 config_5g_channel; wifi_channel channel_5g_val; + + /* Configure 2.4/5GHz DW */ + NanConfigDW config_dw; } NanEnableRequest; /* @@ -760,7 +788,15 @@ typedef struct { typedef struct { u16 publish_id;/* id 0 means new publish, any other id is existing publish */ u16 ttl; /* how many seconds to run for. 0 means forever until canceled */ - u16 period; /* periodicity of OTA unsolicited publish. Specified in increments of 500 ms */ + /* + period: Awake DW Interval for publish(service) + Indicates the interval between two Discovery Windows in which + the device supporting the service is awake to transmit or + receive the Service Discovery frames. + Valid values of Awake DW Interval are: 1, 2, 4, 8 and 16, value 0 will + default to 1. + */ + u16 period; NanPublishType publish_type;/* 0= unsolicited, solicited = 1, 2= both */ NanTxType tx_type; /* 0 = broadcast, 1= unicast if solicited publish */ u8 publish_count; /* number of OTA Publish, 0 means forever until canceled */ @@ -851,7 +887,15 @@ typedef struct { typedef struct { u16 subscribe_id; /* id 0 means new subscribe, non zero is existing subscribe */ u16 ttl; /* how many seconds to run for. 0 means forever until canceled */ - u16 period;/* periodicity of OTA Active Subscribe. Units in increments of 500 ms , 0 = attempt every DW*/ + /* + period: Awake DW Interval for subscribe(service) + Indicates the interval between two Discovery Windows in which + the device supporting the service is awake to transmit or + receive the Service Discovery frames. + Valid values of Awake DW Interval are: 1, 2, 4, 8 and 16, value 0 will + default to 1. + */ + u16 period; /* Flag which specifies how the Subscribe request shall be processed. */ NanSubscribeType subscribe_type; /* 0 - PASSIVE , 1- ACTIVE */ @@ -1063,6 +1107,8 @@ typedef struct { /* NAN Further availability Map */ u8 config_fam; NanFurtherAvailabilityMap fam_val; + /* Configure 2.4/5GHz DW */ + NanConfigDW config_dw; } NanConfigRequest; /* -- 2.11.0