mirror of https://github.com/hak5/openwrt-owl.git
mac80211: disable CCK rates for 802.11n clients on brcmsmac to fix crash issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37839owl
parent
03b1d4289b
commit
9cf157ac75
|
@ -194,6 +194,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -820,6 +828,9 @@ minstrel_ht_update_cck(struct minstrel_p
|
||||||
|
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++) {
|
||||||
--- a/net/mac80211/rx.c
|
--- a/net/mac80211/rx.c
|
||||||
+++ b/net/mac80211/rx.c
|
+++ b/net/mac80211/rx.c
|
||||||
@@ -936,8 +936,14 @@ ieee80211_rx_h_check(struct ieee80211_rx
|
@@ -936,8 +936,14 @@ ieee80211_rx_h_check(struct ieee80211_rx
|
||||||
|
@ -2637,3 +2647,49 @@
|
||||||
ath9k_hw_rxena(ah);
|
ath9k_hw_rxena(ah);
|
||||||
}
|
}
|
||||||
} while (1);
|
} while (1);
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
@@ -802,7 +802,8 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||||
|
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;
|
||||||
|
--- a/drivers/net/wireless/ath/carl9170/main.c
|
||||||
|
+++ b/drivers/net/wireless/ath/carl9170/main.c
|
||||||
|
@@ -1878,7 +1878,8 @@ void *carl9170_alloc(size_t priv_size)
|
||||||
|
IEEE80211_HW_PS_NULLFUNC_STACK |
|
||||||
|
IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC |
|
||||||
|
IEEE80211_HW_SUPPORTS_RC_TABLE |
|
||||||
|
- IEEE80211_HW_SIGNAL_DBM;
|
||||||
|
+ IEEE80211_HW_SIGNAL_DBM |
|
||||||
|
+ IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
|
||||||
|
|
||||||
|
if (!modparam_noht) {
|
||||||
|
/*
|
||||||
|
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
|
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
|
@@ -6133,7 +6133,8 @@ static int rt2800_probe_hw_mode(struct r
|
||||||
|
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
|
||||||
|
--- a/include/net/mac80211.h
|
||||||
|
+++ b/include/net/mac80211.h
|
||||||
|
@@ -1499,6 +1499,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,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -1011,23 +1011,23 @@ static int __init ath9k_init(void)
|
@@ -1012,23 +1012,23 @@ static int __init ath9k_init(void)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/include/net/mac80211.h
|
--- a/include/net/mac80211.h
|
||||||
+++ b/include/net/mac80211.h
|
+++ b/include/net/mac80211.h
|
||||||
@@ -1616,6 +1616,7 @@ struct ieee80211_hw {
|
@@ -1617,6 +1617,7 @@ struct ieee80211_hw {
|
||||||
u8 max_tx_aggregation_subframes;
|
u8 max_tx_aggregation_subframes;
|
||||||
u8 offchannel_tx_hw_queue;
|
u8 offchannel_tx_hw_queue;
|
||||||
u8 radiotap_mcs_details;
|
u8 radiotap_mcs_details;
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
void ath_fill_led_pin(struct ath_softc *sc)
|
void ath_fill_led_pin(struct ath_softc *sc)
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -918,7 +918,7 @@ int ath9k_init_device(u16 devid, struct
|
@@ -919,7 +919,7 @@ int ath9k_init_device(u16 devid, struct
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
/* must be initialized before ieee80211_register_hw */
|
/* must be initialized before ieee80211_register_hw */
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
||||||
{
|
{
|
||||||
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
struct hw_mode_spec *spec = &rt2x00dev->spec;
|
||||||
@@ -6234,7 +6255,6 @@ static int rt2800_probe_hw_mode(struct r
|
@@ -6235,7 +6256,6 @@ static int rt2800_probe_hw_mode(struct r
|
||||||
rt2x00_rf(rt2x00dev, RF3022) ||
|
rt2x00_rf(rt2x00dev, RF3022) ||
|
||||||
rt2x00_rf(rt2x00dev, RF3290) ||
|
rt2x00_rf(rt2x00dev, RF3290) ||
|
||||||
rt2x00_rf(rt2x00dev, RF3320) ||
|
rt2x00_rf(rt2x00dev, RF3320) ||
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
rt2x00_rf(rt2x00dev, RF5360) ||
|
rt2x00_rf(rt2x00dev, RF5360) ||
|
||||||
rt2x00_rf(rt2x00dev, RF5370) ||
|
rt2x00_rf(rt2x00dev, RF5370) ||
|
||||||
rt2x00_rf(rt2x00dev, RF5372) ||
|
rt2x00_rf(rt2x00dev, RF5372) ||
|
||||||
@@ -6242,6 +6262,12 @@ static int rt2800_probe_hw_mode(struct r
|
@@ -6243,6 +6263,12 @@ static int rt2800_probe_hw_mode(struct r
|
||||||
rt2x00_rf(rt2x00dev, RF5392)) {
|
rt2x00_rf(rt2x00dev, RF5392)) {
|
||||||
spec->num_channels = 14;
|
spec->num_channels = 14;
|
||||||
spec->channels = rf_vals_3x;
|
spec->channels = rf_vals_3x;
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
} else if (rt2x00_rf(rt2x00dev, RF3052)) {
|
} else if (rt2x00_rf(rt2x00dev, RF3052)) {
|
||||||
spec->supported_bands |= SUPPORT_BAND_5GHZ;
|
spec->supported_bands |= SUPPORT_BAND_5GHZ;
|
||||||
spec->num_channels = ARRAY_SIZE(rf_vals_3x);
|
spec->num_channels = ARRAY_SIZE(rf_vals_3x);
|
||||||
@@ -6389,6 +6415,19 @@ static int rt2800_probe_rt(struct rt2x00
|
@@ -6390,6 +6416,19 @@ static int rt2800_probe_rt(struct rt2x00
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
|
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
@@ -6418,6 +6457,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
|
@@ -6419,6 +6458,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
|
||||||
rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
|
rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "rt2x00.h"
|
#include "rt2x00.h"
|
||||||
#include "rt2800lib.h"
|
#include "rt2800lib.h"
|
||||||
@@ -6417,13 +6418,14 @@ static int rt2800_probe_rt(struct rt2x00
|
@@ -6418,13 +6419,14 @@ static int rt2800_probe_rt(struct rt2x00
|
||||||
|
|
||||||
int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
|
int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
case RF5360:
|
case RF5360:
|
||||||
case RF5370:
|
case RF5370:
|
||||||
case RF5372:
|
case RF5372:
|
||||||
@@ -6263,7 +6376,8 @@ static int rt2800_probe_hw_mode(struct r
|
@@ -6264,7 +6377,8 @@ static int rt2800_probe_hw_mode(struct r
|
||||||
rt2x00_rf(rt2x00dev, RF5392)) {
|
rt2x00_rf(rt2x00dev, RF5392)) {
|
||||||
spec->num_channels = 14;
|
spec->num_channels = 14;
|
||||||
spec->channels = rf_vals_3x;
|
spec->channels = rf_vals_3x;
|
||||||
|
@ -252,7 +252,7 @@
|
||||||
spec->num_channels = 14;
|
spec->num_channels = 14;
|
||||||
if (spec->clk_is_20mhz)
|
if (spec->clk_is_20mhz)
|
||||||
spec->channels = rf_vals_xtal20mhz_3x;
|
spec->channels = rf_vals_xtal20mhz_3x;
|
||||||
@@ -6364,6 +6478,7 @@ static int rt2800_probe_hw_mode(struct r
|
@@ -6365,6 +6479,7 @@ static int rt2800_probe_hw_mode(struct r
|
||||||
case RF3320:
|
case RF3320:
|
||||||
case RF3052:
|
case RF3052:
|
||||||
case RF3290:
|
case RF3290:
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
case RF5360:
|
case RF5360:
|
||||||
case RF5370:
|
case RF5370:
|
||||||
case RF5372:
|
case RF5372:
|
||||||
@@ -6401,6 +6516,7 @@ static int rt2800_probe_rt(struct rt2x00
|
@@ -6402,6 +6517,7 @@ static int rt2800_probe_rt(struct rt2x00
|
||||||
case RT3352:
|
case RT3352:
|
||||||
case RT3390:
|
case RT3390:
|
||||||
case RT3572:
|
case RT3572:
|
||||||
|
|
Loading…
Reference in New Issue