update mac80211
This commit is contained in:
parent
d327652459
commit
e520a7ffd5
21
package/kernel/mac80211/Makefile
Executable file → Normal file
21
package/kernel/mac80211/Makefile
Executable file → Normal file
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=4.19.32-1
|
||||
PKG_RELEASE:=2
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.32/
|
||||
PKG_HASH:=838db1565b54fe4bd1e769c54f30c65c9ea2fb5e99a0cddb7910561794ae317a
|
||||
PKG_VERSION:=5.2-rc7-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.2-rc7/
|
||||
PKG_HASH:=3179a4ec398bd6366a4fd8a44b311a57f8da87ad10720baf7c17aef9c8ec2983
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
@ -28,7 +28,7 @@ PKG_DRIVERS = \
|
||||
lib80211 \
|
||||
mac80211-hwsim \
|
||||
mt7601u \
|
||||
p54-common p54-pci p54-spi p54-usb \
|
||||
p54-common p54-pci p54-usb \
|
||||
rsi91x rsi91x-usb rsi91x-sdio\
|
||||
wlcore wl12xx wl18xx \
|
||||
zd1211rw
|
||||
@ -275,7 +275,7 @@ endef
|
||||
|
||||
define KernelPackage/p54-common
|
||||
$(call KernelPackage/p54/Default)
|
||||
DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT||@TARGET_omap24xx +kmod-mac80211 +kmod-lib-crc-ccitt +@DRIVER_11W_SUPPORT
|
||||
DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 +kmod-lib-crc-ccitt +@DRIVER_11W_SUPPORT
|
||||
TITLE+= (COMMON)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54common.ko
|
||||
endef
|
||||
@ -296,14 +296,6 @@ define KernelPackage/p54-usb
|
||||
AUTOLOAD:=$(call AutoProbe,p54usb)
|
||||
endef
|
||||
|
||||
define KernelPackage/p54-spi
|
||||
$(call KernelPackage/p54/Default)
|
||||
TITLE+= (SPI)
|
||||
DEPENDS+= @TARGET_omap24xx +kmod-p54-common +p54-spi-firmware
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54spi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,p54spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/rsi91x
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Redpine Signals Inc 91x WLAN driver support
|
||||
@ -408,7 +400,6 @@ config-y += WL_MEDIATEK
|
||||
config-$(call config_package,p54-common) += P54_COMMON
|
||||
config-$(call config_package,p54-pci) += P54_PCI
|
||||
config-$(call config_package,p54-usb) += P54_USB
|
||||
config-$(call config_package,p54-spi) += P54_SPI
|
||||
|
||||
config-$(call config_package,hermes) += HERMES
|
||||
config-$(call config_package,hermes-pci) += PCI_HERMES
|
||||
|
||||
2
package/kernel/mac80211/ath.mk
Executable file → Normal file
2
package/kernel/mac80211/ath.mk
Executable file → Normal file
@ -131,7 +131,7 @@ define KernelPackage/ath5k
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Atheros 5xxx wireless cards support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath5k
|
||||
DEPENDS+= @PCI_SUPPORT||@TARGET_ath25 +kmod-ath +@DRIVER_11W_SUPPORT
|
||||
DEPENDS+= @(PCI_SUPPORT||TARGET_ath25) +kmod-ath +@DRIVER_11W_SUPPORT
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath5k)
|
||||
endef
|
||||
|
||||
4
package/kernel/mac80211/broadcom.mk
Executable file → Normal file
4
package/kernel/mac80211/broadcom.mk
Executable file → Normal file
@ -105,7 +105,7 @@ define KernelPackage/b43
|
||||
CONFIG_HW_RANDOM=y
|
||||
# Depend on PCI_SUPPORT to make sure we can select kmod-bcma or kmod-ssb
|
||||
DEPENDS += \
|
||||
@PCI_SUPPORT +kmod-mac80211 \
|
||||
@PCI_SUPPORT +kmod-mac80211 +kmod-lib-cordic \
|
||||
$(if $(CONFIG_PACKAGE_B43_USE_SSB),+kmod-ssb) \
|
||||
$(if $(CONFIG_PACKAGE_B43_USE_BCMA),+kmod-bcma)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43/b43.ko
|
||||
@ -347,7 +347,7 @@ define KernelPackage/b43legacy
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43
|
||||
KCONFIG:= \
|
||||
CONFIG_HW_RANDOM=y
|
||||
DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb +b43legacy-firmware
|
||||
DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb @!TARGET_brcm47xx_mips74k +b43legacy-firmware
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43legacy/b43legacy.ko
|
||||
AUTOLOAD:=$(call AutoProbe,b43legacy)
|
||||
MENU:=1
|
||||
|
||||
@ -113,7 +113,7 @@ detect_mac80211() {
|
||||
set wireless.radio${devidx}.hwmode=11${mode_band}
|
||||
${dev_id}
|
||||
${ht_capab}
|
||||
set wireless.radio${devidx}.disabled=0
|
||||
set wireless.radio${devidx}.disabled=1
|
||||
|
||||
set wireless.default_radio${devidx}=wifi-iface
|
||||
set wireless.default_radio${devidx}.device=radio${devidx}
|
||||
|
||||
4
package/kernel/mac80211/intel.mk
Executable file → Normal file
4
package/kernel/mac80211/intel.mk
Executable file → Normal file
@ -15,7 +15,7 @@ config-$(call config_package,ipw2200) += IPW2200
|
||||
|
||||
define KernelPackage/iwlwifi
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT @!LINUX_3_18
|
||||
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT
|
||||
TITLE:=Intel AGN Wireless support
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko \
|
||||
@ -124,7 +124,7 @@ endef
|
||||
define KernelPackage/libipw
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=libipw for ipw2100 and ipw2200
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-crypto-michael-mic +kmod-crypto-ecb +kmod-lib80211 +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT @!BIG_ENDIAN @!LINUX_3_18
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-crypto-michael-mic +kmod-crypto-ecb +kmod-lib80211 +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT @!BIG_ENDIAN
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/libipw.ko
|
||||
AUTOLOAD:=$(call AutoProbe,libipw)
|
||||
endef
|
||||
|
||||
6
package/kernel/mac80211/marvell.mk
Executable file → Normal file
6
package/kernel/mac80211/marvell.mk
Executable file → Normal file
@ -11,7 +11,7 @@ config-$(call config_package,mwifiex-sdio) += MWIFIEX MWIFIEX_SDIO
|
||||
|
||||
define KernelPackage/libertas-usb
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +kmod-usb-core +kmod-lib80211 +@DRIVER_WEXT_SUPPORT +libertas-usb-firmware @!LINUX_3_18
|
||||
DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +kmod-usb-core +kmod-lib80211 +@DRIVER_WEXT_SUPPORT +libertas-usb-firmware
|
||||
TITLE:=Marvell 88W8015 Wireless Driver
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
|
||||
@ -21,7 +21,7 @@ endef
|
||||
|
||||
define KernelPackage/libertas-sdio
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +kmod-mmc +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-sdio-firmware @!LINUX_3_18
|
||||
DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +kmod-mmc +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-sdio-firmware
|
||||
TITLE:=Marvell 88W8686 Wireless Driver
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
|
||||
@ -32,7 +32,7 @@ endef
|
||||
define KernelPackage/libertas-spi
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
SUBMENU:=Wireless Drivers
|
||||
DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-spi-firmware @!LINUX_3_18
|
||||
DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-spi-firmware
|
||||
KCONFIG := \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
|
||||
3
package/kernel/mac80211/patches/ath/070-ath_common_config.patch
Executable file → Normal file
3
package/kernel/mac80211/patches/ath/070-ath_common_config.patch
Executable file → Normal file
@ -1,6 +1,7 @@
|
||||
--- a/drivers/net/wireless/ath/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/Kconfig
|
||||
@@ -1,5 +1,5 @@
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
config ATH_COMMON
|
||||
- tristate
|
||||
+ tristate "ath.ko"
|
||||
|
||||
4
package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
@@ -85,6 +85,12 @@ config ATH10K_TRACING
|
||||
@@ -87,6 +87,12 @@ config ATH10K_TRACING
|
||||
---help---
|
||||
Select this to ath10k use tracing infrastructure.
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||
--- a/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
@@ -36,7 +36,7 @@ struct ath10k_thermal {
|
||||
@@ -25,7 +25,7 @@ struct ath10k_thermal {
|
||||
int temperature;
|
||||
};
|
||||
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/201-ath5k-WAR-for-AR71xx-PCI-bug.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/201-ath5k-WAR-for-AR71xx-PCI-bug.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/350-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/350-ath9k_hw-reset-AHB-WMAC-interface-on-AR91xx.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/354-ath9k-force-rx_clear-when-disabling-rx.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/354-ath9k-force-rx_clear-when-disabling-rx.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/356-Revert-ath9k-interpret-requested-txpower-in-EIRP-dom.patch
Executable file → Normal file
@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2962,7 +2962,8 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2963,7 +2963,8 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
{
|
||||
struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
|
||||
struct ieee80211_channel *channel;
|
||||
@ -18,7 +18,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
|
||||
u16 ctl = NO_CTL;
|
||||
|
||||
if (!chan)
|
||||
@@ -2974,9 +2975,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2975,9 +2976,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
channel = chan->chan;
|
||||
chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
|
||||
new_pwr = min_t(int, chan_pwr, reg->power_limit);
|
||||
|
||||
2
package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/365-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
Executable file → Normal file
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2981,6 +2981,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2982,6 +2982,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
if (ant_gain > max_gain)
|
||||
ant_reduction = ant_gain - max_gain;
|
||||
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 20 Aug 2018 11:35:05 +0200
|
||||
Subject: [PATCH] ath9k: fix tx99 with monitor mode interface
|
||||
|
||||
Tx99 is typically configured via a monitor mode interface, which does
|
||||
not get added to the driver as a vif. Since the code currently expects
|
||||
a configured virtual interface for tx99, enabling tx99 via debugfs fails.
|
||||
Since the vif is not needed anyway, remove all checks for it.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -1074,7 +1074,6 @@ struct ath_softc {
|
||||
|
||||
struct ath_spec_scan_priv spec_priv;
|
||||
|
||||
- struct ieee80211_vif *tx99_vif;
|
||||
struct sk_buff *tx99_skb;
|
||||
bool tx99_state;
|
||||
s16 tx99_power;
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1251,15 +1251,10 @@ static int ath9k_add_interface(struct ie
|
||||
struct ath_vif *avp = (void *)vif->drv_priv;
|
||||
struct ath_node *an = &avp->mcast_node;
|
||||
|
||||
- mutex_lock(&sc->mutex);
|
||||
+ if (IS_ENABLED(CPTCFG_ATH9K_TX99))
|
||||
+ return -EOPNOTSUPP;
|
||||
|
||||
- if (IS_ENABLED(CPTCFG_ATH9K_TX99)) {
|
||||
- if (sc->cur_chan->nvifs >= 1) {
|
||||
- mutex_unlock(&sc->mutex);
|
||||
- return -EOPNOTSUPP;
|
||||
- }
|
||||
- sc->tx99_vif = vif;
|
||||
- }
|
||||
+ mutex_lock(&sc->mutex);
|
||||
|
||||
ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
|
||||
sc->cur_chan->nvifs++;
|
||||
@@ -1342,7 +1337,6 @@ static void ath9k_remove_interface(struc
|
||||
ath9k_p2p_remove_vif(sc, vif);
|
||||
|
||||
sc->cur_chan->nvifs--;
|
||||
- sc->tx99_vif = NULL;
|
||||
if (!ath9k_is_chanctx_enabled())
|
||||
list_del(&avp->list);
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/tx99.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/tx99.c
|
||||
@@ -54,12 +54,6 @@ static struct sk_buff *ath9k_build_tx99_
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_tx_info *tx_info;
|
||||
struct sk_buff *skb;
|
||||
- struct ath_vif *avp;
|
||||
-
|
||||
- if (!sc->tx99_vif)
|
||||
- return NULL;
|
||||
-
|
||||
- avp = (struct ath_vif *)sc->tx99_vif->drv_priv;
|
||||
|
||||
skb = alloc_skb(len, GFP_KERNEL);
|
||||
if (!skb)
|
||||
@@ -77,14 +71,11 @@ static struct sk_buff *ath9k_build_tx99_
|
||||
memcpy(hdr->addr2, hw->wiphy->perm_addr, ETH_ALEN);
|
||||
memcpy(hdr->addr3, hw->wiphy->perm_addr, ETH_ALEN);
|
||||
|
||||
- hdr->seq_ctrl |= cpu_to_le16(avp->seq_no);
|
||||
-
|
||||
tx_info = IEEE80211_SKB_CB(skb);
|
||||
memset(tx_info, 0, sizeof(*tx_info));
|
||||
rate = &tx_info->control.rates[0];
|
||||
tx_info->band = sc->cur_chan->chandef.chan->band;
|
||||
tx_info->flags = IEEE80211_TX_CTL_NO_ACK;
|
||||
- tx_info->control.vif = sc->tx99_vif;
|
||||
rate->count = 1;
|
||||
if (ah->curchan && IS_CHAN_HT(ah->curchan)) {
|
||||
rate->flags |= IEEE80211_TX_RC_MCS;
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -2974,7 +2974,7 @@ int ath9k_tx99_send(struct ath_softc *sc
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- ath_set_rates(sc->tx99_vif, NULL, bf);
|
||||
+ ath_set_rates(NULL, NULL, bf);
|
||||
|
||||
ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, bf->bf_daddr);
|
||||
ath9k_hw_tx99_start(sc->sc_ah, txctl->txq->axq_qnum);
|
||||
@ -1,96 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 22 Sep 2018 15:20:50 +0200
|
||||
Subject: [PATCH] ath9k: add back support for using active monitor interfaces
|
||||
for tx99
|
||||
|
||||
Various documented examples on how to set up tx99 with ath9k rely
|
||||
on setting up a regular monitor interface for setting the channel.
|
||||
My previous patch "ath9k: fix tx99 with monitor mode interface" made
|
||||
it possible to set it up this way again. However, it was removing support
|
||||
for using an active monitor interface, which is required for controlling
|
||||
the bitrate as well, since the bitrate is not passed down with a regular
|
||||
monitor interface.
|
||||
|
||||
This patch partially reverts the previous one, but keeps support for using
|
||||
a regular monitor interface to keep documented steps working in cases
|
||||
where the bitrate does not matter
|
||||
|
||||
Fixes: d9c52fd17cb48 ("ath9k: fix tx99 with monitor mode interface")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -1074,6 +1074,7 @@ struct ath_softc {
|
||||
|
||||
struct ath_spec_scan_priv spec_priv;
|
||||
|
||||
+ struct ieee80211_vif *tx99_vif;
|
||||
struct sk_buff *tx99_skb;
|
||||
bool tx99_state;
|
||||
s16 tx99_power;
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1251,8 +1251,13 @@ static int ath9k_add_interface(struct ie
|
||||
struct ath_vif *avp = (void *)vif->drv_priv;
|
||||
struct ath_node *an = &avp->mcast_node;
|
||||
|
||||
- if (IS_ENABLED(CPTCFG_ATH9K_TX99))
|
||||
- return -EOPNOTSUPP;
|
||||
+ if (IS_ENABLED(CPTCFG_ATH9K_TX99)) {
|
||||
+ if (sc->cur_chan->nvifs >= 1) {
|
||||
+ mutex_unlock(&sc->mutex);
|
||||
+ return -EOPNOTSUPP;
|
||||
+ }
|
||||
+ sc->tx99_vif = vif;
|
||||
+ }
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
|
||||
@@ -1337,6 +1342,7 @@ static void ath9k_remove_interface(struc
|
||||
ath9k_p2p_remove_vif(sc, vif);
|
||||
|
||||
sc->cur_chan->nvifs--;
|
||||
+ sc->tx99_vif = NULL;
|
||||
if (!ath9k_is_chanctx_enabled())
|
||||
list_del(&avp->list);
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/tx99.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/tx99.c
|
||||
@@ -54,6 +54,7 @@ static struct sk_buff *ath9k_build_tx99_
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_tx_info *tx_info;
|
||||
struct sk_buff *skb;
|
||||
+ struct ath_vif *avp;
|
||||
|
||||
skb = alloc_skb(len, GFP_KERNEL);
|
||||
if (!skb)
|
||||
@@ -71,11 +72,17 @@ static struct sk_buff *ath9k_build_tx99_
|
||||
memcpy(hdr->addr2, hw->wiphy->perm_addr, ETH_ALEN);
|
||||
memcpy(hdr->addr3, hw->wiphy->perm_addr, ETH_ALEN);
|
||||
|
||||
+ if (sc->tx99_vif) {
|
||||
+ avp = (struct ath_vif *) sc->tx99_vif->drv_priv;
|
||||
+ hdr->seq_ctrl |= cpu_to_le16(avp->seq_no);
|
||||
+ }
|
||||
+
|
||||
tx_info = IEEE80211_SKB_CB(skb);
|
||||
memset(tx_info, 0, sizeof(*tx_info));
|
||||
rate = &tx_info->control.rates[0];
|
||||
tx_info->band = sc->cur_chan->chandef.chan->band;
|
||||
tx_info->flags = IEEE80211_TX_CTL_NO_ACK;
|
||||
+ tx_info->control.vif = sc->tx99_vif;
|
||||
rate->count = 1;
|
||||
if (ah->curchan && IS_CHAN_HT(ah->curchan)) {
|
||||
rate->flags |= IEEE80211_TX_RC_MCS;
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -2974,7 +2974,7 @@ int ath9k_tx99_send(struct ath_softc *sc
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- ath_set_rates(NULL, NULL, bf);
|
||||
+ ath_set_rates(sc->tx99_vif, NULL, bf);
|
||||
|
||||
ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, bf->bf_daddr);
|
||||
ath9k_hw_tx99_start(sc->sc_ah, txctl->txq->axq_qnum);
|
||||
0
package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/400-ath_move_debug_code.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/401-ath9k_blink_default.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/401-ath9k_blink_default.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch
Executable file → Normal file
@ -70,7 +70,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/Kconfig
|
||||
@@ -23,6 +23,9 @@ config WLAN_VENDOR_ATH
|
||||
@@ -24,6 +24,9 @@ config WLAN_VENDOR_ATH
|
||||
|
||||
if WLAN_VENDOR_ATH
|
||||
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/403-world_regd_fixup.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/403-world_regd_fixup.patch
Executable file → Normal file
10
package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch
Executable file → Normal file
10
package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -2982,6 +2982,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3032,6 +3032,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
@ -9,11 +9,11 @@
|
||||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3188,6 +3190,7 @@ static void restore_regulatory_settings(
|
||||
@@ -3283,6 +3285,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
+ return;
|
||||
pr_debug("All devices are disconnected, going to restore regulatory settings\n");
|
||||
restore_regulatory_settings(false);
|
||||
}
|
||||
/* Restore of regulatory settings is not required when wiphy(s)
|
||||
* ignore IE from connected access point but clearance of beacon hints
|
||||
* is required when wiphy(s) supports beacon hints.
|
||||
|
||||
4
package/kernel/mac80211/patches/ath/405-ath_regd_us.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/405-ath_regd_us.patch
Executable file → Normal file
@ -21,6 +21,6 @@
|
||||
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
|
||||
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
|
||||
+ {CTRY_UNITED_STATES, FCC3_FCCA_2, "US"},
|
||||
{CTRY_UNITED_STATES2, FCC3_FCCA, "US"},
|
||||
{CTRY_UNITED_STATES3, FCC3_FCCA, "US"},
|
||||
/* This "PS" is for US public safety actually... to support this we
|
||||
* would need to assign new special alpha2 to CRDA db as with the world
|
||||
* regdomain and use another alpha2 */
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/406-ath_relax_default_regd.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/406-ath_relax_default_regd.patch
Executable file → Normal file
@ -1,35 +0,0 @@
|
||||
From: Oever Gonzalez <notengobattery@gmail.com>
|
||||
Date: Mon, 7 Jan 2019 01:07:12 +0200
|
||||
Subject: [PATCH] ath: regd: add extra coutry codes
|
||||
|
||||
This patch adds several country codes to the regd.h and regd_common.h
|
||||
files in order to support devices whose country codes are not present in
|
||||
the original list. Without this patch, all devices whose manufacturer
|
||||
programmed any of these code in their EEPROM will not work.
|
||||
|
||||
Signed-off-by: Oever Gonzalez <notengobattery@gmail.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/regd.h
|
||||
+++ b/drivers/net/wireless/ath/regd.h
|
||||
@@ -185,7 +185,9 @@ enum CountryCode {
|
||||
CTRY_UKRAINE = 804,
|
||||
CTRY_UNITED_KINGDOM = 826,
|
||||
CTRY_UNITED_STATES = 840,
|
||||
+ CTRY_UNITED_STATES2 = 841,
|
||||
CTRY_UNITED_STATES_FCC49 = 842,
|
||||
+ CTRY_UNITED_STATES3 = 843,
|
||||
CTRY_URUGUAY = 858,
|
||||
CTRY_UZBEKISTAN = 860,
|
||||
CTRY_VENEZUELA = 862,
|
||||
--- a/drivers/net/wireless/ath/regd_common.h
|
||||
+++ b/drivers/net/wireless/ath/regd_common.h
|
||||
@@ -486,6 +486,8 @@ static struct country_code_to_enum_rd al
|
||||
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
|
||||
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
|
||||
{CTRY_UNITED_STATES, FCC3_FCCA_2, "US"},
|
||||
+ {CTRY_UNITED_STATES2, FCC3_FCCA, "US"},
|
||||
+ {CTRY_UNITED_STATES3, FCC3_FCCA, "US"},
|
||||
/* This "PS" is for US public safety actually... to support this we
|
||||
* would need to assign new special alpha2 to CRDA db as with the world
|
||||
* regdomain and use another alpha2 */
|
||||
@ -1,13 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -511,6 +511,10 @@ static int __ath_reg_dyn_country(struct
|
||||
|
||||
ath_reg_apply_world_flags(wiphy, request->initiator, reg);
|
||||
|
||||
+ // apply regulatory to phy devices
|
||||
+ if (regulatory_hint(wiphy, reg->alpha2))
|
||||
+ printk(KERN_DEBUG "ath: regulatory_hint error!\n");
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
2
package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -833,6 +833,7 @@ static const struct ieee80211_iface_limi
|
||||
@@ -831,6 +831,7 @@ static const struct ieee80211_iface_limi
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO) },
|
||||
|
||||
6
package/kernel/mac80211/patches/ath/411-ath5k_allow_adhoc_and_ap.patch
Executable file → Normal file
6
package/kernel/mac80211/patches/ath/411-ath5k_allow_adhoc_and_ap.patch
Executable file → Normal file
@ -18,7 +18,7 @@
|
||||
goto end;
|
||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||
@@ -1965,7 +1965,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||
@@ -1964,7 +1964,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||
}
|
||||
|
||||
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
|
||||
@ -27,7 +27,7 @@
|
||||
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
|
||||
u64 tsf = ath5k_hw_get_tsf64(ah);
|
||||
u32 tsftu = TSF_TO_TU(tsf);
|
||||
@@ -2051,7 +2051,7 @@ ath5k_beacon_update_timers(struct ath5k_
|
||||
@@ -2050,7 +2050,7 @@ ath5k_beacon_update_timers(struct ath5k_
|
||||
|
||||
intval = ah->bintval & AR5K_BEACON_PERIOD;
|
||||
if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs
|
||||
@ -36,7 +36,7 @@
|
||||
intval /= ATH_BCBUF; /* staggered multi-bss beacons */
|
||||
if (intval < 15)
|
||||
ATH5K_WARN(ah, "intval %u is too low, min 15\n",
|
||||
@@ -2518,6 +2518,7 @@ static const struct ieee80211_iface_limi
|
||||
@@ -2516,6 +2516,7 @@ static const struct ieee80211_iface_limi
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
#endif
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/420-ath5k_disable_fast_cc.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/420-ath5k_disable_fast_cc.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/430-add_ath5k_platform.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/430-add_ath5k_platform.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/431-add_platform_eeprom_support_to_ath5k.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/431-add_platform_eeprom_support_to_ath5k.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/432-ath5k_add_pciids.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/432-ath5k_add_pciids.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/440-ath5k_channel_bw_debugfs.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/440-ath5k_channel_bw_debugfs.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1374,6 +1374,53 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
@@ -1361,6 +1361,53 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1393,6 +1440,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1380,6 +1427,8 @@ 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);
|
||||
|
||||
|
||||
2
package/kernel/mac80211/patches/ath/501-ath9k_ahb_init.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/501-ath9k_ahb_init.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -1144,25 +1144,25 @@ static int __init ath9k_init(void)
|
||||
@@ -1143,25 +1143,25 @@ static int __init ath9k_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/510-ath9k_intr_mitigation_tweak.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/510-ath9k_intr_mitigation_tweak.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/511-ath9k_reduce_rxbuf.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/511-ath9k_reduce_rxbuf.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1421,6 +1421,52 @@ static const struct file_operations fops
|
||||
@@ -1408,6 +1408,52 @@ static const struct file_operations fops
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1442,6 +1488,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1429,6 +1475,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
|
||||
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_eeprom);
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/513-ath9k_add_pci_ids.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/513-ath9k_add_pci_ids.patch
Executable file → Normal file
16
package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch
Executable file → Normal file
16
package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -850,6 +850,9 @@ static inline int ath9k_dump_btcoex(stru
|
||||
@@ -843,6 +843,9 @@ static inline int ath9k_dump_btcoex(stru
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
void ath_init_leds(struct ath_softc *sc);
|
||||
void ath_deinit_leds(struct ath_softc *sc);
|
||||
@ -10,9 +10,9 @@
|
||||
#else
|
||||
static inline void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
@@ -991,6 +994,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||
#define AIRTIME_USE_NEW_QUEUES BIT(2)
|
||||
#define AIRTIME_ACTIVE(flags) (!!(flags & (AIRTIME_USE_TX|AIRTIME_USE_RX)))
|
||||
@@ -979,6 +982,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||
|
||||
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
|
||||
|
||||
+struct ath_led {
|
||||
+ struct list_head list;
|
||||
@ -24,7 +24,7 @@
|
||||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -1046,9 +1056,8 @@ struct ath_softc {
|
||||
@@ -1032,9 +1042,8 @@ struct ath_softc {
|
||||
spinlock_t chan_lock;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
@ -181,7 +181,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -1056,7 +1056,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -1055,7 +1055,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
/* must be initialized before ieee80211_register_hw */
|
||||
@ -192,7 +192,7 @@
|
||||
#endif
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1466,6 +1466,61 @@ static const struct file_operations fops
|
||||
@@ -1453,6 +1453,61 @@ static const struct file_operations fops
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@ -254,7 +254,7 @@
|
||||
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
@@ -1490,6 +1545,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1477,6 +1532,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
&fops_eeprom);
|
||||
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
|
||||
sc, &fops_chanbw);
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/531-ath9k_extra_platform_leds.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/531-ath9k_extra_platform_leds.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/540-ath9k_reduce_ani_interval.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/540-ath9k_reduce_ani_interval.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1522,6 +1522,50 @@ static const struct file_operations fops
|
||||
@@ -1509,6 +1509,50 @@ static const struct file_operations fops
|
||||
#endif
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1549,6 +1593,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1536,6 +1580,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_file("gpio_led", S_IWUSR,
|
||||
sc->debug.debugfs_phy, sc, &fops_gpio_led);
|
||||
#endif
|
||||
|
||||
12
package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch
Executable file → Normal file
12
package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch
Executable file → Normal file
@ -55,7 +55,7 @@
|
||||
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -821,7 +821,8 @@ static void ath9k_init_txpower_limits(st
|
||||
@@ -819,7 +819,8 @@ static void ath9k_init_txpower_limits(st
|
||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
|
||||
ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ);
|
||||
|
||||
@ -65,8 +65,8 @@
|
||||
}
|
||||
|
||||
static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -1016,6 +1017,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
@@ -1015,6 +1016,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS);
|
||||
}
|
||||
|
||||
+static void ath_get_initial_entropy(struct ath_softc *sc)
|
||||
@ -84,7 +84,7 @@
|
||||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -1061,6 +1074,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -1060,6 +1073,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
ARRAY_SIZE(ath9k_tpt_blink));
|
||||
#endif
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -1324,9 +1324,30 @@ void ar5008_hw_init_rate_txpower(struct
|
||||
@@ -1320,9 +1320,30 @@ void ar5008_hw_init_rate_txpower(struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@
|
||||
static const u32 ar5416_cca_regs[6] = {
|
||||
AR_PHY_CCA,
|
||||
AR_PHY_CH1_CCA,
|
||||
@@ -1341,6 +1362,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
|
||||
@@ -1337,6 +1358,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/544-ath9k-ar933x-usb-hang-workaround.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/544-ath9k-ar933x-usb-hang-workaround.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -953,55 +953,6 @@ static bool ar5008_hw_ani_control_new(st
|
||||
@@ -949,55 +949,6 @@ static bool ar5008_hw_ani_control_new(st
|
||||
* on == 0 means more noise imm
|
||||
*/
|
||||
u32 on = param ? 1 : 0;
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/547-ath9k_led_defstate_fix.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/547-ath9k_led_defstate_fix.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch
Executable file → Normal file
@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -1001,6 +1002,14 @@ struct ath_led {
|
||||
@@ -989,6 +990,14 @@ struct ath_led {
|
||||
struct led_classdev cdev;
|
||||
};
|
||||
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -1058,6 +1067,9 @@ struct ath_softc {
|
||||
@@ -1044,6 +1053,9 @@ struct ath_softc {
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
const char *led_default_trigger;
|
||||
struct list_head leds;
|
||||
|
||||
2
package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch
Executable file → Normal file
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -1069,6 +1069,7 @@ struct ath_softc {
|
||||
@@ -1055,6 +1055,7 @@ struct ath_softc {
|
||||
struct list_head leds;
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
struct ath9k_gpio_chip *gpiochip;
|
||||
|
||||
0
package/kernel/mac80211/patches/ath/550-ath9k-disable-bands-via-dt.patch
Executable file → Normal file
0
package/kernel/mac80211/patches/ath/550-ath9k-disable-bands-via-dt.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
Executable file → Normal file
@ -396,7 +396,7 @@
|
||||
ATH9K_HWRNG=
|
||||
--- a/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
@@ -59,6 +59,19 @@ config ATH9K_AHB
|
||||
@@ -60,6 +60,19 @@ config ATH9K_AHB
|
||||
Say Y, if you have a SoC with a compatible built-in
|
||||
wireless MAC. Say N if unsure.
|
||||
|
||||
|
||||
2
package/kernel/mac80211/patches/ath/552-ahb_of.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/552-ahb_of.patch
Executable file → Normal file
@ -318,7 +318,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -1023,6 +1024,9 @@ struct ath_softc {
|
||||
@@ -1011,6 +1012,9 @@ struct ath_softc {
|
||||
struct ath_hw *sc_ah;
|
||||
void __iomem *mem;
|
||||
int irq;
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
|
||||
Date: Fri, 2 Nov 2018 21:49:56 +0100
|
||||
Subject: [PATCH] ath9k: dynack: move debug log after buffer increments
|
||||
|
||||
Move debug log in ath_dynack_sample_tx_ts and ath_dynack_sample_ack_ts
|
||||
after timestamp buffer head/tail increments in order to make debugging
|
||||
more user friendly
|
||||
|
||||
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/dynack.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/dynack.c
|
||||
@@ -178,11 +178,12 @@ void ath_dynack_sample_tx_ts(struct ath_
|
||||
struct ath_tx_status *ts,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
- u8 ridx;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ath_dynack *da = &ah->dynack;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
+ u32 dur = ts->duration;
|
||||
+ u8 ridx;
|
||||
|
||||
if (!da->enabled || (info->flags & IEEE80211_TX_CTL_NO_ACK))
|
||||
return;
|
||||
@@ -217,14 +218,13 @@ void ath_dynack_sample_tx_ts(struct ath_
|
||||
ridx = ts->ts_rateindex;
|
||||
|
||||
da->st_rbf.ts[da->st_rbf.t_rb].tstamp = ts->ts_tstamp;
|
||||
- da->st_rbf.ts[da->st_rbf.t_rb].dur = ts->duration;
|
||||
ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_dest, hdr->addr1);
|
||||
ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_src, hdr->addr2);
|
||||
|
||||
if (!(info->status.rates[ridx].flags & IEEE80211_TX_RC_MCS)) {
|
||||
- u32 phy, sifs;
|
||||
const struct ieee80211_rate *rate;
|
||||
struct ieee80211_tx_rate *rates = info->status.rates;
|
||||
+ u32 phy;
|
||||
|
||||
rate = &common->sbands[info->band].bitrates[rates[ridx].idx];
|
||||
if (info->band == NL80211_BAND_2GHZ &&
|
||||
@@ -233,19 +233,18 @@ void ath_dynack_sample_tx_ts(struct ath_
|
||||
else
|
||||
phy = WLAN_RC_PHY_OFDM;
|
||||
|
||||
- sifs = ath_dynack_get_sifs(ah, phy);
|
||||
- da->st_rbf.ts[da->st_rbf.t_rb].dur -= sifs;
|
||||
+ dur -= ath_dynack_get_sifs(ah, phy);
|
||||
}
|
||||
-
|
||||
- ath_dbg(common, DYNACK, "{%pM} tx sample %u [dur %u][h %u-t %u]\n",
|
||||
- hdr->addr1, da->st_rbf.ts[da->st_rbf.t_rb].tstamp,
|
||||
- da->st_rbf.ts[da->st_rbf.t_rb].dur, da->st_rbf.h_rb,
|
||||
- (da->st_rbf.t_rb + 1) % ATH_DYN_BUF);
|
||||
+ da->st_rbf.ts[da->st_rbf.t_rb].dur = dur;
|
||||
|
||||
INCR(da->st_rbf.t_rb, ATH_DYN_BUF);
|
||||
if (da->st_rbf.t_rb == da->st_rbf.h_rb)
|
||||
INCR(da->st_rbf.h_rb, ATH_DYN_BUF);
|
||||
|
||||
+ ath_dbg(common, DYNACK, "{%pM} tx sample %u [dur %u][h %u-t %u]\n",
|
||||
+ hdr->addr1, ts->ts_tstamp, dur, da->st_rbf.h_rb,
|
||||
+ da->st_rbf.t_rb);
|
||||
+
|
||||
ath_dynack_compute_to(ah);
|
||||
|
||||
spin_unlock_bh(&da->qlock);
|
||||
@@ -272,14 +271,13 @@ void ath_dynack_sample_ack_ts(struct ath
|
||||
spin_lock_bh(&da->qlock);
|
||||
da->ack_rbf.tstamp[da->ack_rbf.t_rb] = ts;
|
||||
|
||||
- ath_dbg(common, DYNACK, "rx sample %u [h %u-t %u]\n",
|
||||
- da->ack_rbf.tstamp[da->ack_rbf.t_rb],
|
||||
- da->ack_rbf.h_rb, (da->ack_rbf.t_rb + 1) % ATH_DYN_BUF);
|
||||
-
|
||||
INCR(da->ack_rbf.t_rb, ATH_DYN_BUF);
|
||||
if (da->ack_rbf.t_rb == da->ack_rbf.h_rb)
|
||||
INCR(da->ack_rbf.h_rb, ATH_DYN_BUF);
|
||||
|
||||
+ ath_dbg(common, DYNACK, "rx sample %u [h %u-t %u]\n",
|
||||
+ ts, da->ack_rbf.h_rb, da->ack_rbf.t_rb);
|
||||
+
|
||||
ath_dynack_compute_to(ah);
|
||||
|
||||
spin_unlock_bh(&da->qlock);
|
||||
@ -1,22 +0,0 @@
|
||||
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
|
||||
Date: Fri, 2 Nov 2018 21:49:59 +0100
|
||||
Subject: [PATCH] ath9k: dynack: remove 'experimental' tag
|
||||
|
||||
Remove experimental tag from dynack Kconfig entry since it has
|
||||
been tested on outdoor 25Km links
|
||||
|
||||
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
@@ -132,7 +132,7 @@ config ATH9K_DFS_CERTIFIED
|
||||
except increase code size.
|
||||
|
||||
config ATH9K_DYNACK
|
||||
- bool "Atheros ath9k ACK timeout estimation algorithm (EXPERIMENTAL)"
|
||||
+ bool "Atheros ath9k ACK timeout estimation algorithm"
|
||||
depends on ATH9K
|
||||
default n
|
||||
---help---
|
||||
4
package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch
Executable file → Normal file
@ -14,8 +14,8 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -2720,6 +2720,16 @@ int ath10k_core_register(struct ath10k *
|
||||
ar->chip_id = chip_id;
|
||||
@@ -3003,6 +3003,16 @@ int ath10k_core_register(struct ath10k *
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
+ /* OpenWrt requires all PHYs to be initialized to create the
|
||||
|
||||
6
package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch
Executable file → Normal file
6
package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -8282,6 +8282,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -8483,6 +8483,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -8571,6 +8586,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -8806,6 +8821,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
+#ifdef CPTCFG_MAC80211_LEDS
|
||||
+ ieee80211_create_tpt_led_trigger(ar->hw,
|
||||
|
||||
2
package/kernel/mac80211/patches/ath/960-0010-ath10k-limit-htt-rx-ring-size.patch
Executable file → Normal file
2
package/kernel/mac80211/patches/ath/960-0010-ath10k-limit-htt-rx-ring-size.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
@@ -238,7 +238,7 @@ enum htt_rx_ring_flags {
|
||||
@@ -226,7 +226,7 @@ enum htt_rx_ring_flags {
|
||||
};
|
||||
|
||||
#define HTT_RX_RING_SIZE_MIN 128
|
||||
|
||||
8
package/kernel/mac80211/patches/ath/960-0011-ath10k-limit-pci-buffer-size.patch
Executable file → Normal file
8
package/kernel/mac80211/patches/ath/960-0011-ath10k-limit-pci-buffer-size.patch
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -142,7 +142,7 @@ static struct ce_attr host_ce_config_wla
|
||||
@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
@ -9,7 +9,7 @@
|
||||
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
||||
},
|
||||
|
||||
@@ -151,7 +151,7 @@ static struct ce_attr host_ce_config_wla
|
||||
@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
@ -18,7 +18,7 @@
|
||||
.recv_cb = ath10k_pci_htc_rx_cb,
|
||||
},
|
||||
|
||||
@@ -178,7 +178,7 @@ static struct ce_attr host_ce_config_wla
|
||||
@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 512,
|
||||
@ -27,7 +27,7 @@
|
||||
.recv_cb = ath10k_pci_htt_rx_cb,
|
||||
},
|
||||
|
||||
@@ -203,7 +203,7 @@ static struct ce_attr host_ce_config_wla
|
||||
@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
|
||||
10
package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
Executable file → Normal file
10
package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
Executable file → Normal file
@ -23,7 +23,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
|
||||
3 files changed, 52 insertions(+), 23 deletions(-)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -2469,7 +2469,7 @@ static void ath10k_peer_assoc_h_vht(stru
|
||||
@@ -2475,7 +2475,7 @@ static void ath10k_peer_assoc_h_vht(stru
|
||||
const u16 *vht_mcs_mask;
|
||||
u8 ampdu_factor;
|
||||
u8 max_nss, vht_mcs;
|
||||
@ -32,7 +32,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
|
||||
|
||||
if (WARN_ON(ath10k_mac_vif_chan(vif, &def)))
|
||||
return;
|
||||
@@ -2529,23 +2529,45 @@ static void ath10k_peer_assoc_h_vht(stru
|
||||
@@ -2535,23 +2535,45 @@ static void ath10k_peer_assoc_h_vht(stru
|
||||
__le16_to_cpu(vht_cap->vht_mcs.tx_highest);
|
||||
arg->peer_vht_rates.tx_mcs_set = ath10k_peer_assoc_h_vht_limit(
|
||||
__le16_to_cpu(vht_cap->vht_mcs.tx_mcs_map), vht_mcs_mask);
|
||||
@ -92,7 +92,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
|
||||
}
|
||||
|
||||
static void ath10k_peer_assoc_h_qos(struct ath10k *ar,
|
||||
@@ -2697,9 +2719,9 @@ static int ath10k_peer_assoc_prepare(str
|
||||
@@ -2703,9 +2725,9 @@ static int ath10k_peer_assoc_prepare(str
|
||||
ath10k_peer_assoc_h_crypto(ar, vif, sta, arg);
|
||||
ath10k_peer_assoc_h_rates(ar, vif, sta, arg);
|
||||
ath10k_peer_assoc_h_ht(ar, vif, sta, arg);
|
||||
@ -105,7 +105,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -7357,12 +7357,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a
|
||||
@@ -7552,12 +7552,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a
|
||||
struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;
|
||||
|
||||
ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg);
|
||||
@ -121,7 +121,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling
|
||||
static int
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
@@ -6357,7 +6357,19 @@ struct wmi_10_2_peer_assoc_complete_cmd
|
||||
@@ -6468,7 +6468,19 @@ struct wmi_10_2_peer_assoc_complete_cmd
|
||||
__le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
|
||||
} __packed;
|
||||
|
||||
|
||||
4
package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch
Executable file → Normal file
4
package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch
Executable file → Normal file
@ -13,7 +13,7 @@ v2: fix trailing whitespace issue and fix some typos within the commit note
|
||||
2 files changed, 8 insertions(+), 10 deletions(-)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -4473,13 +4473,6 @@ static struct ieee80211_sta_vht_cap ath1
|
||||
@@ -4533,13 +4533,6 @@ static struct ieee80211_sta_vht_cap ath1
|
||||
vht_cap.cap |= val;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ v2: fix trailing whitespace issue and fix some typos within the commit note
|
||||
if ((i < ar->num_rf_chains) && (ar->cfg_tx_chainmask & BIT(i)))
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -1677,13 +1677,18 @@ void ath10k_wmi_put_wmi_channel(struct w
|
||||
@@ -1700,13 +1700,18 @@ void ath10k_wmi_put_wmi_channel(struct w
|
||||
flags |= WMI_CHAN_FLAG_HT40_PLUS;
|
||||
if (arg->chan_radar)
|
||||
flags |= WMI_CHAN_FLAG_DFS;
|
||||
|
||||
72
package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
Executable file → Normal file
72
package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
Executable file → Normal file
@ -85,7 +85,7 @@ v13:
|
||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
|
||||
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
@@ -69,6 +69,16 @@ config ATH10K_DEBUGFS
|
||||
@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS
|
||||
|
||||
If unsure, say Y to make it easier to debug problems.
|
||||
|
||||
@ -124,7 +124,7 @@ v13:
|
||||
WCN36XX=
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -34,6 +34,7 @@
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "testmode.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "coredump.h"
|
||||
@ -132,47 +132,47 @@ v13:
|
||||
|
||||
unsigned int ath10k_debug_mask;
|
||||
static unsigned int ath10k_cryptmode_param;
|
||||
@@ -64,6 +65,7 @@ static const struct ath10k_hw_params ath
|
||||
.id = QCA988X_HW_2_0_VERSION,
|
||||
@@ -55,6 +56,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca988x hw2.0",
|
||||
+ .led_pin = 1,
|
||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -129,6 +131,7 @@ static const struct ath10k_hw_params ath
|
||||
.id = QCA9887_HW_1_0_VERSION,
|
||||
@@ -123,6 +125,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9887 hw1.0",
|
||||
+ .led_pin = 1,
|
||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -293,6 +296,7 @@ static const struct ath10k_hw_params ath
|
||||
.id = QCA99X0_HW_2_0_DEV_VERSION,
|
||||
@@ -297,6 +300,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
+ .led_pin = 17,
|
||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.otp_exe_param = 0x00000700,
|
||||
@@ -331,6 +335,7 @@ static const struct ath10k_hw_params ath
|
||||
.id = QCA9984_HW_1_0_DEV_VERSION,
|
||||
@@ -337,6 +341,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
+ .led_pin = 17,
|
||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -374,6 +379,7 @@ static const struct ath10k_hw_params ath
|
||||
.id = QCA9888_HW_2_0_DEV_VERSION,
|
||||
@@ -384,6 +389,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
+ .led_pin = 17,
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -2441,6 +2447,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
@@ -2720,6 +2726,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
if (status)
|
||||
goto err_hif_stop;
|
||||
|
||||
@ -183,7 +183,7 @@ v13:
|
||||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -2695,9 +2705,18 @@ static void ath10k_core_register_work(st
|
||||
@@ -2976,9 +2986,18 @@ static void ath10k_core_register_work(st
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ v13:
|
||||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -2741,6 +2760,8 @@ void ath10k_core_unregister(struct ath10
|
||||
@@ -3024,6 +3043,8 @@ void ath10k_core_unregister(struct ath10
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
@ -213,7 +213,7 @@ v13:
|
||||
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/uuid.h>
|
||||
#include <linux/time.h>
|
||||
@ -221,15 +221,7 @@ v13:
|
||||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -908,7 +909,6 @@ struct ath10k {
|
||||
u32 low_5ghz_chan;
|
||||
u32 high_5ghz_chan;
|
||||
bool ani_enabled;
|
||||
-
|
||||
bool p2p;
|
||||
|
||||
struct {
|
||||
@@ -1099,6 +1099,13 @@ struct ath10k {
|
||||
@@ -1150,6 +1151,13 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
@ -245,7 +237,7 @@ v13:
|
||||
u32 fw_warm_reset_counter;
|
||||
--- a/drivers/net/wireless/ath/ath10k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/hw.h
|
||||
@@ -504,6 +504,7 @@ struct ath10k_hw_params {
|
||||
@@ -511,6 +511,7 @@ struct ath10k_hw_params {
|
||||
const char *name;
|
||||
u32 patch_load_addr;
|
||||
int uart_pin;
|
||||
@ -405,7 +397,7 @@ v13:
|
||||
+#endif /* _LEDS_H_ */
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -33,6 +33,7 @@
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "wmi-tlv.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "wow.h"
|
||||
@ -416,9 +408,9 @@ v13:
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
@@ -216,7 +216,10 @@ struct wmi_ops {
|
||||
struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value);
|
||||
struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar,
|
||||
u32 param);
|
||||
struct sk_buff *(*gen_bb_timing)
|
||||
(struct ath10k *ar,
|
||||
const struct wmi_bb_timing_cfg_arg *arg);
|
||||
+ struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num,
|
||||
+ u32 input, u32 pull_type, u32 intr_mode);
|
||||
|
||||
@ -426,7 +418,7 @@ v13:
|
||||
};
|
||||
|
||||
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
|
||||
@@ -1054,6 +1057,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
|
||||
@@ -1080,6 +1083,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
|
||||
return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
|
||||
}
|
||||
|
||||
@ -464,7 +456,7 @@ v13:
|
||||
{
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
@@ -3976,6 +3976,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
@@ -4309,6 +4309,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
||||
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
||||
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
|
||||
@ -475,7 +467,7 @@ v13:
|
||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -7177,6 +7177,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||
@@ -7372,6 +7372,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||
return skb;
|
||||
}
|
||||
|
||||
@ -525,7 +517,7 @@ v13:
|
||||
static struct sk_buff *
|
||||
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
||||
enum wmi_sta_ps_mode psmode)
|
||||
@@ -8788,6 +8831,9 @@ static const struct wmi_ops wmi_ops = {
|
||||
@@ -9004,6 +9047,9 @@ static const struct wmi_ops wmi_ops = {
|
||||
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
@ -535,7 +527,7 @@ v13:
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -8858,6 +8904,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||
@@ -9074,6 +9120,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
@ -544,7 +536,7 @@ v13:
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -8929,6 +8977,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||
@@ -9146,6 +9194,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
@ -553,16 +545,16 @@ v13:
|
||||
/* .gen_pdev_enable_adaptive_cca not implemented */
|
||||
};
|
||||
|
||||
@@ -8999,6 +9049,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||
.gen_pdev_enable_adaptive_cca =
|
||||
@@ -9217,6 +9267,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
||||
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
||||
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
||||
+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
|
||||
+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -9078,6 +9130,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||
@@ -9297,6 +9349,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
||||
@ -573,7 +565,7 @@ v13:
|
||||
int ath10k_wmi_attach(struct ath10k *ar)
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
@@ -2942,6 +2942,41 @@ enum wmi_10_4_feature_mask {
|
||||
@@ -2998,6 +2998,41 @@ enum wmi_10_4_feature_mask {
|
||||
|
||||
};
|
||||
|
||||
|
||||
8
package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch
Executable file → Normal file
8
package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch
Executable file → Normal file
@ -16,9 +16,9 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -1144,6 +1144,10 @@ struct ath10k {
|
||||
struct ath10k_radar_found_info last_radar_info;
|
||||
@@ -1198,6 +1198,10 @@ struct ath10k {
|
||||
struct work_struct radar_confirmation_work;
|
||||
struct ath10k_bus_params bus_param;
|
||||
|
||||
+#ifdef CPTCFG_MAC80211_LEDS
|
||||
+ const char *led_default_trigger;
|
||||
@ -42,8 +42,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -8603,7 +8603,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
@@ -8838,7 +8838,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
- ieee80211_create_tpt_led_trigger(ar->hw,
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
|
||||
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||
Date: Mon, 30 Jul 2018 17:31:41 +0200
|
||||
Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit
|
||||
|
||||
Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
|
||||
the RX and TX path. These filtered channel can in theory still be used by
|
||||
the hardware but the signal strength is reduced so much that it makes no
|
||||
sense.
|
||||
|
||||
There is already a DT property to limit the available channels but ath10k
|
||||
has to manually call this functionality to limit the currrently set wiphy
|
||||
channels further.
|
||||
|
||||
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||
|
||||
Forwarded: https://patchwork.kernel.org/patch/10549245/
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "mac.h"
|
||||
|
||||
+#include <net/cfg80211.h>
|
||||
#include <net/mac80211.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/acpi.h>
|
||||
@@ -8390,6 +8391,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
|
||||
}
|
||||
|
||||
+ wiphy_read_of_freq_limits(ar->hw->wiphy);
|
||||
ath10k_mac_setup_ht_vht_cap(ar);
|
||||
|
||||
ar->hw->wiphy->interface_modes =
|
||||
@ -1,89 +0,0 @@
|
||||
From: Sriram R <srirrama@codeaurora.org>
|
||||
Date: Mon, 10 Sep 2018 11:09:40 +0530
|
||||
Subject: [PATCH] ath10k: add support for configuring management packet rate
|
||||
|
||||
By default the firmware uses 1Mbps and 6Mbps rate for management packets
|
||||
in 2G and 5G bands respectively. But when the user selects different
|
||||
basic rates from the userspace, we need to send the management
|
||||
packets at the lowest basic rate selected by the user.
|
||||
|
||||
This change makes use of WMI_VDEV_PARAM_MGMT_RATE param for configuring the
|
||||
management packets rate to the firmware.
|
||||
|
||||
Chipsets Tested : QCA988X, QCA9887, QCA9984
|
||||
FW Tested : 10.2.4-1.0-41, 10.4-3.6.104
|
||||
|
||||
Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
|
||||
Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f279294e9ee22a8f306fdc8e4181cf555e6f0f70
|
||||
---
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -158,6 +158,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int ath10k_mac_get_rate_hw_value(int bitrate)
|
||||
+{
|
||||
+ int i;
|
||||
+ u8 hw_value_prefix = 0;
|
||||
+
|
||||
+ if (ath10k_mac_bitrate_is_cck(bitrate))
|
||||
+ hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6;
|
||||
+
|
||||
+ for (i = 0; i < sizeof(ath10k_rates); i++) {
|
||||
+ if (ath10k_rates[i].bitrate == bitrate)
|
||||
+ return hw_value_prefix | ath10k_rates[i].hw_value;
|
||||
+ }
|
||||
+
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)
|
||||
{
|
||||
switch ((mcs_map >> (2 * nss)) & 0x3) {
|
||||
@@ -5468,9 +5484,10 @@ static void ath10k_bss_info_changed(stru
|
||||
struct cfg80211_chan_def def;
|
||||
u32 vdev_param, pdev_param, slottime, preamble;
|
||||
u16 bitrate, hw_value;
|
||||
- u8 rate;
|
||||
- int rateidx, ret = 0;
|
||||
+ u8 rate, basic_rate_idx;
|
||||
+ int rateidx, ret = 0, hw_rate_code;
|
||||
enum nl80211_band band;
|
||||
+ const struct ieee80211_supported_band *sband;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
@@ -5676,6 +5693,30 @@ static void ath10k_bss_info_changed(stru
|
||||
arvif->vdev_id, ret);
|
||||
}
|
||||
|
||||
+ if (changed & BSS_CHANGED_BASIC_RATES) {
|
||||
+ if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) {
|
||||
+ mutex_unlock(&ar->conf_mutex);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ sband = ar->hw->wiphy->bands[def.chan->band];
|
||||
+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1;
|
||||
+ bitrate = sband->bitrates[basic_rate_idx].bitrate;
|
||||
+
|
||||
+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate);
|
||||
+ if (hw_rate_code < 0) {
|
||||
+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate);
|
||||
+ mutex_unlock(&ar->conf_mutex);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ vdev_param = ar->wmi.vdev_param->mgmt_rate;
|
||||
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
+ hw_rate_code);
|
||||
+ if (ret)
|
||||
+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret);
|
||||
+ }
|
||||
+
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
}
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
From: Sriram R <srirrama@codeaurora.org>
|
||||
Date: Wed, 3 Oct 2018 08:43:50 +0530
|
||||
Subject: [PATCH] ath10k: fix possible out of bound access of ath10k_rates array
|
||||
|
||||
While using 'ath10k_mac_get_rate_hw_value()' to obtain the hw value
|
||||
from the passed bitrate, there is a chance of out of bound array access
|
||||
when wrong bitrate is passed. This is fixed by comparing the bitrates
|
||||
within the correct size of the ath10k_rates array.
|
||||
|
||||
Fixes commit f279294e9ee2 ("ath10k: add support for configuring management
|
||||
packet rate"). Also correction made to some indents used in the above commit.
|
||||
|
||||
Signed-off-by: Sriram R <srirrama@codeaurora.org>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
|
||||
Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e141eea7dd8525dd1ef7a925459e455b4d307f
|
||||
---
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -166,7 +166,7 @@ static int ath10k_mac_get_rate_hw_value(
|
||||
if (ath10k_mac_bitrate_is_cck(bitrate))
|
||||
hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6;
|
||||
|
||||
- for (i = 0; i < sizeof(ath10k_rates); i++) {
|
||||
+ for (i = 0; i < ARRAY_SIZE(ath10k_rates); i++) {
|
||||
if (ath10k_rates[i].bitrate == bitrate)
|
||||
return hw_value_prefix | ath10k_rates[i].hw_value;
|
||||
}
|
||||
@@ -5699,22 +5699,22 @@ static void ath10k_bss_info_changed(stru
|
||||
return;
|
||||
}
|
||||
|
||||
- sband = ar->hw->wiphy->bands[def.chan->band];
|
||||
- basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1;
|
||||
- bitrate = sband->bitrates[basic_rate_idx].bitrate;
|
||||
-
|
||||
- hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate);
|
||||
- if (hw_rate_code < 0) {
|
||||
- ath10k_warn(ar, "bitrate not supported %d\n", bitrate);
|
||||
- mutex_unlock(&ar->conf_mutex);
|
||||
- return;
|
||||
- }
|
||||
+ sband = ar->hw->wiphy->bands[def.chan->band];
|
||||
+ basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1;
|
||||
+ bitrate = sband->bitrates[basic_rate_idx].bitrate;
|
||||
+
|
||||
+ hw_rate_code = ath10k_mac_get_rate_hw_value(bitrate);
|
||||
+ if (hw_rate_code < 0) {
|
||||
+ ath10k_warn(ar, "bitrate not supported %d\n", bitrate);
|
||||
+ mutex_unlock(&ar->conf_mutex);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- vdev_param = ar->wmi.vdev_param->mgmt_rate;
|
||||
- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
- hw_rate_code);
|
||||
- if (ret)
|
||||
- ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret);
|
||||
+ vdev_param = ar->wmi.vdev_param->mgmt_rate;
|
||||
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
+ hw_rate_code);
|
||||
+ if (ret)
|
||||
+ ath10k_warn(ar, "failed to set mgmt tx rate %d\n", ret);
|
||||
}
|
||||
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
6
package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
Executable file → Normal file
6
package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
Executable file → Normal file
@ -17,7 +17,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -5484,8 +5484,8 @@ static void ath10k_bss_info_changed(stru
|
||||
@@ -5604,8 +5604,8 @@ static void ath10k_bss_info_changed(stru
|
||||
struct cfg80211_chan_def def;
|
||||
u32 vdev_param, pdev_param, slottime, preamble;
|
||||
u16 bitrate, hw_value;
|
||||
@ -28,9 +28,9 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
|
||||
enum nl80211_band band;
|
||||
const struct ieee80211_supported_band *sband;
|
||||
|
||||
@@ -5658,7 +5658,11 @@ static void ath10k_bss_info_changed(stru
|
||||
@@ -5792,7 +5792,11 @@ static void ath10k_bss_info_changed(stru
|
||||
if (changed & BSS_CHANGED_MCAST_RATE &&
|
||||
!WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
|
||||
!ath10k_mac_vif_chan(arvif->vif, &def)) {
|
||||
band = def.chan->band;
|
||||
- rateidx = vif->bss_conf.mcast_rate[band] - 1;
|
||||
+ mcast_rate = vif->bss_conf.mcast_rate[band];
|
||||
|
||||
@ -20,7 +20,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -1020,7 +1020,7 @@ static int ath10k_monitor_vdev_start(str
|
||||
@@ -1009,7 +1009,7 @@ static int ath10k_monitor_vdev_start(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = channel->max_power * 2;
|
||||
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
||||
@ -29,7 +29,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/
|
||||
|
||||
reinit_completion(&ar->vdev_setup_done);
|
||||
|
||||
@@ -1462,7 +1462,7 @@ static int ath10k_vdev_start_restart(str
|
||||
@@ -1451,7 +1451,7 @@ static int ath10k_vdev_start_restart(str
|
||||
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;
|
||||
@ -38,7 +38,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3139,7 +3139,7 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3128,7 +3128,7 @@ static int ath10k_update_channel_list(st
|
||||
ch->min_power = 0;
|
||||
ch->max_power = channel->max_power * 2;
|
||||
ch->max_reg_power = channel->max_reg_power * 2;
|
||||
|
||||
@ -28,8 +28,8 @@ Forwarded: no
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -988,6 +988,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
return 0;
|
||||
@@ -977,6 +977,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
return ar->last_wmi_vdev_start_status;
|
||||
}
|
||||
|
||||
+static u32 ath10k_get_max_antenna_gain(struct ath10k *ar,
|
||||
@ -69,7 +69,7 @@ Forwarded: no
|
||||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1020,7 +1054,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
@@ -1009,7 +1043,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = channel->max_power * 2;
|
||||
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
||||
@ -79,7 +79,7 @@ Forwarded: no
|
||||
|
||||
reinit_completion(&ar->vdev_setup_done);
|
||||
|
||||
@@ -1462,7 +1497,8 @@ static int ath10k_vdev_start_restart(str
|
||||
@@ -1451,7 +1486,8 @@ static int ath10k_vdev_start_restart(str
|
||||
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;
|
||||
@ -89,7 +89,7 @@ Forwarded: no
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3139,7 +3175,8 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3128,7 +3164,8 @@ static int ath10k_update_channel_list(st
|
||||
ch->min_power = 0;
|
||||
ch->max_power = channel->max_power * 2;
|
||||
ch->max_reg_power = channel->max_reg_power * 2;
|
||||
|
||||
3
package/kernel/mac80211/patches/brcm/040-brcmutil_option.patch
Executable file → Normal file
3
package/kernel/mac80211/patches/brcm/040-brcmutil_option.patch
Executable file → Normal file
@ -1,6 +1,7 @@
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -1,5 +1,5 @@
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
config BRCMUTIL
|
||||
- tristate
|
||||
+ tristate "Broadcom 802.11 driver utility functions"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
From b07e1ae2ce53a60af67009ef199603a588003e07 Mon Sep 17 00:00:00 2001
|
||||
From: Weitao Hou <houweitaoo@gmail.com>
|
||||
Date: Mon, 20 May 2019 20:28:25 +0800
|
||||
Subject: [PATCH] brcmfmac: fix typos in code comments
|
||||
|
||||
fix lengh to length
|
||||
|
||||
Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c
|
||||
@@ -303,7 +303,7 @@ brcmf_create_bsscfg(s32 bsscfgidx, char
|
||||
return brcmf_create_iovar(name, data, datalen, buf, buflen);
|
||||
|
||||
prefixlen = strlen(prefix);
|
||||
- namelen = strlen(name) + 1; /* lengh of iovar name + null */
|
||||
+ namelen = strlen(name) + 1; /* length of iovar name + null */
|
||||
iolen = prefixlen + namelen + sizeof(bsscfgidx_le) + datalen;
|
||||
|
||||
if (buflen < iolen) {
|
||||
@ -0,0 +1,26 @@
|
||||
From bbfab331e3abd9fa8767eea6bf5c4684cdd4b934 Mon Sep 17 00:00:00 2001
|
||||
From: Neo Jou <neojou@gmail.com>
|
||||
Date: Tue, 21 May 2019 17:12:20 +0800
|
||||
Subject: [PATCH] brcmfmac: use strlcpy() instead of strcpy()
|
||||
|
||||
The function strcpy() is inherently not safe. Though the function
|
||||
works without problems here, it would be better to use other safer
|
||||
function, e.g. strlcpy(), to replace strcpy() still.
|
||||
|
||||
Signed-off-by: Neo Jou <neojou@gmail.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -258,7 +258,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i
|
||||
|
||||
/* query for 'ver' to get version info from firmware */
|
||||
memset(buf, 0, sizeof(buf));
|
||||
- strcpy(buf, "ver");
|
||||
+ strlcpy(buf, "ver", sizeof(buf));
|
||||
err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf));
|
||||
if (err < 0) {
|
||||
bphy_err(drvr, "Retrieving version information failed, %d\n",
|
||||
@ -0,0 +1,56 @@
|
||||
From f491645f039420fb7e14283e21b90772571c807c Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 10:45:30 +0200
|
||||
Subject: [PATCH] brcmfmac: add 160MHz in chandef_to_chanspec()
|
||||
|
||||
The function chandef_to_chanspec() was not handling 160MHz bandwidth
|
||||
resulting in wrong encoding of the channel. That resulting in firmware
|
||||
rejecting the provided channel specification.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 21 ++++++++++++++++++-
|
||||
1 file changed, 20 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -276,8 +276,26 @@ static u16 chandef_to_chanspec(struct br
|
||||
else
|
||||
ch_inf.sb = BRCMU_CHAN_SB_UU;
|
||||
break;
|
||||
- case NL80211_CHAN_WIDTH_80P80:
|
||||
case NL80211_CHAN_WIDTH_160:
|
||||
+ ch_inf.bw = BRCMU_CHAN_BW_160;
|
||||
+ if (primary_offset == -70)
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_LLL;
|
||||
+ else if (primary_offset == -50)
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_LLU;
|
||||
+ else if (primary_offset == -30)
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_LUL;
|
||||
+ else if (primary_offset == -10)
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_LUU;
|
||||
+ else if (primary_offset == 10)
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_ULL;
|
||||
+ else if (primary_offset == 30)
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_ULU;
|
||||
+ else if (primary_offset == 50)
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_UUL;
|
||||
+ else
|
||||
+ ch_inf.sb = BRCMU_CHAN_SB_UUU;
|
||||
+ break;
|
||||
+ case NL80211_CHAN_WIDTH_80P80:
|
||||
case NL80211_CHAN_WIDTH_5:
|
||||
case NL80211_CHAN_WIDTH_10:
|
||||
default:
|
||||
@@ -296,6 +314,7 @@ static u16 chandef_to_chanspec(struct br
|
||||
}
|
||||
d11inf->encchspec(&ch_inf);
|
||||
|
||||
+ brcmf_dbg(TRACE, "chanspec: 0x%x\n", ch_inf.chspec);
|
||||
return ch_inf.chspec;
|
||||
}
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
From 011a56a3336a5de9c3152c169cd52ff79b8c3f89 Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 10:45:31 +0200
|
||||
Subject: [PATCH] brcmfmac: enable DFS_OFFLOAD extended feature if supported
|
||||
|
||||
If the firmware supports 802.11h and the device can operate in 5GHz
|
||||
band we can enable DFS_OFFLOAD extended feature.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 +++++
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 +
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +++-
|
||||
3 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -6733,6 +6733,11 @@ static int brcmf_setup_wiphy(struct wiph
|
||||
}
|
||||
}
|
||||
|
||||
+ if (wiphy->bands[NL80211_BAND_5GHZ] &&
|
||||
+ brcmf_feat_is_enabled(ifp, BRCMF_FEAT_DOT11H))
|
||||
+ wiphy_ext_feature_set(wiphy,
|
||||
+ NL80211_EXT_FEATURE_DFS_OFFLOAD);
|
||||
+
|
||||
wiphy_read_of_freq_limits(wiphy);
|
||||
|
||||
return 0;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
|
||||
@@ -39,6 +39,7 @@ static const struct brcmf_feat_fwcap brc
|
||||
{ BRCMF_FEAT_P2P, "p2p" },
|
||||
{ BRCMF_FEAT_MONITOR, "monitor" },
|
||||
{ BRCMF_FEAT_MONITOR_FMT_RADIOTAP, "rtap" },
|
||||
+ { BRCMF_FEAT_DOT11H, "802.11h" }
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
|
||||
@@ -25,6 +25,7 @@
|
||||
* MONITOR: firmware can pass monitor packets to host.
|
||||
* MONITOR_FMT_RADIOTAP: firmware provides monitor packets with radiotap header
|
||||
* MONITOR_FMT_HW_RX_HDR: firmware provides monitor packets with hw/ucode header
|
||||
+ * DOT11H: firmware supports 802.11h
|
||||
*/
|
||||
#define BRCMF_FEAT_LIST \
|
||||
BRCMF_FEAT_DEF(MBSS) \
|
||||
@@ -43,7 +44,8 @@
|
||||
BRCMF_FEAT_DEF(FWSUP) \
|
||||
BRCMF_FEAT_DEF(MONITOR) \
|
||||
BRCMF_FEAT_DEF(MONITOR_FMT_RADIOTAP) \
|
||||
- BRCMF_FEAT_DEF(MONITOR_FMT_HW_RX_HDR)
|
||||
+ BRCMF_FEAT_DEF(MONITOR_FMT_HW_RX_HDR) \
|
||||
+ BRCMF_FEAT_DEF(DOT11H)
|
||||
|
||||
/*
|
||||
* Quirks:
|
||||
@ -0,0 +1,34 @@
|
||||
From fa9050927fa885410055ee03c948c2252693d296 Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 10:45:32 +0200
|
||||
Subject: [PATCH] brcmfmac: allow 160MHz in custom regulatory rules
|
||||
|
||||
The driver has custom regulatory rules which had maximum bandwidth
|
||||
for 5GHz channels set to 80MHz. As a consequence the driver can
|
||||
not use 160MHz in AP mode even when the device supports it. So
|
||||
relax the rules allowing 160MHz. After wiphy_register() the channel
|
||||
flags are updated according what the device actually supports.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -189,9 +189,9 @@ static const struct ieee80211_regdomain
|
||||
*/
|
||||
REG_RULE(2484-10, 2484+10, 20, 6, 20, 0),
|
||||
/* IEEE 802.11a, channel 36..64 */
|
||||
- REG_RULE(5150-10, 5350+10, 80, 6, 20, 0),
|
||||
+ REG_RULE(5150-10, 5350+10, 160, 6, 20, 0),
|
||||
/* IEEE 802.11a, channel 100..165 */
|
||||
- REG_RULE(5470-10, 5850+10, 80, 6, 20, 0), }
|
||||
+ REG_RULE(5470-10, 5850+10, 160, 6, 20, 0), }
|
||||
};
|
||||
|
||||
/* Note: brcmf_cipher_suites is an array of int defining which cipher suites
|
||||
@ -0,0 +1,168 @@
|
||||
From a84a60ccdd65278485fb495f468a5ab91a75c649 Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 11:05:06 +0200
|
||||
Subject: [PATCH] Revert "brcmfmac: fix NULL pointer derefence during USB
|
||||
disconnect"
|
||||
|
||||
This reverts commit 5cdb0ef6144f47440850553579aa923c20a63f23. Subsequent
|
||||
changes make rework the driver code fixing the issue differently.
|
||||
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 11 ++---------
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/bcdc.h | 6 ++----
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/core.c | 4 +---
|
||||
.../broadcom/brcm80211/brcmfmac/fwsignal.c | 16 ++++------------
|
||||
.../broadcom/brcm80211/brcmfmac/fwsignal.h | 3 +--
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/proto.c | 10 ++--------
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/proto.h | 3 +--
|
||||
7 files changed, 13 insertions(+), 40 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
|
||||
@@ -479,18 +479,11 @@ fail:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
-void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr)
|
||||
-{
|
||||
- struct brcmf_bcdc *bcdc = drvr->proto->pd;
|
||||
-
|
||||
- brcmf_fws_detach_pre_delif(bcdc->fws);
|
||||
-}
|
||||
-
|
||||
-void brcmf_proto_bcdc_detach_post_delif(struct brcmf_pub *drvr)
|
||||
+void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr)
|
||||
{
|
||||
struct brcmf_bcdc *bcdc = drvr->proto->pd;
|
||||
|
||||
drvr->proto->pd = NULL;
|
||||
- brcmf_fws_detach_post_delif(bcdc->fws);
|
||||
+ brcmf_fws_detach(bcdc->fws);
|
||||
kfree(bcdc);
|
||||
}
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.h
|
||||
@@ -7,16 +7,14 @@
|
||||
|
||||
#ifdef CPTCFG_BRCMFMAC_PROTO_BCDC
|
||||
int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr);
|
||||
-void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr);
|
||||
-void brcmf_proto_bcdc_detach_post_delif(struct brcmf_pub *drvr);
|
||||
+void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr);
|
||||
void brcmf_proto_bcdc_txflowblock(struct device *dev, bool state);
|
||||
void brcmf_proto_bcdc_txcomplete(struct device *dev, struct sk_buff *txp,
|
||||
bool success);
|
||||
struct brcmf_fws_info *drvr_to_fws(struct brcmf_pub *drvr);
|
||||
#else
|
||||
static inline int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) { return 0; }
|
||||
-static void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr) {};
|
||||
-static inline void brcmf_proto_bcdc_detach_post_delif(struct brcmf_pub *drvr) {}
|
||||
+static inline void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr) {}
|
||||
#endif
|
||||
|
||||
#endif /* BRCMFMAC_BCDC_H */
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1335,8 +1335,6 @@ void brcmf_detach(struct device *dev)
|
||||
|
||||
brcmf_bus_change_state(bus_if, BRCMF_BUS_DOWN);
|
||||
|
||||
- brcmf_proto_detach_pre_delif(drvr);
|
||||
-
|
||||
/* make sure primary interface removed last */
|
||||
for (i = BRCMF_MAX_IFS-1; i > -1; i--)
|
||||
brcmf_remove_interface(drvr->iflist[i], false);
|
||||
@@ -1346,7 +1344,7 @@ void brcmf_detach(struct device *dev)
|
||||
|
||||
brcmf_bus_stop(drvr->bus_if);
|
||||
|
||||
- brcmf_proto_detach_post_delif(drvr);
|
||||
+ brcmf_proto_detach(drvr);
|
||||
|
||||
bus_if->drvr = NULL;
|
||||
wiphy_free(drvr->wiphy);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
@@ -2432,25 +2432,17 @@ struct brcmf_fws_info *brcmf_fws_attach(
|
||||
return fws;
|
||||
|
||||
fail:
|
||||
- brcmf_fws_detach_pre_delif(fws);
|
||||
- brcmf_fws_detach_post_delif(fws);
|
||||
+ brcmf_fws_detach(fws);
|
||||
return ERR_PTR(rc);
|
||||
}
|
||||
|
||||
-void brcmf_fws_detach_pre_delif(struct brcmf_fws_info *fws)
|
||||
+void brcmf_fws_detach(struct brcmf_fws_info *fws)
|
||||
{
|
||||
if (!fws)
|
||||
return;
|
||||
- if (fws->fws_wq) {
|
||||
- destroy_workqueue(fws->fws_wq);
|
||||
- fws->fws_wq = NULL;
|
||||
- }
|
||||
-}
|
||||
|
||||
-void brcmf_fws_detach_post_delif(struct brcmf_fws_info *fws)
|
||||
-{
|
||||
- if (!fws)
|
||||
- return;
|
||||
+ if (fws->fws_wq)
|
||||
+ destroy_workqueue(fws->fws_wq);
|
||||
|
||||
/* cleanup */
|
||||
brcmf_fws_lock(fws);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h
|
||||
@@ -7,8 +7,7 @@
|
||||
#define FWSIGNAL_H_
|
||||
|
||||
struct brcmf_fws_info *brcmf_fws_attach(struct brcmf_pub *drvr);
|
||||
-void brcmf_fws_detach_pre_delif(struct brcmf_fws_info *fws);
|
||||
-void brcmf_fws_detach_post_delif(struct brcmf_fws_info *fws);
|
||||
+void brcmf_fws_detach(struct brcmf_fws_info *fws);
|
||||
void brcmf_fws_debugfs_create(struct brcmf_pub *drvr);
|
||||
bool brcmf_fws_queue_skbs(struct brcmf_fws_info *fws);
|
||||
bool brcmf_fws_fc_active(struct brcmf_fws_info *fws);
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c
|
||||
@@ -56,22 +56,16 @@ fail:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
-void brcmf_proto_detach_post_delif(struct brcmf_pub *drvr)
|
||||
+void brcmf_proto_detach(struct brcmf_pub *drvr)
|
||||
{
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
if (drvr->proto) {
|
||||
if (drvr->bus_if->proto_type == BRCMF_PROTO_BCDC)
|
||||
- brcmf_proto_bcdc_detach_post_delif(drvr);
|
||||
+ brcmf_proto_bcdc_detach(drvr);
|
||||
else if (drvr->bus_if->proto_type == BRCMF_PROTO_MSGBUF)
|
||||
brcmf_proto_msgbuf_detach(drvr);
|
||||
kfree(drvr->proto);
|
||||
drvr->proto = NULL;
|
||||
}
|
||||
}
|
||||
-
|
||||
-void brcmf_proto_detach_pre_delif(struct brcmf_pub *drvr)
|
||||
-{
|
||||
- if (drvr->proto && drvr->bus_if->proto_type == BRCMF_PROTO_BCDC)
|
||||
- brcmf_proto_bcdc_detach_pre_delif(drvr);
|
||||
-}
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h
|
||||
@@ -43,8 +43,7 @@ struct brcmf_proto {
|
||||
|
||||
|
||||
int brcmf_proto_attach(struct brcmf_pub *drvr);
|
||||
-void brcmf_proto_detach_pre_delif(struct brcmf_pub *drvr);
|
||||
-void brcmf_proto_detach_post_delif(struct brcmf_pub *drvr);
|
||||
+void brcmf_proto_detach(struct brcmf_pub *drvr);
|
||||
|
||||
static inline int brcmf_proto_hdrpull(struct brcmf_pub *drvr, bool do_fws,
|
||||
struct sk_buff *skb,
|
||||
@ -0,0 +1,67 @@
|
||||
From 14fcfd1cc0c05ea58f47dd693fdd13f25dfe995e Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 11:05:07 +0200
|
||||
Subject: [PATCH] brcmfmac: change the order of things in brcmf_detach()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When brcmf_detach() from the bus layer upon rmmod we can no longer
|
||||
communicate. Hence we will set the bus state to DOWN and cleanup
|
||||
the event and protocol layer. The network interfaces need to be
|
||||
deleted before brcmf_cfg80211_detach() because the latter does the
|
||||
wiphy_unregister() which issues a warning if there are still network
|
||||
devices linked to the wiphy instance.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Tested-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/core.c | 27 ++++++++++---------
|
||||
1 file changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1328,25 +1328,26 @@ void brcmf_detach(struct device *dev)
|
||||
unregister_inet6addr_notifier(&drvr->inet6addr_notifier);
|
||||
#endif
|
||||
|
||||
- /* stop firmware event handling */
|
||||
- brcmf_fweh_detach(drvr);
|
||||
- if (drvr->config)
|
||||
- brcmf_p2p_detach(&drvr->config->p2p);
|
||||
-
|
||||
brcmf_bus_change_state(bus_if, BRCMF_BUS_DOWN);
|
||||
-
|
||||
- /* make sure primary interface removed last */
|
||||
- for (i = BRCMF_MAX_IFS-1; i > -1; i--)
|
||||
- brcmf_remove_interface(drvr->iflist[i], false);
|
||||
-
|
||||
- brcmf_cfg80211_detach(drvr->config);
|
||||
- drvr->config = NULL;
|
||||
-
|
||||
brcmf_bus_stop(drvr->bus_if);
|
||||
|
||||
+ brcmf_fweh_detach(drvr);
|
||||
brcmf_proto_detach(drvr);
|
||||
|
||||
+ /* make sure primary interface removed last */
|
||||
+ for (i = BRCMF_MAX_IFS - 1; i > -1; i--) {
|
||||
+ if (drvr->iflist[i])
|
||||
+ brcmf_del_if(drvr, drvr->iflist[i]->bsscfgidx, false);
|
||||
+ }
|
||||
+
|
||||
+ if (drvr->config) {
|
||||
+ brcmf_p2p_detach(&drvr->config->p2p);
|
||||
+ brcmf_cfg80211_detach(drvr->config);
|
||||
+ drvr->config = NULL;
|
||||
+ }
|
||||
+
|
||||
bus_if->drvr = NULL;
|
||||
+
|
||||
wiphy_free(drvr->wiphy);
|
||||
}
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
From c613085b74941024194e41b200601b9aa6ee388f Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 11:05:08 +0200
|
||||
Subject: [PATCH] brcmfmac: avoid firmware command in brcmf_netdev_open() when
|
||||
bus is down
|
||||
|
||||
No point in sending a firmware command when bus is down so make it
|
||||
conditional checking the state.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -579,7 +579,8 @@ static int brcmf_netdev_stop(struct net_
|
||||
|
||||
brcmf_cfg80211_down(ndev);
|
||||
|
||||
- brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
|
||||
+ if (ifp->drvr->bus_if->state == BRCMF_BUS_UP)
|
||||
+ brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
|
||||
|
||||
brcmf_net_setcarrier(ifp, false);
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
From c33330ac06fe863289643e7a13ecdb6a2502dad7 Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 11:05:09 +0200
|
||||
Subject: [PATCH] brcmfmac: clear events in brcmf_fweh_detach() will always
|
||||
fail
|
||||
|
||||
Clearing firmware events in brcmf_fweh_detach() is always failing
|
||||
because it is called only upon driver remove and communication
|
||||
with firmware is no longer possible.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
|
||||
@@ -303,16 +303,7 @@ void brcmf_fweh_attach(struct brcmf_pub
|
||||
void brcmf_fweh_detach(struct brcmf_pub *drvr)
|
||||
{
|
||||
struct brcmf_fweh_info *fweh = &drvr->fweh;
|
||||
- struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0);
|
||||
- s8 eventmask[BRCMF_EVENTING_MASK_LEN];
|
||||
|
||||
- if (ifp) {
|
||||
- /* clear all events */
|
||||
- memset(eventmask, 0, BRCMF_EVENTING_MASK_LEN);
|
||||
- (void)brcmf_fil_iovar_data_set(ifp, "event_msgs",
|
||||
- eventmask,
|
||||
- BRCMF_EVENTING_MASK_LEN);
|
||||
- }
|
||||
/* cancel the worker */
|
||||
cancel_work_sync(&fweh->event_work);
|
||||
WARN_ON(!list_empty(&fweh->event_q));
|
||||
@ -0,0 +1,79 @@
|
||||
From 1ac11ae949dd883854f4523ef8e3a32aabfd6256 Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 11:05:10 +0200
|
||||
Subject: [PATCH] brcmfmac: avoid firmware commands when bus is down
|
||||
|
||||
Upon rmmod a few attempts are made to inform firmware, but there is
|
||||
no point as the bus is down and these will fail. Avoid them to keep
|
||||
the logs clean.
|
||||
|
||||
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 23 +++++++++++--------
|
||||
1 file changed, 13 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -1286,17 +1286,21 @@ static void brcmf_link_down(struct brcmf
|
||||
{
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(vif->wdev.wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
+ bool bus_up = drvr->bus_if->state == BRCMF_BUS_UP;
|
||||
s32 err = 0;
|
||||
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
if (test_and_clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) {
|
||||
- brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n");
|
||||
- err = brcmf_fil_cmd_data_set(vif->ifp,
|
||||
- BRCMF_C_DISASSOC, NULL, 0);
|
||||
- if (err) {
|
||||
- bphy_err(drvr, "WLC_DISASSOC failed (%d)\n", err);
|
||||
+ if (bus_up) {
|
||||
+ brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n");
|
||||
+ err = brcmf_fil_cmd_data_set(vif->ifp,
|
||||
+ BRCMF_C_DISASSOC, NULL, 0);
|
||||
+ if (err)
|
||||
+ bphy_err(drvr, "WLC_DISASSOC failed (%d)\n",
|
||||
+ err);
|
||||
}
|
||||
+
|
||||
if ((vif->wdev.iftype == NL80211_IFTYPE_STATION) ||
|
||||
(vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT))
|
||||
cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0,
|
||||
@@ -1306,7 +1310,8 @@ static void brcmf_link_down(struct brcmf
|
||||
clear_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status);
|
||||
brcmf_btcoex_set_mode(vif, BRCMF_BTCOEX_ENABLED, 0);
|
||||
if (vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_NONE) {
|
||||
- brcmf_set_pmk(vif->ifp, NULL, 0);
|
||||
+ if (bus_up)
|
||||
+ brcmf_set_pmk(vif->ifp, NULL, 0);
|
||||
vif->profile.use_fwsup = BRCMF_PROFILE_FWSUP_NONE;
|
||||
}
|
||||
brcmf_dbg(TRACE, "Exit\n");
|
||||
@@ -5004,18 +5009,16 @@ static int brcmf_cfg80211_get_channel(st
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct net_device *ndev = wdev->netdev;
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
- struct brcmf_if *ifp;
|
||||
struct brcmu_chan ch;
|
||||
enum nl80211_band band = 0;
|
||||
enum nl80211_chan_width width = 0;
|
||||
u32 chanspec;
|
||||
int freq, err;
|
||||
|
||||
- if (!ndev)
|
||||
+ if (!ndev || drvr->bus_if->state != BRCMF_BUS_UP)
|
||||
return -ENODEV;
|
||||
- ifp = netdev_priv(ndev);
|
||||
|
||||
- err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
|
||||
+ err = brcmf_fil_iovar_int_get(netdev_priv(ndev), "chanspec", &chanspec);
|
||||
if (err) {
|
||||
bphy_err(drvr, "chanspec failed (%d)\n", err);
|
||||
return err;
|
||||
@ -0,0 +1,33 @@
|
||||
From e0bfb9601d4812719167cc4124a0d6db1e2f55e4 Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 11:05:11 +0200
|
||||
Subject: [PATCH] brcmfmac: simply remove flowring if bus is down
|
||||
|
||||
When the bus is down, eg. due to rmmod, there is no need to
|
||||
attempt to inform firmware about it.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
|
||||
@@ -1398,6 +1398,13 @@ void brcmf_msgbuf_delete_flowring(struct
|
||||
u8 ifidx;
|
||||
int err;
|
||||
|
||||
+ /* no need to submit if firmware can not be reached */
|
||||
+ if (drvr->bus_if->state != BRCMF_BUS_UP) {
|
||||
+ brcmf_dbg(MSGBUF, "bus down, flowring will be removed\n");
|
||||
+ brcmf_msgbuf_remove_flowring(msgbuf, flowid);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
commonring = msgbuf->commonrings[BRCMF_H2D_MSGRING_CONTROL_SUBMIT];
|
||||
brcmf_commonring_lock(commonring);
|
||||
ret_ptr = brcmf_commonring_reserve_for_write(commonring);
|
||||
@ -0,0 +1,28 @@
|
||||
From 4b11c915f00caeef3292ed0429acc579b9da762a Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 11 Jul 2019 11:05:12 +0200
|
||||
Subject: [PATCH] brcmfmac: remove unnecessary strlcpy() upon obtaining "ver"
|
||||
iovar
|
||||
|
||||
Recently a strcpy() was replaced by strlcpy(). However, the strcpy()
|
||||
was not needed in the first place. So removing that line of code.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -258,7 +258,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_i
|
||||
|
||||
/* query for 'ver' to get version info from firmware */
|
||||
memset(buf, 0, sizeof(buf));
|
||||
- strlcpy(buf, "ver", sizeof(buf));
|
||||
err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf));
|
||||
if (err < 0) {
|
||||
bphy_err(drvr, "Retrieving version information failed, %d\n",
|
||||
@ -0,0 +1,38 @@
|
||||
From e3b1d879ccda9ffd5332777bb1beeb2cc913faa8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sun, 21 Jul 2019 21:52:17 +0200
|
||||
Subject: [PATCH] brcmfmac: don't net_ratelimit() CONSOLE messages on firmware
|
||||
crash
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Firmware crash is a pretty rare event and can't happen too frequently as
|
||||
it has to be followed by a hardware reinitialization and config reload.
|
||||
It should be safe to don't use net_ratelimit() when it happens.
|
||||
|
||||
For reporting & debugging purposes it's important to provide a complete
|
||||
log as the last lines are actually the most important. This change
|
||||
modifies brcmfmac to print all messages in an unlimited way in that
|
||||
specific case. With this change there should be finally a backtrace of
|
||||
firmware finally visible after a crash.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -794,7 +794,8 @@ static void brcmf_pcie_bus_console_read(
|
||||
if (ch == '\n') {
|
||||
console->log_str[console->log_idx] = 0;
|
||||
if (error)
|
||||
- brcmf_err(bus, "CONSOLE: %s", console->log_str);
|
||||
+ __brcmf_err(bus, __func__, "CONSOLE: %s",
|
||||
+ console->log_str);
|
||||
else
|
||||
pr_debug("CONSOLE: %s", console->log_str);
|
||||
console->log_idx = 0;
|
||||
@ -1,25 +0,0 @@
|
||||
From 2fef681a4cf7994c882190fd2417b95f30510afb Mon Sep 17 00:00:00 2001
|
||||
From: Jia-Shyr Chuang <saint.chuang@cypress.com>
|
||||
Date: Wed, 15 Aug 2018 04:23:09 -0500
|
||||
Subject: [PATCH] brcmfmac: add CYW89342 mini-PCIe device
|
||||
|
||||
CYW89342 is a 2x2 MIMO, 802.11a/b/g/n/ac for WLAN. It is a member of
|
||||
4355/4359 family.
|
||||
|
||||
Signed-off-by: Jia-Shyr Chuang <saint.chuang@cypress.com>
|
||||
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -2017,6 +2017,7 @@ static const struct dev_pm_ops brcmf_pci
|
||||
|
||||
static const struct pci_device_id brcmf_pcie_devid_table[] = {
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID),
|
||||
+ BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID),
|
||||
BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID),
|
||||
@ -1,38 +0,0 @@
|
||||
From cb18e2e9ec71d42409a51b83546686c609780dde Mon Sep 17 00:00:00 2001
|
||||
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
|
||||
Date: Wed, 22 Aug 2018 15:22:15 +0200
|
||||
Subject: [PATCH] brcmfmac: fix wrong strnchr usage
|
||||
|
||||
strnchr takes arguments in the order of its name: string, max bytes to
|
||||
read, character to search for. Here we're passing '\n' aka 10 as the
|
||||
buffer size, and searching for sizeof(buf) aka BRCMF_DCMD_SMLEN aka
|
||||
256 (aka '\0', since it's implicitly converted to char) within those 10
|
||||
bytes.
|
||||
|
||||
Just interchanging the last two arguments would still leave a bug,
|
||||
because if we've been successful once, there are not sizeof(buf)
|
||||
characters left after the new value of p.
|
||||
|
||||
Since clmver is immediately afterwards passed as a %s argument, I assume
|
||||
that it is actually a properly nul-terminated string. For that case, we
|
||||
have strreplace().
|
||||
|
||||
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -296,9 +296,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i
|
||||
/* Replace all newline/linefeed characters with space
|
||||
* character
|
||||
*/
|
||||
- ptr = clmver;
|
||||
- while ((ptr = strnchr(ptr, '\n', sizeof(buf))) != NULL)
|
||||
- *ptr = ' ';
|
||||
+ strreplace(clmver, '\n', ' ');
|
||||
|
||||
brcmf_dbg(INFO, "CLM version = %s\n", clmver);
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Wed, 5 Sep 2018 09:48:59 +0200
|
||||
Subject: [PATCH] brcmfmac: increase buffer for obtaining firmware capabilities
|
||||
|
||||
When obtaining the firmware capability a buffer is provided of 512
|
||||
bytes. However, if all features in firmware are supported the buffer
|
||||
needs to be 565 bytes as otherwise truncated information is retrieved
|
||||
from firmware. Increasing the buffer to 768 bytes on stack.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
|
||||
@@ -178,7 +178,7 @@ static void brcmf_feat_iovar_data_set(st
|
||||
ifp->fwil_fwerr = false;
|
||||
}
|
||||
|
||||
-#define MAX_CAPS_BUFFER_SIZE 512
|
||||
+#define MAX_CAPS_BUFFER_SIZE 768
|
||||
static void brcmf_feat_firmware_capabilities(struct brcmf_if *ifp)
|
||||
{
|
||||
char caps[MAX_CAPS_BUFFER_SIZE];
|
||||
@ -1,57 +0,0 @@
|
||||
From a8254fa4ba60b85829b6e5ede6564f81cd70d59f Mon Sep 17 00:00:00 2001
|
||||
From: YueHaibing <yuehaibing@huawei.com>
|
||||
Date: Tue, 11 Sep 2018 11:24:04 +0800
|
||||
Subject: [PATCH] brcmfmac: remove set but not used variables 'sfdoff' and
|
||||
'pad_size'
|
||||
|
||||
Fixes gcc '-Wunused-but-set-variable' warning:
|
||||
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_rxglom':
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1466:11: warning:
|
||||
variable 'sfdoff' set but not used [-Wunused-but-set-variable]
|
||||
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_bus_preinit':
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3408:7: warning:
|
||||
variable 'pad_size' set but not used [-Wunused-but-set-variable]
|
||||
|
||||
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -1463,7 +1463,7 @@ static u8 brcmf_sdio_rxglom(struct brcmf
|
||||
struct sk_buff *pfirst, *pnext;
|
||||
|
||||
int errcode;
|
||||
- u8 doff, sfdoff;
|
||||
+ u8 doff;
|
||||
|
||||
struct brcmf_sdio_hdrinfo rd_new;
|
||||
|
||||
@@ -1597,7 +1597,6 @@ static u8 brcmf_sdio_rxglom(struct brcmf
|
||||
|
||||
/* Remove superframe header, remember offset */
|
||||
skb_pull(pfirst, rd_new.dat_offset);
|
||||
- sfdoff = rd_new.dat_offset;
|
||||
num = 0;
|
||||
|
||||
/* Validate all the subframe headers */
|
||||
@@ -3405,7 +3404,6 @@ static int brcmf_sdio_bus_preinit(struct
|
||||
struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
|
||||
struct brcmf_sdio *bus = sdiodev->bus;
|
||||
struct brcmf_core *core = bus->sdio_core;
|
||||
- uint pad_size;
|
||||
u32 value;
|
||||
int err;
|
||||
|
||||
@@ -3448,7 +3446,6 @@ static int brcmf_sdio_bus_preinit(struct
|
||||
if (sdiodev->sg_support) {
|
||||
bus->txglom = false;
|
||||
value = 1;
|
||||
- pad_size = bus->sdiodev->func2->cur_blksize << 1;
|
||||
err = brcmf_iovar_data_set(bus->sdiodev->dev, "bus:rxglom",
|
||||
&value, sizeof(u32));
|
||||
if (err < 0) {
|
||||
@ -1,67 +0,0 @@
|
||||
From edb6d6885bef82d1eac432dbeca9fbf4ec349d7e Mon Sep 17 00:00:00 2001
|
||||
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
Date: Thu, 27 Sep 2018 14:59:44 +0000
|
||||
Subject: [PATCH] brcmfmac: reduce timeout for action frame scan
|
||||
|
||||
Finding a common channel to send an action frame out is required for
|
||||
some action types. Since a loop with several scan retry is used to find
|
||||
the channel, a short wait time could be considered for each attempt.
|
||||
This patch reduces the wait time from 1500 to 450 msec for each action
|
||||
frame scan.
|
||||
|
||||
This patch fixes the WFA p2p certification 5.1.20 failure caused by the
|
||||
long action frame send time.
|
||||
|
||||
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
|
||||
@@ -74,7 +74,7 @@
|
||||
#define P2P_AF_MAX_WAIT_TIME msecs_to_jiffies(2000)
|
||||
#define P2P_INVALID_CHANNEL -1
|
||||
#define P2P_CHANNEL_SYNC_RETRY 5
|
||||
-#define P2P_AF_FRM_SCAN_MAX_WAIT msecs_to_jiffies(1500)
|
||||
+#define P2P_AF_FRM_SCAN_MAX_WAIT msecs_to_jiffies(450)
|
||||
#define P2P_DEFAULT_SLEEP_TIME_VSDB 200
|
||||
|
||||
/* WiFi P2P Public Action Frame OUI Subtypes */
|
||||
@@ -1134,7 +1134,6 @@ static s32 brcmf_p2p_af_searching_channe
|
||||
{
|
||||
struct afx_hdl *afx_hdl = &p2p->afx_hdl;
|
||||
struct brcmf_cfg80211_vif *pri_vif;
|
||||
- unsigned long duration;
|
||||
s32 retry;
|
||||
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
@@ -1150,7 +1149,6 @@ static s32 brcmf_p2p_af_searching_channe
|
||||
* pending action frame tx is cancelled.
|
||||
*/
|
||||
retry = 0;
|
||||
- duration = msecs_to_jiffies(P2P_AF_FRM_SCAN_MAX_WAIT);
|
||||
while ((retry < P2P_CHANNEL_SYNC_RETRY) &&
|
||||
(afx_hdl->peer_chan == P2P_INVALID_CHANNEL)) {
|
||||
afx_hdl->is_listen = false;
|
||||
@@ -1158,7 +1156,8 @@ static s32 brcmf_p2p_af_searching_channe
|
||||
retry);
|
||||
/* search peer on peer's listen channel */
|
||||
schedule_work(&afx_hdl->afx_work);
|
||||
- wait_for_completion_timeout(&afx_hdl->act_frm_scan, duration);
|
||||
+ wait_for_completion_timeout(&afx_hdl->act_frm_scan,
|
||||
+ P2P_AF_FRM_SCAN_MAX_WAIT);
|
||||
if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) ||
|
||||
(!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL,
|
||||
&p2p->status)))
|
||||
@@ -1171,7 +1170,7 @@ static s32 brcmf_p2p_af_searching_channe
|
||||
afx_hdl->is_listen = true;
|
||||
schedule_work(&afx_hdl->afx_work);
|
||||
wait_for_completion_timeout(&afx_hdl->act_frm_scan,
|
||||
- duration);
|
||||
+ P2P_AF_FRM_SCAN_MAX_WAIT);
|
||||
}
|
||||
if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) ||
|
||||
(!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL,
|
||||
@ -1,79 +0,0 @@
|
||||
From fbf07000960d9c8a13fdc17c6de0230d681c7543 Mon Sep 17 00:00:00 2001
|
||||
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
Date: Thu, 27 Sep 2018 14:59:49 +0000
|
||||
Subject: [PATCH] brcmfmac: fix full timeout waiting for action frame
|
||||
on-channel tx
|
||||
|
||||
The driver sends an action frame down and waits for a completion signal
|
||||
triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event
|
||||
to continue the process. However, the action frame could be transmitted
|
||||
either on the current channel or on an off channel. For the on-channel
|
||||
case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when
|
||||
the frame is transmitted, which make the driver always wait a full
|
||||
timeout duration. This patch has the completion signal be triggered by
|
||||
receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel
|
||||
case.
|
||||
|
||||
This change fixes WFA p2p certification 5.1.19 failure.
|
||||
|
||||
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
||||
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 17 +++++++++++++++--
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h | 2 ++
|
||||
2 files changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
|
||||
@@ -1457,10 +1457,12 @@ int brcmf_p2p_notify_action_tx_complete(
|
||||
return 0;
|
||||
|
||||
if (e->event_code == BRCMF_E_ACTION_FRAME_COMPLETE) {
|
||||
- if (e->status == BRCMF_E_STATUS_SUCCESS)
|
||||
+ if (e->status == BRCMF_E_STATUS_SUCCESS) {
|
||||
set_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED,
|
||||
&p2p->status);
|
||||
- else {
|
||||
+ if (!p2p->wait_for_offchan_complete)
|
||||
+ complete(&p2p->send_af_done);
|
||||
+ } else {
|
||||
set_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status);
|
||||
/* If there is no ack, we don't need to wait for
|
||||
* WLC_E_ACTION_FRAME_OFFCHAN_COMPLETE event
|
||||
@@ -1511,6 +1513,17 @@ static s32 brcmf_p2p_tx_action_frame(str
|
||||
p2p->af_sent_channel = le32_to_cpu(af_params->channel);
|
||||
p2p->af_tx_sent_jiffies = jiffies;
|
||||
|
||||
+ if (test_bit(BRCMF_P2P_STATUS_DISCOVER_LISTEN, &p2p->status) &&
|
||||
+ p2p->af_sent_channel ==
|
||||
+ ieee80211_frequency_to_channel(p2p->remain_on_channel.center_freq))
|
||||
+ p2p->wait_for_offchan_complete = false;
|
||||
+ else
|
||||
+ p2p->wait_for_offchan_complete = true;
|
||||
+
|
||||
+ brcmf_dbg(TRACE, "Waiting for %s tx completion event\n",
|
||||
+ (p2p->wait_for_offchan_complete) ?
|
||||
+ "off-channel" : "on-channel");
|
||||
+
|
||||
timeout = wait_for_completion_timeout(&p2p->send_af_done,
|
||||
P2P_AF_MAX_WAIT_TIME);
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
|
||||
@@ -124,6 +124,7 @@ struct afx_hdl {
|
||||
* @gon_req_action: about to send go negotiation requets frame.
|
||||
* @block_gon_req_tx: drop tx go negotiation requets frame.
|
||||
* @p2pdev_dynamically: is p2p device if created by module param or supplicant.
|
||||
+ * @wait_for_offchan_complete: wait for off-channel tx completion event.
|
||||
*/
|
||||
struct brcmf_p2p_info {
|
||||
struct brcmf_cfg80211_info *cfg;
|
||||
@@ -144,6 +145,7 @@ struct brcmf_p2p_info {
|
||||
bool gon_req_action;
|
||||
bool block_gon_req_tx;
|
||||
bool p2pdev_dynamically;
|
||||
+ bool wait_for_offchan_complete;
|
||||
};
|
||||
|
||||
s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced);
|
||||
@ -1,102 +0,0 @@
|
||||
From a1a3b762163868ad07a4499a73df324f40d5ab0b Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 10 Oct 2018 13:00:58 +0200
|
||||
Subject: [PATCH] brcmfmac: Remove firmware-loading code duplication
|
||||
|
||||
brcmf_fw_request_next_item and brcmf_fw_request_done both have identical
|
||||
code to complete the fw-request depending on the item-type.
|
||||
|
||||
This commit adds a new brcmf_fw_complete_request helper removing this code
|
||||
duplication.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 62 +++++++++++-----------
|
||||
1 file changed, 31 insertions(+), 31 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -504,6 +504,34 @@ fail:
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
+static int brcmf_fw_complete_request(const struct firmware *fw,
|
||||
+ struct brcmf_fw *fwctx)
|
||||
+{
|
||||
+ struct brcmf_fw_item *cur = &fwctx->req->items[fwctx->curpos];
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ brcmf_dbg(TRACE, "firmware %s %sfound\n", cur->path, fw ? "" : "not ");
|
||||
+
|
||||
+ switch (cur->type) {
|
||||
+ case BRCMF_FW_TYPE_NVRAM:
|
||||
+ ret = brcmf_fw_request_nvram_done(fw, fwctx);
|
||||
+ break;
|
||||
+ case BRCMF_FW_TYPE_BINARY:
|
||||
+ if (fw)
|
||||
+ cur->binary = fw;
|
||||
+ else
|
||||
+ ret = -ENOENT;
|
||||
+ break;
|
||||
+ default:
|
||||
+ /* something fishy here so bail out early */
|
||||
+ brcmf_err("unknown fw type: %d\n", cur->type);
|
||||
+ release_firmware(fw);
|
||||
+ ret = -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret;
|
||||
+}
|
||||
+
|
||||
static int brcmf_fw_request_next_item(struct brcmf_fw *fwctx, bool async)
|
||||
{
|
||||
struct brcmf_fw_item *cur;
|
||||
@@ -525,15 +553,7 @@ static int brcmf_fw_request_next_item(st
|
||||
if (ret < 0) {
|
||||
brcmf_fw_request_done(NULL, fwctx);
|
||||
} else if (!async && fw) {
|
||||
- brcmf_dbg(TRACE, "firmware %s %sfound\n", cur->path,
|
||||
- fw ? "" : "not ");
|
||||
- if (cur->type == BRCMF_FW_TYPE_BINARY)
|
||||
- cur->binary = fw;
|
||||
- else if (cur->type == BRCMF_FW_TYPE_NVRAM)
|
||||
- brcmf_fw_request_nvram_done(fw, fwctx);
|
||||
- else
|
||||
- release_firmware(fw);
|
||||
-
|
||||
+ brcmf_fw_complete_request(fw, fwctx);
|
||||
return -EAGAIN;
|
||||
}
|
||||
return 0;
|
||||
@@ -547,28 +567,8 @@ static void brcmf_fw_request_done(const
|
||||
|
||||
cur = &fwctx->req->items[fwctx->curpos];
|
||||
|
||||
- brcmf_dbg(TRACE, "enter: firmware %s %sfound\n", cur->path,
|
||||
- fw ? "" : "not ");
|
||||
-
|
||||
- if (!fw)
|
||||
- ret = -ENOENT;
|
||||
-
|
||||
- switch (cur->type) {
|
||||
- case BRCMF_FW_TYPE_NVRAM:
|
||||
- ret = brcmf_fw_request_nvram_done(fw, fwctx);
|
||||
- break;
|
||||
- case BRCMF_FW_TYPE_BINARY:
|
||||
- cur->binary = fw;
|
||||
- break;
|
||||
- default:
|
||||
- /* something fishy here so bail out early */
|
||||
- brcmf_err("unknown fw type: %d\n", cur->type);
|
||||
- release_firmware(fw);
|
||||
- ret = -EINVAL;
|
||||
- goto fail;
|
||||
- }
|
||||
-
|
||||
- if (ret < 0 && !(cur->flags & BRCMF_FW_REQF_OPTIONAL))
|
||||
+ ret = brcmf_fw_complete_request(fw, fwctx);
|
||||
+ if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
do {
|
||||
@ -1,127 +0,0 @@
|
||||
From 5b587496dc63595b71265d986ce69728c2724370 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 10 Oct 2018 13:00:59 +0200
|
||||
Subject: [PATCH] brcmfmac: Remove recursion from firmware load error handling
|
||||
|
||||
Before this commit brcmf_fw_request_done would call
|
||||
brcmf_fw_request_next_item to load the next item, which on an error would
|
||||
call brcmf_fw_request_done, which if the error is recoverable (*) will
|
||||
then continue calling brcmf_fw_request_next_item for the next item again
|
||||
which on an error will call brcmf_fw_request_done again...
|
||||
|
||||
This does not blow up because we only have a limited number of items so
|
||||
we never recurse too deep. But the recursion is still quite ugly and
|
||||
frankly is giving me a headache, so lets fix this.
|
||||
|
||||
This commit fixes this by removing brcmf_fw_request_next_item and by
|
||||
making brcmf_fw_get_firmwares and brcmf_fw_request_done directly call
|
||||
firmware_request_nowait resp. firmware_request themselves.
|
||||
|
||||
*) brcmf_fw_request_nvram_done fallback path succeeds or
|
||||
BRCMF_FW_REQF_OPTIONAL is set
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 65 +++++++---------------
|
||||
1 file changed, 19 insertions(+), 46 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -532,33 +532,6 @@ static int brcmf_fw_complete_request(con
|
||||
return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret;
|
||||
}
|
||||
|
||||
-static int brcmf_fw_request_next_item(struct brcmf_fw *fwctx, bool async)
|
||||
-{
|
||||
- struct brcmf_fw_item *cur;
|
||||
- const struct firmware *fw = NULL;
|
||||
- int ret;
|
||||
-
|
||||
- cur = &fwctx->req->items[fwctx->curpos];
|
||||
-
|
||||
- brcmf_dbg(TRACE, "%srequest for %s\n", async ? "async " : "",
|
||||
- cur->path);
|
||||
-
|
||||
- if (async)
|
||||
- ret = request_firmware_nowait(THIS_MODULE, true, cur->path,
|
||||
- fwctx->dev, GFP_KERNEL, fwctx,
|
||||
- brcmf_fw_request_done);
|
||||
- else
|
||||
- ret = request_firmware(&fw, cur->path, fwctx->dev);
|
||||
-
|
||||
- if (ret < 0) {
|
||||
- brcmf_fw_request_done(NULL, fwctx);
|
||||
- } else if (!async && fw) {
|
||||
- brcmf_fw_complete_request(fw, fwctx);
|
||||
- return -EAGAIN;
|
||||
- }
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx)
|
||||
{
|
||||
struct brcmf_fw *fwctx = ctx;
|
||||
@@ -568,26 +541,19 @@ static void brcmf_fw_request_done(const
|
||||
cur = &fwctx->req->items[fwctx->curpos];
|
||||
|
||||
ret = brcmf_fw_complete_request(fw, fwctx);
|
||||
- if (ret < 0)
|
||||
- goto fail;
|
||||
|
||||
- do {
|
||||
- if (++fwctx->curpos == fwctx->req->n_items) {
|
||||
- ret = 0;
|
||||
- goto done;
|
||||
- }
|
||||
-
|
||||
- ret = brcmf_fw_request_next_item(fwctx, false);
|
||||
- } while (ret == -EAGAIN);
|
||||
-
|
||||
- return;
|
||||
-
|
||||
-fail:
|
||||
- brcmf_dbg(TRACE, "failed err=%d: dev=%s, fw=%s\n", ret,
|
||||
- dev_name(fwctx->dev), cur->path);
|
||||
- brcmf_fw_free_request(fwctx->req);
|
||||
- fwctx->req = NULL;
|
||||
-done:
|
||||
+ while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) {
|
||||
+ cur = &fwctx->req->items[fwctx->curpos];
|
||||
+ request_firmware(&fw, cur->path, fwctx->dev);
|
||||
+ ret = brcmf_fw_complete_request(fw, ctx);
|
||||
+ }
|
||||
+
|
||||
+ if (ret) {
|
||||
+ brcmf_dbg(TRACE, "failed err=%d: dev=%s, fw=%s\n", ret,
|
||||
+ dev_name(fwctx->dev), cur->path);
|
||||
+ brcmf_fw_free_request(fwctx->req);
|
||||
+ fwctx->req = NULL;
|
||||
+ }
|
||||
fwctx->done(fwctx->dev, ret, fwctx->req);
|
||||
kfree(fwctx);
|
||||
}
|
||||
@@ -611,7 +577,9 @@ int brcmf_fw_get_firmwares(struct device
|
||||
void (*fw_cb)(struct device *dev, int err,
|
||||
struct brcmf_fw_request *req))
|
||||
{
|
||||
+ struct brcmf_fw_item *first = &req->items[0];
|
||||
struct brcmf_fw *fwctx;
|
||||
+ int ret;
|
||||
|
||||
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
|
||||
if (!fw_cb)
|
||||
@@ -628,7 +596,12 @@ int brcmf_fw_get_firmwares(struct device
|
||||
fwctx->req = req;
|
||||
fwctx->done = fw_cb;
|
||||
|
||||
- brcmf_fw_request_next_item(fwctx, true);
|
||||
+ ret = request_firmware_nowait(THIS_MODULE, true, first->path,
|
||||
+ fwctx->dev, GFP_KERNEL, fwctx,
|
||||
+ brcmf_fw_request_done);
|
||||
+ if (ret < 0)
|
||||
+ brcmf_fw_request_done(NULL, fwctx);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
From eae8e50669e15002b195177212a6e25afbe7cf4d Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 10 Oct 2018 13:01:00 +0200
|
||||
Subject: [PATCH] brcmfmac: Add support for first trying to get a board
|
||||
specific nvram file
|
||||
|
||||
The nvram files which some brcmfmac chips need are board-specific. To be
|
||||
able to distribute these as part of linux-firmware, so that devices with
|
||||
such a wifi chip will work OOTB, multiple (one per board) versions must
|
||||
co-exist under /lib/firmware.
|
||||
|
||||
This commit adds support for callers of the brcmfmac/firmware.c code to
|
||||
pass in a board_type parameter through the request structure.
|
||||
|
||||
If that parameter is set then the code will first try to load
|
||||
chipmodel.board_type.txt before falling back to the old chipmodel.txt name.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 27 +++++++++++++++++++++-
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.h | 1 +
|
||||
2 files changed, 27 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -532,6 +532,31 @@ static int brcmf_fw_complete_request(con
|
||||
return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret;
|
||||
}
|
||||
|
||||
+static int brcmf_fw_request_firmware(const struct firmware **fw,
|
||||
+ struct brcmf_fw *fwctx)
|
||||
+{
|
||||
+ struct brcmf_fw_item *cur = &fwctx->req->items[fwctx->curpos];
|
||||
+ int ret;
|
||||
+
|
||||
+ /* nvram files are board-specific, first try a board-specific path */
|
||||
+ if (cur->type == BRCMF_FW_TYPE_NVRAM && fwctx->req->board_type) {
|
||||
+ char alt_path[BRCMF_FW_NAME_LEN];
|
||||
+
|
||||
+ strlcpy(alt_path, cur->path, BRCMF_FW_NAME_LEN);
|
||||
+ /* strip .txt at the end */
|
||||
+ alt_path[strlen(alt_path) - 4] = 0;
|
||||
+ strlcat(alt_path, ".", BRCMF_FW_NAME_LEN);
|
||||
+ strlcat(alt_path, fwctx->req->board_type, BRCMF_FW_NAME_LEN);
|
||||
+ strlcat(alt_path, ".txt", BRCMF_FW_NAME_LEN);
|
||||
+
|
||||
+ ret = request_firmware(fw, alt_path, fwctx->dev);
|
||||
+ if (ret == 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return request_firmware(fw, cur->path, fwctx->dev);
|
||||
+}
|
||||
+
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx)
|
||||
{
|
||||
struct brcmf_fw *fwctx = ctx;
|
||||
@@ -544,7 +569,7 @@ static void brcmf_fw_request_done(const
|
||||
|
||||
while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) {
|
||||
cur = &fwctx->req->items[fwctx->curpos];
|
||||
- request_firmware(&fw, cur->path, fwctx->dev);
|
||||
+ brcmf_fw_request_firmware(&fw, fwctx);
|
||||
ret = brcmf_fw_complete_request(fw, ctx);
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
|
||||
@@ -70,6 +70,7 @@ struct brcmf_fw_request {
|
||||
u16 domain_nr;
|
||||
u16 bus_nr;
|
||||
u32 n_items;
|
||||
+ const char *board_type;
|
||||
struct brcmf_fw_item items[0];
|
||||
};
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
From 0ad4b55b2f29784f93875e6231bf57cd233624a2 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 10 Oct 2018 13:01:01 +0200
|
||||
Subject: [PATCH] brcmfmac: Set board_type used for nvram file selection to
|
||||
machine-compatible
|
||||
|
||||
For of/devicetree using machines, set the board_type used for nvram file
|
||||
selection to the first string listed in the top-level's node compatible
|
||||
string, aka the machine-compatible as used by of_machine_is_compatible().
|
||||
|
||||
The board_type setting is used to load the board-specific nvram file with
|
||||
a board-specific name so that we can ship files for each supported board
|
||||
in linux-firmware.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | 1 +
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 11 ++++++++++-
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 +
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 +
|
||||
4 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
@@ -59,6 +59,7 @@ struct brcmf_mp_device {
|
||||
bool iapp;
|
||||
bool ignore_probe_fail;
|
||||
struct brcmfmac_pd_cc *country_codes;
|
||||
+ const char *board_type;
|
||||
union {
|
||||
struct brcmfmac_sdio_pd sdio;
|
||||
} bus;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -27,11 +27,20 @@ void brcmf_of_probe(struct device *dev,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio;
|
||||
- struct device_node *np = dev->of_node;
|
||||
+ struct device_node *root, *np = dev->of_node;
|
||||
+ struct property *prop;
|
||||
int irq;
|
||||
u32 irqf;
|
||||
u32 val;
|
||||
|
||||
+ /* Set board-type to the first string of the machine compatible prop */
|
||||
+ root = of_find_node_by_path("/");
|
||||
+ if (root) {
|
||||
+ prop = of_find_property(root, "compatible", NULL);
|
||||
+ settings->board_type = of_prop_next_string(prop, NULL);
|
||||
+ of_node_put(root);
|
||||
+ }
|
||||
+
|
||||
if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
|
||||
!of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
return;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
@@ -1785,6 +1785,7 @@ brcmf_pcie_prepare_fw_request(struct brc
|
||||
fwreq->items[BRCMF_PCIE_FW_CODE].type = BRCMF_FW_TYPE_BINARY;
|
||||
fwreq->items[BRCMF_PCIE_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM;
|
||||
fwreq->items[BRCMF_PCIE_FW_NVRAM].flags = BRCMF_FW_REQF_OPTIONAL;
|
||||
+ fwreq->board_type = devinfo->settings->board_type;
|
||||
/* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */
|
||||
fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1;
|
||||
fwreq->bus_nr = devinfo->pdev->bus->number;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -4174,6 +4174,7 @@ brcmf_sdio_prepare_fw_request(struct brc
|
||||
|
||||
fwreq->items[BRCMF_SDIO_FW_CODE].type = BRCMF_FW_TYPE_BINARY;
|
||||
fwreq->items[BRCMF_SDIO_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM;
|
||||
+ fwreq->board_type = bus->sdiodev->settings->board_type;
|
||||
|
||||
return fwreq;
|
||||
}
|
||||
@ -1,179 +0,0 @@
|
||||
From bd1e82bb420adf4ad7cd468d8a482cde622dd69d Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 10 Oct 2018 13:01:02 +0200
|
||||
Subject: [PATCH] brcmfmac: Set board_type from DMI on x86 based machines
|
||||
|
||||
For x86 based machines, set the board_type used for nvram file selection
|
||||
based on the DMI sys-vendor and product-name strings.
|
||||
|
||||
Since on some models these strings are too generic, this commit also adds
|
||||
a quirk table overriding the strings for models listed in that table.
|
||||
|
||||
The board_type setting is used to load the board-specific nvram file with
|
||||
a board-specific name so that we can ship files for each supported board
|
||||
in linux-firmware.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/Makefile | 2 +
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/common.c | 3 +-
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/common.h | 7 ++
|
||||
.../net/wireless/broadcom/brcm80211/brcmfmac/dmi.c | 116 +++++++++++++++++++++
|
||||
4 files changed, 127 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
|
||||
@@ -54,3 +54,5 @@ brcmfmac-$(CPTCFG_BRCM_TRACING) += \
|
||||
tracepoint.o
|
||||
brcmfmac-$(CONFIG_OF) += \
|
||||
of.o
|
||||
+brcmfmac-$(CONFIG_DMI) += \
|
||||
+ dmi.o
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -448,8 +448,9 @@ struct brcmf_mp_device *brcmf_get_module
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
- /* No platform data for this device, try OF (Open Firwmare) */
|
||||
+ /* No platform data for this device, try OF and DMI data */
|
||||
brcmf_of_probe(dev, bus_type, settings);
|
||||
+ brcmf_dmi_probe(settings, chip, chiprev);
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
@@ -75,4 +75,11 @@ void brcmf_release_module_param(struct b
|
||||
/* Sets dongle media info (drv_version, mac address). */
|
||||
int brcmf_c_preinit_dcmds(struct brcmf_if *ifp);
|
||||
|
||||
+#ifdef CONFIG_DMI
|
||||
+void brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev);
|
||||
+#else
|
||||
+static inline void
|
||||
+brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev) {}
|
||||
+#endif
|
||||
+
|
||||
#endif /* BRCMFMAC_COMMON_H */
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c
|
||||
@@ -0,0 +1,116 @@
|
||||
+/*
|
||||
+ * Copyright 2018 Hans de Goede <hdegoede@redhat.com>
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/dmi.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include "core.h"
|
||||
+#include "common.h"
|
||||
+#include "brcm_hw_ids.h"
|
||||
+
|
||||
+/* The DMI data never changes so we can use a static buf for this */
|
||||
+static char dmi_board_type[128];
|
||||
+
|
||||
+struct brcmf_dmi_data {
|
||||
+ u32 chip;
|
||||
+ u32 chiprev;
|
||||
+ const char *board_type;
|
||||
+};
|
||||
+
|
||||
+/* NOTE: Please keep all entries sorted alphabetically */
|
||||
+
|
||||
+static const struct brcmf_dmi_data gpd_win_pocket_data = {
|
||||
+ BRCM_CC_4356_CHIP_ID, 2, "gpd-win-pocket"
|
||||
+};
|
||||
+
|
||||
+static const struct brcmf_dmi_data jumper_ezpad_mini3_data = {
|
||||
+ BRCM_CC_43430_CHIP_ID, 0, "jumper-ezpad-mini3"
|
||||
+};
|
||||
+
|
||||
+static const struct brcmf_dmi_data meegopad_t08_data = {
|
||||
+ BRCM_CC_43340_CHIP_ID, 2, "meegopad-t08"
|
||||
+};
|
||||
+
|
||||
+static const struct dmi_system_id dmi_platform_data[] = {
|
||||
+ {
|
||||
+ /* Match for the GPDwin which unfortunately uses somewhat
|
||||
+ * generic dmi strings, which is why we test for 4 strings.
|
||||
+ * Comparing against 23 other byt/cht boards, board_vendor
|
||||
+ * and board_name are unique to the GPDwin, where as only one
|
||||
+ * other board has the same board_serial and 3 others have
|
||||
+ * the same default product_name. Also the GPDwin is the
|
||||
+ * only device to have both board_ and product_name not set.
|
||||
+ */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
|
||||
+ DMI_MATCH(DMI_BOARD_NAME, "Default string"),
|
||||
+ DMI_MATCH(DMI_BOARD_SERIAL, "Default string"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
||||
+ },
|
||||
+ .driver_data = (void *)&gpd_win_pocket_data,
|
||||
+ },
|
||||
+ {
|
||||
+ /* Jumper EZpad mini3 */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
|
||||
+ /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
|
||||
+ DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
|
||||
+ },
|
||||
+ .driver_data = (void *)&jumper_ezpad_mini3_data,
|
||||
+ },
|
||||
+ {
|
||||
+ /* Meegopad T08 */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
||||
+ DMI_MATCH(DMI_BOARD_NAME, "T3 MRD"),
|
||||
+ DMI_MATCH(DMI_BOARD_VERSION, "V1.1"),
|
||||
+ },
|
||||
+ .driver_data = (void *)&meegopad_t08_data,
|
||||
+ },
|
||||
+ {}
|
||||
+};
|
||||
+
|
||||
+void brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev)
|
||||
+{
|
||||
+ const struct dmi_system_id *match;
|
||||
+ const struct brcmf_dmi_data *data;
|
||||
+ const char *sys_vendor;
|
||||
+ const char *product_name;
|
||||
+
|
||||
+ /* Some models have DMI strings which are too generic, e.g.
|
||||
+ * "Default string", we use a quirk table for these.
|
||||
+ */
|
||||
+ for (match = dmi_first_match(dmi_platform_data);
|
||||
+ match;
|
||||
+ match = dmi_first_match(match + 1)) {
|
||||
+ data = match->driver_data;
|
||||
+
|
||||
+ if (data->chip == chip && data->chiprev == chiprev) {
|
||||
+ settings->board_type = data->board_type;
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Not found in the quirk-table, use sys_vendor-product_name */
|
||||
+ sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR);
|
||||
+ product_name = dmi_get_system_info(DMI_PRODUCT_NAME);
|
||||
+ if (sys_vendor && product_name) {
|
||||
+ snprintf(dmi_board_type, sizeof(dmi_board_type), "%s-%s",
|
||||
+ sys_vendor, product_name);
|
||||
+ settings->board_type = dmi_board_type;
|
||||
+ }
|
||||
+}
|
||||
@ -1,41 +0,0 @@
|
||||
From 55e491edbf14b2da5419c2a319ea3b1d6368d9a2 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 10 Oct 2018 13:01:03 +0200
|
||||
Subject: [PATCH] brcmfmac: Cleanup brcmf_fw_request_done()
|
||||
|
||||
The "cur" variable is now only used for a debug print and we already
|
||||
print the same info from brcmf_fw_complete_request(), so the debug print
|
||||
does not provide any extra info and we can remove it.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -560,22 +560,16 @@ static int brcmf_fw_request_firmware(con
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx)
|
||||
{
|
||||
struct brcmf_fw *fwctx = ctx;
|
||||
- struct brcmf_fw_item *cur;
|
||||
- int ret = 0;
|
||||
-
|
||||
- cur = &fwctx->req->items[fwctx->curpos];
|
||||
+ int ret;
|
||||
|
||||
ret = brcmf_fw_complete_request(fw, fwctx);
|
||||
|
||||
while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) {
|
||||
- cur = &fwctx->req->items[fwctx->curpos];
|
||||
brcmf_fw_request_firmware(&fw, fwctx);
|
||||
ret = brcmf_fw_complete_request(fw, ctx);
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
- brcmf_dbg(TRACE, "failed err=%d: dev=%s, fw=%s\n", ret,
|
||||
- dev_name(fwctx->dev), cur->path);
|
||||
brcmf_fw_free_request(fwctx->req);
|
||||
fwctx->req = NULL;
|
||||
}
|
||||
@ -1,132 +0,0 @@
|
||||
From ce2e6db554fad444fa0b3904fc3015336e0ef765 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 11 Oct 2018 11:51:06 +0200
|
||||
Subject: [PATCH] brcmfmac: Add support for getting nvram contents from EFI
|
||||
variables
|
||||
|
||||
Various X86 laptops with a SDIO attached brcmfmac wifi chip, store the
|
||||
nvram contents in a special EFI variable. This commit adds support for
|
||||
getting nvram directly from this EFI variable, without the user needing
|
||||
to manually copy it.
|
||||
|
||||
This makes Wifi / Bluetooth work out of the box on these devices instead of
|
||||
requiring manual setup.
|
||||
|
||||
This has been tested on the following models: Acer Iconia Tab8 w1-810,
|
||||
Acer One 10, Asus T100CHI, Asus T100HA, Asus T100TA, Asus T200TA and a
|
||||
Lenovo Mixx 2 8.
|
||||
|
||||
Tested-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 63 +++++++++++++++++++---
|
||||
1 file changed, 57 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -14,6 +14,7 @@
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
+#include <linux/efi.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/device.h>
|
||||
@@ -445,6 +446,51 @@ struct brcmf_fw {
|
||||
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx);
|
||||
|
||||
+#ifdef CONFIG_EFI
|
||||
+static u8 *brcmf_fw_nvram_from_efi(size_t *data_len_ret)
|
||||
+{
|
||||
+ const u16 name[] = { 'n', 'v', 'r', 'a', 'm', 0 };
|
||||
+ struct efivar_entry *nvram_efivar;
|
||||
+ unsigned long data_len = 0;
|
||||
+ u8 *data = NULL;
|
||||
+ int err;
|
||||
+
|
||||
+ nvram_efivar = kzalloc(sizeof(*nvram_efivar), GFP_KERNEL);
|
||||
+ if (!nvram_efivar)
|
||||
+ return NULL;
|
||||
+
|
||||
+ memcpy(&nvram_efivar->var.VariableName, name, sizeof(name));
|
||||
+ nvram_efivar->var.VendorGuid = EFI_GUID(0x74b00bd9, 0x805a, 0x4d61,
|
||||
+ 0xb5, 0x1f, 0x43, 0x26,
|
||||
+ 0x81, 0x23, 0xd1, 0x13);
|
||||
+
|
||||
+ err = efivar_entry_size(nvram_efivar, &data_len);
|
||||
+ if (err)
|
||||
+ goto fail;
|
||||
+
|
||||
+ data = kmalloc(data_len, GFP_KERNEL);
|
||||
+ if (!data)
|
||||
+ goto fail;
|
||||
+
|
||||
+ err = efivar_entry_get(nvram_efivar, NULL, &data_len, data);
|
||||
+ if (err)
|
||||
+ goto fail;
|
||||
+
|
||||
+ brcmf_info("Using nvram EFI variable\n");
|
||||
+
|
||||
+ kfree(nvram_efivar);
|
||||
+ *data_len_ret = data_len;
|
||||
+ return data;
|
||||
+
|
||||
+fail:
|
||||
+ kfree(data);
|
||||
+ kfree(nvram_efivar);
|
||||
+ return NULL;
|
||||
+}
|
||||
+#else
|
||||
+static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
|
||||
+#endif
|
||||
+
|
||||
static void brcmf_fw_free_request(struct brcmf_fw_request *req)
|
||||
{
|
||||
struct brcmf_fw_item *item;
|
||||
@@ -463,11 +509,12 @@ static int brcmf_fw_request_nvram_done(c
|
||||
{
|
||||
struct brcmf_fw *fwctx = ctx;
|
||||
struct brcmf_fw_item *cur;
|
||||
+ bool free_bcm47xx_nvram = false;
|
||||
+ bool kfree_nvram = false;
|
||||
u32 nvram_length = 0;
|
||||
void *nvram = NULL;
|
||||
u8 *data = NULL;
|
||||
size_t data_len;
|
||||
- bool raw_nvram;
|
||||
|
||||
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(fwctx->dev));
|
||||
|
||||
@@ -476,12 +523,13 @@ static int brcmf_fw_request_nvram_done(c
|
||||
if (fw && fw->data) {
|
||||
data = (u8 *)fw->data;
|
||||
data_len = fw->size;
|
||||
- raw_nvram = false;
|
||||
} else {
|
||||
- data = bcm47xx_nvram_get_contents(&data_len);
|
||||
- if (!data && !(cur->flags & BRCMF_FW_REQF_OPTIONAL))
|
||||
+ if ((data = bcm47xx_nvram_get_contents(&data_len)))
|
||||
+ free_bcm47xx_nvram = true;
|
||||
+ else if ((data = brcmf_fw_nvram_from_efi(&data_len)))
|
||||
+ kfree_nvram = true;
|
||||
+ else if (!(cur->flags & BRCMF_FW_REQF_OPTIONAL))
|
||||
goto fail;
|
||||
- raw_nvram = true;
|
||||
}
|
||||
|
||||
if (data)
|
||||
@@ -489,8 +537,11 @@ static int brcmf_fw_request_nvram_done(c
|
||||
fwctx->req->domain_nr,
|
||||
fwctx->req->bus_nr);
|
||||
|
||||
- if (raw_nvram)
|
||||
+ if (free_bcm47xx_nvram)
|
||||
bcm47xx_nvram_release_contents(data);
|
||||
+ if (kfree_nvram)
|
||||
+ kfree(data);
|
||||
+
|
||||
release_firmware(fw);
|
||||
if (!nvram && !(cur->flags & BRCMF_FW_REQF_OPTIONAL))
|
||||
goto fail;
|
||||
@ -1,97 +0,0 @@
|
||||
From 29ec3394f0bd85c22674ab6693d92da5e2324610 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 11 Oct 2018 11:51:07 +0200
|
||||
Subject: [PATCH] brcmfmac: Fix ccode from EFI nvram when necessary
|
||||
|
||||
In some cases the EFI-var stored nvram contains "ccode=ALL" or "ccode=XV"
|
||||
to specify "worldwide" compatible settings, but these 2 ccode-s do not work
|
||||
properly.
|
||||
|
||||
I've tested the different known "worldwide" ccode-s used in various nvram
|
||||
sources with the latest firmwares from linux-firmware for various brcmfmac
|
||||
models, here is a simplified (*) table with what each setting results in:
|
||||
|
||||
ALL: 12-14 disab, U-NII-1, U-NII-2 no-IR/radar, U-NII-3
|
||||
XV: 12-14 no-IR, disables all 5G channels
|
||||
XY: 12-13 enab, 14 disab, U-NII-1 enab, U-NII-2 no-IR/radar, U-NII-3 disab
|
||||
X2: 12-13 no-IR, 14 dis, U-NII-1 no-IR, U-NII-2 no-IR/radar, U-NII-3 no-IR
|
||||
|
||||
Where 12,13,14 are 2.4G channels 12-14 and U-NII-1/2/3 are the 3 different
|
||||
5G channel groups. no-IR is no-Initiate-Radiation, we will never send on
|
||||
these channels without first having received valid wifi traffic there.
|
||||
|
||||
This immediately shows that both ALL and XV are not as worldwide as we want
|
||||
them to be. ALL causes channels 12 and 13 to not be available and XV causes
|
||||
all 5GHz channels to not be available. Also ALL unconditionally enables the
|
||||
U-NII-1 and U-NII-3 5G groups, while we really should be using no-IR for
|
||||
these.
|
||||
|
||||
This commit replace XV and ALL with X2, which allows usage of chan 12-13
|
||||
and 5G channels, but only after receiving valid wifi traffic there first.
|
||||
|
||||
Note that this configure the firmware's channel limits, the kernels own
|
||||
regulatory restrictions based on e.g. regulatory info received from the
|
||||
access-point, will be applied on top of this.
|
||||
|
||||
This fixes channels 12+13 not working on the Asus T200TA and the Lenovo
|
||||
Mixx 2 8 and 5G channels not working on the Asus T100HA.
|
||||
|
||||
This has been tested on the following models: Acer Iconia Tab8 w1-810,
|
||||
Acer One 10, Asus T100CHI, Asus T100HA, Asus T100TA, Asus T200TA and a
|
||||
Lenovo Mixx 2 8.
|
||||
|
||||
*) There are some exceptions to this table:
|
||||
1) On really old firmware e.g. linux-firmware's 2011 brcmfmac4330-sdio.bin
|
||||
ALL really means all, unconditionally enabling everything
|
||||
2) The exact meaning might be influenced by setting the regrev nvram var.
|
||||
Specifically using ccode=XV + regrev=1 on brcmfmac43241b4 leads to:
|
||||
12-14 no-ir, U-NII-1 no-ir, U-NII-2 no-ir/radar, U-NII-3 no-ir
|
||||
But only on the brcmfmac43241b4 and not on e.g. the brcmfmac43340
|
||||
|
||||
Tested-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 24 ++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -447,6 +447,29 @@ struct brcmf_fw {
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx);
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
+/* In some cases the EFI-var stored nvram contains "ccode=ALL" or "ccode=XV"
|
||||
+ * to specify "worldwide" compatible settings, but these 2 ccode-s do not work
|
||||
+ * properly. "ccode=ALL" causes channels 12 and 13 to not be available,
|
||||
+ * "ccode=XV" causes all 5GHz channels to not be available. So we replace both
|
||||
+ * with "ccode=X2" which allows channels 12+13 and 5Ghz channels in
|
||||
+ * no-Initiate-Radiation mode. This means that we will never send on these
|
||||
+ * channels without first having received valid wifi traffic on the channel.
|
||||
+ */
|
||||
+static void brcmf_fw_fix_efi_nvram_ccode(char *data, unsigned long data_len)
|
||||
+{
|
||||
+ char *ccode;
|
||||
+
|
||||
+ ccode = strnstr((char *)data, "ccode=ALL", data_len);
|
||||
+ if (!ccode)
|
||||
+ ccode = strnstr((char *)data, "ccode=XV\r", data_len);
|
||||
+ if (!ccode)
|
||||
+ return;
|
||||
+
|
||||
+ ccode[6] = 'X';
|
||||
+ ccode[7] = '2';
|
||||
+ ccode[8] = '\r';
|
||||
+}
|
||||
+
|
||||
static u8 *brcmf_fw_nvram_from_efi(size_t *data_len_ret)
|
||||
{
|
||||
const u16 name[] = { 'n', 'v', 'r', 'a', 'm', 0 };
|
||||
@@ -476,6 +499,7 @@ static u8 *brcmf_fw_nvram_from_efi(size_
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
+ brcmf_fw_fix_efi_nvram_ccode(data, data_len);
|
||||
brcmf_info("Using nvram EFI variable\n");
|
||||
|
||||
kfree(nvram_efivar);
|
||||
@ -1,34 +0,0 @@
|
||||
From e966a79c2f761a696dec9cfb0e2d4aa977bf78cb Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Tue, 16 Oct 2018 18:43:42 +0100
|
||||
Subject: [PATCH] brcmfmac: fix spelling mistake "Retreiving" -> "Retrieving"
|
||||
|
||||
Trivial fix to spelling mistake in brcmf_err error message.
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -214,7 +214,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i
|
||||
err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr,
|
||||
sizeof(ifp->mac_addr));
|
||||
if (err < 0) {
|
||||
- brcmf_err("Retreiving cur_etheraddr failed, %d\n", err);
|
||||
+ brcmf_err("Retrieving cur_etheraddr failed, %d\n", err);
|
||||
goto done;
|
||||
}
|
||||
memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN);
|
||||
@@ -269,7 +269,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_i
|
||||
strcpy(buf, "ver");
|
||||
err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf));
|
||||
if (err < 0) {
|
||||
- brcmf_err("Retreiving version information failed, %d\n",
|
||||
+ brcmf_err("Retrieving version information failed, %d\n",
|
||||
err);
|
||||
goto done;
|
||||
}
|
||||
@ -1,83 +0,0 @@
|
||||
From ae5848cb4511bbbfe0306fcdbe5d9a95cd9546a9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 26 Oct 2018 13:22:32 +0200
|
||||
Subject: [PATCH] brcmutil: print invalid chanspec when WARN-ing
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On one of my devices I got WARNINGs when brcmfmac tried to decode
|
||||
chanspec. I couldn't tell if it was some unsupported format or just a
|
||||
malformed value passed by a firmware.
|
||||
|
||||
Print chanspec value so it's possible to debug a possible problem.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c
|
||||
@@ -128,7 +128,7 @@ static void brcmu_d11n_decchspec(struct
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- WARN_ON_ONCE(1);
|
||||
+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ static void brcmu_d11n_decchspec(struct
|
||||
ch->band = BRCMU_CHAN_BAND_2G;
|
||||
break;
|
||||
default:
|
||||
- WARN_ON_ONCE(1);
|
||||
+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -167,7 +167,7 @@ static void brcmu_d11ac_decchspec(struct
|
||||
ch->sb = BRCMU_CHAN_SB_U;
|
||||
ch->control_ch_num += CH_10MHZ_APART;
|
||||
} else {
|
||||
- WARN_ON_ONCE(1);
|
||||
+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
|
||||
}
|
||||
break;
|
||||
case BRCMU_CHSPEC_D11AC_BW_80:
|
||||
@@ -188,7 +188,7 @@ static void brcmu_d11ac_decchspec(struct
|
||||
ch->control_ch_num += CH_30MHZ_APART;
|
||||
break;
|
||||
default:
|
||||
- WARN_ON_ONCE(1);
|
||||
+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -222,13 +222,13 @@ static void brcmu_d11ac_decchspec(struct
|
||||
ch->control_ch_num += CH_70MHZ_APART;
|
||||
break;
|
||||
default:
|
||||
- WARN_ON_ONCE(1);
|
||||
+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BRCMU_CHSPEC_D11AC_BW_8080:
|
||||
default:
|
||||
- WARN_ON_ONCE(1);
|
||||
+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ static void brcmu_d11ac_decchspec(struct
|
||||
ch->band = BRCMU_CHAN_BAND_2G;
|
||||
break;
|
||||
default:
|
||||
- WARN_ON_ONCE(1);
|
||||
+ WARN_ONCE(1, "Invalid chanspec 0x%04x\n", ch->chspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1,80 +0,0 @@
|
||||
From 4282ff17e557d319e1b988fa4f582792cfaf6fff Mon Sep 17 00:00:00 2001
|
||||
From: Dan Haab <riproute@gmail.com>
|
||||
Date: Fri, 9 Nov 2018 09:38:55 -0700
|
||||
Subject: [PATCH] brcmfmac: support STA info struct v7
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The newest firmwares provide STA info using v7 of the struct. As v7
|
||||
isn't backward compatible, a union is needed.
|
||||
|
||||
Even though brcmfmac does not use any of the new info it's important to
|
||||
provide the proper struct buffer. Without this change new firmwares will
|
||||
fallback to the very limited v3 instead of something in between such as
|
||||
v4.
|
||||
|
||||
Signed-off-by: Dan Haab <dan.haab@luxul.com>
|
||||
Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/fwil_types.h | 40 +++++++++++++++----
|
||||
1 file changed, 33 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
|
||||
@@ -176,6 +176,8 @@
|
||||
|
||||
#define BRCMF_VHT_CAP_MCS_MAP_NSS_MAX 8
|
||||
|
||||
+#define BRCMF_HE_CAP_MCS_MAP_NSS_MAX 8
|
||||
+
|
||||
/* MAX_CHUNK_LEN is the maximum length for data passing to firmware in each
|
||||
* ioctl. It is relatively small because firmware has small maximum size input
|
||||
* playload restriction for ioctls.
|
||||
@@ -601,13 +603,37 @@ struct brcmf_sta_info_le {
|
||||
__le32 rx_pkts_retried; /* # rx with retry bit set */
|
||||
__le32 tx_rate_fallback; /* lowest fallback TX rate */
|
||||
|
||||
- /* Fields valid for ver >= 5 */
|
||||
- struct {
|
||||
- __le32 count; /* # rates in this set */
|
||||
- u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
|
||||
- u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */
|
||||
- __le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */
|
||||
- } rateset_adv;
|
||||
+ union {
|
||||
+ struct {
|
||||
+ struct {
|
||||
+ __le32 count; /* # rates in this set */
|
||||
+ u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
|
||||
+ u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */
|
||||
+ __le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */
|
||||
+ } rateset_adv;
|
||||
+ } v5;
|
||||
+
|
||||
+ struct {
|
||||
+ __le32 rx_dur_total; /* total user RX duration (estimated) */
|
||||
+ __le16 chanspec; /** chanspec this sta is on */
|
||||
+ __le16 pad_1;
|
||||
+ struct {
|
||||
+ __le16 version; /* version */
|
||||
+ __le16 len; /* length */
|
||||
+ __le32 count; /* # rates in this set */
|
||||
+ u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */
|
||||
+ u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */
|
||||
+ __le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */
|
||||
+ __le16 he_mcs[BRCMF_HE_CAP_MCS_MAP_NSS_MAX]; /* supported he mcs index bit map per nss */
|
||||
+ } rateset_adv; /* rateset along with mcs index bitmap */
|
||||
+ __le16 wpauth; /* authentication type */
|
||||
+ u8 algo; /* crypto algorithm */
|
||||
+ u8 pad_2;
|
||||
+ __le32 tx_rspec; /* Rate of last successful tx frame */
|
||||
+ __le32 rx_rspec; /* Rate of last successful rx frame */
|
||||
+ __le32 wnm_cap; /* wnm capabilities */
|
||||
+ } v7;
|
||||
+ };
|
||||
};
|
||||
|
||||
struct brcmf_chanspec_list {
|
||||
@ -1,39 +0,0 @@
|
||||
From 554da3868eb1d7174710c18b4ddd6ff01f6d612c Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 23 Nov 2018 10:11:48 +0100
|
||||
Subject: [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe
|
||||
|
||||
ARM systems with UEFI may have both devicetree (of) and DMI data in this
|
||||
case we end up setting brcmf_mp_device.board_type twice.
|
||||
|
||||
In this case we should prefer the devicetree data, because:
|
||||
1) The devicerree data is more reliable
|
||||
2) Some ARM systems (e.g. the Raspberry Pi 3 models) support both UEFI and
|
||||
classic uboot booting, the devicetree data is always there, so using it
|
||||
makes sure we ask for the same nvram file independent of how we booted.
|
||||
|
||||
This commit moves the brcmf_dmi_probe call to before the brcmf_of_probe
|
||||
call, so that the latter can override the value of the first if both are
|
||||
set.
|
||||
|
||||
Fixes: bd1e82bb420a ("brcmfmac: Set board_type from DMI on x86 based ...")
|
||||
Cc: Peter Robinson <pbrobinson@gmail.com>
|
||||
Tested-and-reported-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -449,8 +449,8 @@ struct brcmf_mp_device *brcmf_get_module
|
||||
}
|
||||
if (!found) {
|
||||
/* No platform data for this device, try OF and DMI data */
|
||||
- brcmf_of_probe(dev, bus_type, settings);
|
||||
brcmf_dmi_probe(settings, chip, chiprev);
|
||||
+ brcmf_of_probe(dev, bus_type, settings);
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user