Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369598
b: refs/heads/master
c: c2eb5b0
h: refs/heads/master
v: v3
  • Loading branch information
Karl Beldan authored and Johannes Berg committed Apr 22, 2013
1 parent e0e3fa3 commit 8b36797
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06f95e66deca680ff73076914b6ee47bcbe94926
refs/heads/master: c2eb5b0f342c9b1c2e1d77680af71940fc997779
21 changes: 15 additions & 6 deletions trunk/net/mac80211/rc80211_minstrel_ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
struct minstrel_rate_stats *mr;
int cur_prob, cur_prob_tp, cur_tp, cur_tp2;
int group, i, index;
bool mi_rates_valid = false;

if (mi->ampdu_packets > 0) {
mi->avg_ampdu_len = minstrel_ewma(mi->avg_ampdu_len,
Expand All @@ -254,11 +255,10 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)

mi->sample_slow = 0;
mi->sample_count = 0;
mi->max_tp_rate = 0;
mi->max_tp_rate2 = 0;
mi->max_prob_rate = 0;

for (group = 0; group < ARRAY_SIZE(minstrel_mcs_groups); group++) {
bool mg_rates_valid = false;

cur_prob = 0;
cur_prob_tp = 0;
cur_tp = 0;
Expand All @@ -268,15 +268,24 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
if (!mg->supported)
continue;

mg->max_tp_rate = 0;
mg->max_tp_rate2 = 0;
mg->max_prob_rate = 0;
mi->sample_count++;

for (i = 0; i < MCS_GROUP_RATES; i++) {
if (!(mg->supported & BIT(i)))
continue;

/* initialize rates selections starting indexes */
if (!mg_rates_valid) {
mg->max_tp_rate = mg->max_tp_rate2 =
mg->max_prob_rate = i;
if (!mi_rates_valid) {
mi->max_tp_rate = mi->max_tp_rate2 =
mi->max_prob_rate = i;
mi_rates_valid = true;
}
mg_rates_valid = true;
}

mr = &mg->rates[i];
mr->retry_updated = false;
index = MCS_GROUP_RATES * group + i;
Expand Down

0 comments on commit 8b36797

Please sign in to comment.