qcacld-3.0: Fix the bug in populating the ll stats

qcacld-2.0 to qcacld-3.0 propagation

If ll stats provided by FW has more than one peer then
Driver is allocating memory for all the peers but copying stats
for only first peer before sending it to upper layer.

Fix the issue to copy stats for all the peers.

Change-Id: I91b14377acfed6ccdde4315c4796ef1adbfd18c3
CRs-Fixed: 1018539
Цей коміт міститься в:
Kondabattini, Ganesh
2016-08-09 15:19:50 +05:30
зафіксовано Nishank Aggarwal
джерело 209c195927
коміт 32be083b3d

Переглянути файл

@@ -497,7 +497,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle,
wmi_rate_stats *rate_stats;
tSirLLStatsResults *link_stats_results;
uint8_t *results, *t_peer_stats, *t_rate_stats;
uint32_t count, num_rates = 0;
uint32_t count, num_rates = 0, rate_cnt;
uint32_t next_res_offset, next_peer_offset, next_rate_offset;
size_t peer_info_size, peer_stats_size, rate_stats_size;
size_t link_stats_results_size;
@@ -585,7 +585,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle,
next_res_offset = peer_stats_size;
next_peer_offset = WMI_TLV_HDR_SIZE;
next_rate_offset = WMI_TLV_HDR_SIZE;
for (count = 0; count < fixed_param->num_peers; count++) {
for (rate_cnt = 0; rate_cnt < fixed_param->num_peers; rate_cnt++) {
WMA_LOGD("Peer Info:");
WMA_LOGD("peer_type %u capabilities %u num_rates %u",
peer_stats->peer_type, peer_stats->capabilities,