Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243692
b: refs/heads/master
c: 4dc217d
h: refs/heads/master
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Mar 28, 2011
1 parent 09668ce commit bcc65e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 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: b77dcf8460ae57d4eb9fd3633eb4f97b8fb20716
refs/heads/master: 4dc217df68a17a57f8464c74c1b4785e40bddf77
25 changes: 18 additions & 7 deletions trunk/net/mac80211/rc80211_minstrel_ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,18 +659,14 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
struct ieee80211_local *local = hw_to_local(mp->hw);
u16 sta_cap = sta->ht_cap.cap;
int n_supported = 0;
int ack_dur;
int stbc;
int i;

/* fall back to the old minstrel for legacy stations */
if (!sta->ht_cap.ht_supported) {
msp->is_ht = false;
memset(&msp->legacy, 0, sizeof(msp->legacy));
msp->legacy.r = msp->ratelist;
msp->legacy.sample_table = msp->sample_table;
return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
}
if (!sta->ht_cap.ht_supported)
goto use_legacy;

BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) !=
MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS);
Expand Down Expand Up @@ -725,7 +721,22 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,

mi->groups[i].supported =
mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];

if (mi->groups[i].supported)
n_supported++;
}

if (!n_supported)
goto use_legacy;

return;

use_legacy:
msp->is_ht = false;
memset(&msp->legacy, 0, sizeof(msp->legacy));
msp->legacy.r = msp->ratelist;
msp->legacy.sample_table = msp->sample_table;
return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy);
}

static void
Expand Down

0 comments on commit bcc65e5

Please sign in to comment.