mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 09:14:18 -04:00
qcacld-3.0: Use dynamic NSS while reporting stats
Presently in the driver, the NSS used for reporting stats to the upper layer is fetched from the VDEV generic NSS. This NSS is not updated dynamically with the set NSS command. As a result, in the case the command is given, the NSS reported to the userspace is not proper. To mitigate this, instead of fetching the generic NSS, fetch the dynamic NSS from the mlme. Change-Id: I9fdbc0625ebe8343a7bf750829db028f4ddd86d0 CRs-Fixed: 2551187
This commit is contained in:
parent
ee81f8b2eb
commit
1600c7ace6
1 changed files with 24 additions and 4 deletions
|
|
@ -5663,6 +5663,8 @@ int wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
|
|||
{
|
||||
int ret = 0;
|
||||
struct stats_event *stats;
|
||||
struct wlan_mlme_nss_chains *dynamic_cfg;
|
||||
uint32_t tx_nss, rx_nss;
|
||||
|
||||
stats = wlan_cfg80211_mc_cp_stats_get_station_stats(adapter->vdev,
|
||||
&ret);
|
||||
|
|
@ -5709,11 +5711,29 @@ int wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
|
|||
adapter->hdd_stats.peer_stats.fcs_count =
|
||||
stats->peer_adv_stats->fcs_count;
|
||||
|
||||
dynamic_cfg = mlme_get_dynamic_vdev_config(adapter->vdev);
|
||||
if (!dynamic_cfg) {
|
||||
hdd_err("nss chain dynamic config NULL");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (hdd_conn_get_connected_band(&adapter->session.station)) {
|
||||
case BAND_2G:
|
||||
tx_nss = dynamic_cfg->tx_nss[NSS_CHAINS_BAND_2GHZ];
|
||||
rx_nss = dynamic_cfg->rx_nss[NSS_CHAINS_BAND_2GHZ];
|
||||
break;
|
||||
case BAND_5G:
|
||||
tx_nss = dynamic_cfg->tx_nss[NSS_CHAINS_BAND_5GHZ];
|
||||
rx_nss = dynamic_cfg->rx_nss[NSS_CHAINS_BAND_5GHZ];
|
||||
break;
|
||||
default:
|
||||
tx_nss = wlan_vdev_mlme_get_nss(adapter->vdev);
|
||||
rx_nss = wlan_vdev_mlme_get_nss(adapter->vdev);
|
||||
}
|
||||
|
||||
/* save class a stats to legacy location */
|
||||
adapter->hdd_stats.class_a_stat.tx_nss =
|
||||
wlan_vdev_mlme_get_nss(adapter->vdev);
|
||||
adapter->hdd_stats.class_a_stat.rx_nss =
|
||||
wlan_vdev_mlme_get_nss(adapter->vdev);
|
||||
adapter->hdd_stats.class_a_stat.tx_nss = tx_nss;
|
||||
adapter->hdd_stats.class_a_stat.rx_nss = rx_nss;
|
||||
adapter->hdd_stats.class_a_stat.tx_rate = stats->tx_rate;
|
||||
adapter->hdd_stats.class_a_stat.rx_rate = stats->rx_rate;
|
||||
adapter->hdd_stats.class_a_stat.tx_rx_rate_flags = stats->tx_rate_flags;
|
||||
|
|
|
|||
Loading…
Reference in a new issue