Sfoglia il codice sorgente

qcacld-3.0: Cleanup P2P and TDLS WNI configures

Use new cfg API for P2P and TDLS WNI configures, and cleanup related
legacy codes. Remove two not use P2P INI configures.

Change-Id: Ie37fd5e598ececba561581952a23601595607b2e
CRs-Fixed: 2286387
Wu Gao 6 anni fa
parent
commit
3365e780ff

+ 0 - 35
core/hdd/inc/wlan_hdd_cfg.h

@@ -6408,12 +6408,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MAX     (1)
 #define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_DEFAULT (0)
 
-/* Enable debug for remain on channel issues */
-#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_NAME    "gDebugP2pRemainOnChannel"
-#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_DEFAULT (0)
-#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MIN     (0)
-#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MAX     (1)
-
 /*
  * SAP ALLOW All Channels
  */
@@ -7640,32 +7634,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_MAC_ADDR_SPOOFING_MAX            (1)
 #define CFG_ENABLE_MAC_ADDR_SPOOFING_DEFAULT        (1)
 
-/*
- * <ini>
- * gP2PListenDeferInterval - Defer Remain on channel for some duration
- * @Min: 100
- * @Max: 200
- * @Default: 100
- *
- * This ini is used to defer back to back RoC request when sta is
- * connected.
- * If back to back listen received when sta is connected then fw is
- * not getting enough time to spend on home channel so it leading to
- * heartbeat failure.
- *
- * Supported Feature: P2P
- *
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_P2P_LISTEN_DEFER_INTERVAL_NAME        "gP2PListenDeferInterval"
-#define CFG_P2P_LISTEN_DEFER_INTERVAL_MIN         (100)
-#define CFG_P2P_LISTEN_DEFER_INTERVAL_MAX         (200)
-#define CFG_P2P_LISTEN_DEFER_INTERVAL_DEFAULT     (100)
-
 /*
  * <ini>
  * gStaMiracastMccRestTimeVal - Rest time when Miracast is running.
@@ -14402,8 +14370,6 @@ struct hdd_config {
 
 	uint8_t allowDFSChannelRoam;
 
-	bool debugP2pRemainOnChannel;
-
 #ifndef REMOVE_PKT_LOG
 	bool enablePacketLog;
 #endif
@@ -14498,7 +14464,6 @@ struct hdd_config {
 	uint8_t conc_custom_rule1;
 	uint8_t conc_custom_rule2;
 	uint8_t is_sta_connection_in_5gz_enabled;
-	uint16_t p2p_listen_defer_interval;
 	uint32_t sta_miracast_mcc_rest_time_val;
 	bool is_ramdump_enabled;
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE

+ 0 - 121
core/hdd/src/wlan_hdd_cfg.c

@@ -42,8 +42,6 @@
 #include "wlan_hdd_green_ap.h"
 #include "wlan_hdd_green_ap_cfg.h"
 #include "wlan_hdd_twt.h"
-#include "wlan_p2p_cfg_api.h"
-#include "wlan_tdls_cfg_api.h"
 
 static void
 cb_notify_set_roam_prefer5_g_hz(struct hdd_context *hdd_ctx,
@@ -2743,13 +2741,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MIN,
 		     CFG_ENABLE_CCK_TX_FIR_OVERRIDE_MAX),
 
-	REG_VARIABLE(CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, debugP2pRemainOnChannel,
-		     VAR_FLAGS_OPTIONAL,
-		     CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_DEFAULT,
-		     CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MIN,
-		     CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MAX),
-
 #ifndef REMOVE_PKT_LOG
 	REG_VARIABLE(CFG_ENABLE_PACKET_LOG, WLAN_PARAM_Integer,
 		     struct hdd_config, enablePacketLog,
@@ -3203,14 +3194,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MIN,
 		     CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MAX),
 
-	REG_VARIABLE(CFG_P2P_LISTEN_DEFER_INTERVAL_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, p2p_listen_defer_interval,
-		     VAR_FLAGS_OPTIONAL |
-		     VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_P2P_LISTEN_DEFER_INTERVAL_DEFAULT,
-		     CFG_P2P_LISTEN_DEFER_INTERVAL_MIN,
-		     CFG_P2P_LISTEN_DEFER_INTERVAL_MAX),
-
 	REG_VARIABLE(CFG_MULTICAST_HOST_FW_MSGS, WLAN_PARAM_Integer,
 		     struct hdd_config, multicast_host_fw_msgs,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -6705,8 +6688,6 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
 	hdd_debug("Name = [gEnableDumpCollect] Value = [%u]",
 			hdd_ctx->config->is_ramdump_enabled);
 
-	hdd_debug("Name = [gP2PListenDeferInterval] Value = [%u]",
-		  hdd_ctx->config->p2p_listen_defer_interval);
 	hdd_debug("Name = [is_ps_enabled] value = [%d]",
 		   hdd_ctx->config->is_ps_enabled);
 	hdd_debug("Name = [tso_enable] value = [%d]",
@@ -7925,9 +7906,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 	bool status = true;
 	struct hdd_config *config = hdd_ctx->config;
 	mac_handle_t mac_handle;
-	uint32_t ivalue;
-	bool bvalue;
-	QDF_STATUS ret;
 
 	/*
 	 * During the initialization both 2G and 5G capabilities should be same.
@@ -8015,35 +7993,12 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("Couldn't pass on WNI_CFG_AP_KEEP_ALIVE_TIMEOUT to CFG");
 	}
 
-	ret = cfg_p2p_get_go_keepalive_period(hdd_ctx->hdd_psoc, &ivalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_GO_KEEP_ALIVE_TIMEOUT,
-				      ivalue);
-
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_GO_KEEP_ALIVE_TIMEOUT to CFG");
-		}
-	}
-
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_AP_LINK_MONITOR_TIMEOUT,
 		    config->apLinkMonitorPeriod) == QDF_STATUS_E_FAILURE) {
 		status = false;
 		hdd_err("Couldn't pass on WNI_CFG_AP_LINK_MONITOR_TIMEOUT to CFG");
 	}
 
-	ret = cfg_p2p_get_go_link_monitor_period(hdd_ctx->hdd_psoc, &ivalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_GO_LINK_MONITOR_TIMEOUT,
-				      ivalue);
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_GO_LINK_MONITOR_TIMEOUT to CFG");
-		}
-	}
-
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_SINGLE_TID_RC,
 		    config->bSingleTidRc) == QDF_STATUS_E_FAILURE) {
 		status = false;
@@ -8118,82 +8073,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("Couldn't pass on WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP to CFG");
 	}
 
-#ifdef FEATURE_WLAN_TDLS
-
-	ret = cfg_tdls_get_uapsd_mask(hdd_ctx->hdd_psoc, &ivalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK,
-				      ivalue);
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK to CFG");
-		}
-	}
-
-	ret = cfg_tdls_get_buffer_sta_enable(hdd_ctx->hdd_psoc, &bvalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_TDLS_BUF_STA_ENABLED,
-				      (uint32_t)bvalue);
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_TDLS_BUF_STA_ENABLED to CFG");
-		}
-	}
-
-	ret = cfg_tdls_get_uapsd_inactivity_time(hdd_ctx->hdd_psoc, &ivalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_TDLS_PUAPSD_INACT_TIME,
-				      ivalue);
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_TDLS_PUAPSD_INACT_TIME to CFG");
-		}
-	}
-
-	ret = cfg_tdls_get_rx_pkt_threshold(hdd_ctx->hdd_psoc, &ivalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_TDLS_RX_FRAME_THRESHOLD,
-				      ivalue);
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_TDLS_RX_FRAME_THRESHOLD to CFG");
-		}
-	}
-
-	ret = cfg_tdls_get_off_channel_enable(hdd_ctx->hdd_psoc, &bvalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_TDLS_OFF_CHANNEL_ENABLED,
-				      (uint32_t)bvalue);
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_TDLS_BUF_STA_ENABLED to CFG");
-		}
-	}
-
-	ret = cfg_tdls_get_wmm_mode_enable(hdd_ctx->hdd_psoc, &bvalue);
-	if (ret == QDF_STATUS_SUCCESS) {
-		ret = sme_cfg_set_int(mac_handle,
-				      WNI_CFG_TDLS_WMM_MODE_ENABLED,
-				      (uint32_t)bvalue);
-		if (ret == QDF_STATUS_E_FAILURE) {
-			status = false;
-			hdd_err("Couldn't pass on WNI_CFG_TDLS_WMM_MODE_ENABLED to CFG");
-		}
-	}
-#endif
-
-	if (sme_cfg_set_int(mac_handle,
-			    WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL,
-			    config->debugP2pRemainOnChannel) ==
-			QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Couldn't pass on WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL to CFG");
-	}
 #ifdef WLAN_FEATURE_11W
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_PMF_SA_QUERY_MAX_RETRIES,
 			    config->pmfSaQueryMaxRetries) ==

+ 0 - 45
core/mac/inc/wni_cfg.h

@@ -179,27 +179,18 @@ enum {
 	WNI_CFG_ASSOC_STA_LIMIT,
 	WNI_CFG_ENABLE_LTE_COEX,
 	WNI_CFG_AP_KEEP_ALIVE_TIMEOUT,
-	WNI_CFG_GO_KEEP_ALIVE_TIMEOUT,
 	WNI_CFG_ENABLE_MC_ADDR_LIST,
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
 	WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
 	WNI_CFG_AP_LINK_MONITOR_TIMEOUT,
-	WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK,
-	WNI_CFG_TDLS_BUF_STA_ENABLED,
-	WNI_CFG_TDLS_PUAPSD_INACT_TIME,
-	WNI_CFG_TDLS_RX_FRAME_THRESHOLD,
 	WNI_CFG_PMF_SA_QUERY_MAX_RETRIES,
 	WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL,
-	WNI_CFG_GO_LINK_MONITOR_TIMEOUT,
 	WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY,
 	WNI_CFG_CURRENT_RSSI,
 	WNI_CFG_RTT3_ENABLE,
-	WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL,
-	WNI_CFG_TDLS_OFF_CHANNEL_ENABLED,
 	WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	WNI_CFG_DFS_MASTER_ENABLED,
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
-	WNI_CFG_TDLS_WMM_MODE_ENABLED,
 	WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME,
 	WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME,
 	WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL,
@@ -1136,10 +1127,6 @@ enum {
 #define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STAMAX    65535
 #define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STADEF    20
 
-#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STAMIN    1
-#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STAMAX    65535
-#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STADEF    20
-
 #define WNI_CFG_ENABLE_MC_ADDR_LIST_STAMIN    0
 #define WNI_CFG_ENABLE_MC_ADDR_LIST_STAMAX    1
 #define WNI_CFG_ENABLE_MC_ADDR_LIST_STADEF    0
@@ -1156,22 +1143,6 @@ enum {
 #define WNI_CFG_AP_LINK_MONITOR_TIMEOUT_STAMAX    255
 #define WNI_CFG_AP_LINK_MONITOR_TIMEOUT_STADEF    3
 
-#define WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK_STAMIN    0
-#define WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK_STAMAX    15
-#define WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK_STADEF    0
-
-#define WNI_CFG_TDLS_BUF_STA_ENABLED_STAMIN    0
-#define WNI_CFG_TDLS_BUF_STA_ENABLED_STAMAX    1
-#define WNI_CFG_TDLS_BUF_STA_ENABLED_STADEF    0
-
-#define WNI_CFG_TDLS_PUAPSD_INACT_TIME_STAMIN    0
-#define WNI_CFG_TDLS_PUAPSD_INACT_TIME_STAMAX    10
-#define WNI_CFG_TDLS_PUAPSD_INACT_TIME_STADEF    0
-
-#define WNI_CFG_TDLS_RX_FRAME_THRESHOLD_STAMIN    10
-#define WNI_CFG_TDLS_RX_FRAME_THRESHOLD_STAMAX    20
-#define WNI_CFG_TDLS_RX_FRAME_THRESHOLD_STADEF    10
-
 #define WNI_CFG_PMF_SA_QUERY_MAX_RETRIES_STAMIN    0
 #define WNI_CFG_PMF_SA_QUERY_MAX_RETRIES_STAMAX    20
 #define WNI_CFG_PMF_SA_QUERY_MAX_RETRIES_STADEF    5
@@ -1180,10 +1151,6 @@ enum {
 #define WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL_STAMAX    2000
 #define WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL_STADEF    200
 
-#define WNI_CFG_GO_LINK_MONITOR_TIMEOUT_STAMIN    3
-#define WNI_CFG_GO_LINK_MONITOR_TIMEOUT_STAMAX    50
-#define WNI_CFG_GO_LINK_MONITOR_TIMEOUT_STADEF    10
-
 #define WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY_STAMIN    100
 #define WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY_STAMAX    1000
 #define WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY_STADEF    300
@@ -1196,14 +1163,6 @@ enum {
 #define WNI_CFG_RTT3_ENABLE_STAMAX    1
 #define WNI_CFG_RTT3_ENABLE_STADEF    1
 
-#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_STAMIN    0
-#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_STAMAX    1
-#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_STADEF    0
-
-#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED_STAMIN    0
-#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED_STAMAX    1
-#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED_STADEF    0
-
 #define WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMIN    0
 #define WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMAX    100
 #define WNI_CFG_IBSS_ATIM_WIN_SIZE_STADEF    0
@@ -1216,10 +1175,6 @@ enum {
 #define WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMAX    1
 #define WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STADEF    0
 
-#define WNI_CFG_TDLS_WMM_MODE_ENABLED_STAMIN    0
-#define WNI_CFG_TDLS_WMM_MODE_ENABLED_STAMAX    1
-#define WNI_CFG_TDLS_WMM_MODE_ENABLED_STADEF    0
-
 #define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMIN  5
 #define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMAX  1000
 #define WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STADEF  20

+ 0 - 102
core/mac/src/cfg/cfgUtil/cfg.txt

@@ -3757,17 +3757,6 @@ V    RW    NP
 HAL
 1    65535    20
 
-*
-* GO Keep Alive Timeout (TU)
-*
-WNI_CFG_GO_KEEP_ALIVE_TIMEOUT    I    4    7
-V    RW    NP
-HAL
-1    65535    20
-V    RW    NP
-HAL
-1    65535    20
-
 *
 * MC Addr List power control will be enabled if value is set to 1
 *
@@ -3830,53 +3819,6 @@ V    RW    NP
 HAL
 1    255    3
 
-*
-*TDLS Station's UAPSD MASK Configuration
-*
-*
-*
-WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK  I   4   7
-V    RW    NP
-LIM
-0    15    0
-V    RW    NP
-LIM
-0    15   0
-*
-*TDLS Stations Buffer STA Capability
-*
-*
-*
-WNI_CFG_TDLS_BUF_STA_ENABLED  I   4   7
-V    RW    NP
-LIM
-0    1    0
-V    RW    NP
-LIM
-0    1    0
-*TDLS Stations PUAPSD Inactivity Timer
-*
-*
-*
-WNI_CFG_TDLS_PUAPSD_INACT_TIME  I   4   7
-V    RW    NP
-LIM
-0    10    0
-V    RW    NP
-LIM
-0    10    0
-*TDLS Stations PUAPSD RX Frame Threshold
-*
-*
-*
-WNI_CFG_TDLS_RX_FRAME_THRESHOLD  I   4   7
-V    RW    NP
-LIM
-10   20    10
-V    RW    NP
-LIM
-10   20    10
-
 *
 * PMF SA Query Maximum Retries
 *
@@ -3914,18 +3856,6 @@ V    RW    NP
 NONE
 0    9     0
 
-* GO Link Monitor Timeout (TU)
-*
-WNI_CFG_GO_LINK_MONITOR_TIMEOUT    I    4    7
-V    RW    NP
-HAL
-3   50    10
-V    RW    NP
-HAL
-3   50    10
-*
-*
-
 * RMC action period frequency (milli seconds)
 *
 WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY    I    4    7
@@ -3958,27 +3888,6 @@ V    RW    NP
 NONE
 0    1    1
 
-* Debug p2p remain on channel
-*
-WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL    I    4    7
-V    RW    NP
-NONE
-0    1    0
-V    RW    NP
-NONE
-0    1    0
-
-*
-* TDLS Off Channel Implementation
-*
-WNI_CFG_TDLS_OFF_CHANNEL_ENABLED    I    4    7
-V    RW    NP
-LIM
-0    1     0
-V    RW    NP
-LIM
-0    1     0
-
 WNI_CFG_IBSS_ATIM_WIN_SIZE I    4    7
 V    RW    NP
 NONE
@@ -4006,14 +3915,3 @@ NONE
 V    RW    NP
 NONE
 0    1    0
-*
-*TDLS WMM Mode
-*
-*
-WNI_CFG_TDLS_WMM_MODE_ENABLED   I   4   7
-V    RW    NP
-LIM
-0    1    0
-V    RW    NP
-LIM
-0    1    0

+ 0 - 9
core/mac/src/cfg/cfg_param_name.c

@@ -193,27 +193,18 @@ const char *cfg_get_string(uint16_t cfg_id)
 	CASE_RETURN_STRING(WNI_CFG_ASSOC_STA_LIMIT);
 	CASE_RETURN_STRING(WNI_CFG_ENABLE_LTE_COEX);
 	CASE_RETURN_STRING(WNI_CFG_AP_KEEP_ALIVE_TIMEOUT);
-	CASE_RETURN_STRING(WNI_CFG_GO_KEEP_ALIVE_TIMEOUT);
 	CASE_RETURN_STRING(WNI_CFG_ENABLE_MC_ADDR_LIST);
 	CASE_RETURN_STRING(WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED);
 	CASE_RETURN_STRING(WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP);
 	CASE_RETURN_STRING(WNI_CFG_AP_LINK_MONITOR_TIMEOUT);
-	CASE_RETURN_STRING(WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK);
-	CASE_RETURN_STRING(WNI_CFG_TDLS_BUF_STA_ENABLED);
-	CASE_RETURN_STRING(WNI_CFG_TDLS_PUAPSD_INACT_TIME);
-	CASE_RETURN_STRING(WNI_CFG_TDLS_RX_FRAME_THRESHOLD);
 	CASE_RETURN_STRING(WNI_CFG_PMF_SA_QUERY_MAX_RETRIES);
 	CASE_RETURN_STRING(WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL);
-	CASE_RETURN_STRING(WNI_CFG_GO_LINK_MONITOR_TIMEOUT);
 	CASE_RETURN_STRING(WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY);
 	CASE_RETURN_STRING(WNI_CFG_CURRENT_RSSI);
 	CASE_RETURN_STRING(WNI_CFG_RTT3_ENABLE);
-	CASE_RETURN_STRING(WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL);
-	CASE_RETURN_STRING(WNI_CFG_TDLS_OFF_CHANNEL_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_IBSS_ATIM_WIN_SIZE);
 	CASE_RETURN_STRING(WNI_CFG_DFS_MASTER_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_VHT_ENABLE_TXBF_20MHZ);
-	CASE_RETURN_STRING(WNI_CFG_TDLS_WMM_MODE_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME);
 	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME);
 	CASE_RETURN_STRING(WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL);

+ 0 - 51
core/mac/src/cfg/cfg_proc_msg.c

@@ -806,11 +806,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STAMIN,
 	WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STAMAX,
 	WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STADEF},
-	{WNI_CFG_GO_KEEP_ALIVE_TIMEOUT,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
-	WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STAMIN,
-	WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STAMAX,
-	WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STADEF},
 	{WNI_CFG_ENABLE_MC_ADDR_LIST,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	WNI_CFG_ENABLE_MC_ADDR_LIST_STAMIN,
@@ -831,30 +826,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_AP_LINK_MONITOR_TIMEOUT_STAMIN,
 	WNI_CFG_AP_LINK_MONITOR_TIMEOUT_STAMAX,
 	WNI_CFG_AP_LINK_MONITOR_TIMEOUT_STADEF},
-	{WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK_STAMIN,
-	WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK_STAMAX,
-	WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK_STADEF},
-	{WNI_CFG_TDLS_BUF_STA_ENABLED,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_TDLS_BUF_STA_ENABLED_STAMIN,
-	WNI_CFG_TDLS_BUF_STA_ENABLED_STAMAX,
-	WNI_CFG_TDLS_BUF_STA_ENABLED_STADEF},
-	{WNI_CFG_TDLS_PUAPSD_INACT_TIME,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_TDLS_PUAPSD_INACT_TIME_STAMIN,
-	WNI_CFG_TDLS_PUAPSD_INACT_TIME_STAMAX,
-	WNI_CFG_TDLS_PUAPSD_INACT_TIME_STADEF},
-	{WNI_CFG_TDLS_RX_FRAME_THRESHOLD,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_TDLS_RX_FRAME_THRESHOLD_STAMIN,
-	WNI_CFG_TDLS_RX_FRAME_THRESHOLD_STAMAX,
-	WNI_CFG_TDLS_RX_FRAME_THRESHOLD_STADEF},
 	{WNI_CFG_PMF_SA_QUERY_MAX_RETRIES,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
 	CFG_CTL_RESTART,
@@ -867,11 +838,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL_STAMIN,
 	WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL_STAMAX,
 	WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL_STADEF},
-	{WNI_CFG_GO_LINK_MONITOR_TIMEOUT,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
-	WNI_CFG_GO_LINK_MONITOR_TIMEOUT_STAMIN,
-	WNI_CFG_GO_LINK_MONITOR_TIMEOUT_STAMAX,
-	WNI_CFG_GO_LINK_MONITOR_TIMEOUT_STADEF},
 	{WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY_STAMIN,
@@ -887,17 +853,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_RTT3_ENABLE_STAMIN,
 	WNI_CFG_RTT3_ENABLE_STAMAX,
 	WNI_CFG_RTT3_ENABLE_STADEF},
-	{WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
-	WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_STAMIN,
-	WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_STAMAX,
-	WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_STADEF},
-	{WNI_CFG_TDLS_OFF_CHANNEL_ENABLED,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_TDLS_OFF_CHANNEL_ENABLED_STAMIN,
-	WNI_CFG_TDLS_OFF_CHANNEL_ENABLED_STAMAX,
-	WNI_CFG_TDLS_OFF_CHANNEL_ENABLED_STADEF},
 	{WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMIN,
@@ -913,12 +868,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMIN,
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMAX,
 	WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STADEF},
-	{WNI_CFG_TDLS_WMM_MODE_ENABLED,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_TDLS_WMM_MODE_ENABLED_STAMIN,
-	WNI_CFG_TDLS_WMM_MODE_ENABLED_STAMAX,
-	WNI_CFG_TDLS_WMM_MODE_ENABLED_STADEF},
 	{WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
 	CFG_CTL_NTF_LIM,

+ 17 - 14
core/mac/src/pe/lim/lim_api.c

@@ -69,7 +69,7 @@
 #include <wlan_scan_ucfg_api.h>
 #include <wlan_p2p_ucfg_api.h>
 #include "wlan_utility.h"
-
+#include <wlan_tdls_cfg_api.h>
 
 static void __lim_init_scan_vars(tpAniSirGlobal pMac)
 {
@@ -265,6 +265,8 @@ static QDF_STATUS __lim_init_config(tpAniSirGlobal pMac)
 	uint32_t val1, val2, val3;
 	uint16_t val16;
 	uint8_t val8;
+	bool valb;
+	QDF_STATUS status;
 	tSirMacHTCapabilityInfo *pHTCapabilityInfo;
 	tSirMacHTInfoField1 *pHTInfoField1;
 	tSirMacHTParametersInfo *pAmpduParamInfo;
@@ -384,32 +386,33 @@ static QDF_STATUS __lim_init_config(tpAniSirGlobal pMac)
 		return QDF_STATUS_E_FAILURE;
 	}
 #ifdef FEATURE_WLAN_TDLS
-	if (QDF_STATUS_SUCCESS != wlan_cfg_get_int(pMac, WNI_CFG_TDLS_BUF_STA_ENABLED,
-					     (uint32_t *) &pMac->lim.
-					     gLimTDLSBufStaEnabled)) {
+	status = cfg_tdls_get_buffer_sta_enable(pMac->psoc, &valb);
+	if (QDF_STATUS_SUCCESS != status) {
 		pe_err("cfg get LimTDLSBufStaEnabled failed");
 		return QDF_STATUS_E_FAILURE;
 	}
-	if (QDF_STATUS_SUCCESS !=
-	    wlan_cfg_get_int(pMac, WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK,
-			     (uint32_t *) &pMac->lim.gLimTDLSUapsdMask)) {
+	pMac->lim.gLimTDLSBufStaEnabled = (uint8_t)valb;
+
+	status = cfg_tdls_get_uapsd_mask(pMac->psoc, &val1);
+	if (QDF_STATUS_SUCCESS != status) {
 		pe_err("cfg get LimTDLSUapsdMask failed");
 		return QDF_STATUS_E_FAILURE;
 	}
-	if (QDF_STATUS_SUCCESS !=
-	    wlan_cfg_get_int(pMac, WNI_CFG_TDLS_OFF_CHANNEL_ENABLED,
-			     (uint32_t *) &pMac->lim.
-			     gLimTDLSOffChannelEnabled)) {
+	pMac->lim.gLimTDLSUapsdMask = (uint8_t)val1;
+
+	status = cfg_tdls_get_off_channel_enable(pMac->psoc, &valb);
+	if (QDF_STATUS_SUCCESS != status) {
 		pe_err("cfg get LimTDLSUapsdMask failed");
 		return QDF_STATUS_E_FAILURE;
 	}
+	pMac->lim.gLimTDLSOffChannelEnabled = (uint8_t)valb;
 
-	if (QDF_STATUS_SUCCESS != wlan_cfg_get_int(pMac, WNI_CFG_TDLS_WMM_MODE_ENABLED,
-					     (uint32_t *) &pMac->lim.
-					     gLimTDLSWmmMode)) {
+	status = cfg_tdls_get_wmm_mode_enable(pMac->psoc, &valb);
+	if (QDF_STATUS_SUCCESS != status) {
 		pe_err("cfg get LimTDLSWmmMode failed");
 		return QDF_STATUS_E_FAILURE;
 	}
+	pMac->lim.gLimTDLSWmmMode = (uint8_t)valb;
 #endif
 
 	if (QDF_STATUS_SUCCESS != wlan_cfg_get_int(pMac,

+ 75 - 21
core/wma/src/wma_mgmt.c

@@ -72,6 +72,7 @@
 #include "wma_he.h"
 #include <qdf_crypto.h>
 #include "wma_twt.h"
+#include "wlan_p2p_cfg_api.h"
 
 /**
  * wma_send_bcn_buf_ll() - prepare and send beacon buffer to fw for LL
@@ -552,49 +553,102 @@ int wma_unified_bcntx_status_event_handler(void *handle,
 }
 
 /**
- * wma_get_link_probe_timeout() - get link timeout based on sub type
+ * wma_get_go_probe_timeout() - get P2P GO probe timeout
  * @mac: UMAC handler
- * @sub_type: vdev syb type
  * @max_inactive_time: return max inactive time
  * @max_unresponsive_time: return max unresponsive time
  *
  * Return: none
  */
