wlan: Add traffic monitor on SAP/P2P-GO mode
To address the issue wherein APPS fails to power collapse
when OBSS protection is enabled,
we need to implement an IDLE traffic monitoring
logic in the HDD: it needs to detect 2 states:
IDLE STATE: HDD transitions to that STATE
when there is no traffic for a configuration duration in cfg file.
ACTIVE STATE: this is the initial state when SAP comes up.
HDD moves also to that state
when it sees traffic when in IDLE State.
Change-Id: I45dda8a1b8d7aa588ec940cc3b115b918b01c932
CRs-fixed: 495899
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index f51d361..ee7bae4 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1743,6 +1743,19 @@
#define CFG_MAX_MEDIUM_TIME_STAMAX WNI_CFG_MAX_MEDIUM_TIME_STAMAX
#define CFG_MAX_MEDIUM_TIME_STADEFAULT WNI_CFG_MAX_MEDIUM_TIME_STADEF
+/*
+ * SAP/P2P-GO mode traffic monitor
+ */
+#define CFG_ENABLE_TRAFFIC_MONITOR "gEnableTrafficMonitor"
+#define CFG_ENABLE_TRAFFIC_MONITOR_MIN ( 0 )
+#define CFG_ENABLE_TRAFFIC_MONITOR_MAX ( 1 )
+#define CFG_ENABLE_TRAFFIC_MONITOR_DEFAULT ( 0 )
+
+#define CFG_TRAFFIC_IDLE_TIMEOUT "gTrafficIdleTimeout"
+#define CFG_TRAFFIC_IDLE_TIMEOUT_MIN ( 3000 )
+#define CFG_TRAFFIC_IDLE_TIMEOUT_MAX ( 10000 )
+#define CFG_TRAFFIC_IDLE_TIMEOUT_DEFAULT ( 5000 )
+
/*---------------------------------------------------------------------------
Type declarations
-------------------------------------------------------------------------*/
@@ -2117,6 +2130,8 @@
v_BOOL_t enableSSR;
char listOfNon11acCountryCode[128];
v_U32_t cfgMaxMediumTime;
+ v_U8_t enableTrafficMonitor;
+ v_U32_t trafficIdleTimeout;
} hdd_config_t;
/*---------------------------------------------------------------------------
Function declarations and documenation