Add receive bit rate to signal poll
Bug: 261624698
Test: m
Change-Id: Ie6ba8bb83035228527eedbc30da6d76a4c8eeb5a
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 6bbf1ec..a546984 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2393,6 +2393,7 @@
int avg_beacon_signal;
int current_noise;
int current_txrate;
+ int current_rxrate;
enum chan_width chanwidth;
int center_frq1;
int center_frq2;
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 1385edb..7472987 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1701,6 +1701,20 @@
}
}
+ if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
+ if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,
+ sinfo[NL80211_STA_INFO_RX_BITRATE],
+ rate_policy)) {
+ sig_change->current_rxrate = 0;
+ } else {
+ if (rinfo[NL80211_RATE_INFO_BITRATE]) {
+ sig_change->current_rxrate =
+ nla_get_u16(rinfo[
+ NL80211_RATE_INFO_BITRATE]) * 100;
+ }
+ }
+ }
+
return NL_SKIP;
}
@@ -1712,6 +1726,7 @@
sig->current_signal = -WPA_INVALID_NOISE;
sig->current_txrate = 0;
+ sig->current_rxrate = 0;
if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_GET_STATION)) ||
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid)) {