#include <linux/netdevice.h>#include <linux/types.h>#include <linux/skbuff.h>#include <linux/debugfs.h>#include <linux/random.h>#include <linux/ieee80211.h>#include <net/mac80211.h>#include "rate.h"#include "rc80211_minstrel.h"#include "rc80211_minstrel_ht.h"
Go to the source code of this file.
Defines | |
| #define | AVG_PKT_SIZE 1200 |
| #define | EWMA_LEVEL 75 |
| #define | GROUP_IDX(_streams, _sgi, _ht40) |
| #define | MCS_DURATION(streams, sgi, bps) MCS_SYMBOL_TIME(sgi, MCS_NSYMS((streams) * (bps))) |
| #define | MCS_GROUP(_streams, _sgi, _ht40) |
| #define | MCS_NBITS (AVG_PKT_SIZE << 3) |
| #define | MCS_NSYMS(bps) ((MCS_NBITS + (bps) - 1) / (bps)) |
| #define | MCS_SYMBOL_TIME(sgi, syms) |
| #define | SAMPLE_COLUMNS 10 |
Functions | |
| static void | init_sample_table (void) |
| static void | minstrel_aggr_check (struct ieee80211_sta *pubsta, struct sk_buff *skb) |
| static void | minstrel_calc_rate_ewma (struct minstrel_rate_stats *mr) |
| static void | minstrel_calc_retransmit (struct minstrel_priv *mp, struct minstrel_ht_sta *mi, int index) |
| static void | minstrel_downgrade_rate (struct minstrel_ht_sta *mi, unsigned int *idx, bool primary) |
| static int | minstrel_ewma (int old, int new, int weight) |
| static int | minstrel_get_duration (int index) |
| static struct minstrel_rate_stats * | minstrel_get_ratestats (struct minstrel_ht_sta *mi, int index) |
| static int | minstrel_get_sample_rate (struct minstrel_priv *mp, struct minstrel_ht_sta *mi) |
| static void * | minstrel_ht_alloc (struct ieee80211_hw *hw, struct dentry *debugfsdir) |
| static void * | minstrel_ht_alloc_sta (void *priv, struct ieee80211_sta *sta, gfp_t gfp) |
| static void | minstrel_ht_calc_tp (struct minstrel_ht_sta *mi, int group, int rate) |
| static void | minstrel_ht_free (void *priv) |
| static void | minstrel_ht_free_sta (void *priv, struct ieee80211_sta *sta, void *priv_sta) |
| static int | minstrel_ht_get_group_idx (struct ieee80211_tx_rate *rate) |
| static void | minstrel_ht_get_rate (void *priv, struct ieee80211_sta *sta, void *priv_sta, struct ieee80211_tx_rate_control *txrc) |
| static void | minstrel_ht_rate_init (void *priv, struct ieee80211_supported_band *sband, struct ieee80211_sta *sta, void *priv_sta) |
| static void | minstrel_ht_rate_update (void *priv, struct ieee80211_supported_band *sband, struct ieee80211_sta *sta, void *priv_sta, u32 changed) |
| static void | minstrel_ht_set_rate (struct minstrel_priv *mp, struct minstrel_ht_sta *mi, struct ieee80211_tx_rate *rate, int index, bool sample, bool rtscts) |
| static void | minstrel_ht_tx_status (void *priv, struct ieee80211_supported_band *sband, struct ieee80211_sta *sta, void *priv_sta, struct sk_buff *skb) |
| static bool | minstrel_ht_txstat_valid (struct ieee80211_tx_rate *rate) |
| static void | minstrel_ht_update_caps (void *priv, struct ieee80211_supported_band *sband, struct ieee80211_sta *sta, void *priv_sta) |
| static void | minstrel_ht_update_stats (struct minstrel_priv *mp, struct minstrel_ht_sta *mi) |
| static void | minstrel_next_sample_idx (struct minstrel_ht_sta *mi) |
| void | rc80211_minstrel_ht_exit (void) |
| int __init | rc80211_minstrel_ht_init (void) |
Variables | |
| static struct rate_control_ops | mac80211_minstrel_ht |
| struct mcs_group | minstrel_mcs_groups [] |
| static u8 | sample_table [SAMPLE_COLUMNS][MCS_GROUP_RATES] |
| #define AVG_PKT_SIZE 1200 |
Definition at line 19 of file kernel-3.5/rc80211_minstrel_ht.c.
| #define EWMA_LEVEL 75 |
Definition at line 21 of file kernel-3.5/rc80211_minstrel_ht.c.
| #define GROUP_IDX | ( | _streams, | |
| _sgi, | |||
| _ht40 | |||
| ) |
MINSTREL_MAX_STREAMS * 2 * _ht40 + \ MINSTREL_MAX_STREAMS * _sgi + \ _streams - 1
Definition at line 42 of file kernel-3.5/rc80211_minstrel_ht.c.
| #define MCS_DURATION | ( | streams, | |
| sgi, | |||
| bps | |||
| ) | MCS_SYMBOL_TIME(sgi, MCS_NSYMS((streams) * (bps))) |
Definition at line 37 of file kernel-3.5/rc80211_minstrel_ht.c.
| #define MCS_GROUP | ( | _streams, | |
| _sgi, | |||
| _ht40 | |||
| ) |
[GROUP_IDX(_streams, _sgi, _ht40)] = { \ .streams = _streams, \ .flags = \ (_sgi ? IEEE80211_TX_RC_SHORT_GI : 0) | \ (_ht40 ? IEEE80211_TX_RC_40_MHZ_WIDTH : 0), \ .duration = { \ MCS_DURATION(_streams, _sgi, _ht40 ? 54 : 26), \ MCS_DURATION(_streams, _sgi, _ht40 ? 108 : 52), \ MCS_DURATION(_streams, _sgi, _ht40 ? 162 : 78), \ MCS_DURATION(_streams, _sgi, _ht40 ? 216 : 104), \ MCS_DURATION(_streams, _sgi, _ht40 ? 324 : 156), \ MCS_DURATION(_streams, _sgi, _ht40 ? 432 : 208), \ MCS_DURATION(_streams, _sgi, _ht40 ? 486 : 234), \ MCS_DURATION(_streams, _sgi, _ht40 ? 540 : 260) \ } \ }
Definition at line 48 of file kernel-3.5/rc80211_minstrel_ht.c.
| #define MCS_NBITS (AVG_PKT_SIZE << 3) |
Definition at line 24 of file kernel-3.5/rc80211_minstrel_ht.c.
Definition at line 27 of file kernel-3.5/rc80211_minstrel_ht.c.
| #define MCS_SYMBOL_TIME | ( | sgi, | |
| syms | |||
| ) |
(sgi ? \
((syms) * 18 + 4) / 5 : /* syms * 3.6 us */ \
(syms) << 2 /* syms * 4 us */ \
)
Definition at line 30 of file kernel-3.5/rc80211_minstrel_ht.c.
| #define SAMPLE_COLUMNS 10 |
Definition at line 20 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void init_sample_table | ( | void | ) | [static] |
Definition at line 873 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_aggr_check | ( | struct ieee80211_sta * | pubsta, |
| struct sk_buff * | skb | ||
| ) | [static] |
Definition at line 359 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_calc_rate_ewma | ( | struct minstrel_rate_stats * | mr | ) | [static] |
Definition at line 133 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_calc_retransmit | ( | struct minstrel_priv * | mp, |
| struct minstrel_ht_sta * | mi, | ||
| int | index | ||
| ) | [static] |
Definition at line 462 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_downgrade_rate | ( | struct minstrel_ht_sta * | mi, |
| unsigned int * | idx, | ||
| bool | primary | ||
| ) | [static] |
Definition at line 334 of file kernel-3.5/rc80211_minstrel_ht.c.
| static int minstrel_ewma | ( | int | old, |
| int | new, | ||
| int | weight | ||
| ) | [static] |
Definition at line 106 of file kernel-3.5/rc80211_minstrel_ht.c.
| static int minstrel_get_duration | ( | int | index | ) | [inline, static] |
Definition at line 542 of file kernel-3.5/rc80211_minstrel_ht.c.
| static struct minstrel_rate_stats* minstrel_get_ratestats | ( | struct minstrel_ht_sta * | mi, |
| int | index | ||
| ) | [static, read] |
Definition at line 123 of file kernel-3.5/rc80211_minstrel_ht.c.
| static int minstrel_get_sample_rate | ( | struct minstrel_priv * | mp, |
| struct minstrel_ht_sta * | mi | ||
| ) | [static] |
Definition at line 549 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void* minstrel_ht_alloc | ( | struct ieee80211_hw * | hw, |
| struct dentry * | debugfsdir | ||
| ) | [static] |
Definition at line 844 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void* minstrel_ht_alloc_sta | ( | void * | priv, |
| struct ieee80211_sta * | sta, | ||
| gfp_t | gfp | ||
| ) | [static] |
Definition at line 797 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_calc_tp | ( | struct minstrel_ht_sta * | mi, |
| int | group, | ||
| int | rate | ||
| ) | [static] |
Definition at line 159 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_free | ( | void * | priv | ) | [static] |
Definition at line 850 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_free_sta | ( | void * | priv, |
| struct ieee80211_sta * | sta, | ||
| void * | priv_sta | ||
| ) | [static] |
Definition at line 834 of file kernel-3.5/rc80211_minstrel_ht.c.
| static int minstrel_ht_get_group_idx | ( | struct ieee80211_tx_rate * | rate | ) | [static] |
Definition at line 115 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_get_rate | ( | void * | priv, |
| struct ieee80211_sta * | sta, | ||
| void * | priv_sta, | ||
| struct ieee80211_tx_rate_control * | txrc | ||
| ) | [static] |
Definition at line 601 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_rate_init | ( | void * | priv, |
| struct ieee80211_supported_band * | sband, | ||
| struct ieee80211_sta * | sta, | ||
| void * | priv_sta | ||
| ) | [static] |
Definition at line 782 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_rate_update | ( | void * | priv, |
| struct ieee80211_supported_band * | sband, | ||
| struct ieee80211_sta * | sta, | ||
| void * | priv_sta, | ||
| u32 | changed | ||
| ) | [static] |
Definition at line 789 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_set_rate | ( | struct minstrel_priv * | mp, |
| struct minstrel_ht_sta * | mi, | ||
| struct ieee80211_tx_rate * | rate, | ||
| int | index, | ||
| bool | sample, | ||
| bool | rtscts | ||
| ) | [static] |
Definition at line 515 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_tx_status | ( | void * | priv, |
| struct ieee80211_supported_band * | sband, | ||
| struct ieee80211_sta * | sta, | ||
| void * | priv_sta, | ||
| struct sk_buff * | skb | ||
| ) | [static] |
Definition at line 382 of file kernel-3.5/rc80211_minstrel_ht.c.
| static bool minstrel_ht_txstat_valid | ( | struct ieee80211_tx_rate * | rate | ) | [static] |
Definition at line 300 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_update_caps | ( | void * | priv, |
| struct ieee80211_supported_band * | sband, | ||
| struct ieee80211_sta * | sta, | ||
| void * | priv_sta | ||
| ) | [static] |
Definition at line 688 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_ht_update_stats | ( | struct minstrel_priv * | mp, |
| struct minstrel_ht_sta * | mi | ||
| ) | [static] |
Definition at line 186 of file kernel-3.5/rc80211_minstrel_ht.c.
| static void minstrel_next_sample_idx | ( | struct minstrel_ht_sta * | mi | ) | [static] |
Definition at line 312 of file kernel-3.5/rc80211_minstrel_ht.c.
| void rc80211_minstrel_ht_exit | ( | void | ) |
Definition at line 900 of file kernel-3.5/rc80211_minstrel_ht.c.
| int __init rc80211_minstrel_ht_init | ( | void | ) |
Definition at line 893 of file kernel-3.5/rc80211_minstrel_ht.c.
struct rate_control_ops mac80211_minstrel_ht [static] |
{
.name = "minstrel_ht",
.tx_status = minstrel_ht_tx_status,
.get_rate = minstrel_ht_get_rate,
.rate_init = minstrel_ht_rate_init,
.rate_update = minstrel_ht_rate_update,
.alloc_sta = minstrel_ht_alloc_sta,
.free_sta = minstrel_ht_free_sta,
.alloc = minstrel_ht_alloc,
.free = minstrel_ht_free,
}
Definition at line 855 of file kernel-3.5/rc80211_minstrel_ht.c.
| struct mcs_group minstrel_mcs_groups[] |
{
MCS_GROUP(1, 0, 0),
MCS_GROUP(2, 0, 0),
MCS_GROUP(3, 0, 0),
MCS_GROUP(1, 1, 0),
MCS_GROUP(2, 1, 0),
MCS_GROUP(3, 1, 0),
MCS_GROUP(1, 0, 1),
MCS_GROUP(2, 0, 1),
MCS_GROUP(3, 0, 1),
MCS_GROUP(1, 1, 1),
MCS_GROUP(2, 1, 1),
MCS_GROUP(3, 1, 1),
}
Definition at line 74 of file kernel-3.5/rc80211_minstrel_ht.c.
u8 sample_table[SAMPLE_COLUMNS][MCS_GROUP_RATES] [static] |
Definition at line 100 of file kernel-3.5/rc80211_minstrel_ht.c.