qcacld-3.0: Update disconnect rssi on every disconnect rssi event

Currently there is a check to validate if the station is in
associated state or not in the hdd lost link cp stats info cb,

There is a race condition where if the disconnection happens
from ap in that case the callback gets invoked before the
connection state in the station context gets updated and thus
the rssi on disconnect is not updated.

To address above issue remove the check to validate the station
state and update the rssi on disconnect irrespective of the
state of the connection.

Change-Id: I9cc6a08cdf0a1081adfde7a9423a665bc977cffc
CRs-Fixed: 2678667
This commit is contained in:
Ashish Kumar Dhanotiya 2020-05-04 12:52:00 +05:30 • committed by nshrivas
commit d064902a66
2 changed files with 8 additions and 10 deletions

View file

@ -317,6 +317,10 @@ static QDF_STATUS target_if_cp_stats_extract_vdev_summary_stats(
dat_snr = vdev_stats.vdev_snr.dat_snr;
ev->vdev_summary_stats[i].vdev_id = vdev_stats.vdev_id;
cp_stats_debug("vdev %d SNR bcn: %d data: %d",
ev->vdev_summary_stats[i].vdev_id, bcn_snr,
dat_snr);
for (j = 0; j < 4; j++) {
ev->vdev_summary_stats[i].stats.tx_frm_cnt[j]
= vdev_stats.tx_frm_cnt[j];

View file

@ -6216,7 +6216,6 @@ static void hdd_lost_link_cp_stats_info_cb(void *stats_ev)
struct hdd_adapter *adapter;
struct stats_event *ev = stats_ev;
uint8_t i;
struct hdd_station_ctx *sta_ctx;
if (wlan_hdd_validate_context(hdd_ctx))
return;
@ -6229,16 +6228,11 @@ static void hdd_lost_link_cp_stats_info_cb(void *stats_ev)
hdd_debug("invalid adapter");
continue;
}
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if ((sta_ctx) &&
(eConnectionState_Associated !=
sta_ctx->conn_info.conn_state)) {
adapter->rssi_on_disconnect =
adapter->rssi_on_disconnect =
ev->vdev_summary_stats[i].stats.rssi;
hdd_debug("rssi on disconnect %d for " QDF_MAC_ADDR_STR,
adapter->rssi_on_disconnect,
QDF_MAC_ADDR_ARRAY(adapter->mac_addr.bytes));
}
hdd_debug("rssi %d for " QDF_MAC_ADDR_STR,
adapter->rssi_on_disconnect,
QDF_MAC_ADDR_ARRAY(adapter->mac_addr.bytes));
}
}