@@ -472,9 +472,13 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct ieee80211_local *local = sdata->local;
+ struct rate_control_ref *ref = local->rate_ctrl;
+ struct ieee80211_supported_band *sband;
+ enum ieee80211_band band;
struct timespec uptime;
u64 packets = 0;
int i, ac;
+ u32 thr;
sinfo->generation = sdata->local->sta_generation;
@@ -587,6 +591,19 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_ASSOCIATED);
if (test_sta_flag(sta, WLAN_STA_TDLS_PEER))
sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_TDLS_PEER);
+
+ if (ref->ops->get_expected_throughput) {
+ band = ieee80211_get_sdata_band(sta->sdata);
+ sband = sta->local->hw.wiphy->bands[band];
+
+ thr = ref->ops->get_expected_throughput(ref->priv,
+ sta->rate_ctrl_priv,
+ sband);
+ if (thr != 0) {
+ sinfo->filled |= STATION_INFO_EXPECTED_THROUGHPUT;
+ sinfo->expected_throughput = thr;
+ }
+ }
}
static const char ieee80211_gstrings_sta_stats[][ETH_GSTRING_LEN] = {