[3/7] mac80211: add new RC API to retrieve expected throughput
Commit Message
From: Antonio Quartulli <antonio@open-mesh.com>
In order to make mac80211 export the expected throughput,
a new API which extracts such information from any mac80211
SW RC algorithm is needed.
Therefore add the new get_expected_throughput() member
to the rate_control_ops structure.
The exported value is expressed in Mbps/100. Such unit has
been chosen because it is the highest precision that
MinstrelHT can return.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
include/net/mac80211.h | 3 +++
1 file changed, 3 insertions(+)
Comments
On Mon, 2014-04-14 at 16:03 +0200, Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> In order to make mac80211 export the expected throughput,
> a new API which extracts such information from any mac80211
> SW RC algorithm is needed.
> Therefore add the new get_expected_throughput() member
> to the rate_control_ops structure.
>
> The exported value is expressed in Mbps/100. Such unit has
> been chosen because it is the highest precision that
> MinstrelHT can return.
Same as in patch 2 - and realistically 2/3/4 could just be squashed.
johannes
On 25/04/14 17:45, Johannes Berg wrote:
> On Mon, 2014-04-14 at 16:03 +0200, Antonio Quartulli wrote:
>> From: Antonio Quartulli <antonio@open-mesh.com>
>>
>> In order to make mac80211 export the expected throughput,
>> a new API which extracts such information from any mac80211
>> SW RC algorithm is needed.
>> Therefore add the new get_expected_throughput() member
>> to the rate_control_ops structure.
>>
>> The exported value is expressed in Mbps/100. Such unit has
>> been chosen because it is the highest precision that
>> MinstrelHT can return.
>
> Same as in patch 2 - and realistically 2/3/4 could just be squashed.
>
Yeah, I will specify the 0 value as "I don't know what to provide" and I
think it is fine to have just one patch.
@@ -4480,6 +4480,9 @@ struct rate_control_ops {
void (*add_sta_debugfs)(void *priv, void *priv_sta,
struct dentry *dir);
void (*remove_sta_debugfs)(void *priv, void *priv_sta);
+
+ u32 (*get_expected_throughput)(void *priv, void *priv_sta,
+ struct ieee80211_supported_band *sband);
};
static inline int rate_supported(struct ieee80211_sta *sta,