parent
ec3175941d
commit
5f33141a99
|
|
@ -1,35 +1,14 @@
|
|||
From 929cbc1b2c140cee08e5f2657314356e0fa4fa18 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:24:53 +0200
|
||||
Subject: [PATCH] backport of build patches fromopenwrt
|
||||
commit 1b52fb23c0c7bcc09dbdef5f4b2c1e8632dca68f
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:00:21 2023 +0200
|
||||
|
||||
---
|
||||
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(-)
|
||||
backports-build
|
||||
|
||||
diff --git a/Kconfig.local b/Kconfig.local
|
||||
index 19a25e3..3a694ea 100644
|
||||
index 4ce75a5..ad7a431 100644
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1357,117 +1357,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||
@@ -1414,117 +1414,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||
config BACKPORTED_USB_RTL8153_ECM
|
||||
tristate
|
||||
default USB_RTL8153_ECM
|
||||
|
|
@ -148,10 +127,16 @@ index 19a25e3..3a694ea 100644
|
|||
tristate
|
||||
default USB_ACM
|
||||
diff --git a/Kconfig.sources b/Kconfig.sources
|
||||
index 2ea4d8a..0aa62a3 100644
|
||||
index 2ea4d8a..d74affd 100644
|
||||
--- a/Kconfig.sources
|
||||
+++ b/Kconfig.sources
|
||||
@@ -10,9 +10,6 @@ source "$BACKPORT_DIR/drivers/soc/qcom/Kconfig"
|
||||
@@ -4,15 +4,10 @@ source "$BACKPORT_DIR/compat/Kconfig"
|
||||
# these are copied from the kernel
|
||||
source "$BACKPORT_DIR/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/net/mac80211/Kconfig"
|
||||
-source "$BACKPORT_DIR/net/qrtr/Kconfig"
|
||||
-source "$BACKPORT_DIR/drivers/bus/mhi/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/soc/qcom/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
|
||||
|
||||
|
|
@ -312,12 +297,16 @@ index 77c2670..c431b71 100644
|
|||
|
||||
.PHONY: defconfig-help
|
||||
diff --git a/Makefile.kernel b/Makefile.kernel
|
||||
index 11ce417..2de87f5 100644
|
||||
index 11ce417..7071d14 100644
|
||||
--- a/Makefile.kernel
|
||||
+++ b/Makefile.kernel
|
||||
@@ -43,8 +43,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
@@ -39,12 +39,8 @@ obj-y += compat/
|
||||
|
||||
obj-$(CPTCFG_CFG80211) += net/wireless/
|
||||
obj-$(CPTCFG_MAC80211) += net/mac80211/
|
||||
-obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
|
||||
obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
-obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
|
||||
-obj-$(CPTCFG_SSB) += drivers/ssb/
|
||||
-obj-$(CPTCFG_BCMA) += drivers/bcma/
|
||||
|
|
@ -351,8 +340,37 @@ index 6550802..d0a8c20 100644
|
|||
@echo " done."
|
||||
|
||||
.PHONY: modules
|
||||
diff --git a/backport-include/linux/bcma/bcma_driver_chipcommon.h b/backport-include/linux/bcma/bcma_driver_chipcommon.h
|
||||
new file mode 100644
|
||||
index 0000000..42e028b
|
||||
--- /dev/null
|
||||
+++ b/backport-include/linux/bcma/bcma_driver_chipcommon.h
|
||||
@@ -0,0 +1,10 @@
|
||||
+#ifndef __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+#define __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+
|
||||
+#include_next <linux/bcma/bcma_driver_chipcommon.h>
|
||||
+
|
||||
+#ifndef BCMA_CC_SROM_CONTROL_OTP_PRESENT
|
||||
+#define BCMA_CC_SROM_CONTROL_OTP_PRESENT 0x00000020
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/backport-include/linux/skbuff.h b/backport-include/linux/skbuff.h
|
||||
index c1592c2..3cc8fa1 100644
|
||||
--- a/backport-include/linux/skbuff.h
|
||||
+++ b/backport-include/linux/skbuff.h
|
||||
@@ -144,4 +144,8 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
|
||||
#define napi_build_skb build_skb
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(5,11,0)
|
||||
+#define napi_build_skb build_skb
|
||||
+#endif
|
||||
+
|
||||
#endif /* __BACKPORT_SKBUFF_H */
|
||||
diff --git a/compat/main.c b/compat/main.c
|
||||
index 2540e75..c812f7b 100644
|
||||
index d4f3340..651ab63 100644
|
||||
--- a/compat/main.c
|
||||
+++ b/compat/main.c
|
||||
@@ -19,31 +19,6 @@ MODULE_LICENSE("GPL");
|
||||
|
|
@ -387,6 +405,23 @@ index 2540e75..c812f7b 100644
|
|||
void backport_dependency_symbol(void)
|
||||
{
|
||||
}
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/Kconfig b/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
index 7430aaf..f5f58a5 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
@@ -25,9 +25,9 @@ config ATH11K_PCI
|
||||
tristate "Atheros ath11k PCI support"
|
||||
depends on m
|
||||
depends on ATH11K && PCI
|
||||
- select MHI_BUS
|
||||
- select QRTR
|
||||
- select QRTR_MHI
|
||||
+ depends on MHI_BUS
|
||||
+ depends on QRTR
|
||||
+ depends on QRTR_MHI
|
||||
help
|
||||
This module adds support for PCIE bus
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/Kconfig b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
index 2e196b5..84cbe38 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
|
|
@ -434,7 +469,7 @@ index 2e196b5..84cbe38 100644
|
|||
|
||||
config B43_PHY_G
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
|
||||
index 836766e..f378356 100644
|
||||
index 1e5f845..82cb56c 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)
|
||||
|
|
@ -446,7 +481,7 @@ index 836766e..f378356 100644
|
|||
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
|
||||
#else
|
||||
return bus->chipco.dev;
|
||||
@@ -4870,7 +4870,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
|
||||
@@ -4871,7 +4871,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
|
||||
}
|
||||
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
|
||||
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
|
||||
|
|
@ -488,7 +523,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 d098c41..0f0fac4 100644
|
||||
index 8e77306..160389d 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)
|
||||
|
|
@ -510,7 +545,7 @@ index d098c41..0f0fac4 100644
|
|||
#endif
|
||||
gpiodev = bus->chipco.dev ? : pcidev;
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/Kconfig b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
index c5e6a50..64f6d2f 100644
|
||||
index 400dc88..b2d97b8 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -8,7 +8,7 @@ config BRCMSMAC
|
||||
|
|
@ -519,70 +554,35 @@ index c5e6a50..64f6d2f 100644
|
|||
depends on BCMA_POSSIBLE
|
||||
- select BCMA
|
||||
+ depends on BCMA
|
||||
select NEW_LEDS if BCMA_DRIVER_GPIO
|
||||
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 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 := \
|
||||
brcms_trace_events.o \
|
||||
debug.o
|
||||
|
||||
-brcmsmac-$(CPTCFG_BCMA_DRIVER_GPIO) += led.o
|
||||
+brcmsmac-$(CONFIG_BCMA_DRIVER_GPIO) += led.o
|
||||
|
||||
obj-$(CPTCFG_BRCMSMAC) += brcmsmac.o
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
index f58fd74..d65f5c2 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
@@ -24,7 +24,7 @@ struct brcms_led {
|
||||
struct gpio_desc *gpiod;
|
||||
};
|
||||
|
||||
-#ifdef CPTCFG_BCMA_DRIVER_GPIO
|
||||
+#ifdef CONFIG_BCMA_DRIVER_GPIO
|
||||
void brcms_led_unregister(struct brcms_info *wl);
|
||||
int brcms_led_register(struct brcms_info *wl);
|
||||
#else
|
||||
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
index 9ae7403..bb9f44f 100644
|
||||
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
@@ -11470,6 +11470,15 @@ static const struct attribute_group ipw_attribute_group = {
|
||||
.attrs = ipw_sysfs_entries,
|
||||
};
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
+static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||
+ if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||
+ return -EINVAL;
|
||||
+ ndev->mtu = new_mtu;
|
||||
+ return 0;
|
||||
+}
|
||||
depends on FW_LOADER
|
||||
depends on CORDIC
|
||||
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
|
||||
index 36af26e..beb0589 100644
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -5363,7 +5363,9 @@ static struct genl_family hwsim_genl_family __genl_ro_after_init = {
|
||||
.module = THIS_MODULE,
|
||||
.small_ops = hwsim_ops,
|
||||
.n_small_ops = ARRAY_SIZE(hwsim_ops),
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,0)
|
||||
.resv_start_op = HWSIM_CMD_DEL_MAC_ADDR + 1,
|
||||
+#endif
|
||||
+
|
||||
#ifdef CPTCFG_IPW2200_PROMISCUOUS
|
||||
static int ipw_prom_open(struct net_device *dev)
|
||||
{
|
||||
@@ -11518,15 +11527,6 @@ static netdev_tx_t ipw_prom_hard_start_xmit(struct sk_buff *skb,
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
-static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||
- if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||
- return -EINVAL;
|
||||
- ndev->mtu = new_mtu;
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static const struct net_device_ops ipw_prom_netdev_ops = {
|
||||
#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
.ndo_change_mtu = __change_mtu,
|
||||
.mcgrps = hwsim_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
|
||||
};
|
||||
diff --git a/drivers/staging/rtl8723bs/Kconfig b/drivers/staging/rtl8723bs/Kconfig
|
||||
index b51916c..b46ff98 100644
|
||||
--- a/drivers/staging/rtl8723bs/Kconfig
|
||||
+++ b/drivers/staging/rtl8723bs/Kconfig
|
||||
@@ -5,7 +5,6 @@ config RTL8723BS
|
||||
depends on m
|
||||
depends on WLAN && MMC && CFG80211
|
||||
depends on m
|
||||
- select CFG80211_WEXT
|
||||
depends on CRYPTO
|
||||
select BPAUTO_CRYPTO_LIB_ARC4
|
||||
help
|
||||
diff --git a/kconf/Makefile b/kconf/Makefile
|
||||
index 2004c44..a2790b1 100644
|
||||
--- a/kconf/Makefile
|
||||
|
|
@ -668,10 +668,25 @@ 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 0aaef6d..354f8eb 100644
|
||||
index 6a098b4..f46b7b7 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -451,43 +451,6 @@ USB_VL600=
|
||||
@@ -65,14 +65,6 @@ MAC80211_MESH_PS_DEBUG=
|
||||
MAC80211_TDLS_DEBUG=
|
||||
MAC80211_DEBUG_COUNTERS=
|
||||
MAC80211_STA_HASH_MAX_SIZE=
|
||||
-QRTR=
|
||||
-QRTR_SMD=
|
||||
-QRTR_TUN=
|
||||
-QRTR_MHI=
|
||||
-MHI_BUS=
|
||||
-MHI_BUS_DEBUG=
|
||||
-MHI_BUS_PCI_GENERIC=
|
||||
-MHI_BUS_EP=
|
||||
QCOM_AOSS_QMP=
|
||||
QCOM_COMMAND_DB=
|
||||
QCOM_CPR=
|
||||
@@ -470,43 +462,6 @@ USB_VL600=
|
||||
USB_NET_CH9200=
|
||||
USB_NET_AQC111=
|
||||
USB_RTL8153_ECM=
|
||||
|
|
@ -715,39 +730,17 @@ index 0aaef6d..354f8eb 100644
|
|||
USB_ACM=
|
||||
USB_PRINTER=
|
||||
USB_WDM=
|
||||
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
|
||||
index f3cb47e..5f173c8 100644
|
||||
--- a/net/wireless/Kconfig
|
||||
+++ b/net/wireless/Kconfig
|
||||
@@ -188,7 +188,7 @@ config CFG80211_WEXT_EXPORT
|
||||
endif # CFG80211
|
||||
|
||||
config LIB80211
|
||||
- tristate
|
||||
+ tristate "lib80211"
|
||||
depends on m
|
||||
default n
|
||||
help
|
||||
@@ -198,19 +198,19 @@ config LIB80211
|
||||
Drivers should select this themselves if needed.
|
||||
|
||||
config LIB80211_CRYPT_WEP
|
||||
- tristate
|
||||
+ tristate "lib80211 WEP support"
|
||||
depends on m
|
||||
select BPAUTO_CRYPTO_LIB_ARC4
|
||||
|
||||
config LIB80211_CRYPT_CCMP
|
||||
- tristate
|
||||
+ tristate "lib80211 CCMP support"
|
||||
depends on m
|
||||
depends on CRYPTO
|
||||
depends on CRYPTO_AES
|
||||
depends on CRYPTO_CCM
|
||||
|
||||
config LIB80211_CRYPT_TKIP
|
||||
- tristate
|
||||
+ tristate "lib80211 TKIP support"
|
||||
depends on m
|
||||
select BPAUTO_CRYPTO_LIB_ARC4
|
||||
|
||||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
||||
index b53ba42..777c141 100644
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -17233,7 +17233,9 @@ static struct genl_family nl80211_fam __genl_ro_after_init = {
|
||||
.n_ops = ARRAY_SIZE(nl80211_ops),
|
||||
.small_ops = nl80211_small_ops,
|
||||
.n_small_ops = ARRAY_SIZE(nl80211_small_ops),
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,0)
|
||||
.resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1,
|
||||
+#endif
|
||||
.mcgrps = nl80211_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(nl80211_mcgrps),
|
||||
.parallel_ops = true,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,18 +1,8 @@
|
|||
From 963c2ed48698063d6b684cabbf31b9c07cab9fd8 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:27:59 +0200
|
||||
Subject: [PATCH] backport of ath patches from openwrt
|
||||
commit 3d0b9e6dcde6e58a2f71372cbb85396a0e703a9c
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:01:34 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/Kconfig | 5 +-
|
||||
drivers/net/wireless/ath/Makefile | 2 +-
|
||||
drivers/net/wireless/ath/ath.h | 7 ---
|
||||
drivers/net/wireless/ath/ath5k/pci.c | 26 +++++++++-
|
||||
drivers/net/wireless/ath/regd.c | 72 ++++++++++++++++++--------
|
||||
drivers/net/wireless/ath/regd_common.h | 3 ++
|
||||
local-symbols | 1 +
|
||||
net/wireless/reg.c | 3 ++
|
||||
8 files changed, 88 insertions(+), 31 deletions(-)
|
||||
backports-ath
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/Kconfig b/drivers/net/wireless/ath/Kconfig
|
||||
index 0a2f4a5..3cb2efe 100644
|
||||
|
|
@ -312,7 +302,7 @@ index 2afdebf..3ba9fc3 100644
|
|||
REGULATORY_CUSTOM_REG;
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
|
||||
index c4bd26e..364011e 100644
|
||||
index cdb1e9a..2574f80 100644
|
||||
--- a/drivers/net/wireless/ath/regd_common.h
|
||||
+++ b/drivers/net/wireless/ath/regd_common.h
|
||||
@@ -32,6 +32,7 @@ enum EnumRd {
|
||||
|
|
@ -323,7 +313,7 @@ index c4bd26e..364011e 100644
|
|||
FRANCE_RES = 0x31,
|
||||
FCC3_FCCA = 0x3A,
|
||||
FCC3_WORLD = 0x3B,
|
||||
@@ -172,6 +173,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
|
||||
@@ -173,6 +174,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
|
||||
{FCC2_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{FCC2_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_FCCA, CTL_FCC, CTL_FCC},
|
||||
|
|
@ -331,7 +321,7 @@ index c4bd26e..364011e 100644
|
|||
{FCC3_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC4_FCCA, CTL_FCC, CTL_FCC},
|
||||
@@ -483,6 +485,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
@@ -486,6 +488,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
{CTRY_UAE, NULL1_WORLD, "AE"},
|
||||
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
|
||||
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
|
||||
|
|
@ -340,10 +330,10 @@ index c4bd26e..364011e 100644
|
|||
{CTRY_UNITED_STATES3, FCC3_FCCA, "US"},
|
||||
/* This "PS" is for US public safety actually... to support this we
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index 354f8eb..9af5dbe 100644
|
||||
index f46b7b7..2d2635f 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -106,6 +106,7 @@ ADM8211=
|
||||
@@ -102,6 +102,7 @@ ADM8211=
|
||||
ATH_COMMON=
|
||||
WLAN_VENDOR_ATH=
|
||||
ATH_DEBUG=
|
||||
|
|
@ -352,10 +342,10 @@ index 354f8eb..9af5dbe 100644
|
|||
ATH_REG_DYNAMIC_USER_REG_HINTS=
|
||||
ATH_REG_DYNAMIC_USER_CERT_TESTING=
|
||||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
||||
index 8f96b31..48ab1bb 100644
|
||||
index c76ff9d..a39adb2 100644
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3309,6 +3309,8 @@ void regulatory_hint_country_ie(struct wiphy *wiphy, enum nl80211_band band,
|
||||
@@ -3370,6 +3370,8 @@ void regulatory_hint_country_ie(struct wiphy *wiphy, enum nl80211_band band,
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
|
|
@ -364,7 +354,7 @@ index 8f96b31..48ab1bb 100644
|
|||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3560,6 +3562,7 @@ static bool is_wiphy_all_set_reg_flag(enum ieee80211_regulatory_flags flag)
|
||||
@@ -3621,6 +3623,7 @@ static bool is_wiphy_all_set_reg_flag(enum ieee80211_regulatory_flags flag)
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,23 +1,11 @@
|
|||
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
|
||||
commit f1bd9597a658be89408fab53f32c49dcbe73cabe
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:01:57 2023 +0200
|
||||
|
||||
---
|
||||
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
|
||||
backports-ath5
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
index 0433631..cff4f6f 100644
|
||||
index 308a429..0e6d184 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
@@ -1372,6 +1372,7 @@ struct ath5k_hw {
|
||||
|
|
@ -29,7 +17,7 @@ index 0433631..cff4f6f 100644
|
|||
|
||||
/* Antenna Control */
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
|
||||
index 54fdf8d..74f3591 100644
|
||||
index 469ebc4..97bb797 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)
|
||||
|
|
@ -42,7 +30,7 @@ index 54fdf8d..74f3591 100644
|
|||
/*
|
||||
* 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)
|
||||
@@ -2009,7 +2012,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||
}
|
||||
|
||||
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
|
||||
|
|
@ -51,7 +39,7 @@ index 54fdf8d..74f3591 100644
|
|||
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)
|
||||
@@ -2095,7 +2098,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
|
||||
|
|
@ -60,7 +48,7 @@ index 54fdf8d..74f3591 100644
|
|||
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[] = {
|
||||
@@ -2561,6 +2564,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
#endif
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
|
|
@ -180,10 +168,10 @@ index 4b41160..257101e 100644
|
|||
|
||||
/* 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
|
||||
index d9e376e..db06ff8 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)
|
||||
@@ -854,10 +854,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) {
|
||||
|
|
@ -222,7 +210,7 @@ index ee1c2fa..122fe1c 100644
|
|||
{ 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
|
||||
index 11ed30d..7de7e71 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)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,39 +1,8 @@
|
|||
From 9899eb509a1f4a270d6b6fbf9e2c86e0012a137a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:29:42 +0200
|
||||
Subject: [PATCH] backport of ath9k patches from openwrt
|
||||
commit 74097ec7ee9fb8412c4416a92c6a805d3141735e
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:02:16 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath.h | 1 +
|
||||
drivers/net/wireless/ath/ath9k/Kconfig | 13 +
|
||||
drivers/net/wireless/ath/ath9k/Makefile | 1 +
|
||||
drivers/net/wireless/ath/ath9k/ahb.c | 260 ++++++++++++-
|
||||
drivers/net/wireless/ath/ath9k/ani.h | 2 +-
|
||||
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 72 ++--
|
||||
drivers/net/wireless/ath/ath9k/ar9002_phy.h | 11 +
|
||||
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 95 +----
|
||||
drivers/net/wireless/ath/ath9k/ath9k.h | 34 +-
|
||||
.../wireless/ath/ath9k/ath9k_pci_owl_loader.c | 105 +++--
|
||||
drivers/net/wireless/ath/ath9k/channel.c | 7 +
|
||||
drivers/net/wireless/ath/ath9k/common.c | 21 +-
|
||||
drivers/net/wireless/ath/ath9k/debug.c | 202 ++++++++++
|
||||
drivers/net/wireless/ath/ath9k/eeprom.c | 12 +-
|
||||
drivers/net/wireless/ath/ath9k/gpio.c | 365 ++++++++++++++++--
|
||||
drivers/net/wireless/ath/ath9k/hsr.c | 247 ++++++++++++
|
||||
drivers/net/wireless/ath/ath9k/hsr.h | 48 +++
|
||||
drivers/net/wireless/ath/ath9k/hw-ops.h | 6 +
|
||||
drivers/net/wireless/ath/ath9k/hw.c | 154 ++++++--
|
||||
drivers/net/wireless/ath/ath9k/hw.h | 14 +
|
||||
drivers/net/wireless/ath/ath9k/init.c | 105 ++++-
|
||||
drivers/net/wireless/ath/ath9k/mac.c | 9 +-
|
||||
drivers/net/wireless/ath/ath9k/main.c | 12 +
|
||||
drivers/net/wireless/ath/ath9k/pci.c | 1 +
|
||||
drivers/net/wireless/ath/ath9k/phy.h | 3 +
|
||||
include/linux/ath9k_platform.h | 7 +
|
||||
local-symbols | 1 +
|
||||
27 files changed, 1561 insertions(+), 247 deletions(-)
|
||||
create mode 100644 drivers/net/wireless/ath/ath9k/hsr.c
|
||||
create mode 100644 drivers/net/wireless/ath/ath9k/hsr.h
|
||||
backports-ath9k
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
|
||||
index cfe535a..bb30fd7 100644
|
||||
|
|
@ -72,7 +41,7 @@ index eed0f3a..d2ea086 100644
|
|||
bool "Atheros ath9k debugging"
|
||||
depends on ATH9K && DEBUG_FS
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/Makefile b/drivers/net/wireless/ath/ath9k/Makefile
|
||||
index 847c8a8..6427bc6 100644
|
||||
index 01d6f41..81dee52 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/Makefile
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Makefile
|
||||
@@ -17,6 +17,7 @@ ath9k-$(CPTCFG_ATH9K_DFS_CERTIFIED) += dfs.o
|
||||
|
|
@ -84,7 +53,7 @@ index 847c8a8..6427bc6 100644
|
|||
ath9k-$(CPTCFG_ATH9K_DEBUGFS) += debug.o
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
index cdefb8e..839d780 100644
|
||||
index 9cd12b2..d6c381b 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
@@ -20,7 +20,15 @@
|
||||
|
|
@ -358,7 +327,7 @@ index cdefb8e..839d780 100644
|
|||
|
||||
if (!dev_get_platdata(&pdev->dev)) {
|
||||
dev_err(&pdev->dev, "no platform data specified\n");
|
||||
@@ -122,13 +371,16 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
||||
@@ -118,13 +367,16 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
||||
sc->mem = mem;
|
||||
sc->irq = irq;
|
||||
|
||||
|
|
@ -376,7 +345,7 @@ index cdefb8e..839d780 100644
|
|||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||
goto err_irq;
|
||||
@@ -159,6 +411,9 @@ static int ath_ahb_remove(struct platform_device *pdev)
|
||||
@@ -155,6 +407,9 @@ static int ath_ahb_remove(struct platform_device *pdev)
|
||||
free_irq(sc->irq, sc);
|
||||
ieee80211_free_hw(sc->hw);
|
||||
}
|
||||
|
|
@ -386,7 +355,7 @@ index cdefb8e..839d780 100644
|
|||
|
||||
return 0;
|
||||
}
|
||||
@@ -168,6 +423,9 @@ static struct platform_driver ath_ahb_driver = {
|
||||
@@ -164,6 +419,9 @@ static struct platform_driver ath_ahb_driver = {
|
||||
.remove = ath_ahb_remove,
|
||||
.driver = {
|
||||
.name = "ath9k",
|
||||
|
|
@ -546,7 +515,7 @@ index 2b58245..d20a936 100644
|
|||
#define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
index 7ec5610..6f1a46d 100644
|
||||
index ac40b93..c8ddb56 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -42,20 +42,6 @@ static const int cycpwrThr1_table[] =
|
||||
|
|
@ -570,7 +539,7 @@ index 7ec5610..6f1a46d 100644
|
|||
static const u8 ofdm2pwr[] = {
|
||||
ALL_TARGET_LEGACY_6_24,
|
||||
ALL_TARGET_LEGACY_6_24,
|
||||
@@ -1077,11 +1063,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
@@ -1068,11 +1054,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_channel *chan = ah->curchan;
|
||||
struct ar5416AniState *aniState = &ah->ani;
|
||||
|
|
@ -582,7 +551,7 @@ index 7ec5610..6f1a46d 100644
|
|||
s32 value, value2;
|
||||
|
||||
switch (cmd & ah->ani_function) {
|
||||
@@ -1095,61 +1076,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
@@ -1086,61 +1067,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
*/
|
||||
u32 on = param ? 1 : 0;
|
||||
|
||||
|
|
@ -644,7 +613,7 @@ index 7ec5610..6f1a46d 100644
|
|||
if (on)
|
||||
REG_SET_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
@@ -1927,6 +1853,26 @@ void ar9003_hw_init_rate_txpower(struct ath_hw *ah, u8 *rate_array,
|
||||
@@ -1918,6 +1844,26 @@ void ar9003_hw_init_rate_txpower(struct ath_hw *ah, u8 *rate_array,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -671,7 +640,7 @@ index 7ec5610..6f1a46d 100644
|
|||
void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
|
||||
@@ -1963,6 +1909,7 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
@@ -1954,6 +1900,7 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
priv_ops->set_radar_params = ar9003_hw_set_radar_params;
|
||||
priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
|
||||
|
||||
|
|
@ -680,7 +649,7 @@ index 7ec5610..6f1a46d 100644
|
|||
ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
|
||||
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
index ebffd4b..3b6c037 100644
|
||||
index f86b16d..49c9596 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -24,6 +24,8 @@
|
||||
|
|
@ -759,173 +728,8 @@ index ebffd4b..3b6c037 100644
|
|||
#endif
|
||||
|
||||
#ifdef CPTCFG_ATH9K_DEBUGFS
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
index 56d1a77..708c896 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
@@ -19,9 +19,14 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ath9k_platform.h>
|
||||
+#include <linux/nvmem-consumer.h>
|
||||
+#include <linux/workqueue.h>
|
||||
|
||||
struct owl_ctx {
|
||||
+ struct pci_dev *pdev;
|
||||
struct completion eeprom_load;
|
||||
+ struct work_struct work;
|
||||
+ struct nvmem_cell *cell;
|
||||
};
|
||||
|
||||
#define EEPROM_FILENAME_LEN 100
|
||||
@@ -42,6 +47,12 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
|
||||
u32 bar0;
|
||||
bool swap_needed = false;
|
||||
|
||||
+ /* also note that we are doing *u16 operations on the file */
|
||||
+ if (cal_len > 4096 || cal_len < 0x200 || (cal_len & 1) == 1) {
|
||||
+ dev_err(&pdev->dev, "eeprom has an invalid size.\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
if (*cal_data != AR5416_EEPROM_MAGIC) {
|
||||
if (*cal_data != swab16(AR5416_EEPROM_MAGIC)) {
|
||||
dev_err(&pdev->dev, "invalid calibration data\n");
|
||||
@@ -99,38 +110,31 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void owl_fw_cb(const struct firmware *fw, void *context)
|
||||
+static void owl_rescan(struct pci_dev *pdev)
|
||||
{
|
||||
- struct pci_dev *pdev = (struct pci_dev *)context;
|
||||
- struct owl_ctx *ctx = (struct owl_ctx *)pci_get_drvdata(pdev);
|
||||
- struct pci_bus *bus;
|
||||
-
|
||||
- complete(&ctx->eeprom_load);
|
||||
-
|
||||
- if (!fw) {
|
||||
- dev_err(&pdev->dev, "no eeprom data received.\n");
|
||||
- goto release;
|
||||
- }
|
||||
-
|
||||
- /* also note that we are doing *u16 operations on the file */
|
||||
- if (fw->size > 4096 || fw->size < 0x200 || (fw->size & 1) == 1) {
|
||||
- dev_err(&pdev->dev, "eeprom file has an invalid size.\n");
|
||||
- goto release;
|
||||
- }
|
||||
-
|
||||
- if (ath9k_pci_fixup(pdev, (const u16 *)fw->data, fw->size))
|
||||
- goto release;
|
||||
+ struct pci_bus *bus = pdev->bus;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
- bus = pdev->bus;
|
||||
pci_stop_and_remove_bus_device(pdev);
|
||||
/* the device should come back with the proper
|
||||
* ProductId. But we have to initiate a rescan.
|
||||
*/
|
||||
pci_rescan_bus(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
+}
|
||||
+
|
||||
+static void owl_fw_cb(const struct firmware *fw, void *context)
|
||||
+{
|
||||
+ struct owl_ctx *ctx = (struct owl_ctx *)context;
|
||||
+
|
||||
+ complete(&ctx->eeprom_load);
|
||||
|
||||
-release:
|
||||
+ if (fw) {
|
||||
+ ath9k_pci_fixup(ctx->pdev, (const u16 *)fw->data, fw->size);
|
||||
+ owl_rescan(ctx->pdev);
|
||||
+ } else {
|
||||
+ dev_err(&ctx->pdev->dev, "no eeprom data received.\n");
|
||||
+ }
|
||||
release_firmware(fw);
|
||||
}
|
||||
|
||||
@@ -152,6 +156,43 @@ static const char *owl_get_eeprom_name(struct pci_dev *pdev)
|
||||
return eeprom_name;
|
||||
}
|
||||
|
||||
+static void owl_nvmem_work(struct work_struct *work)
|
||||
+{
|
||||
+ struct owl_ctx *ctx = container_of(work, struct owl_ctx, work);
|
||||
+ void *buf;
|
||||
+ size_t len;
|
||||
+
|
||||
+ complete(&ctx->eeprom_load);
|
||||
+
|
||||
+ buf = nvmem_cell_read(ctx->cell, &len);
|
||||
+ if (!IS_ERR(buf)) {
|
||||
+ ath9k_pci_fixup(ctx->pdev, buf, len);
|
||||
+ kfree(buf);
|
||||
+ owl_rescan(ctx->pdev);
|
||||
+ } else {
|
||||
+ dev_err(&ctx->pdev->dev, "no nvmem data received.\n");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int owl_nvmem_probe(struct owl_ctx *ctx)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ ctx->cell = devm_nvmem_cell_get(&ctx->pdev->dev, "calibration");
|
||||
+ if (IS_ERR(ctx->cell)) {
|
||||
+ err = PTR_ERR(ctx->cell);
|
||||
+ if (err == -ENOENT || err == -EOPNOTSUPP)
|
||||
+ return 1; /* not present, try firmware_request */
|
||||
+
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ INIT_WORK(&ctx->work, owl_nvmem_work);
|
||||
+ schedule_work(&ctx->work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int owl_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
@@ -164,21 +205,27 @@ static int owl_probe(struct pci_dev *pdev,
|
||||
|
||||
pcim_pin_device(pdev);
|
||||
|
||||
- eeprom_name = owl_get_eeprom_name(pdev);
|
||||
- if (!eeprom_name) {
|
||||
- dev_err(&pdev->dev, "no eeprom filename found.\n");
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
|
||||
init_completion(&ctx->eeprom_load);
|
||||
+ ctx->pdev = pdev;
|
||||
|
||||
pci_set_drvdata(pdev, ctx);
|
||||
+
|
||||
+ err = owl_nvmem_probe(ctx);
|
||||
+ if (err <= 0)
|
||||
+ return err;
|
||||
+
|
||||
+ eeprom_name = owl_get_eeprom_name(pdev);
|
||||
+ if (!eeprom_name) {
|
||||
+ dev_err(&pdev->dev, "no eeprom filename found.\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
err = request_firmware_nowait(THIS_MODULE, true, eeprom_name,
|
||||
- &pdev->dev, GFP_KERNEL, pdev, owl_fw_cb);
|
||||
+ &pdev->dev, GFP_KERNEL, ctx, owl_fw_cb);
|
||||
if (err)
|
||||
dev_err(&pdev->dev, "failed to request caldata (%d).\n", err);
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
|
||||
index 1a926fc..a37f270 100644
|
||||
index 86c59bd..49cf036 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/channel.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/channel.c
|
||||
@@ -15,6 +15,7 @@
|
||||
|
|
@ -1010,10 +814,10 @@ index 099f3d4..86d4a50 100644
|
|||
return channel;
|
||||
}
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
index 75395f3..490574c 100644
|
||||
index fb87075..33c469c 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1364,6 +1364,198 @@ void ath9k_deinit_debug(struct ath_softc *sc)
|
||||
@@ -1413,6 +1413,199 @@ void ath9k_deinit_debug(struct ath_softc *sc)
|
||||
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
|
||||
}
|
||||
|
||||
|
|
@ -1052,7 +856,8 @@ index 75395f3..490574c 100644
|
|||
+ } else {
|
||||
+ bytes = 2;
|
||||
+ }
|
||||
+ copy_to_user(user_buf, from, bytes);
|
||||
+ if (copy_to_user(user_buf, from, bytes))
|
||||
+ return -EFAULT;
|
||||
+ user_buf += bytes;
|
||||
+ }
|
||||
+ return *ppos - pos;
|
||||
|
|
@ -1212,7 +1017,7 @@ index 75395f3..490574c 100644
|
|||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1383,6 +1575,16 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1432,6 +1625,16 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
ath9k_tx99_init_debug(sc);
|
||||
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
|
||||
|
||||
|
|
@ -1229,35 +1034,6 @@ index 75395f3..490574c 100644
|
|||
debugfs_create_devm_seqfile(sc->dev, "dma", sc->debug.debugfs_phy,
|
||||
read_file_dma);
|
||||
debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy,
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||
index c22d457..e6b3cd4 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||
@@ -135,13 +135,23 @@ static bool ath9k_hw_nvram_read_firmware(const struct firmware *eeprom_blob,
|
||||
offset, data);
|
||||
}
|
||||
|
||||
+static bool ath9k_hw_nvram_read_nvmem(struct ath_hw *ah, off_t offset,
|
||||
+ u16 *data)
|
||||
+{
|
||||
+ return ath9k_hw_nvram_read_array(ah->nvmem_blob,
|
||||
+ ah->nvmem_blob_len / sizeof(u16),
|
||||
+ offset, data);
|
||||
+}
|
||||
+
|
||||
bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_platform_data *pdata = ah->dev->platform_data;
|
||||
bool ret;
|
||||
|
||||
- if (ah->eeprom_blob)
|
||||
+ if (ah->nvmem_blob)
|
||||
+ ret = ath9k_hw_nvram_read_nvmem(ah, off, data);
|
||||
+ else if (ah->eeprom_blob)
|
||||
ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
|
||||
else if (pdata && !pdata->use_eeprom)
|
||||
ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
index a8101c9..37a796b 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
|
|
@ -2273,7 +2049,7 @@ index 09e750b..bd9b021 100644
|
|||
|
||||
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test)
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
index ebd5871..6252006 100644
|
||||
index 6243626..8d756dc 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -36,6 +36,7 @@
|
||||
|
|
@ -2322,16 +2098,7 @@ index ebd5871..6252006 100644
|
|||
bool reset_power_on;
|
||||
bool htc_reset_init;
|
||||
|
||||
@@ -977,6 +988,8 @@ struct ath_hw {
|
||||
bool disable_5ghz;
|
||||
|
||||
const struct firmware *eeprom_blob;
|
||||
+ u16 *nvmem_blob; /* devres managed */
|
||||
+ size_t nvmem_blob_len;
|
||||
|
||||
struct ath_dynack dynack;
|
||||
|
||||
@@ -1076,6 +1089,7 @@ void ath9k_hw_check_nav(struct ath_hw *ah);
|
||||
@@ -1078,6 +1089,7 @@ void ath9k_hw_check_nav(struct ath_hw *ah);
|
||||
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||
|
||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||
|
|
@ -2340,18 +2107,10 @@ index ebd5871..6252006 100644
|
|||
/* Generic hw timer primitives */
|
||||
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
|
||||
index d09d75e..06176a2 100644
|
||||
index f67f1f1..165d920 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_net.h>
|
||||
+#include <linux/nvmem-consumer.h>
|
||||
#include <linux/relay.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
@@ -47,7 +48,7 @@ int ath9k_modparam_nohwcrypt;
|
||||
@@ -48,7 +48,7 @@ int ath9k_modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
|
||||
|
||||
|
|
@ -2360,65 +2119,7 @@ index d09d75e..06176a2 100644
|
|||
module_param_named(blink, ath9k_led_blink, int, 0444);
|
||||
MODULE_PARM_DESC(blink, "Enable LED blink on activity");
|
||||
|
||||
@@ -568,6 +569,57 @@ static void ath9k_eeprom_release(struct ath_softc *sc)
|
||||
release_firmware(sc->sc_ah->eeprom_blob);
|
||||
}
|
||||
|
||||
+static int ath9k_nvmem_request_eeprom(struct ath_softc *sc)
|
||||
+{
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct nvmem_cell *cell;
|
||||
+ void *buf;
|
||||
+ size_t len;
|
||||
+ int err;
|
||||
+
|
||||
+ cell = devm_nvmem_cell_get(sc->dev, "calibration");
|
||||
+ if (IS_ERR(cell)) {
|
||||
+ err = PTR_ERR(cell);
|
||||
+
|
||||
+ /* nvmem cell might not be defined, or the nvmem
|
||||
+ * subsystem isn't included. In this case, follow
|
||||
+ * the established "just return 0;" convention of
|
||||
+ * ath9k_init_platform to say:
|
||||
+ * "All good. Nothing to see here. Please go on."
|
||||
+ */
|
||||
+ if (err == -ENOENT || err == -EOPNOTSUPP)
|
||||
+ return 0;
|
||||
+
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ buf = nvmem_cell_read(cell, &len);
|
||||
+ if (IS_ERR(buf))
|
||||
+ return PTR_ERR(buf);
|
||||
+
|
||||
+ /* run basic sanity checks on the returned nvram cell length.
|
||||
+ * That length has to be a multiple of a "u16" (i.e.: & 1).
|
||||
+ * Furthermore, it has to be more than "let's say" 512 bytes
|
||||
+ * but less than the maximum of AR9300_EEPROM_SIZE (16kb).
|
||||
+ */
|
||||
+ if (((len & 1) == 1) || (len < 512) || (len >= AR9300_EEPROM_SIZE)) {
|
||||
+ kfree(buf);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ /* devres manages the calibration values release on shutdown */
|
||||
+ ah->nvmem_blob = (u16 *)devm_kmemdup(sc->dev, buf, len, GFP_KERNEL);
|
||||
+ kfree(buf);
|
||||
+ if (!ah->nvmem_blob)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ah->nvmem_blob_len = len;
|
||||
+ ah->ah_flags &= ~AH_USE_EEPROM;
|
||||
+ ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int ath9k_init_platform(struct ath_softc *sc)
|
||||
{
|
||||
struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
||||
@@ -644,6 +696,12 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
@@ -696,6 +696,12 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2431,18 +2132,7 @@ index d09d75e..06176a2 100644
|
|||
static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -704,6 +762,10 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ ret = ath9k_nvmem_request_eeprom(sc);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
if (ath9k_led_active_high != -1)
|
||||
ah->config.led_active_high = ath9k_led_active_high == 1;
|
||||
|
||||
@@ -747,6 +809,9 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
@@ -803,6 +809,9 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
if (ret)
|
||||
goto err_hw;
|
||||
|
||||
|
|
@ -2452,7 +2142,7 @@ index d09d75e..06176a2 100644
|
|||
ret = ath9k_init_queues(sc);
|
||||
if (ret)
|
||||
goto err_queues;
|
||||
@@ -814,7 +879,8 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc)
|
||||
@@ -870,7 +879,8 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc)
|
||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
|
||||
ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ);
|
||||
|
||||
|
|
@ -2462,7 +2152,7 @@ index d09d75e..06176a2 100644
|
|||
}
|
||||
|
||||
static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -826,6 +892,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -882,6 +892,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO) },
|
||||
|
|
@ -2470,7 +2160,7 @@ index d09d75e..06176a2 100644
|
|||
};
|
||||
|
||||
#ifdef CPTCFG_ATH9K_CHANNEL_CONTEXT
|
||||
@@ -906,6 +973,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
@@ -962,6 +973,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||
ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
|
||||
|
|
@ -2478,7 +2168,7 @@ index d09d75e..06176a2 100644
|
|||
|
||||
if (ath9k_ps_enable)
|
||||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||
@@ -918,9 +986,6 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
@@ -974,9 +986,6 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
IEEE80211_RADIOTAP_MCS_HAVE_STBC;
|
||||
}
|
||||
|
||||
|
|
@ -2488,7 +2178,7 @@ index d09d75e..06176a2 100644
|
|||
hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR |
|
||||
NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
|
||||
NL80211_FEATURE_P2P_GO_CTWIN;
|
||||
@@ -993,6 +1058,18 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
@@ -1049,6 +1058,18 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
|
||||
}
|
||||
|
||||
|
|
@ -2507,7 +2197,7 @@ index d09d75e..06176a2 100644
|
|||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -1033,11 +1110,15 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
@@ -1089,13 +1110,15 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
/* must be initialized before ieee80211_register_hw */
|
||||
|
|
@ -2517,14 +2207,14 @@ index d09d75e..06176a2 100644
|
|||
ARRAY_SIZE(ath9k_tpt_blink));
|
||||
#endif
|
||||
|
||||
+ wiphy_read_of_freq_limits(hw->wiphy);
|
||||
+
|
||||
wiphy_read_of_freq_limits(hw->wiphy);
|
||||
|
||||
+ ath_get_initial_entropy(sc);
|
||||
+
|
||||
/* Register with mac80211 */
|
||||
error = ieee80211_register_hw(hw);
|
||||
if (error)
|
||||
@@ -1121,25 +1202,25 @@ static int __init ath9k_init(void)
|
||||
@@ -1179,25 +1202,25 @@ static int __init ath9k_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
@ -2582,7 +2272,7 @@ index 58d02c1..c9d2bf3 100644
|
|||
ath9k_hw_disable_mib_counters(ah);
|
||||
}
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
|
||||
index c6f4dea..063d1b1 100644
|
||||
index ed87a37..0647f33 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
|
@ -2670,10 +2360,10 @@ index 76860a4..e210108 100644
|
|||
|
||||
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index 9af5dbe..395c284 100644
|
||||
index 2d2635f..7d5b2d3 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -133,6 +133,7 @@ ATH9K_WOW=
|
||||
@@ -129,6 +129,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
|
|
|
|||
|
|
@ -1,30 +1,8 @@
|
|||
From 08eadf05f847b1b2472f8d5a0afcab03f832923f Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:30:15 +0200
|
||||
Subject: [PATCH] backport of ath10k patches from openwrt
|
||||
commit 276cc12705ba0643a320dc9bf73903b077bad629
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:02:43 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/Kconfig | 16 +++
|
||||
drivers/net/wireless/ath/ath10k/Makefile | 3 +-
|
||||
drivers/net/wireless/ath/ath10k/core.c | 122 ++++++++++++++++++--
|
||||
drivers/net/wireless/ath/ath10k/core.h | 19 ++++
|
||||
drivers/net/wireless/ath/ath10k/htt.h | 4 +
|
||||
drivers/net/wireless/ath/ath10k/htt_tx.c | 61 +++++-----
|
||||
drivers/net/wireless/ath/ath10k/hw.h | 1 +
|
||||
drivers/net/wireless/ath/ath10k/leds.c | 101 +++++++++++++++++
|
||||
drivers/net/wireless/ath/ath10k/leds.h | 41 +++++++
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 132 +++++++++++++++++++---
|
||||
drivers/net/wireless/ath/ath10k/pci.c | 16 +++
|
||||
drivers/net/wireless/ath/ath10k/thermal.h | 2 +-
|
||||
drivers/net/wireless/ath/ath10k/txrx.c | 15 ++-
|
||||
drivers/net/wireless/ath/ath10k/wmi-ops.h | 32 ++++++
|
||||
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +
|
||||
drivers/net/wireless/ath/ath10k/wmi.c | 54 +++++++++
|
||||
drivers/net/wireless/ath/ath10k/wmi.h | 35 ++++++
|
||||
local-symbols | 2 +
|
||||
18 files changed, 606 insertions(+), 52 deletions(-)
|
||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.c
|
||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
|
||||
backports-ath10k
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
index 49373f9..5d53bc3 100644
|
||||
|
|
@ -75,10 +53,10 @@ index 24d846a..e040d84 100644
|
|||
ath10k_core-$(CONFIG_PM) += wow.o
|
||||
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
|
||||
index 58e86e6..3b34c59 100644
|
||||
index 5eb131a..e1b49c5 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -8,10 +8,12 @@
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/of.h>
|
||||
|
|
@ -86,12 +64,7 @@ index 58e86e6..3b34c59 100644
|
|||
#include <linux/property.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/pm_qos.h>
|
||||
+#include <linux/nvmem-consumer.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include "core.h"
|
||||
@@ -25,6 +27,7 @@
|
||||
@@ -26,6 +27,7 @@
|
||||
#include "testmode.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "coredump.h"
|
||||
|
|
@ -99,39 +72,7 @@ index 58e86e6..3b34c59 100644
|
|||
|
||||
unsigned int ath10k_debug_mask;
|
||||
EXPORT_SYMBOL(ath10k_debug_mask);
|
||||
@@ -32,9 +35,11 @@ EXPORT_SYMBOL(ath10k_debug_mask);
|
||||
static unsigned int ath10k_cryptmode_param;
|
||||
static bool uart_print;
|
||||
static bool skip_otp;
|
||||
-static bool rawmode;
|
||||
static bool fw_diag_log;
|
||||
|
||||
+/* frame mode values are mapped as per enum ath10k_hw_txrx_mode */
|
||||
+unsigned int ath10k_frame_mode = ATH10K_HW_TXRX_NATIVE_WIFI;
|
||||
+
|
||||
unsigned long ath10k_coredump_mask = BIT(ATH10K_FW_CRASH_DUMP_REGISTERS) |
|
||||
BIT(ATH10K_FW_CRASH_DUMP_CE_DATA);
|
||||
|
||||
@@ -43,15 +48,16 @@ module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);
|
||||
module_param_named(cryptmode, ath10k_cryptmode_param, uint, 0644);
|
||||
module_param(uart_print, bool, 0644);
|
||||
module_param(skip_otp, bool, 0644);
|
||||
-module_param(rawmode, bool, 0644);
|
||||
module_param(fw_diag_log, bool, 0644);
|
||||
+module_param_named(frame_mode, ath10k_frame_mode, uint, 0644);
|
||||
module_param_named(coredump_mask, ath10k_coredump_mask, ulong, 0444);
|
||||
|
||||
MODULE_PARM_DESC(debug_mask, "Debugging mask");
|
||||
MODULE_PARM_DESC(uart_print, "Uart target debugging");
|
||||
MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
|
||||
MODULE_PARM_DESC(cryptmode, "Crypto mode: 0-hardware, 1-software");
|
||||
-MODULE_PARM_DESC(rawmode, "Use raw 802.11 frame datapath");
|
||||
+MODULE_PARM_DESC(frame_mode,
|
||||
+ "Datapath frame mode (0: raw, 1: native wifi (default), 2: ethernet)");
|
||||
MODULE_PARM_DESC(coredump_mask, "Bitfield of what to include in firmware crash file");
|
||||
MODULE_PARM_DESC(fw_diag_log, "Diag based fw log debugging");
|
||||
|
||||
@@ -61,6 +67,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -65,6 +67,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca988x hw2.0",
|
||||
|
|
@ -139,7 +80,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -134,6 +141,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -146,6 +149,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9887 hw1.0",
|
||||
|
|
@ -147,7 +88,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -351,6 +359,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -387,6 +391,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
|
|
@ -155,7 +96,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.otp_exe_param = 0x00000700,
|
||||
@@ -393,6 +402,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -433,6 +438,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
|
|
@ -163,7 +104,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -442,6 +452,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -486,6 +492,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
|
|
@ -171,143 +112,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -952,7 +963,8 @@ static int ath10k_core_get_board_id_from_otp(struct ath10k *ar)
|
||||
}
|
||||
|
||||
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||
bmi_board_id_param = BMI_PARAM_GET_FLASH_BOARD_ID;
|
||||
else
|
||||
bmi_board_id_param = BMI_PARAM_GET_EEPROM_BOARD_ID;
|
||||
@@ -1199,6 +1211,7 @@ success:
|
||||
static int ath10k_core_fetch_board_data_api_1(struct ath10k *ar, int bd_ie_type)
|
||||
{
|
||||
const struct firmware *fw;
|
||||
+ char boardname[100];
|
||||
|
||||
if (bd_ie_type == ATH10K_BD_IE_BOARD) {
|
||||
if (!ar->hw_params.fw.board) {
|
||||
@@ -1206,9 +1219,19 @@ static int ath10k_core_fetch_board_data_api_1(struct ath10k *ar, int bd_ie_type)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ scnprintf(boardname, sizeof(boardname), "board-%s-%s.bin",
|
||||
+ ath10k_bus_str(ar->hif.bus), dev_name(ar->dev));
|
||||
+
|
||||
ar->normal_mode_fw.board = ath10k_fetch_fw_file(ar,
|
||||
ar->hw_params.fw.dir,
|
||||
- ar->hw_params.fw.board);
|
||||
+ boardname);
|
||||
+ if (IS_ERR(ar->normal_mode_fw.board)) {
|
||||
+ fw = ath10k_fetch_fw_file(ar,
|
||||
+ ar->hw_params.fw.dir,
|
||||
+ ar->hw_params.fw.board);
|
||||
+ ar->normal_mode_fw.board = fw;
|
||||
+ }
|
||||
+
|
||||
if (IS_ERR(ar->normal_mode_fw.board))
|
||||
return PTR_ERR(ar->normal_mode_fw.board);
|
||||
|
||||
@@ -1743,7 +1766,8 @@ static int ath10k_download_and_run_otp(struct ath10k *ar)
|
||||
|
||||
/* As of now pre-cal is valid for 10_4 variants */
|
||||
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||
bmi_otp_exe_param = BMI_PARAM_FLASH_SECTION_ALL;
|
||||
|
||||
ret = ath10k_bmi_execute(ar, address, bmi_otp_exe_param, &result);
|
||||
@@ -1870,6 +1894,39 @@ out_free:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
|
||||
+{
|
||||
+ struct nvmem_cell *cell;
|
||||
+ void *buf;
|
||||
+ size_t len;
|
||||
+ int ret;
|
||||
+
|
||||
+ cell = devm_nvmem_cell_get(ar->dev, cell_name);
|
||||
+ if (IS_ERR(cell)) {
|
||||
+ ret = PTR_ERR(cell);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ buf = nvmem_cell_read(cell, &len);
|
||||
+ if (IS_ERR(buf))
|
||||
+ return PTR_ERR(buf);
|
||||
+
|
||||
+ if (ar->hw_params.cal_data_len != len) {
|
||||
+ kfree(buf);
|
||||
+ ath10k_warn(ar, "invalid calibration data length in nvmem-cell '%s': %zu != %u\n",
|
||||
+ cell_name, len, ar->hw_params.cal_data_len);
|
||||
+ return -EMSGSIZE;
|
||||
+ }
|
||||
+
|
||||
+ ret = ath10k_download_board_data(ar, buf, len);
|
||||
+ kfree(buf);
|
||||
+ if (ret)
|
||||
+ ath10k_warn(ar, "failed to download calibration data from nvmem-cell '%s': %d\n",
|
||||
+ cell_name, ret);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
|
||||
struct ath10k_fw_file *fw_file)
|
||||
{
|
||||
@@ -2104,6 +2161,18 @@ static int ath10k_core_pre_cal_download(struct ath10k *ar)
|
||||
{
|
||||
int ret;
|
||||
|
||||
+ ret = ath10k_download_cal_nvmem(ar, "pre-calibration");
|
||||
+ if (ret == 0) {
|
||||
+ ar->cal_mode = ATH10K_PRE_CAL_MODE_NVMEM;
|
||||
+ goto success;
|
||||
+ } else if (ret == -EPROBE_DEFER) {
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||
+ "boot did not find a pre-calibration nvmem-cell, try file next: %d\n",
|
||||
+ ret);
|
||||
+
|
||||
ret = ath10k_download_cal_file(ar, ar->pre_cal_file);
|
||||
if (ret == 0) {
|
||||
ar->cal_mode = ATH10K_PRE_CAL_MODE_FILE;
|
||||
@@ -2170,6 +2239,18 @@ static int ath10k_download_cal_data(struct ath10k *ar)
|
||||
"pre cal download procedure failed, try cal file: %d\n",
|
||||
ret);
|
||||
|
||||
+ ret = ath10k_download_cal_nvmem(ar, "calibration");
|
||||
+ if (ret == 0) {
|
||||
+ ar->cal_mode = ATH10K_CAL_MODE_NVMEM;
|
||||
+ goto done;
|
||||
+ } else if (ret == -EPROBE_DEFER) {
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||
+ "boot did not find a calibration nvmem-cell, try file next: %d\n",
|
||||
+ ret);
|
||||
+
|
||||
ret = ath10k_download_cal_file(ar, ar->cal_file);
|
||||
if (ret == 0) {
|
||||
ar->cal_mode = ATH10K_CAL_MODE_FILE;
|
||||
@@ -2487,7 +2568,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
|
||||
ar->htt.max_num_amsdu = ATH10K_HTT_MAX_NUM_AMSDU_DEFAULT;
|
||||
ar->htt.max_num_ampdu = ATH10K_HTT_MAX_NUM_AMPDU_DEFAULT;
|
||||
|
||||
- if (rawmode) {
|
||||
+ if (ath10k_frame_mode == ATH10K_HW_TXRX_RAW) {
|
||||
if (!test_bit(ATH10K_FW_FEATURE_RAW_MODE_SUPPORT,
|
||||
fw_file->fw_features)) {
|
||||
ath10k_err(ar, "rawmode = 1 requires support from firmware");
|
||||
@@ -3084,6 +3165,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
|
||||
@@ -3231,6 +3238,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
|
||||
goto err_hif_stop;
|
||||
}
|
||||
|
||||
|
|
@ -318,16 +123,16 @@ index 58e86e6..3b34c59 100644
|
|||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -3250,6 +3335,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
|
||||
@@ -3397,6 +3408,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
|
||||
|
||||
device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
|
||||
device_get_mac_address(ar->dev, ar->mac_addr);
|
||||
|
||||
+ of_get_mac_address(ar->dev->of_node, ar->mac_addr);
|
||||
+
|
||||
ret = ath10k_core_init_firmware_features(ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar, "fatal problem with firmware features: %d\n",
|
||||
@@ -3342,9 +3429,18 @@ static void ath10k_core_register_work(struct work_struct *work)
|
||||
@@ -3489,9 +3502,18 @@ static void ath10k_core_register_work(struct work_struct *work)
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
|
|
@ -346,7 +151,7 @@ index 58e86e6..3b34c59 100644
|
|||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -3369,6 +3465,16 @@ int ath10k_core_register(struct ath10k *ar,
|
||||
@@ -3516,6 +3538,16 @@ int ath10k_core_register(struct ath10k *ar,
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
|
|
@ -363,7 +168,7 @@ index 58e86e6..3b34c59 100644
|
|||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ath10k_core_register);
|
||||
@@ -3380,6 +3486,8 @@ void ath10k_core_unregister(struct ath10k *ar)
|
||||
@@ -3527,6 +3559,8 @@ void ath10k_core_unregister(struct ath10k *ar)
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
|
|
@ -373,7 +178,7 @@ index 58e86e6..3b34c59 100644
|
|||
/* Stop spectral before unregistering from mac80211 to remove the
|
||||
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
|
||||
index 4f5ca94..dfe7b0e 100644
|
||||
index d80ab4e..db8ff31 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -14,6 +14,7 @@
|
||||
|
|
@ -384,33 +189,7 @@ index 4f5ca94..dfe7b0e 100644
|
|||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -877,8 +878,10 @@ enum ath10k_cal_mode {
|
||||
ATH10K_CAL_MODE_FILE,
|
||||
ATH10K_CAL_MODE_OTP,
|
||||
ATH10K_CAL_MODE_DT,
|
||||
+ ATH10K_CAL_MODE_NVMEM,
|
||||
ATH10K_PRE_CAL_MODE_FILE,
|
||||
ATH10K_PRE_CAL_MODE_DT,
|
||||
+ ATH10K_PRE_CAL_MODE_NVMEM,
|
||||
ATH10K_CAL_MODE_EEPROM,
|
||||
};
|
||||
|
||||
@@ -898,10 +901,14 @@ static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode)
|
||||
return "otp";
|
||||
case ATH10K_CAL_MODE_DT:
|
||||
return "dt";
|
||||
+ case ATH10K_CAL_MODE_NVMEM:
|
||||
+ return "nvmem";
|
||||
case ATH10K_PRE_CAL_MODE_FILE:
|
||||
return "pre-cal-file";
|
||||
case ATH10K_PRE_CAL_MODE_DT:
|
||||
return "pre-cal-dt";
|
||||
+ case ATH10K_PRE_CAL_MODE_NVMEM:
|
||||
+ return "pre-cal-nvmem";
|
||||
case ATH10K_CAL_MODE_EEPROM:
|
||||
return "eeprom";
|
||||
}
|
||||
@@ -1249,6 +1256,13 @@ struct ath10k {
|
||||
@@ -1252,6 +1253,13 @@ struct ath10k {
|
||||
bool utf_monitor;
|
||||
} testmode;
|
||||
|
||||
|
|
@ -424,7 +203,7 @@ index 4f5ca94..dfe7b0e 100644
|
|||
struct {
|
||||
/* protected by data_lock */
|
||||
u32 rx_crc_err_drop;
|
||||
@@ -1298,6 +1312,10 @@ struct ath10k {
|
||||
@@ -1301,6 +1309,10 @@ struct ath10k {
|
||||
s32 tx_power_2g_limit;
|
||||
s32 tx_power_5g_limit;
|
||||
|
||||
|
|
@ -435,16 +214,8 @@ index 4f5ca94..dfe7b0e 100644
|
|||
/* must be last */
|
||||
u8 drv_priv[] __aligned(sizeof(void *));
|
||||
};
|
||||
@@ -1311,6 +1329,7 @@ static inline bool ath10k_peer_stats_enabled(struct ath10k *ar)
|
||||
return false;
|
||||
}
|
||||
|
||||
+extern unsigned int ath10k_frame_mode;
|
||||
extern unsigned long ath10k_coredump_mask;
|
||||
|
||||
void ath10k_core_napi_sync_disable(struct ath10k *ar);
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
index ec689e3..4c70917 100644
|
||||
index f06cf39..da2a7c1 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
@@ -235,7 +235,11 @@ enum htt_rx_ring_flags {
|
||||
|
|
@ -459,118 +230,11 @@ index ec689e3..4c70917 100644
|
|||
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
||||
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
||||
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
|
||||
index b793eac..9863343 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
|
||||
@@ -1295,7 +1295,6 @@ static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txm
|
||||
struct ath10k *ar = htt->ar;
|
||||
int res, data_len;
|
||||
struct htt_cmd_hdr *cmd_hdr;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct htt_data_tx_desc *tx_desc;
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct sk_buff *tmp_skb;
|
||||
@@ -1306,11 +1305,15 @@ static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txm
|
||||
u16 flags1 = 0;
|
||||
u16 msdu_id = 0;
|
||||
|
||||
- if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
- ieee80211_is_deauth(hdr->frame_control) ||
|
||||
- ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ if (!is_eth) {
|
||||
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
+
|
||||
+ if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
+ ieee80211_is_deauth(hdr->frame_control) ||
|
||||
+ ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ }
|
||||
}
|
||||
|
||||
data_len = msdu->len;
|
||||
@@ -1407,7 +1410,6 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
|
||||
{
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(msdu);
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct ath10k_hif_sg_item sg_items[2];
|
||||
@@ -1439,15 +1441,19 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
|
||||
txbuf_paddr = htt->txbuf.paddr +
|
||||
(sizeof(struct ath10k_htt_txbuf_32) * msdu_id);
|
||||
|
||||
- if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
- ieee80211_is_deauth(hdr->frame_control) ||
|
||||
- ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
- } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
- txmode == ATH10K_HW_TXRX_RAW &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ if (!is_eth) {
|
||||
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
+
|
||||
+ if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
+ ieee80211_is_deauth(hdr->frame_control) ||
|
||||
+ ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
+ txmode == ATH10K_HW_TXRX_RAW &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ }
|
||||
}
|
||||
|
||||
skb_cb->paddr = dma_map_single(dev, msdu->data, msdu->len,
|
||||
@@ -1609,7 +1615,6 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
|
||||
{
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(msdu);
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct ath10k_hif_sg_item sg_items[2];
|
||||
@@ -1641,15 +1646,19 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
|
||||
txbuf_paddr = htt->txbuf.paddr +
|
||||
(sizeof(struct ath10k_htt_txbuf_64) * msdu_id);
|
||||
|
||||
- if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
- ieee80211_is_deauth(hdr->frame_control) ||
|
||||
- ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
- } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
- txmode == ATH10K_HW_TXRX_RAW &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ if (!is_eth) {
|
||||
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
+
|
||||
+ if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
+ ieee80211_is_deauth(hdr->frame_control) ||
|
||||
+ ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
+ txmode == ATH10K_HW_TXRX_RAW &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ }
|
||||
}
|
||||
|
||||
skb_cb->paddr = dma_map_single(dev, msdu->data, msdu->len,
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
|
||||
index 79ae9e4..9d65f3e 100644
|
||||
index 98f08ca..1398e4b 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/hw.h
|
||||
@@ -517,6 +517,7 @@ struct ath10k_hw_params {
|
||||
@@ -519,6 +519,7 @@ struct ath10k_hw_params {
|
||||
const char *name;
|
||||
u32 patch_load_addr;
|
||||
int uart_pin;
|
||||
|
|
@ -733,7 +397,7 @@ index 0000000..a0f5c84
|
|||
+#endif
|
||||
+#endif /* _LEDS_H_ */
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
index 266ba48..7a5311b 100644
|
||||
index f7faefd..dd7b91f 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -24,6 +24,7 @@
|
||||
|
|
@ -744,7 +408,7 @@ index 266ba48..7a5311b 100644
|
|||
|
||||
/*********/
|
||||
/* Rates */
|
||||
@@ -1020,6 +1021,40 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
|
||||
@@ -1027,6 +1028,40 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
|
||||
return ar->last_wmi_vdev_start_status;
|
||||
}
|
||||
|
||||
|
|
@ -785,7 +449,7 @@ index 266ba48..7a5311b 100644
|
|||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1052,7 +1087,8 @@ static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
@@ -1059,7 +1094,8 @@ static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = channel->max_power * 2;
|
||||
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
||||
|
|
@ -795,7 +459,7 @@ index 266ba48..7a5311b 100644
|
|||
|
||||
reinit_completion(&ar->vdev_setup_done);
|
||||
reinit_completion(&ar->vdev_delete_done);
|
||||
@@ -1498,7 +1534,8 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif,
|
||||
@@ -1505,7 +1541,8 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif,
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = chandef->chan->max_power * 2;
|
||||
arg.channel.max_reg_power = chandef->chan->max_reg_power * 2;
|
||||
|
|
@ -805,7 +469,7 @@ index 266ba48..7a5311b 100644
|
|||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3426,7 +3463,8 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
@@ -3436,7 +3473,8 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
ch->min_power = 0;
|
||||
ch->max_power = channel->max_power * 2;
|
||||
ch->max_reg_power = channel->max_reg_power * 2;
|
||||
|
|
@ -815,136 +479,7 @@ index 266ba48..7a5311b 100644
|
|||
ch->reg_class_id = 0; /* FIXME */
|
||||
|
||||
/* FIXME: why use only legacy modes, why not any
|
||||
@@ -3710,6 +3748,9 @@ ath10k_mac_tx_h_get_txmode(struct ath10k *ar,
|
||||
const struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
||||
__le16 fc = hdr->frame_control;
|
||||
|
||||
+ if (IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
|
||||
+ return ATH10K_HW_TXRX_ETHERNET;
|
||||
+
|
||||
if (!vif || vif->type == NL80211_IFTYPE_MONITOR)
|
||||
return ATH10K_HW_TXRX_RAW;
|
||||
|
||||
@@ -3870,6 +3911,12 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
|
||||
bool noack = false;
|
||||
|
||||
cb->flags = 0;
|
||||
+
|
||||
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
|
||||
+ cb->flags |= ATH10K_SKB_F_QOS; /* Assume data frames are QoS */
|
||||
+ goto finish_cb_fill;
|
||||
+ }
|
||||
+
|
||||
if (!ath10k_tx_h_use_hwcrypto(vif, skb))
|
||||
cb->flags |= ATH10K_SKB_F_NO_HWCRYPT;
|
||||
|
||||
@@ -3908,6 +3955,7 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
|
||||
cb->flags |= ATH10K_SKB_F_RAW_TX;
|
||||
}
|
||||
|
||||
+finish_cb_fill:
|
||||
cb->vif = vif;
|
||||
cb->txq = txq;
|
||||
cb->airtime_est = airtime;
|
||||
@@ -4031,7 +4079,11 @@ static int ath10k_mac_tx(struct ath10k *ar,
|
||||
ath10k_tx_h_seq_no(vif, skb);
|
||||
break;
|
||||
case ATH10K_HW_TXRX_ETHERNET:
|
||||
- ath10k_tx_h_8023(skb);
|
||||
+ /* Convert 802.11->802.3 header only if the frame was erlier
|
||||
+ * encapsulated to 802.11 by mac80211. Otherwise pass it as is.
|
||||
+ */
|
||||
+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP))
|
||||
+ ath10k_tx_h_8023(skb);
|
||||
break;
|
||||
case ATH10K_HW_TXRX_RAW:
|
||||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags) &&
|
||||
@@ -4643,12 +4695,10 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
struct ieee80211_sta *sta = control->sta;
|
||||
struct ieee80211_txq *txq = NULL;
|
||||
- struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
enum ath10k_hw_txrx_mode txmode;
|
||||
enum ath10k_mac_tx_path txpath;
|
||||
bool is_htt;
|
||||
bool is_mgmt;
|
||||
- bool is_presp;
|
||||
int ret;
|
||||
u16 airtime;
|
||||
|
||||
@@ -4662,8 +4712,14 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
|
||||
is_mgmt = (txpath == ATH10K_MAC_TX_HTT_MGMT);
|
||||
|
||||
if (is_htt) {
|
||||
+ bool is_presp = false;
|
||||
+
|
||||
spin_lock_bh(&ar->htt.tx_lock);
|
||||
- is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
||||
+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) {
|
||||
+ struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
+
|
||||
+ is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
||||
+ }
|
||||
|
||||
ret = ath10k_htt_tx_inc_pending(htt);
|
||||
if (ret) {
|
||||
@@ -5463,6 +5519,30 @@ static int ath10k_mac_set_txbf_conf(struct ath10k_vif *arvif)
|
||||
ar->wmi.vdev_param->txbf, value);
|
||||
}
|
||||
|
||||
+static void ath10k_update_vif_offload(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_vif *vif)
|
||||
+{
|
||||
+ struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
||||
+ struct ath10k *ar = hw->priv;
|
||||
+ u32 vdev_param;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (ath10k_frame_mode != ATH10K_HW_TXRX_ETHERNET ||
|
||||
+ ar->wmi.vdev_param->tx_encap_type == WMI_VDEV_PARAM_UNSUPPORTED ||
|
||||
+ (vif->type != NL80211_IFTYPE_STATION &&
|
||||
+ vif->type != NL80211_IFTYPE_AP))
|
||||
+ vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED;
|
||||
+
|
||||
+ vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
||||
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
+ ATH10K_HW_TXRX_NATIVE_WIFI);
|
||||
+ /* 10.X firmware does not support this VDEV parameter. Do not warn */
|
||||
+ if (ret && ret != -EOPNOTSUPP) {
|
||||
+ ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
||||
+ arvif->vdev_id, ret);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* TODO:
|
||||
* Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
|
||||
@@ -5672,15 +5752,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
|
||||
|
||||
arvif->def_wep_key_idx = -1;
|
||||
|
||||
- vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
||||
- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
- ATH10K_HW_TXRX_NATIVE_WIFI);
|
||||
- /* 10.X firmware does not support this VDEV parameter. Do not warn */
|
||||
- if (ret && ret != -EOPNOTSUPP) {
|
||||
- ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
||||
- arvif->vdev_id, ret);
|
||||
- goto err_vdev_delete;
|
||||
- }
|
||||
+ ath10k_update_vif_offload(hw, vif);
|
||||
|
||||
/* Configuring number of spatial stream for monitor interface is causing
|
||||
* target assert in qca9888 and qca6174.
|
||||
@@ -9368,6 +9440,7 @@ static const struct ieee80211_ops ath10k_ops = {
|
||||
.stop = ath10k_stop,
|
||||
.config = ath10k_config,
|
||||
.add_interface = ath10k_add_interface,
|
||||
+ .update_vif_offload = ath10k_update_vif_offload,
|
||||
.remove_interface = ath10k_remove_interface,
|
||||
.configure_filter = ath10k_configure_filter,
|
||||
.bss_info_changed = ath10k_bss_info_changed,
|
||||
@@ -9859,6 +9932,21 @@ static int ath10k_mac_init_rd(struct ath10k *ar)
|
||||
@@ -9909,6 +9947,21 @@ static int ath10k_mac_init_rd(struct ath10k *ar)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -966,20 +501,15 @@ index 266ba48..7a5311b 100644
|
|||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10037,6 +10125,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
if (test_bit(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, ar->wmi.svc_map))
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TDLS_BUFFER_STA);
|
||||
@@ -10027,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||
- ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK);
|
||||
|
||||
+ if (ath10k_frame_mode == ATH10K_HW_TXRX_ETHERNET) {
|
||||
+ if (ar->wmi.vdev_param->tx_encap_type !=
|
||||
+ WMI_VDEV_PARAM_UNSUPPORTED)
|
||||
+ ieee80211_hw_set(ar->hw, SUPPORTS_TX_ENCAP_OFFLOAD);
|
||||
+ }
|
||||
+
|
||||
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||
ar->hw->wiphy->max_remain_on_channel_duration = 5000;
|
||||
@@ -10211,6 +10305,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
|
||||
ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL);
|
||||
@@ -10267,6 +10319,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
|
@ -993,7 +523,7 @@ index 266ba48..7a5311b 100644
|
|||
if (ret) {
|
||||
ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
index f6191b5..e9e08b0 100644
|
||||
index f0daff6..63fcf7f 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_config_wlan[] = {
|
||||
|
|
@ -1045,7 +575,7 @@ index f6191b5..e9e08b0 100644
|
|||
},
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
index 5fdb020..d76c307 100644
|
||||
index 1f4de9f..fcfa3c2 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
@@ -25,7 +25,7 @@ struct ath10k_thermal {
|
||||
|
|
@ -1057,39 +587,6 @@ index 5fdb020..d76c307 100644
|
|||
int ath10k_thermal_register(struct ath10k *ar);
|
||||
void ath10k_thermal_unregister(struct ath10k *ar);
|
||||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c
|
||||
index 6f8b642..08e079e 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/txrx.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
|
||||
@@ -43,6 +43,7 @@ out:
|
||||
int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
const struct htt_tx_done *tx_done)
|
||||
{
|
||||
+ struct ieee80211_tx_status status;
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
struct ieee80211_tx_info *info;
|
||||
@@ -128,7 +129,19 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
info->status.is_valid_ack_signal = true;
|
||||
}
|
||||
|
||||
- ieee80211_tx_status(htt->ar->hw, msdu);
|
||||
+ memset(&status, 0, sizeof(status));
|
||||
+ status.skb = msdu;
|
||||
+ status.info = info;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+
|
||||
+ if (txq)
|
||||
+ status.sta = txq->sta;
|
||||
+
|
||||
+ ieee80211_tx_status_ext(htt->ar->hw, &status);
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
/* we do not own the msdu anymore */
|
||||
|
||||
return 0;
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
index aa57d80..f3f6b59 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
|
|
@ -1142,7 +639,7 @@ index aa57d80..f3f6b59 100644
|
|||
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
|
||||
{
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
index 7efbe03..6a391b2 100644
|
||||
index 876410a..6724ea9 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops = {
|
||||
|
|
@ -1155,7 +652,7 @@ index 7efbe03..6a391b2 100644
|
|||
|
||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
index 416f2b9..ed57499 100644
|
||||
index c80ca74..c7f0c09 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct ath10k *ar, u32 vdev_id,
|
||||
|
|
@ -1255,7 +752,7 @@ index 416f2b9..ed57499 100644
|
|||
|
||||
int ath10k_wmi_attach(struct ath10k *ar)
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
index 01bfd09..1a39a9a 100644
|
||||
index 6de3cc4..29270d0 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
@@ -3030,6 +3030,41 @@ enum wmi_10_4_feature_mask {
|
||||
|
|
@ -1301,10 +798,10 @@ index 01bfd09..1a39a9a 100644
|
|||
/* contains enum wmi_host_platform_type */
|
||||
__le32 host_platform_config;
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index 395c284..ee80d12 100644
|
||||
index 7d5b2d3..ca938d6 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -165,6 +165,8 @@ ATH10K_SNOC=
|
||||
@@ -161,6 +161,8 @@ ATH10K_SNOC=
|
||||
ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,19 @@
|
|||
commit 6bad7c2d0da897bf5d333811a54d637becf99362
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:04:20 2023 +0200
|
||||
|
||||
backports-mt7601u
|
||||
|
||||
diff --git a/drivers/net/wireless/mediatek/mt7601u/usb.h b/drivers/net/wireless/mediatek/mt7601u/usb.h
|
||||
index 9fdf359..66481b7 100644
|
||||
--- a/drivers/net/wireless/mediatek/mt7601u/usb.h
|
||||
+++ b/drivers/net/wireless/mediatek/mt7601u/usb.h
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "mt7601u.h"
|
||||
|
||||
-#define MT7601U_FIRMWARE "mt7601u.bin"
|
||||
+#define MT7601U_FIRMWARE "mediatek/mt7601u.bin"
|
||||
|
||||
#define MT_VEND_REQ_MAX_RETRY 10
|
||||
#define MT_VEND_REQ_TOUT_MS 300
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,24 +1,14 @@
|
|||
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
|
||||
commit 7d323c9234b0f03c3589fa450b8aff35746b3a57
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:12:25 2023 +0200
|
||||
|
||||
---
|
||||
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(-)
|
||||
backports-mwl
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
index 4e3de68..c861532 100644
|
||||
index 3e065cb..3406241 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)
|
||||
@@ -2052,6 +2052,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
|
||||
goto err_wiphy_new;
|
||||
}
|
||||
|
||||
|
|
@ -27,7 +17,7 @@ index 4e3de68..c861532 100644
|
|||
return wdev;
|
||||
|
||||
err_wiphy_new:
|
||||
@@ -2127,6 +2129,8 @@ int lbs_cfg_register(struct lbs_private *priv)
|
||||
@@ -2126,6 +2128,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;
|
||||
|
||||
|
|
@ -37,7 +27,7 @@ index 4e3de68..c861532 100644
|
|||
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
|
||||
index 78e8b5a..b56a495 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)
|
||||
|
|
@ -49,10 +39,10 @@ index 64fc5e4..7048794 100644
|
|||
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
|
||||
index d3339d6..3971cdd 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
@@ -28,6 +28,85 @@
|
||||
@@ -16,6 +16,85 @@
|
||||
|
||||
static void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
|
@ -138,7 +128,7 @@ index 171a257..b0b8b1f 100644
|
|||
/*
|
||||
* This function initializes a command node.
|
||||
*
|
||||
@@ -205,8 +284,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
|
||||
@@ -193,8 +272,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,
|
||||
|
|
@ -149,7 +139,7 @@ index 171a257..b0b8b1f 100644
|
|||
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,
|
||||
@@ -653,8 +732,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,
|
||||
|
|
@ -160,7 +150,7 @@ index 171a257..b0b8b1f 100644
|
|||
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
|
||||
return -1;
|
||||
}
|
||||
@@ -900,8 +979,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
|
||||
@@ -902,8 +981,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
|
||||
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -172,7 +162,7 @@ index 171a257..b0b8b1f 100644
|
|||
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,
|
||||
@@ -1273,8 +1353,8 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
|
||||
|
||||
if (command != HostCmd_CMD_802_11_PS_MODE_ENH) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -184,10 +174,10 @@ index 171a257..b0b8b1f 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/decl.h b/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
index 6bd23c9..518dce4 100644
|
||||
index 88648c0..cc3fbf1 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
@@ -30,7 +30,7 @@
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
|
||||
#define MWIFIEX_BSS_COEX_COUNT 2
|
||||
|
|
@ -196,7 +186,7 @@ index 6bd23c9..518dce4 100644
|
|||
|
||||
#define MWIFIEX_DMA_ALIGN_SZ 64
|
||||
#define MWIFIEX_RX_HEADROOM 64
|
||||
@@ -112,7 +112,7 @@
|
||||
@@ -100,7 +100,7 @@
|
||||
#define MWIFIEX_RATE_INDEX_OFDM0 4
|
||||
|
||||
#define MWIFIEX_MAX_STA_NUM 3
|
||||
|
|
@ -206,10 +196,10 @@ index 6bd23c9..518dce4 100644
|
|||
|
||||
#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
|
||||
index 63f861e..7e29f10 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);
|
||||
@@ -1099,6 +1099,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);
|
||||
|
||||
|
|
@ -219,10 +209,10 @@ index 5923c5c..0d30f61 100644
|
|||
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
|
||||
index 7b69d27..d1c8b16 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,
|
||||
@@ -36,8 +36,9 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
|
||||
struct host_cmd_ds_802_11_ps_mode_enh *pm;
|
||||
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -235,10 +225,10 @@ index 6b5d35d..ae6554f 100644
|
|||
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
|
||||
index e78a201..d67f6c1 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,
|
||||
@@ -794,7 +794,8 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||
break;
|
||||
default:
|
||||
mwifiex_dbg(priv->adapter, ERROR,
|
||||
|
|
@ -249,10 +239,10 @@ index 18e8977..29b8af5 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
|
||||
index 529e325..fa1f639 100644
|
||||
index 13bcb12..5cad1e4 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");
|
||||
@@ -5703,6 +5703,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[] = {
|
||||
|
|
@ -260,7 +250,7 @@ index 529e325..fa1f639 100644
|
|||
{ 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,
|
||||
@@ -6288,6 +6289,8 @@ static int mwl8k_probe(struct pci_dev *pdev,
|
||||
|
||||
priv->running_bsses = 0;
|
||||
|
||||
|
|
@ -269,7 +259,7 @@ index 529e325..fa1f639 100644
|
|||
return rc;
|
||||
|
||||
err_stop_firmware:
|
||||
@@ -6317,8 +6320,6 @@ static void mwl8k_remove(struct pci_dev *pdev)
|
||||
@@ -6321,8 +6324,6 @@ static void mwl8k_remove(struct pci_dev *pdev)
|
||||
return;
|
||||
priv = hw->priv;
|
||||
|
||||
|
|
@ -1,27 +1,8 @@
|
|||
From a1dd3f2a734c1e96a7c8fd1ae64126e901a966d5 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:30:49 +0200
|
||||
Subject: [PATCH] backport of brcm patches from openwrt
|
||||
commit e6cf19d7a1de6cadb950fb64f560cd6f6c2f6759
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:16:19 2023 +0200
|
||||
|
||||
---
|
||||
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(-)
|
||||
backports-bcrm
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/Kconfig b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
index 84cbe38..5f008b4 100644
|
||||
|
|
@ -77,7 +58,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 f378356..86ab6fb 100644
|
||||
index ed8a1fe..a39436b 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");
|
||||
|
|
@ -92,7 +73,7 @@ index f378356..86ab6fb 100644
|
|||
static int modparam_bad_frames_preempt;
|
||||
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
|
||||
MODULE_PARM_DESC(bad_frames_preempt,
|
||||
@@ -109,7 +114,7 @@ static int b43_modparam_pio = 0;
|
||||
@@ -109,7 +114,7 @@ static int b43_modparam_pio;
|
||||
module_param_named(pio, b43_modparam_pio, int, 0644);
|
||||
MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
|
||||
|
||||
|
|
@ -161,7 +142,7 @@ index f378356..86ab6fb 100644
|
|||
|
||||
if (phy->type == B43_PHYTYPE_B) {
|
||||
value16 = b43_read16(dev, 0x005E);
|
||||
@@ -3978,7 +3993,6 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
@@ -3979,7 +3994,6 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
struct b43_wldev *dev = wl->current_dev;
|
||||
struct b43_phy *phy = &dev->phy;
|
||||
struct ieee80211_conf *conf = &hw->conf;
|
||||
|
|
@ -169,7 +150,7 @@ index f378356..86ab6fb 100644
|
|||
int err = 0;
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -4021,11 +4035,9 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
@@ -4022,11 +4036,9 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
|
||||
/* Antennas for RX and management frame TX. */
|
||||
|
|
@ -183,7 +164,7 @@ index f378356..86ab6fb 100644
|
|||
|
||||
if (wl->radio_enabled != phy->radio_on) {
|
||||
if (wl->radio_enabled) {
|
||||
@@ -5168,6 +5180,47 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
@@ -5169,6 +5181,47 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -230,8 +211,8 @@ index f378356..86ab6fb 100644
|
|||
+
|
||||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.tx = b43_op_tx,
|
||||
.conf_tx = b43_op_conf_tx,
|
||||
@@ -5189,6 +5242,8 @@ static const struct ieee80211_ops b43_hw_ops = {
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
@@ -5191,6 +5244,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,
|
||||
|
|
@ -240,7 +221,7 @@ index f378356..86ab6fb 100644
|
|||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
@@ -5490,6 +5545,8 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)
|
||||
@@ -5492,6 +5547,8 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)
|
||||
if (!wldev)
|
||||
goto out;
|
||||
|
||||
|
|
@ -249,7 +230,7 @@ index f378356..86ab6fb 100644
|
|||
wldev->use_pio = b43_modparam_pio;
|
||||
wldev->dev = dev;
|
||||
wldev->wl = wl;
|
||||
@@ -5581,6 +5638,9 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
|
||||
@@ -5583,6 +5640,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);
|
||||
|
||||
|
|
@ -311,7 +292,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 64f6d2f..c163838 100644
|
||||
index b2d97b8..597a4c3 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -1,6 +1,6 @@
|
||||
|
|
@ -323,10 +304,10 @@ index 64f6d2f..c163838 100644
|
|||
|
||||
config BRCMSMAC
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
index 7a58e05..9e629c2 100644
|
||||
index ea8409e..16a08e2 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,
|
||||
@@ -713,8 +713,36 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy,
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct wireless_dev *wdev;
|
||||
|
|
@ -363,71 +344,7 @@ index 7a58e05..9e629c2 100644
|
|||
brcmf_dbg(TRACE, "enter: %s type %d\n", name, type);
|
||||
err = brcmf_vif_add_validate(wiphy_to_cfg(wiphy), type);
|
||||
if (err) {
|
||||
@@ -2892,6 +2920,63 @@ done:
|
||||
return err;
|
||||
}
|
||||
|
||||
+static int
|
||||
+brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+ int idx, struct survey_info *survey)
|
||||
+{
|
||||
+ struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
+ struct brcmf_if *ifp = netdev_priv(ndev);
|
||||
+ struct brcmu_chan ch;
|
||||
+ enum nl80211_band band = 0;
|
||||
+ s32 err = 0;
|
||||
+ int noise;
|
||||
+ u32 freq;
|
||||
+ u32 chanspec;
|
||||
+
|
||||
+ memset(survey, 0, sizeof(struct survey_info));
|
||||
+ if (idx != 0) {
|
||||
+ if (idx >= cfg->pub->num_chan_stats || cfg->pub->chan_stats == NULL)
|
||||
+ return -ENOENT;
|
||||
+ if (cfg->pub->chan_stats[idx].freq == 0)
|
||||
+ return -ENOENT;
|
||||
+ survey->filled = SURVEY_INFO_NOISE_DBM;
|
||||
+ survey->channel = ieee80211_get_channel(wiphy, cfg->pub->chan_stats[idx].freq);
|
||||
+ survey->noise = cfg->pub->chan_stats[idx].noise;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
|
||||
+ if (err) {
|
||||
+ brcmf_err("chanspec failed (%d)\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ ch.chspec = chanspec;
|
||||
+ cfg->d11inf.decchspec(&ch);
|
||||
+
|
||||
+ switch (ch.band) {
|
||||
+ case BRCMU_CHAN_BAND_2G:
|
||||
+ band = NL80211_BAND_2GHZ;
|
||||
+ break;
|
||||
+ case BRCMU_CHAN_BAND_5G:
|
||||
+ band = NL80211_BAND_5GHZ;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ freq = ieee80211_channel_to_frequency(ch.control_ch_num, band);
|
||||
+ survey->channel = ieee80211_get_channel(wiphy, freq);
|
||||
+
|
||||
+ err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_PHY_NOISE, &noise);
|
||||
+ if (err) {
|
||||
+ brcmf_err("Could not get noise (%d)\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ survey->filled = SURVEY_INFO_NOISE_DBM | SURVEY_INFO_IN_USE;
|
||||
+ survey->noise = le32_to_cpu(noise);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
||||
int idx, u8 *mac, struct station_info *sinfo)
|
||||
@@ -2946,6 +3031,10 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
|
||||
@@ -2948,6 +2976,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
|
||||
*/
|
||||
|
|
@ -438,42 +355,8 @@ index 7a58e05..9e629c2 100644
|
|||
cfg->pwr_save = enabled;
|
||||
if (!check_vif_up(ifp->vif)) {
|
||||
|
||||
@@ -2989,6 +3078,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
|
||||
struct brcmu_chan ch;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
+ int i;
|
||||
u16 notify_capability;
|
||||
u16 notify_interval;
|
||||
u8 *notify_ie;
|
||||
@@ -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);
|
||||
+ for (i = 0;i < cfg->pub->num_chan_stats;i++) {
|
||||
+ if (freq == cfg->pub->chan_stats[i].freq)
|
||||
+ break;
|
||||
+ if (cfg->pub->chan_stats[i].freq == 0)
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i < cfg->pub->num_chan_stats) {
|
||||
+ cfg->pub->chan_stats[i].freq = freq;
|
||||
+ cfg->pub->chan_stats[i].noise = bi->phy_noise;
|
||||
+ }
|
||||
+
|
||||
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());
|
||||
@@ -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,
|
||||
+ .dump_survey = brcmf_cfg80211_dump_survey,
|
||||
.set_tx_power = brcmf_cfg80211_set_tx_power,
|
||||
.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..bb7cbe2 100644
|
||||
index 7c0d1f0..62c3e47 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;
|
||||
|
|
@ -488,183 +371,11 @@ index 3512a3f..bb7cbe2 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 9fbedb8..96e2311 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -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;
|
||||
+ drvr->chan_stats = vzalloc(256 * sizeof(struct brcmf_chan_stats));
|
||||
+ drvr->num_chan_stats = 256;
|
||||
|
||||
/* Attach and link in the protocol */
|
||||
ret = brcmf_proto_attach(drvr);
|
||||
@@ -1443,6 +1447,12 @@ void brcmf_detach(struct device *dev)
|
||||
if (drvr == NULL)
|
||||
return;
|
||||
|
||||
+ drvr->num_chan_stats = 0;
|
||||
+ if (drvr->chan_stats) {
|
||||
+ vfree(drvr->chan_stats);
|
||||
+ drvr->chan_stats = NULL;
|
||||
+ }
|
||||
+
|
||||
#ifdef CONFIG_INET
|
||||
unregister_inetaddr_notifier(&drvr->inetaddr_notifier);
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
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 {
|
||||
u32 nvramrev;
|
||||
};
|
||||
|
||||
+struct brcmf_chan_stats {
|
||||
+ u32 freq;
|
||||
+ int noise;
|
||||
+};
|
||||
+
|
||||
/* Common structure for module and instance linkage */
|
||||
struct brcmf_pub {
|
||||
/* Linkage ponters */
|
||||
@@ -100,6 +105,9 @@ struct brcmf_pub {
|
||||
struct cfg80211_ops *ops;
|
||||
struct brcmf_cfg80211_info *config;
|
||||
|
||||
+ int num_chan_stats;
|
||||
+ struct brcmf_chan_stats *chan_stats;
|
||||
+
|
||||
/* Internal brcmf items */
|
||||
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 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 {
|
||||
struct brcmf_fw_request *req;
|
||||
u32 curpos;
|
||||
void (*done)(struct device *dev, int err, struct brcmf_fw_request *req);
|
||||
+ struct completion *completion;
|
||||
};
|
||||
|
||||
#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);
|
||||
+ if (fwctx->completion)
|
||||
+ complete(fwctx->completion);
|
||||
kfree(fwctx);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
+
|
||||
+ init_completion(&completion);
|
||||
+ fwctx->completion = &completion;
|
||||
|
||||
/* 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);
|
||||
|
||||
+
|
||||
+ time_left = wait_for_completion_timeout(&completion,
|
||||
+ msecs_to_jiffies(5000));
|
||||
+ if (!time_left && fwctx)
|
||||
+ fwctx->completion = NULL;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
index 2f7bc3a..8cf1ad1 100644
|
||||
index fdd0c9a..453ce68 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -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>
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "debug.h"
|
||||
#include "core.h"
|
||||
#include "common.h"
|
||||
|
|
@ -672,7 +383,7 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
#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,
|
||||
@@ -65,6 +66,36 @@ static int brcmf_of_get_country_codes(struct device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -709,7 +420,7 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
@@ -90,6 +122,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
@@ -106,6 +137,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
of_node_put(root);
|
||||
}
|
||||
|
||||
|
|
@ -718,16 +429,7 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
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,
|
||||
@@ -136,3 +169,38 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
sdio->oob_irq_nr = irq;
|
||||
sdio->oob_irq_flags = irqf;
|
||||
}
|
||||
|
|
@ -767,28 +469,32 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
+ 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
|
||||
index 10bf522..4977e0c 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
@@ -5,9 +5,16 @@
|
||||
@@ -5,9 +5,20 @@
|
||||
#ifdef CONFIG_OF
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings);
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count);
|
||||
+#endif
|
||||
#else
|
||||
static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
}
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+static struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
#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
|
||||
index e265a2e..912495f 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -35,6 +35,7 @@
|
||||
|
|
@ -799,7 +505,7 @@ index f7961b2..3c5989b 100644
|
|||
|
||||
#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");
|
||||
@@ -634,7 +635,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt");
|
||||
/* per-board firmware binaries */
|
||||
MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.bin");
|
||||
|
||||
|
|
@ -808,7 +514,7 @@ index f7961b2..3c5989b 100644
|
|||
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[] = {
|
||||
@@ -662,6 +663,9 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(CY_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752)
|
||||
};
|
||||
|
||||
|
|
@ -818,18 +524,9 @@ index f7961b2..3c5989b 100644
|
|||
#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
|
||||
@@ -4193,6 +4197,9 @@ static const struct brcmf_bus_ops brcmf_sdio_bus_ops = {
|
||||
#define BRCMF_SDIO_FW_NVRAM 1
|
||||
#define BRCMF_SDIO_FW_CLM 2
|
||||
|
||||
+static struct brcmf_fw_request *
|
||||
+brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus);
|
||||
|
|
@ -837,7 +534,7 @@ index f7961b2..3c5989b 100644
|
|||
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,
|
||||
@@ -4208,6 +4215,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);
|
||||
|
||||
|
|
@ -860,7 +557,7 @@ index f7961b2..3c5989b 100644
|
|||
if (err)
|
||||
goto fail;
|
||||
|
||||
@@ -4419,7 +4442,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus)
|
||||
@@ -4418,7 +4441,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus)
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
|
|
@ -869,7 +566,7 @@ index f7961b2..3c5989b 100644
|
|||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return NULL;
|
||||
@@ -4437,6 +4460,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
@@ -4438,6 +4461,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;
|
||||
|
|
@ -879,7 +576,7 @@ index f7961b2..3c5989b 100644
|
|||
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
@@ -4519,6 +4545,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
@@ -4520,6 +4546,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
|
||||
brcmf_dbg(INFO, "completed!!\n");
|
||||
|
||||
|
|
@ -1,37 +1,14 @@
|
|||
From e3b2a5bb9212437f59b215bc4d5f9052667dd40e Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 15:09:20 +0200
|
||||
Subject: [PATCH] netmodule patches
|
||||
commit a2eea5b3a4bf890eac5791b36092e1d301b48709
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:30:32 2023 +0200
|
||||
|
||||
---
|
||||
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(-)
|
||||
netmodule patches
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
index adbaeb6..6bdddb0 100644
|
||||
index e76aab9..5e90c7d 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
@@ -3862,8 +3862,10 @@ static void ath10k_fetch_10_2_tx_stats(struct ath10k *ar, u8 *data)
|
||||
@@ -3997,8 +3997,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) {
|
||||
|
|
@ -45,10 +22,10 @@ index adbaeb6..6bdddb0 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
index 7a5311b..a96ec1c 100644
|
||||
index dd7b91f..0ea944e 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -2990,10 +2990,11 @@ static int ath10k_mac_txpower_setup(struct ath10k *ar, int txpower)
|
||||
@@ -3000,10 +3000,11 @@ static int ath10k_mac_txpower_setup(struct ath10k *ar, int txpower)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +38,7 @@ index 7a5311b..a96ec1c 100644
|
|||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -3002,10 +3003,28 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
@@ -3012,10 +3013,28 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
if (arvif->txpower == INT_MIN)
|
||||
continue;
|
||||
|
||||
|
|
@ -92,7 +69,7 @@ index 7a5311b..a96ec1c 100644
|
|||
}
|
||||
|
||||
if (txpower == -1)
|
||||
@@ -3020,6 +3039,7 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
@@ -3030,6 +3049,7 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -100,7 +77,7 @@ index 7a5311b..a96ec1c 100644
|
|||
|
||||
static int ath10k_mac_set_sar_power(struct ath10k *ar)
|
||||
{
|
||||
@@ -9623,7 +9643,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
|
||||
@@ -9638,7 +9658,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
|
||||
#endif
|
||||
},
|
||||
{
|
||||
|
|
@ -110,7 +87,7 @@ index 7a5311b..a96ec1c 100644
|
|||
},
|
||||
};
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
index e9e08b0..7bfa164 100644
|
||||
index 63fcf7f..c3166c1 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 {
|
||||
|
|
@ -136,10 +113,10 @@ index 3ba9fc3..9c8ff76 100644
|
|||
|
||||
if (reg->country_code == CTRY_DEFAULT) {
|
||||
diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
|
||||
index 8d5a16b..bb59c9d 100644
|
||||
index 774419c..c5c27af 100644
|
||||
--- a/drivers/net/wireless/ath/regd.h
|
||||
+++ b/drivers/net/wireless/ath/regd.h
|
||||
@@ -254,7 +254,8 @@ enum CountryCode {
|
||||
@@ -255,7 +255,8 @@ enum CountryCode {
|
||||
CTRY_JAPAN59 = 4059,
|
||||
CTRY_AUSTRALIA2 = 5000,
|
||||
CTRY_CANADA2 = 5001,
|
||||
|
|
@ -150,10 +127,10 @@ index 8d5a16b..bb59c9d 100644
|
|||
|
||||
bool ath_is_world_regd(struct ath_regulatory *reg);
|
||||
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
|
||||
index 364011e..4db829c 100644
|
||||
index 2574f80..f1a867a 100644
|
||||
--- a/drivers/net/wireless/ath/regd_common.h
|
||||
+++ b/drivers/net/wireless/ath/regd_common.h
|
||||
@@ -498,6 +498,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
@@ -501,6 +501,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
{CTRY_VIET_NAM, NULL1_WORLD, "VN"},
|
||||
{CTRY_YEMEN, NULL1_WORLD, "YE"},
|
||||
{CTRY_ZIMBABWE, ETSI1_WORLD, "ZW"},
|
||||
|
|
@ -162,10 +139,10 @@ index 364011e..4db829c 100644
|
|||
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
|
||||
index 8b798b5..bf1b921 100644
|
||||
index a939fd8..92fc2d4 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,
|
||||
@@ -1566,13 +1566,6 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||
cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates,
|
||||
wlvif->band));
|
||||
|
||||
|
|
@ -251,10 +228,10 @@ 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 8448549..2c8977c 100644
|
||||
index b0fb78e..8d8162f 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)
|
||||
@@ -2252,13 +2252,15 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
|
||||
for (i = 0; i < CONF_TX_MAX_AC_COUNT; i++)
|
||||
wl12xx_allocate_rate_policy(wl,
|
||||
&wlvif->ap.ucast_rate_idx[i]);
|
||||
|
|
@ -277,7 +254,7 @@ index 8448549..2c8977c 100644
|
|||
/* TODO: this seems to be used only for STA, check it */
|
||||
wlvif->rate_set = CONF_TX_ENABLED_RATES;
|
||||
}
|
||||
@@ -3542,6 +3544,9 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
@@ -3515,6 +3517,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;
|
||||
|
|
@ -287,7 +264,7 @@ index 8448549..2c8977c 100644
|
|||
case WL1271_CIPHER_SUITE_GEM:
|
||||
key_type = KEY_GEM;
|
||||
break;
|
||||
@@ -5798,9 +5803,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
@@ -5731,9 +5736,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);
|
||||
|
|
@ -304,7 +281,7 @@ index 8448549..2c8977c 100644
|
|||
wl1271_debug(DEBUG_MAC80211, "mac80211 get_rssi");
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -6214,6 +6226,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6146,6 +6158,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
WLAN_CIPHER_SUITE_TKIP,
|
||||
WLAN_CIPHER_SUITE_CCMP,
|
||||
WL1271_CIPHER_SUITE_GEM,
|
||||
|
|
@ -312,7 +289,7 @@ index 8448549..2c8977c 100644
|
|||
};
|
||||
|
||||
/* The tx descriptor buffer */
|
||||
@@ -6277,6 +6290,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6209,6 +6222,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
WIPHY_FLAG_IBSS_RSN;
|
||||
|
||||
wl->hw->wiphy->features |= NL80211_FEATURE_AP_SCAN;
|
||||
|
|
@ -321,19 +298,18 @@ index 8448549..2c8977c 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 ab83553..2bf72f3 100644
|
||||
index 9e4361e..2dbe3ca 100644
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -136,6 +136,8 @@ enum ieee80211_channel_flags {
|
||||
IEEE80211_CHAN_4MHZ = 1<<16,
|
||||
IEEE80211_CHAN_8MHZ = 1<<17,
|
||||
@@ -143,6 +143,7 @@ enum ieee80211_channel_flags {
|
||||
IEEE80211_CHAN_16MHZ = 1<<18,
|
||||
+ IEEE80211_CHAN_SRD = 1<<19,
|
||||
+
|
||||
IEEE80211_CHAN_NO_320MHZ = 1<<19,
|
||||
IEEE80211_CHAN_NO_EHT = 1<<20,
|
||||
+ IEEE80211_CHAN_SRD = 1<<21,
|
||||
};
|
||||
|
||||
#define IEEE80211_CHAN_NO_HT40 \
|
||||
@@ -3871,6 +3873,8 @@ struct mgmt_frame_regs {
|
||||
@@ -4086,6 +4087,8 @@ struct mgmt_frame_regs {
|
||||
* return 0 if successful
|
||||
* @set_antenna_gain: set antenna gain to reduce maximum tx power if necessary
|
||||
*
|
||||
|
|
@ -342,7 +318,7 @@ index ab83553..2bf72f3 100644
|
|||
* @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
|
||||
* functions to adjust rfkill hw state
|
||||
*
|
||||
@@ -4204,6 +4208,7 @@ struct cfg80211_ops {
|
||||
@@ -4436,6 +4439,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);
|
||||
|
|
@ -350,7 +326,7 @@ index ab83553..2bf72f3 100644
|
|||
|
||||
void (*rfkill_poll)(struct wiphy *wiphy);
|
||||
|
||||
@@ -5268,6 +5273,9 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
@@ -5533,6 +5537,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.
|
||||
*
|
||||
|
|
@ -360,7 +336,7 @@ index ab83553..2bf72f3 100644
|
|||
* Create a new wiphy and associate the given operations with it.
|
||||
* @sizeof_priv bytes are allocated for private use.
|
||||
*
|
||||
@@ -5275,7 +5283,7 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
@@ -5540,7 +5547,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,
|
||||
|
|
@ -369,7 +345,7 @@ index ab83553..2bf72f3 100644
|
|||
|
||||
/**
|
||||
* wiphy_new - create a new wiphy for use with cfg80211
|
||||
@@ -5292,7 +5300,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
@@ -5557,7 +5564,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)
|
||||
{
|
||||
|
|
@ -379,10 +355,10 @@ index ab83553..2bf72f3 100644
|
|||
|
||||
/**
|
||||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
|
||||
index c85050f..07c8277 100644
|
||||
index 9b466dd..04c0bf1 100644
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -4309,11 +4309,15 @@ struct ieee80211_ops {
|
||||
@@ -4586,11 +4586,15 @@ struct ieee80211_ops {
|
||||
* @requested_name: Requested name for this device.
|
||||
* NULL is valid value, and means use the default naming (phy%d)
|
||||
*
|
||||
|
|
@ -399,7 +375,7 @@ index c85050f..07c8277 100644
|
|||
|
||||
/**
|
||||
* ieee80211_alloc_hw - Allocate a new hardware device
|
||||
@@ -4333,7 +4337,7 @@ static inline
|
||||
@@ -4610,7 +4614,7 @@ static inline
|
||||
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
||||
const struct ieee80211_ops *ops)
|
||||
{
|
||||
|
|
@ -409,33 +385,31 @@ index c85050f..07c8277 100644
|
|||
|
||||
/**
|
||||
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
|
||||
index 019f065..190af2f 100644
|
||||
index ba4aa09..b5326af 100644
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -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.
|
||||
@@ -4121,6 +4121,8 @@ enum nl80211_wmm_rule {
|
||||
* as the primary or any of the secondary channels isn't possible
|
||||
* @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel
|
||||
* in current regulatory domain.
|
||||
+ * @NL80211_FREQUENCY_ATTR_SRD_CHANNEL: short range devices mode
|
||||
+ * on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
|
||||
* currently defined
|
||||
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
|
||||
@@ -3919,6 +3921,9 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_4MHZ,
|
||||
NL80211_FREQUENCY_ATTR_8MHZ,
|
||||
@@ -4159,6 +4161,7 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_16MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
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 abe7318..fc59297 100644
|
||||
index fcbd717..487c3a1 100644
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2825,6 +2825,18 @@ static int ieee80211_set_antenna_gain(struct wiphy *wiphy, int dbi)
|
||||
@@ -3059,6 +3059,18 @@ static int ieee80211_set_antenna_gain(struct wiphy *wiphy, int dbi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -454,7 +428,7 @@ index abe7318..fc59297 100644
|
|||
static void ieee80211_rfkill_poll(struct wiphy *wiphy)
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
@@ -4530,6 +4542,7 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||
@@ -4970,6 +4982,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,
|
||||
|
|
@ -463,12 +437,12 @@ index abe7318..fc59297 100644
|
|||
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 b777921..ba9c038 100644
|
||||
index a18f80d..aebeca6 100644
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -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);
|
||||
if (sdata->deflink.ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
||||
power = min(power, sdata->deflink.ap_power_level);
|
||||
|
||||
+ if (sdata->local->user_antenna_gain > 0) {
|
||||
+ power -= sdata->local->user_antenna_gain;
|
||||
|
|
@ -478,7 +452,7 @@ index b777921..ba9c038 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 09e5bf1..72238e9 100644
|
||||
index 83a1482..d5e14ed 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)
|
||||
|
|
@ -502,7 +476,7 @@ index 09e5bf1..72238e9 100644
|
|||
}
|
||||
|
||||
if (local->hw.conf.power_level != power) {
|
||||
@@ -548,7 +546,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = {
|
||||
@@ -627,7 +625,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,
|
||||
|
|
@ -511,7 +485,7 @@ index 09e5bf1..72238e9 100644
|
|||
{
|
||||
struct ieee80211_local *local;
|
||||
int priv_size, i;
|
||||
@@ -588,7 +586,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
@@ -671,7 +669,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
*/
|
||||
priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
|
||||
|
||||
|
|
@ -521,7 +495,7 @@ index 09e5bf1..72238e9 100644
|
|||
if (!wiphy)
|
||||
return NULL;
|
||||
diff --git a/net/wireless/core.c b/net/wireless/core.c
|
||||
index 2ddaaae..fbb56ee 100644
|
||||
index 387e8eb..f540ab2 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,
|
||||
|
|
@ -553,7 +527,7 @@ index 2ddaaae..fbb56ee 100644
|
|||
{
|
||||
static atomic_t wiphy_counter = ATOMIC_INIT(0);
|
||||
|
||||
@@ -454,17 +467,31 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
@@ -443,17 +456,31 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
|
||||
rdev->ops = ops;
|
||||
|
||||
|
|
@ -592,10 +566,10 @@ index 2ddaaae..fbb56ee 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 bc6b5ac..6cd3b76 100644
|
||||
index 507c868..ec2eadd 100644
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -1129,6 +1129,10 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
|
||||
@@ -1127,6 +1127,10 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -606,7 +580,7 @@ index bc6b5ac..6cd3b76 100644
|
|||
if (large) {
|
||||
if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
|
||||
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS))
|
||||
@@ -3710,6 +3714,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
||||
@@ -3828,6 +3832,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
||||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
|
|
@ -624,7 +598,7 @@ index bc6b5ac..6cd3b76 100644
|
|||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_AP:
|
||||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
||||
index 48ab1bb..185460d 100644
|
||||
index a39adb2..bcb635f 100644
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -69,6 +69,7 @@
|
||||
|
|
@ -635,7 +609,7 @@ index 48ab1bb..185460d 100644
|
|||
|
||||
/**
|
||||
* enum reg_request_treatment - regulatory request treatment
|
||||
@@ -1812,11 +1813,21 @@ static void handle_channel_single_rule(struct wiphy *wiphy,
|
||||
@@ -1845,11 +1846,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);
|
||||
|
||||
|
|
@ -661,7 +635,7 @@ index 48ab1bb..185460d 100644
|
|||
}
|
||||
|
||||
if (chan->orig_mpwr) {
|
||||
@@ -1929,6 +1940,10 @@ static void handle_channel_adjacent_rules(struct wiphy *wiphy,
|
||||
@@ -1962,6 +1973,10 @@ static void handle_channel_adjacent_rules(struct wiphy *wiphy,
|
||||
chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
||||
}
|
||||
|
||||
|
|
@ -672,7 +646,7 @@ index 48ab1bb..185460d 100644
|
|||
if (chan->orig_mpwr) {
|
||||
/* Devices that use REGULATORY_COUNTRY_IE_FOLLOW_POWER
|
||||
* will always follow the passed country IE power settings.
|
||||
@@ -2551,6 +2566,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
||||
@@ -2612,6 +2627,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
||||
}
|
||||
|
||||
chan->max_power = chan->max_reg_power;
|
||||
|
|
@ -684,10 +658,10 @@ index 48ab1bb..185460d 100644
|
|||
|
||||
static void handle_band_custom(struct wiphy *wiphy,
|
||||
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
|
||||
index a32065d..3a545c4 100644
|
||||
index ddf340b..5ea36cc 100644
|
||||
--- a/net/wireless/wext-compat.c
|
||||
+++ b/net/wireless/wext-compat.c
|
||||
@@ -964,7 +964,8 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
|
||||
@@ -990,7 +990,8 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
|
||||
/* well... oh well */
|
||||
data->txpower.fixed = 1;
|
||||
data->txpower.disabled = rfkill_blocked(rdev->wiphy.rfkill);
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
|
||||
index e1b49c5..3e2f96c 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3408,8 +3408,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
|
||||
|
||||
device_get_mac_address(ar->dev, ar->mac_addr);
|
||||
|
||||
- of_get_mac_address(ar->dev->of_node, ar->mac_addr);
|
||||
-
|
||||
ret = ath10k_core_init_firmware_features(ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar, "fatal problem with firmware features: %d\n",
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
|
||||
index 165d920..445006d 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -669,6 +669,7 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
enum ath_bus_type bus_type = common->bus_ops->ath_bus_type;
|
||||
+ const char *mac;
|
||||
char eeprom_name[100];
|
||||
int ret;
|
||||
|
||||
@@ -691,7 +692,9 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
}
|
||||
|
||||
- of_get_mac_address(np, common->macaddr);
|
||||
+ mac = of_get_mac_address(np);
|
||||
+ if (!IS_ERR(mac))
|
||||
+ ether_addr_copy(common->macaddr, mac);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
|
||||
index aebeca6..2b058c2 100644
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -948,7 +948,9 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
+#if LINUX_VERSION_IS_GEQ(5,13,0)
|
||||
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
|
||||
+#endif
|
||||
.ndo_setup_tc = ieee80211_netdev_setup_tc,
|
||||
};
|
||||
|
||||
|
|
@ -13,22 +13,24 @@ include nrsw-modules.${NM_TARGET}.inc
|
|||
|
||||
SHRT_VER = "${@d.getVar('PV', True).split('-')[0]}"
|
||||
|
||||
SRC_URI = "http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v${SHRT_VER}/backports-${PV}.tar.gz \
|
||||
file://config.${NM_TARGET} \
|
||||
SRC_URI = "http://mirror2.openwrt.org/sources/backports-${PV}.tar.xz \
|
||||
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://0003-backport-of-ath-patches-from-openwrt.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 \
|
||||
file://0007-backport-of-ath11k-patches-from-openwrt.patch \
|
||||
file://0008-backport-of-rt2x00-patches-from-openwrt.patch \
|
||||
file://0009-backport-of-mt7601u-patches-from-openwrt.patch \
|
||||
file://0010-backport-of-mwl-patches-from-openwrt.patch \
|
||||
file://0011-backport-of-brcm-patches-from-openwrt.patch \
|
||||
file://0020-netmodule-patches.patch \
|
||||
file://0021-netmodule-kernel_5.10-compatible.patch \
|
||||
file://config.${NM_TARGET} \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "4c6b2af699e5e557dfc44bc7e30a10f1d6299a451ea50443084bdf7c850cbb24"
|
||||
|
||||
SRC_URI[sha256sum] = "5d39aca7e34c33cb9b3e366117b2e86841b7bdd37933679d6b1e61be6b150648"
|
||||
|
||||
S = "${WORKDIR}/backports-${PV}"
|
||||
|
||||
Loading…
Reference in New Issue