mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
Merge "wifi: Add radio_id and frequency to StaLinkLayerLinkStats"
This commit is contained in:
@@ -35,6 +35,8 @@ package android.hardware.wifi;
|
||||
@VintfStability
|
||||
parcelable StaLinkLayerLinkStats {
|
||||
int linkId;
|
||||
int radioId;
|
||||
int frequencyMhz;
|
||||
int beaconRx;
|
||||
int avgRssiMgmt;
|
||||
android.hardware.wifi.StaLinkLayerIfacePacketStats wmeBePktStats;
|
||||
|
||||
@@ -31,6 +31,15 @@ parcelable StaLinkLayerLinkStats {
|
||||
* is not relevant and can be set to 0.
|
||||
*/
|
||||
int linkId;
|
||||
/**
|
||||
* Radio identifier on which the link is currently operating. Refer
|
||||
* |StaLinkLayerRadioStats.radioId|.
|
||||
*/
|
||||
int radioId;
|
||||
/**
|
||||
* Frequency of the link in Mhz.
|
||||
*/
|
||||
int frequencyMhz;
|
||||
/**
|
||||
* Number of beacons received from the connected AP on the link.
|
||||
*/
|
||||
|
||||
@@ -951,6 +951,8 @@ bool convertLegacyLinkLayerMlStatsToAidl(const legacy_hal::LinkLayerMlStats& leg
|
||||
for (const auto& link : legacy_ml_stats.links) {
|
||||
StaLinkLayerLinkStats linkStats = {};
|
||||
linkStats.linkId = link.stat.link_id;
|
||||
linkStats.radioId = link.stat.radio;
|
||||
linkStats.frequencyMhz = link.stat.frequency;
|
||||
linkStats.beaconRx = link.stat.beacon_rx;
|
||||
linkStats.avgRssiMgmt = link.stat.rssi_mgmt;
|
||||
linkStats.wmeBePktStats.rxMpdu = link.stat.ac[legacy_hal::WIFI_AC_BE].rx_mpdu;
|
||||
|
||||
@@ -125,6 +125,9 @@ TEST_F(AidlStructUtilTest, canConvertLegacyLinkLayerMlStatsToAidl) {
|
||||
link.peers.push_back(legacy_hal::WifiPeerInfo{});
|
||||
link.peers.push_back(legacy_hal::WifiPeerInfo{});
|
||||
link.stat.beacon_rx = rand();
|
||||
link.stat.link_id = rand() % 15;
|
||||
link.stat.radio = rand() % 4;
|
||||
link.stat.frequency = rand();
|
||||
link.stat.rssi_mgmt = rand();
|
||||
link.stat.ac[legacy_hal::WIFI_AC_BE].rx_mpdu = rand();
|
||||
link.stat.ac[legacy_hal::WIFI_AC_BE].tx_mpdu = rand();
|
||||
@@ -227,6 +230,8 @@ TEST_F(AidlStructUtilTest, canConvertLegacyLinkLayerMlStatsToAidl) {
|
||||
int l = 0;
|
||||
for (legacy_hal::LinkStats& link : legacy_ml_stats.links) {
|
||||
EXPECT_EQ(link.stat.link_id, (uint8_t)converted.iface.links[l].linkId);
|
||||
EXPECT_EQ(link.stat.radio, converted.iface.links[l].radioId);
|
||||
EXPECT_EQ(link.stat.frequency, (uint32_t)converted.iface.links[l].frequencyMhz);
|
||||
EXPECT_EQ(link.stat.beacon_rx, (uint32_t)converted.iface.links[l].beaconRx);
|
||||
EXPECT_EQ(link.stat.rssi_mgmt, converted.iface.links[l].avgRssiMgmt);
|
||||
EXPECT_EQ(link.stat.ac[legacy_hal::WIFI_AC_BE].rx_mpdu,
|
||||
|
||||
Reference in New Issue
Block a user