mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 02:44:37 +08:00
92 lines
3.4 KiB
Diff
92 lines
3.4 KiB
Diff
From 9ddc34b565615be1ffd267ffd8c826d9ef097179 Mon Sep 17 00:00:00 2001
|
|
From: Felix Fietkau <nbd@openwrt.org>
|
|
Date: Tue, 20 Aug 2013 17:43:54 +0000
|
|
Subject: mac80211: add a flag to indicate CCK support for HT clients
|
|
|
|
commit 2dfca312a91631311c1cf7c090246cc8103de038 upstream.
|
|
|
|
brcm80211 cannot handle sending frames with CCK rates as part of an
|
|
A-MPDU session. Other drivers may have issues too. Set the flag in all
|
|
drivers that have been tested with CCK rates.
|
|
|
|
This fixes a reported brcmsmac regression introduced in
|
|
commit ef47a5e4f1aaf1d0e2e6875e34b2c9595897bef6
|
|
"mac80211/minstrel_ht: fix cck rate sampling"
|
|
|
|
Reported-by: Tom Gundersen <teg@jklm.no>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
---
|
|
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
|
|
index 2ba4945..bd126c2 100644
|
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
|
@@ -767,7 +767,8 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
|
IEEE80211_HW_PS_NULLFUNC_STACK |
|
|
IEEE80211_HW_SPECTRUM_MGMT |
|
|
IEEE80211_HW_REPORTS_TX_ACK_STATUS |
|
|
- IEEE80211_HW_SUPPORTS_RC_TABLE;
|
|
+ IEEE80211_HW_SUPPORTS_RC_TABLE |
|
|
+ IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
|
|
|
|
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
|
|
hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
|
|
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
|
|
index e9010a4..0686375 100644
|
|
--- a/drivers/net/wireless/ath/carl9170/main.c
|
|
+++ b/drivers/net/wireless/ath/carl9170/main.c
|
|
@@ -1857,7 +1857,8 @@ void *carl9170_alloc(size_t priv_size)
|
|
IEEE80211_HW_SUPPORTS_PS |
|
|
IEEE80211_HW_PS_NULLFUNC_STACK |
|
|
IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC |
|
|
- IEEE80211_HW_SIGNAL_DBM;
|
|
+ IEEE80211_HW_SIGNAL_DBM |
|
|
+ IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
|
|
|
|
if (!modparam_noht) {
|
|
/*
|
|
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
|
|
index 705aa33..7e66a90 100644
|
|
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
|
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
|
@@ -5912,7 +5912,8 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
|
IEEE80211_HW_SUPPORTS_PS |
|
|
IEEE80211_HW_PS_NULLFUNC_STACK |
|
|
IEEE80211_HW_AMPDU_AGGREGATION |
|
|
- IEEE80211_HW_REPORTS_TX_ACK_STATUS;
|
|
+ IEEE80211_HW_REPORTS_TX_ACK_STATUS |
|
|
+ IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
|
|
|
|
/*
|
|
* Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices
|
|
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
|
|
index 885898a..4e50d36 100644
|
|
--- a/include/net/mac80211.h
|
|
+++ b/include/net/mac80211.h
|
|
@@ -1484,6 +1484,7 @@ enum ieee80211_hw_flags {
|
|
IEEE80211_HW_SUPPORTS_RC_TABLE = 1<<24,
|
|
IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25,
|
|
IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26,
|
|
+ IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27,
|
|
};
|
|
|
|
/**
|
|
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
|
|
index f5aed96..f3bbea1 100644
|
|
--- a/net/mac80211/rc80211_minstrel_ht.c
|
|
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
|
@@ -828,6 +828,9 @@ minstrel_ht_update_cck(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
|
|
if (sband->band != IEEE80211_BAND_2GHZ)
|
|
return;
|
|
|
|
+ if (!(mp->hw->flags & IEEE80211_HW_SUPPORTS_HT_CCK_RATES))
|
|
+ return;
|
|
+
|
|
mi->cck_supported = 0;
|
|
mi->cck_supported_short = 0;
|
|
for (i = 0; i < 4; i++) {
|
|
--
|
|
cgit v0.9.2
|