summaryrefslogtreecommitdiff
path: root/qcwcn
diff options
context:
space:
mode:
authorkensun <kensun@google.com>2021-07-28 06:40:31 +0000
committerkensun <kensun@google.com>2021-07-28 07:48:35 +0000
commitc62b63d7f7dbb31cf6626855d10180b9e62ce165 (patch)
treee63986e1731bcd7d309d964783171fbf6b0179ce /qcwcn
parentad9fbe71051ec885fee4f4b3df4cf47b0041adc3 (diff)
downloadwlan-c62b63d7f7dbb31cf6626855d10180b9e62ce165.tar.gz
llstats peerinfo has varying wifi rate stats. Since llstats is a linear buffer with interface and peer stats, we should include wifi rate stats length while computing offset of next peer Bug: 191419302 Test: Regression Test Change-Id: Icc0395cf290268f4c2c96031389fae36ac48d47c
Diffstat (limited to 'qcwcn')
-rw-r--r--qcwcn/wifi_hal/llstats.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qcwcn/wifi_hal/llstats.cpp b/qcwcn/wifi_hal/llstats.cpp
index d9e2441..8e827e2 100644
--- a/qcwcn/wifi_hal/llstats.cpp
+++ b/qcwcn/wifi_hal/llstats.cpp
@@ -1188,6 +1188,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply)
status = WIFI_ERROR_INVALID_ARGS;
goto cleanup;
}
+ num_rates = 0;
for (peerInfo = (struct nlattr *) nla_data(tb_vendor[
QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO]),
rem = nla_len(tb_vendor[
@@ -1199,7 +1200,8 @@ int LLStatsCommand::handleResponse(WifiEvent &reply)
QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX+ 1];
pPeerStats = (wifi_peer_info *) (
(u8 *)pIfaceStat->peer_info
- + (i++ * sizeof(wifi_peer_info)));
+ + (i++ * sizeof(wifi_peer_info))
+ + (num_rates * sizeof(wifi_rate_stat)));
nla_parse(tb2, QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX,
(struct nlattr *) nla_data(peerInfo),
nla_len(peerInfo), NULL);
@@ -1208,6 +1210,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply)
{
goto cleanup;
}
+ num_rates += pPeerStats->num_rate;
}
}