|
@@ -51,8 +51,6 @@
|
|
|
#include <qca_vendor.h>
|
|
|
#include "wlan_hdd_ipa.h"
|
|
|
|
|
|
-static int32_t wlan_hdd_tdls_peer_reset_discovery_processed(tdlsCtx_t *
|
|
|
- pHddTdlsCtx);
|
|
|
static void wlan_hdd_tdls_timers_destroy(tdlsCtx_t *pHddTdlsCtx);
|
|
|
|
|
|
/**
|
|
@@ -206,105 +204,6 @@ static u8 wlan_hdd_tdls_hash_key(const u8 *mac)
|
|
|
return key;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_disable_offchan_and_teardown_links - Disable offchannel
|
|
|
- * and teardown TDLS links
|
|
|
- * @hddCtx : pointer to hdd context
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-void wlan_hdd_tdls_disable_offchan_and_teardown_links(struct hdd_context *hddctx)
|
|
|
-{
|
|
|
- u16 connected_tdls_peers = 0;
|
|
|
- u8 staidx;
|
|
|
- hddTdlsPeer_t *curr_peer = NULL;
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
-
|
|
|
- if (hddctx->tdls_umac_comp_active)
|
|
|
- return;
|
|
|
-
|
|
|
- if (eTDLS_SUPPORT_NOT_ENABLED == hddctx->tdls_mode) {
|
|
|
- hdd_debug("TDLS mode is disabled OR not enabled in FW");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- adapter = hdd_get_adapter(hddctx, QDF_STA_MODE);
|
|
|
-
|
|
|
- if (adapter == NULL) {
|
|
|
- hdd_debug("Station Adapter Not Found");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- connected_tdls_peers = wlan_hdd_tdls_connected_peers(adapter);
|
|
|
-
|
|
|
- if (!connected_tdls_peers) {
|
|
|
- hdd_debug("No TDLS connected peers to delete");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- /* TDLS is not supported in case of concurrency.
|
|
|
- * Disable TDLS Offchannel in FW to avoid more
|
|
|
- * than two concurrent channels and generate TDLS
|
|
|
- * teardown indication to supplicant.
|
|
|
- * Below function Finds the first connected peer and
|
|
|
- * disables TDLS offchannel for that peer.
|
|
|
- * FW enables TDLS offchannel only when there is
|
|
|
- * one TDLS peer. When there are more than one TDLS peer,
|
|
|
- * there will not be TDLS offchannel in FW.
|
|
|
- * So to avoid sending multiple request to FW, for now,
|
|
|
- * just invoke offchannel mode functions only once
|
|
|
- */
|
|
|
- hdd_set_tdls_offchannel(hddctx, hddctx->config->fTDLSPrefOffChanNum);
|
|
|
- hdd_set_tdls_secoffchanneloffset(hddctx,
|
|
|
- TDLS_SEC_OFFCHAN_OFFSET_40PLUS);
|
|
|
- hdd_set_tdls_offchannelmode(adapter, DISABLE_CHANSWITCH);
|
|
|
-
|
|
|
- /* Send Msg to PE for deleting all the TDLS peers */
|
|
|
- sme_delete_all_tdls_peers(hddctx->hHal, adapter->sessionId);
|
|
|
-
|
|
|
- for (staidx = 0; staidx < hddctx->max_num_tdls_sta;
|
|
|
- staidx++) {
|
|
|
- if (!hddctx->tdlsConnInfo[staidx].staId)
|
|
|
- continue;
|
|
|
-
|
|
|
- mutex_lock(&hddctx->tdls_lock);
|
|
|
- curr_peer = wlan_hdd_tdls_find_all_peer(hddctx,
|
|
|
- hddctx->tdlsConnInfo[staidx].peerMac.bytes);
|
|
|
- if (!curr_peer) {
|
|
|
- mutex_unlock(&hddctx->tdls_lock);
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- hdd_debug("indicate TDLS teardown (staId %d)",
|
|
|
- curr_peer->staId);
|
|
|
-
|
|
|
- /* Indicate teardown to supplicant */
|
|
|
- wlan_hdd_tdls_indicate_teardown(
|
|
|
- curr_peer->pHddTdlsCtx->pAdapter,
|
|
|
- curr_peer,
|
|
|
- eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON);
|
|
|
-
|
|
|
- /*
|
|
|
- * Del Sta happened already as part of sme_delete_all_tdls_peers
|
|
|
- * Hence clear hdd data structure.
|
|
|
- */
|
|
|
- wlan_hdd_tdls_reset_peer(adapter, curr_peer->peerMac);
|
|
|
- hdd_send_wlan_tdls_teardown_event(eTDLS_TEARDOWN_CONCURRENCY,
|
|
|
- curr_peer->peerMac);
|
|
|
- mutex_unlock(&hddctx->tdls_lock);
|
|
|
-
|
|
|
- hdd_roam_deregister_tdlssta(adapter,
|
|
|
- hddctx->tdlsConnInfo[staidx].staId);
|
|
|
- wlan_hdd_tdls_decrement_peer_count(adapter);
|
|
|
- hddctx->tdlsConnInfo[staidx].staId =
|
|
|
- OL_TXRX_INVALID_TDLS_PEER_ID;
|
|
|
- hddctx->tdlsConnInfo[staidx].sessionId = 255;
|
|
|
-
|
|
|
- qdf_mem_zero(&hddctx->tdlsConnInfo[staidx].peerMac,
|
|
|
- sizeof(struct qdf_mac_addr));
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlan_hdd_tdls_discovery_sent_cnt() - get value of discovery counter sent
|
|
|
* @hdd_ctx: HDD context
|
|
@@ -375,26 +274,6 @@ wlan_hdd_tdls_check_power_save_prohibited(struct hdd_adapter *pAdapter)
|
|
|
pAdapter->sessionId, 1);
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_free_scan_request() - free tdls scan request
|
|
|
- * @tdls_scan_ctx: tdls scan context
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-static void wlan_hdd_tdls_free_scan_request(tdls_scan_context_t *tdls_scan_ctx)
|
|
|
-{
|
|
|
- if (NULL == tdls_scan_ctx) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
|
|
|
- FL("tdls_scan_ctx is NULL"));
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- tdls_scan_ctx->attempt = 0;
|
|
|
- tdls_scan_ctx->reject = 0;
|
|
|
- tdls_scan_ctx->magic = 0;
|
|
|
- tdls_scan_ctx->scan_request = NULL;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlan_hdd_tdls_discovery_timeout_peer_cb() - tdls discovery timeout callback
|
|
|
* @userData: tdls context
|
|
@@ -481,32 +360,6 @@ static void wlan_hdd_tdls_free_list(tdlsCtx_t *pHddTdlsCtx)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_schedule_scan() - schedule scan for tdls
|
|
|
- * @work: work_struct used to find tdls scan context
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-static void wlan_hdd_tdls_schedule_scan(struct work_struct *work)
|
|
|
-{
|
|
|
- tdls_scan_context_t *scan_ctx =
|
|
|
- container_of(work, tdls_scan_context_t, tdls_scan_work.work);
|
|
|
-
|
|
|
- if (NULL == scan_ctx) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
|
|
|
- FL("scan_ctx is NULL"));
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (unlikely(TDLS_CTX_MAGIC != scan_ctx->magic))
|
|
|
- return;
|
|
|
-
|
|
|
- scan_ctx->attempt++;
|
|
|
-
|
|
|
- wlan_hdd_cfg80211_tdls_scan(scan_ctx->wiphy,
|
|
|
- scan_ctx->scan_request, scan_ctx->source);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* dump_tdls_state_param_setting() - print tdls state & parameters to send to fw
|
|
|
* @info: tdls setting to be sent to fw
|
|
@@ -612,11 +465,6 @@ void hdd_tdls_context_init(struct hdd_context *hdd_ctx, bool ssr)
|
|
|
hdd_ctx->connected_peer_count = 0;
|
|
|
hdd_ctx->tdls_nss_switch_in_progress = false;
|
|
|
hdd_ctx->tdls_teardown_peers_cnt = 0;
|
|
|
- hdd_ctx->tdls_scan_ctxt.magic = 0;
|
|
|
- hdd_ctx->tdls_scan_ctxt.attempt = 0;
|
|
|
- hdd_ctx->tdls_scan_ctxt.reject = 0;
|
|
|
- hdd_ctx->tdls_scan_ctxt.source = 0;
|
|
|
- hdd_ctx->tdls_scan_ctxt.scan_request = NULL;
|
|
|
hdd_ctx->set_state_info.set_state_cnt = 0;
|
|
|
hdd_ctx->set_state_info.vdev_id = 0;
|
|
|
hdd_ctx->tdls_nss_teardown_complete = false;
|
|
@@ -775,9 +623,6 @@ int wlan_hdd_tdls_init(struct hdd_adapter *pAdapter)
|
|
|
pHddTdlsCtx->threshold_config.rssi_delta =
|
|
|
hdd_ctx->config->fTDLSRSSIDelta;
|
|
|
|
|
|
- INIT_DELAYED_WORK(&hdd_ctx->tdls_scan_ctxt.tdls_scan_work,
|
|
|
- wlan_hdd_tdls_schedule_scan);
|
|
|
-
|
|
|
mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
|
|
|
if (hdd_ctx->config->fEnableTDLSOffChannel)
|
|
@@ -814,8 +659,6 @@ void wlan_hdd_tdls_exit(struct hdd_adapter *pAdapter)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- cds_flush_delayed_work(&hdd_ctx->tdls_scan_ctxt.tdls_scan_work);
|
|
|
-
|
|
|
mutex_lock(&hdd_ctx->tdls_lock);
|
|
|
|
|
|
pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
|
|
@@ -839,8 +682,6 @@ void wlan_hdd_tdls_exit(struct hdd_adapter *pAdapter)
|
|
|
wlan_hdd_tdls_timers_destroy(pHddTdlsCtx);
|
|
|
wlan_hdd_tdls_free_list(pHddTdlsCtx);
|
|
|
|
|
|
- wlan_hdd_tdls_free_scan_request(&hdd_ctx->tdls_scan_ctxt);
|
|
|
-
|
|
|
pHddTdlsCtx->magic = 0;
|
|
|
pHddTdlsCtx->pAdapter = NULL;
|
|
|
pAdapter->sessionCtx.station.pHddTdlsCtx = NULL;
|
|
@@ -1718,266 +1559,6 @@ int wlan_hdd_tdls_set_params(struct net_device *dev,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_get_adapter() - check system state and return hdd adapter
|
|
|
- * @hdd_ctx: hdd context
|
|
|
- *
|
|
|
- * If TDLS possible, return the corresponding hdd adapter
|
|
|
- * to enable TDLS in the system.
|
|
|
- *
|
|
|
- * Return: hdd adapter pointer or NULL.
|
|
|
- */
|
|
|
-static struct hdd_adapter *
|
|
|
-wlan_hdd_tdls_get_adapter(struct hdd_context *hdd_ctx)
|
|
|
-{
|
|
|
- if (policy_mgr_get_connection_count(hdd_ctx->hdd_psoc) > 1)
|
|
|
- return NULL;
|
|
|
- if (policy_mgr_mode_specific_connection_count(hdd_ctx->hdd_psoc,
|
|
|
- QDF_STA_MODE, NULL) == 1)
|
|
|
- return hdd_get_adapter(hdd_ctx,
|
|
|
- QDF_STA_MODE);
|
|
|
- if (policy_mgr_mode_specific_connection_count(hdd_ctx->hdd_psoc,
|
|
|
- QDF_P2P_CLIENT_MODE, NULL) == 1)
|
|
|
- return hdd_get_adapter(hdd_ctx,
|
|
|
- QDF_P2P_CLIENT_MODE);
|
|
|
- return NULL;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_update_tdls_info - update tdls status info
|
|
|
- * @adapter: ptr to device adapter.
|
|
|
- * @tdls_prohibited: indicates whether tdls is prohibited.
|
|
|
- * @tdls_chan_swit_prohibited: indicates whether tdls channel switch
|
|
|
- * is prohibited.
|
|
|
- *
|
|
|
- * Normally an AP does not influence TDLS connection between STAs
|
|
|
- * associated to it. But AP may set bits for TDLS Prohibited or
|
|
|
- * TDLS Channel Switch Prohibited in Extended Capability IE in
|
|
|
- * Assoc/Re-assoc response to STA. So after STA is connected to
|
|
|
- * an AP, call this function to update TDLS status as per those
|
|
|
- * bits set in Ext Cap IE in received Assoc/Re-assoc response
|
|
|
- * from AP.
|
|
|
- *
|
|
|
- * Return: None.
|
|
|
- */
|
|
|
-void wlan_hdd_update_tdls_info(struct hdd_adapter *adapter,
|
|
|
- bool tdls_prohibited,
|
|
|
- bool tdls_chan_swit_prohibited)
|
|
|
-{
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
- tdlsCtx_t *hdd_tdls_ctx;
|
|
|
- tdlsInfo_t *tdls_param;
|
|
|
- QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
|
|
|
-
|
|
|
- /* If TDLS support is disabled then no need to update target */
|
|
|
- if (false == hdd_ctx->config->fEnableTDLSSupport) {
|
|
|
- hdd_err("TDLS not enabled");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- hdd_debug("tdls_prohibited: %d, tdls_chan_swit_prohibited: %d",
|
|
|
- tdls_prohibited, tdls_chan_swit_prohibited);
|
|
|
-
|
|
|
- mutex_lock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
- hdd_tdls_ctx = WLAN_HDD_GET_TDLS_CTX_PTR(adapter);
|
|
|
- if (!hdd_tdls_ctx) {
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- /* may be TDLS is not applicable for this adapter */
|
|
|
- hdd_err("HDD TDLS context is null");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (hdd_ctx->set_state_info.set_state_cnt == 0 &&
|
|
|
- tdls_prohibited) {
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- /* If AP or caller indicated TDLS Prohibited then disable tdls mode */
|
|
|
- if (tdls_prohibited) {
|
|
|
- hdd_ctx->tdls_mode = eTDLS_SUPPORT_NOT_ENABLED;
|
|
|
- } else {
|
|
|
- if (false == hdd_ctx->config->fEnableTDLSImplicitTrigger)
|
|
|
- hdd_ctx->tdls_mode = eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY;
|
|
|
- else if (true == hdd_ctx->config->fTDLSExternalControl)
|
|
|
- hdd_ctx->tdls_mode = eTDLS_SUPPORT_EXTERNAL_CONTROL;
|
|
|
- else
|
|
|
- hdd_ctx->tdls_mode = eTDLS_SUPPORT_ENABLED;
|
|
|
- }
|
|
|
- tdls_param = qdf_mem_malloc(sizeof(*tdls_param));
|
|
|
- if (!tdls_param) {
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- hdd_err("memory allocation failed for tdlsParams");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- tdls_param->notification_interval_ms =
|
|
|
- hdd_tdls_ctx->threshold_config.tx_period_t;
|
|
|
- tdls_param->tx_discovery_threshold =
|
|
|
- hdd_tdls_ctx->threshold_config.tx_packet_n;
|
|
|
- tdls_param->tx_teardown_threshold =
|
|
|
- hdd_tdls_ctx->threshold_config.idle_packet_n;
|
|
|
- tdls_param->rssi_teardown_threshold =
|
|
|
- hdd_tdls_ctx->threshold_config.rssi_teardown_threshold;
|
|
|
- tdls_param->rssi_delta = hdd_tdls_ctx->threshold_config.rssi_delta;
|
|
|
-
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
- /* If any concurrency detected, teardown all TDLS links and disable
|
|
|
- * the tdls support
|
|
|
- */
|
|
|
- hdd_debug("Concurrency check in TDLS! set state cnt %d tdls_prohibited %d",
|
|
|
- hdd_ctx->set_state_info.set_state_cnt, tdls_prohibited);
|
|
|
-
|
|
|
- if (hdd_ctx->set_state_info.set_state_cnt == 1 &&
|
|
|
- !tdls_prohibited) {
|
|
|
- hdd_warn("Concurrency not allowed in TDLS! set state cnt %d",
|
|
|
- hdd_ctx->set_state_info.set_state_cnt);
|
|
|
- wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_ctx);
|
|
|
- tdls_prohibited = true;
|
|
|
- hdd_ctx->tdls_mode = eTDLS_SUPPORT_NOT_ENABLED;
|
|
|
- tdls_param->vdev_id = hdd_ctx->set_state_info.vdev_id;
|
|
|
- } else {
|
|
|
- tdls_param->vdev_id = adapter->sessionId;
|
|
|
- }
|
|
|
-
|
|
|
- tdls_param->tdls_state = hdd_ctx->tdls_mode;
|
|
|
- tdls_param->tdls_options = 0;
|
|
|
-
|
|
|
- /* Do not enable TDLS offchannel,
|
|
|
- * if AP prohibited TDLS channel switch
|
|
|
- */
|
|
|
- if ((hdd_ctx->config->fEnableTDLSOffChannel) &&
|
|
|
- (!tdls_chan_swit_prohibited)) {
|
|
|
- tdls_param->tdls_options |= ENA_TDLS_OFFCHAN;
|
|
|
- }
|
|
|
-
|
|
|
- if (hdd_ctx->config->fEnableTDLSBufferSta)
|
|
|
- tdls_param->tdls_options |= ENA_TDLS_BUFFER_STA;
|
|
|
-
|
|
|
- if (hdd_ctx->config->fEnableTDLSSleepSta)
|
|
|
- tdls_param->tdls_options |= ENA_TDLS_SLEEP_STA;
|
|
|
-
|
|
|
- tdls_param->peer_traffic_ind_window =
|
|
|
- hdd_ctx->config->fTDLSPuapsdPTIWindow;
|
|
|
- tdls_param->peer_traffic_response_timeout =
|
|
|
- hdd_ctx->config->fTDLSPuapsdPTRTimeout;
|
|
|
- tdls_param->puapsd_mask =
|
|
|
- hdd_ctx->config->fTDLSUapsdMask;
|
|
|
- tdls_param->puapsd_inactivity_time =
|
|
|
- hdd_ctx->config->fTDLSPuapsdInactivityTimer;
|
|
|
- tdls_param->puapsd_rx_frame_threshold =
|
|
|
- hdd_ctx->config->fTDLSRxFrameThreshold;
|
|
|
- tdls_param->teardown_notification_ms =
|
|
|
- hdd_ctx->config->tdls_idle_timeout;
|
|
|
- tdls_param->tdls_peer_kickout_threshold =
|
|
|
- hdd_ctx->config->tdls_peer_kickout_threshold;
|
|
|
-
|
|
|
- dump_tdls_state_param_setting(tdls_param);
|
|
|
-
|
|
|
- qdf_ret_status = sme_update_fw_tdls_state(hdd_ctx->hHal,
|
|
|
- tdls_param,
|
|
|
- true);
|
|
|
- if (QDF_STATUS_SUCCESS != qdf_ret_status) {
|
|
|
- qdf_mem_free(tdls_param);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- mutex_lock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
- if (!tdls_prohibited) {
|
|
|
- hdd_ctx->set_state_info.set_state_cnt++;
|
|
|
- hdd_ctx->set_state_info.vdev_id = adapter->sessionId;
|
|
|
- } else {
|
|
|
- hdd_ctx->set_state_info.set_state_cnt--;
|
|
|
- }
|
|
|
-
|
|
|
- hdd_debug("TDLS Set state cnt %d",
|
|
|
- hdd_ctx->set_state_info.set_state_cnt);
|
|
|
-
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_notify_connect() - Update tdls state for every
|
|
|
- * connect event.
|
|
|
- * @adapter: hdd adapter
|
|
|
- * @csr_roam_info: csr information
|
|
|
- *
|
|
|
- * After every connect event in the system, check whether TDLS
|
|
|
- * can be enabled in the system. If TDLS can be enabled, update the
|
|
|
- * TDLS state as needed.
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-void wlan_hdd_tdls_notify_connect(struct hdd_adapter *adapter,
|
|
|
- tCsrRoamInfo *csr_roam_info)
|
|
|
-{
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
-
|
|
|
- hdd_debug("Check and update TDLS state");
|
|
|
-
|
|
|
- if (!hdd_ctx)
|
|
|
- return;
|
|
|
-
|
|
|
- if (hdd_ctx->tdls_umac_comp_active)
|
|
|
- return;
|
|
|
-
|
|
|
- /* Association event */
|
|
|
- if (adapter->device_mode == QDF_STA_MODE ||
|
|
|
- adapter->device_mode == QDF_P2P_CLIENT_MODE) {
|
|
|
- wlan_hdd_update_tdls_info(adapter,
|
|
|
- csr_roam_info->tdls_prohibited,
|
|
|
- csr_roam_info->tdls_chan_swit_prohibited);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_notify_disconnect() - Update tdls state for every
|
|
|
- * disconnect event.
|
|
|
- * @adapter: hdd adapter
|
|
|
- * @lfr_roam: roaming case
|
|
|
- *
|
|
|
- * After every disconnect event in the system, check whether TDLS
|
|
|
- * can be disabled/enabled in the system and update the
|
|
|
- * TDLS state as needed.
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-void wlan_hdd_tdls_notify_disconnect(struct hdd_adapter *adapter, bool lfr_roam)
|
|
|
-{
|
|
|
- struct hdd_adapter *temp_adapter;
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
-
|
|
|
- hdd_debug("Check and update TDLS state");
|
|
|
-
|
|
|
- if (!hdd_ctx)
|
|
|
- return;
|
|
|
-
|
|
|
- if (hdd_ctx->tdls_umac_comp_active)
|
|
|
- return;
|
|
|
-
|
|
|
-
|
|
|
- /* Disassociation event */
|
|
|
- if (adapter->device_mode == QDF_STA_MODE ||
|
|
|
- adapter->device_mode == QDF_P2P_CLIENT_MODE) {
|
|
|
- wlan_hdd_update_tdls_info(adapter, true, true);
|
|
|
- }
|
|
|
-
|
|
|
- /* Check TDLS could be enabled in the system
|
|
|
- * after this disassoc event.
|
|
|
- */
|
|
|
- if (!lfr_roam) {
|
|
|
- temp_adapter = wlan_hdd_tdls_get_adapter(
|
|
|
- hdd_ctx);
|
|
|
- if (NULL != temp_adapter)
|
|
|
- wlan_hdd_update_tdls_info(temp_adapter,
|
|
|
- false,
|
|
|
- false);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlan_hdd_tdls_set_sta_id() - set station ID on a tdls peer
|
|
|
* @pAdapter: HDD adapter
|
|
@@ -2237,37 +1818,6 @@ ret_status:
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_peer_reset_discovery_processed() - reset discovery status
|
|
|
- * @pHddTdlsCtx: TDLS context
|
|
|
- *
|
|
|
- * This function resets discovery processing bit for all TDLS peers
|
|
|
- *
|
|
|
- * Caller has to take the lock before calling this function
|
|
|
- *
|
|
|
- * Return: 0
|
|
|
- */
|
|
|
-static int32_t wlan_hdd_tdls_peer_reset_discovery_processed(tdlsCtx_t *
|
|
|
- pHddTdlsCtx)
|
|
|
-{
|
|
|
- int i;
|
|
|
- struct list_head *head;
|
|
|
- hddTdlsPeer_t *tmp;
|
|
|
- struct list_head *pos, *q;
|
|
|
-
|
|
|
- pHddTdlsCtx->discovery_peer_cnt = 0;
|
|
|
-
|
|
|
- for (i = 0; i < TDLS_PEER_LIST_SIZE; i++) {
|
|
|
- head = &pHddTdlsCtx->peer_list[i];
|
|
|
- list_for_each_safe(pos, q, head) {
|
|
|
- tmp = list_entry(pos, hddTdlsPeer_t, node);
|
|
|
- tmp->discovery_processed = 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlan_hdd_tdls_connected_peers() - Find the number of connected TDLS peers
|
|
|
* @pAdapter: HDD adapter
|
|
@@ -2372,85 +1922,6 @@ int wlan_hdd_tdls_get_all_peers(struct hdd_adapter *pAdapter,
|
|
|
return init_len - buflen;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_connection_callback() - callback after tdls connection
|
|
|
- * @pAdapter: HDD adapter
|
|
|
- *
|
|
|
- * Return: Void
|
|
|
- */
|
|
|
-void wlan_hdd_tdls_connection_callback(struct hdd_adapter *pAdapter)
|
|
|
-{
|
|
|
- tdlsCtx_t *pHddTdlsCtx;
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
|
|
- uint32_t tx_period_t;
|
|
|
-
|
|
|
- if (NULL == hdd_ctx) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
|
|
|
- FL("hdd_ctx points to NULL"));
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- mutex_lock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
- pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
|
|
|
- if (NULL == pHddTdlsCtx) {
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
|
|
|
- FL("pHddTdlsCtx points to NULL"));
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- tx_period_t = pHddTdlsCtx->threshold_config.tx_period_t;
|
|
|
-
|
|
|
- hdd_debug("update %d", pHddTdlsCtx->threshold_config.tx_period_t);
|
|
|
-
|
|
|
- if (eTDLS_SUPPORT_ENABLED == hdd_ctx->tdls_mode ||
|
|
|
- eTDLS_SUPPORT_EXTERNAL_CONTROL == hdd_ctx->tdls_mode) {
|
|
|
- wlan_hdd_tdls_peer_reset_discovery_processed(pHddTdlsCtx);
|
|
|
- pHddTdlsCtx->discovery_sent_cnt = 0;
|
|
|
- wlan_hdd_tdls_check_power_save_prohibited(pHddTdlsCtx->pAdapter);
|
|
|
- }
|
|
|
-
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_disconnection_callback() - callback after tdls disconnection
|
|
|
- * @pAdapter: HDD adapter
|
|
|
- *
|
|
|
- * Return: Void
|
|
|
- */
|
|
|
-void wlan_hdd_tdls_disconnection_callback(struct hdd_adapter *pAdapter)
|
|
|
-{
|
|
|
- tdlsCtx_t *pHddTdlsCtx;
|
|
|
- struct hdd_context *hdd_ctx;
|
|
|
-
|
|
|
- ENTER();
|
|
|
-
|
|
|
- hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
|
|
-
|
|
|
- if (!hdd_ctx)
|
|
|
- return;
|
|
|
-
|
|
|
- mutex_lock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
- pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
|
|
|
- if (NULL == pHddTdlsCtx) {
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- hdd_debug("pHddTdlsCtx is NULL");
|
|
|
- return;
|
|
|
- }
|
|
|
- pHddTdlsCtx->discovery_sent_cnt = 0;
|
|
|
- wlan_hdd_tdls_check_power_save_prohibited(pHddTdlsCtx->pAdapter);
|
|
|
-
|
|
|
- wlan_hdd_tdls_timers_stop(pHddTdlsCtx);
|
|
|
-
|
|
|
- pHddTdlsCtx->curr_candidate = NULL;
|
|
|
-
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlan_hdd_tdls_mgmt_completion_callback() - callback for TDLS management
|
|
|
* TX completion
|
|
@@ -2610,287 +2081,6 @@ hddTdlsPeer_t *wlan_hdd_tdls_is_progress(struct hdd_context *hdd_ctx,
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_copy_scan_context() - Copy TDLS scan context
|
|
|
- * @hdd_ctx: HDD context
|
|
|
- * @wiphy: wiphy pointer
|
|
|
- * @dev: net device
|
|
|
- * request: source scan context
|
|
|
- *
|
|
|
- * Copy the source scan context into the HDD context's TDLS scan context
|
|
|
- *
|
|
|
- * Return: 0 for success; negative errno otherwise
|
|
|
- */
|
|
|
-int wlan_hdd_tdls_copy_scan_context(struct hdd_context *hdd_ctx,
|
|
|
- struct wiphy *wiphy,
|
|
|
- struct cfg80211_scan_request *request)
|
|
|
-{
|
|
|
- tdls_scan_context_t *scan_ctx;
|
|
|
-
|
|
|
- ENTER();
|
|
|
-
|
|
|
- if (0 != (wlan_hdd_validate_context(hdd_ctx)))
|
|
|
- return -EINVAL;
|
|
|
-
|
|
|
- scan_ctx = &hdd_ctx->tdls_scan_ctxt;
|
|
|
-
|
|
|
- scan_ctx->wiphy = wiphy;
|
|
|
-
|
|
|
- scan_ctx->scan_request = request;
|
|
|
- EXIT();
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_scan_init_work() - schedule tdls scan work
|
|
|
- * @hdd_ctx: HDD context
|
|
|
- * @wiphy: wiphy pointer
|
|
|
- * @dev: net device
|
|
|
- * @request: scan request
|
|
|
- * @delay: delay value to pass to the work scheduling
|
|
|
- * @source: scan request source(NL/Vendor scan)
|
|
|
- *
|
|
|
- * Return: Void
|
|
|
- */
|
|
|
-static void wlan_hdd_tdls_scan_init_work(struct hdd_context *hdd_ctx,
|
|
|
- struct wiphy *wiphy,
|
|
|
- struct cfg80211_scan_request *request,
|
|
|
- unsigned long delay, uint8_t source)
|
|
|
-{
|
|
|
- if (TDLS_CTX_MAGIC != hdd_ctx->tdls_scan_ctxt.magic) {
|
|
|
- wlan_hdd_tdls_copy_scan_context(hdd_ctx, wiphy, request);
|
|
|
- hdd_ctx->tdls_scan_ctxt.attempt = 0;
|
|
|
- hdd_ctx->tdls_scan_ctxt.magic = TDLS_CTX_MAGIC;
|
|
|
- hdd_ctx->tdls_scan_ctxt.source = source;
|
|
|
- }
|
|
|
- schedule_delayed_work(&hdd_ctx->tdls_scan_ctxt.tdls_scan_work, delay);
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_scan_callback() - callback for TDLS scan operation
|
|
|
- * @pAdapter: HDD adapter
|
|
|
- * @wiphy: wiphy
|
|
|
- * @dev: net device
|
|
|
- * @request: scan request
|
|
|
- *
|
|
|
- * Return: negative = caller should stop and return error code immediately
|
|
|
- * 0 = caller should stop and return success immediately
|
|
|
- * 1 = caller can continue to scan
|
|
|
- */
|
|
|
-int wlan_hdd_tdls_scan_callback(struct hdd_adapter *pAdapter,
|
|
|
- struct wiphy *wiphy,
|
|
|
- struct cfg80211_scan_request *request,
|
|
|
- uint8_t source)
|
|
|
-{
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
|
|
- u16 connectedTdlsPeers;
|
|
|
- hddTdlsPeer_t *curr_peer;
|
|
|
- unsigned long delay;
|
|
|
- int ret;
|
|
|
-
|
|
|
- ENTER();
|
|
|
-
|
|
|
- ret = wlan_hdd_validate_context(hdd_ctx);
|
|
|
- if (ret)
|
|
|
- return ret;
|
|
|
-
|
|
|
- if (hdd_ctx->tdls_umac_comp_active)
|
|
|
- return 1;
|
|
|
-
|
|
|
- /* if tdls is not enabled, then continue scan */
|
|
|
- if (eTDLS_SUPPORT_NOT_ENABLED == hdd_ctx->tdls_mode)
|
|
|
- return 1;
|
|
|
-
|
|
|
- mutex_lock(&hdd_ctx->tdls_lock);
|
|
|
- curr_peer = wlan_hdd_tdls_is_progress(hdd_ctx, NULL, 0);
|
|
|
- if (NULL != curr_peer) {
|
|
|
- if (hdd_ctx->tdls_scan_ctxt.reject++ >= TDLS_MAX_SCAN_REJECT) {
|
|
|
- hdd_ctx->tdls_scan_ctxt.reject = 0;
|
|
|
- hdd_debug(MAC_ADDRESS_STR
|
|
|
- ". scan rejected %d. force it to idle",
|
|
|
- MAC_ADDR_ARRAY(curr_peer->peerMac),
|
|
|
- hdd_ctx->tdls_scan_ctxt.reject);
|
|
|
-
|
|
|
- wlan_hdd_tdls_set_peer_link_status(curr_peer,
|
|
|
- eTDLS_LINK_IDLE,
|
|
|
- eTDLS_LINK_UNSPECIFIED);
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- return 1;
|
|
|
- }
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- hdd_warn("tdls in progress. scan rejected %d",
|
|
|
- hdd_ctx->tdls_scan_ctxt.reject);
|
|
|
- return -EBUSY;
|
|
|
- }
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
- /* tdls teardown is ongoing */
|
|
|
- if (eTDLS_SUPPORT_DISABLED == hdd_ctx->tdls_mode) {
|
|
|
- connectedTdlsPeers = wlan_hdd_tdls_connected_peers(pAdapter);
|
|
|
- if (connectedTdlsPeers
|
|
|
- && (hdd_ctx->tdls_scan_ctxt.attempt <
|
|
|
- TDLS_MAX_SCAN_SCHEDULE)) {
|
|
|
- delay =
|
|
|
- (unsigned long)(TDLS_DELAY_SCAN_PER_CONNECTION *
|
|
|
- connectedTdlsPeers);
|
|
|
- hdd_debug("tdls disabled, but still connected_peers %d attempt %d. schedule scan %lu msec",
|
|
|
- connectedTdlsPeers,
|
|
|
- hdd_ctx->tdls_scan_ctxt.attempt, delay);
|
|
|
-
|
|
|
- wlan_hdd_tdls_scan_init_work(hdd_ctx, wiphy,
|
|
|
- request,
|
|
|
- msecs_to_jiffies(delay),
|
|
|
- source);
|
|
|
- /* scan should not continue */
|
|
|
- return 0;
|
|
|
- }
|
|
|
- /* no connected peer or max retry reached, scan continue */
|
|
|
- hdd_debug("tdls disabled. connected_peers %d attempt %d. scan allowed",
|
|
|
- connectedTdlsPeers,
|
|
|
- hdd_ctx->tdls_scan_ctxt.attempt);
|
|
|
- return 1;
|
|
|
- }
|
|
|
- /* while tdls is up, first time scan */
|
|
|
- else if (eTDLS_SUPPORT_ENABLED == hdd_ctx->tdls_mode ||
|
|
|
- eTDLS_SUPPORT_EXTERNAL_CONTROL == hdd_ctx->tdls_mode ||
|
|
|
- eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY == hdd_ctx->tdls_mode) {
|
|
|
- /* disable implicit trigger logic & tdls operatoin */
|
|
|
- wlan_hdd_tdls_set_mode(hdd_ctx, eTDLS_SUPPORT_DISABLED, false,
|
|
|
- HDD_SET_TDLS_MODE_SOURCE_SCAN);
|
|
|
- /* indicate the teardown all connected to peer */
|
|
|
- connectedTdlsPeers = wlan_hdd_tdls_connected_peers(pAdapter);
|
|
|
- if (connectedTdlsPeers) {
|
|
|
- uint8_t staIdx;
|
|
|
- uint8_t num = 0;
|
|
|
- uint8_t i;
|
|
|
- bool allPeersBufStas = 1;
|
|
|
- hddTdlsPeer_t *curr_peer;
|
|
|
- hddTdlsPeer_t *connectedPeerList[HDD_MAX_NUM_TDLS_STA];
|
|
|
-
|
|
|
- /* If TDLSScan is enabled then allow scan and
|
|
|
- * maintain tdls link regardless if peer is buffer
|
|
|
- * sta capable or not and if device is sleep sta
|
|
|
- * capable or not. If peer is not buffer sta
|
|
|
- * capable, then Tx would stop when device
|
|
|
- * initiates scan and there will be loss of Rx
|
|
|
- * packets since peer would not know when device
|
|
|
- * moves away from the tdls channel.
|
|
|
- */
|
|
|
- if (1 == hdd_ctx->config->enable_tdls_scan) {
|
|
|
- hdd_debug("TDLSScan enabled, keep tdls link and allow scan, connectedTdlsPeers: %d",
|
|
|
- connectedTdlsPeers);
|
|
|
- return 1;
|
|
|
- }
|
|
|
-
|
|
|
- mutex_lock(&hdd_ctx->tdls_lock);
|
|
|
- for (staIdx = 0; staIdx < hdd_ctx->max_num_tdls_sta;
|
|
|
- staIdx++) {
|
|
|
- if (hdd_ctx->tdlsConnInfo[staIdx].staId) {
|
|
|
- curr_peer =
|
|
|
- wlan_hdd_tdls_find_all_peer(hdd_ctx,
|
|
|
- hdd_ctx->
|
|
|
- tdlsConnInfo
|
|
|
- [staIdx].
|
|
|
- peerMac.
|
|
|
- bytes);
|
|
|
- if (curr_peer) {
|
|
|
- connectedPeerList[num++] =
|
|
|
- curr_peer;
|
|
|
- if (!(curr_peer->isBufSta))
|
|
|
- allPeersBufStas = 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if ((TDLS_MAX_CONNECTED_PEERS_TO_ALLOW_SCAN ==
|
|
|
- connectedTdlsPeers) &&
|
|
|
- (hdd_ctx->config->fEnableTDLSSleepSta) &&
|
|
|
- (allPeersBufStas)) {
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
- /* All connected peers bufStas and we can be
|
|
|
- * sleepSta so allow scan
|
|
|
- */
|
|
|
- hdd_debug("All peers (num %d) bufSTAs, we can be sleep sta, so allow scan, tdls mode changed to %d",
|
|
|
- connectedTdlsPeers,
|
|
|
- hdd_ctx->tdls_mode);
|
|
|
- return 1;
|
|
|
- }
|
|
|
-
|
|
|
- for (i = 0; i < num; i++) {
|
|
|
- hdd_notice("indicate TDLS teadown (staId %d)",
|
|
|
- connectedPeerList[i]->staId);
|
|
|
- wlan_hdd_tdls_indicate_teardown
|
|
|
- (connectedPeerList[i]->pHddTdlsCtx->
|
|
|
- pAdapter, connectedPeerList[i],
|
|
|
- eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON);
|
|
|
- hdd_send_wlan_tdls_teardown_event
|
|
|
- (eTDLS_TEARDOWN_SCAN,
|
|
|
- connectedPeerList[i]->peerMac);
|
|
|
- }
|
|
|
- mutex_unlock(&hdd_ctx->tdls_lock);
|
|
|
-
|
|
|
- /* schedule scan */
|
|
|
- delay =
|
|
|
- (unsigned long)(TDLS_DELAY_SCAN_PER_CONNECTION *
|
|
|
- connectedTdlsPeers);
|
|
|
-
|
|
|
- hdd_debug("tdls enabled (mode %d), connected_peers %d. schedule scan %lu msec",
|
|
|
- hdd_ctx->tdls_mode,
|
|
|
- wlan_hdd_tdls_connected_peers(pAdapter), delay);
|
|
|
-
|
|
|
- wlan_hdd_tdls_scan_init_work(hdd_ctx, wiphy,
|
|
|
- request,
|
|
|
- msecs_to_jiffies(delay),
|
|
|
- source);
|
|
|
- /* scan should not continue */
|
|
|
- return 0;
|
|
|
- }
|
|
|
- /* no connected peer, scan continue */
|
|
|
- hdd_debug("tdls_mode %d, and no tdls connection. scan allowed",
|
|
|
- hdd_ctx->tdls_mode);
|
|
|
- }
|
|
|
- EXIT();
|
|
|
- return 1;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_tdls_scan_done_callback() - callback for tdls scan done event
|
|
|
- * @pAdapter: HDD adapter
|
|
|
- *
|
|
|
- * Return: Void
|
|
|
- */
|
|
|
-void wlan_hdd_tdls_scan_done_callback(struct hdd_adapter *pAdapter)
|
|
|
-{
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
|
|
-
|
|
|
- ENTER();
|
|
|
-
|
|
|
- if (0 != (wlan_hdd_validate_context(hdd_ctx)))
|
|
|
- return;
|
|
|
-
|
|
|
- if (hdd_ctx->tdls_umac_comp_active)
|
|
|
- return;
|
|
|
-
|
|
|
- if (eTDLS_SUPPORT_NOT_ENABLED == hdd_ctx->tdls_mode) {
|
|
|
- hdd_info("TDLS mode is disabled OR not enabled");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- /* free allocated memory at scan time */
|
|
|
- wlan_hdd_tdls_free_scan_request(&hdd_ctx->tdls_scan_ctxt);
|
|
|
-
|
|
|
- /* if tdls was enabled before scan, re-enable tdls mode */
|
|
|
- if (eTDLS_SUPPORT_ENABLED == hdd_ctx->tdls_mode_last ||
|
|
|
- eTDLS_SUPPORT_EXTERNAL_CONTROL == hdd_ctx->tdls_mode_last ||
|
|
|
- eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY == hdd_ctx->tdls_mode_last) {
|
|
|
- hdd_debug("revert tdls mode: %d", hdd_ctx->tdls_mode_last);
|
|
|
-
|
|
|
- wlan_hdd_tdls_set_mode(hdd_ctx, hdd_ctx->tdls_mode_last, false,
|
|
|
- HDD_SET_TDLS_MODE_SOURCE_SCAN);
|
|
|
- }
|
|
|
- EXIT();
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlan_hdd_tdls_timer_restart() - restart TDLS timer
|
|
|
* @pAdapter: HDD adapter
|
|
@@ -5643,38 +4833,6 @@ tdls_ant_sw_done:
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_change_tdls_mode - Change TDLS mode
|
|
|
- * @data: void pointer
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-void wlan_hdd_change_tdls_mode(void *data)
|
|
|
-{
|
|
|
- struct hdd_context *hdd_ctx = (struct hdd_context *)data;
|
|
|
-
|
|
|
- wlan_hdd_tdls_set_mode(hdd_ctx, hdd_ctx->tdls_mode_last, false,
|
|
|
- HDD_SET_TDLS_MODE_SOURCE_P2P);
|
|
|
-}
|
|
|
-
|
|
|
-void hdd_tdls_notify_p2p_roc(struct hdd_context *hdd_ctx,
|
|
|
- enum tdls_concerned_external_events event)
|
|
|
-{
|
|
|
- enum tdls_support_mode tdls_mode;
|
|
|
-
|
|
|
- qdf_mc_timer_stop(&hdd_ctx->tdls_source_timer);
|
|
|
-
|
|
|
- if (event == P2P_ROC_START) {
|
|
|
- tdls_mode = eTDLS_SUPPORT_DISABLED;
|
|
|
- wlan_hdd_tdls_set_mode(hdd_ctx, tdls_mode, false,
|
|
|
- HDD_SET_TDLS_MODE_SOURCE_P2P);
|
|
|
- wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_ctx);
|
|
|
- }
|
|
|
-
|
|
|
- qdf_mc_timer_start(&hdd_ctx->tdls_source_timer,
|
|
|
- hdd_ctx->config->tdls_enable_defer_time);
|
|
|
-}
|
|
|
-
|
|
|
bool cds_check_is_tdls_allowed(enum tQDF_ADAPTER_MODE device_mode)
|
|
|
{
|
|
|
bool state = false;
|