summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoddar, Siddarth <siddpodd@codeaurora.org>2017-10-11 15:47:40 +0530
committersnandini <snandini@codeaurora.org>2017-10-17 17:52:14 -0700
commit5db08e45f479bf8f022e8fa259d994efd4141f36 (patch)
treefe6b1a37e1fa156f5a548cba7e9b658135c3cdc4
parent3e649e111652c30c8c7721e22301e698f4d324ef (diff)
qcacld-3.0: Add ini support to enable/disable data stall detection
Add ini support to enable/disable WIFI data stall detection feature. By default gEnableDataStallDetection ini set to 1. CRs-Fixed: 2124762 Change-Id: I2d9cd3fe0092aeb29c37cded2e5245c9f816ec08
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h19
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c9
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c10
-rw-r--r--core/hdd/src/wlan_hdd_main.c4
-rw-r--r--core/hdd/src/wlan_hdd_softap_tx_rx.c3
-rw-r--r--core/hdd/src/wlan_hdd_tx_rx.c3
6 files changed, 42 insertions, 6 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index c20325f2cfd0..43668511c84e 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -5380,6 +5380,24 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_SSR_MAX (1)
#define CFG_ENABLE_SSR_DEFAULT (1)
+/**
+ * <ini>
+ * gEnableDataStallDetection - Enable/Disable Data stall detection
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable data stall detection
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_DATA_STALL_DETECTION "gEnableDataStallDetection"
+#define CFG_ENABLE_DATA_STALL_DETECTION_MIN (0)
+#define CFG_ENABLE_DATA_STALL_DETECTION_MAX (1)
+#define CFG_ENABLE_DATA_STALL_DETECTION_DEFAULT (1)
+
/*
* <ini>
* gEnableOverLapCh - Enables Overlap Channel. If set, allow overlapping
@@ -13374,6 +13392,7 @@ struct hdd_config {
uint8_t retryLimitOne;
uint8_t retryLimitTwo;
bool enableSSR;
+ bool enable_data_stall_det;
uint32_t cfgMaxMediumTime;
bool enableVhtFor24GHzBand;
bool enable_sap_vendor_vht;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 510621ab2040..9c4b35a223f6 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -2665,6 +2665,13 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_SSR_MAX,
cb_notify_set_enable_ssr, 0),
+ REG_VARIABLE(CFG_ENABLE_DATA_STALL_DETECTION, WLAN_PARAM_Integer,
+ struct hdd_config, enable_data_stall_det,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_DATA_STALL_DETECTION_DEFAULT,
+ CFG_ENABLE_DATA_STALL_DETECTION_MIN,
+ CFG_ENABLE_DATA_STALL_DETECTION_MAX),
+
REG_VARIABLE(CFG_MAX_MEDIUM_TIME, WLAN_PARAM_Integer,
struct hdd_config, cfgMaxMediumTime,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -6409,6 +6416,8 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
pHddCtx->config->enableLpwrImgTransition);
hdd_debug("Name = [gEnableSSR] Value = [%u] ",
pHddCtx->config->enableSSR);
+ hdd_debug("Name = [gEnableDataStallDetection] Value = [%u] ",
+ pHddCtx->config->enable_data_stall_det);
hdd_debug("Name = [gEnableVhtFor24GHzBand] Value = [%u] ",
pHddCtx->config->enableVhtFor24GHzBand);
hdd_debug("Name = [gEnableIbssHeartBeatOffload] Value = [%u] ",
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 036d6e8fdd77..3ad96e2c7c16 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -10461,10 +10461,12 @@ static int __wlan_hdd_cfg80211_get_nud_stats(struct wiphy *wiphy,
INIT_COMPLETION(context->response_event);
spin_unlock(&hdd_context_lock);
- ol_txrx_post_data_stall_event(DATA_STALL_LOG_INDICATOR_FRAMEWORK,
- DATA_STALL_LOG_NUD_FAILURE,
- 0xFF, 0XFF,
- DATA_STALL_LOG_RECOVERY_TRIGGER_PDR);
+ if (hdd_ctx->config->enable_data_stall_det)
+ ol_txrx_post_data_stall_event(
+ DATA_STALL_LOG_INDICATOR_FRAMEWORK,
+ DATA_STALL_LOG_NUD_FAILURE,
+ 0xFF, 0XFF,
+ DATA_STALL_LOG_RECOVERY_TRIGGER_PDR);
if (QDF_STATUS_SUCCESS !=
sme_get_nud_debug_stats(hdd_ctx->hHal, &arp_stats_params)) {
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 9d78438f002f..1cf93e9aa5fb 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -9439,6 +9439,10 @@ static int hdd_features_init(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
else
hdd_set_idle_ps_config(hdd_ctx, false);
+ /* Send Enable/Disable data stall detection cmd to FW */
+ sme_cli_set_command(0, WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE,
+ hdd_ctx->config->enable_data_stall_det, PDEV_CMD);
+
if (hdd_ctx->config->enable_go_cts2self_for_sta)
sme_set_cts2self_for_p2p_go(hdd_ctx->hHal);
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 5144faa3028a..4ed62dc0b8f0 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -550,7 +550,8 @@ static void __hdd_softap_tx_timeout(struct net_device *dev)
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,
"Detected data stall due to continuous TX timeouts");
adapter->hdd_stats.hddTxRxStats.cont_txtimeout_cnt = 0;
- ol_txrx_post_data_stall_event(
+ if (hdd_ctx->config->enable_data_stall_det)
+ ol_txrx_post_data_stall_event(
DATA_STALL_LOG_INDICATOR_HOST_DRIVER,
DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT,
0xFF, 0xFF,
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c
index 125685f56170..2e00e9323dd3 100644
--- a/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_tx_rx.c
@@ -895,7 +895,8 @@ static void __hdd_tx_timeout(struct net_device *dev)
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,
"Data stall due to continuous TX timeouts");
adapter->hdd_stats.hddTxRxStats.cont_txtimeout_cnt = 0;
- ol_txrx_post_data_stall_event(
+ if (hdd_ctx->config->enable_data_stall_det)
+ ol_txrx_post_data_stall_event(
DATA_STALL_LOG_INDICATOR_HOST_DRIVER,
DATA_STALL_LOG_HOST_STA_TX_TIMEOUT,
0xFF, 0xFF,