From: Greg Kroah-Hartman Date: Wed, 16 Nov 2011 23:05:55 +0000 (-0800) Subject: 3.1 patches X-Git-Tag: v3.0.10~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e850eb2d1ed0b65038a02d7d6055a31618d86863;p=thirdparty%2Fkernel%2Fstable-queue.git 3.1 patches added patches: staging-brcm80211-fill-in-proper-rx-rate-in-mac80211-rx-status.patch --- diff --git a/queue-3.1/series b/queue-3.1/series index 72421e0d9b6..dec23deaa57 100644 --- a/queue-3.1/series +++ b/queue-3.1/series @@ -14,3 +14,4 @@ hfs-add-sanity-check-for-file-name-length.patch revert-leds-save-the-delay-values-after-a-successful-call-to-blink_set.patch drm-radeon-add-some-missing-firemv-pci-ids.patch drm-radeon-kms-fix-up-gpio-i2c-mask-bits-for-r4xx.patch +staging-brcm80211-fill-in-proper-rx-rate-in-mac80211-rx-status.patch diff --git a/queue-3.1/staging-brcm80211-fill-in-proper-rx-rate-in-mac80211-rx-status.patch b/queue-3.1/staging-brcm80211-fill-in-proper-rx-rate-in-mac80211-rx-status.patch new file mode 100644 index 00000000000..659bc1af2a8 --- /dev/null +++ b/queue-3.1/staging-brcm80211-fill-in-proper-rx-rate-in-mac80211-rx-status.patch @@ -0,0 +1,82 @@ +From 5a84d6ad4c9306afb467a600a4c6d7b50da49440 Mon Sep 17 00:00:00 2001 +From: Arend van Spriel +Date: Tue, 23 Aug 2011 14:14:00 +0200 +Subject: staging: brcm80211: fill in proper rx rate in mac80211 rx status + +From: Arend van Spriel + +commit 5a84d6ad4c9306afb467a600a4c6d7b50da49440 upstream. + +The brcmsmac driver supports different rates on 5GHz but this is not +taken into account when providing the rate index in the receive +status information passed to mac80211. + +Reviewed-by: Roland Vossen +Reviewed-by: Pieter-Paul Giesberts +Reviewed-by: Henry Ptasinski +Signed-off-by: Arend van Spriel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/brcm80211/brcmsmac/mac80211_if.c | 9 +++++++-- + drivers/staging/brcm80211/brcmsmac/mac80211_if.h | 6 ++++++ + drivers/staging/brcm80211/brcmsmac/main.c | 8 ++++++++ + 3 files changed, 21 insertions(+), 2 deletions(-) + +--- a/drivers/staging/brcm80211/brcmsmac/mac80211_if.c ++++ b/drivers/staging/brcm80211/brcmsmac/mac80211_if.c +@@ -975,6 +975,10 @@ static struct ieee80211_channel brcms_5g + .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), +@@ -1016,8 +1020,9 @@ static struct ieee80211_supported_band b + .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 = { + /* use IEEE80211_HT_CAP_* from include/linux/ieee80211.h */ + .cap = IEEE80211_HT_CAP_GRN_FLD | IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_40MHZ_INTOLERANT, /* No 40 mhz yet */ +--- a/drivers/staging/brcm80211/brcmsmac/mac80211_if.h ++++ b/drivers/staging/brcm80211/brcmsmac/mac80211_if.h +@@ -20,6 +20,12 @@ + #include + #include + ++/* ++ * 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 + +--- a/drivers/staging/brcm80211/brcmsmac/main.c ++++ b/drivers/staging/brcm80211/brcmsmac/main.c +@@ -4608,6 +4608,14 @@ prep_mac80211_status(struct brcms_c_info + 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)) {