diff options
author | Vinay Gannevaram <vganneva@codeaurora.org> | 2021-07-22 19:27:05 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-07-26 01:13:01 -0700 |
commit | 61b8dd124f5c52c87038d6476ae73a2d3570b1e8 (patch) | |
tree | 35bcb4de2146710dae5121db8d185bd50961ced3 | |
parent | baf0623af84916e9487966d29230ef0765960e22 (diff) |
WifiHal: populate llstats peer info with correct offset
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
CRs-Fixed: 2999671
Change-Id: Icc0395cf290268f4c2c96031389fae36ac48d47c
-rw-r--r-- | qcwcn/wifi_hal/llstats.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qcwcn/wifi_hal/llstats.cpp b/qcwcn/wifi_hal/llstats.cpp index 46f6a5e..2e07e46 100644 --- a/qcwcn/wifi_hal/llstats.cpp +++ b/qcwcn/wifi_hal/llstats.cpp @@ -1189,6 +1189,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[ @@ -1200,7 +1201,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); @@ -1209,6 +1211,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) { goto cleanup; } + num_rates += pPeerStats->num_rate; } } |