Bladeren bron

qcacld-3.0: Remove the deprecated IOCTL in TDLS

IOCTL "WE_TDLS_CONFIG_PARAMS" is no longer used, and the code
related to the IOCTL can be removed.
Remove IOCTL "WE_TDLS_CONFIG_PARAMS" in the host driver

Change-Id: I5c873b9571228f0d2b4fcd4782267a2cc40fc20a
CRs-Fixed: 2120491
Kabilan Kannan 7 jaren geleden
bovenliggende
commit
6894e6a121

+ 0 - 196
core/hdd/src/wlan_hdd_tdls.c

@@ -71,202 +71,6 @@ enum qca_wlan_vendor_tdls_trigger_mode_hdd_map {
 		  QCA_WLAN_VENDOR_TDLS_TRIGGER_MODE_IMPLICIT) << 1),
 };
 
-/**
- * dump_tdls_state_param_setting() - print tdls state & parameters to send to fw
- * @info: tdls setting to be sent to fw
- *
- * Return: void
- */
-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",
-		   info->vdev_id,
-		   info->tdls_state,
-		   info->notification_interval_ms,
-		   info->tx_discovery_threshold,
-		   info->tx_teardown_threshold,
-		   info->rssi_teardown_threshold,
-		   info->rssi_delta,
-		   info->tdls_options,
-		   info->peer_traffic_ind_window,
-		   info->peer_traffic_response_timeout,
-		   info->puapsd_mask,
-		   info->puapsd_inactivity_time,
-		   info->puapsd_rx_frame_threshold,
-		   info->teardown_notification_ms,
-		   info->tdls_peer_kickout_threshold);
-
-}
-
-/**
- * wlan_hdd_tdls_check_config() - validate tdls configuration parameters
- * @config: tdls configuration parameter structure
- *
- * Return: 0 if all parameters are valid; -EINVAL otherwise
- */
-static int wlan_hdd_tdls_check_config(struct hdd_tdls_config_params *config)
-{
-	if (config->tdls > 2) {
-		hdd_err("Invalid 1st argument %d. <0...2>",
-			config->tdls);
-		return -EINVAL;
-	}
-	if (config->tx_period_t < CFG_TDLS_TX_STATS_PERIOD_MIN ||
-	    config->tx_period_t > CFG_TDLS_TX_STATS_PERIOD_MAX) {
-		hdd_err("Invalid 2nd argument %d. <%d...%ld>",
-			config->tx_period_t, CFG_TDLS_TX_STATS_PERIOD_MIN,
-			CFG_TDLS_TX_STATS_PERIOD_MAX);
-		return -EINVAL;
-	}
-	if (config->tx_packet_n < CFG_TDLS_TX_PACKET_THRESHOLD_MIN ||
-	    config->tx_packet_n > CFG_TDLS_TX_PACKET_THRESHOLD_MAX) {
-		hdd_err("Invalid 3rd argument %d. <%d...%ld>",
-			config->tx_packet_n, CFG_TDLS_TX_PACKET_THRESHOLD_MIN,
-			CFG_TDLS_TX_PACKET_THRESHOLD_MAX);
-		return -EINVAL;
-	}
-	if (config->discovery_tries_n < CFG_TDLS_MAX_DISCOVERY_ATTEMPT_MIN ||
-	    config->discovery_tries_n > CFG_TDLS_MAX_DISCOVERY_ATTEMPT_MAX) {
-		hdd_err("Invalid 5th argument %d. <%d...%d>",
-			config->discovery_tries_n,
-			CFG_TDLS_MAX_DISCOVERY_ATTEMPT_MIN,
-			CFG_TDLS_MAX_DISCOVERY_ATTEMPT_MAX);
-		return -EINVAL;
-	}
-	if (config->idle_packet_n < CFG_TDLS_IDLE_PACKET_THRESHOLD_MIN ||
-	    config->idle_packet_n > CFG_TDLS_IDLE_PACKET_THRESHOLD_MAX) {
-		hdd_err("Invalid 7th argument %d. <%d...%d>",
-			config->idle_packet_n,
-			CFG_TDLS_IDLE_PACKET_THRESHOLD_MIN,
-			CFG_TDLS_IDLE_PACKET_THRESHOLD_MAX);
-		return -EINVAL;
-	}
-	if (config->rssi_trigger_threshold < CFG_TDLS_RSSI_TRIGGER_THRESHOLD_MIN
-	    || config->rssi_trigger_threshold >
-	    CFG_TDLS_RSSI_TRIGGER_THRESHOLD_MAX) {
-		hdd_err("Invalid 9th argument %d. <%d...%d>",
-			config->rssi_trigger_threshold,
-			CFG_TDLS_RSSI_TRIGGER_THRESHOLD_MIN,
-			CFG_TDLS_RSSI_TRIGGER_THRESHOLD_MAX);
-		return -EINVAL;
-	}
-	if (config->rssi_teardown_threshold <
-	    CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MIN
-	    || config->rssi_teardown_threshold >
-	    CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MAX) {
-		hdd_err("Invalid 10th argument %d. <%d...%d>",
-			config->rssi_teardown_threshold,
-			CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MIN,
-			CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MAX);
-		return -EINVAL;
-	}
-	if (config->rssi_delta < CFG_TDLS_RSSI_DELTA_MIN
-	    || config->rssi_delta > CFG_TDLS_RSSI_DELTA_MAX) {
-		hdd_err("Invalid 11th argument %d. <%d...%d>",
-			config->rssi_delta,
-			CFG_TDLS_RSSI_DELTA_MIN,
-			CFG_TDLS_RSSI_DELTA_MAX);
-		return -EINVAL;
-	}
-	return 0;
-}
-
-/**
- * wlan_hdd_tdls_set_params() - set TDLS parameters
- * @dev: net device
- * @config: TDLS configuration parameters
- *
- * Return: 0 if success or negative errno otherwise
- */
-int wlan_hdd_tdls_set_params(struct net_device *dev,
-			     struct hdd_tdls_config_params *config)
-{
-	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
-	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	enum tdls_feature_mode req_tdls_mode;
-	tdlsInfo_t *tdlsParams;
-	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
-	struct tdls_set_mode_params set_mode_params;
-
-	if (wlan_hdd_tdls_check_config(config) != 0)
-		return -EINVAL;
-
-	/* config->tdls is mapped to 0->1, 1->2, 2->3 */
-	req_tdls_mode = config->tdls + 1;
-
-	/* Copy the configuration only when given tdls mode
-	 * is implicit trigger enable
-	 */
-	if (TDLS_SUPPORT_IMP_MODE == req_tdls_mode ||
-	    TDLS_SUPPORT_EXT_CONTROL == req_tdls_mode) {
-		/* TODO update threshold config to tdls vdev */
-	}
-
-	hdd_debug("iw set tdls params: %d %d %d %d %d %d %d",
-		config->tdls,
-		config->tx_period_t,
-		config->tx_packet_n,
-		config->discovery_tries_n,
-		config->idle_packet_n,
-		config->rssi_trigger_threshold,
-		config->rssi_teardown_threshold);
-
-	set_mode_params.source = TDLS_SET_MODE_SOURCE_USER;
-	set_mode_params.tdls_mode = req_tdls_mode;
-	set_mode_params.update_last = true;
-	set_mode_params.vdev = adapter->hdd_vdev;
-
-	ucfg_tdls_set_operating_mode(&set_mode_params);
-
-	tdlsParams = qdf_mem_malloc(sizeof(tdlsInfo_t));
-	if (NULL == tdlsParams) {
-		hdd_err("qdf_mem_malloc failed for tdlsParams");
-		return -ENOMEM;
-	}
-
-	tdlsParams->vdev_id = adapter->session_id;
-	tdlsParams->tdls_state = config->tdls;
-	tdlsParams->notification_interval_ms = config->tx_period_t;
-	tdlsParams->tx_discovery_threshold = config->tx_packet_n;
-	tdlsParams->tx_teardown_threshold = config->idle_packet_n;
-	tdlsParams->rssi_teardown_threshold = config->rssi_teardown_threshold;
-	tdlsParams->rssi_delta = config->rssi_delta;
-	tdlsParams->tdls_options = 0;
-	if (hdd_ctx->config->fEnableTDLSOffChannel)
-		tdlsParams->tdls_options |= ENA_TDLS_OFFCHAN;
-	if (hdd_ctx->config->fEnableTDLSBufferSta)
-		tdlsParams->tdls_options |= ENA_TDLS_BUFFER_STA;
-	if (hdd_ctx->config->fEnableTDLSSleepSta)
-		tdlsParams->tdls_options |= ENA_TDLS_SLEEP_STA;
-	tdlsParams->peer_traffic_ind_window =
-		hdd_ctx->config->fTDLSPuapsdPTIWindow;
-	tdlsParams->peer_traffic_response_timeout =
-		hdd_ctx->config->fTDLSPuapsdPTRTimeout;
-	tdlsParams->puapsd_mask = hdd_ctx->config->fTDLSUapsdMask;
-	tdlsParams->puapsd_inactivity_time =
-		hdd_ctx->config->fTDLSPuapsdInactivityTimer;
-	tdlsParams->puapsd_rx_frame_threshold =
-		hdd_ctx->config->fTDLSRxFrameThreshold;
-	tdlsParams->teardown_notification_ms =
-		hdd_ctx->config->tdls_idle_timeout;
-	tdlsParams->tdls_peer_kickout_threshold =
-		hdd_ctx->config->tdls_peer_kickout_threshold;
-
-	dump_tdls_state_param_setting(tdlsParams);
-
-	qdf_ret_status = sme_update_fw_tdls_state(hdd_ctx->hHal,
-						  tdlsParams, true);
-	if (QDF_STATUS_SUCCESS != qdf_ret_status) {
-		qdf_mem_free(tdlsParams);
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 /**
  * wlan_hdd_tdls_get_all_peers() - dump all TDLS peer info into output string
  * @adapter: HDD adapter

+ 1 - 68
core/hdd/src/wlan_hdd_wext.c

@@ -2218,44 +2218,8 @@ static const struct ccp_freq_chan_map freq_chan_map[] = {
 
 #define WE_MAC_PWR_DEBUG_CMD 4
 
-#ifdef FEATURE_WLAN_TDLS
-/*
- * <ioctl>
- * setTdlsConfig - Set TDLS configuration parameters.
- *
- * @INPUT: 11 TDLS configuration parameters
- *	@args[0]: tdls: [0..2]
- *	@args[1]: tx_period_t: [1000..4294967295UL]
- *	@args[2]: tx_packet_n: [0..4294967295UL]
- *	@args[3]: [discovery_period is not used anymore]
- *	@args[4]: discovery_tries_n: [1..100]
- *	@args[5]: [idle_timeout is not used anymore]
- *	@args[6]: idle_packet_n: [0..40000]
- *	@args[7]: [rssi_hysteresis is not used anymore]
- *	@args[8]: rssi_trigger_threshold: [-120..0]
- *	@args[9]: rssi_teardown_threshold: [-120..0]
- *	@args[10]: rssi_delta: [-30..0]
- *
- * @OUTPUT: None
- *
- * This IOCTL is used to set the TDLS configuration parameters.
- *
- * @E.g: iwpriv wlan0 setTdlsConfig tdls tx_period_t tx_packet_n
- *		discovery_period discovery_tries_n idle_timeout
- *		idle_packet_n rssi_hysteresis rssi_trigger_threshold
- *		rssi_teardown_threshold rssi_delta
- * iwpriv wlan0 setTdlsConfig 1 1500 40 1 5 1 5 0 -70 -70 -10
- *
- * Supported Feature: TDLS
- *
- * Usage: Internal/External
- *
- * </ioctl>
- */
-
+/* subcommand 5 is unused */
 
-#define WE_TDLS_CONFIG_PARAMS   5
-#endif
 /*
  * <ioctl>
  * ibssPeerInfo - Print the ibss peers's MAC, rate and RSSI
@@ -8767,28 +8731,6 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
 	}
 	break;
 
-
-#ifdef FEATURE_WLAN_TDLS
-	case WE_TDLS_CONFIG_PARAMS:
-	{
-		struct hdd_tdls_config_params tdlsParams;
-
-		tdlsParams.tdls = apps_args[0];
-		tdlsParams.tx_period_t = apps_args[1];
-		tdlsParams.tx_packet_n = apps_args[2];
-		/* ignore args[3] as discovery_period is not used anymore */
-		tdlsParams.discovery_tries_n = apps_args[4];
-		/* ignore args[5] as idle_timeout is not used anymore */
-		tdlsParams.idle_packet_n = apps_args[6];
-		/* ignore args[7] as rssi_hysteresis is not used anymore */
-		tdlsParams.rssi_trigger_threshold = apps_args[8];
-		tdlsParams.rssi_teardown_threshold = apps_args[9];
-		tdlsParams.rssi_delta = apps_args[10];
-
-		wlan_hdd_tdls_set_params(dev, &tdlsParams);
-	}
-	break;
-#endif
 	case WE_UNIT_TEST_CMD:
 	{
 		QDF_STATUS status;
@@ -11855,15 +11797,6 @@ static const struct iw_priv_args we_private_args[] = {
 	 IW_PRIV_TYPE_INT | MAX_VAR_ARGS,
 	 0,
 	 "pm_set_hw_mode"},
-#endif
-#ifdef FEATURE_WLAN_TDLS
-	/* handlers for sub ioctl */
-	{
-		WE_TDLS_CONFIG_PARAMS,
-		IW_PRIV_TYPE_INT | MAX_VAR_ARGS,
-		0,
-		"setTdlsConfig"
-	},
 #endif
 	{
 		WE_UNIT_TEST_CMD,

+ 1 - 1
core/mac/src/include/sir_params.h

@@ -442,7 +442,7 @@ typedef struct sSirMbMsgP2p {
 #define SIR_HAL_UPDATE_USERPOS              (SIR_HAL_ITC_MSG_TYPES_BEGIN + 173)
 
 #ifdef FEATURE_WLAN_TDLS
-#define SIR_HAL_UPDATE_FW_TDLS_STATE        (SIR_HAL_ITC_MSG_TYPES_BEGIN + 174)
+/* (SIR_HAL_ITC_MSG_TYPES_BEGIN + 174) is not used */
 #define SIR_HAL_UPDATE_TDLS_PEER_STATE      (SIR_HAL_ITC_MSG_TYPES_BEGIN + 175)
 #define SIR_HAL_TDLS_SHOULD_DISCOVER        (SIR_HAL_ITC_MSG_TYPES_BEGIN + 176)
 #define SIR_HAL_TDLS_SHOULD_TEARDOWN        (SIR_HAL_ITC_MSG_TYPES_BEGIN + 177)

+ 0 - 1
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -545,7 +545,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_RATE_UPDATE_IND);
 		CASE_RETURN_STRING(WMA_INIT_BAD_PEER_TX_CTL_INFO_CMD);
 #ifdef FEATURE_WLAN_TDLS
-		CASE_RETURN_STRING(WMA_UPDATE_FW_TDLS_STATE);
 		CASE_RETURN_STRING(WMA_UPDATE_TDLS_PEER_STATE);
 #endif
 		CASE_RETURN_STRING(WMA_ADD_PERIODIC_TX_PTRN_IND);

+ 0 - 47
core/sme/src/common/sme_api.c

@@ -8598,53 +8598,6 @@ bool sme_is_feature_supported_by_fw(enum cap_bitmap feature)
 	return IS_FEATURE_SUPPORTED_BY_FW(feature);
 }
 
-#ifdef FEATURE_WLAN_TDLS
-/*
- * sme_update_fw_tdls_state() -
- *  SME will send message to WMA to set TDLS state in f/w
- *
- * hHal - The handle returned by mac_open
- * psmeTdlsParams - TDLS state info to update in f/w
- * useSmeLock - Need to acquire SME Global Lock before state update or not
- * Return QDF_STATUS
- */
-QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams,
-				    bool useSmeLock)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal pMac = NULL;
-	struct scheduler_msg message = {0};
-
-	pMac = PMAC_STRUCT(hHal);
-	if (NULL == pMac) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			FL("pMac is Null"));
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	/* only acquire sme global lock before state update if asked to */
-	if (useSmeLock) {
-		status = sme_acquire_global_lock(&pMac->sme);
-		if (QDF_STATUS_SUCCESS != status)
-			return status;
-	}
-
-	/* serialize the req through MC thread */
-	message.bodyptr = psmeTdlsParams;
-	message.type = WMA_UPDATE_FW_TDLS_STATE;
-	qdf_status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
-	if (!QDF_IS_STATUS_SUCCESS(qdf_status))
-		status = QDF_STATUS_E_FAILURE;
-
-	/* release the lock if it was acquired */
-	if (useSmeLock)
-		sme_release_global_lock(&pMac->sme);
-
-	return status;
-}
-#endif /* FEATURE_WLAN_TDLS */
-
 QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
 			      void *plsContext,
 			      void (*pCallbackfn)(tSirLinkSpeedInfo *indParam,

+ 0 - 1
core/wma/inc/wma_types.h

@@ -362,7 +362,6 @@
 #define WMA_INIT_BAD_PEER_TX_CTL_INFO_CMD   SIR_HAL_BAD_PEER_TX_CTL_INI_CMD
 
 #ifdef FEATURE_WLAN_TDLS
-#define WMA_UPDATE_FW_TDLS_STATE          SIR_HAL_UPDATE_FW_TDLS_STATE
 #define WMA_UPDATE_TDLS_PEER_STATE        SIR_HAL_UPDATE_TDLS_PEER_STATE
 #define WMA_TDLS_SHOULD_DISCOVER_CMD      SIR_HAL_TDLS_SHOULD_DISCOVER
 #define WMA_TDLS_SHOULD_TEARDOWN_CMD      SIR_HAL_TDLS_SHOULD_TEARDOWN

+ 0 - 74
core/wma/src/wma_features.c

@@ -4057,80 +4057,6 @@ end:
 	return ret;
 }
 
