diff options
| author | Dustin Brown <dustinb@codeaurora.org> | 2017-03-08 13:08:27 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2017-03-09 21:08:47 -0800 |
| commit | fff9c5c049fcbf4235f3ec0a41523723d0eae5f0 (patch) | |
| tree | 657dde1ae70a0819cb232767c9f43ab7e40bb672 | |
| parent | 457cd4e66c4a1c5744bb29aa64381a488bb49ebf (diff) | |
qcacld-3.0: Add ini for station keepalive method
Add an ini item for configuring the keepalive method used by station
interfaces.
Change-Id: Id44773f5ae7f7ad1ad9441592512ab3e2ce3a076
CRs-Fixed: 2016799
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 39 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 7 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 3 |
3 files changed, 48 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index fa001ae9a446..34fb673afcb1 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -3023,6 +3023,43 @@ typedef enum { #define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MAX (65535) #define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_DEFAULT (90) +/** + * enum station_keepalive_method - available keepalive methods for stations + * @HDD_STA_KEEPALIVE_NULL_DATA: null data packet + * @HDD_STA_KEEPALIVE_GRAT_ARP: gratuitous ARP packet + * @HDD_STA_KEEPALIVE_COUNT: number of method options available + */ +enum station_keepalive_method { + HDD_STA_KEEPALIVE_NULL_DATA, + HDD_STA_KEEPALIVE_GRAT_ARP, + /* keep at the end */ + HDD_STA_KEEPALIVE_COUNT +}; + +/* + * <ini> + * gStaKeepAliveMethod - Which keepalive method to use + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini determines which keepalive method to use for station interfaces + * 1) Use null data packets + * 2) Use gratuitous ARP packets + * + * Related: gStaKeepAlivePeriod, gApKeepAlivePeriod, gGoKeepAlivePeriod + * + * Supported Feature: STA, Keepalive + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_STA_KEEPALIVE_METHOD_NAME "gStaKeepAliveMethod" +#define CFG_STA_KEEPALIVE_METHOD_MIN (HDD_STA_KEEPALIVE_NULL_DATA) +#define CFG_STA_KEEPALIVE_METHOD_MAX (HDD_STA_KEEPALIVE_COUNT - 1) +#define CFG_STA_KEEPALIVE_METHOD_DEFAULT (HDD_STA_KEEPALIVE_GRAT_ARP) + /* WMM configuration */ /* * <ini> @@ -9776,6 +9813,7 @@ enum dot11p_mode { #define CFG_EXTWOW_TCP_RX_TIMEOUT_DEFAULT (200) #endif + /* * <ini> * gEnableFastPwrTransition - Configuration for fast power transition @@ -9994,6 +10032,7 @@ struct hdd_config { uint8_t enableLTECoex; uint32_t apKeepAlivePeriod; uint32_t goKeepAlivePeriod; + enum station_keepalive_method sta_keepalive_method; uint32_t apLinkMonitorPeriod; uint32_t goLinkMonitorPeriod; uint32_t nBeaconInterval; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 67584abc878a..eca93a3e6dc1 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -1638,6 +1638,13 @@ REG_TABLE_ENTRY g_registry_table[] = { CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MIN, CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MAX), + REG_VARIABLE(CFG_STA_KEEPALIVE_METHOD_NAME, WLAN_PARAM_Integer, + struct hdd_config, sta_keepalive_method, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_STA_KEEPALIVE_METHOD_DEFAULT, + CFG_STA_KEEPALIVE_METHOD_MIN, + CFG_STA_KEEPALIVE_METHOD_MAX), + REG_VARIABLE(CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_NAME, WLAN_PARAM_Integer, struct hdd_config, AddTSWhenACMIsOff, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 04b0561e8bc3..da78c0c7df5a 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -853,7 +853,8 @@ static void __hdd_ipv4_notifier_work_queue(struct work_struct *work) */ hdd_conf_arp_offload(pAdapter, true); - hdd_set_grat_arp_keepalive(pAdapter); + if (pHddCtx->config->sta_keepalive_method == HDD_STA_KEEPALIVE_GRAT_ARP) + hdd_set_grat_arp_keepalive(pAdapter); } /** |
