diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2014-05-19 21:53:20 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-05-21 09:15:16 +0200 |
commit | cca674d47e59665630f3005291b61bb883015fc5 (patch) | |
tree | bd83cc2c0b576cdc7adae72ca7c170c1e1648fa8 /include/net/mac80211.h | |
parent | 867d849fc844623a88ec7b380442952b5ffe5e68 (diff) | |
download | op-kernel-dev-cca674d47e59665630f3005291b61bb883015fc5.zip op-kernel-dev-cca674d47e59665630f3005291b61bb883015fc5.tar.gz |
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.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index a34f26a..2c78997 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2769,6 +2769,10 @@ enum ieee80211_roc_type { * information in bss_conf is set up and the beacon can be retrieved. A * channel context is bound before this is called. * @leave_ibss: Leave the IBSS again. + * + * @get_expected_throughput: extract the expected throughput towards the + * specified station. The returned value is expressed in Kbps. It returns 0 + * if the RC algorithm does not have proper data to provide. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw, @@ -2962,6 +2966,7 @@ struct ieee80211_ops { int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); + u32 (*get_expected_throughput)(struct ieee80211_sta *sta); }; /** @@ -4535,6 +4540,8 @@ 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_sta); }; static inline int rate_supported(struct ieee80211_sta *sta, |