aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2014-05-19 15:53:20 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-21 03:15:16 -0400
commitcca674d47e59665630f3005291b61bb883015fc5 (patch)
treebd83cc2c0b576cdc7adae72ca7c170c1e1648fa8 /include/net/mac80211.h
parent867d849fc844623a88ec7b380442952b5ffe5e68 (diff)
mac80211: export the expected throughput
Add get_expected_throughput() API to mac80211 so that each driver can implement its own version based on the RC algorithm they are using (might be using an HW RC algo). The API returns a value expressed in Kbps. Also, add the new get_expected_throughput() member to the rate_control_ops structure in order to be able to query the RC algorithm (this patch provides an implementation of this API for both minstrel and minstrel_ht). The related member in the station_info object is now filled accordingly when dumping a station. Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a34f26a4ed18..2c78997bc48d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2769,6 +2769,10 @@ enum ieee80211_roc_type {
2769 * information in bss_conf is set up and the beacon can be retrieved. A 2769 * information in bss_conf is set up and the beacon can be retrieved. A
2770 * channel context is bound before this is called. 2770 * channel context is bound before this is called.
2771 * @leave_ibss: Leave the IBSS again. 2771 * @leave_ibss: Leave the IBSS again.
2772 *
2773 * @get_expected_throughput: extract the expected throughput towards the
2774 * specified station. The returned value is expressed in Kbps. It returns 0
2775 * if the RC algorithm does not have proper data to provide.
2772 */ 2776 */
2773struct ieee80211_ops { 2777struct ieee80211_ops {
2774 void (*tx)(struct ieee80211_hw *hw, 2778 void (*tx)(struct ieee80211_hw *hw,
@@ -2962,6 +2966,7 @@ struct ieee80211_ops {
2962 2966
2963 int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); 2967 int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
2964 void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); 2968 void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
2969 u32 (*get_expected_throughput)(struct ieee80211_sta *sta);
2965}; 2970};
2966 2971
2967/** 2972/**
@@ -4535,6 +4540,8 @@ struct rate_control_ops {
4535 void (*add_sta_debugfs)(void *priv, void *priv_sta, 4540 void (*add_sta_debugfs)(void *priv, void *priv_sta,
4536 struct dentry *dir); 4541 struct dentry *dir);
4537 void (*remove_sta_debugfs)(void *priv, void *priv_sta); 4542 void (*remove_sta_debugfs)(void *priv, void *priv_sta);
4543
4544 u32 (*get_expected_throughput)(void *priv_sta);
4538}; 4545};
4539 4546
4540static inline int rate_supported(struct ieee80211_sta *sta, 4547static inline int rate_supported(struct ieee80211_sta *sta,