summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmarnath Hullur Subramanyam <amarnath@codeaurora.org>2015-08-13 17:34:37 +0530
committerVineeta Srivastava <vsrivastava@google.com>2015-08-19 00:34:32 -0700
commit6c670f1cb4270f00e00b414a2c7cd20b878d8356 (patch)
treea9e9590a133df02f8321c384cd58cdd67f3ea76e
parentd5efb24a0e865b1cc8f43913ad80565cf42f477e (diff)
downloadandroid_hardware_qcom_wlan-6c670f1cb4270f00e00b414a2c7cd20b878d8356.tar.gz
android_hardware_qcom_wlan-6c670f1cb4270f00e00b414a2c7cd20b878d8356.tar.bz2
android_hardware_qcom_wlan-6c670f1cb4270f00e00b414a2c7cd20b878d8356.zip
WiFi-HAL: Populate stats of previous AMPDU if first MPDU misses
Per packet stats module collects below stats from first MPDU of the AMPDU. 1. RxMCS 2. last_transmit_rate 3. rssi 4. tid But the first MPDU may not be received by hardware/corrupted sometimes. Populate the cached stats from first MPDU of the previous AMPDU in such cases. Don't parse Rx packets if the REORDER flag is set as parsing of these packets may show duplicate entries in the stats. Change-Id: I8cf78f42e055b0c22d123f21c91f2c204087afe0
-rw-r--r--qcwcn/wifi_hal/pkt_stats.h3
-rw-r--r--qcwcn/wifi_hal/wifilogger_diag.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/qcwcn/wifi_hal/pkt_stats.h b/qcwcn/wifi_hal/pkt_stats.h
index 533ef3d..89e51e9 100644
--- a/qcwcn/wifi_hal/pkt_stats.h
+++ b/qcwcn/wifi_hal/pkt_stats.h
@@ -67,8 +67,7 @@
PKT_INFO_FLG_RX_LOCAL_S | \
PKT_INFO_FLG_RX_REMOTE_S | \
PKT_INFO_FLG_RX_LOCAL_DISCARD_S | \
- PKT_INFO_FLG_RX_REMOTE_DISCARD_S | \
- PKT_INFO_FLG_RX_REORDER_STORE_S)
+ PKT_INFO_FLG_RX_REMOTE_DISCARD_S)
/* Format of the packet stats event*/
typedef struct {
diff --git a/qcwcn/wifi_hal/wifilogger_diag.cpp b/qcwcn/wifi_hal/wifilogger_diag.cpp
index b8eafdd..99a7e26 100644
--- a/qcwcn/wifi_hal/wifilogger_diag.cpp
+++ b/qcwcn/wifi_hal/wifilogger_diag.cpp
@@ -1246,7 +1246,6 @@ static wifi_error populate_rx_aggr_stats(hal_info *info)
+ pRingBufferEntry->entry_size);
}
memset(info->rx_aggr_pkts, 0, info->rx_buf_size_occupied);
- memset(&info->aggr_stats, 0, sizeof(rx_aggr_stats));
info->rx_buf_size_occupied = 0;
return WIFI_SUCCESS;
@@ -1324,6 +1323,9 @@ static wifi_error parse_rx_stats(hal_info *info, u8 *buf, u16 size)
if (rx_stats_rcvd->attention.first_mpdu) {
MCS *mcs = &info->aggr_stats.RxMCS;
u32 ht_vht_sig;
+
+ /* Flush the cached stats as this is the first MPDU. */
+ memset(&info->aggr_stats, 0, sizeof(rx_aggr_stats));
if (rx_stats_rcvd->ppdu_start.preamble_type == PREAMBLE_L_SIG_RATE) {
if (rx_stats_rcvd->ppdu_start.l_sig_rate_select)
mcs->mcs_s.preamble = WL_PREAMBLE_OFDM;