summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2016-04-27 12:30:48 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-05-04 21:18:08 -0700
commit74bcb0ab41e6a70a626e89c9ff5efd2fd523cb16 (patch)
treec74dcafe6abf16060620cecf4360358038dce0f1
parent4ef5fe00a42d3e2526a2bab2d671aa395c6dfb6e (diff)
qcacld-3.0: Add diag event for TDLS enable link
qcacld-2.0 to qcacld-3.0 propagation. Add diag event for EVENT_WLAN_TDLS_ENABLE_LINK. This event contains below info: - peer mac address - Does peer supports off channel - Is off channel configured - Is off channel established Change-Id: Ib491d8ac1d8a7850a050bf14a60b6eb08ab94078 CRs-Fixed: 934449
-rw-r--r--core/hdd/inc/wlan_hdd_tdls.h10
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c39
-rw-r--r--core/utils/host_diag_log/inc/host_diag_core_event.h16
-rw-r--r--core/utils/host_diag_log/inc/host_diag_event_defs.h1
4 files changed, 65 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_tdls.h b/core/hdd/inc/wlan_hdd_tdls.h
index 4e12836d3189..e19af31b9e48 100644
--- a/core/hdd/inc/wlan_hdd_tdls.h
+++ b/core/hdd/inc/wlan_hdd_tdls.h
@@ -652,10 +652,20 @@ static inline void hdd_tdls_pre_init(hdd_context_t *hdd_ctx) { }
#ifdef FEATURE_WLAN_DIAG_SUPPORT
void hdd_send_wlan_tdls_teardown_event(uint32_t reason,
uint8_t *peer_mac);
+void hdd_wlan_tdls_enable_link_event(const uint8_t *peer_mac,
+ uint8_t is_off_chan_supported,
+ uint8_t is_off_chan_configured,
+ uint8_t is_off_chan_established);
#else
static inline
void hdd_send_wlan_tdls_teardown_event(uint32_t reason,
uint8_t *peer_mac) {}
+static inline
+void hdd_wlan_tdls_enable_link_event(const uint8_t *peer_mac,
+ uint8_t is_off_chan_supported,
+ uint8_t is_off_chan_configured,
+ uint8_t is_off_chan_established) {}
+
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
#endif /* __HDD_TDLS_H */
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index de431b9a7f1a..52bab8b980fd 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -108,6 +108,41 @@ void hdd_send_wlan_tdls_teardown_event(uint32_t reason,
WLAN_HOST_DIAG_EVENT_REPORT(&tdls_tear_down,
EVENT_WLAN_TDLS_TEARDOWN);
}
+
+/**
+ * hdd_wlan_tdls_enable_link_event()- send TDLS enable link event
+ * @peer_mac: peer mac
+ * @is_off_chan_supported: Does peer supports off chan
+ * @is_off_chan_configured: If off channel is configured
+ * @is_off_chan_established: If off chan is established
+ *
+ * This Function send TDLS enable link diag event
+ *
+ * Return: void.
+ */
+
+void hdd_wlan_tdls_enable_link_event(const uint8_t *peer_mac,
+ uint8_t is_off_chan_supported,
+ uint8_t is_off_chan_configured,
+ uint8_t is_off_chan_established)
+{
+ WLAN_HOST_DIAG_EVENT_DEF(tdls_event,
+ struct host_event_tdls_enable_link);
+
+ qdf_mem_copy(tdls_event.peer_mac,
+ peer_mac, MAC_ADDR_LEN);
+
+ tdls_event.is_off_chan_supported =
+ is_off_chan_supported;
+ tdls_event.is_off_chan_configured =
+ is_off_chan_configured;
+ tdls_event.is_off_chan_established =
+ is_off_chan_established;
+
+ WLAN_HOST_DIAG_EVENT_REPORT(&tdls_event,
+ EVENT_WLAN_TDLS_ENABLE_LINK);
+}
+
#endif
/**
@@ -4458,7 +4493,9 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
}
}
}
-
+ hdd_wlan_tdls_enable_link_event(peer,
+ pTdlsPeer->isOffChannelSupported,
+ 0, 0);
}
break;
case NL80211_TDLS_DISABLE_LINK:
diff --git a/core/utils/host_diag_log/inc/host_diag_core_event.h b/core/utils/host_diag_log/inc/host_diag_core_event.h
index 135ded970a9b..f2929c4f7b40 100644
--- a/core/utils/host_diag_log/inc/host_diag_core_event.h
+++ b/core/utils/host_diag_log/inc/host_diag_core_event.h
@@ -311,6 +311,22 @@ struct host_event_tdls_teardown {
uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
};
+/**
+ * struct host_event_tdls_enable_link - tdls enable link event
+ * @peer_mac: peer mac
+ * @is_off_chan_supported: if off channel supported
+ * @is_off_chan_configured: if off channel configured
+ * @is_off_chan_established: if off channel established
+ *
+ * This structure contain tdls enable link diag event info
+ */
+struct host_event_tdls_enable_link {
+ uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
+ uint8_t is_off_chan_supported;
+ uint8_t is_off_chan_configured;
+ uint8_t is_off_chan_established;
+};
+
/*-------------------------------------------------------------------------
Function declarations and documenation
------------------------------------------------------------------------*/
diff --git a/core/utils/host_diag_log/inc/host_diag_event_defs.h b/core/utils/host_diag_log/inc/host_diag_event_defs.h
index 6027f88dabd5..ed174e12d54b 100644
--- a/core/utils/host_diag_log/inc/host_diag_event_defs.h
+++ b/core/utils/host_diag_log/inc/host_diag_event_defs.h
@@ -55,6 +55,7 @@ typedef enum {
EVENT_WLAN_BEACON_RECEIVED = 0xAA6, /* FW event: 2726 */
EVENT_WLAN_LOG_COMPLETE = 0xAA7, /* 16 bytes payload */
EVENT_WLAN_TDLS_TEARDOWN = 0xAB5,
+ EVENT_WLAN_TDLS_ENABLE_LINK = 0XAB6,
EVENT_MAX_ID = 0x0FFF
} event_id_enum_type;