瀏覽代碼

qcacld-3.0: Add diag event for scan blocked by TDLS.

qcacld-2.0 to qcacld-3.0 propagation

Add diag event for EVENT_TDLS_SCAN_BLOCK. This event indicates if
scan is blocked because of TDLS.

Change-Id: I00dd9d2a54cbe054b400b2d1cb74c0e14b9a13d7
CRs-Fixed: 934456
Abhishek Singh 9 年之前
父節點
當前提交
af1d0c92ec

+ 2 - 1
core/hdd/inc/wlan_hdd_tdls.h

@@ -656,6 +656,7 @@ 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);
+void hdd_wlan_block_scan_by_tdls_event(void);
 #else
 static inline
 void hdd_send_wlan_tdls_teardown_event(uint32_t reason,
@@ -665,7 +666,7 @@ 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) {}
-
+static inline void hdd_wlan_block_scan_by_tdls_event(void) {}
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 
 #endif /* __HDD_TDLS_H */

+ 1 - 0
core/hdd/src/wlan_hdd_scan.c

@@ -1378,6 +1378,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 		else
 			hddLog(LOGE, FL("TDLS teardown is ongoing %d"),
 			       status);
+		hdd_wlan_block_scan_by_tdls_event();
 		return status;
 	}
 #endif

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

@@ -143,6 +143,25 @@ void hdd_wlan_tdls_enable_link_event(const uint8_t *peer_mac,
 		EVENT_WLAN_TDLS_ENABLE_LINK);
 }
 
+/**
+ * hdd_wlan_block_scan_by_tdls_event()- send event
+ * if scan is blocked by tdls
+ *
+ * This Function send send diag event if scan is
+ * blocked by tdls
+ *
+ * Return: void.
+ */
+void hdd_wlan_block_scan_by_tdls_event(void)
+{
+	WLAN_HOST_DIAG_EVENT_DEF(tdls_scan_block_status,
+		struct host_event_tdls_scan_rejected);
+
+	tdls_scan_block_status.status = true;
+	WLAN_HOST_DIAG_EVENT_REPORT(&tdls_scan_block_status,
+		EVENT_TDLS_SCAN_BLOCK);
+}
+
 #endif
 
 /**

+ 12 - 0
core/utils/host_diag_log/inc/host_diag_core_event.h

@@ -349,6 +349,18 @@ struct host_event_offload_req {
 	uint8_t state;
 };
 
+/**
+ * struct host_event_tdls_scan_rejected - scan
+ * rejected due to tdls
+ * @status: rejected status
+ *
+ * This structure contains scan rejected due to
+ * tdls event info
+ */
+struct host_event_tdls_scan_rejected {
+	uint8_t status;
+};
+
 /*-------------------------------------------------------------------------
    Function declarations and documenation
    ------------------------------------------------------------------------*/

+ 1 - 0
core/utils/host_diag_log/inc/host_diag_event_defs.h

@@ -58,6 +58,7 @@ typedef enum {
 	EVENT_WLAN_TDLS_ENABLE_LINK = 0XAB6,
 	EVENT_WLAN_SUSPEND_RESUME = 0xAB7,
 	EVENT_WLAN_OFFLOAD_REQ = 0xAB8,
+	EVENT_TDLS_SCAN_BLOCK = 0xAB9,
 
 	EVENT_MAX_ID = 0x0FFF
 } event_id_enum_type;