diff options
author | Ajit Vaishya <ajitv@codeaurora.org> | 2019-06-13 22:57:10 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-06-13 22:57:10 -0700 |
commit | 6ec0ca65d69ac2d689f5a12e8420b2938d26981a (patch) | |
tree | ac85a8d7f73cb128f708dee3a4151f195f433e5e | |
parent | 4cc0f0993c86526e5f8a1a34bc05e15703732330 (diff) | |
parent | 1b30bee31528c40d72cd9d762a8391dca498f675 (diff) | |
download | wlan-6ec0ca65d69ac2d689f5a12e8420b2938d26981a.tar.gz |
Wifi-hal: RX and Per packet fate stats for new pkt log version V2
am: 1b30bee315
Change-Id: Ieba7e9b42fa9e5695392263e3e096642bde01e5b
-rw-r--r-- | qcwcn/wifi_hal/wifilogger_diag.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/qcwcn/wifi_hal/wifilogger_diag.cpp b/qcwcn/wifi_hal/wifilogger_diag.cpp index 12aa69f..1bcece4 100644 --- a/qcwcn/wifi_hal/wifilogger_diag.cpp +++ b/qcwcn/wifi_hal/wifilogger_diag.cpp @@ -2394,7 +2394,27 @@ static wifi_error parse_stats_record_v2(hal_info *info, { wifi_error status = WIFI_SUCCESS; - if (pkt_stats_header->log_type == PKTLOG_TYPE_PKT_SW_EVENT) { + if (pkt_stats_header->log_type == PKTLOG_TYPE_RX_STAT) { + /* Ignore the event if it doesn't carry RX descriptor */ + if (pkt_stats_header->flags & PKT_INFO_FLG_RX_RXDESC_MASK) + status = parse_rx_stats_v2(info, + (u8 *)(pkt_stats_header + 1), + pkt_stats_header->size); + else + status = WIFI_SUCCESS; + } else if (pkt_stats_header->log_type == PKTLOG_TYPE_PKT_DUMP_V2) { + pthread_mutex_lock(&info->pkt_fate_stats_lock); + if (info->fate_monitoring_enabled) { + if (pkt_stats_header->flags & PKT_INFO_FLG_PKT_DUMP_V2) + status = parse_pkt_fate_stats(info, + (u8 *)pkt_stats_header + sizeof(wh_pktlog_hdr_v2_t), + pkt_stats_header->size); + else + status = WIFI_SUCCESS; + } else + status = WIFI_SUCCESS; + pthread_mutex_unlock(&info->pkt_fate_stats_lock); + } else if (pkt_stats_header->log_type == PKTLOG_TYPE_PKT_SW_EVENT) { status = parse_stats_sw_event(info, pkt_stats_header); } else ALOGE("%s: invalid log_type %d",__FUNCTION__, pkt_stats_header->log_type); |