summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c25
-rw-r--r--core/hdd/src/wlan_hdd_power.c24
-rw-r--r--core/hdd/src/wlan_hdd_softap_tx_rx.c25
-rw-r--r--core/hdd/src/wlan_hdd_tx_rx.c24
-rw-r--r--core/mac/src/pe/lim/lim_process_deauth_frame.c4
-rw-r--r--core/mac/src/pe/lim/lim_process_disassoc_frame.c5
-rw-r--r--core/mac/src/pe/lim/lim_utils.h2
-rw-r--r--core/utils/host_diag_log/inc/host_diag_core_event.h113
-rw-r--r--core/utils/host_diag_log/inc/host_diag_event_defs.h84
-rw-r--r--core/wma/inc/wma_internal.h21
-rw-r--r--core/wma/src/wma_mgmt.c21
-rw-r--r--core/wma/src/wma_scan_roam.c2
12 files changed, 347 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index 85f2744691e0..2d1ae90792ae 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -426,6 +426,30 @@ static void wlan_hdd_remove(struct device *dev)
pr_info("%s: Driver De-initialized\n", WLAN_MODULE_NAME);
}
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * hdd_wlan_ssr_shutdown_event()- send ssr shutdown state
+ *
+ * This Function send send ssr shutdown state diag event
+ *
+ * Return: void.
+ */
+static void hdd_wlan_ssr_shutdown_event(void)
+{
+ WLAN_HOST_DIAG_EVENT_DEF(ssr_shutdown,
+ struct host_event_wlan_ssr_shutdown);
+ qdf_mem_zero(&ssr_shutdown, sizeof(ssr_shutdown));
+ ssr_shutdown.status = SSR_SUB_SYSTEM_SHUTDOWN;
+ WLAN_HOST_DIAG_EVENT_REPORT(&ssr_shutdown,
+ EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM);
+}
+#else
+static inline void hdd_wlan_ssr_shutdown_event(void)
+{
+
+};
+#endif
+
/**
* wlan_hdd_shutdown() - wlan_hdd_shutdown
*
@@ -444,6 +468,7 @@ static void wlan_hdd_shutdown(void)
}
/* this is for cases, where shutdown invoked from platform */
cds_set_recovery_in_progress(true);
+ hdd_wlan_ssr_shutdown_event();
if (!cds_wait_for_external_threads_completion(__func__))
hdd_err("Host is not ready for SSR, attempting anyway");
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index a47a40df1cf6..7e43dfffd10e 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -1546,6 +1546,29 @@ QDF_STATUS hdd_wlan_shutdown(void)
return QDF_STATUS_SUCCESS;
}
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+* hdd_wlan_ssr_reinit_event()- send ssr reinit state
+*
+* This Function send send ssr reinit state diag event
+*
+* Return: void.
+*/
+static void hdd_wlan_ssr_reinit_event(void)
+{
+ WLAN_HOST_DIAG_EVENT_DEF(ssr_reinit, struct host_event_wlan_ssr_reinit);
+ qdf_mem_zero(&ssr_reinit, sizeof(ssr_reinit));
+ ssr_reinit.status = SSR_SUB_SYSTEM_REINIT;
+ WLAN_HOST_DIAG_EVENT_REPORT(&ssr_reinit,
+ EVENT_WLAN_SSR_REINIT_SUBSYSTEM);
+}
+#else
+static inline void hdd_wlan_ssr_reinit_event(void)
+{
+
+}
+#endif
+
/**
* hdd_wlan_re_init() - HDD SSR re-init function
*
@@ -1666,6 +1689,7 @@ success:
if (pHddCtx->config->sap_internal_restart)
hdd_ssr_restart_sap(pHddCtx);
hdd_ssr_timer_del();
+ hdd_wlan_ssr_reinit_event();
return QDF_STATUS_SUCCESS;
}
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index a0785dc654d2..f5ed145854a8 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -435,6 +435,30 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
return ret;
}
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * hdd_wlan_datastall_sap_event()- Send SAP datastall information
+ *
+ * This Function send send SAP datastall diag event
+ *
+ * Return: void.
+ */
+static void hdd_wlan_datastall_sap_event(void)
+{
+ WLAN_HOST_DIAG_EVENT_DEF(sap_data_stall,
+ struct host_event_wlan_datastall);
+ qdf_mem_zero(&sap_data_stall, sizeof(sap_data_stall));
+ sap_data_stall.reason = SOFTAP_TX_TIMEOUT;
+ WLAN_HOST_DIAG_EVENT_REPORT(&sap_data_stall,
+ EVENT_WLAN_SOFTAP_DATASTALL);
+}
+#else
+static inline void hdd_wlan_datastall_sap_event(void)
+{
+
+}
+#endif
+
/**
* __hdd_softap_tx_timeout() - TX timeout handler
* @dev: pointer to network device
@@ -481,6 +505,7 @@ static void __hdd_softap_tx_timeout(struct net_device *dev)
ol_tx_dump_flow_pool_info();
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_INFO,
"carrier state: %d", netif_carrier_ok(dev));
+ hdd_wlan_datastall_sap_event();
}
/**
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c
index 1e81a09b774e..eec4b8cea1a8 100644
--- a/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_tx_rx.c
@@ -708,6 +708,29 @@ QDF_STATUS hdd_get_peer_sta_id(hdd_station_ctx_t *pHddStaCtx,
return QDF_STATUS_E_FAILURE;
}
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+* hdd_wlan_datastall_sta_event()- send sta datastall information
+*
+* This Function send send sta datastall status diag event
+*
+* Return: void.
+*/
+static void hdd_wlan_datastall_sta_event(void)
+{
+ WLAN_HOST_DIAG_EVENT_DEF(sta_data_stall,
+ struct host_event_wlan_datastall);
+ qdf_mem_zero(&sta_data_stall, sizeof(sta_data_stall));
+ sta_data_stall.reason = STA_TX_TIMEOUT;
+ WLAN_HOST_DIAG_EVENT_REPORT(&sta_data_stall, EVENT_WLAN_STA_DATASTALL);
+}
+#else
+static inline void hdd_wlan_datastall_sta_event(void)
+{
+
+}
+#endif
+
/**
* __hdd_tx_timeout() - TX timeout handler
* @dev: pointer to network device
@@ -748,6 +771,7 @@ static void __hdd_tx_timeout(struct net_device *dev)
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
wlan_hdd_display_netif_queue_history(hdd_ctx);
ol_tx_dump_flow_pool_info();
+ hdd_wlan_datastall_sta_event();
}
/**
diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c
index f9a19bb44b31..77b22b613004 100644
--- a/core/mac/src/pe/lim/lim_process_deauth_frame.c
+++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -181,6 +181,8 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
reasonCode, lim_dot11_reason_str(reasonCode),
MAC_ADDR_ARRAY(pHdr->sa));
)
+ lim_diag_event_report(pMac, WLAN_PE_DIAG_DEAUTH_FRAME_EVENT,
+ psessionEntry, 0, reasonCode);
if (lim_check_disassoc_deauth_ack_pending(pMac, (uint8_t *) pHdr->sa)) {
PELOGE(lim_log(pMac, LOGE,
diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c
index ae26794f77f1..cf20efaf1269 100644
--- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c
+++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -175,7 +175,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
psessionEntry->limSmeState, frame_rssi, reasonCode,
lim_dot11_reason_str(reasonCode), MAC_ADDR_ARRAY(pHdr->sa));
)
-
+ lim_diag_event_report(pMac, WLAN_PE_DIAG_DISASSOC_FRAME_EVENT,
+ psessionEntry, 0, reasonCode);
/**
* Extract 'associated' context for STA, if any.
* This is maintained by DPH and created by LIM.
diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h
index 67596982c5b9..1c66d88da52e 100644
--- a/core/mac/src/pe/lim/lim_utils.h
+++ b/core/mac/src/pe/lim/lim_utils.h
@@ -555,6 +555,8 @@ typedef enum {
WLAN_PE_DIAG_SCAN_RESULT_FOUND_EVENT,
WLAN_PE_DIAG_ASSOC_TIMEOUT,
WLAN_PE_DIAG_AUTH_TIMEOUT,
+ WLAN_PE_DIAG_DEAUTH_FRAME_EVENT,
+ WLAN_PE_DIAG_DISASSOC_FRAME_EVENT,
} WLAN_PE_DIAG_EVENT_TYPE;
void lim_diag_event_report(tpAniSirGlobal pMac, uint16_t eventType,
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 b51bc27b9b22..2254d4493445 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
@@ -374,6 +374,119 @@ struct host_event_wlan_log_complete {
uint32_t reserved;
};
+/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_STA_KICKOUT
+ ------------------------------------------------------------------------*/
+/**
+ * struct host_event_wlan_kickout - Holds diag event details
+ * @reasoncode: Indicates the reasoncode of event
+ * @peer_macaddr: Indicates the peer macaddr
+ * @vdev_id: Indicate unique id for identifying the VDEV
+ *
+ * This structure holds the diag event related information
+ */
+
+struct host_event_wlan_kickout {
+ uint32_t reasoncode;
+ uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
+ uint8_t vdev_id;
+};
+
+/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_SOFTAP_DATASTALL/EVENT_WLAN_STA_DATASTALL
+ ------------------------------------------------------------------------*/
+/**
+ * struct host_event_wlan_softap_datastall - Holds diag event details
+ * @reason: Indicates the reason of event
+ *
+ *This structure holds the host diag event related information
+ */
+
+struct host_event_wlan_datastall {
+ uint32_t reason;
+};
+
+/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_SSR_REINIT_SUBSYSTEM
+ ------------------------------------------------------------------------*/
+/**
+ * struct host_event_wlan_ssr_reinit - Holds diag event details
+ * @status: Indicates the status of event
+ *
+ *This structure holds the host diag event related information
+ */
+
+struct host_event_wlan_ssr_reinit {
+ uint32_t status;
+};
+
+/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM
+ ------------------------------------------------------------------------*/
+/**
+ * struct host_event_wlan_ssr_shutdown - Holds diag event details
+ * @status: Indicates the status of event
+ *
+ *This structure holds the host diag event related information
+ */
+
+struct host_event_wlan_ssr_shutdown {
+ uint32_t status;
+};
+
+
+/*-------------------------------------------------------------------------
+ Function declarations and documenation
+ ------------------------------------------------------------------------*/
+/**
+ * enum host_sta_kickout_events - Enum containing sta kickout subtype
+ * @HOST_STA_KICKOUT_REASON_BMISS: Indicate sta got disconnected reason
+ * beacon miss
+ * @HOST_STA_KICKOUT_REASON_XRETRY: Indicate sta got disconnected reason xretry
+ * @HOST_STA_KICKOUT_REASON_UNSPECIFIED: Indicate sta disconnection
+ * reason unspecified
+ * @HOST_STA_KICKOUT_REASON_KEEP_ALIVE: Indicate sta is disconnected
+ * because of keep alive
+ *
+ * This enum contains the event subtype
+ */
+enum host_sta_kickout_events {
+ HOST_STA_KICKOUT_REASON_BMISS,
+ HOST_STA_KICKOUT_REASON_XRETRY,
+ HOST_STA_KICKOUT_REASON_UNSPECIFIED,
+ HOST_STA_KICKOUT_REASON_KEEP_ALIVE,
+};
+
+/*-------------------------------------------------------------------------
+ Function declarations and documenation
+ ------------------------------------------------------------------------*/
+/**
+ * enum host_datastall_events - Enum containing datastall subtype
+ * @STA_TX_TIMEOUT: Indicate sta tx timeout
+ * @SOFTAP_TX_TIMEOUT:Indicate softap tx timeout
+ *
+ * This enum contains the event subtype
+ */
+enum host_datastall_events {
+ STA_TX_TIMEOUT,
+ SOFTAP_TX_TIMEOUT,
+};
+
+/*-------------------------------------------------------------------------
+ Function declarations and documenation
+ ------------------------------------------------------------------------*/
+/**
+ * enum host_ssr_events - Enum containing ssr subtype
+ * @SSR_SUB_SYSTEM_REINIT: Indicate ssr reinit state
+ * @SSR_SUB_SYSTEM_SHUTDOWN: Indicate ssr shutdown state
+ *
+ * This enum contains the event subtype
+ */
+enum host_ssr_events {
+ SSR_SUB_SYSTEM_REINIT,
+ SSR_SUB_SYSTEM_SHUTDOWN,
+};
+
/**
* struct host_event_tdls_teardown - tdls teardown diag event
* @reason: reason for tear down
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 ededc6ae7675..c29f36b0981a 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
@@ -813,6 +813,90 @@ typedef enum {
EVENT_WLAN_POWERSAVE_WOW_STATS = 0xB33,
+ /*
+ * <diag_event>
+ * EVENT_WLAN_STA_KICKOUT
+ * @reasoncode: Indicates the reasoncode of event
+ * @peer_macaddr: Indicates the peer macaddr
+ * @vdev_id: Indicate unique id for identifying the VDEV
+ *
+ * This event is used to send sta kickout information
+ * Values for parameters are defined below:
+ * Reasoncode: offset: 0 length: 4
+ * Peer macaddr: offset: 4 length: 6
+ * VDEV ID: offset: 10 length 1
+ *
+ * Supported Feature: STA
+ *
+ * </diag_event>
+ */
+
+ EVENT_WLAN_STA_KICKOUT = 0xB39,
+
+ /*
+ * <diag_event>
+ * EVENT_WLAN_STA_DATASTALL
+ * @reason: Indicates the reason of event
+ *
+ * This event is used to send sta datastall information
+ * Values for parameters are defined below:
+ * Reason: offset:0 length: 4
+ *
+ * Supported Feature: STA
+ *
+ * </diag_event>
+ */
+
+ EVENT_WLAN_STA_DATASTALL = 0xB3A,
+
+ /*
+ * <diag_event>
+ * EVENT_WLAN_SOFTAP_DATASTALL
+ * @reason: Indicates the reason of event
+ *
+ * This event is used to send SAP datastall information
+ * Values for parameters are defined below:
+ * Reason: offset:0 length: 4
+ *
+ * Supported Feature: SAP
+ *
+ * </diag_event>
+ */
+
+ EVENT_WLAN_SOFTAP_DATASTALL = 0xB3B,
+
+ /*
+ * <diag_event>
+ * EVENT_WLAN_SSR_REINIT_SUBSYSTEM
+ * @status: Indicates the status of event
+ *
+ * This event is used to send ssr reinit status
+ * Values for parameters are defined below:
+ * Status: offset: 0 length: 4
+ *
+ * Supported Feature: SSR
+ *
+ * </diag_event>
+ */
+
+ EVENT_WLAN_SSR_REINIT_SUBSYSTEM = 0xB3C,
+
+ /*
+ * <diag_event>
+ * EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM
+ * @status: Indicates the status of event
+ *
+ * This event is used to send ssr shutdown status
+ * Values for parameters are defined below:
+ * Status: offset: 0 length: 4
+ *
+ * Supported Feature: SSR
+ *
+ * </diag_event>
+ */
+
+ EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM = 0xB3D,
+
EVENT_MAX_ID = 0x0FFF
} event_id_enum_type;
diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h
index 2ba525f8f8bf..c6eae54b1c1b 100644
--- a/core/wma/inc/wma_internal.h
+++ b/core/wma/inc/wma_internal.h
@@ -1270,4 +1270,25 @@ QDF_STATUS wma_get_rcpi_req(WMA_HANDLE handle,
int wma_rcpi_event_handler(void *handle, uint8_t *cmd_param_info,
uint32_t len);
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * wma_sta_kickout_event()- send sta kickout event
+ * @kickout_reason - reasoncode for kickout
+ * @macaddr[IEEE80211_ADDR_LEN]: Peer mac address
+ * @vdev_id: Unique id for identifying the VDEV
+ *
+ * This function sends sta kickout diag event
+ *
+ * Return: void.
+ */
+void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id,
+ uint8_t *macaddr);
+#else
+static inline void wma_sta_kickout_event(uint32_t kickout_reason,
+ uint8_t vdev_id, uint8_t *macaddr)
+{
+
+};
+#endif /* FEATURE_WLAN_DIAG_SUPPORT */
+
#endif
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index e6d40b2cc2c6..489c57e61c79 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -268,6 +268,21 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len)
return 0;
}
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id,
+ uint8_t *macaddr)
+{
+ WLAN_HOST_DIAG_EVENT_DEF(sta_kickout, struct host_event_wlan_kickout);
+ qdf_mem_zero(&sta_kickout, sizeof(sta_kickout));
+ sta_kickout.reasoncode = kickout_reason;
+ sta_kickout.vdev_id = vdev_id;
+ if (macaddr)
+ qdf_mem_copy(sta_kickout.peer_mac, macaddr,
+ IEEE80211_ADDR_LEN);
+ WLAN_HOST_DIAG_EVENT_REPORT(&sta_kickout, EVENT_WLAN_STA_KICKOUT);
+}
+#endif
+
/**
* wma_peer_sta_kickout_event_handler() - kickout event handler
* @handle: wma handle
@@ -366,6 +381,8 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) &&
!qdf_mem_cmp(wma->interfaces[vdev_id].bssid,
macaddr, IEEE80211_ADDR_LEN)) {
+ wma_sta_kickout_event(HOST_STA_KICKOUT_REASON_XRETRY,
+ vdev_id, macaddr);
/*
* KICKOUT event is for current station-AP connection.
* Treat it like final beacon miss. Station may not have
@@ -393,6 +410,8 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) &&
!qdf_mem_cmp(wma->interfaces[vdev_id].bssid,
macaddr, IEEE80211_ADDR_LEN)) {
+ wma_sta_kickout_event(
+ HOST_STA_KICKOUT_REASON_UNSPECIFIED, vdev_id, macaddr);
/*
* KICKOUT event is for current station-AP connection.
* Treat it like final beacon miss. Station may not have
@@ -438,6 +457,8 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
IEEE80211_ADDR_LEN);
del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE;
del_sta_ctx->rssi = kickout_event->rssi + WMA_TGT_NOISE_FLOOR_DBM;
+ wma_sta_kickout_event(HOST_STA_KICKOUT_REASON_KEEP_ALIVE,
+ vdev_id, macaddr);
wma_send_msg(wma, SIR_LIM_DELETE_STA_CONTEXT_IND, (void *)del_sta_ctx,
0);
wma_lost_link_info_handler(wma, vdev_id, kickout_event->rssi +
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 4b4e66a1be77..7928bb78ee31 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -5747,6 +5747,8 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
WMA_LOGD("Beacon Miss for vdevid %x", wmi_event->vdev_id);
wma_beacon_miss_handler(wma_handle, wmi_event->vdev_id,
wmi_event->rssi);
+ wma_sta_kickout_event(HOST_STA_KICKOUT_REASON_BMISS,
+ wmi_event->vdev_id, NULL);
break;
case WMI_ROAM_REASON_BETTER_AP:
WMA_LOGD("%s:Better AP found for vdevid %x, rssi %d", __func__,