summaryrefslogtreecommitdiff
path: root/qcwcn/wifi_hal/wifilogger_diag.cpp
diff options
context:
space:
mode:
authorSubhani Shaik <subhanis@codeaurora.org>2016-03-02 12:58:54 +0530
committermukesh agrawal <quiche@google.com>2016-03-16 12:36:08 -0700
commite7565bd3953766d874f03973e732eeac290f3398 (patch)
tree8f0ec73973e983ead3dd4697ace1f03c36df6599 /qcwcn/wifi_hal/wifilogger_diag.cpp
parent15edefc411e5d4afe85c0ca404e93f2346fde5b1 (diff)
downloadwlan-e7565bd3953766d874f03973e732eeac290f3398.tar.gz
WiFi-HAL: Do not free local frame_content in get()
Wifihal allocates memory for a frame when it receives the corresponding stat. It gets freed when wifihal receives first packet of the next connection instance. Framework can query for the same any number of times. So, wifihal should maintain the current stats till it gets next connection instance stats. So, do not free it in get() APIs. Correct memcpy() length for management frames from MAX_FRAME_LEN_ETHERNET to MAX_FRAME_LEN_80211_MGMT. BUG: 27502434 Change-Id: I0b5756e1a916f95290c85e90a5ae42c7fcd62d18
Diffstat (limited to 'qcwcn/wifi_hal/wifilogger_diag.cpp')
-rw-r--r--qcwcn/wifi_hal/wifilogger_diag.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qcwcn/wifi_hal/wifilogger_diag.cpp b/qcwcn/wifi_hal/wifilogger_diag.cpp
index 9ecbf45..ac999ec 100644
--- a/qcwcn/wifi_hal/wifilogger_diag.cpp
+++ b/qcwcn/wifi_hal/wifilogger_diag.cpp
@@ -1831,7 +1831,7 @@ static wifi_error parse_tx_pkt_fate_stats(hal_info *info, u8 *buf, u16 size)
memcpy(pkt_fate_stats->frame_inf.frame_content,
buf + sizeof(pktdump_hdr), pkt_fate_stats->frame_inf.frame_len);
} else {
- ALOGE("Failed to allocate mem for Tx frame_content for packet: %d",
+ ALOGE("Failed to allocate mem for Tx frame_content for packet: %zu",
info->pkt_fate_stats->n_tx_stats_collected);
pkt_fate_stats->frame_inf.frame_len = 0;
}
@@ -1873,7 +1873,7 @@ static wifi_error parse_rx_pkt_fate_stats(hal_info *info, u8 *buf, u16 size)
memcpy(pkt_fate_stats->frame_inf.frame_content,
buf + sizeof(pktdump_hdr), pkt_fate_stats->frame_inf.frame_len);
} else {
- ALOGE("Failed to allocate mem for Rx frame_content for packet: %d",
+ ALOGE("Failed to allocate mem for Rx frame_content for packet: %zu",
info->pkt_fate_stats->n_rx_stats_collected);
pkt_fate_stats->frame_inf.frame_len = 0;
}