mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
Merge commit 'openwrt-backfire/master' into xburst
Conflicts: package/mac80211/patches/120-compat_rcu_dereference.patch package/mac80211/patches/130-tracepoint_include_linux_version_h.patch target/linux/x86/Makefile
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -269,8 +269,8 @@ endif
|
||||
@@ -256,8 +256,8 @@ endif
|
||||
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
ifeq ($(CONFIG_MAC80211),y)
|
||||
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
|
||||
@@ -492,8 +492,8 @@ endif
|
||||
@@ -481,8 +481,8 @@ endif
|
||||
# We need the backported rfkill module on kernel < 2.6.31.
|
||||
# In more recent kernel versions use the in kernel rfkill module.
|
||||
ifdef CONFIG_COMPAT_KERNEL_31
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -299,10 +299,10 @@ endif
|
||||
@@ -286,10 +286,10 @@ endif
|
||||
CONFIG_MWL8K=m
|
||||
|
||||
# Ethernet drivers go here
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
CONFIG_HERMES=m
|
||||
CONFIG_HERMES_CACHE_FW_ON_INIT=y
|
||||
@@ -355,10 +355,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
@@ -342,10 +342,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
||||
CONFIG_USB_NET_COMPAT_CDCETHER=n
|
||||
else
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
CONFIG_SSB=m
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
@@ -194,7 +194,7 @@ CONFIG_B43=m
|
||||
@@ -181,7 +181,7 @@ CONFIG_B43=m
|
||||
CONFIG_B43_HWRNG=y
|
||||
CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifneq ($(CONFIG_PCMCIA),)
|
||||
@@ -18,7 +18,7 @@
|
||||
endif
|
||||
CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
@@ -246,7 +246,7 @@ CONFIG_SSB_BLOCKIO=y
|
||||
@@ -233,7 +233,7 @@ CONFIG_SSB_BLOCKIO=y
|
||||
CONFIG_SSB_PCIHOST=y
|
||||
CONFIG_SSB_B43_PCI_BRIDGE=y
|
||||
ifneq ($(CONFIG_PCMCIA),)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -407,8 +407,8 @@ endif # end of SPI driver list
|
||||
@@ -396,8 +396,8 @@ endif # end of SPI driver list
|
||||
|
||||
ifneq ($(CONFIG_MMC),)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -198,7 +198,7 @@ ifneq ($(CONFIG_PCMCIA),)
|
||||
@@ -185,7 +185,7 @@ ifneq ($(CONFIG_PCMCIA),)
|
||||
endif
|
||||
CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
commit b7d48ccc687c44213121b1b565dccdc4488f5d9a
|
||||
Author: Pavel Roskin <proski@gnu.org>
|
||||
Date: Wed Mar 24 17:23:37 2010 -0400
|
||||
|
||||
compat: add compat-2.6.35.h and IW_HANDLER
|
||||
|
||||
Signed-off-by: Pavel Roskin <proski@gnu.org>
|
||||
|
||||
--- /dev/null
|
||||
+++ b/include/linux/compat-2.6.35.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+#ifndef LINUX_26_35_COMPAT_H
|
||||
+#define LINUX_26_35_COMPAT_H
|
||||
+
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
|
||||
+
|
||||
+#define IW_HANDLER(id, func) \
|
||||
+ [IW_IOCTL_IDX(id)] = func
|
||||
+
|
||||
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) */
|
||||
+
|
||||
+#endif /* LINUX_26_35_COMPAT_H */
|
||||
--- a/include/linux/compat-2.6.h
|
||||
+++ b/include/linux/compat-2.6.h
|
||||
@@ -27,5 +27,6 @@
|
||||
#include <linux/compat-2.6.32.h>
|
||||
#include <linux/compat-2.6.33.h>
|
||||
#include <linux/compat-2.6.34.h>
|
||||
+#include <linux/compat-2.6.35.h>
|
||||
|
||||
#endif /* LINUX_26_COMPAT_H */
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -276,12 +276,12 @@ CONFIG_RTL8180=m
|
||||
@@ -248,12 +248,12 @@ CONFIG_RTL8180=m
|
||||
|
||||
CONFIG_ADM8211=m
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# CONFIG_RT2800PCI_RT30XX=y
|
||||
# CONFIG_RT2800PCI_RT35XX=y
|
||||
# CONFIG_RT2800PCI_SOC=y
|
||||
@@ -381,7 +381,7 @@ CONFIG_RT2800USB=m
|
||||
@@ -355,7 +355,7 @@ CONFIG_RT2800USB=m
|
||||
# CONFIG_RT2800USB_RT35XX=y
|
||||
# CONFIG_RT2800USB_UNKNOWN=y
|
||||
endif
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/include/linux/compat-2.6.34.h
|
||||
+++ b/include/linux/compat-2.6.34.h
|
||||
@@ -164,6 +164,8 @@ static inline void device_unlock(struct
|
||||
|
||||
#define rcu_dereference_check(p, c) rcu_dereference(p)
|
||||
@@ -197,6 +197,8 @@ do { \
|
||||
*/
|
||||
#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr)
|
||||
|
||||
+#define rcu_dereference_check(p, c) rcu_dereference(p)
|
||||
+
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/include/linux/tracepoint.h
|
||||
+++ b/include/linux/tracepoint.h
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef _COMPAT_LINUX_TRACEPOINT_H
|
||||
#define _COMPAT_LINUX_TRACEPOINT_H 1
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
From 181ce6f71d907f42ab73376ce154015a835a6d8a Mon Sep 17 00:00:00 2001
|
||||
From: Javier Cardona <javier@cozybit.com>
|
||||
Date: Mon, 29 Mar 2010 11:00:20 -0700
|
||||
Subject: [PATCH] mac80211: Handle mesh action frames in ieee80211_rx_h_action
|
||||
|
||||
This fixes the problem introduced in commit
|
||||
8404080568613d93ad7cf0a16dfb68 which broke mesh peer link establishment.
|
||||
|
||||
changes:
|
||||
v2 Added missing break (Johannes)
|
||||
v3 Broke original patch into two (Johannes)
|
||||
|
||||
Signed-off-by: Javier Cardona <javier@cozybit.com>
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
net/mac80211/mesh.c | 3 ---
|
||||
net/mac80211/rx.c | 5 +++++
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/net/mac80211/mesh.c
|
||||
+++ b/net/mac80211/mesh.c
|
||||
@@ -749,9 +749,6 @@ ieee80211_mesh_rx_mgmt(struct ieee80211_
|
||||
|
||||
switch (fc & IEEE80211_FCTL_STYPE) {
|
||||
case IEEE80211_STYPE_ACTION:
|
||||
- if (skb->len < IEEE80211_MIN_ACTION_SIZE)
|
||||
- return RX_DROP_MONITOR;
|
||||
- /* fall through */
|
||||
case IEEE80211_STYPE_PROBE_RESP:
|
||||
case IEEE80211_STYPE_BEACON:
|
||||
skb_queue_tail(&ifmsh->skb_queue, skb);
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -1964,6 +1964,11 @@ ieee80211_rx_h_action(struct ieee80211_r
|
||||
goto handled;
|
||||
}
|
||||
break;
|
||||
+ case MESH_PLINK_CATEGORY:
|
||||
+ case MESH_PATH_SEL_CATEGORY:
|
||||
+ if (ieee80211_vif_is_mesh(&sdata->vif))
|
||||
+ return ieee80211_mesh_rx_mgmt(sdata, rx->skb);
|
||||
+ break;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1,14 +1,14 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/etherdevice.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "hw.h"
|
||||
@@ -441,8 +442,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
@@ -456,8 +457,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
common->macaddr[2 * i] = eeval >> 8;
|
||||
common->macaddr[2 * i + 1] = eeval & 0xff;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -19,6 +19,9 @@
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/mac80211.h>
|
||||
#include "regd.h"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "ath9k.h"
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
|
||||
@@ -52,21 +53,36 @@ static void ath_pci_read_cachesize(struc
|
||||
@@ -53,21 +54,36 @@ static void ath_pci_read_cachesize(struc
|
||||
|
||||
static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -385,11 +385,8 @@ static void ath9k_hw_init_defaults(struc
|
||||
ah->hw_version.magic = AR5416_MAGIC;
|
||||
ah->hw_version.subvendorid = 0;
|
||||
|
||||
- ah->ah_flags = 0;
|
||||
if (ah->hw_version.devid == AR5416_AR9100_DEVID)
|
||||
ah->hw_version.macVersion = AR_SREV_VERSION_9100;
|
||||
- if (!AR_SREV_9100(ah))
|
||||
- ah->ah_flags = AH_USE_EEPROM;
|
||||
|
||||
ah->atim_window = 0;
|
||||
ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE;
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -15,6 +15,7 @@
|
||||
@@ -24,7 +10,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -531,6 +531,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -565,6 +565,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
{
|
||||
struct ath_hw *ah = NULL;
|
||||
struct ath_common *common;
|
||||
@@ -32,7 +18,7 @@
|
||||
int ret = 0, i;
|
||||
int csz = 0;
|
||||
|
||||
@@ -542,6 +543,10 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -576,6 +577,10 @@ static int ath9k_init_softc(u16 devid, s
|
||||
ah->hw_version.subsysid = subsysid;
|
||||
sc->sc_ah = ah;
|
||||
|
||||
@@ -43,3 +29,16 @@
|
||||
common = ath9k_hw_common(ah);
|
||||
common->ops = &ath9k_common_ops;
|
||||
common->bus_ops = bus_ops;
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -429,10 +429,6 @@ static void ath9k_hw_init_defaults(struc
|
||||
ah->hw_version.magic = AR5416_MAGIC;
|
||||
ah->hw_version.subvendorid = 0;
|
||||
|
||||
- ah->ah_flags = 0;
|
||||
- if (!AR_SREV_9100(ah))
|
||||
- ah->ah_flags = AH_USE_EEPROM;
|
||||
-
|
||||
ah->atim_window = 0;
|
||||
ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE;
|
||||
ah->beacon_interval = 100;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -16,8 +16,10 @@
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/etherdevice.h>
|
||||
+#include <linux/ath9k_platform.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
+#include "ath9k.h"
|
||||
#include "hw.h"
|
||||
#include "hw-ops.h"
|
||||
#include "rc.h"
|
||||
#include "initvals.h"
|
||||
@@ -428,17 +430,23 @@ static int ath9k_hw_rf_claim(struct ath_
|
||||
@@ -441,18 +443,23 @@ static void ath9k_hw_init_defaults(struc
|
||||
static int ath9k_hw_init_macaddr(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -20,10 +20,11 @@
|
||||
u32 sum;
|
||||
int i;
|
||||
u16 eeval;
|
||||
u32 EEP_MAC[] = { EEP_MAC_LSW, EEP_MAC_MID, EEP_MAC_MSW };
|
||||
|
||||
sum = 0;
|
||||
- for (i = 0; i < 3; i++) {
|
||||
- eeval = ah->eep_ops->get_eeprom(ah, AR_EEPROM_MAC(i));
|
||||
- eeval = ah->eep_ops->get_eeprom(ah, EEP_MAC[i]);
|
||||
- sum += eeval;
|
||||
- common->macaddr[2 * i] = eeval >> 8;
|
||||
- common->macaddr[2 * i + 1] = eeval & 0xff;
|
||||
@@ -32,12 +33,11 @@
|
||||
+ memcpy(common->macaddr, pdata->macaddr, ETH_ALEN);
|
||||
+ else
|
||||
+ for (i = 0; i < 3; i++) {
|
||||
+ eeval = ah->eep_ops->get_eeprom(ah, AR_EEPROM_MAC(i));
|
||||
+ eeval = ah->eep_ops->get_eeprom(ah, EEP_MAC[i]);
|
||||
+ sum += eeval;
|
||||
+ common->macaddr[2 * i] = eeval >> 8;
|
||||
+ common->macaddr[2 * i + 1] = eeval & 0xff;
|
||||
+ }
|
||||
+
|
||||
if (!is_valid_ether_addr(common->macaddr)) {
|
||||
ath_print(common, ATH_DBG_EEPROM,
|
||||
"eeprom contains invalid mac address: %pM\n",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2097,7 +2097,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1380,7 +1380,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
|
||||
if (ah->config.rx_intr_mitigation) {
|
||||
REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
|
||||
@@ -8,4 +8,4 @@
|
||||
+ REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 500);
|
||||
}
|
||||
|
||||
ath9k_hw_init_bb(ah, chan);
|
||||
if (ah->config.tx_intr_mitigation) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -14,6 +14,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
+#include "linux/ath9k_platform.h"
|
||||
#include "ath9k.h"
|
||||
|
||||
static char *dev_info = "ath9k";
|
||||
@@ -546,6 +547,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -580,6 +581,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
|
||||
if (!pdata)
|
||||
ah->ah_flags |= AH_USE_EEPROM;
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
common = ath9k_hw_common(ah);
|
||||
common->ops = &ath9k_common_ops;
|
||||
@@ -671,6 +674,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -702,6 +705,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -689,6 +710,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -720,6 +741,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
common = ath9k_hw_common(ah);
|
||||
ath9k_set_hw_capab(sc, hw);
|
||||
|
||||
@@ -54,15 +54,15 @@
|
||||
ath9k_reg_notifier);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -511,6 +511,8 @@ struct ath_softc {
|
||||
struct ath_beacon_config cur_beacon_conf;
|
||||
struct delayed_work tx_complete_work;
|
||||
struct ath_btcoex btcoex;
|
||||
+
|
||||
+ unsigned long quirk_wndr3700:1;
|
||||
};
|
||||
@@ -517,6 +517,8 @@ struct ath_softc {
|
||||
|
||||
struct ath_wiphy {
|
||||
int beacon_interval;
|
||||
|
||||
+ bool quirk_wndr3700;
|
||||
+
|
||||
#ifdef CONFIG_ATH9K_DEBUGFS
|
||||
struct ath9k_debug debug;
|
||||
#endif
|
||||
--- a/include/linux/ath9k_platform.h
|
||||
+++ b/include/linux/ath9k_platform.h
|
||||
@@ -24,6 +24,8 @@
|
||||
@@ -70,7 +70,7 @@
|
||||
u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
|
||||
u8 *macaddr;
|
||||
+
|
||||
+ unsigned long quirk_wndr3700:1;
|
||||
+ bool quirk_wndr3700;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -379,6 +379,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
@@ -392,6 +392,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
|
||||
#define ATH_LED_PIN_DEF 1
|
||||
#define ATH_LED_PIN_9287 8
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -77,6 +77,90 @@ static const struct file_operations fops
|
||||
@@ -78,6 +78,90 @@ static const struct file_operations fops
|
||||
|
||||
#define DMA_BUF_LEN 1024
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
static ssize_t read_file_dma(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
@@ -719,6 +803,16 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -731,6 +815,16 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
goto err;
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR,
|
||||
sc->debug.debugfs_phy, sc, &fops_dma);
|
||||
if (!sc->debug.debugfs_dma)
|
||||
@@ -769,6 +863,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
|
||||
@@ -781,6 +875,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
debugfs_remove(sc->debug.debugfs_wiphy);
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.h
|
||||
@@ -148,6 +148,8 @@ struct ath_stats {
|
||||
@@ -152,6 +152,8 @@ struct ath_stats {
|
||||
};
|
||||
|
||||
struct ath9k_debug {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -783,6 +783,86 @@ static const struct file_operations fops
|
||||
@@ -795,6 +795,86 @@ static const struct file_operations fops
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -852,6 +932,17 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -864,6 +944,17 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
if (!sc->debug.debugfs_recv)
|
||||
goto err;
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
return 0;
|
||||
err:
|
||||
ath9k_exit_debug(ah);
|
||||
@@ -865,6 +956,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
|
||||
@@ -877,6 +968,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
|
||||
|
||||
debugfs_remove(sc->debug.debugfs_tx_chainmask);
|
||||
debugfs_remove(sc->debug.debugfs_rx_chainmask);
|
||||
@@ -116,7 +116,7 @@
|
||||
debugfs_remove(sc->debug.debugfs_wiphy);
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.h
|
||||
@@ -158,6 +158,9 @@ struct ath9k_debug {
|
||||
@@ -162,6 +162,9 @@ struct ath9k_debug {
|
||||
struct dentry *debugfs_wiphy;
|
||||
struct dentry *debugfs_xmit;
|
||||
struct dentry *debugfs_recv;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -886,6 +886,11 @@ static int nl80211_send_iface(struct sk_
|
||||
@@ -887,6 +887,11 @@ static int nl80211_send_iface(struct sk_
|
||||
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
|
||||
NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, dev->name);
|
||||
NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, dev->ieee80211_ptr->iftype);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
mac80211-$(CONFIG_MAC80211_RC_MINSTREL) += $(rc80211_minstrel-y)
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -714,6 +714,10 @@ static int __init ieee80211_init(void)
|
||||
@@ -716,6 +716,10 @@ static int __init ieee80211_init(void)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
ret = rc80211_pid_init();
|
||||
if (ret)
|
||||
goto err_pid;
|
||||
@@ -726,6 +730,8 @@ static int __init ieee80211_init(void)
|
||||
@@ -728,6 +732,8 @@ static int __init ieee80211_init(void)
|
||||
err_netdev:
|
||||
rc80211_pid_exit();
|
||||
err_pid:
|
||||
@@ -33,7 +33,7 @@
|
||||
rc80211_minstrel_exit();
|
||||
|
||||
return ret;
|
||||
@@ -734,6 +740,7 @@ static int __init ieee80211_init(void)
|
||||
@@ -736,6 +742,7 @@ static int __init ieee80211_init(void)
|
||||
static void __exit ieee80211_exit(void)
|
||||
{
|
||||
rc80211_pid_exit();
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
--- /dev/null
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht.c
|
||||
@@ -0,0 +1,815 @@
|
||||
@@ -0,0 +1,822 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
|
||||
+ *
|
||||
@@ -389,9 +389,9 @@
|
||||
+ if (!mg->supported)
|
||||
+ continue;
|
||||
+
|
||||
+ if (++mg->index > MCS_GROUP_RATES) {
|
||||
+ if (++mg->index >= MCS_GROUP_RATES) {
|
||||
+ mg->index = 0;
|
||||
+ if (++mg->column > ARRAY_SIZE(sample_table))
|
||||
+ if (++mg->column >= ARRAY_SIZE(sample_table))
|
||||
+ mg->column = 0;
|
||||
+ }
|
||||
+ break;
|
||||
@@ -474,7 +474,7 @@
|
||||
+ mi->ampdu_len += info->status.ampdu_len;
|
||||
+
|
||||
+ if (!mi->sample_wait && !mi->sample_tries && mi->sample_count > 0) {
|
||||
+ mi->sample_wait = 4 + MINSTREL_TRUNC(mi->avg_ampdu_len);
|
||||
+ mi->sample_wait = 4 + 2 * MINSTREL_TRUNC(mi->avg_ampdu_len);
|
||||
+ mi->sample_tries = 3;
|
||||
+ mi->sample_count--;
|
||||
+ }
|
||||
@@ -660,6 +660,7 @@
|
||||
+ if (!msp->is_ht)
|
||||
+ return mac80211_minstrel.get_rate(priv, sta, &msp->legacy, txrc);
|
||||
+
|
||||
+ info->flags |= mi->tx_flags;
|
||||
+ sample_idx = minstrel_get_sample_rate(mp, mi);
|
||||
+ if (sample_idx >= 0) {
|
||||
+ minstrel_ht_set_rate(mp, mi, &ar[0], sample_idx,
|
||||
@@ -733,6 +734,12 @@
|
||||
+ }
|
||||
+ mi->sample_tries = 4;
|
||||
+
|
||||
+ if (sta_cap & IEEE80211_HT_CAP_TX_STBC)
|
||||
+ mi->tx_flags |= IEEE80211_TX_CTL_STBC;
|
||||
+
|
||||
+ if (sta_cap & IEEE80211_HT_CAP_LDPC_CODING)
|
||||
+ mi->tx_flags |= IEEE80211_TX_CTL_LDPC;
|
||||
+
|
||||
+ if (oper_chan_type != NL80211_CHAN_HT40MINUS &&
|
||||
+ oper_chan_type != NL80211_CHAN_HT40PLUS)
|
||||
+ sta_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||
@@ -886,7 +893,7 @@
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht.h
|
||||
@@ -0,0 +1,125 @@
|
||||
@@ -0,0 +1,128 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
|
||||
+ *
|
||||
@@ -899,10 +906,10 @@
|
||||
+#define __RC_MINSTREL_HT_H
|
||||
+
|
||||
+/*
|
||||
+ * maximum number of spatial streams to make use of
|
||||
+ * set this value to 3 once we have drivers that support it
|
||||
+ * The number of streams can be changed to 2 to reduce code
|
||||
+ * size and memory footprint.
|
||||
+ */
|
||||
+#define MINSTREL_MAX_STREAMS 2
|
||||
+#define MINSTREL_MAX_STREAMS 3
|
||||
+#define MINSTREL_STREAM_GROUPS 4
|
||||
+
|
||||
+/* scaled fraction values */
|
||||
@@ -983,6 +990,9 @@
|
||||
+ unsigned int total_packets;
|
||||
+ unsigned int sample_packets;
|
||||
+
|
||||
+ /* tx flags to add for frames for this sta */
|
||||
+ u32 tx_flags;
|
||||
+
|
||||
+ u8 sample_wait;
|
||||
+ u8 sample_tries;
|
||||
+ u8 sample_count;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -655,7 +655,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -686,7 +686,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
hw->sta_data_size = sizeof(struct ath_node);
|
||||
hw->vif_data_size = sizeof(struct ath_vif);
|
||||
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1911,6 +1911,34 @@ static void ath9k_enable_rfkill(struct a
|
||||
REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
|
||||
}
|
||||
|
||||
+bool ath9k_hw_check_alive(struct ath_hw *ah)
|
||||
+{
|
||||
+ int count = 50;
|
||||
+ u32 reg;
|
||||
+
|
||||
+ if (AR_SREV_9285_10_OR_LATER(ah))
|
||||
+ return true;
|
||||
+
|
||||
+ do {
|
||||
+ reg = REG_READ(ah, AR_OBS_BUS_1);
|
||||
+
|
||||
+ if ((reg & 0x7E7FFFEF) == 0x00702400)
|
||||
+ continue;
|
||||
+
|
||||
+ switch (reg & 0x7E000B00) {
|
||||
+ case 0x1E000000:
|
||||
+ case 0x52000B00:
|
||||
+ case 0x18000B00:
|
||||
+ continue;
|
||||
+ default:
|
||||
+ return true;
|
||||
+ }
|
||||
+ } while (count-- > 0);
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ath9k_hw_check_alive);
|
||||
+
|
||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
bool bChannelChange)
|
||||
{
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -679,6 +679,7 @@ void ath9k_hw_set11nmac2040(struct ath_h
|
||||
void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period);
|
||||
void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
|
||||
const struct ath9k_beacon_state *bs);
|
||||
+bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||
|
||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -405,7 +405,8 @@ void ath9k_tasklet(unsigned long data)
|
||||
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
- if (status & ATH9K_INT_FATAL) {
|
||||
+ if ((status & ATH9K_INT_FATAL) ||
|
||||
+ !ath9k_hw_check_alive(ah)) {
|
||||
ath_reset(sc, false);
|
||||
ath9k_ps_restore(sc);
|
||||
return;
|
||||
@@ -0,0 +1,24 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/common.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
||||
@@ -57,13 +57,19 @@ static bool ath9k_rx_accept(struct ath_c
|
||||
* rs_more indicates chained descriptors which can be used
|
||||
* to link buffers together for a sort of scatter-gather
|
||||
* operation.
|
||||
- *
|
||||
+ * reject the frame, we don't support scatter-gather yet and
|
||||
+ * the frame is probably corrupt anyway
|
||||
+ */
|
||||
+ if (rx_stats->rs_more)
|
||||
+ return false;
|
||||
+
|
||||
+ /*
|
||||
* The rx_stats->rs_status will not be set until the end of the
|
||||
* chained descriptors so it can be ignored if rs_more is set. The
|
||||
* rs_more will be false at the last element of the chained
|
||||
* descriptors.
|
||||
*/
|
||||
- if (!rx_stats->rs_more && rx_stats->rs_status != 0) {
|
||||
+ if (rx_stats->rs_status != 0) {
|
||||
if (rx_stats->rs_status & ATH9K_RXERR_CRC)
|
||||
rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
if (rx_stats->rs_status & ATH9K_RXERR_PHY)
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -223,6 +223,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
@@ -225,6 +225,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/*
|
||||
* PCI driver handlers.
|
||||
*/
|
||||
@@ -397,6 +398,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
@@ -399,6 +400,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -213,7 +213,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
@@ -215,7 +215,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
/*
|
||||
* Free irq line.
|
||||
*/
|
||||
|
||||
@@ -1,59 +1,29 @@
|
||||
From f18d4463d092162f34a8bd226505627ceeac3e8a Mon Sep 17 00:00:00 2001
|
||||
From: Luis Correia <luis.f.correia@gmail.com>
|
||||
Date: Sat, 3 Apr 2010 12:49:53 +0100
|
||||
Subject: [PATCH] rt2x00: remove MCU requests for SoC platforms
|
||||
|
||||
The ralink SoC platforms do not have an MCU.
|
||||
|
||||
Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
|
||||
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
|
||||
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/rt2x00/rt2800pci.c | 6 ++++++
|
||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||
@@ -221,9 +221,9 @@ void rt2800_mcu_request(struct rt2x00_de
|
||||
u32 reg;
|
||||
|
||||
/*
|
||||
- * SOC devices don't support MCU requests.
|
||||
+ * some devices don't support MCU requests.
|
||||
*/
|
||||
- if (rt2x00_is_soc(rt2x00dev))
|
||||
+ if (!test_bit(DRIVER_REQUIRE_MCU, &rt2x00dev->flags))
|
||||
return;
|
||||
|
||||
mutex_lock(&rt2x00dev->csr_mutex);
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
@@ -60,6 +60,12 @@ static void rt2800pci_mcu_status(struct
|
||||
unsigned int i;
|
||||
u32 reg;
|
||||
@@ -66,6 +66,12 @@ static void rt2800pci_mcu_status(struct
|
||||
if (rt2x00_is_soc(rt2x00dev))
|
||||
return;
|
||||
|
||||
+ /*
|
||||
+ * some devices don't support MCU requests.
|
||||
+ * SOC devices don't support MCU requests.
|
||||
+ */
|
||||
+ if (!test_bit(DRIVER_REQUIRE_MCU, &rt2x00dev->flags))
|
||||
+ if (rt2x00_is_soc(rt2x00dev))
|
||||
+ return;
|
||||
+
|
||||
for (i = 0; i < 200; i++) {
|
||||
rt2800_register_read(rt2x00dev, H2M_MAILBOX_CID, ®);
|
||||
|
||||
@@ -1098,10 +1104,12 @@ static int rt2800pci_probe_hw(struct rt2
|
||||
__set_bit(DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL, &rt2x00dev->flags);
|
||||
|
||||
/*
|
||||
- * This device requires firmware.
|
||||
+ * This device requires firmware and MCU access.
|
||||
*/
|
||||
- if (!rt2x00_is_soc(rt2x00dev))
|
||||
+ if (!rt2x00_is_soc(rt2x00dev)){
|
||||
__set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
|
||||
+ __set_bit(DRIVER_REQUIRE_MCU, &rt2x00dev->flags);
|
||||
+ }
|
||||
__set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
|
||||
if (!modparam_nohwcrypt)
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
@@ -631,6 +631,7 @@ enum rt2x00_flags {
|
||||
* Driver requirements
|
||||
*/
|
||||
DRIVER_REQUIRE_FIRMWARE,
|
||||
+ DRIVER_REQUIRE_MCU,
|
||||
DRIVER_REQUIRE_BEACON_GUARD,
|
||||
DRIVER_REQUIRE_ATIM_QUEUE,
|
||||
DRIVER_REQUIRE_DMA,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/drivers/net/wireless/mwl8k.c
|
||||
+++ b/drivers/net/wireless/mwl8k.c
|
||||
@@ -3850,6 +3850,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
||||
MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
||||
+ { PCI_VDEVICE(MARVELL, 0x2a02), .driver_data = MWL8363, },
|
||||
{ PCI_VDEVICE(MARVELL, 0x2a0a), .driver_data = MWL8363, },
|
||||
{ PCI_VDEVICE(MARVELL, 0x2a0c), .driver_data = MWL8363, },
|
||||
{ PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, },
|
||||
Reference in New Issue
Block a user