diff options
| author | Sourav Mohapatra <mohapatr@codeaurora.org> | 2018-04-16 16:11:01 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-19 02:51:07 -0700 |
| commit | 3d4ceb6d3d7a96ad5c0e575e3453927f1a445a77 (patch) | |
| tree | 972ff92f1c6009bc17bc367464a26b7bf88424ef | |
| parent | ba1448033e98c31392891bdba0cd8d2e1f05350a (diff) | |
qcacld-3.0: Add ini support for TDLS discovery wake timeout
Add host ini support for TDLS discovery wake time-out in ms.
DUT will wake until this timeout to receive TDLS discovery
response from peer. If tdls_discovery_wake_timeout is 0x0,
the DUT will choose autonomously what wake timeout value to use.
Change-Id: I47c477404668a3dfeefc30b75a9fa9dbb3521041
iCRs-Fixed: 2225974
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 27 | ||||
| -rw-r--r-- | core/hdd/inc/wlan_hdd_tdls.h | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 7 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_tdls.c | 9 | ||||
| -rw-r--r-- | core/wma/inc/wma.h | 1 | ||||
| -rw-r--r-- | core/wma/src/wma_features.c | 2 |
6 files changed, 46 insertions, 3 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index a9caac8a30d2..5a7b5f7dad45 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -7332,6 +7332,32 @@ enum hdd_link_speed_rpt_type { #define CFG_TDLS_PEER_KICKOUT_THRESHOLD_MAX (5000) #define CFG_TDLS_PEER_KICKOUT_THRESHOLD_DEFAULT (96) +/* + * <ini> + * gTDLSDiscoveryWakeTimeout - TDLS discovery WAKE timeout in ms. + * @Min: 10 + * @Max: 5000 + * @Default: 96 + * + * DUT will wake until this timeout to receive TDLS discovery response + * from peer. If tdls_discovery_wake_timeout is 0x0, the DUT will + * choose autonomously what wake timeout value to use. + * + * + * Related: gEnableTDLSSupport. + * + * Supported Feature: TDLS + * + * Usage: External + * + * </ini> + */ +#define CFG_TDLS_DISCOVERY_WAKE_TIMEOUT "gTDLSDiscoveryWakeTimeout" +#define CFG_TDLS_DISCOVERY_WAKE_TIMEOUT_MIN (0) +#define CFG_TDLS_DISCOVERY_WAKE_TIMEOUT_MAX (2000) +#define CFG_TDLS_DISCOVERY_WAKE_TIMEOUT_DEFAULT (200) + + #endif /* @@ -15041,6 +15067,7 @@ struct hdd_config { uint8_t fTDLSPrefOffChanBandwidth; uint8_t enable_tdls_scan; uint32_t tdls_peer_kickout_threshold; + uint32_t tdls_discovery_wake_timeout; #endif #ifdef WLAN_SOFTAP_VSTA_FEATURE bool fEnableVSTASupport; diff --git a/core/hdd/inc/wlan_hdd_tdls.h b/core/hdd/inc/wlan_hdd_tdls.h index a8d691795ff8..c07c742c5af7 100644 --- a/core/hdd/inc/wlan_hdd_tdls.h +++ b/core/hdd/inc/wlan_hdd_tdls.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -496,6 +496,7 @@ typedef struct { uint32_t puapsd_rx_frame_threshold; uint32_t teardown_notification_ms; uint32_t tdls_peer_kickout_threshold; + uint32_t tdls_discovery_wake_timeout; } tdlsInfo_t; int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter); diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 7db4b5e7beba..27c5c2ca74e3 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -2521,6 +2521,13 @@ struct reg_table_entry g_registry_table[] = { CFG_TDLS_PEER_KICKOUT_THRESHOLD_MIN, CFG_TDLS_PEER_KICKOUT_THRESHOLD_MAX), + REG_VARIABLE(CFG_TDLS_DISCOVERY_WAKE_TIMEOUT, WLAN_PARAM_Integer, + struct hdd_config, tdls_discovery_wake_timeout, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TDLS_DISCOVERY_WAKE_TIMEOUT_DEFAULT, + CFG_TDLS_DISCOVERY_WAKE_TIMEOUT_MIN, + CFG_TDLS_DISCOVERY_WAKE_TIMEOUT_MAX), + #endif #ifdef WLAN_SOFTAP_VSTA_FEATURE diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index e9d6dfff7970..ef3841723540 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -525,7 +525,7 @@ static void dump_tdls_state_param_setting(tdlsInfo_t *info) if (!info) return; - hdd_debug("Setting tdls state and param in fw: vdev_id: %d, tdls_state: %d, notification_interval_ms: %d, tx_discovery_threshold: %d, tx_teardown_threshold: %d, rssi_teardown_threshold: %d, rssi_delta: %d, tdls_options: 0x%x, peer_traffic_ind_window: %d, peer_traffic_response_timeout: %d, puapsd_mask: 0x%x, puapsd_inactivity_time: %d, puapsd_rx_frame_threshold: %d, teardown_notification_ms: %d, tdls_peer_kickout_threshold: %d", + hdd_debug("Setting tdls state and param in fw: vdev_id: %d, tdls_state: %d, notification_interval_ms: %d, tx_discovery_threshold: %d, tx_teardown_threshold: %d, rssi_teardown_threshold: %d, rssi_delta: %d, tdls_options: 0x%x, peer_traffic_ind_window: %d, peer_traffic_response_timeout: %d, puapsd_mask: 0x%x, puapsd_inactivity_time: %d, puapsd_rx_frame_threshold: %d, teardown_notification_ms: %d, tdls_peer_kickout_threshold: %d, tdls_discovery_wake_timeout: %d", info->vdev_id, info->tdls_state, info->notification_interval_ms, @@ -540,7 +540,8 @@ static void dump_tdls_state_param_setting(tdlsInfo_t *info) info->puapsd_inactivity_time, info->puapsd_rx_frame_threshold, info->teardown_notification_ms, - info->tdls_peer_kickout_threshold); + info->tdls_peer_kickout_threshold, + info->tdls_discovery_wake_timeout); } @@ -1902,6 +1903,8 @@ int wlan_hdd_tdls_set_params(struct net_device *dev, pHddCtx->config->tdls_idle_timeout; tdlsParams->tdls_peer_kickout_threshold = pHddCtx->config->tdls_peer_kickout_threshold; + tdlsParams->tdls_discovery_wake_timeout = + pHddCtx->config->tdls_discovery_wake_timeout; dump_tdls_state_param_setting(tdlsParams); @@ -2044,6 +2047,8 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, hdd_ctx->config->tdls_idle_timeout; tdls_param->tdls_peer_kickout_threshold = hdd_ctx->config->tdls_peer_kickout_threshold; + tdls_param->tdls_discovery_wake_timeout = + hdd_ctx->config->tdls_discovery_wake_timeout; dump_tdls_state_param_setting(tdls_param); diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 3083c1ebc967..eeb24ed32b8b 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -2227,6 +2227,7 @@ typedef struct wma_tdls_params { uint32_t puapsd_rx_frame_threshold; uint32_t teardown_notification_ms; uint32_t tdls_peer_kickout_threshold; + uint32_t tdls_discovery_wake_timeout; } t_wma_tdls_params; /** diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 8a32315c1d73..8e7afbbfb5a7 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -9138,6 +9138,8 @@ QDF_STATUS wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams) wma_tdls->teardown_notification_ms; params.tdls_peer_kickout_threshold = wma_tdls->tdls_peer_kickout_threshold; + params.tdls_discovery_wake_timeout = + wma_tdls->tdls_discovery_wake_timeout; ret = wmi_unified_update_fw_tdls_state_cmd(wma_handle->wmi_handle, ¶ms, tdls_state); |
