summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Dhamdhere <ddhamdhe@codeaurora.org>2017-02-06 10:16:35 -0800
committerqcabuildsw <qcabuildsw@localhost>2017-02-06 16:44:30 -0800
commit5d15b272641729d628e0a554639a5d4cec157707 (patch)
treec05acf1ae4ace4440ced2961fde9f2e9aaaa4182
parentd0cb60dcec74c4f0b487a995615f7b7fc55d2bc6 (diff)
qcacld-3.0: Add improvements for peer debug logs
Modify the debug dump output to use "name = value" format for all parameters in each line. Add mac adress values to roam sync indication log. Fix the placement of wow suspend log. Add a log for peer_id mismatch in ol_rx_unmap_handler. CRs-Fixed: 2002828 Change-Id: I850e06afb947699f93efd81dcd84e091dac0abde
-rw-r--r--core/dp/txrx/ol_txrx_peer_find.c4
-rw-r--r--core/wma/inc/wma_api.h3
-rw-r--r--core/wma/src/wma_features.c14
-rw-r--r--core/wma/src/wma_scan_roam.c10
-rw-r--r--core/wma/src/wma_utils.c34
5 files changed, 48 insertions, 17 deletions
diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c
index 5d224ca943a3..1f3e9914d541 100644
--- a/core/dp/txrx/ol_txrx_peer_find.c
+++ b/core/dp/txrx/ol_txrx_peer_find.c
@@ -573,6 +573,10 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
"%s: peer not found for peer_id %d",
__func__, peer_id);
+ wma_peer_debug_log(DEBUG_INVALID_VDEV_ID,
+ DEBUG_PEER_UNMAP_EVENT,
+ peer_id, NULL, NULL, 0, 0);
+
return;
}
diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h
index 3c304735716f..a7aec929204d 100644
--- a/core/wma/inc/wma_api.h
+++ b/core/wma/inc/wma_api.h
@@ -122,7 +122,8 @@ enum peer_debug_op {
DEBUG_ROAM_EVENT,
DEBUG_WOW_ROAM_EVENT,
DEBUG_BUS_SUSPEND,
- DEBUG_BUS_RESUME
+ DEBUG_BUS_RESUME,
+ DEBUG_WOW_REASON,
};
#define DEBUG_INVALID_PEER_ID 0xffff
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 90241e198f28..649511086e71 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -2716,6 +2716,9 @@ static int wow_get_wmi_eventid(int32_t reason, uint32_t tag)
event_id = 0;
break;
}
+ wma_peer_debug_log(WMA_INVALID_VDEV_ID, DEBUG_WOW_REASON,
+ DEBUG_INVALID_PEER_ID, NULL, NULL,
+ reason, event_id);
return event_id;
}
@@ -3433,6 +3436,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
* WMI_ROAM_REASON_HO_FAILED event and it will be handled by
* wma_roam_event_callback().
*/
+ wma_peer_debug_log(wake_info->vdev_id, DEBUG_WOW_ROAM_EVENT,
+ DEBUG_INVALID_PEER_ID, NULL, NULL,
+ wake_info->wake_reason, 0);
WMA_LOGD("Host woken up because of roam event");
if (param_buf->wow_packet_buffer) {
/* Roam event is embedded in wow_packet_buffer */
@@ -6669,6 +6675,10 @@ static int __wma_bus_suspend(enum qdf_suspend_type type, uint32_t wow_flags)
return -EBUSY;
}
+ wma_peer_debug_log(DEBUG_INVALID_VDEV_ID, DEBUG_BUS_SUSPEND,
+ DEBUG_INVALID_PEER_ID, NULL, NULL,
+ type, wow_flags);
+
if (type == QDF_RUNTIME_SUSPEND) {
QDF_STATUS status = wma_post_runtime_suspend_msg(handle);
if (status)
@@ -6684,10 +6694,6 @@ static int __wma_bus_suspend(enum qdf_suspend_type type, uint32_t wow_flags)
return qdf_status_to_os_return(status);
}
- wma_peer_debug_log(DEBUG_INVALID_VDEV_ID, DEBUG_BUS_SUSPEND,
- DEBUG_INVALID_PEER_ID, NULL, NULL,
- 0, 0);
-
return wma_suspend_target(handle, 0);
}
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 19d400b285ce..fd496c91e244 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -2333,7 +2333,9 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
}
wma_peer_debug_log(synch_event->vdev_id, DEBUG_ROAM_SYNCH_IND,
- DEBUG_INVALID_PEER_ID, NULL, NULL, 0, 0);
+ DEBUG_INVALID_PEER_ID, NULL, NULL,
+ synch_event->bssid.mac_addr31to0,
+ synch_event->bssid.mac_addr47to32);
DPTRACE(qdf_dp_trace_record_event(QDF_DP_TRACE_EVENT_RECORD,
synch_event->vdev_id, QDF_PROTO_TYPE_EVENT, QDF_ROAM_SYNCH));
@@ -5725,6 +5727,12 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
WMA_LOGD("%s: Reason %x, Notif %x for vdevid %x, rssi %d",
__func__, wmi_event->reason, wmi_event->notif,
wmi_event->vdev_id, wmi_event->rssi);
+ wma_peer_debug_log(wmi_event->vdev_id, DEBUG_ROAM_EVENT,
+ DEBUG_INVALID_PEER_ID, NULL, NULL,
+ wmi_event->reason,
+ (wmi_event->reason == WMI_ROAM_REASON_INVALID) ?
+ wmi_event->notif : wmi_event->rssi);
+
DPTRACE(qdf_dp_trace_record_event(QDF_DP_TRACE_EVENT_RECORD,
wmi_event->vdev_id, QDF_PROTO_TYPE_EVENT, QDF_ROAM_EVENTID));
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index 78824566f081..dc46ad2640a6 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.c
@@ -4035,19 +4035,19 @@ static char *wma_peer_debug_string(uint32_t op)
{
switch (op) {
case DEBUG_PEER_CREATE_SEND:
- return "peer_create_send";
+ return "peer create send";
case DEBUG_PEER_CREATE_RESP:
- return "peer_create_resp_event";
+ return "peer create resp_event";
case DEBUG_PEER_DELETE_SEND:
- return "peer_delete_send";
+ return "peer delete send";
case DEBUG_PEER_DELETE_RESP:
- return "peer_delete_resp_event";
+ return "peer delete resp_event";
case DEBUG_PEER_MAP_EVENT:
- return "peer_map_event";
+ return "peer map event";
case DEBUG_PEER_UNMAP_EVENT:
- return "peer_unmap_event";
+ return "peer unmap event";
case DEBUG_PEER_UNREF_DELETE:
- return "peer_unref_delete";
+ return "peer unref delete";
case DEBUG_DELETING_PEER_OBJ:
return "peer obj deleted";
case DEBUG_ROAM_SYNCH_IND:
@@ -4064,8 +4064,10 @@ static char *wma_peer_debug_string(uint32_t op)
return "host suspend";
case DEBUG_BUS_RESUME:
return "host wakeup";
+ case DEBUG_WOW_REASON:
+ return "wow wakeup reason";
default:
- return "Unknown";
+ return "unknown";
}
}
@@ -4081,6 +4083,9 @@ void wma_peer_debug_dump(void)
uint32_t i;
uint32_t current_index;
struct peer_debug_rec *dbg_rec;
+ uint64_t startt = 0;
+
+#define DEBUG_CLOCK_TICKS_PER_MSEC 19200
current_index = qdf_atomic_read(&wma->peer_dbg->index);
if (current_index < 0) {
@@ -4090,8 +4095,7 @@ void wma_peer_debug_dump(void)
WMA_LOGE("%s: Dumping all records. current index %d",
__func__, current_index);
}
- WMA_LOGE("Index Time Info vdev "
- "mac_addr peer peer_id arg1 arg2");
+
i = current_index;
do {
/* wrap around */
@@ -4100,9 +4104,17 @@ void wma_peer_debug_dump(void)
/* skip unused entry */
if (dbg_rec->time == 0)
continue;
- WMA_LOGE("%5d 0x%016llx %-24s %-4d %pM 0x%p %-4d 0x%-8x 0x%-8x",
+ if (startt == 0)
+ startt = dbg_rec->time;
+
+ WMA_LOGE("index = %5d timestamp = 0x%016llx delta ms = %-9d "
+ "info = %-24s vdev_id = %-3d mac addr = %pM "
+ "peer obj = 0x%p peer_id = %-4d "
+ "arg1 = 0x%-8x arg2 = 0x%-8x",
i,
dbg_rec->time,
+ ((int32_t) ((dbg_rec->time - startt) & 0xffffffff)) /
+ DEBUG_CLOCK_TICKS_PER_MSEC,
wma_peer_debug_string(dbg_rec->operation),
(int8_t) dbg_rec->vdev_id,
dbg_rec->mac_addr.bytes,