-static inline void wma_get_link_probe_timeout(struct sAniSirGlobal *mac,
-					      uint32_t sub_type,
-					      uint32_t *max_inactive_time,
-					      uint32_t *max_unresponsive_time)
+#ifdef CONVERGED_P2P_ENABLE
+static inline void
+wma_get_go_probe_timeout(struct sAniSirGlobal *mac,
+			 uint32_t *max_inactive_time,
+			 uint32_t *max_unresponsive_time)
 {
 	uint32_t keep_alive;
-	uint16_t lm_id, ka_id;
 	QDF_STATUS status;
 
-	switch (sub_type) {
-	case WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO:
-		lm_id = WNI_CFG_GO_LINK_MONITOR_TIMEOUT;
-		ka_id = WNI_CFG_GO_KEEP_ALIVE_TIMEOUT;
-		break;
-	default:
-		/*For softAp the subtype value will be zero */
-		lm_id = WNI_CFG_AP_LINK_MONITOR_TIMEOUT;
-		ka_id = WNI_CFG_AP_KEEP_ALIVE_TIMEOUT;
+	status = cfg_p2p_get_go_link_monitor_period(mac->psoc,
+						    max_inactive_time);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		WMA_LOGE("Failed to go monitor period");
+		*max_inactive_time = WMA_LINK_MONITOR_DEFAULT_TIME_SECS;
+	}
+	status = cfg_p2p_get_go_keepalive_period(mac->psoc,
+						 &keep_alive);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		WMA_LOGE("Failed to read go keep alive");
+		keep_alive = WMA_KEEP_ALIVE_DEFAULT_TIME_SECS;
 	}
 
