aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.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 /net/mac80211/driver-ops.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 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index df1d50291344..696ef78b1fb7 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1156,4 +1156,17 @@ static inline void drv_leave_ibss(struct ieee80211_local *local,
1156 trace_drv_return_void(local); 1156 trace_drv_return_void(local);
1157} 1157}
1158 1158
1159static inline u32 drv_get_expected_throughput(struct ieee80211_local *local,
1160 struct ieee80211_sta *sta)
1161{
1162 u32 ret = 0;
1163
1164 trace_drv_get_expected_throughput(sta);
1165 if (local->ops->get_expected_throughput)
1166 ret = local->ops->get_expected_throughput(sta);
1167 trace_drv_return_u32(local, ret);
1168
1169 return ret;
1170}
1171
1159#endif /* __MAC80211_DRIVER_OPS */ 1172#endif /* __MAC80211_DRIVER_OPS */