On 2015-03-17 18:29, Thomas Huehn wrote:
> This patch adds the new statistic "maximum possible lossless
> throughput" to Minstrels and Minstrel-HTs rc_stats (in debugfs). This
> enables comprehensive comparison between current per-rate throughput
> and max. achievable per-rate throughput.
> 
> Signed-off-by: Thomas Huehn <[email protected]>
> ---
>  net/mac80211/rc80211_minstrel.c            | 10 ++++
>  net/mac80211/rc80211_minstrel.h            |  1 +
>  net/mac80211/rc80211_minstrel_debugfs.c    | 18 ++++---
>  net/mac80211/rc80211_minstrel_ht.c         | 84 
> ++++++++++++++++--------------
>  net/mac80211/rc80211_minstrel_ht.h         |  4 +-
>  net/mac80211/rc80211_minstrel_ht_debugfs.c | 24 +++++----
>  6 files changed, 83 insertions(+), 58 deletions(-)
> 
> diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
> index d985227..c2afe51 100644
> --- a/net/mac80211/rc80211_minstrel.c
> +++ b/net/mac80211/rc80211_minstrel.c
> @@ -85,6 +85,16 @@ int minstrel_get_tp_avg(struct minstrel_rate *mr)
>               return MINSTREL_TRUNC(mr->stats.prob_ewma * (100000 / usecs));
>  }
>  
> +/* return max. potential lossless throughput */
> +inline int
> +minstrel_get_tp_max(struct minstrel_rate *mr)
> +{
> +     if (!mr->perfect_tx_time)
> +             return 0;
> +
> +     return 100000 / mr->perfect_tx_time;
> +}
> +
>  /* find & sort topmost throughput rates */
>  static inline void
>  minstrel_sort_best_tp_rates(struct minstrel_sta_info *mi, int i, u8 *tp_list)
How about merging it with the _avg function, like in minstrel_ht.

> diff --git a/net/mac80211/rc80211_minstrel_ht.h 
> b/net/mac80211/rc80211_minstrel_ht.h
> index 68dce4f..850d352 100644
> --- a/net/mac80211/rc80211_minstrel_ht.h
> +++ b/net/mac80211/rc80211_minstrel_ht.h
> @@ -121,6 +121,8 @@ struct minstrel_ht_sta_priv {
>  
>  void minstrel_ht_add_sta_debugfs(void *priv, void *priv_sta, struct dentry 
> *dir);
>  void minstrel_ht_remove_sta_debugfs(void *priv, void *priv_sta);
> -int minstrel_ht_get_tp_avg(struct minstrel_ht_sta *mi, int group, int rate);
> +int minstrel_ht_get_tp_avg(struct minstrel_ht_sta *mi, int group, int rate,
> +                        int prob_ewma);
> +int minstrel_ht_get_tp_max(struct minstrel_ht_sta *mi, int group, int rate);
Nonexistant function declaration, please remove it.

- Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to