ソースを参照

qcacld-3.0: Send proper Link Rates to user space

Currently, host consider self NSS capability while sending
link rates statistics to userspace for "iw wlan0/1 link" command.
This results host sends incorrect link rates in case of STA and
AP has different NSS capabilities.

Fix is to send intersection of Self and AP's NSS capability
to userspace.

Change-Id: I7a31998ccb6988aa95de9fa25f49dda20f9f8b96
CRs-Fixed: 2686251
Abhinav Kumar 5 年 前
コミット
8c45456a60
1 ファイル変更6 行追加0 行削除
  1. 6 0
      core/hdd/src/wlan_hdd_stats.c

+ 6 - 0
core/hdd/src/wlan_hdd_stats.c

@@ -6061,6 +6061,12 @@ int wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
 		tx_nss = wlan_vdev_mlme_get_nss(adapter->vdev);
 		rx_nss = wlan_vdev_mlme_get_nss(adapter->vdev);
 	}
+	/* Intersection of self and AP's NSS capability */
+	if (tx_nss > wlan_vdev_mlme_get_nss(adapter->vdev))
+		tx_nss = wlan_vdev_mlme_get_nss(adapter->vdev);
+
+	if (rx_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 = tx_nss;