diff options
author | Ajit Vaishya <ajitv@codeaurora.org> | 2019-02-26 18:57:43 +0530 |
---|---|---|
committer | Les Lee <lesl@google.com> | 2019-06-13 07:43:54 +0000 |
commit | 1b30bee31528c40d72cd9d762a8391dca498f675 (patch) | |
tree | ee4fcdcfe1a6c897e7ad84e7301b160d29e118cd /qcwcn | |
parent | 32886cca7ac0af6c75a39184dfbee82ea5ac69ad (diff) | |
download | wlan-1b30bee31528c40d72cd9d762a8391dca498f675.tar.gz |
Wifi-hal: RX and Per packet fate stats for new pkt log version V2
Current RX stats parsing structure differs with the recent
architectures. Hence , the firmware / host indicates this need to parse
the data with the updated structures through the version ( V2) and the
parser is expected to adapt to the same.
This commit introduces to parse pktlog stats based on PKT_LOG_V2
parsing structure and the rx rate calculation also differs based on this
Version 2.
Change-Id: Id0997296e93be15158cb9fd27b25067010227666
CRs-Fixed: 2402099
Bug: 130226017
Test: Manual Test, turn verbose logging and check pkt log
Diffstat (limited to 'qcwcn')
-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); |