[3/7] mac80211: add new RC API to retrieve expected throughput

Message ID 1397484205-20905-3-git-send-email-antonio@meshcoding.com (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Antonio Quartulli April 14, 2014, 2:03 p.m. UTC
  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

Johannes Berg April 25, 2014, 3:45 p.m. UTC | #1
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
  
Antonio Quartulli May 14, 2014, 9:14 p.m. UTC | #2
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.
  

Patch

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 0efe37c..47b891a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -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,