mac80211: update to wireless-testing 2014-09-26

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42683
This commit is contained in:
Felix Fietkau 2014-09-27 20:51:43 +00:00
parent 54a18b3fe8
commit 8be721208d
89 changed files with 655 additions and 9211 deletions

View File

@ -10,11 +10,11 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=2014-05-22
PKG_VERSION:=2014-09-26
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_BACKPORT_VERSION:=
PKG_MD5SUM:=367937d4f8c05cb36ca989ee26abc3df
PKG_MD5SUM:=b66f5fbd10e335fc660182ce6114d41f
PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)

View File

@ -7,7 +7,7 @@
LXDIALOG := lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o
conf: conf.o zconf.tab.o
-mconf: LDFLAGS = -Wl,--no-as-needed $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
-mconf: LDFLAGS = -Wl,--add-needed $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
-mconf: CFLAGS += -DCURSES_LOC="<ncurses.h>" -DLOCALE
+mconf: LDFLAGS = $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
+mconf: CFLAGS += -DCURSES_LOC="<ncurses.h>"

View File

@ -1,44 +0,0 @@
From: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Date: Wed, 23 Oct 2013 14:55:36 -0400
Subject: [RFC] cfg80211: make genregdb.awk skip antenna gain
Now that wireless-regdb doesn't include
antenna gain lets skip parsing it completely
for when CONFIG_CFG80211_INTERNAL_REGDB is
enabled.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
net/wireless/genregdb.awk | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
mode change 100644 => 100755 net/wireless/genregdb.awk
--- a/net/wireless/genregdb.awk
+++ b/net/wireless/genregdb.awk
@@ -56,14 +56,11 @@ function parse_reg_rule()
end = $3
bw = $5
sub(/\),/, "", bw)
- gain = $6
- sub(/\(/, "", gain)
- sub(/,/, "", gain)
- power = $7
- sub(/\)/, "", power)
+ power = $6
+ sub(/\(/, "", power)
sub(/,/, "", power)
# power might be in mW...
- units = $8
+ units = $7
sub(/\)/, "", units)
sub(/,/, "", units)
dfs_cac = $9
@@ -86,7 +83,7 @@ function parse_reg_rule()
sub(/\(/, "", dfs_cac)
sub(/\)/, "", dfs_cac)
flagstr = ""
- for (i=8; i<=NF; i++)
+ for (i=7; i<=NF; i++)
flagstr = flagstr $i
split(flagstr, flagarray, ",")
flags = ""

View File

@ -1,11 +0,0 @@
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -745,7 +745,7 @@ static struct net_device_stats *mwifiex_
return &priv->stats;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
static u16
mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb,
void *accel_priv, select_queue_fallback_t fallback)

View File