-	status = wlan_cfg_get_int(mac, lm_id, max_inactive_time);
+	*max_unresponsive_time = *max_inactive_time + keep_alive;
+}
+#else
+static inline void
+wma_get_go_probe_timeout(struct sAniSirGlobal *mac,
+			 uint32_t *max_inactive_time,
+			 uint32_t *max_unresponsive_time)
+{
+}
+#endif
+
+/**
+ * wma_get_sap_probe_timeout() - get sap probe timeout
+ * @mac: UMAC handler
+ * @max_inactive_time: return max inactive time
+ * @max_unresponsive_time: return max unresponsive time
+ *
+ * Return: none
+ */
+static inline void
+wma_get_sap_probe_timeout(struct sAniSirGlobal *mac,
+			  uint32_t *max_inactive_time,
+			  uint32_t *max_unresponsive_time)
+{
+	uint32_t keep_alive;
+	QDF_STATUS status;
+
+	status = wlan_cfg_get_int(mac, WNI_CFG_AP_LINK_MONITOR_TIMEOUT,
+				  max_inactive_time);
 	if (QDF_IS_STATUS_ERROR(status)) {
-		WMA_LOGE("Failed to read link monitor for subtype %d",
-			 sub_type);
+		WMA_LOGE("Failed to read sap monitor period");
 		*max_inactive_time = WMA_LINK_MONITOR_DEFAULT_TIME_SECS;
 	}
 
-	status = wlan_cfg_get_int(mac, ka_id, &keep_alive);
+	status = wlan_cfg_get_int(mac, WNI_CFG_AP_KEEP_ALIVE_TIMEOUT,
+				  &keep_alive);
 	if (QDF_IS_STATUS_ERROR(status)) {
-		WMA_LOGE("Failed to read keep alive for subtype %d", sub_type);
+		WMA_LOGE("Failed to read sap keep alive");
 		keep_alive = WMA_KEEP_ALIVE_DEFAULT_TIME_SECS;
 	}
+
 	*max_unresponsive_time = *max_inactive_time + keep_alive;
 }
 
+/**
+ * wma_get_link_probe_timeout() - get link timeout based on sub type
+ * @mac: UMAC handler
+ * @sub_type: vdev syb type
+ * @max_inactive_time: return max inactive time
+ * @max_unresponsive_time: return max unresponsive time
+ *
+ * Return: none
+ */
+static inline void
+wma_get_link_probe_timeout(struct sAniSirGlobal *mac,
+			   uint32_t sub_type,
+			   uint32_t *max_inactive_time,
+			   uint32_t *max_unresponsive_time)
+{
+	if (sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO)
+		wma_get_go_probe_timeout(mac, max_inactive_time,
+					 max_unresponsive_time);
+	else
+		wma_get_sap_probe_timeout(mac, max_inactive_time,
+					  max_unresponsive_time);
+}
+
 /**
  * wma_verify_rate_code() - verify if rate code is valid.
  * @rate_code:     rate code