Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267506
b: refs/heads/master
c: 5a84d6a
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 6a47f9f commit f13ab7b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 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: c13d2ad0599a73d87871c5a2b4468e8cbd4bf369
refs/heads/master: 5a84d6ad4c9306afb467a600a4c6d7b50da49440
9 changes: 7 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,10 @@ static struct ieee80211_channel brcms_5ghz_nphy_chantable[] = {
.hw_value = (rate100m / 5), \
}

/*
* The rate table is used for both 2.4G and 5G rates. The
* latter being a subset as it does not support CCK rates.
*/
static struct ieee80211_rate legacy_ratetable[] = {
RATE(10, 0),
RATE(20, IEEE80211_RATE_SHORT_PREAMBLE),
Expand Down Expand Up @@ -1012,8 +1016,9 @@ static struct ieee80211_supported_band brcms_band_5GHz_nphy = {
.band = IEEE80211_BAND_5GHZ,
.channels = brcms_5ghz_nphy_chantable,
.n_channels = ARRAY_SIZE(brcms_5ghz_nphy_chantable),
.bitrates = legacy_ratetable + 4,
.n_bitrates = ARRAY_SIZE(legacy_ratetable) - 4,
.bitrates = legacy_ratetable + BRCMS_LEGACY_5G_RATE_OFFSET,
.n_bitrates = ARRAY_SIZE(legacy_ratetable) -
BRCMS_LEGACY_5G_RATE_OFFSET,
.ht_cap = {
.cap = IEEE80211_HT_CAP_GRN_FLD | IEEE80211_HT_CAP_SGI_20 |
IEEE80211_HT_CAP_SGI_40 |
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/staging/brcm80211/brcmsmac/mac80211_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
#include <linux/timer.h>
#include <linux/interrupt.h>

/*
* Starting index for 5G rates in the
* legacy rate table.
*/
#define BRCMS_LEGACY_5G_RATE_OFFSET 4

/* softmac ioctl definitions */
#define BRCMS_SET_SHORTSLOT_OVERRIDE 146

Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/staging/brcm80211/brcmsmac/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8252,6 +8252,14 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh,
wiphy_err(wlc->wiphy, "%s: Unknown rate\n", __func__);
}

/*
* For 5GHz, we should decrease the index as it is
* a subset of the 2.4G rates. See bitrates field
* of brcms_band_5GHz_nphy (in mac80211_if.c).
*/
if (rx_status->band == IEEE80211_BAND_5GHZ)
rx_status->rate_idx -= BRCMS_LEGACY_5G_RATE_OFFSET;

/* Determine short preamble and rate_idx */
preamble = 0;
if (IS_CCK(rspec)) {
Expand Down

0 comments on commit f13ab7b

Please sign in to comment.