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

@@ -220,7 +220,7 @@ static void dp_rx_stats_update(struct dp_pdev *pdev, struct dp_peer *peer,
return;
DP_STATS_UPD(peer, rx.rssi, ppdu->rssi);
if (!peer->stats.rx.avg_rssi)
if (peer->stats.rx.avg_rssi == INVALID_RSSI)
peer->stats.rx.avg_rssi = ppdu->rssi;
else
peer->stats.rx.avg_rssi =