qcacmn: Update rssi only when its valid

Peer stats struct members initial value 0, so when other functions call
to update peer stats have 0 rssi value which updates mininum
rssi since its the least value. So initialize the rssi with invalid
value initially

Change-Id: Ife033598c7ac47a9a26595f97bff058570d3e91f
CRs-Fixed: 2403735
This commit is contained in:
Surya Prakash
2019-04-29 10:08:01 +05:30
committed by nshrivas
parent b85768e4e5
commit 07c81e7d77
3 changed files with 5 additions and 1 deletions

View File

@@ -4941,6 +4941,7 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
dp_local_peer_id_alloc(pdev, peer);
DP_STATS_INIT(peer);
DP_STATS_UPD(peer, rx.avg_rssi, INVALID_RSSI);
return (void *)peer;
} else {
@@ -5032,6 +5033,7 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
peer->valid = 1;
dp_local_peer_id_alloc(pdev, peer);
DP_STATS_INIT(peer);
DP_STATS_UPD(peer, rx.avg_rssi, INVALID_RSSI);
qdf_mem_copy(peer_cookie.mac_addr, peer->mac_addr.raw,
QDF_MAC_ADDR_SIZE);