summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKabilan Kannan <kabilank@codeaurora.org>2016-11-04 16:33:52 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-06 09:14:18 -0800
commit9321e80f4c73afb54bc4c3bf97a6b8aa44157b7b (patch)
tree76f08ebd0223ce2383d05164ee205705a36c2c65
parentcb5ebaf15a39d2bf998bba43aa51992ed95d6d48 (diff)
qcacld-3.0: Add scan start/stop event in TDLS connection tracker
TDLS connection tracker should be stopped, when firmware sends scan started event and can be enabled again, when firmware sends scan completed event. Add changes to stop and start tdls connection tracker based on scan events. Change-Id: If61bca75d5f2c326d5e9c734bb8618d5cb67b246 CRs-Fixed: 1086302
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c12
-rw-r--r--core/mac/inc/wni_api.h4
-rw-r--r--core/wma/src/wma_features.c7
3 files changed, 19 insertions, 4 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index cd90e9f817cd..2771925d67a3 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -3539,13 +3539,17 @@ static QDF_STATUS hdd_tdls_connection_tracker_update(hdd_adapter_t *adapter,
if (roam_info->reasonCode ==
eWNI_TDLS_PEER_ENTER_BUF_STA ||
roam_info->reasonCode ==
- eWNI_TDLS_ENTER_BT_BUSY_MODE)
- hdd_ctx->enable_tdls_connection_tracker = true;
+ eWNI_TDLS_ENTER_BT_BUSY_MODE ||
+ roam_info->reasonCode ==
+ eWMI_TDLS_SCAN_STARTED_EVENT)
+ hdd_ctx->enable_tdls_connection_tracker = false;
else if (roam_info->reasonCode ==
eWNI_TDLS_PEER_EXIT_BUF_STA ||
roam_info->reasonCode ==
- eWNI_TDLS_EXIT_BT_BUSY_MODE)
- hdd_ctx->enable_tdls_connection_tracker = false;
+ eWNI_TDLS_EXIT_BT_BUSY_MODE ||
+ roam_info->reasonCode ==
+ eWMI_TDLS_SCAN_COMPLETED_EVENT)
+ hdd_ctx->enable_tdls_connection_tracker = true;
} else {
hdd_err("TDLS not connected, ignore notification, reason: %d",
diff --git a/core/mac/inc/wni_api.h b/core/mac/inc/wni_api.h
index d55945efa3c1..fef266db0d92 100644
--- a/core/mac/inc/wni_api.h
+++ b/core/mac/inc/wni_api.h
@@ -280,12 +280,16 @@ typedef enum {
* @eWNI_TDLS_PEER_EXIT_BUF_STA: TDLS peer exit buff sta
* @eWNI_TDLS_ENTER_BT_BUSY_MODE: Enter BT busy event
* @eWNI_TDLS_EXIT_BT_BUSY_MODE: Exit BT busy event
+ * @eWMI_TDLS_SCAN_STARTED_EVENT: offload scan start event
+ * @eWMI_TDLS_SCAN_COMPLETED_EVENT: offload scan end event
*/
enum ewni_tdls_connection_tracker_notification {
eWNI_TDLS_PEER_ENTER_BUF_STA,
eWNI_TDLS_PEER_EXIT_BUF_STA,
eWNI_TDLS_ENTER_BT_BUSY_MODE,
eWNI_TDLS_EXIT_BT_BUSY_MODE,
+ eWMI_TDLS_SCAN_STARTED_EVENT,
+ eWMI_TDLS_SCAN_COMPLETED_EVENT,
};
#define WNI_CFG_MSG_TYPES_BEGIN 0x1200
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 2a4b66fbc10f..7b6855ae6902 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -6860,6 +6860,13 @@ int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len)
case WMI_TDLS_EXIT_BT_BUSY_MODE:
tdls_event->peer_reason = eWNI_TDLS_EXIT_BT_BUSY_MODE;
break;
+ case WMI_TDLS_SCAN_STARTED_EVENT:
+ tdls_event->peer_reason = eWMI_TDLS_SCAN_STARTED_EVENT;
+ break;
+ case WMI_TDLS_SCAN_COMPLETED_EVENT:
+ tdls_event->peer_reason = eWMI_TDLS_SCAN_COMPLETED_EVENT;
+ break;
+
default:
WMA_LOGE("%s: unknown reason(%d) in tdls event(%d) from target",
__func__, peer_event->peer_reason,