summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Dhamdhere <ddhamdhe@codeaurora.org>2017-02-14 21:12:40 -0800
committerqcabuildsw <qcabuildsw@localhost>2017-02-28 19:25:23 -0800
commit5a3bb6cf6bb4b1f49b32263b146b325fb261653d (patch)
treec4e35a87a14e9b2ec99b8b6eda2e124d999664ab
parent5eb77ed78d66ff259b6dbbd2049867a712cfbf1b (diff)
qcacld-3.0: Add more peer debug logs for map/unmap events
Add more debug logs in routines that handle peer map, unmap events and WOW ROAM events. CRs-Fixed: 2005500 Change-Id: I79ef43f4f5ea85dacd54c1fbec2f75823586397e
-rw-r--r--core/dp/txrx/ol_txrx_peer_find.c12
-rw-r--r--core/wma/src/wma_features.c4
-rw-r--r--core/wma/src/wma_scan_roam.c4
-rw-r--r--core/wma/src/wma_utils.c15
4 files changed, 26 insertions, 9 deletions
diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c
index 57d851c52537..9ffc7aa1412b 100644
--- a/core/dp/txrx/ol_txrx_peer_find.c
+++ b/core/dp/txrx/ol_txrx_peer_find.c
@@ -366,6 +366,9 @@ static inline void ol_txrx_peer_find_add_id(struct ol_txrx_pdev_t *pdev,
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
"%s: peer not found or peer ID is %d invalid",
__func__, peer_id);
+ wma_peer_debug_log(DEBUG_INVALID_VDEV_ID, DEBUG_PEER_MAP_EVENT,
+ peer_id, peer_mac_addr, peer, 0, 0);
+
return;
}
@@ -548,9 +551,13 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
int i = 0;
int32_t ref_cnt;
+
if (peer_id == HTT_INVALID_PEER) {
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
"%s: invalid peer ID %d\n", __func__, peer_id);
+ wma_peer_debug_log(DEBUG_INVALID_VDEV_ID,
+ DEBUG_PEER_UNMAP_EVENT,
+ peer_id, NULL, NULL, 0, 0x100);
return;
}
@@ -564,6 +571,9 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
ref_cnt = qdf_atomic_read(&pdev->peer_id_to_obj_map[peer_id].
del_peer_id_ref_cnt);
qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock);
+ wma_peer_debug_log(DEBUG_INVALID_VDEV_ID,
+ DEBUG_PEER_UNMAP_EVENT,
+ peer_id, NULL, NULL, ref_cnt, 0x101);
TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1,
"%s: Remove the ID %d reference to deleted peer. del_peer_id_ref_cnt %d",
__func__, peer_id, ref_cnt);
@@ -582,7 +592,7 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
__func__, peer_id);
wma_peer_debug_log(DEBUG_INVALID_VDEV_ID,
DEBUG_PEER_UNMAP_EVENT,
- peer_id, NULL, NULL, 0, 0);
+ peer_id, NULL, NULL, 0, 0x102);
return;
}
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index f49dceef089e..f1c1259e9c8e 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -3439,7 +3439,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
*/
wma_peer_debug_log(wake_info->vdev_id, DEBUG_WOW_ROAM_EVENT,
DEBUG_INVALID_PEER_ID, NULL, NULL,
- wake_info->wake_reason, 0);
+ wake_info->wake_reason,
+ ((uint64_t) param_buf->wow_packet_buffer) &
+ 0xffffffff);
WMA_LOGD("Host woken up because of roam event");
if (param_buf->wow_packet_buffer) {
/* Roam event is embedded in wow_packet_buffer */
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index c68fd02c7df1..b93c73d8950e 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -5746,10 +5746,6 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
DPTRACE(qdf_dp_trace_record_event(QDF_DP_TRACE_EVENT_RECORD,
wmi_event->vdev_id, QDF_PROTO_TYPE_EVENT, QDF_ROAM_EVENTID));
- wma_peer_debug_log(wmi_event->vdev_id, DEBUG_ROAM_EVENT,
- DEBUG_INVALID_PEER_ID, NULL, NULL,
- wmi_event->reason, wmi_event->rssi);
-
switch (wmi_event->reason) {
case WMI_ROAM_REASON_BMISS:
WMA_LOGD("Beacon Miss for vdevid %x", wmi_event->vdev_id);
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index e2a655f82c15..6769c3e249fd 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.c
@@ -4164,6 +4164,7 @@ void wma_peer_debug_dump(void)
uint32_t current_index;
struct peer_debug_rec *dbg_rec;
uint64_t startt = 0;
+ uint32_t delta;
if (!wma) {
WMA_LOGD("%s: WMA handle NULL. Exiting", __func__);
@@ -4192,14 +4193,22 @@ void wma_peer_debug_dump(void)
if (startt == 0)
startt = dbg_rec->time;
- WMA_LOGE("index = %5d timestamp = 0x%016llx delta ms = %-9d "
+ /*
+ * Divide by 19200 == right shift 8 bits, then divide by 75
+ * 32 bit computation keeps both 32 and 64 bit compilers happy.
+ * The value will roll over after approx. 33554 seconds.
+ */
+ delta = (uint32_t) (((dbg_rec->time - startt) >> 8) &
+ 0xffffffff);
+ delta = delta / (DEBUG_CLOCK_TICKS_PER_MSEC >> 8);
+
+ WMA_LOGE("index = %5d timestamp = 0x%016llx delta ms = %-12u "
"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,
+ delta,
wma_peer_debug_string(dbg_rec->operation),
(int8_t) dbg_rec->vdev_id,
dbg_rec->mac_addr.bytes,