aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-11-17 05:35:23 -0500
committerJohannes Berg <johannes.berg@intel.com>2015-01-08 09:28:06 -0500
commit2b9a7e1bac24df8ddb0713ad1e5807a7243bcab0 (patch)
treef118d24b4a347e52c0a0a9173178efbe850531af /include/net/mac80211.h
parent6f7a8d26e2668e00de524d3da0122a4411047dd2 (diff)
mac80211: allow drivers to provide most station statistics
In many cases, drivers can filter things like beacons that will skew statistics reported by mac80211. To get correct statistics in these cases, call drivers to obtain statistics and let them override all values, filling values from mac80211 if the driver didn't provide them. Not all of them make sense for the driver to fill, so some are still always done by mac80211. Note that this doesn't currently allow a driver to say "I know this value is wrong, don't report it at all", or to sum it up with a mac80211 value (as could be useful for "dropped misc"), that can be added if it turns out to be needed. This also gets rid of the get_rssi() method as is can now be implemented using sta_statistics(). Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 555a845ad51e..123f2308958a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2708,6 +2708,14 @@ enum ieee80211_reconfig_type {
2708 * is only used if the configured rate control algorithm actually uses 2708 * is only used if the configured rate control algorithm actually uses
2709 * the new rate table API, and is therefore optional. Must be atomic. 2709 * the new rate table API, and is therefore optional. Must be atomic.
2710 * 2710 *
2711 * @sta_statistics: Get statistics for this station. For example with beacon
2712 * filtering, the statistics kept by mac80211 might not be accurate, so
2713 * let the driver pre-fill the statistics. The driver can fill most of
2714 * the values (indicating which by setting the filled bitmap), but not
2715 * all of them make sense - see the source for which ones are possible.
2716 * Statistics that the driver doesn't fill will be filled by mac80211.
2717 * The callback can sleep.
2718 *
2711 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), 2719 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
2712 * bursting) for a hardware TX queue. 2720 * bursting) for a hardware TX queue.
2713 * Returns a negative error code on failure. 2721 * Returns a negative error code on failure.
@@ -2868,9 +2876,6 @@ enum ieee80211_reconfig_type {
2868 * @get_et_strings: Ethtool API to get a set of strings to describe stats 2876 * @get_et_strings: Ethtool API to get a set of strings to describe stats
2869 * and perhaps other supported types of ethtool data-sets. 2877 * and perhaps other supported types of ethtool data-sets.
2870 * 2878 *
2871 * @get_rssi: Get current signal strength in dBm, the function is optional
2872 * and can sleep.
2873 *
2874 * @mgd_prepare_tx: Prepare for transmitting a management frame for association 2879 * @mgd_prepare_tx: Prepare for transmitting a management frame for association
2875 * before associated. In multi-channel scenarios, a virtual interface is 2880 * before associated. In multi-channel scenarios, a virtual interface is
2876 * bound to a channel before it is associated, but as it isn't associated 2881 * bound to a channel before it is associated, but as it isn't associated
@@ -3071,6 +3076,10 @@ struct ieee80211_ops {
3071 void (*sta_rate_tbl_update)(struct ieee80211_hw *hw, 3076 void (*sta_rate_tbl_update)(struct ieee80211_hw *hw,
3072 struct ieee80211_vif *vif, 3077 struct ieee80211_vif *vif,
3073 struct ieee80211_sta *sta); 3078 struct ieee80211_sta *sta);
3079 void (*sta_statistics)(struct ieee80211_hw *hw,
3080 struct ieee80211_vif *vif,
3081 struct ieee80211_sta *sta,
3082 struct station_info *sinfo);
3074 int (*conf_tx)(struct ieee80211_hw *hw, 3083 int (*conf_tx)(struct ieee80211_hw *hw,
3075 struct ieee80211_vif *vif, u16 ac, 3084 struct ieee80211_vif *vif, u16 ac,
3076 const struct ieee80211_tx_queue_params *params); 3085 const struct ieee80211_tx_queue_params *params);
@@ -3138,8 +3147,6 @@ struct ieee80211_ops {
3138 void (*get_et_strings)(struct ieee80211_hw *hw, 3147 void (*get_et_strings)(struct ieee80211_hw *hw,
3139 struct ieee80211_vif *vif, 3148 struct ieee80211_vif *vif,
3140 u32 sset, u8 *data); 3149 u32 sset, u8 *data);
3141 int (*get_rssi)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
3142 struct ieee80211_sta *sta, s8 *rssi_dbm);
3143 3150
3144 void (*mgd_prepare_tx)(struct ieee80211_hw *hw, 3151 void (*mgd_prepare_tx)(struct ieee80211_hw *hw,
3145 struct ieee80211_vif *vif); 3152 struct ieee80211_vif *vif);