@@ -3374,6 +3374,27 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
return ret;
}
+int ieee80211_get_max_tp(struct wireless_dev *wdev, const u8 *peer, u32 *tp)
+{
+ struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
+ struct rate_control_ref *ref = sdata->local->rate_ctrl;
+ struct sta_info *sta;
+
+ rcu_read_lock();
+ sta = sta_info_get(sdata, peer);
+ rcu_read_unlock();
+
+ if (!sta)
+ return -ENOENT;
+
+ if (!ref->ops->get_max_tp)
+ return -EOPNOTSUPP;
+
+ ref->ops->get_max_tp(sta->rate_ctrl_priv, tp);
+
+ return 0;
+}
+
#ifdef CONFIG_PM
static void ieee80211_set_wakeup(struct wiphy *wiphy, bool enabled)
{
@@ -3459,4 +3480,5 @@ struct cfg80211_ops mac80211_config_ops = {
.get_et_strings = ieee80211_get_et_strings,
.get_channel = ieee80211_cfg_get_channel,
.start_radar_detection = ieee80211_start_radar_detection,
+ .get_max_tp = ieee80211_get_max_tp,
};
Implement the get_max_tp() API function by asking the rate control algorithm for the maximum estimated throughput Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> --- net/mac80211/cfg.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)