-/**
- * wma_update_fw_tdls_state() - send enable/disable tdls for a vdev
- * @wma: wma handle
- * @pwmaTdlsparams: TDLS params
- *
- * Return: 0 for sucess or error code
- */
-QDF_STATUS wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams)
-{
-	tp_wma_handle wma_handle = (tp_wma_handle) handle;
-	t_wma_tdls_mode tdls_mode;
-	t_wma_tdls_params *wma_tdls = (t_wma_tdls_params *) pwmaTdlsparams;
-	struct wmi_tdls_params params = {0};
-	QDF_STATUS ret = QDF_STATUS_SUCCESS;
-	uint8_t tdls_state;
-
-	if (!wma_handle || !wma_handle->wmi_handle) {
-		WMA_LOGE("%s: WMA is closed, can not issue fw tdls state cmd",
-			 __func__);
-		ret = -EINVAL;
-		goto end_fw_tdls_state;
-	}
-
-	if (wma_is_roam_synch_in_progress(wma_handle, wma_tdls->vdev_id)) {
-		WMA_LOGE("%s: roaming in progress, reject fw tdls state cmd!",
-			 __func__);
-		ret = -EPERM;
-		goto end_fw_tdls_state;
-	}
-
-	params.tdls_state = wma_tdls->tdls_state;
-	tdls_mode = wma_tdls->tdls_state;
-
-	if (tdls_mode == WMA_TDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY)
-		tdls_state = WMI_TDLS_ENABLE_PASSIVE;
-	else if (tdls_mode == WMA_TDLS_SUPPORT_ENABLED)
-		tdls_state = WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST;
-	else if (tdls_mode == WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL)
-		tdls_state = WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST;
-	else
-		tdls_state = WMI_TDLS_DISABLE;
-
-	params.vdev_id = wma_tdls->vdev_id;
-	params.notification_interval_ms = wma_tdls->notification_interval_ms;
-	params.tx_discovery_threshold = wma_tdls->tx_discovery_threshold;
-	params.tx_teardown_threshold = wma_tdls->tx_teardown_threshold;
-	params.rssi_teardown_threshold = wma_tdls->rssi_teardown_threshold;
-	params.rssi_delta = wma_tdls->rssi_delta;
-	params.tdls_options = wma_tdls->tdls_options;
-	params.peer_traffic_ind_window = wma_tdls->peer_traffic_ind_window;
-	params.peer_traffic_response_timeout =
-		wma_tdls->peer_traffic_response_timeout;
-	params.puapsd_mask = wma_tdls->puapsd_mask;
-	params.puapsd_inactivity_time = wma_tdls->puapsd_inactivity_time;
-	params.puapsd_rx_frame_threshold =
-		wma_tdls->puapsd_rx_frame_threshold;
-	params.teardown_notification_ms =
-		wma_tdls->teardown_notification_ms;
-	params.tdls_peer_kickout_threshold =
-		wma_tdls->tdls_peer_kickout_threshold;
-
-	ret = wmi_unified_update_fw_tdls_state_cmd(wma_handle->wmi_handle,
-					&params, tdls_state);
-	if (QDF_IS_STATUS_ERROR(ret))
-		goto end_fw_tdls_state;
-
-	WMA_LOGD("%s: vdev_id %d", __func__, wma_tdls->vdev_id);
-
-end_fw_tdls_state:
-	if (pwmaTdlsparams)
-		qdf_mem_free(pwmaTdlsparams);
-	return ret;
-}
-
 /**
  * wma_update_tdls_peer_state() - update TDLS peer state
  * @handle: wma handle

+ 0 - 4
core/wma/src/wma_main.c

@@ -7467,10 +7467,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 		break;
 
 #ifdef FEATURE_WLAN_TDLS
-	case WMA_UPDATE_FW_TDLS_STATE:
-		wma_update_fw_tdls_state(wma_handle,
-					 (t_wma_tdls_params *) msg->bodyptr);
-		break;
 	case WMA_UPDATE_TDLS_PEER_STATE:
 		wma_update_tdls_peer_state(wma_handle,
 				(tTdlsPeerStateParams *) msg->bodyptr);