@ -1,13 +1,13 @@
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1796,7 +1796,11 @@ void ieee80211_remove_interfaces(struct
@@ -1825,6 +1825,11 @@ void ieee80211_remove_interfaces(struct
}
mutex_unlock(&local->iflist_mtx);
unregister_netdevice_many(&unreg_list);
+#if (!(LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,45) && \
+ LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)) && \
+ (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)))
list_del(&unreg_list);
+ list_del(&unreg_list);
+#endif
list_for_each_entry_safe(sdata, tmp, &wdev_list, list) {

View File

@ -1,6 +1,6 @@
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -160,7 +160,7 @@ config CFG80211_WEXT
@@ -166,7 +166,7 @@ config CFG80211_WEXT
extensions with cfg80211-based drivers.
config LIB80211
@ -9,7 +9,7 @@
depends on m
default n
help
@@ -170,15 +170,15 @@ config LIB80211
@@ -176,15 +176,15 @@ config LIB80211
Drivers should select this themselves if needed.
config LIB80211_CRYPT_WEP

View File

@ -1,6 +1,6 @@
--- a/.local-symbols
+++ b/.local-symbols
@@ -403,42 +403,6 @@ USB_CDC_PHONET=
@@ -414,42 +414,6 @@ USB_CDC_PHONET=
USB_IPHETH=
USB_SIERRA_NET=
USB_VL600=
@ -54,7 +54,7 @@
-
source net/nfc/Kconfig
source drivers/regulator/Kconfig
source drivers/media/Kconfig
--- a/Makefile.kernel
+++ b/Makefile.kernel
@@ -25,8 +25,6 @@ obj-$(CPTCFG_MAC80211) += net/mac80211/
@ -68,7 +68,7 @@
obj-$(CPTCFG_NFC) += net/nfc/
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2733,7 +2733,7 @@ static struct ssb_device *b43_ssb_gpio_d
@@ -2828,7 +2828,7 @@ static struct ssb_device *b43_ssb_gpio_d
{
struct ssb_bus *bus = dev->dev->sdev->bus;
@ -77,7 +77,7 @@
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
#else
return bus->chipco.dev;
@@ -4698,7 +4698,7 @@ static int b43_wireless_core_init(struct
@@ -4858,7 +4858,7 @@ static int b43_wireless_core_init(struct
}
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */

View File

@ -1,10 +0,0 @@
--- a/compat/backport-3.15.c
+++ b/compat/backport-3.15.c
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/of.h>
+#include <linux/string.h>
#include <net/net_namespace.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))

View File

@ -246,7 +246,7 @@
struct {
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -301,15 +301,22 @@ ieee80211_crypto_tkip_decrypt(struct iee
@@ -304,15 +304,22 @@ ieee80211_crypto_tkip_decrypt(struct iee
}
@ -271,7 +271,7 @@
/*
* Mask FC: zero subtype b4 b5 b6 (if not mgmt)
* Retry, PwrMgt, MoreData; set Protected
@@ -331,21 +338,20 @@ static void ccmp_special_blocks(struct s
@@ -334,21 +341,20 @@ static void ccmp_special_blocks(struct s
else
qos_tid = 0;
@ -300,7 +300,7 @@
/* AAD (extra authenticate-only data) / masked 802.11 header
* FC | A1 | A2 | A3 | SC | [A4] | [QC] */
@@ -401,8 +407,7 @@ static int ccmp_encrypt_skb(struct ieee8
@@ -404,8 +410,7 @@ static int ccmp_encrypt_skb(struct ieee8
u8 *pos;
u8 pn[6];
u64 pn64;
@ -310,7 +310,7 @@
if (info->control.hw_key &&
!(info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV) &&
@@ -458,9 +463,9 @@ static int ccmp_encrypt_skb(struct ieee8
@@ -461,9 +466,9 @@ static int ccmp_encrypt_skb(struct ieee8
return 0;
pos += IEEE80211_CCMP_HDR_LEN;
@ -323,7 +323,7 @@
return 0;
}
@@ -523,16 +528,16 @@ ieee80211_crypto_ccmp_decrypt(struct iee
@@ -526,16 +531,16 @@ ieee80211_crypto_ccmp_decrypt(struct iee
}
if (!(status->flag & RX_FLAG_DECRYPTED)) {

View File

@ -1,6 +1,6 @@
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -285,7 +285,7 @@ void ieee80211_restart_hw(struct ieee802
@@ -287,7 +287,7 @@ void ieee80211_restart_hw(struct ieee802
}
EXPORT_SYMBOL(ieee80211_restart_hw);
@ -9,7 +9,7 @@
static int ieee80211_ifa_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
@@ -344,7 +344,7 @@ static int ieee80211_ifa_changed(struct
@@ -346,7 +346,7 @@ static int ieee80211_ifa_changed(struct
}
#endif
@ -18,7 +18,7 @@
static int ieee80211_ifa6_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
@@ -1036,14 +1036,14 @@ int ieee80211_register_hw(struct ieee802
@@ -1038,14 +1038,14 @@ int ieee80211_register_hw(struct ieee802
goto fail_pm_qos;
}
@ -35,7 +35,7 @@
local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
result = register_inet6addr_notifier(&local->ifa6_notifier);
if (result)
@@ -1052,13 +1052,13 @@ int ieee80211_register_hw(struct ieee802
@@ -1054,13 +1054,13 @@ int ieee80211_register_hw(struct ieee802
return 0;
@ -52,7 +52,7 @@
fail_ifa:
pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
&local->network_latency_notifier);
@@ -1103,10 +1103,10 @@ void ieee80211_unregister_hw(struct ieee
@@ -1105,10 +1105,10 @@ void ieee80211_unregister_hw(struct ieee
pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
&local->network_latency_notifier);

View File

@ -1,27 +0,0 @@
From 6e5603fa9e5b0d3c602eb1672473e81a1692f61e Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sat, 31 May 2014 15:52:42 +0200
Subject: [PATCH] backports: only add net_get_random_once() when not available
Upstream commit: d787b3dd3b4fcb5f40eb6532163dc3abdca4fd45
net_get_random_once() was added unconditionally also when the kernel we
are compiling against already provided this function, this patch checks
that first.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/backport-include/linux/net.h
+++ b/backport-include/linux/net.h
@@ -64,7 +64,7 @@ do { \
* may affect tracing. My recommendation is that if you have a need for
* static keys you just require at least 3.5 to remain sane.
*/
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) && !defined(net_get_random_once)
#define __BACKPORT_NET_GET_RANDOM_ONCE 1
#endif
#endif /* ___NET_RANDOM_STATIC_KEY_INIT */

View File

@ -1,11 +0,0 @@
--- a/drivers/net/wireless/ath/ath5k/Kconfig
+++ b/drivers/net/wireless/ath/ath5k/Kconfig
@@ -55,7 +55,7 @@ config ATH5K_TRACER
config ATH5K_AHB
bool "Atheros 5xxx AHB bus support"
- depends on (ATHEROS_AR231X && !PCI)
+ depends on ATHEROS_AR231X
---help---
This adds support for WiSoC type chipsets of the 5xxx Atheros
family.

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1903,7 +1903,7 @@ static int ieee80211_scan(struct wiphy *
@@ -1895,7 +1895,7 @@ static int ieee80211_scan(struct wiphy *
* the frames sent while scanning on other channel will be
* lost)
*/

View File

@ -12,7 +12,7 @@
ccflags-y += -D__CHECK_ENDIAN__
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -295,13 +295,6 @@ void _ath_dbg(struct ath_common *common,
@@ -299,13 +299,6 @@ void _ath_dbg(struct ath_common *common,
#endif /* CPTCFG_ATH_DEBUG */
/** Returns string describing opmode, or NULL if unknown mode. */

View File

@ -58,7 +58,7 @@
---help---
--- a/.local-symbols
+++ b/.local-symbols
@@ -116,6 +116,7 @@ RTL8187_LEDS=
@@ -112,6 +112,7 @@ RTL8187_LEDS=
ATH_COMMON=
ATH_CARDS=
ATH_DEBUG=

View File

@ -1,6 +1,6 @@
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2072,6 +2072,8 @@ void regulatory_hint_country_ie(struct w
@@ -2112,6 +2112,8 @@ void regulatory_hint_country_ie(struct w
enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request = NULL, *lr;
@ -9,7 +9,7 @@
/* IE len must be evenly divisible by 2 */
if (country_ie_len & 0x01)
return;
@@ -2268,6 +2270,7 @@ static void restore_regulatory_settings(
@@ -2308,6 +2310,7 @@ static void restore_regulatory_settings(
void regulatory_hint_disconnect(void)
{

View File

@ -1,10 +1,10 @@
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -655,6 +655,7 @@ static const struct ieee80211_iface_limi
@@ -670,6 +670,7 @@ static const struct ieee80211_iface_limi
BIT(NL80211_IFTYPE_AP) },
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO) },
+ { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
};
static const struct ieee80211_iface_limit if_dfs_limits[] = {
static const struct ieee80211_iface_limit wds_limits[] = {

View File

@ -18,7 +18,7 @@
goto end;
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1937,7 +1937,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
@@ -1962,7 +1962,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
}
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
@ -27,7 +27,7 @@
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
u64 tsf = ath5k_hw_get_tsf64(ah);
u32 tsftu = TSF_TO_TU(tsf);
@@ -2023,7 +2023,7 @@ ath5k_beacon_update_timers(struct ath5k_
@@ -2048,7 +2048,7 @@ ath5k_beacon_update_timers(struct ath5k_
intval = ah->bintval & AR5K_BEACON_PERIOD;
if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs
@ -36,7 +36,7 @@
intval /= ATH_BCBUF; /* staggered multi-bss beacons */
if (intval < 15)
ATH5K_WARN(ah, "intval %u is too low, min 15\n",
@@ -2490,6 +2490,7 @@ static const struct ieee80211_iface_limi
@@ -2515,6 +2515,7 @@ static const struct ieee80211_iface_limi
BIT(NL80211_IFTYPE_MESH_POINT) |
#endif
BIT(NL80211_IFTYPE_AP) },

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -48,6 +48,8 @@ static DEFINE_PCI_DEVICE_TABLE(ath5k_pci
@@ -48,6 +48,8 @@ static const struct pci_device_id ath5k_
{ PCI_VDEVICE(ATHEROS, 0x001b) }, /* 5413 Eagle */
{ PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
{ PCI_VDEVICE(ATHEROS, 0x001d) }, /* 2417 Nala */

View File

@ -11,7 +11,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -821,6 +821,97 @@ static const struct file_operations fops
@@ -822,6 +822,97 @@ static const struct file_operations fops
.llseek = default_llseek,
};
@ -109,7 +109,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++
/* debugfs: queues etc */
@@ -914,6 +1005,9 @@ ath5k_debug_init_device(struct ath5k_hw
@@ -1009,6 +1100,9 @@ ath5k_debug_init_device(struct ath5k_hw
debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah,
&fops_beacon);
@ -121,7 +121,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++
debugfs_create_file("antenna", S_IWUSR | S_IRUSR, phydir, ah,
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -1369,6 +1369,7 @@ struct ath5k_hw {
@@ -1370,6 +1370,7 @@ struct ath5k_hw {
u8 ah_coverage_class;
bool ah_ack_bitrate_high;
u8 ah_bwmode;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1289,6 +1289,53 @@ void ath9k_deinit_debug(struct ath_softc
@@ -1318,6 +1318,53 @@ void ath9k_deinit_debug(struct ath_softc
ath9k_spectral_deinit_debug(sc);
}
@ -54,7 +54,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1308,6 +1355,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1337,6 +1384,8 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_tx99_init_debug(sc);
ath9k_spectral_init_debug(sc);

View File

@ -71,7 +71,7 @@
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -724,6 +724,7 @@ enum ath_cal_list {
@@ -725,6 +725,7 @@ enum ath_cal_list {
#define AH_USE_EEPROM 0x1
#define AH_UNPLUGGED 0x2 /* The card has been physically removed. */
#define AH_FASTCC 0x4
@ -81,7 +81,7 @@
struct ath_ops reg_ops;
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -518,6 +518,8 @@ static int ath9k_init_softc(u16 devid, s
@@ -528,6 +528,8 @@ static int ath9k_init_softc(u16 devid, s
ah->is_clk_25mhz = pdata->is_clk_25mhz;
ah->get_mac_revision = pdata->get_mac_revision;
ah->external_reset = pdata->external_reset;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -904,23 +904,23 @@ static int __init ath9k_init(void)
@@ -976,23 +976,23 @@ static int __init ath9k_init(void)
{
int error;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -89,7 +89,7 @@ int ath_descdma_setup(struct ath_softc *
@@ -88,7 +88,7 @@ int ath_descdma_setup(struct ath_softc *
(_l) &= ((_sz) - 1); \
} while (0)

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1336,6 +1336,52 @@ static const struct file_operations fops
@@ -1365,6 +1365,52 @@ static const struct file_operations fops
.owner = THIS_MODULE
};
@ -53,7 +53,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1357,6 +1403,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1386,6 +1432,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_eeprom);
@ -64,7 +64,7 @@
debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -140,6 +140,7 @@ struct ath_common {
@@ -141,6 +141,7 @@ struct ath_common {
int debug_mask;
enum ath_device_state state;
unsigned long op_flags;

View File

@ -10,7 +10,7 @@
case AR5416_AR9100_DEVID:
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -34,6 +34,7 @@
@@ -35,6 +35,7 @@
#define ATHEROS_VENDOR_ID 0x168c
@ -20,7 +20,7 @@
#define AR9160_DEVID_PCI 0x0027
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -658,6 +658,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
@@ -658,6 +658,7 @@ static const struct pci_device_id ath_pc
{ PCI_VDEVICE(ATHEROS, 0x0036),
.driver_data = ATH9K_PCI_BT_ANT_DIV },

View File

@ -1,6 +1,6 @@
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1718,6 +1718,7 @@ struct ieee80211_hw {
@@ -1754,6 +1754,7 @@ struct ieee80211_hw {
u8 max_tx_aggregation_subframes;
u8 offchannel_tx_hw_queue;
u8 radiotap_mcs_details;
@ -10,7 +10,7 @@
u8 uapsd_queues;
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2084,7 +2084,9 @@ static int ieee80211_get_tx_power(struct
@@ -2081,7 +2081,9 @@ static int ieee80211_get_tx_power(struct
struct ieee80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
@ -23,7 +23,7 @@
*dbm = sdata->vif.bss_conf.txpower;
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -156,6 +156,7 @@ static u32 ieee80211_hw_conf_chan(struct
@@ -157,6 +157,7 @@ static u32 ieee80211_hw_conf_chan(struct
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;

View File

@ -1,7 +1,7 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -310,8 +310,12 @@ static int ath_reset_internal(struct ath
(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
@@ -323,8 +323,12 @@ int ath_reset_internal(struct ath_softc
sc->cur_chan->offchannel)
ath9k_mci_set_txpower(sc, true, false);
- if (!ath_complete_reset(sc, true))
@ -14,10 +14,10 @@
out:
spin_unlock_bh(&sc->sc_pcu_lock);
@@ -1405,6 +1409,7 @@ static int ath9k_config(struct ieee80211
sc->config.txpowlimit = 2 * conf->power_level;
@@ -1453,6 +1457,7 @@ static int ath9k_config(struct ieee80211
sc->cur_chan->txpower = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow);
sc->cur_chan->txpower, &sc->curtxpow);
+ hw->cur_power_level = sc->curtxpow / 2;
}

View File

@ -1,6 +1,6 @@
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2207,6 +2207,7 @@ struct cfg80211_qos_map {
@@ -2214,6 +2214,7 @@ struct cfg80211_qos_map {
* (as advertised by the nl80211 feature flag.)
* @get_tx_power: store the current TX power into the dbm variable;
* return 0 if successful
@ -8,7 +8,7 @@
*
* @set_wds_peer: set the WDS peer for a WDS interface
*
@@ -2431,6 +2432,7 @@ struct cfg80211_ops {
@@ -2450,6 +2451,7 @@ struct cfg80211_ops {
enum nl80211_tx_power_setting type, int mbm);
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int *dbm);
@ -18,7 +18,7 @@
const u8 *addr);
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1032,6 +1032,7 @@ enum ieee80211_smps_mode {
@@ -1075,6 +1075,7 @@ enum ieee80211_smps_mode {
*
* @power_level: requested transmit power (in dBm), backward compatibility
* value only that is set to the minimum of all interfaces
@ -26,7 +26,7 @@
*
* @chandef: the channel definition to tune to
* @radar_enabled: whether radar detection is enabled
@@ -1053,6 +1054,7 @@ struct ieee80211_conf {
@@ -1096,6 +1097,7 @@ struct ieee80211_conf {
u32 flags;
int power_level, dynamic_ps_timeout;
int max_sleep_period;
@ -36,9 +36,9 @@
u8 ps_dtim_period;
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1591,6 +1591,9 @@ enum nl80211_commands {
* creation then the new interface will be owned by the netlink socket
* that created it and will be destroyed when the socket is closed
@@ -1638,6 +1638,9 @@ enum nl80211_commands {
* @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see
* &enum nl80211_smps_mode.
*
+ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
+ * transmit power to stay within regulatory limits. u32, dBi.
@ -46,9 +46,9 @@
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1931,6 +1934,8 @@ enum nl80211_attrs {
NL80211_ATTR_CSA_C_OFFSETS_TX,
NL80211_ATTR_MAX_CSA_COUNTERS,
@@ -1990,6 +1993,8 @@ enum nl80211_attrs {
NL80211_ATTR_SMPS_MODE,
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
+
@ -57,7 +57,7 @@
__NL80211_ATTR_AFTER_LAST,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2094,6 +2094,19 @@ static int ieee80211_get_tx_power(struct
@@ -2091,6 +2091,19 @@ static int ieee80211_get_tx_power(struct
return 0;
}
@ -77,7 +77,7 @@
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr)
{
@@ -3517,6 +3530,7 @@ const struct cfg80211_ops mac80211_confi
@@ -3572,6 +3585,7 @@ const struct cfg80211_ops mac80211_confi
.set_wiphy_params = ieee80211_set_wiphy_params,
.set_tx_power = ieee80211_set_tx_power,
.get_tx_power = ieee80211_get_tx_power,
@ -87,7 +87,7 @@
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1243,6 +1243,7 @@ struct ieee80211_local {
@@ -1280,6 +1280,7 @@ struct ieee80211_local {
int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */
@ -97,7 +97,7 @@
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -97,7 +97,7 @@ static u32 ieee80211_hw_conf_chan(struct
@@ -98,7 +98,7 @@ static u32 ieee80211_hw_conf_chan(struct
struct ieee80211_sub_if_data *sdata;
struct cfg80211_chan_def chandef = {};
u32 changed = 0;
@ -106,7 +106,7 @@
u32 offchannel_flag;
offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
@@ -154,6 +154,12 @@ static u32 ieee80211_hw_conf_chan(struct
@@ -155,6 +155,12 @@ static u32 ieee80211_hw_conf_chan(struct
}
rcu_read_unlock();
@ -119,7 +119,7 @@
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;
local->hw.cur_power_level = power;
@@ -584,6 +590,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(
@@ -586,6 +592,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(
IEEE80211_RADIOTAP_MCS_HAVE_BW;
local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
@ -129,15 +129,15 @@
local->user_power_level = IEEE80211_UNSET_POWER_LEVEL;
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -387,6 +387,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 },
[NL80211_ATTR_IFACE_SOCKET_OWNER] = { .type = NLA_FLAG },
[NL80211_ATTR_CSA_C_OFFSETS_TX] = { .type = NLA_BINARY },
@@ -395,6 +395,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_USER_PRIO] = { .type = NLA_U8 },
[NL80211_ATTR_ADMITTED_TIME] = { .type = NLA_U16 },
[NL80211_ATTR_SMPS_MODE] = { .type = NLA_U8 },
+ [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 },
};
/* policy for the key attributes */
@@ -2162,6 +2163,20 @@ static int nl80211_set_wiphy(struct sk_b
@@ -2179,6 +2180,20 @@ static int nl80211_set_wiphy(struct sk_b
return result;
}

View File

@ -1,34 +0,0 @@
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -83,6 +83,7 @@ struct ath_regulatory {
u16 max_power_level;
u16 current_rd;
int16_t power_limit;
+ int16_t max_antenna_gain;
struct reg_dmn_pair_mapping *regpair;
};
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2724,7 +2724,7 @@ void ath9k_hw_apply_txpower(struct ath_h
channel = chan->chan;
chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
new_pwr = min_t(int, chan_pwr, reg->power_limit);
- max_gain = chan_pwr - new_pwr + channel->max_antenna_gain * 2;
+ max_gain = chan_pwr - new_pwr + reg->max_antenna_gain * 2;
ant_gain = get_antenna_gain(ah, chan);
if (ant_gain > max_gain)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1405,7 +1405,10 @@ static int ath9k_config(struct ieee80211
}
if (changed & IEEE80211_CONF_CHANGE_POWER) {
+ struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
+
ath_dbg(common, CONFIG, "Set power: %d\n", conf->power_level);
+ reg->max_antenna_gain = conf->max_antenna_gain;
sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -565,6 +565,9 @@ static inline int ath9k_dump_btcoex(stru
@@ -799,6 +799,9 @@ static inline int ath9k_dump_btcoex(stru
void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc);
void ath_fill_led_pin(struct ath_softc *sc);
@ -10,9 +10,9 @@
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
@@ -703,6 +706,13 @@ void ath_ant_comb_scan(struct ath_softc
#define PS_BEACON_SYNC BIT(4)
#define PS_WAIT_FOR_ANI BIT(5)
@@ -939,6 +942,13 @@ void ath_ant_comb_scan(struct ath_softc
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
+struct ath_led {
+ struct list_head list;
@ -24,8 +24,8 @@
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
@@ -745,9 +755,8 @@ struct ath_softc {
struct ath_beacon beacon;
@@ -990,9 +1000,8 @@ struct ath_softc {
spinlock_t chan_lock;
#ifdef CPTCFG_MAC80211_LEDS
- bool led_registered;
@ -35,7 +35,7 @@
+ struct list_head leds;
#endif
struct ath9k_hw_cal_data caldata;
#ifdef CPTCFG_ATH9K_DEBUGFS
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -24,40 +24,102 @@
@ -162,7 +162,7 @@
void ath_fill_led_pin(struct ath_softc *sc)
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -815,7 +815,7 @@ int ath9k_init_device(u16 devid, struct
@@ -889,7 +889,7 @@ int ath9k_init_device(u16 devid, struct
#ifdef CPTCFG_MAC80211_LEDS
/* must be initialized before ieee80211_register_hw */
@ -173,7 +173,7 @@
#endif
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1381,6 +1381,61 @@ static const struct file_operations fops
@@ -1410,6 +1410,61 @@ static const struct file_operations fops
.llseek = default_llseek,
};
@ -235,7 +235,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
@@ -1405,6 +1460,10 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1434,6 +1489,10 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_eeprom);
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
sc, &fops_chanbw);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1437,6 +1437,50 @@ static const struct file_operations fops
@@ -1466,6 +1466,50 @@ static const struct file_operations fops
#endif
@ -51,7 +51,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1464,6 +1508,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1493,6 +1537,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("gpio_led", S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_gpio_led);
#endif
@ -62,7 +62,7 @@
debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -482,6 +482,12 @@ enum {
@@ -483,6 +483,12 @@ enum {
ATH9K_RESET_COLD,
};
@ -75,7 +75,7 @@
struct ath9k_hw_version {
u32 magic;
u16 devid;
@@ -762,6 +768,8 @@ struct ath_hw {
@@ -763,6 +769,8 @@ struct ath_hw {
u32 rfkill_polarity;
u32 ah_flags;
@ -84,7 +84,7 @@
bool reset_power_on;
bool htc_reset_init;
@@ -1013,6 +1021,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
@@ -1017,6 +1025,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
bool ath9k_hw_check_alive(struct ath_hw *ah);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
@ -94,9 +94,9 @@
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1738,6 +1738,20 @@ fail:
return -EINVAL;
@@ -1763,6 +1763,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
}
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
+void ath9k_hw_update_diag(struct ath_hw *ah)
+{
@ -115,7 +115,7 @@
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
struct ath9k_hw_cal_data *caldata, bool fastcc)
{
@@ -1943,6 +1957,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
@@ -1965,6 +1979,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ar9003_hw_disable_phy_restart(ah);
ath9k_hw_apply_gpio_override(ah);
@ -125,7 +125,7 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -606,6 +606,11 @@ irqreturn_t ath_isr(int irq, void *dev)
@@ -531,6 +531,11 @@ irqreturn_t ath_isr(int irq, void *dev)
ath9k_debug_sync_cause(sc, sync_cause);
status &= ah->imask; /* discard unasked-for bits */

View File

@ -11,7 +11,7 @@
int (*external_reset)(void);
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2331,17 +2331,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
@@ -2359,17 +2359,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
}
eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
@ -47,7 +47,7 @@
AR_SREV_9285(ah) ||
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -932,6 +932,8 @@ struct ath_hw {
@@ -933,6 +933,8 @@ struct ath_hw {
bool is_clk_25mhz;
int (*get_mac_revision)(void);
int (*external_reset)(void);
@ -55,10 +55,10 @@
+ bool disable_5ghz;
const struct firmware *eeprom_blob;
};
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -518,6 +518,8 @@ static int ath9k_init_softc(u16 devid, s
@@ -528,6 +528,8 @@ static int ath9k_init_softc(u16 devid, s
ah->is_clk_25mhz = pdata->is_clk_25mhz;
ah->get_mac_revision = pdata->get_mac_revision;
ah->external_reset = pdata->external_reset;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -678,6 +678,7 @@ struct ath_spec_scan {
@@ -679,6 +679,7 @@ struct ath_spec_scan {
* @config_pci_powersave:
* @calibrate: periodic calibration for NF, ANI, IQ, ADC gain, ADC-DC
*
@ -8,7 +8,7 @@
* @spectral_scan_config: set parameters for spectral scan and enable/disable it
* @spectral_scan_trigger: trigger a spectral scan run
* @spectral_scan_wait: wait for a spectral scan run to finish
@@ -701,6 +702,7 @@ struct ath_hw_ops {
@@ -702,6 +703,7 @@ struct ath_hw_ops {
struct ath_hw_antcomb_conf *antconf);
void (*antdiv_comb_conf_set)(struct ath_hw *ah,
struct ath_hw_antcomb_conf *antconf);
@ -18,7 +18,7 @@
void (*spectral_scan_trigger)(struct ath_hw *ah);
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1781,6 +1781,26 @@ static void ar9003_hw_tx99_set_txpower(s
@@ -1766,6 +1766,26 @@ static void ar9003_hw_tx99_set_txpower(s
ATH9K_POW_SM(p_pwr_array[ALL_TARGET_HT40_14], 0));
}
@ -45,7 +45,7 @@
void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
{
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
@@ -1816,6 +1836,7 @@ void ar9003_hw_attach_phy_ops(struct ath
@@ -1796,6 +1816,7 @@ void ar9003_hw_attach_phy_ops(struct ath
priv_ops->set_radar_params = ar9003_hw_set_radar_params;
priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
@ -55,7 +55,7 @@
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -646,7 +646,8 @@ static void ath9k_init_txpower_limits(st
@@ -662,7 +662,8 @@ static void ath9k_init_txpower_limits(st
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
ath9k_init_band_txpower(sc, IEEE80211_BAND_5GHZ);
@ -65,7 +65,7 @@
}
static const struct ieee80211_iface_limit if_limits[] = {
@@ -774,6 +775,18 @@ static void ath9k_set_hw_capab(struct at
@@ -848,6 +849,18 @@ static void ath9k_set_hw_capab(struct at
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
}
@ -84,7 +84,7 @@
int ath9k_init_device(u16 devid, struct ath_softc *sc,
const struct ath_bus_ops *bus_ops)
{
@@ -822,6 +835,8 @@ int ath9k_init_device(u16 devid, struct
@@ -896,6 +909,8 @@ int ath9k_init_device(u16 devid, struct
ARRAY_SIZE(ath9k_tpt_blink));
#endif
@ -110,7 +110,7 @@
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -1232,9 +1232,30 @@ static void ar5008_hw_set_radar_conf(str
@@ -1231,9 +1231,30 @@ static void ar5008_hw_set_radar_conf(str
conf->radar_inband = 8;
}
@ -141,7 +141,7 @@
static const u32 ar5416_cca_regs[6] = {
AR_PHY_CCA,
AR_PHY_CH1_CCA,
@@ -1249,6 +1270,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
@@ -1248,6 +1269,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
if (ret)
return ret;

View File

@ -20,7 +20,7 @@
/******************/
/* Chip Revisions */
/******************/
@@ -1340,6 +1353,9 @@ static bool ath9k_hw_set_reset(struct at
@@ -1348,6 +1361,9 @@ static bool ath9k_hw_set_reset(struct at
if (AR_SREV_9100(ah))
udelay(50);
@ -30,7 +30,7 @@
return true;
}
@@ -1439,6 +1455,9 @@ static bool ath9k_hw_chip_reset(struct a
@@ -1447,6 +1463,9 @@ static bool ath9k_hw_chip_reset(struct a
ar9003_hw_internal_regulator_apply(ah);
ath9k_hw_init_pll(ah, chan);
@ -40,7 +40,7 @@
return true;
}
@@ -1733,8 +1752,14 @@ static int ath9k_hw_do_fastcc(struct ath
@@ -1741,8 +1760,14 @@ static int ath9k_hw_do_fastcc(struct ath
if (AR_SREV_9271(ah))
ar9002_hw_load_ani_reg(ah, chan);
@ -55,9 +55,9 @@
return -EINVAL;
}
@@ -1962,6 +1987,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
if (AR_SREV_9565(ah) && common->bt_ant_diversity)
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
@@ -1990,6 +2015,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ath9k_hw_set_radar_params(ah);
}
+ if (AR_SREV_9330(ah) || AR_SREV_9340(ah))
+ ath9k_hw_disable_pll_lock_detect(ah);

View File

@ -1,8 +1,8 @@
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@ -133,6 +133,11 @@ config ATH9K_RFKILL
seconds. Turn off to save power, but enable it if you have
a platform that can toggle the RF-Kill GPIO.
@@ -151,6 +151,11 @@ config ATH9K_CHANNEL_CONTEXT
for multi-channel concurrency. Enable this if P2P PowerSave support
is required.
+config ATH9K_PCOEM
+ bool "Atheros ath9k support for PC OEM cards" if EXPERT
@ -14,7 +14,7 @@
depends on m
--- a/drivers/net/wireless/ath/ath9k/Makefile
+++ b/drivers/net/wireless/ath/ath9k/Makefile
@@ -31,7 +31,6 @@ ath9k_hw-y:= \
@@ -32,7 +32,6 @@ ath9k_hw-y:= \
ar5008_phy.o \
ar9002_calib.o \
ar9003_calib.o \
@ -22,15 +22,15 @@
calib.o \
eeprom.o \
eeprom_def.o \
@@ -48,6 +47,8 @@ ath9k_hw-$(CPTCFG_ATH9K_WOW) += ar9003_w
@@ -50,6 +49,8 @@ ath9k_hw-$(CPTCFG_ATH9K_WOW) += ar9003_w
ath9k_hw-$(CPTCFG_ATH9K_BTCOEX_SUPPORT) += btcoex.o \
ar9003_mci.o
+ath9k_hw-$(CPTCFG_ATH9K_PCOEM) += ar9003_rtt.o
+
obj-$(CPTCFG_ATH9K_HW) += ath9k_hw.o
ath9k_hw-$(CPTCFG_ATH9K_DYNACK) += dynack.o
obj-$(CPTCFG_ATH9K_COMMON) += ath9k_common.o
obj-$(CPTCFG_ATH9K_HW) += ath9k_hw.o
--- a/drivers/net/wireless/ath/ath9k/ar9003_rtt.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_rtt.h
@@ -17,6 +17,7 @@
@ -84,7 +84,7 @@
#endif
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -244,13 +244,20 @@ enum ath9k_hw_caps {
@@ -245,13 +245,20 @@ enum ath9k_hw_caps {
ATH9K_HW_CAP_2GHZ = BIT(11),
ATH9K_HW_CAP_5GHZ = BIT(12),
ATH9K_HW_CAP_APM = BIT(13),
@ -112,7 +112,7 @@
/*
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -355,6 +355,9 @@ static void ath9k_init_pcoem_platform(st
@@ -362,6 +362,9 @@ static void ath9k_init_pcoem_platform(st
struct ath9k_hw_capabilities *pCap = &ah->caps;
struct ath_common *common = ath9k_hw_common(ah);
@ -124,7 +124,7 @@
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -30,6 +30,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
@@ -30,6 +30,7 @@ static const struct pci_device_id ath_pc
{ PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */
{ PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */
@ -132,7 +132,7 @@
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
0x002A,
PCI_VENDOR_ID_AZWAVE,
@@ -82,6 +83,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
@@ -82,6 +83,7 @@ static const struct pci_device_id ath_pc
PCI_VENDOR_ID_AZWAVE,
0x2C37),
.driver_data = ATH9K_PCI_BT_ANT_DIV },
@ -140,7 +140,7 @@
{ PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */
{ PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */
@@ -102,6 +104,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
@@ -102,6 +104,7 @@ static const struct pci_device_id ath_pc
{ PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E AR9300 */
@ -148,7 +148,7 @@
/* PCI-E CUS198 */
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
0x0032,
@@ -294,10 +297,12 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
@@ -294,10 +297,12 @@ static const struct pci_device_id ath_pc
PCI_VENDOR_ID_ASUSTEK,
0x850D),
.driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
@ -161,7 +161,7 @@
/* PCI-E CUS217 */
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
0x0034,
@@ -657,6 +662,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
@@ -657,6 +662,7 @@ static const struct pci_device_id ath_pc
/* PCI-E AR9565 (WB335) */
{ PCI_VDEVICE(ATHEROS, 0x0036),
.driver_data = ATH9K_PCI_BT_ANT_DIV },
@ -171,7 +171,7 @@
{ 0 }
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -891,10 +891,21 @@
@@ -892,10 +892,21 @@
(AR_SREV_9330((_ah)) && \
((_ah)->hw_version.macRev == AR_SREV_REVISION_9330_12))
@ -194,7 +194,7 @@
((_ah)->hw_version.macRev >= AR_SREV_REVISION_9485_11))
#define AR_SREV_9485_OR_LATER(_ah) \
(((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9485))
@@ -910,34 +921,30 @@
@@ -911,34 +922,30 @@
(AR_SREV_9285_12_OR_LATER(_ah) && \
((REG_READ(_ah, AR_AN_SYNTH9) & 0x7) == 0x1))
@ -239,7 +239,7 @@
#define AR_SREV_9550(_ah) \
--- a/.local-symbols
+++ b/.local-symbols
@@ -129,6 +129,7 @@ ATH9K_HW=
@@ -124,6 +124,7 @@ ATH9K_HW=
ATH9K_COMMON=
ATH9K_DFS_DEBUGFS=
ATH9K_BTCOEX_SUPPORT=

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -663,9 +663,6 @@ static void ar9003_tx_gain_table_mode5(s
@@ -670,9 +670,6 @@ static void ar9003_tx_gain_table_mode5(s
if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9485Modes_green_ob_db_tx_gain_1_1);

View File

@ -79,7 +79,7 @@
/**
* ar9003_hw_set_channel - set channel on single-chip device
* @ah: atheros hardware structure
@@ -971,11 +957,6 @@ static bool ar9003_hw_ani_control(struct
@@ -954,11 +940,6 @@ static bool ar9003_hw_ani_control(struct
struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_channel *chan = ah->curchan;
struct ar5416AniState *aniState = &ah->ani;
@ -91,7 +91,7 @@
s32 value, value2;
switch (cmd & ah->ani_function) {
@@ -989,61 +970,6 @@ static bool ar9003_hw_ani_control(struct
@@ -972,61 +953,6 @@ static bool ar9003_hw_ani_control(struct
*/
u32 on = param ? 1 : 0;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -628,8 +628,7 @@ irqreturn_t ath_isr(int irq, void *dev)
@@ -553,8 +553,7 @@ irqreturn_t ath_isr(int irq, void *dev)
* If a FATAL or RXORN interrupt is received, we have to reset the
* chip immediately.
*/

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -846,36 +846,30 @@ static ssize_t read_file_reset(struct fi
@@ -852,36 +852,30 @@ static ssize_t read_file_reset(struct fi
size_t count, loff_t *ppos)
{
struct ath_softc *sc = file->private_data;

View File

@ -117,7 +117,7 @@
ath9k_hw_start_nfcal(ah, false);
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -695,10 +695,8 @@ struct ath_hw_ops {
@@ -696,10 +696,8 @@ struct ath_hw_ops {
bool power_off);
void (*rx_enable)(struct ath_hw *ah);
void (*set_desc_link)(void *ds, u32 link);
@ -142,7 +142,7 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -857,6 +857,7 @@ static ssize_t read_file_reset(struct fi
@@ -863,6 +863,7 @@ static ssize_t read_file_reset(struct fi
[RESET_TYPE_MAC_HANG] = "MAC Hang",
[RESET_TYPE_BEACON_STUCK] = "Stuck Beacon",
[RESET_TYPE_MCI] = "MCI Reset",

View File

@ -10,7 +10,7 @@
set_bit(NFCAL_PENDING, &ah->caldata->cal_flags);
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1972,8 +1972,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
@@ -1994,8 +1994,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
if (ath9k_hw_mci_is_enabled(ah))
ar9003_mci_check_bt(ah);

View File

@ -22,7 +22,7 @@ Changes since v1: ---
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2958,17 +2958,4 @@ enum rt2800_eeprom_word {
@@ -2960,17 +2960,4 @@ enum rt2800_eeprom_word {
*/
#define BCN_TBTT_OFFSET 64

View File

@ -24,7 +24,7 @@ Changes since v1:
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7734,6 +7734,7 @@ static int rt2800_probe_rt(struct rt2x00
@@ -7740,6 +7740,7 @@ static int rt2800_probe_rt(struct rt2x00
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
{
@ -32,7 +32,7 @@ Changes since v1:
int retval;
u32 reg;
@@ -7741,6 +7742,9 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -7747,6 +7748,9 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (retval)
return retval;

View File

@ -187,7 +187,7 @@ Changes since v1: ---
}
/*
@@ -4898,14 +4931,19 @@ static int rt2800_init_registers(struct
@@ -4901,14 +4934,19 @@ static int rt2800_init_registers(struct
/*
* ASIC will keep garbage value after boot, clear encryption keys.
*/
@ -207,7 +207,7 @@ Changes since v1: ---
}
/*
@@ -5031,8 +5069,10 @@ static int rt2800_wait_bbp_ready(struct
@@ -5034,8 +5072,10 @@ static int rt2800_wait_bbp_ready(struct
* BBP was enabled after firmware was loaded,
* but we need to reactivate it now.
*/
@ -218,7 +218,7 @@ Changes since v1: ---
msleep(1);
for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
@@ -6728,11 +6768,19 @@ int rt2800_enable_radio(struct rt2x00_de
@@ -6731,11 +6771,19 @@ int rt2800_enable_radio(struct rt2x00_de
/*
* Send signal during boot time to initialize firmware.
*/
@ -239,7 +239,7 @@ Changes since v1: ---
msleep(1);
/*
@@ -7738,6 +7786,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -7744,6 +7792,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
int retval;
u32 reg;
@ -248,7 +248,7 @@ Changes since v1: ---
retval = rt2800_probe_rt(rt2x00dev);
if (retval)
return retval;
@@ -7817,8 +7867,11 @@ void rt2800_get_tkip_seq(struct ieee8021
@@ -7823,8 +7873,11 @@ void rt2800_get_tkip_seq(struct ieee8021
u32 offset;
offset = MAC_IVEIV_ENTRY(hw_key_idx);
@ -486,9 +486,9 @@ Changes since v1: ---
/*
* Queue handlers.
*/
@@ -260,8 +281,10 @@ static int rt2800usb_write_firmware(stru
rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
data + offset, length);
@@ -294,8 +315,10 @@ static int rt2800usb_write_firmware(stru
data + offset, length);
}
+ rt2800_shared_mem_lock(rt2x00dev);
rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
@ -497,7 +497,7 @@ Changes since v1: ---
/*
* Send firmware request to device to load firmware,
@@ -276,7 +299,10 @@ static int rt2800usb_write_firmware(stru
@@ -310,7 +333,10 @@ static int rt2800usb_write_firmware(stru
}
msleep(10);
@ -508,7 +508,7 @@ Changes since v1: ---
return 0;
}
@@ -294,8 +320,10 @@ static int rt2800usb_init_registers(stru
@@ -328,8 +354,10 @@ static int rt2800usb_init_registers(stru
if (rt2800_wait_csr_ready(rt2x00dev))
return -EBUSY;
@ -519,7 +519,7 @@ Changes since v1: ---
reg = 0;
rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_CSR, 1);
@@ -810,6 +838,9 @@ static const struct rt2800_ops rt2800usb
@@ -859,6 +887,9 @@ static const struct rt2800_ops rt2800usb
.drv_write_firmware = rt2800usb_write_firmware,
.drv_init_registers = rt2800usb_init_registers,
.drv_get_txwi = rt2800usb_get_txwi,

View File

@ -29,7 +29,7 @@ Changes since v1: ---
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -572,6 +572,7 @@
@@ -574,6 +574,7 @@
#define PBF_SYS_CTRL 0x0400
#define PBF_SYS_CTRL_READY FIELD32(0x00000080)
#define PBF_SYS_CTRL_HOST_RAM_WRITE FIELD32(0x00010000)
@ -37,7 +37,7 @@ Changes since v1: ---
/*
* HOST-MCU shared memory
@@ -2024,6 +2025,8 @@ struct mac_iveiv_entry {
@@ -2026,6 +2027,8 @@ struct mac_iveiv_entry {
(((__index) < 6) ? (HW_BEACON_BASE4 + ((__index - 4) * 0x0200)) : \
(HW_BEACON_BASE6 - ((__index - 6) * 0x0200))))

View File

@ -24,7 +24,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4628,6 +4628,7 @@ EXPORT_SYMBOL_GPL(rt2800_link_tuner);
@@ -4631,6 +4631,7 @@ EXPORT_SYMBOL_GPL(rt2800_link_tuner);
*/
static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
{
@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
u32 reg;
u16 eeprom;
unsigned int i;
@@ -4993,7 +4994,7 @@ static int rt2800_init_registers(struct
@@ -4996,7 +4997,7 @@ static int rt2800_init_registers(struct
/*
* Clear all beacons
*/
@ -41,7 +41,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
rt2800_clear_beacon_register(rt2x00dev, i);
if (rt2x00_is_usb(rt2x00dev)) {
@@ -7839,6 +7840,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -7845,6 +7846,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (rt2x00_rt(rt2x00dev, RT3593))
__set_bit(RT2800_HAS_HIGH_SHARED_MEM, &drv_data->rt2800_flags);

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -627,6 +627,20 @@
@@ -629,6 +629,20 @@
*/
#define PBF_DBG 0x043c
@ -34,7 +34,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
*/
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4640,6 +4640,30 @@ static int rt2800_init_registers(struct
@@ -4643,6 +4643,30 @@ static int rt2800_init_registers(struct
if (ret)
return ret;

View File

@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7864,7 +7864,10 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -7870,7 +7870,10 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (rt2x00_rt(rt2x00dev, RT3593))
__set_bit(RT2800_HAS_HIGH_SHARED_MEM, &drv_data->rt2800_flags);

View File

@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7834,6 +7834,7 @@ static int rt2800_probe_rt(struct rt2x00
@@ -7840,6 +7840,7 @@ static int rt2800_probe_rt(struct rt2x00
case RT3390:
case RT3572:
case RT3593:

View File

@ -21,17 +21,17 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
* RF5592 2.4G/5G 2T2R
* RF3070 2.4G 1T1R
* RF5360 2.4G 1T1R
@@ -71,6 +72,7 @@
@@ -72,6 +73,7 @@
#define RF5592 0x000f
#define RF3070 0x3070
#define RF3290 0x3290
+#define RF3853 0x3853
#define RF5360 0x5360
#define RF5362 0x5362
#define RF5370 0x5370
#define RF5372 0x5372
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7454,6 +7454,66 @@ static const struct rf_channel rf_vals_3
@@ -7458,6 +7458,66 @@ static const struct rf_channel rf_vals_3
{173, 0x61, 0, 9},
};
@ -98,7 +98,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
static const struct rf_channel rf_vals_5592_xtal20[] = {
/* Channel, N, K, mod, R */
{1, 482, 4, 10, 3},
@@ -7682,6 +7742,11 @@ static int rt2800_probe_hw_mode(struct r
@@ -7687,6 +7747,11 @@ static int rt2800_probe_hw_mode(struct r
spec->channels = rf_vals_3x;
break;

View File

@ -10,19 +10,19 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4393,6 +4393,7 @@ void rt2800_vco_calibration(struct rt2x0
@@ -4395,6 +4395,7 @@ void rt2800_vco_calibration(struct rt2x0
case RF3053:
case RF3070:
case RF3290:
+ case RF3853:
case RF5360:
case RF5362:
case RF5370:
case RF5372:
@@ -7861,6 +7862,7 @@ static int rt2800_probe_hw_mode(struct r
@@ -7866,6 +7867,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3053:
case RF3070:
case RF3290:
+ case RF3853:
case RF5360:
case RF5362:
case RF5370:
case RF5372:

View File

@ -232,4 +232,4 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+ break;
case RF3070:
case RF5360:
case RF5370:
case RF5362:

View File

@ -10,11 +10,11 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7420,6 +7420,7 @@ static int rt2800_init_eeprom(struct rt2
@@ -7423,6 +7423,7 @@ static int rt2800_init_eeprom(struct rt2
case RF3290:
case RF3320:
case RF3322:
+ case RF3853:
case RF5360:
case RF5362:
case RF5370:
case RF5372:

View File

@ -12,7 +12,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -1586,6 +1586,20 @@
@@ -1588,6 +1588,20 @@
#define TX_PWR_CFG_9_STBC7_CH2 FIELD32(0x00000f00)
/*
@ -35,7 +35,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#define RX_FILTER_CFG 0x1400
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4995,6 +4995,12 @@ static int rt2800_init_registers(struct
@@ -4998,6 +4998,12 @@ static int rt2800_init_registers(struct
rt2800_register_write(rt2x00dev, TX_SW_CFG2,
0x00000000);
}
@ -48,7 +48,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392) ||
rt2x00_rt(rt2x00dev, RT5592)) {
@@ -5025,9 +5031,11 @@ static int rt2800_init_registers(struct
@@ -5028,9 +5034,11 @@ static int rt2800_init_registers(struct
rt2800_register_read(rt2x00dev, MAX_LEN_CFG, &reg);
rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE);
@ -63,7 +63,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_PSDU, 2);
else
rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_PSDU, 1);
@@ -5180,6 +5188,11 @@ static int rt2800_init_registers(struct
@@ -5183,6 +5191,11 @@ static int rt2800_init_registers(struct
reg = rt2x00_rt(rt2x00dev, RT5592) ? 0x00000082 : 0x00000002;
rt2800_register_write(rt2x00dev, TXOP_HLDR_ET, reg);

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -5798,6 +5798,47 @@ static void rt2800_init_bbp_3593(struct
@@ -5801,6 +5801,47 @@ static void rt2800_init_bbp_3593(struct
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
}
@ -59,7 +59,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
static void rt2800_init_bbp_53xx(struct rt2x00_dev *rt2x00dev)
{
int ant, div_mode;
@@ -6016,6 +6057,9 @@ static void rt2800_init_bbp(struct rt2x0
@@ -6019,6 +6060,9 @@ static void rt2800_init_bbp(struct rt2x0
case RT3593:
rt2800_init_bbp_3593(rt2x00dev);
return;

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2169,6 +2169,7 @@ struct mac_iveiv_entry {
@@ -2171,6 +2171,7 @@ struct mac_iveiv_entry {
/*
* RFCSR 2:
*/
@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
/*
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -6833,6 +6833,144 @@ static void rt2800_init_rfcsr_3593(struc
@@ -6836,6 +6836,144 @@ static void rt2800_init_rfcsr_3593(struc
/* TODO: enable stream mode support */
}
@ -166,7 +166,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 2);
@@ -7064,6 +7202,9 @@ static void rt2800_init_rfcsr(struct rt2
@@ -7067,6 +7205,9 @@ static void rt2800_init_rfcsr(struct rt2
case RT3390:
rt2800_init_rfcsr_3390(rt2x00dev);
break;

View File

@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7601,6 +7601,8 @@ static int rt2800_init_eeprom(struct rt2
@@ -7604,6 +7604,8 @@ static int rt2800_init_eeprom(struct rt2
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);

View File

@ -60,7 +60,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
switch (rt2x00dev->chip.rf) {
case RF2020:
case RF3020:
@@ -3528,6 +3564,15 @@ static void rt2800_config_channel(struct
@@ -3530,6 +3566,15 @@ static void rt2800_config_channel(struct
rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain);
rt2800_bbp_write(rt2x00dev, 64, 0x37 - rt2x00dev->lna_gain);
rt2800_bbp_write(rt2x00dev, 77, 0x98);
@ -76,7 +76,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
} else {
rt2800_bbp_write(rt2x00dev, 62, 0x37 - rt2x00dev->lna_gain);
rt2800_bbp_write(rt2x00dev, 63, 0x37 - rt2x00dev->lna_gain);
@@ -3540,6 +3585,7 @@ static void rt2800_config_channel(struct
@@ -3542,6 +3587,7 @@ static void rt2800_config_channel(struct
!rt2x00_rt(rt2x00dev, RT5392)) {
if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) {
rt2800_bbp_write(rt2x00dev, 82, 0x62);
@ -84,7 +84,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
rt2800_bbp_write(rt2x00dev, 75, 0x46);
} else {
if (rt2x00_rt(rt2x00dev, RT3593))
@@ -3548,19 +3594,22 @@ static void rt2800_config_channel(struct
@@ -3550,19 +3596,22 @@ static void rt2800_config_channel(struct
rt2800_bbp_write(rt2x00dev, 82, 0x84);
rt2800_bbp_write(rt2x00dev, 75, 0x50);
}
@ -110,7 +110,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
rt2800_bbp_write(rt2x00dev, 83, 0x9a);
if (rt2x00_has_cap_external_lna_a(rt2x00dev))
@@ -3685,6 +3734,23 @@ static void rt2800_config_channel(struct
@@ -3687,6 +3736,23 @@ static void rt2800_config_channel(struct
usleep_range(1000, 1500);
}

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4626,7 +4626,8 @@ static void rt2800_config_txpower(struct
@@ -4628,7 +4628,8 @@ static void rt2800_config_txpower(struct
struct ieee80211_channel *chan,
int power_level)
{

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7483,7 +7483,8 @@ static u8 rt2800_get_txmixer_gain_24g(st
@@ -7486,7 +7486,8 @@ static u8 rt2800_get_txmixer_gain_24g(st
{
u16 word;
@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
return 0;
rt2800_eeprom_read(rt2x00dev, EEPROM_TXMIXER_GAIN_BG, &word);
@@ -7497,7 +7498,8 @@ static u8 rt2800_get_txmixer_gain_5g(str
@@ -7500,7 +7501,8 @@ static u8 rt2800_get_txmixer_gain_5g(str
{
u16 word;

View File

@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -8415,7 +8415,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -8421,7 +8421,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (rt2x00_rt(rt2x00dev, RT3593))
__set_bit(RT2800_HAS_HIGH_SHARED_MEM, &drv_data->rt2800_flags);

View File

@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4825,7 +4825,8 @@ static u8 rt2800_get_default_vgc(struct
@@ -4828,7 +4828,8 @@ static u8 rt2800_get_default_vgc(struct
else
vgc = 0x2e + rt2x00dev->lna_gain;
} else { /* 5GHZ band */
@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
vgc = 0x20 + (rt2x00dev->lna_gain * 5) / 3;
else if (rt2x00_rt(rt2x00dev, RT5592))
vgc = 0x24 + (2 * rt2x00dev->lna_gain);
@@ -4845,7 +4846,8 @@ static inline void rt2800_set_vgc(struct
@@ -4848,7 +4849,8 @@ static inline void rt2800_set_vgc(struct
{
if (qual->vgc_level != vgc_level) {
if (rt2x00_rt(rt2x00dev, RT3572) ||
@ -30,7 +30,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
rt2800_bbp_write_with_rx_chain(rt2x00dev, 66,
vgc_level);
} else if (rt2x00_rt(rt2x00dev, RT5592)) {
@@ -4892,6 +4894,11 @@ void rt2800_link_tuner(struct rt2x00_dev
@@ -4895,6 +4897,11 @@ void rt2800_link_tuner(struct rt2x00_dev
}
break;

View File

@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7620,7 +7620,8 @@ static int rt2800_validate_eeprom(struct
@@ -7623,7 +7623,8 @@ static int rt2800_validate_eeprom(struct
rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_BG2, &word);
if (abs(rt2x00_get_field16(word, EEPROM_RSSI_BG2_OFFSET2)) > 10)
rt2x00_set_field16(&word, EEPROM_RSSI_BG2_OFFSET2, 0);
@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
if (rt2x00_get_field16(word, EEPROM_RSSI_BG2_LNA_A1) == 0x00 ||
rt2x00_get_field16(word, EEPROM_RSSI_BG2_LNA_A1) == 0xff)
rt2x00_set_field16(&word, EEPROM_RSSI_BG2_LNA_A1,
@@ -7640,7 +7641,8 @@ static int rt2800_validate_eeprom(struct
@@ -7643,7 +7644,8 @@ static int rt2800_validate_eeprom(struct
rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_A2, &word);
if (abs(rt2x00_get_field16(word, EEPROM_RSSI_A2_OFFSET2)) > 10)
rt2x00_set_field16(&word, EEPROM_RSSI_A2_OFFSET2, 0);
@ -30,7 +30,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
if (rt2x00_get_field16(word, EEPROM_RSSI_A2_LNA_A2) == 0x00 ||
rt2x00_get_field16(word, EEPROM_RSSI_A2_LNA_A2) == 0xff)
rt2x00_set_field16(&word, EEPROM_RSSI_A2_LNA_A2,
@@ -7648,7 +7650,8 @@ static int rt2800_validate_eeprom(struct
@@ -7651,7 +7653,8 @@ static int rt2800_validate_eeprom(struct
}
rt2800_eeprom_write(rt2x00dev, EEPROM_RSSI_A2, word);

View File

@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4003,6 +4003,9 @@ static u8 rt2800_compensate_txpower(stru
@@ -4005,6 +4005,9 @@ static u8 rt2800_compensate_txpower(stru
if (rt2x00_rt(rt2x00dev, RT3593))
return min_t(u8, txpower, 0xc);

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -8428,7 +8428,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -8434,7 +8434,8 @@ int rt2800_probe_hw(struct rt2x00_dev *r
if (retval)
return retval;

View File

@ -122,7 +122,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
*/
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -986,6 +986,11 @@ struct rt2x00_dev {
@@ -987,6 +987,11 @@ struct rt2x00_dev {
int rf_channel;
/*

View File

@ -1,6 +1,6 @@
--- a/.local-symbols
+++ b/.local-symbols
@@ -281,6 +281,7 @@ RT2X00_LIB_FIRMWARE=
@@ -284,6 +284,7 @@ RT2X00_LIB_FIRMWARE=
RT2X00_LIB_CRYPTO=
RT2X00_LIB_LEDS=
RT2X00_LIB_DEBUGFS=
@ -105,15 +105,15 @@
.drv_init_registers = rt2800mmio_init_registers,
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -694,6 +694,7 @@ enum rt2x00_capability_flags {
REQUIRE_SW_SEQNO,
@@ -695,6 +695,7 @@ enum rt2x00_capability_flags {
REQUIRE_HT_TX_DESC,
REQUIRE_PS_AUTOWAKE,
REQUIRE_DELAYED_RFKILL,
+ REQUIRE_EEPROM_FILE,
/*
* Capabilities
@@ -963,6 +964,11 @@ struct rt2x00_dev {
@@ -964,6 +965,11 @@ struct rt2x00_dev {
const struct firmware *fw;
/*
@ -127,7 +127,7 @@
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1327,6 +1327,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
@@ -1334,6 +1334,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
@ -138,10 +138,10 @@
/*
* Let the driver probe the device to detect the capabilities.
*/
@@ -1457,6 +1461,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
@@ -1474,6 +1478,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
* Free the driver data.
*/
if (rt2x00dev->drv_data)
kfree(rt2x00dev->drv_data);
kfree(rt2x00dev->drv_data);
+
+ /*
+ * Free EEPROM image.

View File

@ -31,7 +31,7 @@
{
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1406,6 +1406,7 @@ static inline void rt2x00debug_dump_fram
@@ -1407,6 +1407,7 @@ static inline void rt2x00debug_dump_fram
*/
u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
struct ieee80211_vif *vif);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3550,11 +3550,18 @@ static void rt2800_config_channel(struct
@@ -3552,11 +3552,18 @@ static void rt2800_config_channel(struct
/*
* Change BBP settings
*/
@ -19,7 +19,7 @@
} else if (rt2x00_rt(rt2x00dev, RT3593)) {
if (rf->channel > 14) {
/* Disable CCK Packet detection on 5GHz */
@@ -6608,6 +6615,12 @@ static void rt2800_init_rfcsr_3290(struc
@@ -6611,6 +6618,12 @@ static void rt2800_init_rfcsr_3290(struc
static void rt2800_init_rfcsr_3352(struct rt2x00_dev *rt2x00dev)
{
@ -32,7 +32,7 @@
rt2800_rf_init_calibration(rt2x00dev, 30);
rt2800_rfcsr_write(rt2x00dev, 0, 0xf0);
@@ -6643,15 +6656,30 @@ static void rt2800_init_rfcsr_3352(struc
@@ -6646,15 +6659,30 @@ static void rt2800_init_rfcsr_3352(struc
rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
rt2800_rfcsr_write(rt2x00dev, 32, 0x80);
rt2800_rfcsr_write(rt2x00dev, 33, 0x00);
@ -66,7 +66,7 @@
rt2800_rfcsr_write(rt2x00dev, 43, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 44, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 45, 0xdb);
@@ -6659,15 +6687,20 @@ static void rt2800_init_rfcsr_3352(struc
@@ -6662,15 +6690,20 @@ static void rt2800_init_rfcsr_3352(struc
rt2800_rfcsr_write(rt2x00dev, 47, 0x0d);
rt2800_rfcsr_write(rt2x00dev, 48, 0x14);
rt2800_rfcsr_write(rt2x00dev, 49, 0x00);
@ -96,7 +96,7 @@
rt2800_rfcsr_write(rt2x00dev, 59, 0x00);
rt2800_rfcsr_write(rt2x00dev, 60, 0x00);
rt2800_rfcsr_write(rt2x00dev, 61, 0x00);
@@ -7688,6 +7721,7 @@ static int rt2800_init_eeprom(struct rt2
@@ -7691,6 +7724,7 @@ static int rt2800_init_eeprom(struct rt2
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||
@ -104,7 +104,7 @@
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
@@ -7782,7 +7816,8 @@ static int rt2800_init_eeprom(struct rt2
@@ -7786,7 +7820,8 @@ static int rt2800_init_eeprom(struct rt2
/*
* Detect if this device has Bluetooth co-existence.
*/
@ -114,7 +114,7 @@
__set_bit(CAPABILITY_BT_COEXIST, &rt2x00dev->cap_flags);
/*
@@ -7811,6 +7846,22 @@ static int rt2800_init_eeprom(struct rt2
@@ -7815,6 +7850,22 @@ static int rt2800_init_eeprom(struct rt2
EIRP_MAX_TX_POWER_LIMIT)
__set_bit(CAPABILITY_POWER_LIMIT, &rt2x00dev->cap_flags);
@ -139,7 +139,7 @@
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2333,6 +2333,12 @@ struct mac_iveiv_entry {
@@ -2335,6 +2335,12 @@ struct mac_iveiv_entry {
#define RFCSR36_RF_BS FIELD8(0x80)
/*
@ -152,7 +152,7 @@
* RFCSR 38:
*/
#define RFCSR38_RX_LO1_EN FIELD8(0x20)
@@ -2344,6 +2350,18 @@ struct mac_iveiv_entry {
@@ -2346,6 +2352,18 @@ struct mac_iveiv_entry {
#define RFCSR39_RX_LO2_EN FIELD8(0x80)
/*
@ -171,7 +171,7 @@
* RFCSR 49:
*/
#define RFCSR49_TX FIELD8(0x3f)
@@ -2356,6 +2374,8 @@ struct mac_iveiv_entry {
@@ -2358,6 +2376,8 @@ struct mac_iveiv_entry {
* RFCSR 50:
*/
#define RFCSR50_TX FIELD8(0x3f)
@ -180,7 +180,7 @@
#define RFCSR50_EP FIELD8(0xc0)
/* bits for RT3593 */
#define RFCSR50_TX_LO1_EN FIELD8(0x20)
@@ -2503,6 +2523,8 @@ enum rt2800_eeprom_word {
@@ -2505,6 +2525,8 @@ enum rt2800_eeprom_word {
* INTERNAL_TX_ALC: 0: disable, 1: enable
* BT_COEXIST: 0: disable, 1: enable
* DAC_TEST: 0: disable, 1: enable
@ -189,7 +189,7 @@
*/
#define EEPROM_NIC_CONF1_HW_RADIO FIELD16(0x0001)
#define EEPROM_NIC_CONF1_EXTERNAL_TX_ALC FIELD16(0x0002)
@@ -2519,6 +2541,8 @@ enum rt2800_eeprom_word {
@@ -2521,6 +2543,8 @@ enum rt2800_eeprom_word {
#define EEPROM_NIC_CONF1_INTERNAL_TX_ALC FIELD16(0x2000)
#define EEPROM_NIC_CONF1_BT_COEXIST FIELD16(0x4000)
#define EEPROM_NIC_CONF1_DAC_TEST FIELD16(0x8000)
@ -200,7 +200,7 @@
* EEPROM frequency
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -714,6 +714,8 @@ enum rt2x00_capability_flags {
@@ -715,6 +715,8 @@ enum rt2x00_capability_flags {
CAPABILITY_DOUBLE_ANTENNA,
CAPABILITY_BT_COEXIST,
CAPABILITY_VCO_RECALIBRATION,

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -8198,6 +8198,27 @@ static const struct rf_channel rf_vals_5
@@ -8202,6 +8202,27 @@ static const struct rf_channel rf_vals_5
{196, 83, 0, 12, 1},
};
@ -28,7 +28,7 @@
static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{
struct hw_mode_spec *spec = &rt2x00dev->spec;
@@ -8285,7 +8306,10 @@ static int rt2800_probe_hw_mode(struct r
@@ -8290,7 +8311,10 @@ static int rt2800_probe_hw_mode(struct r
case RF5390:
case RF5392:
spec->num_channels = 14;
@ -40,7 +40,7 @@
break;
case RF3052:
@@ -8468,6 +8492,19 @@ static int rt2800_probe_rt(struct rt2x00
@@ -8474,6 +8498,19 @@ static int rt2800_probe_rt(struct rt2x00
return 0;
}
@ -60,7 +60,7 @@
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
{
struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
@@ -8510,6 +8547,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -8516,6 +8553,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
/*

View File

@ -8,7 +8,7 @@
#include "rt2x00.h"
#include "rt2800lib.h"
@@ -8494,13 +8495,14 @@ static int rt2800_probe_rt(struct rt2x00
@@ -8500,13 +8501,14 @@ static int rt2800_probe_rt(struct rt2x00
int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
{

View File

@ -1,13 +1,13 @@
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -73,6 +73,7 @@
@@ -74,6 +74,7 @@
#define RF3070 0x3070
#define RF3290 0x3290
#define RF3853 0x3853
+#define RF5350 0x5350
#define RF5360 0x5360
#define RF5362 0x5362
#define RF5370 0x5370
#define RF5372 0x5372
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3038,6 +3038,13 @@ static void rt2800_config_channel_rf53xx
@ -30,17 +30,17 @@
case RF3070:
+ case RF5350:
case RF5360:
case RF5362:
case RF5370:
case RF5372:
@@ -3533,6 +3541,7 @@ static void rt2800_config_channel(struct
@@ -3534,6 +3542,7 @@ static void rt2800_config_channel(struct
if (rt2x00_rf(rt2x00dev, RF3070) ||
rt2x00_rf(rt2x00dev, RF3290) ||
rt2x00_rf(rt2x00dev, RF3322) ||
+ rt2x00_rf(rt2x00dev, RF5350) ||
rt2x00_rf(rt2x00dev, RF5360) ||
rt2x00_rf(rt2x00dev, RF5362) ||
rt2x00_rf(rt2x00dev, RF5370) ||
rt2x00_rf(rt2x00dev, RF5372) ||
@@ -3810,7 +3819,8 @@ static void rt2800_config_channel(struct
@@ -3812,7 +3821,8 @@ static void rt2800_config_channel(struct
/*
* Clear update flag
*/
@ -50,15 +50,15 @@
rt2800_bbp_read(rt2x00dev, 49, &bbp);
rt2x00_set_field8(&bbp, BBP49_UPDATE_FLAG, 0);
rt2800_bbp_write(rt2x00dev, 49, bbp);
@@ -4689,6 +4699,7 @@ void rt2800_vco_calibration(struct rt2x0
@@ -4691,6 +4701,7 @@ void rt2800_vco_calibration(struct rt2x0
case RF3070:
case RF3290:
case RF3853:
+ case RF5350:
case RF5360:
case RF5362:
case RF5370:
case RF5372:
@@ -5101,6 +5112,8 @@ static int rt2800_init_registers(struct
@@ -5104,6 +5115,8 @@ static int rt2800_init_registers(struct
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
@ -67,7 +67,7 @@
} else {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000000);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
@@ -5756,9 +5769,13 @@ static void rt2800_init_bbp_3352(struct
@@ -5759,9 +5772,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 82, 0x62);
@ -84,7 +84,7 @@
rt2800_bbp_write(rt2x00dev, 86, 0x38);
@@ -5772,9 +5789,13 @@ static void rt2800_init_bbp_3352(struct
@@ -5775,9 +5792,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 104, 0x92);
@ -101,7 +101,7 @@
rt2800_bbp_write(rt2x00dev, 120, 0x50);
@@ -5799,6 +5820,13 @@ static void rt2800_init_bbp_3352(struct
@@ -5802,6 +5823,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 143, 0xa2);
rt2800_bbp_write(rt2x00dev, 148, 0xc8);
@ -115,7 +115,7 @@
}
static void rt2800_init_bbp_3390(struct rt2x00_dev *rt2x00dev)
@@ -6140,6 +6168,7 @@ static void rt2800_init_bbp(struct rt2x0
@@ -6143,6 +6171,7 @@ static void rt2800_init_bbp(struct rt2x0
rt2800_init_bbp_3290(rt2x00dev);
break;
case RT3352:
@ -123,7 +123,7 @@
rt2800_init_bbp_3352(rt2x00dev);
break;
case RT3390:
@@ -7091,6 +7120,76 @@ static void rt2800_init_rfcsr_3883(struc
@@ -7094,6 +7123,76 @@ static void rt2800_init_rfcsr_3883(struc
rt2800_rfcsr_write(rt2x00dev, 20, rfcsr);
}
@ -200,7 +200,7 @@
static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 2);
@@ -7331,6 +7430,9 @@ static void rt2800_init_rfcsr(struct rt2
@@ -7334,6 +7433,9 @@ static void rt2800_init_rfcsr(struct rt2
case RT3593:
rt2800_init_rfcsr_3593(rt2x00dev);
break;
@ -210,7 +210,7 @@
case RT5390:
rt2800_init_rfcsr_5390(rt2x00dev);
break;
@@ -7590,6 +7692,12 @@ static int rt2800_validate_eeprom(struct
@@ -7593,6 +7695,12 @@ static int rt2800_validate_eeprom(struct
rt2x00_set_field16(&word, EEPROM_NIC_CONF0_RF_TYPE, RF2820);
rt2800_eeprom_write(rt2x00dev, EEPROM_NIC_CONF0, word);
rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word);
@ -223,7 +223,7 @@
} else if (rt2x00_rt(rt2x00dev, RT2860) ||
rt2x00_rt(rt2x00dev, RT2872)) {
/*
@@ -7728,6 +7836,8 @@ static int rt2800_init_eeprom(struct rt2
@@ -7731,6 +7839,8 @@ static int rt2800_init_eeprom(struct rt2
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
else if (rt2x00_rt(rt2x00dev, RT3883))
rf = RF3853;
@ -232,31 +232,31 @@
else
rf = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
@@ -7747,6 +7857,7 @@ static int rt2800_init_eeprom(struct rt2
@@ -7750,6 +7860,7 @@ static int rt2800_init_eeprom(struct rt2
case RF3320:
case RF3322:
case RF3853:
+ case RF5350:
case RF5360:
case RF5362:
case RF5370:
case RF5372:
@@ -8301,6 +8412,7 @@ static int rt2800_probe_hw_mode(struct r
@@ -8305,6 +8416,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3290:
case RF3320:
case RF3322:
+ case RF5350:
case RF5360:
case RF5362:
case RF5370:
case RF5372:
@@ -8439,6 +8551,7 @@ static int rt2800_probe_hw_mode(struct r
@@ -8444,6 +8556,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3070:
case RF3290:
case RF3853:
+ case RF5350:
case RF5360:
case RF5362:
case RF5370:
case RF5372:
@@ -8478,6 +8591,7 @@ static int rt2800_probe_rt(struct rt2x00
@@ -8484,6 +8597,7 @@ static int rt2800_probe_rt(struct rt2x00
case RT3572:
case RT3593:
case RT3883:

View File

@ -8,7 +8,7 @@
#include "rt2x00.h"
#include "rt2800lib.h"
@@ -7946,6 +7947,17 @@ static int rt2800_init_eeprom(struct rt2
@@ -7950,6 +7951,17 @@ static int rt2800_init_eeprom(struct rt2
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1265,7 +1265,7 @@ static inline void rt2x00lib_set_if_comb
@@ -1283,7 +1283,7 @@ static inline void rt2x00lib_set_if_comb
*/
if_limit = &rt2x00dev->if_limits_ap;
if_limit->max = rt2x00dev->ops->max_ap_intf;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7831,10 +7831,11 @@ static int rt2800_init_eeprom(struct rt2
@@ -7834,10 +7834,11 @@ static int rt2800_init_eeprom(struct rt2
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||

View File

@ -1,8 +1,6 @@
Index: compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800.h
===================================================================
--- compat-wireless-2014-05-22.orig/drivers/net/wireless/rt2x00/rt2800.h 2014-08-31 05:04:55.600142409 +0200
+++ compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800.h 2014-08-31 05:11:02.068145882 +0200
@@ -2346,6 +2346,8 @@
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2321,6 +2321,8 @@ struct mac_iveiv_entry {
#define RFCSR30_RX_H20M FIELD8(0x04)
#define RFCSR30_RX_VCM FIELD8(0x18)
#define RFCSR30_RF_CALIBRATION FIELD8(0x80)
@ -11,11 +9,9 @@ Index: compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800.h
/*
* RFCSR 31:
Index: compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800lib.c
===================================================================
--- compat-wireless-2014-05-22.orig/drivers/net/wireless/rt2x00/rt2800lib.c 2014-08-31 05:04:55.604142409 +0200
+++ compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800lib.c 2014-08-31 05:15:02.176148157 +0200
@@ -3928,8 +3928,13 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3551,8 +3551,13 @@ static void rt2800_config_channel(struct
rt2x00_rf(rt2x00dev, RF5390) ||
rt2x00_rf(rt2x00dev, RF5392)) {
rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr);

View File

@ -1,9 +1,9 @@
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -5682,6 +5682,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
@@ -5675,6 +5675,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
static const struct pci_device_id 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, },

View File

@ -1,12 +0,0 @@
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -6217,6 +6217,9 @@ static void b43_nphy_channel_setup(struc
u16 tmp16;
if (new_channel->band == IEEE80211_BAND_5GHZ) {
+ /* Switch to 2 GHz for a moment to access B43_PHY_B_BBCFG */
+ b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ);
+
tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR);
b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4);
/* Put BPHY in the reset */

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -820,6 +820,7 @@ struct b43_wldev {
@@ -837,6 +837,7 @@ struct b43_wldev {
bool qos_enabled; /* TRUE, if QoS is used. */
bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
bool use_pio; /* TRUE if next init should use PIO */
@ -22,7 +22,7 @@
static int modparam_bad_frames_preempt;
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
MODULE_PARM_DESC(bad_frames_preempt,
@@ -2814,10 +2819,10 @@ static int b43_gpio_init(struct b43_wlde
@@ -2844,10 +2849,10 @@ static int b43_gpio_init(struct b43_wlde
u32 mask, set;
b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);

View File

@ -7,11 +7,11 @@
-b43-y += pio.o
+b43-$(CPTCFG_B43_PIO) += pio.o
b43-y += rfkill.o
b43-y += ppr.o
b43-$(CPTCFG_B43_LEDS) += leds.o
b43-$(CPTCFG_B43_PCMCIA) += pcmcia.o
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1940,10 +1940,12 @@ static void b43_do_interrupt_thread(stru
@@ -1970,10 +1970,12 @@ static void b43_do_interrupt_thread(stru
dma_reason[0], dma_reason[1],
dma_reason[2], dma_reason[3],
dma_reason[4], dma_reason[5]);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1587,7 +1587,7 @@ static void b43_write_beacon_template(st
@@ -1617,7 +1617,7 @@ static void b43_write_beacon_template(st
len, ram_offset, shm_size_offset, rate);
/* Write the PHY TX control parameters. */
@ -9,7 +9,7 @@
antenna = b43_antenna_to_phyctl(antenna);
ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
/* We can't send beacons with short preamble. Would get PHY errors. */
@@ -3218,8 +3218,8 @@ static int b43_chip_init(struct b43_wlde
@@ -3264,8 +3264,8 @@ static int b43_chip_init(struct b43_wlde
/* Select the antennae */
if (phy->ops->set_rx_antenna)
@ -20,7 +20,7 @@
if (phy->type == B43_PHYTYPE_B) {
value16 = b43_read16(dev, 0x005E);
@@ -3913,7 +3913,6 @@ static int b43_op_config(struct ieee8021
@@ -3965,7 +3965,6 @@ static int b43_op_config(struct ieee8021
struct b43_wldev *dev = wl->current_dev;
struct b43_phy *phy = &dev->phy;
struct ieee80211_conf *conf = &hw->conf;
@ -28,7 +28,7 @@
int err = 0;
mutex_lock(&wl->mutex);
@@ -3953,11 +3952,9 @@ static int b43_op_config(struct ieee8021
@@ -4008,11 +4007,9 @@ static int b43_op_config(struct ieee8021
}
/* Antennas for RX and management frame TX. */
@ -42,7 +42,7 @@
if (wl->radio_enabled != phy->radio_on) {
if (wl->radio_enabled) {
@@ -5094,6 +5091,47 @@ static int b43_op_get_survey(struct ieee
@@ -5162,6 +5159,47 @@ static int b43_op_get_survey(struct ieee
return 0;
}
@ -90,7 +90,7 @@
static const struct ieee80211_ops b43_hw_ops = {
.tx = b43_op_tx,
.conf_tx = b43_op_conf_tx,
@@ -5115,6 +5153,8 @@ static const struct ieee80211_ops b43_hw
@@ -5183,6 +5221,8 @@ static const struct ieee80211_ops b43_hw
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
.get_survey = b43_op_get_survey,
.rfkill_poll = b43_rfkill_poll,
@ -99,7 +99,7 @@
};
/* Hard-reset the chip. Do not call this directly.
@@ -5418,6 +5458,8 @@ static int b43_one_core_attach(struct b4
@@ -5486,6 +5526,8 @@ static int b43_one_core_attach(struct b4
if (!wldev)
goto out;
@ -108,7 +108,7 @@
wldev->use_pio = b43_modparam_pio;
wldev->dev = dev;
wldev->wl = wl;
@@ -5508,6 +5550,9 @@ static struct b43_wl *b43_wireless_init(
@@ -5576,6 +5618,9 @@ static struct b43_wl *b43_wireless_init(
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
@ -120,7 +120,7 @@
SET_IEEE80211_DEV(hw, dev->dev);
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -821,6 +821,8 @@ struct b43_wldev {
@@ -838,6 +838,8 @@ struct b43_wldev {
bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
bool use_pio; /* TRUE if next init should use PIO */
int gpiomask; /* GPIO LED mask as a module parameter */

View File

@ -1,256 +0,0 @@
From 4f214b1ead0af7439921637645cb63f378516175 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sat, 21 Jan 2012 18:48:38 +0100
Subject: [PATCH 33/34] b43: add workaround for b43 on pcie bus of bcm4716.
bcm4716 (which includes 4717 & 4718), plus 4706 on PCIe can reorder
transactions. As a fix, a read after write is performed on certain
places in the code. Older chips and the newer 5357 family don't require
this fix.
This code is based on the brcmsmac driver.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
drivers/net/wireless/b43/b43.h | 26 ++++++++++++++++++++++++++
drivers/net/wireless/b43/bus.h | 10 ++++++++++
drivers/net/wireless/b43/phy_common.c | 6 ++++++
drivers/net/wireless/b43/phy_n.c | 10 +++++-----
4 files changed, 47 insertions(+), 5 deletions(-)
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -1054,6 +1054,15 @@ static inline bool b43_using_pio_transfe
return dev->__using_pio_transfers;
}
+#ifdef CONFIG_BCM47XX_BCMA
+void b43_wflush16(struct b43_wldev *dev, u16 offset, u16 value);
+#else
+static inline void b43_wflush16(struct b43_wldev *dev, u16 offset, u16 value)
+{
+ b43_write16(dev, offset, value);
+}
+#endif
+
/* Message printing */
__printf(2, 3) void b43info(struct b43_wl *wl, const char *fmt, ...);
__printf(2, 3) void b43err(struct b43_wl *wl, const char *fmt, ...);
--- a/drivers/net/wireless/b43/bus.h
+++ b/drivers/net/wireless/b43/bus.h
@@ -70,6 +70,18 @@ static inline bool b43_bus_host_is_sdio(
return false;
#endif
}
+static inline bool b43_bus_host_is_pci(struct b43_bus_dev *dev)
+{
+#ifdef CPTCFG_B43_BCMA
+ if (dev->bus_type == B43_BUS_BCMA)
+ return (dev->bdev->bus->hosttype == BCMA_HOSTTYPE_PCI);
+#endif
+#ifdef CPTCFG_B43_SSB
+ if (dev->bus_type == B43_BUS_SSB)
+ return (dev->sdev->bus->bustype == SSB_BUSTYPE_PCI);
+#endif
+ return false;
+}
struct b43_bus_dev *b43_bus_dev_bcma_init(struct bcma_device *core);
struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev);
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4481,7 +4481,7 @@ static int b43_phy_versioning(struct b43
u16 radio24[3];
for (tmp = 0; tmp < 3; tmp++) {
- b43_write16(dev, B43_MMIO_RADIO24_CONTROL, tmp);
+ b43_wflush16(dev, B43_MMIO_RADIO24_CONTROL, tmp);
radio24[tmp] = b43_read16(dev, B43_MMIO_RADIO24_DATA);
}
@@ -4498,10 +4498,10 @@ static int b43_phy_versioning(struct b43
else
tmp = 0x5205017F;
} else {
- b43_write16(dev, B43_MMIO_RADIO_CONTROL,
+ b43_wflush16(dev, B43_MMIO_RADIO_CONTROL,
B43_RADIOCTL_ID);
tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
- b43_write16(dev, B43_MMIO_RADIO_CONTROL,
+ b43_wflush16(dev, B43_MMIO_RADIO_CONTROL,
B43_RADIOCTL_ID);
tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH)
<< 16;
@@ -4576,6 +4576,26 @@ static int b43_phy_versioning(struct b43
return 0;
}
+/*
+ * bcm4716 (which includes 4717 & 4718), plus 4706 on PCIe can reorder
+ * transactions. As a fix, a read after write is performed on certain places
+ * in the code. Older chips and the newer 5357 family don't require this fix.
+ */
+#ifdef CONFIG_BCM47XX_BCMA
+#include <asm/mach-bcm47xx/bcm47xx.h>
+void b43_wflush16(struct b43_wldev *dev, u16 offset, u16 value)
+{
+ if (b43_bus_host_is_pci(dev->dev) &&
+ bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA &&
+ bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4716) {
+ b43_write16(dev, offset, value);
+ b43_read16(dev, offset);
+ } else {
+ b43_write16(dev, offset, value);
+ }
+}
+#endif
+
static void setup_struct_phy_for_init(struct b43_wldev *dev,
struct b43_phy *phy)
{
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -275,6 +275,12 @@ void b43_phy_write(struct b43_wldev *dev
{
assert_mac_suspended(dev);
dev->phy.ops->phy_write(dev, reg, value);
+#ifdef CONFIG_BCM47XX
+ if (b43_bus_host_is_pci(dev->dev) && reg == 0x72) {
+ b43_read16(dev, B43_MMIO_PHY_VER);
+ return;
+ }
+#endif
if (++dev->phy.writes_counter == B43_MAX_WRITES_IN_ROW) {
b43_read16(dev, B43_MMIO_PHY_VER);
dev->phy.writes_counter = 0;
--- a/drivers/net/wireless/b43/phy_ht.c
+++ b/drivers/net/wireless/b43/phy_ht.c
@@ -1073,20 +1073,20 @@ static unsigned int b43_phy_ht_op_get_de
static u16 b43_phy_ht_op_read(struct b43_wldev *dev, u16 reg)
{
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
return b43_read16(dev, B43_MMIO_PHY_DATA);
}
static void b43_phy_ht_op_write(struct b43_wldev *dev, u16 reg, u16 value)
{
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
b43_write16(dev, B43_MMIO_PHY_DATA, value);
}
static void b43_phy_ht_op_maskset(struct b43_wldev *dev, u16 reg, u16 mask,
u16 set)
{
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
b43_write16(dev, B43_MMIO_PHY_DATA,
(b43_read16(dev, B43_MMIO_PHY_DATA) & mask) | set);
}
@@ -1096,14 +1096,14 @@ static u16 b43_phy_ht_op_radio_read(stru
/* HT-PHY needs 0x200 for read access */
reg |= 0x200;
- b43_write16(dev, B43_MMIO_RADIO24_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_RADIO24_CONTROL, reg);
return b43_read16(dev, B43_MMIO_RADIO24_DATA);
}
static void b43_phy_ht_op_radio_write(struct b43_wldev *dev, u16 reg,
u16 value)
{
- b43_write16(dev, B43_MMIO_RADIO24_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_RADIO24_CONTROL, reg);
b43_write16(dev, B43_MMIO_RADIO24_DATA, value);
}
--- a/drivers/net/wireless/b43/phy_lcn.c
+++ b/drivers/net/wireless/b43/phy_lcn.c
@@ -812,20 +812,20 @@ static void b43_phy_lcn_op_adjust_txpowe
static u16 b43_phy_lcn_op_read(struct b43_wldev *dev, u16 reg)
{
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
return b43_read16(dev, B43_MMIO_PHY_DATA);
}
static void b43_phy_lcn_op_write(struct b43_wldev *dev, u16 reg, u16 value)
{
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
b43_write16(dev, B43_MMIO_PHY_DATA, value);
}
static void b43_phy_lcn_op_maskset(struct b43_wldev *dev, u16 reg, u16 mask,
u16 set)
{
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
b43_write16(dev, B43_MMIO_PHY_DATA,
(b43_read16(dev, B43_MMIO_PHY_DATA) & mask) | set);
}
@@ -835,14 +835,14 @@ static u16 b43_phy_lcn_op_radio_read(str
/* LCN-PHY needs 0x200 for read access */
reg |= 0x200;
- b43_write16(dev, B43_MMIO_RADIO24_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_RADIO24_CONTROL, reg);
return b43_read16(dev, B43_MMIO_RADIO24_DATA);
}
static void b43_phy_lcn_op_radio_write(struct b43_wldev *dev, u16 reg,
u16 value)
{
- b43_write16(dev, B43_MMIO_RADIO24_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_RADIO24_CONTROL, reg);
b43_write16(dev, B43_MMIO_RADIO24_DATA, value);
}
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -6500,14 +6500,14 @@ static inline void check_phyreg(struct b
static u16 b43_nphy_op_read(struct b43_wldev *dev, u16 reg)
{
check_phyreg(dev, reg);
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
return b43_read16(dev, B43_MMIO_PHY_DATA);
}
static void b43_nphy_op_write(struct b43_wldev *dev, u16 reg, u16 value)
{
check_phyreg(dev, reg);
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
b43_write16(dev, B43_MMIO_PHY_DATA, value);
}
@@ -6515,7 +6515,7 @@ static void b43_nphy_op_maskset(struct b
u16 set)
{
check_phyreg(dev, reg);
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
b43_maskset16(dev, B43_MMIO_PHY_DATA, mask, set);
}
@@ -6529,7 +6529,7 @@ static u16 b43_nphy_op_radio_read(struct
else
reg |= 0x100;
- b43_write16(dev, B43_MMIO_RADIO_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_RADIO_CONTROL, reg);
return b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
}
@@ -6538,7 +6538,7 @@ static void b43_nphy_op_radio_write(stru
/* Register 1 is a 32-bit register. */
B43_WARN_ON(dev->phy.rev < 7 && reg == 1);
- b43_write16(dev, B43_MMIO_RADIO_CONTROL, reg);
+ b43_wflush16(dev, B43_MMIO_RADIO_CONTROL, reg);
b43_write16(dev, B43_MMIO_RADIO_DATA_LOW, value);
}

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2831,6 +2831,14 @@ static int b43_gpio_init(struct b43_wlde
@@ -2861,6 +2861,14 @@ static int b43_gpio_init(struct b43_wlde
} else if (dev->dev->chip_id == 0x5354) {
/* Don't allow overtaking buttons GPIOs */
set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */

View File

@ -1,36 +0,0 @@
From 4101e8dc540d19f1f6c24930629149191786e4cd Mon Sep 17 00:00:00 2001
From: Arik Nemtsov <arik@wizery.com>
Date: Mon, 9 Sep 2013 16:48:59 +0300
Subject: [PATCH 27/75] wlcore: don't switch channels on disconnected STA vifs
Sending the FW a channel switch command on a disconnected vif may result
in a beacon loss event. Avoid this edge case.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
drivers/net/wireless/ti/wlcore/main.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5148,6 +5148,10 @@ static void wl12xx_op_channel_switch(str
if (unlikely(wl->state == WLCORE_STATE_OFF)) {
wl12xx_for_each_wlvif_sta(wl, wlvif) {
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
+
+ if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
+ continue;
+
ieee80211_chswitch_done(vif, false);
}
goto out;
@@ -5163,6 +5167,9 @@ static void wl12xx_op_channel_switch(str
wl12xx_for_each_wlvif_sta(wl, wlvif) {
unsigned long delay_usec;
+ if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
+ continue;
+
ret = wl->ops->channel_switch(wl, wlvif, ch_switch);
if (ret)
goto out_sleep;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800.h 2014-06-30 01:05:26.000000000 +0300
+++ b/drivers/net/wireless/rt2x00/rt2800.h 2014-06-30 01:23:42.000000000 +0300
@@ -79,6 +79,7 @@
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -81,6 +81,7 @@
#define RF5372 0x5372
#define RF5390 0x5390
#define RF5392 0x5392
@ -8,7 +8,7 @@
/*
* Chipset revisions.
@@ -654,6 +655,14 @@
@@ -656,6 +657,14 @@
#define RF_CSR_CFG_BUSY FIELD32(0x00020000)
/*
@ -23,7 +23,7 @@
* EFUSE_CSR: RT30x0 EEPROM
*/
#define EFUSE_CTRL 0x0580
@@ -1037,6 +1046,11 @@
@@ -1039,6 +1048,11 @@
#define AUTOWAKEUP_CFG_AUTOWAKE FIELD32(0x00008000)
/*
@ -35,7 +35,7 @@
* EDCA_AC0_CFG:
*/
#define EDCA_AC0_CFG 0x1300
@@ -1216,6 +1230,8 @@
@@ -1218,6 +1232,8 @@
#define TX_PIN_CFG_RFTR_POL FIELD32(0x00020000)
#define TX_PIN_CFG_TRSW_EN FIELD32(0x00040000)
#define TX_PIN_CFG_TRSW_POL FIELD32(0x00080000)
@ -44,7 +44,7 @@
#define TX_PIN_CFG_PA_PE_A2_EN FIELD32(0x01000000)
#define TX_PIN_CFG_PA_PE_G2_EN FIELD32(0x02000000)
#define TX_PIN_CFG_PA_PE_A2_POL FIELD32(0x04000000)
@@ -1562,6 +1578,17 @@
@@ -1564,6 +1580,17 @@
#define TX_PWR_CFG_4_EXT_STBC4_CH2 FIELD32(0x0000000f)
#define TX_PWR_CFG_4_EXT_STBC6_CH2 FIELD32(0x00000f00)
@ -62,8 +62,8 @@
/* TX_PWR_CFG_7 */
#define TX_PWR_CFG_7 0x13d4
#define TX_PWR_CFG_7_OFDM54_CH0 FIELD32(0x0000000f)
--- a/drivers/net/wireless/rt2x00/rt2800lib.c 2014-06-30 01:05:26.000000000 +0300
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c 2014-06-30 17:31:35.000000000 +0300
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -61,6 +61,8 @@
rt2800_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg))
#define WAIT_FOR_RFCSR(__dev, __reg) \
@ -529,7 +529,7 @@
u8 bbp, rfcsr;
info->default_power1 = rt2800_txpower_to_dev(rt2x00dev, rf->channel,
@@ -3535,6 +3911,9 @@ static void rt2800_config_channel(struct
@@ -3536,6 +3912,9 @@ static void rt2800_config_channel(struct
case RF5592:
rt2800_config_channel_rf55xx(rt2x00dev, conf, rf, info);
break;
@ -539,7 +539,7 @@
default:
rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info);
}
@@ -3631,7 +4010,7 @@ static void rt2800_config_channel(struct
@@ -3638,7 +4017,7 @@ static void rt2800_config_channel(struct
else if (rt2x00_rt(rt2x00dev, RT3593) ||
rt2x00_rt(rt2x00dev, RT3883))
rt2800_bbp_write(rt2x00dev, 82, 0x82);
@ -548,7 +548,7 @@
rt2800_bbp_write(rt2x00dev, 82, 0xf2);
if (rt2x00_rt(rt2x00dev, RT3593) ||
@@ -3653,7 +4032,7 @@ static void rt2800_config_channel(struct
@@ -3660,7 +4039,7 @@ static void rt2800_config_channel(struct
if (rt2x00_rt(rt2x00dev, RT3572))
rt2800_rfcsr_write(rt2x00dev, 8, 0);
@ -557,7 +557,7 @@
switch (rt2x00dev->default_ant.tx_chain_num) {
case 3:
@@ -3702,6 +4081,7 @@ static void rt2800_config_channel(struct
@@ -3709,6 +4088,7 @@ static void rt2800_config_channel(struct
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_RFTR_EN, 1);
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_TRSW_EN, 1);
@ -565,7 +565,7 @@
rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin);
@@ -4710,6 +5090,14 @@ void rt2800_vco_calibration(struct rt2x0
@@ -4718,6 +5098,14 @@ void rt2800_vco_calibration(struct rt2x0
rt2x00_set_field8(&rfcsr, RFCSR3_VCOCAL_EN, 1);
rt2800_rfcsr_write(rt2x00dev, 3, rfcsr);
break;
@ -580,7 +580,7 @@
default:
return;
}
@@ -5110,9 +5498,42 @@ static int rt2800_init_registers(struct
@@ -5118,9 +5506,42 @@ static int rt2800_init_registers(struct
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392) ||
rt2x00_rt(rt2x00dev, RT5592)) {
@ -626,7 +626,7 @@
} else if (rt2x00_rt(rt2x00dev, RT5350)) {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
} else {
@@ -6144,6 +6565,225 @@ static void rt2800_init_bbp_5592(struct
@@ -6152,6 +6573,225 @@ static void rt2800_init_bbp_5592(struct
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
}
@ -852,7 +852,7 @@
static void rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
{
unsigned int i;
@@ -6186,7 +6826,10 @@ static void rt2800_init_bbp(struct rt2x0
@@ -6194,7 +6834,10 @@ static void rt2800_init_bbp(struct rt2x0
return;
case RT5390:
case RT5392:
@ -864,7 +864,7 @@
break;
case RT5592:
rt2800_init_bbp_5592(rt2x00dev);
@@ -7400,6 +8043,295 @@ static void rt2800_init_rfcsr_5592(struc
@@ -7408,6 +8051,295 @@ static void rt2800_init_rfcsr_5592(struc
rt2800_led_open_drain_enable(rt2x00dev);
}
@ -1160,7 +1160,7 @@
static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
{
if (rt2800_is_305x_soc(rt2x00dev)) {
@@ -7435,7 +8367,10 @@ static void rt2800_init_rfcsr(struct rt2
@@ -7443,7 +8375,10 @@ static void rt2800_init_rfcsr(struct rt2
rt2800_init_rfcsr_5350(rt2x00dev);
break;
case RT5390:
@ -1172,7 +1172,7 @@
break;
case RT5392:
rt2800_init_rfcsr_5392(rt2x00dev);
@@ -7866,6 +8801,7 @@ static int rt2800_init_eeprom(struct rt2
@@ -7875,6 +8810,7 @@ static int rt2800_init_eeprom(struct rt2
case RF5390:
case RF5392:
case RF5592:
@ -1180,7 +1180,7 @@
break;
default:
rt2x00_err(rt2x00dev, "Invalid RF chipset 0x%04x detected\n",
@@ -8431,6 +9367,7 @@ static int rt2800_probe_hw_mode(struct r
@@ -8441,6 +9377,7 @@ static int rt2800_probe_hw_mode(struct r
case RF5372:
case RF5390:
case RF5392:
@ -1188,7 +1188,7 @@
spec->num_channels = 14;
if (spec->clk_is_20mhz)
spec->channels = rf_vals_xtal20mhz_3x;
@@ -8570,6 +9507,7 @@ static int rt2800_probe_hw_mode(struct r
@@ -8581,6 +9518,7 @@ static int rt2800_probe_hw_mode(struct r
case RF5372:
case RF5390:
case RF5392:

View File

@ -1,14 +1,14 @@
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -277,7 +277,10 @@ static int ath10k_download_and_run_otp(s
@@ -250,7 +250,10 @@ static int ath10k_download_and_run_otp(s
ath10k_dbg(ATH10K_DBG_BOOT, "boot otp execute result %d\n", result);
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot otp execute result %d\n", result);
- if (result != 0) {
+ if (result == 2) {
+ ath10k_warn("otp stream is empty, using board.bin contents");
+ ath10k_warn(ar, "otp stream is empty, using board.bin contents");
+ return 0;
+ } else if (result != 0) {
ath10k_err("otp calibration failed: %d", result);
ath10k_err(ar, "otp calibration failed: %d", result);
return -EINVAL;
}