parent
f347280c9d
commit
de05b7fbd8
|
|
@ -1,40 +1,38 @@
|
|||
From 7e308692b72697003d08b900059579585b621b70 Mon Sep 17 00:00:00 2001
|
||||
From 929cbc1b2c140cee08e5f2657314356e0fa4fa18 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Mon, 22 Mar 2021 16:28:20 +0100
|
||||
Subject: [PATCH] 0001 backport of build patches from openwrt
|
||||
Date: Wed, 14 Sep 2022 14:24:53 +0200
|
||||
Subject: [PATCH] backport of build patches fromopenwrt
|
||||
|
||||
---
|
||||
Kconfig.local | 111 --------------------
|
||||
Kconfig.sources | 3 -
|
||||
Makefile | 116 +++++++++++----------
|
||||
Makefile.kernel | 2 -
|
||||
Makefile.real | 9 +-
|
||||
backport-include/linux/kconfig.h | 5 +
|
||||
backport-include/linux/rfkill.h | 6 ++
|
||||
compat/main.c | 25 -----
|
||||
drivers/net/wireless/broadcom/b43/Kconfig | 12 +--
|
||||
drivers/net/wireless/broadcom/b43/main.c | 4 +-
|
||||
drivers/net/wireless/broadcom/b43legacy/Kconfig | 8 +-
|
||||
drivers/net/wireless/broadcom/b43legacy/main.c | 4 +-
|
||||
drivers/net/wireless/broadcom/brcm80211/Kconfig | 2 +-
|
||||
.../wireless/broadcom/brcm80211/brcmsmac/Makefile | 2 +-
|
||||
.../net/wireless/broadcom/brcm80211/brcmsmac/led.h | 2 +-
|
||||
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 18 ++--
|
||||
kconf/Makefile | 4 +-
|
||||
kconf/conf.c | 30 +-----
|
||||
kconf/confdata.c | 4 +-
|
||||
local-symbols | 37 -------
|
||||
net/wireless/Kconfig | 8 +-
|
||||
21 files changed, 114 insertions(+), 298 deletions(-)
|
||||
Kconfig.local | 111 -----------------
|
||||
Kconfig.sources | 3 -
|
||||
Makefile | 116 +++++++++---------
|
||||
Makefile.kernel | 2 -
|
||||
Makefile.real | 9 +-
|
||||
compat/main.c | 25 ----
|
||||
drivers/net/wireless/broadcom/b43/Kconfig | 12 +-
|
||||
drivers/net/wireless/broadcom/b43/main.c | 4 +-
|
||||
.../net/wireless/broadcom/b43legacy/Kconfig | 8 +-
|
||||
.../net/wireless/broadcom/b43legacy/main.c | 4 +-
|
||||
.../net/wireless/broadcom/brcm80211/Kconfig | 2 +-
|
||||
.../broadcom/brcm80211/brcmsmac/Makefile | 2 +-
|
||||
.../broadcom/brcm80211/brcmsmac/led.h | 2 +-
|
||||
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 18 +--
|
||||
kconf/Makefile | 4 +-
|
||||
kconf/conf.c | 30 +----
|
||||
kconf/confdata.c | 4 +-
|
||||
local-symbols | 37 ------
|
||||
net/wireless/Kconfig | 8 +-
|
||||
19 files changed, 103 insertions(+), 298 deletions(-)
|
||||
|
||||
diff --git a/Kconfig.local b/Kconfig.local
|
||||
index a3935cc..dfd68d6 100644
|
||||
index 19a25e3..3a694ea 100644
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1315,117 +1315,6 @@ config BACKPORTED_USB_NET_CH9200
|
||||
config BACKPORTED_USB_NET_AQC111
|
||||
@@ -1357,117 +1357,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||
config BACKPORTED_USB_RTL8153_ECM
|
||||
tristate
|
||||
default USB_NET_AQC111
|
||||
default USB_RTL8153_ECM
|
||||
-config BACKPORTED_SSB_POSSIBLE
|
||||
- tristate
|
||||
- default SSB_POSSIBLE
|
||||
|
|
@ -150,10 +148,10 @@ index a3935cc..dfd68d6 100644
|
|||
tristate
|
||||
default USB_ACM
|
||||
diff --git a/Kconfig.sources b/Kconfig.sources
|
||||
index 5fb4478..347f1c5 100644
|
||||
index 2ea4d8a..0aa62a3 100644
|
||||
--- a/Kconfig.sources
|
||||
+++ b/Kconfig.sources
|
||||
@@ -7,9 +7,6 @@ source "$BACKPORT_DIR/net/mac80211/Kconfig"
|
||||
@@ -10,9 +10,6 @@ source "$BACKPORT_DIR/drivers/soc/qcom/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
|
||||
|
||||
|
|
@ -164,7 +162,7 @@ index 5fb4478..347f1c5 100644
|
|||
|
||||
source "$BACKPORT_DIR/drivers/staging/Kconfig"
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ee7df4b..79e5fab 100644
|
||||
index 77c2670..c431b71 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -2,10 +2,10 @@
|
||||
|
|
@ -226,8 +224,8 @@ index ee7df4b..79e5fab 100644
|
|||
- echo "" ;\
|
||||
- done \
|
||||
- ) > Kconfig.kernel ;\
|
||||
- kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) kernelversion | \
|
||||
- sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d') ;\
|
||||
- kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
|
||||
- kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
|
||||
- test "$$kver" != "" || echo "Kernel version parse failed!" ;\
|
||||
- test "$$kver" != "" ;\
|
||||
- kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
|
||||
|
|
@ -283,8 +281,8 @@ index ee7df4b..79e5fab 100644
|
|||
+ @echo " done."
|
||||
+
|
||||
+Kconfig.versions: Kconfig.kernel
|
||||
+ @kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) kernelversion | \
|
||||
+ sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d') ;\
|
||||
+ @kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
|
||||
+ kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
|
||||
+ test "$$kver" != "" || echo "Kernel version parse failed!" ;\
|
||||
+ test "$$kver" != "" ;\
|
||||
+ kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
|
||||
|
|
@ -314,12 +312,12 @@ index ee7df4b..79e5fab 100644
|
|||
|
||||
.PHONY: defconfig-help
|
||||
diff --git a/Makefile.kernel b/Makefile.kernel
|
||||
index 62baa94..4212940 100644
|
||||
index 11ce417..2de87f5 100644
|
||||
--- a/Makefile.kernel
|
||||
+++ b/Makefile.kernel
|
||||
@@ -40,8 +40,6 @@ obj-y += compat/
|
||||
obj-$(CPTCFG_CFG80211) += net/wireless/
|
||||
obj-$(CPTCFG_MAC80211) += net/mac80211/
|
||||
@@ -43,8 +43,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
|
||||
obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
|
||||
-obj-$(CPTCFG_SSB) += drivers/ssb/
|
||||
-obj-$(CPTCFG_BCMA) += drivers/bcma/
|
||||
|
|
@ -353,58 +351,11 @@ index 6550802..d0a8c20 100644
|
|||
@echo " done."
|
||||
|
||||
.PHONY: modules
|
||||
diff --git a/backport-include/linux/kconfig.h b/backport-include/linux/kconfig.h
|
||||
index d1faad9..a0bc8c4 100644
|
||||
--- a/backport-include/linux/kconfig.h
|
||||
+++ b/backport-include/linux/kconfig.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#include_next <linux/kconfig.h>
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
|
||||
+
|
||||
#ifndef __ARG_PLACEHOLDER_1
|
||||
#define __ARG_PLACEHOLDER_1 0,
|
||||
#define config_enabled(cfg) _config_enabled(cfg)
|
||||
@@ -16,6 +18,7 @@
|
||||
* 3.1 - 3.3 had a broken version of this, so undef
|
||||
* (they didn't have __ARG_PLACEHOLDER_1)
|
||||
*/
|
||||
+
|
||||
#undef IS_ENABLED
|
||||
#define IS_ENABLED(option) \
|
||||
(config_enabled(option) || config_enabled(option##_MODULE))
|
||||
@@ -31,6 +34,8 @@
|
||||
#undef IS_BUILTIN
|
||||
#define IS_BUILTIN(option) config_enabled(option)
|
||||
|
||||
+#endif
|
||||
+
|
||||
#ifndef IS_REACHABLE
|
||||
/*
|
||||
* IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled
|
||||
diff --git a/backport-include/linux/rfkill.h b/backport-include/linux/rfkill.h
|
||||
index 99015af..0193f96 100644
|
||||
--- a/backport-include/linux/rfkill.h
|
||||
+++ b/backport-include/linux/rfkill.h
|
||||
@@ -2,6 +2,12 @@
|
||||
#define __COMPAT_RFKILL_H
|
||||
#include <linux/version.h>
|
||||
|
||||
+#undef CONFIG_RFKILL
|
||||
+#undef CONFIG_RFKILL_FULL
|
||||
+#undef CONFIG_RFKILL_LEDS
|
||||
+#undef CONFIG_RFKILL_MODULE
|
||||
+#undef CONFIG_RFKILL_FULL_MODULE
|
||||
+
|
||||
#if LINUX_VERSION_IS_GEQ(3,10,0)
|
||||
#include_next <linux/rfkill.h>
|
||||
#else
|
||||
diff --git a/compat/main.c b/compat/main.c
|
||||
index 0bf0420..740bf09 100644
|
||||
index 2540e75..c812f7b 100644
|
||||
--- a/compat/main.c
|
||||
+++ b/compat/main.c
|
||||
@@ -20,31 +20,6 @@ MODULE_LICENSE("GPL");
|
||||
@@ -19,31 +19,6 @@ MODULE_LICENSE("GPL");
|
||||
#error "You need a CPTCFG_VERSION"
|
||||
#endif
|
||||
|
||||
|
|
@ -437,7 +388,7 @@ index 0bf0420..740bf09 100644
|
|||
{
|
||||
}
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/Kconfig b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
index 33ecdf1..ffdf951 100644
|
||||
index 2e196b5..84cbe38 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
@@ -63,21 +63,21 @@ endchoice
|
||||
|
|
@ -483,7 +434,7 @@ index 33ecdf1..ffdf951 100644
|
|||
|
||||
config B43_PHY_G
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
|
||||
index 1f2c46f..2ef3263 100644
|
||||
index 836766e..f378356 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||
@@ -2853,7 +2853,7 @@ static struct ssb_device *b43_ssb_gpio_dev(struct b43_wldev *dev)
|
||||
|
|
@ -537,7 +488,7 @@ index 6ba7eb7..b924f63 100644
|
|||
|
||||
# LED support
|
||||
diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
index e3be1fe..503611f 100644
|
||||
index d098c41..0f0fac4 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
@@ -1907,7 +1907,7 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev)
|
||||
|
|
@ -559,7 +510,7 @@ index e3be1fe..503611f 100644
|
|||
#endif
|
||||
gpiodev = bus->chipco.dev ? : pcidev;
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/Kconfig b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
index 053e361..ae090a4 100644
|
||||
index c5e6a50..64f6d2f 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -8,7 +8,7 @@ config BRCMSMAC
|
||||
|
|
@ -572,7 +523,7 @@ index 053e361..ae090a4 100644
|
|||
select LEDS_CLASS if BCMA_DRIVER_GPIO
|
||||
select BRCMUTIL
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
index a1a5259..cb2fb8d 100644
|
||||
index 50239f6..e90b34e 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
@@ -42,6 +42,6 @@ brcmsmac-y := \
|
||||
|
|
@ -717,13 +668,13 @@ index df26c7b..1038c30 100644
|
|||
* We have different type of choice blocks.
|
||||
* If curr.tri equals to mod then we can select several
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index a59d23e..d5a2bfd 100644
|
||||
index 0aaef6d..354f8eb 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -437,43 +437,6 @@ USB_SIERRA_NET=
|
||||
USB_VL600=
|
||||
@@ -451,43 +451,6 @@ USB_VL600=
|
||||
USB_NET_CH9200=
|
||||
USB_NET_AQC111=
|
||||
USB_RTL8153_ECM=
|
||||
-SSB_POSSIBLE=
|
||||
-SSB=
|
||||
-SSB_SPROM=
|
||||
|
|
@ -765,7 +716,7 @@ index a59d23e..d5a2bfd 100644
|
|||
USB_PRINTER=
|
||||
USB_WDM=
|
||||
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
|
||||
index 2e6b1fc..1edfb29 100644
|
||||
index f3cb47e..5f173c8 100644
|
||||
--- a/net/wireless/Kconfig
|
||||
+++ b/net/wireless/Kconfig
|
||||
@@ -188,7 +188,7 @@ config CFG80211_WEXT_EXPORT
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,312 @@
|
|||
From adec6feb0823e369ccb1a5aff5ffc148fd22514b Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:28:52 +0200
|
||||
Subject: [PATCH] backport of ath5k patches from openwrt
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath5k/ath5k.h | 1 +
|
||||
drivers/net/wireless/ath/ath5k/base.c | 8 +-
|
||||
drivers/net/wireless/ath/ath5k/debug.c | 93 +++++++++++++++++++
|
||||
drivers/net/wireless/ath/ath5k/dma.c | 8 ++
|
||||
drivers/net/wireless/ath/ath5k/initvals.c | 6 ++
|
||||
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 9 +-
|
||||
drivers/net/wireless/ath/ath5k/pci.c | 2 +
|
||||
drivers/net/wireless/ath/ath5k/reset.c | 2 +
|
||||
include/linux/ath5k_platform.h | 30 ++++++
|
||||
9 files changed, 150 insertions(+), 9 deletions(-)
|
||||
create mode 100644 include/linux/ath5k_platform.h
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
index 0433631..cff4f6f 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
@@ -1372,6 +1372,7 @@ struct ath5k_hw {
|
||||
u8 ah_coverage_class;
|
||||
bool ah_ack_bitrate_high;
|
||||
u8 ah_bwmode;
|
||||
+ u8 ah_bwmode_debug;
|
||||
bool ah_short_slot;
|
||||
|
||||
/* Antenna Control */
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
|
||||
index 54fdf8d..74f3591 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||
@@ -465,6 +465,9 @@ ath5k_chan_set(struct ath5k_hw *ah, struct cfg80211_chan_def *chandef)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ if (ah->ah_bwmode_debug != AR5K_BWMODE_DEFAULT)
|
||||
+ ah->ah_bwmode = ah->ah_bwmode_debug;
|
||||
+
|
||||
/*
|
||||
* To switch channels clear any pending DMA operations;
|
||||
* wait long enough for the RX fifo to drain, reset the
|
||||
@@ -1963,7 +1966,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||
}
|
||||
|
||||
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
|
||||
- ah->num_mesh_vifs > 1) ||
|
||||
+ ah->num_adhoc_vifs + ah->num_mesh_vifs > 1) ||
|
||||
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
|
||||
u64 tsf = ath5k_hw_get_tsf64(ah);
|
||||
u32 tsftu = TSF_TO_TU(tsf);
|
||||
@@ -2049,7 +2052,7 @@ ath5k_beacon_update_timers(struct ath5k_hw *ah, u64 bc_tsf)
|
||||
|
||||
intval = ah->bintval & AR5K_BEACON_PERIOD;
|
||||
if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs
|
||||
- + ah->num_mesh_vifs > 1) {
|
||||
+ + ah->num_adhoc_vifs + ah->num_mesh_vifs > 1) {
|
||||
intval /= ATH_BCBUF; /* staggered multi-bss beacons */
|
||||
if (intval < 15)
|
||||
ATH5K_WARN(ah, "intval %u is too low, min 15\n",
|
||||
@@ -2515,6 +2518,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
#endif
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
+ { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
|
||||
};
|
||||
|
||||
static const struct ieee80211_iface_combination if_comb = {
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
|
||||
index 4b41160..257101e 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/debug.c
|
||||
@@ -803,6 +803,97 @@ static const struct file_operations fops_ani = {
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
+/* debugfs: bwmode */
|
||||
+
|
||||
+static ssize_t read_file_bwmode(struct file *file, char __user *user_buf,
|
||||
+ size_t count, loff_t *ppos)
|
||||
+{
|
||||
+ struct ath5k_hw *ah = file->private_data;
|
||||
+ char buf[15];
|
||||
+ unsigned int len = 0;
|
||||
+
|
||||
+ int cur_ah_bwmode = ah->ah_bwmode_debug;
|
||||
+
|
||||
+#define print_selected(MODE, LABEL) \
|
||||
+ if (cur_ah_bwmode == MODE) \
|
||||
+ len += snprintf(buf+len, sizeof(buf)-len, "[%s]", LABEL); \
|
||||
+ else \
|
||||
+ len += snprintf(buf+len, sizeof(buf)-len, "%s", LABEL); \
|
||||
+ len += snprintf(buf+len, sizeof(buf)-len, " ");
|
||||
+
|
||||
+ print_selected(AR5K_BWMODE_5MHZ, "5");
|
||||
+ print_selected(AR5K_BWMODE_10MHZ, "10");
|
||||
+ print_selected(AR5K_BWMODE_DEFAULT, "20");
|
||||
+ print_selected(AR5K_BWMODE_40MHZ, "40");
|
||||
+#undef print_selected
|
||||
+
|
||||
+ len += snprintf(buf+len, sizeof(buf)-len, "\n");
|
||||
+
|
||||
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
||||
+}
|
||||
+
|
||||
+static ssize_t write_file_bwmode(struct file *file,
|
||||
+ const char __user *userbuf,
|
||||
+ size_t count, loff_t *ppos)
|
||||
+{
|
||||
+ struct ath5k_hw *ah = file->private_data;
|
||||
+ char buf[3];
|
||||
+ int bw = 20;
|
||||
+ int tobwmode = AR5K_BWMODE_DEFAULT;
|
||||
+
|
||||
+ if (copy_from_user(buf, userbuf, min(count, sizeof(buf))))
|
||||
+ return -EFAULT;
|
||||
+
|
||||
+ /* TODO: Add check for active interface */
|
||||
+
|
||||
+ if(strncmp(buf, "5", 1) == 0 ) {
|
||||
+ tobwmode = AR5K_BWMODE_5MHZ;
|
||||
+ bw = 5;
|
||||
+ } else if ( strncmp(buf, "10", 2) == 0 ) {
|
||||
+ tobwmode = AR5K_BWMODE_10MHZ;
|
||||
+ bw = 10;
|
||||
+ } else if ( strncmp(buf, "20", 2) == 0 ) {
|
||||
+ tobwmode = AR5K_BWMODE_DEFAULT;
|
||||
+ bw = 20;
|
||||
+ } else if ( strncmp(buf, "40", 2) == 0 ) {
|
||||
+ tobwmode = AR5K_BWMODE_40MHZ;
|
||||
+ bw = 40;
|
||||
+ } else
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ ATH5K_INFO(ah, "Changing to %imhz channel width[%i]\n",
|
||||
+ bw, tobwmode);
|
||||
+
|
||||
+ switch (ah->ah_radio) {
|
||||
+ /* TODO: only define radios that actually support 5/10mhz channels */
|
||||
+ case AR5K_RF5413:
|
||||
+ case AR5K_RF5110:
|
||||
+ case AR5K_RF5111:
|
||||
+ case AR5K_RF5112:
|
||||
+ case AR5K_RF2413:
|
||||
+ case AR5K_RF2316:
|
||||
+ case AR5K_RF2317:
|
||||
+ case AR5K_RF2425:
|
||||
+ if(ah->ah_bwmode_debug != tobwmode) {
|
||||
+ mutex_lock(&ah->lock);
|
||||
+ ah->ah_bwmode = tobwmode;
|
||||
+ ah->ah_bwmode_debug = tobwmode;
|
||||
+ mutex_unlock(&ah->lock);
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EOPNOTSUPP;
|
||||
+ }
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations fops_bwmode = {
|
||||
+ .read = read_file_bwmode,
|
||||
+ .write = write_file_bwmode,
|
||||
+ .open = simple_open,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .llseek = default_llseek,
|
||||
+};
|
||||
|
||||
/* debugfs: queues etc */
|
||||
|
||||
@@ -997,6 +1088,8 @@ ath5k_debug_init_device(struct ath5k_hw *ah)
|
||||
debugfs_create_file("queue", 0600, phydir, ah, &fops_queue);
|
||||
debugfs_create_bool("32khz_clock", 0600, phydir,
|
||||
&ah->ah_use_32khz_clock);
|
||||
+ debugfs_create_file("bwmode", S_IWUSR | S_IRUSR, phydir, ah,
|
||||
+ &fops_bwmode);
|
||||
}
|
||||
|
||||
/* functions used in other places */
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/dma.c b/drivers/net/wireless/ath/ath5k/dma.c
|
||||
index e6c52f7..53e075e 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/dma.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/dma.c
|
||||
@@ -869,10 +869,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
|
||||
* guess we can tweak it and see how it goes ;-)
|
||||
*/
|
||||
if (ah->ah_version != AR5K_AR5210) {
|
||||
+#if !defined(CONFIG_ATHEROS_AR71XX) && !defined(CONFIG_ATH79)
|
||||
AR5K_REG_WRITE_BITS(ah, AR5K_TXCFG,
|
||||
AR5K_TXCFG_SDMAMR, AR5K_DMASIZE_128B);
|
||||
AR5K_REG_WRITE_BITS(ah, AR5K_RXCFG,
|
||||
AR5K_RXCFG_SDMAMW, AR5K_DMASIZE_128B);
|
||||
+#else
|
||||
+ /* WAR for AR71xx PCI bug */
|
||||
+ AR5K_REG_WRITE_BITS(ah, AR5K_TXCFG,
|
||||
+ AR5K_TXCFG_SDMAMR, AR5K_DMASIZE_128B);
|
||||
+ AR5K_REG_WRITE_BITS(ah, AR5K_RXCFG,
|
||||
+ AR5K_RXCFG_SDMAMW, AR5K_DMASIZE_4B);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Pre-enable interrupts on 5211/5212*/
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/initvals.c b/drivers/net/wireless/ath/ath5k/initvals.c
|
||||
index ee1c2fa..122fe1c 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/initvals.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/initvals.c
|
||||
@@ -62,8 +62,14 @@ static const struct ath5k_ini ar5210_ini[] = {
|
||||
{ AR5K_IMR, 0 },
|
||||
{ AR5K_IER, AR5K_IER_DISABLE },
|
||||
{ AR5K_BSR, 0, AR5K_INI_READ },
|
||||
+#if !defined(CONFIG_ATHEROS_AR71XX) && !defined(CONFIG_ATH79)
|
||||
{ AR5K_TXCFG, AR5K_DMASIZE_128B },
|
||||
{ AR5K_RXCFG, AR5K_DMASIZE_128B },
|
||||
+#else
|
||||
+ /* WAR for AR71xx PCI bug */
|
||||
+ { AR5K_TXCFG, AR5K_DMASIZE_128B },
|
||||
+ { AR5K_RXCFG, AR5K_DMASIZE_4B },
|
||||
+#endif
|
||||
{ AR5K_CFG, AR5K_INIT_CFG },
|
||||
{ AR5K_TOPS, 8 },
|
||||
{ AR5K_RXNOFRM, 8 },
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
index 532eeac..c40a08f 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
@@ -86,13 +86,8 @@ ath5k_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
goto end;
|
||||
}
|
||||
|
||||
- /* Don't allow other interfaces if one ad-hoc is configured.
|
||||
- * TODO: Fix the problems with ad-hoc and multiple other interfaces.
|
||||
- * We would need to operate the HW in ad-hoc mode to allow TSF updates
|
||||
- * for the IBSS, but this breaks with additional AP or STA interfaces
|
||||
- * at the moment. */
|
||||
- if (ah->num_adhoc_vifs ||
|
||||
- (ah->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) {
|
||||
+ /* Don't allow more than one ad-hoc interface */
|
||||
+ if (ah->num_adhoc_vifs && vif->type == NL80211_IFTYPE_ADHOC) {
|
||||
ATH5K_ERR(ah, "Only one single ad-hoc interface is allowed.\n");
|
||||
ret = -ELNRNG;
|
||||
goto end;
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
|
||||
index 6c724fa..6c993af 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/pci.c
|
||||
@@ -47,6 +47,8 @@ static const struct pci_device_id ath5k_pci_id_table[] = {
|
||||
{ PCI_VDEVICE(ATHEROS, 0x001b) }, /* 5413 Eagle */
|
||||
{ PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
|
||||
{ PCI_VDEVICE(ATHEROS, 0x001d) }, /* 2417 Nala */
|
||||
+ { PCI_VDEVICE(ATHEROS, 0xff16) }, /* 2413,2414 sx76x on lantiq_danube */
|
||||
+ { PCI_VDEVICE(ATHEROS, 0xff1a) }, /* 2417 arv45xx on lantiq_danube */
|
||||
{ PCI_VDEVICE(ATHEROS, 0xff1b) }, /* AR5BXB63 */
|
||||
{ 0 }
|
||||
};
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
|
||||
index 9fdb528..eabf225 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/reset.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/reset.c
|
||||
@@ -1154,6 +1154,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
|
||||
tsf_lo = 0;
|
||||
mode = 0;
|
||||
|
||||
+#if 0
|
||||
/*
|
||||
* Sanity check for fast flag
|
||||
* Fast channel change only available
|
||||
@@ -1161,6 +1162,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
|
||||
*/
|
||||
if (fast && (ah->ah_radio != AR5K_RF2413) &&
|
||||
(ah->ah_radio != AR5K_RF5413))
|
||||
+#endif
|
||||
fast = false;
|
||||
|
||||
/* Disable sleep clock operation
|
||||
diff --git a/include/linux/ath5k_platform.h b/include/linux/ath5k_platform.h
|
||||
new file mode 100644
|
||||
index 0000000..ec85224
|
||||
--- /dev/null
|
||||
+++ b/include/linux/ath5k_platform.h
|
||||
@@ -0,0 +1,30 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2008 Atheros Communications Inc.
|
||||
+ * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org>
|
||||
+ * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org>
|
||||
+ * Copyright (c) 2010 Daniel Golle <daniel.golle@gmail.com>
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_ATH5K_PLATFORM_H
|
||||
+#define _LINUX_ATH5K_PLATFORM_H
|
||||
+
|
||||
+#define ATH5K_PLAT_EEP_MAX_WORDS 2048
|
||||
+
|
||||
+struct ath5k_platform_data {
|
||||
+ u16 *eeprom_data;
|
||||
+ u8 *macaddr;
|
||||
+};
|
||||
+
|
||||
+#endif /* _LINUX_ATH5K_PLATFORM_H */
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,75 +0,0 @@
|
|||
From 03cb19a3d185defe5b22d5c83833de4847b15d29 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Mon, 22 Mar 2021 16:39:42 +0100
|
||||
Subject: [PATCH] 0005 backport of mwl patches from openwrt
|
||||
|
||||
---
|
||||
drivers/net/wireless/marvell/libertas/cfg.c | 4 ++++
|
||||
drivers/net/wireless/marvell/libertas/main.c | 1 +
|
||||
drivers/net/wireless/marvell/mwl8k.c | 5 +++--
|
||||
3 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
index 4e3de68..c861532 100644
|
||||
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
@@ -2053,6 +2053,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
|
||||
goto err_wiphy_new;
|
||||
}
|
||||
|
||||
+ set_wiphy_dev(wdev->wiphy, dev);
|
||||
+
|
||||
return wdev;
|
||||
|
||||
err_wiphy_new:
|
||||
@@ -2127,6 +2129,8 @@ int lbs_cfg_register(struct lbs_private *priv)
|
||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
||||
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
||||
|
||||
+ memcpy(wdev->wiphy->perm_addr, priv->current_addr, ETH_ALEN);
|
||||
+
|
||||
ret = wiphy_register(wdev->wiphy);
|
||||
if (ret < 0)
|
||||
pr_err("cannot register wiphy device\n");
|
||||
diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c
|
||||
index ee4cf34..2ed6228 100644
|
||||
--- a/drivers/net/wireless/marvell/libertas/main.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/main.c
|
||||
@@ -935,6 +935,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
|
||||
goto err_adapter;
|
||||
}
|
||||
|
||||
+ dev_net_set(dev, wiphy_net(wdev->wiphy));
|
||||
dev->ieee80211_ptr = wdev;
|
||||
dev->ml_priv = priv;
|
||||
SET_NETDEV_DEV(dev, dmdev);
|
||||
diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
|
||||
index 23efd70..e8985c7 100644
|
||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -5694,6 +5694,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||
|
||||
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, },
|
||||
{ PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, },
|
||||
@@ -6278,6 +6279,8 @@ static int mwl8k_probe(struct pci_dev *pdev,
|
||||
|
||||
priv->running_bsses = 0;
|
||||
|
||||
+ wait_for_completion(&priv->firmware_loading_complete);
|
||||
+
|
||||
return rc;
|
||||
|
||||
err_stop_firmware:
|
||||
@@ -6311,8 +6314,6 @@ static void mwl8k_remove(struct pci_dev *pdev)
|
||||
return;
|
||||
priv = hw->priv;
|
||||
|
||||
- wait_for_completion(&priv->firmware_loading_complete);
|
||||
-
|
||||
if (priv->fw_state == FW_STATE_ERROR) {
|
||||
mwl8k_hw_reset(priv);
|
||||
goto unmap;
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,27 +1,30 @@
|
|||
From 103bfc86c246ba529893dfc54b7ceb19ec1a03c5 Mon Sep 17 00:00:00 2001
|
||||
From a1dd3f2a734c1e96a7c8fd1ae64126e901a966d5 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Mon, 22 Mar 2021 16:40:53 +0100
|
||||
Subject: [PATCH] 0006 backport of brcm patches from openwrt
|
||||
Date: Wed, 14 Sep 2022 14:30:49 +0200
|
||||
Subject: [PATCH] backport of brcm patches from openwrt
|
||||
|
||||
---
|
||||
drivers/net/wireless/broadcom/b43/Kconfig | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/Makefile | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/b43.h | 3 +
|
||||
drivers/net/wireless/broadcom/b43/dma.h | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/main.c | 82 ++++++++++++++---
|
||||
drivers/net/wireless/broadcom/b43/pio.h | 34 ++++++-
|
||||
drivers/net/wireless/broadcom/brcm80211/Kconfig | 2 +-
|
||||
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 102 +++++++++++++++++++++
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/common.c | 4 +
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/core.c | 9 ++
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/core.h | 8 ++
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 14 +++
|
||||
.../net/wireless/broadcom/brcm80211/brcmfmac/of.c | 32 +++++++
|
||||
.../wireless/broadcom/brcm80211/brcmsmac/channel.c | 19 ++--
|
||||
14 files changed, 286 insertions(+), 29 deletions(-)
|
||||
drivers/net/wireless/broadcom/b43/Kconfig | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/Makefile | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/b43.h | 3 +
|
||||
drivers/net/wireless/broadcom/b43/dma.h | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/main.c | 82 ++++++++++++--
|
||||
drivers/net/wireless/broadcom/b43/pio.h | 34 +++++-
|
||||
.../net/wireless/broadcom/brcm80211/Kconfig | 2 +-
|
||||
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 102 ++++++++++++++++++
|
||||
.../broadcom/brcm80211/brcmfmac/common.c | 27 +++--
|
||||
.../broadcom/brcm80211/brcmfmac/common.h | 1 +
|
||||
.../broadcom/brcm80211/brcmfmac/core.c | 12 ++-
|
||||
.../broadcom/brcm80211/brcmfmac/core.h | 8 ++
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 14 +++
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/of.c | 71 ++++++++++++
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/of.h | 7 ++
|
||||
.../broadcom/brcm80211/brcmfmac/sdio.c | 47 +++++++-
|
||||
.../broadcom/brcm80211/brcmsmac/channel.c | 19 ++--
|
||||
17 files changed, 396 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/Kconfig b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
index ffdf951..c43d931 100644
|
||||
index 84cbe38..5f008b4 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
@@ -100,7 +100,7 @@ config B43_BCMA_PIO
|
||||
|
|
@ -74,7 +77,7 @@ index dfebc64..ec72414 100644
|
|||
#define B43_DMA0_RX_FW351_BUFSIZE (B43_DMA0_RX_FW351_FO + IEEE80211_MAX_FRAME_LEN)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
|
||||
index 2ef3263..8062ded 100644
|
||||
index f378356..86ab6fb 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||
@@ -72,6 +72,11 @@ MODULE_FIRMWARE("b43/ucode40.fw");
|
||||
|
|
@ -180,7 +183,7 @@ index 2ef3263..8062ded 100644
|
|||
|
||||
if (wl->radio_enabled != phy->radio_on) {
|
||||
if (wl->radio_enabled) {
|
||||
@@ -5169,6 +5181,47 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
@@ -5168,6 +5180,47 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +231,7 @@ index 2ef3263..8062ded 100644
|
|||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.tx = b43_op_tx,
|
||||
.conf_tx = b43_op_conf_tx,
|
||||
@@ -5190,6 +5243,8 @@ static const struct ieee80211_ops b43_hw_ops = {
|
||||
@@ -5189,6 +5242,8 @@ static const struct ieee80211_ops b43_hw_ops = {
|
||||
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
||||
.get_survey = b43_op_get_survey,
|
||||
.rfkill_poll = b43_rfkill_poll,
|
||||
|
|
@ -237,7 +240,7 @@ index 2ef3263..8062ded 100644
|
|||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
@@ -5491,6 +5546,8 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)
|
||||
@@ -5490,6 +5545,8 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)
|
||||
if (!wldev)
|
||||
goto out;
|
||||
|
||||
|
|
@ -246,7 +249,7 @@ index 2ef3263..8062ded 100644
|
|||
wldev->use_pio = b43_modparam_pio;
|
||||
wldev->dev = dev;
|
||||
wldev->wl = wl;
|
||||
@@ -5585,6 +5642,9 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
|
||||
@@ -5581,6 +5638,9 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
|
|
@ -308,7 +311,7 @@ index ffbfec6..a3742b7 100644
|
|||
|
||||
#endif /* B43_PIO_H_ */
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/Kconfig b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
index ae090a4..2dc7cab 100644
|
||||
index 64f6d2f..c163838 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -1,6 +1,6 @@
|
||||
|
|
@ -320,7 +323,7 @@ index ae090a4..2dc7cab 100644
|
|||
|
||||
config BRCMSMAC
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
index 7e1d6f9..0373fac 100644
|
||||
index 7a58e05..9e629c2 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -715,8 +715,36 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy,
|
||||
|
|
@ -360,10 +363,11 @@ index 7e1d6f9..0373fac 100644
|
|||
brcmf_dbg(TRACE, "enter: %s type %d\n", name, type);
|
||||
err = brcmf_vif_add_validate(wiphy_to_cfg(wiphy), type);
|
||||
if (err) {
|
||||
@@ -2882,6 +2910,63 @@ done:
|
||||
@@ -2892,6 +2920,63 @@ done:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int
|
||||
+static int
|
||||
+brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+ int idx, struct survey_info *survey)
|
||||
+{
|
||||
|
|
@ -420,11 +424,10 @@ index 7e1d6f9..0373fac 100644
|
|||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
static int
|
||||
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
||||
int idx, u8 *mac, struct station_info *sinfo)
|
||||
{
|
||||
@@ -2930,6 +3015,10 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
|
||||
@@ -2946,6 +3031,10 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
|
||||
* preference in cfg struct to apply this to
|
||||
* FW later while initializing the dongle
|
||||
*/
|
||||
|
|
@ -435,7 +438,7 @@ index 7e1d6f9..0373fac 100644
|
|||
cfg->pwr_save = enabled;
|
||||
if (!check_vif_up(ifp->vif)) {
|
||||
|
||||
@@ -2973,6 +3062,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
|
||||
@@ -2989,6 +3078,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
|
||||
struct brcmu_chan ch;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
|
|
@ -443,7 +446,7 @@ index 7e1d6f9..0373fac 100644
|
|||
u16 notify_capability;
|
||||
u16 notify_interval;
|
||||
u8 *notify_ie;
|
||||
@@ -2997,6 +3087,17 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
|
||||
@@ -3013,6 +3103,17 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
|
||||
band = NL80211_BAND_5GHZ;
|
||||
|
||||
freq = ieee80211_channel_to_frequency(channel, band);
|
||||
|
|
@ -461,7 +464,7 @@ index 7e1d6f9..0373fac 100644
|
|||
bss_data.chan = ieee80211_get_channel(wiphy, freq);
|
||||
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
|
||||
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
|
||||
@@ -5483,6 +5584,7 @@ static struct cfg80211_ops brcmf_cfg80211_ops = {
|
||||
@@ -5541,6 +5642,7 @@ static struct cfg80211_ops brcmf_cfg80211_ops = {
|
||||
.leave_ibss = brcmf_cfg80211_leave_ibss,
|
||||
.get_station = brcmf_cfg80211_get_station,
|
||||
.dump_station = brcmf_cfg80211_dump_station,
|
||||
|
|
@ -470,7 +473,7 @@ index 7e1d6f9..0373fac 100644
|
|||
.get_tx_power = brcmf_cfg80211_get_tx_power,
|
||||
.add_key = brcmf_cfg80211_add_key,
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
index 3512a3f..41b1a8b 100644
|
||||
index 3512a3f..bb7cbe2 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -59,7 +59,11 @@ static int brcmf_fcmode;
|
||||
|
|
@ -485,11 +488,72 @@ index 3512a3f..41b1a8b 100644
|
|||
module_param_named(roamoff, brcmf_roamoff, int, 0400);
|
||||
MODULE_PARM_DESC(roamoff, "Do not use internal roaming engine");
|
||||
|
||||
@@ -202,13 +206,24 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
|
||||
char *ptr;
|
||||
s32 err;
|
||||
|
||||
- /* retreive mac address */
|
||||
- err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr,
|
||||
- sizeof(ifp->mac_addr));
|
||||
- if (err < 0) {
|
||||
- bphy_err(drvr, "Retrieving cur_etheraddr failed, %d\n", err);
|
||||
- goto done;
|
||||
+ if (is_valid_ether_addr(ifp->mac_addr)) {
|
||||
+ /* set mac address */
|
||||
+ err = brcmf_fil_iovar_data_set(ifp, "cur_etheraddr", ifp->mac_addr,
|
||||
+ ETH_ALEN);
|
||||
+ if (err < 0) {
|
||||
+ bphy_err(ifp->drvr, "Setting cur_etheraddr failed, %d\n", err);
|
||||
+ goto done;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* retrieve mac address */
|
||||
+ err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr,
|
||||
+ sizeof(ifp->mac_addr));
|
||||
+ if (err < 0) {
|
||||
+ bphy_err(drvr, "Retrieving cur_etheraddr failed, %d\n", err);
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
memcpy(ifp->drvr->mac, ifp->mac_addr, sizeof(ifp->drvr->mac));
|
||||
memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN);
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
index 8b5f499..15accc8 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
@@ -50,6 +50,7 @@ struct brcmf_mp_device {
|
||||
bool ignore_probe_fail;
|
||||
struct brcmfmac_pd_cc *country_codes;
|
||||
const char *board_type;
|
||||
+ unsigned char mac[ETH_ALEN];
|
||||
union {
|
||||
struct brcmfmac_sdio_pd sdio;
|
||||
} bus;
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
index 011f9fa..4309ad7 100644
|
||||
index 9fbedb8..96e2311 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1356,6 +1356,8 @@ int brcmf_attach(struct device *dev)
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/inetdevice.h>
|
||||
+#include <linux/property.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/rtnetlink.h>
|
||||
#include <net/addrconf.h>
|
||||
@@ -1226,7 +1227,8 @@ static int brcmf_bus_started(struct brcmf_pub *drvr, struct cfg80211_ops *ops)
|
||||
brcmf_dbg(TRACE, "\n");
|
||||
|
||||
/* add primary networking interface */
|
||||
- ifp = brcmf_add_if(drvr, 0, 0, false, "wlan%d", NULL);
|
||||
+ ifp = brcmf_add_if(drvr, 0, 0, false, "wlan%d",
|
||||
+ is_valid_ether_addr(drvr->settings->mac) ? drvr->settings->mac : NULL);
|
||||
if (IS_ERR(ifp))
|
||||
return PTR_ERR(ifp);
|
||||
|
||||
@@ -1361,6 +1363,8 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
/* Link to bus module */
|
||||
drvr->hdrlen = 0;
|
||||
|
|
@ -498,7 +562,7 @@ index 011f9fa..4309ad7 100644
|
|||
|
||||
/* Attach and link in the protocol */
|
||||
ret = brcmf_proto_attach(drvr);
|
||||
@@ -1438,6 +1440,12 @@ void brcmf_detach(struct device *dev)
|
||||
@@ -1443,6 +1447,12 @@ void brcmf_detach(struct device *dev)
|
||||
if (drvr == NULL)
|
||||
return;
|
||||
|
||||
|
|
@ -511,16 +575,8 @@ index 011f9fa..4309ad7 100644
|
|||
#ifdef CONFIG_INET
|
||||
unregister_inetaddr_notifier(&drvr->inetaddr_notifier);
|
||||
#endif
|
||||
@@ -1557,6 +1565,7 @@ int __init brcmf_core_init(void)
|
||||
{
|
||||
if (!schedule_work(&brcmf_driver_work))
|
||||
return -EBUSY;
|
||||
+ flush_work(&brcmf_driver_work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
index 5767d66..0ae1cc2 100644
|
||||
index 8212c9d..c57b8bb 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
@@ -91,6 +91,11 @@ struct brcmf_rev_info {
|
||||
|
|
@ -546,7 +602,7 @@ index 5767d66..0ae1cc2 100644
|
|||
uint hdrlen; /* Total BRCMF header length (proto + bus) */
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
index d821a47..47f72f7 100644
|
||||
index dcbe55b..3ddc390 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -431,6 +431,7 @@ struct brcmf_fw {
|
||||
|
|
@ -556,8 +612,8 @@ index d821a47..47f72f7 100644
|
|||
+ struct completion *completion;
|
||||
};
|
||||
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx);
|
||||
@@ -638,6 +639,8 @@ static void brcmf_fw_request_done(const struct firmware *fw, void *ctx)
|
||||
#ifdef CONFIG_EFI
|
||||
@@ -655,6 +656,8 @@ static void brcmf_fw_request_done(const struct firmware *fw, void *ctx)
|
||||
fwctx->req = NULL;
|
||||
}
|
||||
fwctx->done(fwctx->dev, ret, fwctx->req);
|
||||
|
|
@ -566,16 +622,16 @@ index d821a47..47f72f7 100644
|
|||
kfree(fwctx);
|
||||
}
|
||||
|
||||
@@ -662,6 +665,8 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
@@ -695,6 +698,8 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
{
|
||||
struct brcmf_fw_item *first = &req->items[0];
|
||||
struct brcmf_fw *fwctx;
|
||||
+ struct completion completion;
|
||||
+ unsigned long time_left;
|
||||
char *alt_path = NULL;
|
||||
int ret;
|
||||
|
||||
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
|
||||
@@ -678,6 +683,9 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
@@ -712,6 +717,9 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
fwctx->dev = dev;
|
||||
fwctx->req = req;
|
||||
fwctx->done = fw_cb;
|
||||
|
|
@ -583,9 +639,9 @@ index d821a47..47f72f7 100644
|
|||
+ init_completion(&completion);
|
||||
+ fwctx->completion = &completion;
|
||||
|
||||
ret = request_firmware_nowait(THIS_MODULE, true, first->path,
|
||||
fwctx->dev, GFP_KERNEL, fwctx,
|
||||
@@ -685,6 +693,12 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
/* First try alternative board-specific path if any */
|
||||
if (fwctx->req->board_type)
|
||||
@@ -730,6 +738,12 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
if (ret < 0)
|
||||
brcmf_fw_request_done(NULL, fwctx);
|
||||
|
||||
|
|
@ -599,13 +655,27 @@ index d821a47..47f72f7 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
index a755426..e9c23c4 100644
|
||||
index 2f7bc3a..8cf1ad1 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -12,6 +12,36 @@
|
||||
@@ -5,11 +5,13 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_irq.h>
|
||||
+#include <linux/of_net.h>
|
||||
|
||||
#include <defs.h>
|
||||
#include "debug.h"
|
||||
#include "core.h"
|
||||
#include "common.h"
|
||||
+#include "firmware.h"
|
||||
#include "of.h"
|
||||
|
||||
static int brcmf_of_get_country_codes(struct device *dev,
|
||||
@@ -58,6 +60,36 @@ static int brcmf_of_get_country_codes(struct device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* TODO: FIXME: Use DT */
|
||||
+static void brcmf_of_probe_cc(struct device *dev,
|
||||
+ struct brcmf_mp_device *settings)
|
||||
|
|
@ -639,15 +709,198 @@ index a755426..e9c23c4 100644
|
|||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
@@ -43,6 +73,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
@@ -90,6 +122,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
of_node_put(root);
|
||||
}
|
||||
|
||||
+ brcmf_of_probe_cc(dev, settings);
|
||||
+
|
||||
if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
|
||||
!of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
return;
|
||||
|
||||
@@ -97,6 +131,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
if (err)
|
||||
brcmf_err("failed to get OF country code map (err=%d)\n", err);
|
||||
|
||||
+ of_get_mac_address(np, settings->mac);
|
||||
+
|
||||
if (bus_type != BRCMF_BUSTYPE_SDIO)
|
||||
return;
|
||||
|
||||
@@ -118,3 +154,38 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
sdio->oob_irq_nr = irq;
|
||||
sdio->oob_irq_flags = irqf;
|
||||
}
|
||||
+
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *fwname_count)
|
||||
+{
|
||||
+ struct device_node *np = dev->of_node;
|
||||
+ struct brcmf_firmware_mapping *fwnames;
|
||||
+ struct device_node *map_np, *fw_np;
|
||||
+ int of_count;
|
||||
+ int count = 0;
|
||||
+
|
||||
+ map_np = of_get_child_by_name(np, "firmwares");
|
||||
+ of_count = of_get_child_count(map_np);
|
||||
+ if (!of_count)
|
||||
+ return NULL;
|
||||
+
|
||||
+ fwnames = devm_kcalloc(dev, of_count,
|
||||
+ sizeof(struct brcmf_firmware_mapping),
|
||||
+ GFP_KERNEL);
|
||||
+
|
||||
+ for_each_child_of_node(map_np, fw_np)
|
||||
+ {
|
||||
+ struct brcmf_firmware_mapping *cur = &fwnames[count];
|
||||
+
|
||||
+ if (of_property_read_u32(fw_np, "chipid", &cur->chipid) ||
|
||||
+ of_property_read_u32(fw_np, "revmask", &cur->revmask))
|
||||
+ continue;
|
||||
+ cur->fw_base = of_get_property(fw_np, "fw_base", NULL);
|
||||
+ if (cur->fw_base)
|
||||
+ count++;
|
||||
+ }
|
||||
+
|
||||
+ *fwname_count = count;
|
||||
+
|
||||
+ return count ? fwnames : NULL;
|
||||
+}
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
index 10bf522..5b39a39 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
@@ -5,9 +5,16 @@
|
||||
#ifdef CONFIG_OF
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings);
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count);
|
||||
#else
|
||||
static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
}
|
||||
+static struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
#endif /* CONFIG_OF */
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
index f7961b2..3c5989b 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "core.h"
|
||||
#include "common.h"
|
||||
#include "bcdc.h"
|
||||
+#include "of.h"
|
||||
|
||||
#define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500)
|
||||
#define CTL_DONE_TIMEOUT msecs_to_jiffies(2500)
|
||||
@@ -633,7 +634,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt");
|
||||
/* per-board firmware binaries */
|
||||
MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.bin");
|
||||
|
||||
-static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
+static const struct brcmf_firmware_mapping sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
|
||||
@@ -659,6 +660,9 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(CY_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752)
|
||||
};
|
||||
|
||||
+static const struct brcmf_firmware_mapping *brcmf_sdio_fwnames = sdio_fwnames;
|
||||
+static u32 brcmf_sdio_fwnames_count = ARRAY_SIZE(sdio_fwnames);
|
||||
+
|
||||
#define TXCTL_CREDITS 2
|
||||
|
||||
static void pkt_align(struct sk_buff *p, int len, int align)
|
||||
@@ -4140,7 +4144,7 @@ int brcmf_sdio_get_fwname(struct device *dev, const char *ext, u8 *fw_name)
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus_if->chip, bus_if->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
- ARRAY_SIZE(brcmf_sdio_fwnames),
|
||||
+ brcmf_sdio_fwnames_count,
|
||||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return -ENOMEM;
|
||||
@@ -4196,6 +4200,9 @@ static const struct brcmf_bus_ops brcmf_sdio_bus_ops = {
|
||||
#define BRCMF_SDIO_FW_CODE 0
|
||||
#define BRCMF_SDIO_FW_NVRAM 1
|
||||
|
||||
+static struct brcmf_fw_request *
|
||||
+brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus);
|
||||
+
|
||||
static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||
struct brcmf_fw_request *fwreq)
|
||||
{
|
||||
@@ -4211,6 +4218,22 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||
|
||||
brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err);
|
||||
|
||||
+ if (err && brcmf_sdio_fwnames != sdio_fwnames) {
|
||||
+ /* Try again with the standard firmware names */
|
||||
+ brcmf_sdio_fwnames = sdio_fwnames;
|
||||
+ brcmf_sdio_fwnames_count = ARRAY_SIZE(sdio_fwnames);
|
||||
+ kfree(fwreq);
|
||||
+ fwreq = brcmf_sdio_prepare_fw_request(bus);
|
||||
+ if (!fwreq) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ err = brcmf_fw_get_firmwares(dev, fwreq,
|
||||
+ brcmf_sdio_firmware_callback);
|
||||
+ if (!err)
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
@@ -4419,7 +4442,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus)
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
- ARRAY_SIZE(brcmf_sdio_fwnames),
|
||||
+ brcmf_sdio_fwnames_count,
|
||||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return NULL;
|
||||
@@ -4437,6 +4460,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
struct brcmf_sdio *bus;
|
||||
struct workqueue_struct *wq;
|
||||
struct brcmf_fw_request *fwreq;
|
||||
+ struct brcmf_firmware_mapping *of_fwnames, *fwnames = NULL;
|
||||
+ const int fwname_size = sizeof(struct brcmf_firmware_mapping);
|
||||
+ u32 of_fw_count;
|
||||
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
@@ -4519,6 +4545,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
|
||||
brcmf_dbg(INFO, "completed!!\n");
|
||||
|
||||
+ of_fwnames = brcmf_of_fwnames(sdiodev->dev, &of_fw_count);
|
||||
+ if (of_fwnames)
|
||||
+ fwnames = devm_kcalloc(sdiodev->dev,
|
||||
+ of_fw_count + brcmf_sdio_fwnames_count,
|
||||
+ fwname_size, GFP_KERNEL);
|
||||
+
|
||||
+ if (fwnames) {
|
||||
+ /* The array is scanned in order, so overrides come first */
|
||||
+ memcpy(fwnames, of_fwnames, of_fw_count * fwname_size);
|
||||
+ memcpy(fwnames + of_fw_count, sdio_fwnames,
|
||||
+ brcmf_sdio_fwnames_count * fwname_size);
|
||||
+ brcmf_sdio_fwnames = fwnames;
|
||||
+ brcmf_sdio_fwnames_count += of_fw_count;
|
||||
+ }
|
||||
+
|
||||
fwreq = brcmf_sdio_prepare_fw_request(bus);
|
||||
if (!fwreq) {
|
||||
ret = -ENOMEM;
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c
|
||||
index 5a6d9c8..dbf197f 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c
|
||||
|
|
@ -1,811 +0,0 @@
|
|||
From 5219cf1f08755b8d8ca8019a47ccc29cba9f69ef Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Mon, 22 Mar 2021 16:44:09 +0100
|
||||
Subject: [PATCH] 0007 backport of rtl patches from openwrt
|
||||
|
||||
---
|
||||
.../net/wireless/realtek/rtlwifi/rtl8821ae/table.c | 500 +++++++++++++++------
|
||||
1 file changed, 370 insertions(+), 130 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c
|
||||
index 85093b3..ed72a2a 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c
|
||||
@@ -249,7 +249,7 @@ u32 RTL8821AE_PHY_REG_ARRAY[] = {
|
||||
0x824, 0x00030FE0,
|
||||
0x828, 0x00000000,
|
||||
0x82C, 0x002081DD,
|
||||
- 0x830, 0x2AAA8E24,
|
||||
+ 0x830, 0x2AAAEEC8,
|
||||
0x834, 0x0037A706,
|
||||
0x838, 0x06489B44,
|
||||
0x83C, 0x0000095B,
|
||||
@@ -324,10 +324,10 @@ u32 RTL8821AE_PHY_REG_ARRAY[] = {
|
||||
0x9D8, 0x00000000,
|
||||
0x9DC, 0x00000000,
|
||||
0x9E0, 0x00005D00,
|
||||
- 0x9E4, 0x00000002,
|
||||
+ 0x9E4, 0x00000003,
|
||||
0x9E8, 0x00000001,
|
||||
0xA00, 0x00D047C8,
|
||||
- 0xA04, 0x01FF000C,
|
||||
+ 0xA04, 0x01FF800C,
|
||||
0xA08, 0x8C8A8300,
|
||||
0xA0C, 0x2E68000F,
|
||||
0xA10, 0x9500BB78,
|
||||
@@ -1320,7 +1320,11 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x083, 0x00021800,
|
||||
0x084, 0x00028000,
|
||||
0x085, 0x00048000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x086, 0x0009483A,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x086, 0x00094838,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x087, 0x00044980,
|
||||
0x088, 0x00048000,
|
||||
0x089, 0x0000D480,
|
||||
@@ -1409,36 +1413,32 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x03C, 0x000CA000,
|
||||
0x0EF, 0x00000000,
|
||||
0x0EF, 0x00001100,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0004ADF3,
|
||||
0x034, 0x00049DF0,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0004ADF3,
|
||||
0x034, 0x00049DF0,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
- 0x034, 0x0004ADF3,
|
||||
- 0x034, 0x00049DF0,
|
||||
- 0xFF0F0200, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0004ADF5,
|
||||
0x034, 0x00049DF2,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x0004A0F3,
|
||||
+ 0x034, 0x000490B1,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0004A0F3,
|
||||
0x034, 0x000490B1,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x0004ADF5,
|
||||
+ 0x034, 0x00049DF2,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x0004ADF3,
|
||||
+ 0x034, 0x00049DF0,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x034, 0x0004ADF7,
|
||||
0x034, 0x00049DF3,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
- 0x034, 0x00048DED,
|
||||
- 0x034, 0x00047DEA,
|
||||
- 0x034, 0x00046DE7,
|
||||
- 0x034, 0x00045CE9,
|
||||
- 0x034, 0x00044CE6,
|
||||
- 0x034, 0x000438C6,
|
||||
- 0x034, 0x00042886,
|
||||
- 0x034, 0x00041486,
|
||||
- 0x034, 0x00040447,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00048DED,
|
||||
0x034, 0x00047DEA,
|
||||
0x034, 0x00046DE7,
|
||||
@@ -1448,7 +1448,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00042886,
|
||||
0x034, 0x00041486,
|
||||
0x034, 0x00040447,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00048DED,
|
||||
0x034, 0x00047DEA,
|
||||
0x034, 0x00046DE7,
|
||||
@@ -1458,7 +1458,17 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00042886,
|
||||
0x034, 0x00041486,
|
||||
0x034, 0x00040447,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x000480AE,
|
||||
+ 0x034, 0x000470AB,
|
||||
+ 0x034, 0x0004608B,
|
||||
+ 0x034, 0x00045069,
|
||||
+ 0x034, 0x00044048,
|
||||
+ 0x034, 0x00043045,
|
||||
+ 0x034, 0x00042026,
|
||||
+ 0x034, 0x00041023,
|
||||
+ 0x034, 0x00040002,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x000480AE,
|
||||
0x034, 0x000470AB,
|
||||
0x034, 0x0004608B,
|
||||
@@ -1468,7 +1478,17 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00042026,
|
||||
0x034, 0x00041023,
|
||||
0x034, 0x00040002,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x00048DED,
|
||||
+ 0x034, 0x00047DEA,
|
||||
+ 0x034, 0x00046DE7,
|
||||
+ 0x034, 0x00045CE9,
|
||||
+ 0x034, 0x00044CE6,
|
||||
+ 0x034, 0x000438C6,
|
||||
+ 0x034, 0x00042886,
|
||||
+ 0x034, 0x00041486,
|
||||
+ 0x034, 0x00040447,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x034, 0x00048DEF,
|
||||
0x034, 0x00047DEC,
|
||||
0x034, 0x00046DE9,
|
||||
@@ -1478,38 +1498,36 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x0004248A,
|
||||
0x034, 0x0004108D,
|
||||
0x034, 0x0004008A,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0200, 0xABCD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0002ADF4,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x0002A0F3,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0002A0F3,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x0002ADF4,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x034, 0x0002ADF7,
|
||||
- 0xFF0F0200, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
- 0x034, 0x00029DF4,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00029DF4,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00029DF4,
|
||||
- 0xFF0F0200, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00029DF1,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x000290F0,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x000290F0,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x00029DF1,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x00029DF4,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x034, 0x00029DF2,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
- 0x034, 0x00028DF1,
|
||||
- 0x034, 0x00027DEE,
|
||||
- 0x034, 0x00026DEB,
|
||||
- 0x034, 0x00025CEC,
|
||||
- 0x034, 0x00024CE9,
|
||||
- 0x034, 0x000238CA,
|
||||
- 0x034, 0x00022889,
|
||||
- 0x034, 0x00021489,
|
||||
- 0x034, 0x0002044A,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00028DF1,
|
||||
0x034, 0x00027DEE,
|
||||
0x034, 0x00026DEB,
|
||||
@@ -1519,7 +1537,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00022889,
|
||||
0x034, 0x00021489,
|
||||
0x034, 0x0002044A,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00028DF1,
|
||||
0x034, 0x00027DEE,
|
||||
0x034, 0x00026DEB,
|
||||
@@ -1529,7 +1547,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00022889,
|
||||
0x034, 0x00021489,
|
||||
0x034, 0x0002044A,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x000280AF,
|
||||
0x034, 0x000270AC,
|
||||
0x034, 0x0002608B,
|
||||
@@ -1539,7 +1557,27 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00022026,
|
||||
0x034, 0x00021023,
|
||||
0x034, 0x00020002,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x000280AF,
|
||||
+ 0x034, 0x000270AC,
|
||||
+ 0x034, 0x0002608B,
|
||||
+ 0x034, 0x00025069,
|
||||
+ 0x034, 0x00024048,
|
||||
+ 0x034, 0x00023045,
|
||||
+ 0x034, 0x00022026,
|
||||
+ 0x034, 0x00021023,
|
||||
+ 0x034, 0x00020002,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x00028DF1,
|
||||
+ 0x034, 0x00027DEE,
|
||||
+ 0x034, 0x00026DEB,
|
||||
+ 0x034, 0x00025CEC,
|
||||
+ 0x034, 0x00024CE9,
|
||||
+ 0x034, 0x000238CA,
|
||||
+ 0x034, 0x00022889,
|
||||
+ 0x034, 0x00021489,
|
||||
+ 0x034, 0x0002044A,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x034, 0x00028DEE,
|
||||
0x034, 0x00027DEB,
|
||||
0x034, 0x00026CCD,
|
||||
@@ -1549,27 +1587,24 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00022849,
|
||||
0x034, 0x00021449,
|
||||
0x034, 0x0002004D,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F02C0, 0xABCD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x8000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x0000A0D7,
|
||||
+ 0x034, 0x000090D3,
|
||||
+ 0x034, 0x000080B1,
|
||||
+ 0x034, 0x000070AE,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0000A0D7,
|
||||
0x034, 0x000090D3,
|
||||
0x034, 0x000080B1,
|
||||
0x034, 0x000070AE,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x034, 0x0000ADF7,
|
||||
0x034, 0x00009DF4,
|
||||
0x034, 0x00008DF1,
|
||||
0x034, 0x00007DEE,
|
||||
- 0xFF0F02C0, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
- 0x034, 0x00006DEB,
|
||||
- 0x034, 0x00005CEC,
|
||||
- 0x034, 0x00004CE9,
|
||||
- 0x034, 0x000038CA,
|
||||
- 0x034, 0x00002889,
|
||||
- 0x034, 0x00001489,
|
||||
- 0x034, 0x0000044A,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00006DEB,
|
||||
0x034, 0x00005CEC,
|
||||
0x034, 0x00004CE9,
|
||||
@@ -1577,7 +1612,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00002889,
|
||||
0x034, 0x00001489,
|
||||
0x034, 0x0000044A,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x00006DEB,
|
||||
0x034, 0x00005CEC,
|
||||
0x034, 0x00004CE9,
|
||||
@@ -1585,7 +1620,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00002889,
|
||||
0x034, 0x00001489,
|
||||
0x034, 0x0000044A,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x034, 0x0000608D,
|
||||
0x034, 0x0000506B,
|
||||
0x034, 0x0000404A,
|
||||
@@ -1593,7 +1628,23 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00002044,
|
||||
0x034, 0x00001025,
|
||||
0x034, 0x00000004,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x0000608D,
|
||||
+ 0x034, 0x0000506B,
|
||||
+ 0x034, 0x0000404A,
|
||||
+ 0x034, 0x00003047,
|
||||
+ 0x034, 0x00002044,
|
||||
+ 0x034, 0x00001025,
|
||||
+ 0x034, 0x00000004,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x034, 0x00006DEB,
|
||||
+ 0x034, 0x00005CEC,
|
||||
+ 0x034, 0x00004CE9,
|
||||
+ 0x034, 0x000038CA,
|
||||
+ 0x034, 0x00002889,
|
||||
+ 0x034, 0x00001489,
|
||||
+ 0x034, 0x0000044A,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x034, 0x00006DCD,
|
||||
0x034, 0x00005CCD,
|
||||
0x034, 0x00004CCA,
|
||||
@@ -1601,11 +1652,11 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x034, 0x00002888,
|
||||
0x034, 0x00001488,
|
||||
0x034, 0x00000486,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x0EF, 0x00000000,
|
||||
0x018, 0x0001712A,
|
||||
0x0EF, 0x00000040,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x035, 0x00000187,
|
||||
0x035, 0x00008187,
|
||||
0x035, 0x00010187,
|
||||
@@ -1615,7 +1666,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x035, 0x00040188,
|
||||
0x035, 0x00048188,
|
||||
0x035, 0x00050188,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x035, 0x00000187,
|
||||
0x035, 0x00008187,
|
||||
0x035, 0x00010187,
|
||||
@@ -1625,7 +1676,37 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x035, 0x00040188,
|
||||
0x035, 0x00048188,
|
||||
0x035, 0x00050188,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x035, 0x00000128,
|
||||
+ 0x035, 0x00008128,
|
||||
+ 0x035, 0x00010128,
|
||||
+ 0x035, 0x000201C8,
|
||||
+ 0x035, 0x000281C8,
|
||||
+ 0x035, 0x000301C8,
|
||||
+ 0x035, 0x000401C8,
|
||||
+ 0x035, 0x000481C8,
|
||||
+ 0x035, 0x000501C8,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x035, 0x00000145,
|
||||
+ 0x035, 0x00008145,
|
||||
+ 0x035, 0x00010145,
|
||||
+ 0x035, 0x00020196,
|
||||
+ 0x035, 0x00028196,
|
||||
+ 0x035, 0x00030196,
|
||||
+ 0x035, 0x000401C7,
|
||||
+ 0x035, 0x000481C7,
|
||||
+ 0x035, 0x000501C7,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x035, 0x00000128,
|
||||
+ 0x035, 0x00008128,
|
||||
+ 0x035, 0x00010128,
|
||||
+ 0x035, 0x000201C8,
|
||||
+ 0x035, 0x000281C8,
|
||||
+ 0x035, 0x000301C8,
|
||||
+ 0x035, 0x000401C8,
|
||||
+ 0x035, 0x000481C8,
|
||||
+ 0x035, 0x000501C8,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x035, 0x00000187,
|
||||
0x035, 0x00008187,
|
||||
0x035, 0x00010187,
|
||||
@@ -1635,7 +1716,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x035, 0x00040188,
|
||||
0x035, 0x00048188,
|
||||
0x035, 0x00050188,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x035, 0x00000145,
|
||||
0x035, 0x00008145,
|
||||
0x035, 0x00010145,
|
||||
@@ -1645,11 +1726,11 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x035, 0x000401C7,
|
||||
0x035, 0x000481C7,
|
||||
0x035, 0x000501C7,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x0EF, 0x00000000,
|
||||
0x018, 0x0001712A,
|
||||
0x0EF, 0x00000010,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x036, 0x00085733,
|
||||
0x036, 0x0008D733,
|
||||
0x036, 0x00095733,
|
||||
@@ -1662,7 +1743,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x036, 0x000CE4B4,
|
||||
0x036, 0x000D64B4,
|
||||
0x036, 0x000DE4B4,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x036, 0x00085733,
|
||||
0x036, 0x0008D733,
|
||||
0x036, 0x00095733,
|
||||
@@ -1675,7 +1756,46 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x036, 0x000CE4B4,
|
||||
0x036, 0x000D64B4,
|
||||
0x036, 0x000DE4B4,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x036, 0x000063B5,
|
||||
+ 0x036, 0x0000E3B5,
|
||||
+ 0x036, 0x000163B5,
|
||||
+ 0x036, 0x0001E3B5,
|
||||
+ 0x036, 0x000263B5,
|
||||
+ 0x036, 0x0002E3B5,
|
||||
+ 0x036, 0x000363B5,
|
||||
+ 0x036, 0x0003E3B5,
|
||||
+ 0x036, 0x000463B5,
|
||||
+ 0x036, 0x0004E3B5,
|
||||
+ 0x036, 0x000563B5,
|
||||
+ 0x036, 0x0005E3B5,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x036, 0x000056B3,
|
||||
+ 0x036, 0x0000D6B3,
|
||||
+ 0x036, 0x000156B3,
|
||||
+ 0x036, 0x0001D6B3,
|
||||
+ 0x036, 0x00026634,
|
||||
+ 0x036, 0x0002E634,
|
||||
+ 0x036, 0x00036634,
|
||||
+ 0x036, 0x0003E634,
|
||||
+ 0x036, 0x000467B4,
|
||||
+ 0x036, 0x0004E7B4,
|
||||
+ 0x036, 0x000567B4,
|
||||
+ 0x036, 0x0005E7B4,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x036, 0x000063B5,
|
||||
+ 0x036, 0x0000E3B5,
|
||||
+ 0x036, 0x000163B5,
|
||||
+ 0x036, 0x0001E3B5,
|
||||
+ 0x036, 0x000263B5,
|
||||
+ 0x036, 0x0002E3B5,
|
||||
+ 0x036, 0x000363B5,
|
||||
+ 0x036, 0x0003E3B5,
|
||||
+ 0x036, 0x000463B5,
|
||||
+ 0x036, 0x0004E3B5,
|
||||
+ 0x036, 0x000563B5,
|
||||
+ 0x036, 0x0005E3B5,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x036, 0x00085733,
|
||||
0x036, 0x0008D733,
|
||||
0x036, 0x00095733,
|
||||
@@ -1688,7 +1808,7 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x036, 0x000CE4B4,
|
||||
0x036, 0x000D64B4,
|
||||
0x036, 0x000DE4B4,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x036, 0x000056B3,
|
||||
0x036, 0x0000D6B3,
|
||||
0x036, 0x000156B3,
|
||||
@@ -1701,103 +1821,162 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x036, 0x0004E7B4,
|
||||
0x036, 0x000567B4,
|
||||
0x036, 0x0005E7B4,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x0EF, 0x00000000,
|
||||
0x0EF, 0x00000008,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x03C, 0x000001C8,
|
||||
0x03C, 0x00000492,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x03C, 0x000001C8,
|
||||
0x03C, 0x00000492,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x03C, 0x000001B6,
|
||||
+ 0x03C, 0x00000492,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x03C, 0x0000022A,
|
||||
+ 0x03C, 0x00000594,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x03C, 0x000001B6,
|
||||
+ 0x03C, 0x00000492,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x03C, 0x000001C8,
|
||||
0x03C, 0x00000492,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x03C, 0x0000022A,
|
||||
0x03C, 0x00000594,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x03C, 0x00000800,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x03C, 0x00000800,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x03C, 0x00000800,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x03C, 0x00000820,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x03C, 0x00000820,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x03C, 0x00000800,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x03C, 0x00000800,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x03C, 0x00000900,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x0EF, 0x00000000,
|
||||
0x018, 0x0001712A,
|
||||
0x0EF, 0x00000002,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x008, 0x0004E400,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x008, 0x0004E400,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x008, 0x00002000,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x008, 0x00002000,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x008, 0x00002000,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x008, 0x00002000,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x008, 0x0004E400,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x008, 0x00002000,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x0EF, 0x00000000,
|
||||
0x0DF, 0x000000C0,
|
||||
- 0x01F, 0x00040064,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0x01F, 0x00000064,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x058, 0x000A7284,
|
||||
0x059, 0x000600EC,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x058, 0x000A7284,
|
||||
0x059, 0x000600EC,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x058, 0x00081184,
|
||||
+ 0x059, 0x0006016C,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x058, 0x00081184,
|
||||
+ 0x059, 0x0006016C,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x058, 0x00081184,
|
||||
+ 0x059, 0x0006016C,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x058, 0x000A7284,
|
||||
0x059, 0x000600EC,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x058, 0x00081184,
|
||||
0x059, 0x0006016C,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x061, 0x000E8D73,
|
||||
0x062, 0x00093FC5,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x061, 0x000E8D73,
|
||||
0x062, 0x00093FC5,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x061, 0x000EFD83,
|
||||
+ 0x062, 0x00093FCC,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x061, 0x000EAD53,
|
||||
+ 0x062, 0x00093BC4,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x061, 0x000EFD83,
|
||||
+ 0x062, 0x00093FCC,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x061, 0x000E8D73,
|
||||
0x062, 0x00093FC5,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x061, 0x000EAD53,
|
||||
0x062, 0x00093BC4,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x063, 0x000110E9,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x063, 0x000110E9,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x063, 0x000110EB,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x063, 0x000110E9,
|
||||
- 0xFF0F0200, 0xCDEF,
|
||||
- 0x063, 0x000710E9,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x063, 0x000110E9,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x063, 0x000110EB,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x063, 0x000110E9,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x063, 0x000714E9,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0104, 0xABCD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x064, 0x0001C27C,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x064, 0x0001C27C,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x064, 0x0001C27C,
|
||||
- 0xFF0F0204, 0xCDEF,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x064, 0x0001C67C,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x064, 0x0001C27C,
|
||||
- 0xFF0F0404, 0xCDEF,
|
||||
+ 0x90000410, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x064, 0x0001C27C,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x064, 0x0001C67C,
|
||||
- 0xFF0F0104, 0xDEAD,
|
||||
- 0xFF0F0200, 0xABCD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
+ 0x80000111, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x065, 0x00091016,
|
||||
+ 0x90000110, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x065, 0x00091016,
|
||||
+ 0x90000210, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x065, 0x00093016,
|
||||
- 0xFF0F02C0, 0xCDEF,
|
||||
+ 0x9000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x065, 0x00093015,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x065, 0x00093015,
|
||||
+ 0x90000200, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x065, 0x00093016,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x065, 0x00091016,
|
||||
- 0xFF0F0200, 0xDEAD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x018, 0x00000006,
|
||||
0x0EF, 0x00002000,
|
||||
0x03B, 0x0003824B,
|
||||
@@ -1895,9 +2074,10 @@ u32 RTL8821AE_RADIOA_ARRAY[] = {
|
||||
0x0B4, 0x0001214C,
|
||||
0x0B7, 0x0003000C,
|
||||
0x01C, 0x000539D2,
|
||||
+ 0x0C4, 0x000AFE00,
|
||||
0x018, 0x0001F12A,
|
||||
- 0x0FE, 0x00000000,
|
||||
- 0x0FE, 0x00000000,
|
||||
+ 0xFFE, 0x00000000,
|
||||
+ 0xFFE, 0x00000000,
|
||||
0x018, 0x0001712A,
|
||||
|
||||
};
|
||||
@@ -2017,6 +2197,7 @@ u32 RTL8812AE_MAC_REG_ARRAY[] = {
|
||||
u32 RTL8812AE_MAC_1T_ARRAYLEN = ARRAY_SIZE(RTL8812AE_MAC_REG_ARRAY);
|
||||
|
||||
u32 RTL8821AE_MAC_REG_ARRAY[] = {
|
||||
+ 0x421, 0x0000000F,
|
||||
0x428, 0x0000000A,
|
||||
0x429, 0x00000010,
|
||||
0x430, 0x00000000,
|
||||
@@ -2485,7 +2666,7 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = {
|
||||
0x81C, 0xA6360001,
|
||||
0x81C, 0xA5380001,
|
||||
0x81C, 0xA43A0001,
|
||||
- 0x81C, 0xA33C0001,
|
||||
+ 0x81C, 0x683C0001,
|
||||
0x81C, 0x673E0001,
|
||||
0x81C, 0x66400001,
|
||||
0x81C, 0x65420001,
|
||||
@@ -2519,7 +2700,66 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = {
|
||||
0x81C, 0x017A0001,
|
||||
0x81C, 0x017C0001,
|
||||
0x81C, 0x017E0001,
|
||||
- 0xFF0F02C0, 0xABCD,
|
||||
+ 0x8000020c, 0x00000000, 0x40000000, 0x00000000,
|
||||
+ 0x81C, 0xFB000101,
|
||||
+ 0x81C, 0xFA020101,
|
||||
+ 0x81C, 0xF9040101,
|
||||
+ 0x81C, 0xF8060101,
|
||||
+ 0x81C, 0xF7080101,
|
||||
+ 0x81C, 0xF60A0101,
|
||||
+ 0x81C, 0xF50C0101,
|
||||
+ 0x81C, 0xF40E0101,
|
||||
+ 0x81C, 0xF3100101,
|
||||
+ 0x81C, 0xF2120101,
|
||||
+ 0x81C, 0xF1140101,
|
||||
+ 0x81C, 0xF0160101,
|
||||
+ 0x81C, 0xEF180101,
|
||||
+ 0x81C, 0xEE1A0101,
|
||||
+ 0x81C, 0xED1C0101,
|
||||
+ 0x81C, 0xEC1E0101,
|
||||
+ 0x81C, 0xEB200101,
|
||||
+ 0x81C, 0xEA220101,
|
||||
+ 0x81C, 0xE9240101,
|
||||
+ 0x81C, 0xE8260101,
|
||||
+ 0x81C, 0xE7280101,
|
||||
+ 0x81C, 0xE62A0101,
|
||||
+ 0x81C, 0xE52C0101,
|
||||
+ 0x81C, 0xE42E0101,
|
||||
+ 0x81C, 0xE3300101,
|
||||
+ 0x81C, 0xA5320101,
|
||||
+ 0x81C, 0xA4340101,
|
||||
+ 0x81C, 0xA3360101,
|
||||
+ 0x81C, 0x87380101,
|
||||
+ 0x81C, 0x863A0101,
|
||||
+ 0x81C, 0x853C0101,
|
||||
+ 0x81C, 0x843E0101,
|
||||
+ 0x81C, 0x69400101,
|
||||
+ 0x81C, 0x68420101,
|
||||
+ 0x81C, 0x67440101,
|
||||
+ 0x81C, 0x66460101,
|
||||
+ 0x81C, 0x49480101,
|
||||
+ 0x81C, 0x484A0101,
|
||||
+ 0x81C, 0x474C0101,
|
||||
+ 0x81C, 0x2A4E0101,
|
||||
+ 0x81C, 0x29500101,
|
||||
+ 0x81C, 0x28520101,
|
||||
+ 0x81C, 0x27540101,
|
||||
+ 0x81C, 0x26560101,
|
||||
+ 0x81C, 0x25580101,
|
||||
+ 0x81C, 0x245A0101,
|
||||
+ 0x81C, 0x235C0101,
|
||||
+ 0x81C, 0x055E0101,
|
||||
+ 0x81C, 0x04600101,
|
||||
+ 0x81C, 0x03620101,
|
||||
+ 0x81C, 0x02640101,
|
||||
+ 0x81C, 0x01660101,
|
||||
+ 0x81C, 0x01680101,
|
||||
+ 0x81C, 0x016A0101,
|
||||
+ 0x81C, 0x016C0101,
|
||||
+ 0x81C, 0x016E0101,
|
||||
+ 0x81C, 0x01700101,
|
||||
+ 0x81C, 0x01720101,
|
||||
+ 0x9000040c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x81C, 0xFB000101,
|
||||
0x81C, 0xFA020101,
|
||||
0x81C, 0xF9040101,
|
||||
@@ -2578,7 +2818,7 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = {
|
||||
0x81C, 0x016E0101,
|
||||
0x81C, 0x01700101,
|
||||
0x81C, 0x01720101,
|
||||
- 0xCDCDCDCD, 0xCDCD,
|
||||
+ 0xA0000000, 0x00000000,
|
||||
0x81C, 0xFF000101,
|
||||
0x81C, 0xFF020101,
|
||||
0x81C, 0xFE040101,
|
||||
@@ -2637,7 +2877,7 @@ u32 RTL8821AE_AGC_TAB_ARRAY[] = {
|
||||
0x81C, 0x046E0101,
|
||||
0x81C, 0x03700101,
|
||||
0x81C, 0x02720101,
|
||||
- 0xFF0F02C0, 0xDEAD,
|
||||
+ 0xB0000000, 0x00000000,
|
||||
0x81C, 0x01740101,
|
||||
0x81C, 0x01760101,
|
||||
0x81C, 0x01780101,
|
||||
|
|
@ -0,0 +1,280 @@
|
|||
From 7230aa4b1ad120a06c0607563c4358c609bbe8b3 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:31:25 +0200
|
||||
Subject: [PATCH] backport of mwl patches from openwrt
|
||||
|
||||
---
|
||||
drivers/net/wireless/marvell/libertas/cfg.c | 4 +
|
||||
drivers/net/wireless/marvell/libertas/main.c | 1 +
|
||||
drivers/net/wireless/marvell/mwifiex/cmdevt.c | 96 +++++++++++++++++--
|
||||
drivers/net/wireless/marvell/mwifiex/decl.h | 4 +-
|
||||
drivers/net/wireless/marvell/mwifiex/main.h | 2 +
|
||||
.../wireless/marvell/mwifiex/sta_cmdresp.c | 5 +-
|
||||
.../net/wireless/marvell/mwifiex/uap_cmd.c | 3 +-
|
||||
drivers/net/wireless/marvell/mwl8k.c | 5 +-
|
||||
8 files changed, 105 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
index 4e3de68..c861532 100644
|
||||
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
@@ -2053,6 +2053,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
|
||||
goto err_wiphy_new;
|
||||
}
|
||||
|
||||
+ set_wiphy_dev(wdev->wiphy, dev);
|
||||
+
|
||||
return wdev;
|
||||
|
||||
err_wiphy_new:
|
||||
@@ -2127,6 +2129,8 @@ int lbs_cfg_register(struct lbs_private *priv)
|
||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
||||
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
||||
|
||||
+ memcpy(wdev->wiphy->perm_addr, priv->current_addr, ETH_ALEN);
|
||||
+
|
||||
ret = wiphy_register(wdev->wiphy);
|
||||
if (ret < 0)
|
||||
pr_err("cannot register wiphy device\n");
|
||||
diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c
|
||||
index 64fc5e4..7048794 100644
|
||||
--- a/drivers/net/wireless/marvell/libertas/main.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/main.c
|
||||
@@ -935,6 +935,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
|
||||
goto err_adapter;
|
||||
}
|
||||
|
||||
+ dev_net_set(dev, wiphy_net(wdev->wiphy));
|
||||
dev->ieee80211_ptr = wdev;
|
||||
dev->ml_priv = priv;
|
||||
SET_NETDEV_DEV(dev, dmdev);
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
index 171a257..b0b8b1f 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
@@ -28,6 +28,85 @@
|
||||
|
||||
static void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter);
|
||||
|
||||
+const char *
|
||||
+mwifiex_cmd_to_str(u16 command)
|
||||
+{
|
||||
+ switch (command) {
|
||||
+ case HostCmd_CMD_GET_HW_SPEC: return "GET_HW_SPEC";
|
||||
+ case HostCmd_CMD_802_11_SCAN: return "SCAN";
|
||||
+ case HostCmd_CMD_802_11_GET_LOG: return "GET_LOG";
|
||||
+ case HostCmd_CMD_MAC_MULTICAST_ADR: return "MAC_MULTICAST_ADR";
|
||||
+ case HostCmd_CMD_802_11_EEPROM_ACCESS: return "EEPROM_ACCESS";
|
||||
+ case HostCmd_CMD_802_11_ASSOCIATE: return "ASSOCIATE";
|
||||
+ case HostCmd_CMD_802_11_SNMP_MIB: return "SNMP_MIB";
|
||||
+ case HostCmd_CMD_MAC_REG_ACCESS: return "MAC_REG_ACCESS";
|
||||
+ case HostCmd_CMD_BBP_REG_ACCESS: return "BBP_REG_ACCESS";
|
||||
+ case HostCmd_CMD_RF_REG_ACCESS: return "RF_REG_ACCESS";
|
||||
+ case HostCmd_CMD_PMIC_REG_ACCESS: return "PMIC_REG_ACCESS";
|
||||
+ case HostCmd_CMD_RF_TX_PWR: return "RF_TX_PWR";
|
||||
+ case HostCmd_CMD_RF_ANTENNA: return "RF_ANTENNA";
|
||||
+ case HostCmd_CMD_802_11_DEAUTHENTICATE: return "DEAUTHENTICATE";
|
||||
+ case HostCmd_CMD_MAC_CONTROL: return "MAC_CONTROL";
|
||||
+ case HostCmd_CMD_802_11_AD_HOC_START: return "AD_HOC_START";
|
||||
+ case HostCmd_CMD_802_11_AD_HOC_JOIN: return "AD_HOC_JOIN";
|
||||
+ case HostCmd_CMD_802_11_AD_HOC_STOP: return "AD_HOC_STOP";
|
||||
+ case HostCmd_CMD_802_11_MAC_ADDRESS: return "MAC_ADDRESS";
|
||||
+ case HostCmd_CMD_802_11D_DOMAIN_INFO: return "DOMAIN_INFO";
|
||||
+ case HostCmd_CMD_802_11_KEY_MATERIAL: return "KEY_MATERIAL";
|
||||
+ case HostCmd_CMD_802_11_BG_SCAN_CONFIG: return "BG_SCAN_CONFIG";
|
||||
+ case HostCmd_CMD_802_11_BG_SCAN_QUERY: return "BG_SCAN_QUERY";
|
||||
+ case HostCmd_CMD_WMM_GET_STATUS: return "WMM_GET_STATUS";
|
||||
+ case HostCmd_CMD_802_11_SUBSCRIBE_EVENT: return "SUBSCRIBE_EVENT";
|
||||
+ case HostCmd_CMD_802_11_TX_RATE_QUERY: return "TX_RATE_QUERY";
|
||||
+ case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS: return "IBSS_COALESCING_STATUS";
|
||||
+ case HostCmd_CMD_MEM_ACCESS: return "MEM_ACCESS";
|
||||
+ case HostCmd_CMD_CFG_DATA: return "CFG_DATA";
|
||||
+ case HostCmd_CMD_VERSION_EXT: return "VERSION_EXT";
|
||||
+ case HostCmd_CMD_MEF_CFG: return "MEF_CFG";
|
||||
+ case HostCmd_CMD_RSSI_INFO: return "RSSI_INFO";
|
||||
+ case HostCmd_CMD_FUNC_INIT: return "FUNC_INIT";
|
||||
+ case HostCmd_CMD_FUNC_SHUTDOWN: return "FUNC_SHUTDOWN";
|
||||
+ case HOST_CMD_APCMD_SYS_RESET: return "SYS_RESET";
|
||||
+ case HostCmd_CMD_UAP_SYS_CONFIG: return "UAP_SYS_CONFIG";
|
||||
+ case HostCmd_CMD_UAP_BSS_START: return "UAP_BSS_START";
|
||||
+ case HostCmd_CMD_UAP_BSS_STOP: return "UAP_BSS_STOP";
|
||||
+ case HOST_CMD_APCMD_STA_LIST: return "STA_LIST";
|
||||
+ case HostCmd_CMD_UAP_STA_DEAUTH: return "UAP_STA_DEAUTH";
|
||||
+ case HostCmd_CMD_11N_CFG: return "11N_CFG";
|
||||
+ case HostCmd_CMD_11N_ADDBA_REQ: return "ADDBA_REQ";
|
||||
+ case HostCmd_CMD_11N_ADDBA_RSP: return "ADDBA_RSP";
|
||||
+ case HostCmd_CMD_11N_DELBA: return "DELBA";
|
||||
+ case HostCmd_CMD_RECONFIGURE_TX_BUFF: return "RECONFIGURE_TX_BUFF";
|
||||
+ case HostCmd_CMD_CHAN_REPORT_REQUEST: return "CHAN_REPORT_REQUEST";
|
||||
+ case HostCmd_CMD_AMSDU_AGGR_CTRL: return "AMSDU_AGGR_CTRL";
|
||||
+ case HostCmd_CMD_TXPWR_CFG: return "TXPWR_CFG";
|
||||
+ case HostCmd_CMD_TX_RATE_CFG: return "TX_RATE_CFG";
|
||||
+ case HostCmd_CMD_ROBUST_COEX: return "ROBUST_COEX";
|
||||
+ case HostCmd_CMD_802_11_PS_MODE_ENH: return "PS_MODE_ENH";
|
||||
+ case HostCmd_CMD_802_11_HS_CFG_ENH: return "HS_CFG_ENH";
|
||||
+ case HostCmd_CMD_P2P_MODE_CFG: return "P2P_MODE_CFG";
|
||||
+ case HostCmd_CMD_CAU_REG_ACCESS: return "CAU_REG_ACCESS";
|
||||
+ case HostCmd_CMD_SET_BSS_MODE: return "SET_BSS_MODE";
|
||||
+ case HostCmd_CMD_PCIE_DESC_DETAILS: return "PCIE_DESC_DETAILS";
|
||||
+ case HostCmd_CMD_802_11_SCAN_EXT: return "SCAN_EXT";
|
||||
+ case HostCmd_CMD_COALESCE_CFG: return "COALESCE_CFG";
|
||||
+ case HostCmd_CMD_MGMT_FRAME_REG: return "MGMT_FRAME_REG";
|
||||
+ case HostCmd_CMD_REMAIN_ON_CHAN: return "REMAIN_ON_CHAN";
|
||||
+ case HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG: return "GTK_REKEY_OFFLOAD_CFG";
|
||||
+ case HostCmd_CMD_11AC_CFG: return "11AC_CFG";
|
||||
+ case HostCmd_CMD_HS_WAKEUP_REASON: return "HS_WAKEUP_REASON";
|
||||
+ case HostCmd_CMD_TDLS_CONFIG: return "TDLS_CONFIG";
|
||||
+ case HostCmd_CMD_MC_POLICY: return "MC_POLICY";
|
||||
+ case HostCmd_CMD_TDLS_OPER: return "TDLS_OPER";
|
||||
+ case HostCmd_CMD_FW_DUMP_EVENT: return "FW_DUMP_EVENT";
|
||||
+ case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG: return "SDIO_SP_RX_AGGR_CFG";
|
||||
+ case HostCmd_CMD_STA_CONFIGURE: return "STA_CONFIGURE";
|
||||
+ case HostCmd_CMD_CHAN_REGION_CFG: return "CHAN_REGION_CFG";
|
||||
+ case HostCmd_CMD_PACKET_AGGR_CTRL: return "PACKET_AGGR_CTRL";
|
||||
+ default: return "UNKNOWN";
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* This function initializes a command node.
|
||||
*
|
||||
@@ -205,8 +284,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
|
||||
cmd_code != HostCmd_CMD_FUNC_SHUTDOWN &&
|
||||
cmd_code != HostCmd_CMD_FUNC_INIT) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "DNLD_CMD: FW in reset state, ignore cmd %#x\n",
|
||||
- cmd_code);
|
||||
+ "DNLD_CMD: FW in reset state, ignore cmd %s (%#x)\n",
|
||||
+ mwifiex_cmd_to_str(cmd_code), cmd_code);
|
||||
mwifiex_recycle_cmd_node(adapter, cmd_node);
|
||||
queue_work(adapter->workqueue, &adapter->main_work);
|
||||
return -1;
|
||||
@@ -660,8 +739,8 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||
/* Return error, since the command preparation failed */
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "PREP_CMD: cmd %#x preparation failed\n",
|
||||
- cmd_no);
|
||||
+ "PREP_CMD: cmd %s (%#x) preparation failed\n",
|
||||
+ mwifiex_cmd_to_str(cmd_no), cmd_no);
|
||||
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
|
||||
return -1;
|
||||
}
|
||||
@@ -900,8 +979,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
|
||||
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "%s: cmd %#x failed during\t"
|
||||
- "initialization\n", __func__, cmdresp_no);
|
||||
+ "%s: cmd %s (%#x) failed during\t"
|
||||
+ "initialization\n", __func__,
|
||||
+ mwifiex_cmd_to_str(cmdresp_no), cmdresp_no);
|
||||
mwifiex_init_fw_complete(adapter);
|
||||
return -1;
|
||||
} else if (adapter->last_init_cmd == cmdresp_no)
|
||||
@@ -1264,8 +1344,8 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
|
||||
|
||||
if (command != HostCmd_CMD_802_11_PS_MODE_ENH) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "%s: rcvd unexpected resp for cmd %#x, result = %x\n",
|
||||
- __func__, command, result);
|
||||
+ "%s: rcvd unexpected resp for cmd %s (%#x), result = %x\n",
|
||||
+ __func__, mwifiex_cmd_to_str(command), command, result);
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/decl.h b/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
index 6bd23c9..518dce4 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
|
||||
#define MWIFIEX_BSS_COEX_COUNT 2
|
||||
-#define MWIFIEX_MAX_BSS_NUM (3)
|
||||
+#define MWIFIEX_MAX_BSS_NUM (4)
|
||||
|
||||
#define MWIFIEX_DMA_ALIGN_SZ 64
|
||||
#define MWIFIEX_RX_HEADROOM 64
|
||||
@@ -112,7 +112,7 @@
|
||||
#define MWIFIEX_RATE_INDEX_OFDM0 4
|
||||
|
||||
#define MWIFIEX_MAX_STA_NUM 3
|
||||
-#define MWIFIEX_MAX_UAP_NUM 3
|
||||
+#define MWIFIEX_MAX_UAP_NUM 4
|
||||
#define MWIFIEX_MAX_P2P_NUM 3
|
||||
|
||||
#define MWIFIEX_A_BAND_START_FREQ 5000
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
index 5923c5c..0d30f61 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
@@ -1106,6 +1106,8 @@ void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_scan(struct mwifiex_adapter *adapter);
|
||||
|
||||
+const char *mwifiex_cmd_to_str(u16 command);
|
||||
+
|
||||
void mwifiex_recycle_cmd_node(struct mwifiex_adapter *adapter,
|
||||
struct cmd_ctrl_node *cmd_node);
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
index 6b5d35d..ae6554f 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
@@ -48,8 +48,9 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
|
||||
struct host_cmd_ds_802_11_ps_mode_enh *pm;
|
||||
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "CMD_RESP: cmd %#x error, result=%#x\n",
|
||||
- resp->command, resp->result);
|
||||
+ "CMD_RESP: cmd %s (%#x) error, result=%#x\n",
|
||||
+ mwifiex_cmd_to_str(le16_to_cpu(resp->command)),
|
||||
+ le16_to_cpu(resp->command), le16_to_cpu(resp->result));
|
||||
|
||||
if (adapter->curr_cmd->wait_q_enabled)
|
||||
adapter->cmd_wait_q.status = -1;
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
index 18e8977..29b8af5 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
@@ -806,7 +806,8 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||
break;
|
||||
default:
|
||||
mwifiex_dbg(priv->adapter, ERROR,
|
||||
- "PREP_CMD: unknown cmd %#x\n", cmd_no);
|
||||
+ "PREP_CMD: unknown cmd (%s) %#x\n",
|
||||
+ mwifiex_cmd_to_str(cmd_no), cmd_no);
|
||||
return -1;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
|
||||
index 529e325..fa1f639 100644
|
||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -5699,6 +5699,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||
|
||||
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, },
|
||||
{ PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, },
|
||||
@@ -6284,6 +6285,8 @@ static int mwl8k_probe(struct pci_dev *pdev,
|
||||
|
||||
priv->running_bsses = 0;
|
||||
|
||||
+ wait_for_completion(&priv->firmware_loading_complete);
|
||||
+
|
||||
return rc;
|
||||
|
||||
err_stop_firmware:
|
||||
@@ -6317,8 +6320,6 @@ static void mwl8k_remove(struct pci_dev *pdev)
|
||||
return;
|
||||
priv = hw->priv;
|
||||
|
||||
- wait_for_completion(&priv->firmware_loading_complete);
|
||||
-
|
||||
if (priv->fw_state == FW_STATE_ERROR) {
|
||||
mwl8k_hw_reset(priv);
|
||||
goto unmap;
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,62 +1,37 @@
|
|||
From 7ddf76afb4aa795fa6ec60defe149b36abaa9e8b Mon Sep 17 00:00:00 2001
|
||||
From e3b2a5bb9212437f59b215bc4d5f9052667dd40e Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Mon, 22 Mar 2021 17:52:02 +0100
|
||||
Subject: [PATCH] 0007 netmodule patches
|
||||
Date: Wed, 14 Sep 2022 15:09:20 +0200
|
||||
Subject: [PATCH] netmodule patches
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath.h | 3 +-
|
||||
drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +-
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 40 ++++++++---
|
||||
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
|
||||
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +-
|
||||
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +-
|
||||
drivers/net/wireless/ath/ath9k/hw.h | 1 +
|
||||
drivers/net/wireless/ath/ath9k/main.c | 95 ++++++++++++++++++++++++++-
|
||||
drivers/net/wireless/ath/key.c | 41 +++++++-----
|
||||
drivers/net/wireless/ath/regd.c | 2 +-
|
||||
drivers/net/wireless/ath/regd.h | 3 +-
|
||||
drivers/net/wireless/ath/regd_common.h | 1 +
|
||||
drivers/net/wireless/ti/wlcore/cmd.c | 7 --
|
||||
drivers/net/wireless/ti/wlcore/cmd.h | 1 +
|
||||
drivers/net/wireless/ti/wlcore/conf.h | 3 +
|
||||
drivers/net/wireless/ti/wlcore/init.c | 22 +++++--
|
||||
drivers/net/wireless/ti/wlcore/main.c | 28 ++++++--
|
||||
include/net/cfg80211.h | 11 +++-
|
||||
include/net/mac80211.h | 8 ++-
|
||||
include/uapi/linux/nl80211.h | 3 +
|
||||
net/mac80211/cfg.c | 13 ++++
|
||||
net/mac80211/iface.c | 9 ++-
|
||||
net/mac80211/main.c | 4 +-
|
||||
net/wireless/core.c | 41 ++++++++++--
|
||||
net/wireless/nl80211.c | 13 ++++
|
||||
net/wireless/reg.c | 23 +++++--
|
||||
net/wireless/wext-compat.c | 3 +-
|
||||
27 files changed, 312 insertions(+), 75 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
|
||||
index 2a18e2e..bb30fd7 100644
|
||||
--- a/drivers/net/wireless/ath/ath.h
|
||||
+++ b/drivers/net/wireless/ath/ath.h
|
||||
@@ -198,12 +198,13 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,
|
||||
bool ath_is_mybeacon(struct ath_common *common, struct ieee80211_hdr *hdr);
|
||||
|
||||
void ath_hw_setbssidmask(struct ath_common *common);
|
||||
-void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key);
|
||||
+void ath_key_delete(struct ath_common *common, u8 hw_key_idx);
|
||||
int ath_key_config(struct ath_common *common,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct ieee80211_key_conf *key);
|
||||
bool ath_hw_keyreset(struct ath_common *common, u16 entry);
|
||||
+bool ath_hw_keysetmac(struct ath_common *common, u16 entry, const u8 *mac);
|
||||
void ath_hw_cycle_counters_update(struct ath_common *common);
|
||||
int32_t ath_hw_get_listen_time(struct ath_common *common);
|
||||
drivers/net/wireless/ath/ath10k/htt_rx.c | 6 ++--
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 28 +++++++++++++---
|
||||
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
|
||||
drivers/net/wireless/ath/regd.c | 2 +-
|
||||
drivers/net/wireless/ath/regd.h | 3 +-
|
||||
drivers/net/wireless/ath/regd_common.h | 1 +
|
||||
drivers/net/wireless/ti/wlcore/cmd.c | 7 ----
|
||||
drivers/net/wireless/ti/wlcore/cmd.h | 1 +
|
||||
drivers/net/wireless/ti/wlcore/conf.h | 3 ++
|
||||
drivers/net/wireless/ti/wlcore/init.c | 22 ++++++++++---
|
||||
drivers/net/wireless/ti/wlcore/main.c | 28 ++++++++++++----
|
||||
include/net/cfg80211.h | 12 +++++--
|
||||
include/net/mac80211.h | 8 +++--
|
||||
include/uapi/linux/nl80211.h | 3 ++
|
||||
net/mac80211/cfg.c | 13 ++++++++
|
||||
net/mac80211/iface.c | 4 +++
|
||||
net/mac80211/main.c | 10 +++---
|
||||
net/wireless/core.c | 41 ++++++++++++++++++++----
|
||||
net/wireless/nl80211.c | 14 ++++++++
|
||||
net/wireless/reg.c | 27 +++++++++++++---
|
||||
net/wireless/wext-compat.c | 3 +-
|
||||
21 files changed, 188 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
index 28ec3c5..9bb791c 100644
|
||||
index adbaeb6..6bdddb0 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
@@ -3864,8 +3864,10 @@ static void ath10k_fetch_10_2_tx_stats(struct ath10k *ar, u8 *data)
|
||||
@@ -3862,8 +3862,10 @@ static void ath10k_fetch_10_2_tx_stats(struct ath10k *ar, u8 *data)
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
peer = ath10k_peer_find_by_id(ar, peer_id);
|
||||
if (!peer || !peer->sta) {
|
||||
|
|
@ -70,29 +45,10 @@ index 28ec3c5..9bb791c 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
index d07a4a1..9547476 100644
|
||||
index 7a5311b..a96ec1c 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -5097,11 +5097,13 @@ static int ath10k_start(struct ieee80211_hw *hw)
|
||||
}
|
||||
|
||||
param = ar->wmi.pdev_param->idle_ps_config;
|
||||
- ret = ath10k_wmi_pdev_set_param(ar, param, 1);
|
||||
- if (ret && ret != -EOPNOTSUPP) {
|
||||
- ath10k_warn(ar, "failed to enable idle_ps_config: %d\n", ret);
|
||||
- goto err_core_stop;
|
||||
- }
|
||||
+ if (param != WMI_PDEV_PARAM_UNSUPPORTED) {
|
||||
+ ret = ath10k_wmi_pdev_set_param(ar, param, 1);
|
||||
+ if (ret && ret != -EOPNOTSUPP) {
|
||||
+ ath10k_warn(ar, "failed to enable idle_ps_config: %d\n", ret);
|
||||
+ goto err_core_stop;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
__ath10k_set_antenna(ar, ar->cfg_tx_chainmask, ar->cfg_rx_chainmask);
|
||||
|
||||
@@ -5273,10 +5275,11 @@ static int ath10k_mac_txpower_setup(struct ath10k *ar, int txpower)
|
||||
@@ -2990,10 +2990,11 @@ static int ath10k_mac_txpower_setup(struct ath10k *ar, int txpower)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -105,27 +61,27 @@ index d07a4a1..9547476 100644
|
|||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -5285,10 +5288,28 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
@@ -3002,10 +3003,28 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
if (arvif->txpower == INT_MIN)
|
||||
continue;
|
||||
|
||||
+ pwr = arvif->txpower;
|
||||
+ pwr = arvif->txpower;
|
||||
+
|
||||
+ if (ar && ar->rx_channel ) {
|
||||
+ if (ar->rx_channel->band == NL80211_BAND_5GHZ) {
|
||||
+ pwr -= ATH10k_ADJ_POWER_DENSITY;
|
||||
+ if (ar->rx_channel->flags & IEEE80211_CHAN_RADAR) {
|
||||
+ pwr -= ATH10k_ADJ_POWER_DENSITY;
|
||||
+ if (arvif->vif->type == NL80211_IFTYPE_STATION ||
|
||||
+ arvif->vif->type == NL80211_IFTYPE_MESH_POINT) {
|
||||
+ pwr -= ATH10k_ADJ_POWER_DENSITY;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (pwr < 0) {
|
||||
+ pwr = 0;
|
||||
+ }
|
||||
+ if (ar && ar->rx_channel ) {
|
||||
+ if (ar->rx_channel->band == NL80211_BAND_5GHZ) {
|
||||
+ pwr -= ATH10k_ADJ_POWER_DENSITY;
|
||||
+ if (ar->rx_channel->flags & IEEE80211_CHAN_RADAR) {
|
||||
+ pwr -= ATH10k_ADJ_POWER_DENSITY;
|
||||
+ if (arvif->vif->type == NL80211_IFTYPE_STATION ||
|
||||
+ arvif->vif->type == NL80211_IFTYPE_MESH_POINT) {
|
||||
+ pwr -= ATH10k_ADJ_POWER_DENSITY;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (pwr < 0) {
|
||||
+ pwr = 0;
|
||||
+ }
|
||||
+
|
||||
if (txpower == -1)
|
||||
- txpower = arvif->txpower;
|
||||
|
|
@ -136,15 +92,15 @@ index d07a4a1..9547476 100644
|
|||
}
|
||||
|
||||
if (txpower == -1)
|
||||
@@ -5303,6 +5324,7 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
@@ -3020,6 +3039,7 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#undef ATH10k_CLIENT_ADJ_POWER_DENSITY
|
||||
|
||||
static int ath10k_config(struct ieee80211_hw *hw, u32 changed)
|
||||
static int ath10k_mac_set_sar_power(struct ath10k *ar)
|
||||
{
|
||||
@@ -9440,7 +9462,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
|
||||
@@ -9623,7 +9643,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
|
||||
#endif
|
||||
},
|
||||
{
|
||||
|
|
@ -154,7 +110,7 @@ index d07a4a1..9547476 100644
|
|||
},
|
||||
};
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
index a7b6b8c..dc8c753 100644
|
||||
index e9e08b0..7bfa164 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -28,7 +28,7 @@ enum ath10k_pci_reset_mode {
|
||||
|
|
@ -166,268 +122,11 @@ index a7b6b8c..dc8c753 100644
|
|||
static unsigned int ath10k_pci_reset_mode = ATH10K_PCI_RESET_AUTO;
|
||||
|
||||
module_param_named(irq_mode, ath10k_pci_irq_mode, uint, 0644);
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
index 47dd580..9b7cbe7 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
@@ -516,7 +516,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
||||
}
|
||||
break;
|
||||
case DISABLE_KEY:
|
||||
- ath_key_delete(common, key);
|
||||
+ ath_key_delete(common, key->hw_key_idx);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
index abe6411..0909814 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
@@ -1461,7 +1461,7 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw,
|
||||
}
|
||||
break;
|
||||
case DISABLE_KEY:
|
||||
- ath_key_delete(common, key);
|
||||
+ ath_key_delete(common, key->hw_key_idx);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
index 559609d..d152b4b 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -831,6 +831,7 @@ struct ath_hw {
|
||||
struct ath9k_pacal_info pacal_info;
|
||||
struct ar5416Stats stats;
|
||||
struct ath9k_tx_queue_info txq[ATH9K_NUM_TX_QUEUES];
|
||||
+ DECLARE_BITMAP(pending_del_keymap, ATH_KEYMAX);
|
||||
|
||||
enum ath9k_int imask;
|
||||
u32 imrs2_reg;
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
|
||||
index 093eafd..dbd33d7 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -833,12 +833,80 @@ exit:
|
||||
ieee80211_free_txskb(hw, skb);
|
||||
}
|
||||
|
||||
+static bool ath9k_txq_list_has_key(struct list_head *txq_list, u32 keyix)
|
||||
+{
|
||||
+ struct ath_buf *bf;
|
||||
+ struct ieee80211_tx_info *txinfo;
|
||||
+ struct ath_frame_info *fi;
|
||||
+
|
||||
+ list_for_each_entry(bf, txq_list, list) {
|
||||
+ if (bf->bf_state.stale || !bf->bf_mpdu)
|
||||
+ continue;
|
||||
+
|
||||
+ txinfo = IEEE80211_SKB_CB(bf->bf_mpdu);
|
||||
+ fi = (struct ath_frame_info *)&txinfo->rate_driver_data[0];
|
||||
+ if (fi->keyix == keyix)
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+static bool ath9k_txq_has_key(struct ath_softc *sc, u32 keyix)
|
||||
+{
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ int i;
|
||||
+ struct ath_txq *txq;
|
||||
+ bool key_in_use = false;
|
||||
+
|
||||
+ for (i = 0; !key_in_use && i < ATH9K_NUM_TX_QUEUES; i++) {
|
||||
+ if (!ATH_TXQ_SETUP(sc, i))
|
||||
+ continue;
|
||||
+ txq = &sc->tx.txq[i];
|
||||
+ if (!txq->axq_depth)
|
||||
+ continue;
|
||||
+ if (!ath9k_hw_numtxpending(ah, txq->axq_qnum))
|
||||
+ continue;
|
||||
+
|
||||
+ ath_txq_lock(sc, txq);
|
||||
+ key_in_use = ath9k_txq_list_has_key(&txq->axq_q, keyix);
|
||||
+ if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
|
||||
+ int idx = txq->txq_tailidx;
|
||||
+
|
||||
+ while (!key_in_use &&
|
||||
+ !list_empty(&txq->txq_fifo[idx])) {
|
||||
+ key_in_use = ath9k_txq_list_has_key(
|
||||
+ &txq->txq_fifo[idx], keyix);
|
||||
+ INCR(idx, ATH_TXFIFO_DEPTH);
|
||||
+ }
|
||||
+ }
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
+ }
|
||||
+
|
||||
+ return key_in_use;
|
||||
+}
|
||||
+
|
||||
+static void ath9k_pending_key_del(struct ath_softc *sc, u8 keyix)
|
||||
+{
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+
|
||||
+ if (!test_bit(keyix, ah->pending_del_keymap) ||
|
||||
+ ath9k_txq_has_key(sc, keyix))
|
||||
+ return;
|
||||
+
|
||||
+ /* No more TXQ frames point to this key cache entry, so delete it. */
|
||||
+ clear_bit(keyix, ah->pending_del_keymap);
|
||||
+ ath_key_delete(common, keyix);
|
||||
+}
|
||||
+
|
||||
static void ath9k_stop(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
bool prev_idle;
|
||||
+ int i;
|
||||
|
||||
ath9k_deinit_channel_context(sc);
|
||||
|
||||
@@ -906,6 +974,14 @@ static void ath9k_stop(struct ieee80211_hw *hw)
|
||||
|
||||
spin_unlock_bh(&sc->sc_pcu_lock);
|
||||
|
||||
+ for (i = 0; i < ATH_KEYMAX; i++)
|
||||
+ ath9k_pending_key_del(sc, i);
|
||||
+
|
||||
+ /* Clear key cache entries explicitly to get rid of any potentially
|
||||
+ * remaining keys.
|
||||
+ */
|
||||
+ ath9k_cmn_init_crypto(sc->sc_ah);
|
||||
+
|
||||
ath9k_ps_restore(sc);
|
||||
|
||||
sc->ps_idle = prev_idle;
|
||||
@@ -1555,12 +1631,11 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
struct ath_node *an = (struct ath_node *) sta->drv_priv;
|
||||
- struct ieee80211_key_conf ps_key = { .hw_key_idx = an->ps_key };
|
||||
|
||||
if (!an->ps_key)
|
||||
return;
|
||||
|
||||
- ath_key_delete(common, &ps_key);
|
||||
+ ath_key_delete(common, an->ps_key);
|
||||
an->ps_key = 0;
|
||||
an->key_idx[0] = 0;
|
||||
}
|
||||
@@ -1731,6 +1806,12 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
|
||||
if (sta)
|
||||
an = (struct ath_node *)sta->drv_priv;
|
||||
|
||||
+ /* Delete pending key cache entries if no more frames are pointing to
|
||||
+ * them in TXQs.
|
||||
+ */
|
||||
+ for (i = 0; i < ATH_KEYMAX; i++)
|
||||
+ ath9k_pending_key_del(sc, i);
|
||||
+
|
||||
switch (cmd) {
|
||||
case SET_KEY:
|
||||
if (sta)
|
||||
@@ -1760,7 +1841,15 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
|
||||
}
|
||||
break;
|
||||
case DISABLE_KEY:
|
||||
- ath_key_delete(common, key);
|
||||
+ if (ath9k_txq_has_key(sc, key->hw_key_idx)) {
|
||||
+ /* Delay key cache entry deletion until there are no
|
||||
+ * remaining TXQ frames pointing to this entry.
|
||||
+ */
|
||||
+ set_bit(key->hw_key_idx, sc->sc_ah->pending_del_keymap);
|
||||
+ ath_hw_keysetmac(common, key->hw_key_idx, NULL);
|
||||
+ } else {
|
||||
+ ath_key_delete(common, key->hw_key_idx);
|
||||
+ }
|
||||
if (an) {
|
||||
for (i = 0; i < ARRAY_SIZE(an->key_idx); i++) {
|
||||
if (an->key_idx[i] != key->hw_key_idx)
|
||||
diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c
|
||||
index 1816b4e..61b59a8 100644
|
||||
--- a/drivers/net/wireless/ath/key.c
|
||||
+++ b/drivers/net/wireless/ath/key.c
|
||||
@@ -84,8 +84,7 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry)
|
||||
}
|
||||
EXPORT_SYMBOL(ath_hw_keyreset);
|
||||
|
||||
-static bool ath_hw_keysetmac(struct ath_common *common,
|
||||
- u16 entry, const u8 *mac)
|
||||
+bool ath_hw_keysetmac(struct ath_common *common, u16 entry, const u8 *mac)
|
||||
{
|
||||
u32 macHi, macLo;
|
||||
u32 unicast_flag = AR_KEYTABLE_VALID;
|
||||
@@ -125,6 +124,7 @@ static bool ath_hw_keysetmac(struct ath_common *common,
|
||||
|
||||
return true;
|
||||
}
|
||||
+EXPORT_SYMBOL(ath_hw_keysetmac);
|
||||
|
||||
static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry,
|
||||
const struct ath_keyval *k,
|
||||
@@ -581,29 +581,38 @@ EXPORT_SYMBOL(ath_key_config);
|
||||
/*
|
||||
* Delete Key.
|
||||
*/
|
||||
-void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key)
|
||||
+void ath_key_delete(struct ath_common *common, u8 hw_key_idx)
|
||||
{
|
||||
- ath_hw_keyreset(common, key->hw_key_idx);
|
||||
- if (key->hw_key_idx < IEEE80211_WEP_NKID)
|
||||
+ /* Leave CCMP and TKIP (main key) configured to avoid disabling
|
||||
+ * encryption for potentially pending frames already in a TXQ with the
|
||||
+ * keyix pointing to this key entry. Instead, only clear the MAC address
|
||||
+ * to prevent RX processing from using this key cache entry.
|
||||
+ */
|
||||
+ if (test_bit(hw_key_idx, common->ccmp_keymap) ||
|
||||
+ test_bit(hw_key_idx, common->tkip_keymap))
|
||||
+ ath_hw_keysetmac(common, hw_key_idx, NULL);
|
||||
+ else
|
||||
+ ath_hw_keyreset(common, hw_key_idx);
|
||||
+ if (hw_key_idx < IEEE80211_WEP_NKID)
|
||||
return;
|
||||
|
||||
- clear_bit(key->hw_key_idx, common->keymap);
|
||||
- clear_bit(key->hw_key_idx, common->ccmp_keymap);
|
||||
- if (key->cipher != WLAN_CIPHER_SUITE_TKIP)
|
||||
+ clear_bit(hw_key_idx, common->keymap);
|
||||
+ clear_bit(hw_key_idx, common->ccmp_keymap);
|
||||
+ if (!test_bit(hw_key_idx, common->tkip_keymap))
|
||||
return;
|
||||
|
||||
- clear_bit(key->hw_key_idx + 64, common->keymap);
|
||||
+ clear_bit(hw_key_idx + 64, common->keymap);
|
||||
|
||||
- clear_bit(key->hw_key_idx, common->tkip_keymap);
|
||||
- clear_bit(key->hw_key_idx + 64, common->tkip_keymap);
|
||||
+ clear_bit(hw_key_idx, common->tkip_keymap);
|
||||
+ clear_bit(hw_key_idx + 64, common->tkip_keymap);
|
||||
|
||||
if (!(common->crypt_caps & ATH_CRYPT_CAP_MIC_COMBINED)) {
|
||||
- ath_hw_keyreset(common, key->hw_key_idx + 32);
|
||||
- clear_bit(key->hw_key_idx + 32, common->keymap);
|
||||
- clear_bit(key->hw_key_idx + 64 + 32, common->keymap);
|
||||
+ ath_hw_keyreset(common, hw_key_idx + 32);
|
||||
+ clear_bit(hw_key_idx + 32, common->keymap);
|
||||
+ clear_bit(hw_key_idx + 64 + 32, common->keymap);
|
||||
|
||||
- clear_bit(key->hw_key_idx + 32, common->tkip_keymap);
|
||||
- clear_bit(key->hw_key_idx + 64 + 32, common->tkip_keymap);
|
||||
+ clear_bit(hw_key_idx + 32, common->tkip_keymap);
|
||||
+ clear_bit(hw_key_idx + 64 + 32, common->tkip_keymap);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ath_key_delete);
|
||||
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
|
||||
index 0042ea9..f7b15cf 100644
|
||||
index 3ba9fc3..9c8ff76 100644
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -733,7 +733,7 @@ static int __ath_regd_init(struct ath_regulatory *reg)
|
||||
@@ -734,7 +734,7 @@ static int __ath_regd_init(struct ath_regulatory *reg)
|
||||
regdmn == CTRY_DEFAULT) {
|
||||
printk(KERN_DEBUG "ath: EEPROM indicates default "
|
||||
"country code should be used\n");
|
||||
|
|
@ -463,7 +162,7 @@ index 364011e..4db829c 100644
|
|||
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
|
||||
index 32a2e27..a82b0ee 100644
|
||||
index 8b798b5..bf1b921 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/cmd.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
|
||||
@@ -1568,13 +1568,6 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||
|
|
@ -552,7 +251,7 @@ index 03b49ba..5275d6b 100644
|
|||
rc.long_retry_limit = 10;
|
||||
rc.aflags = 0;
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
|
||||
index b5e3a42..8fbff25 100644
|
||||
index 8448549..2c8977c 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/main.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/main.c
|
||||
@@ -2271,13 +2271,15 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
|
||||
|
|
@ -578,7 +277,7 @@ index b5e3a42..8fbff25 100644
|
|||
/* TODO: this seems to be used only for STA, check it */
|
||||
wlvif->rate_set = CONF_TX_ENABLED_RATES;
|
||||
}
|
||||
@@ -3555,6 +3557,9 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
@@ -3542,6 +3544,9 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
key_type = KEY_AES;
|
||||
key_conf->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE;
|
||||
break;
|
||||
|
|
@ -588,7 +287,7 @@ index b5e3a42..8fbff25 100644
|
|||
case WL1271_CIPHER_SUITE_GEM:
|
||||
key_type = KEY_GEM;
|
||||
break;
|
||||
@@ -5811,9 +5816,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
@@ -5798,9 +5803,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct wl1271 *wl = hw->priv;
|
||||
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
|
||||
|
|
@ -605,7 +304,7 @@ index b5e3a42..8fbff25 100644
|
|||
wl1271_debug(DEBUG_MAC80211, "mac80211 get_rssi");
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -6227,6 +6239,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6214,6 +6226,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
WLAN_CIPHER_SUITE_TKIP,
|
||||
WLAN_CIPHER_SUITE_CCMP,
|
||||
WL1271_CIPHER_SUITE_GEM,
|
||||
|
|
@ -613,7 +312,7 @@ index b5e3a42..8fbff25 100644
|
|||
};
|
||||
|
||||
/* The tx descriptor buffer */
|
||||
@@ -6290,6 +6303,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6277,6 +6290,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
WIPHY_FLAG_IBSS_RSN;
|
||||
|
||||
wl->hw->wiphy->features |= NL80211_FEATURE_AP_SCAN;
|
||||
|
|
@ -622,35 +321,36 @@ index b5e3a42..8fbff25 100644
|
|||
/* make sure all our channels fit in the scanned_ch bitmask */
|
||||
BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) +
|
||||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
|
||||
index 092156b..c70a04f 100644
|
||||
index ab83553..2bf72f3 100644
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -129,6 +129,7 @@ enum ieee80211_channel_flags {
|
||||
@@ -136,6 +136,8 @@ enum ieee80211_channel_flags {
|
||||
IEEE80211_CHAN_4MHZ = 1<<16,
|
||||
IEEE80211_CHAN_8MHZ = 1<<17,
|
||||
IEEE80211_CHAN_16MHZ = 1<<18,
|
||||
+ IEEE80211_CHAN_SRD = 1<<19,
|
||||
+ IEEE80211_CHAN_SRD = 1<<19,
|
||||
+
|
||||
};
|
||||
|
||||
#define IEEE80211_CHAN_NO_HT40 \
|
||||
@@ -3738,6 +3739,8 @@ struct mgmt_frame_regs {
|
||||
@@ -3871,6 +3873,8 @@ struct mgmt_frame_regs {
|
||||
* return 0 if successful
|
||||
* @set_antenna_gain: set antenna gain to reduce maximum tx power if necessary
|
||||
*
|
||||
+ * @get_antenna_gain: get antenna gain
|
||||
+ *
|
||||
* @set_wds_peer: set the WDS peer for a WDS interface
|
||||
*
|
||||
+ +
|
||||
* @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
|
||||
@@ -4060,6 +4063,7 @@ struct cfg80211_ops {
|
||||
* functions to adjust rfkill hw state
|
||||
*
|
||||
@@ -4204,6 +4208,7 @@ struct cfg80211_ops {
|
||||
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
int *dbm);
|
||||
int (*set_antenna_gain)(struct wiphy *wiphy, int dbi);
|
||||
+ int (*get_antenna_gain)(struct wiphy *wiphy, int *dbi);
|
||||
+ int (*get_antenna_gain)(struct wiphy *wiphy, int *dbi);
|
||||
|
||||
int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *addr);
|
||||
@@ -5101,6 +5105,9 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
void (*rfkill_poll)(struct wiphy *wiphy);
|
||||
|
||||
@@ -5268,6 +5273,9 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
* @requested_name: Request a particular name.
|
||||
* NULL is valid value, and means use the default phy%d naming.
|
||||
*
|
||||
|
|
@ -660,29 +360,29 @@ index 092156b..c70a04f 100644
|
|||
* Create a new wiphy and associate the given operations with it.
|
||||
* @sizeof_priv bytes are allocated for private use.
|
||||
*
|
||||
@@ -5108,7 +5115,7 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
@@ -5275,7 +5283,7 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
* assigned to each netdev's ieee80211_ptr for proper operation.
|
||||
*/
|
||||
struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
- const char *requested_name);
|
||||
+ const char *requested_name, const int requested_index);
|
||||
+ const char *requested_name, const int requested_index);
|
||||
|
||||
/**
|
||||
* wiphy_new - create a new wiphy for use with cfg80211
|
||||
@@ -5125,7 +5132,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
@@ -5292,7 +5300,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,
|
||||
int sizeof_priv)
|
||||
{
|
||||
- return wiphy_new_nm(ops, sizeof_priv, NULL);
|
||||
+ return wiphy_new_nm(ops, sizeof_priv, NULL, -1);
|
||||
+ return wiphy_new_nm(ops, sizeof_priv, NULL, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
|
||||
index 9f185ee..f9e10e3 100644
|
||||
index c85050f..07c8277 100644
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -4228,11 +4228,15 @@ struct ieee80211_ops {
|
||||
@@ -4309,11 +4309,15 @@ struct ieee80211_ops {
|
||||
* @requested_name: Requested name for this device.
|
||||
* NULL is valid value, and means use the default naming (phy%d)
|
||||
*
|
||||
|
|
@ -699,7 +399,7 @@ index 9f185ee..f9e10e3 100644
|
|||
|
||||
/**
|
||||
* ieee80211_alloc_hw - Allocate a new hardware device
|
||||
@@ -4252,7 +4256,7 @@ static inline
|
||||
@@ -4333,7 +4337,7 @@ static inline
|
||||
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
||||
const struct ieee80211_ops *ops)
|
||||
{
|
||||
|
|
@ -709,10 +409,10 @@ index 9f185ee..f9e10e3 100644
|
|||
|
||||
/**
|
||||
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
|
||||
index 0d90183..4f5ba93 100644
|
||||
index 019f065..190af2f 100644
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -3779,6 +3779,8 @@ enum nl80211_wmm_rule {
|
||||
@@ -3883,6 +3883,8 @@ enum nl80211_wmm_rule {
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
|
||||
* on this channel in current regulatory domain.
|
||||
|
|
@ -721,50 +421,52 @@ index 0d90183..4f5ba93 100644
|
|||
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
|
||||
* currently defined
|
||||
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
|
||||
@@ -3815,6 +3817,7 @@ enum nl80211_frequency_attr {
|
||||
@@ -3919,6 +3921,9 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_4MHZ,
|
||||
NL80211_FREQUENCY_ATTR_8MHZ,
|
||||
NL80211_FREQUENCY_ATTR_16MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_SRD_CHANNEL,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
+ NL80211_FREQUENCY_ATTR_SRD_CHANNEL,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
|
||||
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
|
||||
index 272b433..2a30e87 100644
|
||||
index abe7318..fc59297 100644
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2720,6 +2720,18 @@ static int ieee80211_set_antenna_gain(struct wiphy *wiphy, int dbi)
|
||||
@@ -2825,6 +2825,18 @@ static int ieee80211_set_antenna_gain(struct wiphy *wiphy, int dbi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int ieee80211_get_antenna_gain(struct wiphy *wiphy,
|
||||
+ int *dbi)
|
||||
+ int *dbi)
|
||||
+{
|
||||
+ struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
+
|
||||
+ if (local) {
|
||||
+ *dbi = local->user_antenna_gain;
|
||||
+ *dbi = local->user_antenna_gain;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *addr)
|
||||
static void ieee80211_rfkill_poll(struct wiphy *wiphy)
|
||||
{
|
||||
@@ -4151,6 +4163,7 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
@@ -4530,6 +4542,7 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||
.set_tx_power = ieee80211_set_tx_power,
|
||||
.get_tx_power = ieee80211_get_tx_power,
|
||||
.set_antenna_gain = ieee80211_set_antenna_gain,
|
||||
+ .get_antenna_gain = ieee80211_get_antenna_gain,
|
||||
.set_wds_peer = ieee80211_set_wds_peer,
|
||||
.rfkill_poll = ieee80211_rfkill_poll,
|
||||
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
|
||||
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
|
||||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
|
||||
index bf305b2..7998620 100644
|
||||
index b777921..ba9c038 100644
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -65,6 +65,10 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
||||
@@ -66,6 +66,10 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
||||
if (sdata->ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
||||
power = min(power, sdata->ap_power_level);
|
||||
|
||||
|
|
@ -776,7 +478,7 @@ index bf305b2..7998620 100644
|
|||
sdata->vif.bss_conf.txpower = power;
|
||||
ieee80211_hw_config(sdata->local, 0);
|
||||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
|
||||
index 293bfec..5513370 100644
|
||||
index 09e5bf1..72238e9 100644
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -96,7 +96,7 @@ static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local)
|
||||
|
|
@ -800,7 +502,7 @@ index 293bfec..5513370 100644
|
|||
}
|
||||
|
||||
if (local->hw.conf.power_level != power) {
|
||||
@@ -532,7 +532,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = {
|
||||
@@ -548,7 +546,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = {
|
||||
|
||||
struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
const struct ieee80211_ops *ops,
|
||||
|
|
@ -809,7 +511,7 @@ index 293bfec..5513370 100644
|
|||
{
|
||||
struct ieee80211_local *local;
|
||||
int priv_size, i;
|
||||
@@ -572,7 +572,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
@@ -588,7 +586,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
*/
|
||||
priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
|
||||
|
||||
|
|
@ -819,7 +521,7 @@ index 293bfec..5513370 100644
|
|||
if (!wiphy)
|
||||
return NULL;
|
||||
diff --git a/net/wireless/core.c b/net/wireless/core.c
|
||||
index afdfcc2..cefbcbc 100644
|
||||
index 2ddaaae..fbb56ee 100644
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -123,6 +123,19 @@ static int cfg80211_dev_check_name(struct cfg80211_registered_device *rdev,
|
||||
|
|
@ -842,7 +544,7 @@ index afdfcc2..cefbcbc 100644
|
|||
int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,
|
||||
char *newname)
|
||||
{
|
||||
@@ -398,7 +411,7 @@ static void cfg80211_propagate_cac_done_wk(struct work_struct *work)
|
||||
@@ -411,7 +424,7 @@ static void cfg80211_propagate_cac_done_wk(struct work_struct *work)
|
||||
/* exported functions */
|
||||
|
||||
struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
|
|
@ -851,7 +553,7 @@ index afdfcc2..cefbcbc 100644
|
|||
{
|
||||
static atomic_t wiphy_counter = ATOMIC_INIT(0);
|
||||
|
||||
@@ -441,17 +454,31 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
@@ -454,17 +467,31 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
|
||||
rdev->ops = ops;
|
||||
|
||||
|
|
@ -890,10 +592,10 @@ index afdfcc2..cefbcbc 100644
|
|||
/* give it a proper name */
|
||||
if (requested_name && requested_name[0]) {
|
||||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
||||
index 132df74..80b8caf 100644
|
||||
index bc6b5ac..6cd3b76 100644
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -1043,6 +1043,10 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
|
||||
@@ -1129,6 +1129,10 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -904,7 +606,7 @@ index 132df74..80b8caf 100644
|
|||
if (large) {
|
||||
if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
|
||||
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS))
|
||||
@@ -3503,6 +3506,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
||||
@@ -3710,6 +3714,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
||||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
|
|
@ -922,10 +624,10 @@ index 132df74..80b8caf 100644
|
|||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_AP:
|
||||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
||||
index b6caa2b..fbe581a 100644
|
||||
index 48ab1bb..185460d 100644
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -68,6 +68,7 @@
|
||||
@@ -69,6 +69,7 @@
|
||||
* channels allowed by the current regulatory domain.
|
||||
*/
|
||||
#define REG_ENFORCE_GRACE_MS 60000
|
||||
|
|
@ -933,7 +635,7 @@ index b6caa2b..fbe581a 100644
|
|||
|
||||
/**
|
||||
* enum reg_request_treatment - regulatory request treatment
|
||||
@@ -1788,11 +1789,21 @@ static void handle_channel_single_rule(struct wiphy *wiphy,
|
||||
@@ -1812,11 +1813,21 @@ static void handle_channel_single_rule(struct wiphy *wiphy,
|
||||
MBI_TO_DBI(power_rule->max_antenna_gain));
|
||||
chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
|
||||
|
||||
|
|
@ -959,7 +661,7 @@ index b6caa2b..fbe581a 100644
|
|||
}
|
||||
|
||||
if (chan->orig_mpwr) {
|
||||
@@ -1932,6 +1932,10 @@ static void handle_channel_adjacent_rules(struct wiphy *wiphy,
|
||||
@@ -1929,6 +1940,10 @@ static void handle_channel_adjacent_rules(struct wiphy *wiphy,
|
||||
chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
||||
}
|
||||
|
||||
|
|
@ -970,7 +672,7 @@ index b6caa2b..fbe581a 100644
|
|||
if (chan->orig_mpwr) {
|
||||
/* Devices that use REGULATORY_COUNTRY_IE_FOLLOW_POWER
|
||||
* will always follow the passed country IE power settings.
|
||||
@@ -2522,6 +2533,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
||||
@@ -2551,6 +2566,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
||||
}
|
||||
|
||||
chan->max_power = chan->max_reg_power;
|
||||
|
|
@ -982,15 +684,15 @@ index b6caa2b..fbe581a 100644
|
|||
|
||||
static void handle_band_custom(struct wiphy *wiphy,
|
||||
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
|
||||
index 78f2927..4fa5b0d 100644
|
||||
index a32065d..3a545c4 100644
|
||||
--- a/net/wireless/wext-compat.c
|
||||
+++ b/net/wireless/wext-compat.c
|
||||
@@ -895,7 +895,8 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
|
||||
@@ -964,7 +964,8 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
|
||||
/* well... oh well */
|
||||
data->txpower.fixed = 1;
|
||||
data->txpower.disabled = rfkill_blocked(rdev->rfkill);
|
||||
data->txpower.disabled = rfkill_blocked(rdev->wiphy.rfkill);
|
||||
- data->txpower.value = val;
|
||||
+ /* show same behavior as iw and show txpower 0dBm if not initialized */
|
||||
+ /* show same behavior as iw and show txpower 0dBm if not initialized */
|
||||
+ data->txpower.value = val == INT_MIN ? 0 : val;
|
||||
data->txpower.flags = IW_TXPOW_DBM;
|
||||
|
||||
|
|
@ -18,15 +18,16 @@ SRC_URI = "http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v${S
|
|||
file://0001-backport-of-build-patches-from-openwrt.patch \
|
||||
file://0002-backport-of-subsys-patches-from-openwrt.patch \
|
||||
file://0003-backport-of-ath-patches-from-openwrt.patch \
|
||||
file://0004-backport-of-rt2x00-patches-from-openwrt.patch \
|
||||
file://0005-backport-of-mwl-patches-from-openwrt.patch \
|
||||
file://0006-backport-of-brcm-patches-from-openwrt.patch \
|
||||
file://0007-backport-of-rtl-patches-from-openwrt.patch \
|
||||
file://0008-fragattack.patch \
|
||||
file://0009-netmodule-patches.patch \
|
||||
file://0004-backport-of-ath5k-patches-from-openwrt.patch \
|
||||
file://0005-backport-of-ath9k-patches-from-openwrt.patch \
|
||||
file://0006-backport-of-ath10k-patches-from-openwrt.patch \
|
||||
file://0007-backport-of-brcm-patches-from-openwrt.patch \
|
||||
file://0008-backport-of-mwl-patches-from-openwrt.patch \
|
||||
file://0009-backport-of-rt2x00-patches-from-openwrt.patch \
|
||||
file://0010-netmodule-patches.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "90005f3598b4b1fac4b0088f0b345ef2e8312df9f9f80c50aeb28497453888f5"
|
||||
SRC_URI[sha256sum] = "4c6b2af699e5e557dfc44bc7e30a10f1d6299a451ea50443084bdf7c850cbb24"
|
||||
|
||||
|
||||
S = "${WORKDIR}/backports-${PV}"
|
||||
Loading…
Reference in New Issue