rockchip:fix 6.1 kernel build
This commit is contained in:
@@ -298,7 +298,7 @@ menu "Target Images"
|
||||
depends on USES_BOOT_PART
|
||||
default 8 if TARGET_apm821xx_sata
|
||||
default 64 if TARGET_bcm27xx
|
||||
default 16
|
||||
default 64
|
||||
|
||||
config TARGET_ROOTFS_PARTSIZE
|
||||
int "Root filesystem partition size (in MB)"
|
||||
|
||||
@@ -10,10 +10,11 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=5.10.85-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.85/
|
||||
PKG_HASH:=0b5f2d5acf572c448f102a186aaccd8b77bda182ac5166c7b2e3217870162784
|
||||
PKG_VERSION:=6.1-rc8
|
||||
PKG_RELEASE:=2
|
||||
# PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||
PKG_HASH:=7f3d96c2573183cd79d6a3ebe5e1b7b73c19d1326d443c85b69c4181f14e6e2b
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
@@ -22,16 +23,10 @@ PKG_BUILD_PARALLEL:=1
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_DRIVERS = \
|
||||
adm8211 \
|
||||
airo \
|
||||
hermes hermes-pci hermes-pcmcia hermes-plx\
|
||||
lib80211 \
|
||||
mac80211-hwsim \
|
||||
mt7601u \
|
||||
p54-common p54-pci p54-usb \
|
||||
rsi91x rsi91x-usb rsi91x-sdio\
|
||||
wlcore wl12xx wl18xx \
|
||||
zd1211rw
|
||||
wlcore wl12xx wl18xx
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_kmod-mac80211 \
|
||||
@@ -57,7 +52,6 @@ config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
|
||||
|
||||
config-y:= \
|
||||
WLAN \
|
||||
CFG80211_WEXT \
|
||||
CFG80211_CERTIFICATION_ONUS \
|
||||
MAC80211_RC_MINSTREL \
|
||||
MAC80211_RC_MINSTREL_HT \
|
||||
@@ -98,7 +92,7 @@ PKG_CONFIG_DEPENDS += \
|
||||
define KernelPackage/cfg80211
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=cfg80211 - wireless configuration API
|
||||
DEPENDS+= +iw +wireless-regdb
|
||||
DEPENDS+= +iw +iwinfo +wireless-regdb +USE_RFKILL:kmod-rfkill
|
||||
ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/compat/compat.ko \
|
||||
@@ -127,7 +121,7 @@ define KernelPackage/mac80211
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Linux 802.11 Wireless Networking Stack
|
||||
# +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
|
||||
DEPENDS+= +kmod-cfg80211 +hostapd-common
|
||||
DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common
|
||||
KCONFIG:=\
|
||||
CONFIG_AVERAGE=y
|
||||
FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
|
||||
@@ -166,106 +160,10 @@ define KernelPackage/mac80211/description
|
||||
Generic IEEE 802.11 Networking Stack (mac80211)
|
||||
endef
|
||||
|
||||
define KernelPackage/adm8211
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=ADMTek 8211 support
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mac80211 +kmod-eeprom-93cx6
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/admtek/adm8211.ko
|
||||
AUTOLOAD:=$(call AutoProbe,adm8211)
|
||||
endef
|
||||
|
||||
define KernelPackage/airo
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Cisco Aironet driver
|
||||
DEPENDS+=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-cfg80211 @TARGET_x86 @BROKEN
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/cisco/airo.ko
|
||||
AUTOLOAD:=$(call AutoProbe,airo)
|
||||
endef
|
||||
|
||||
define KernelPackage/airo/description
|
||||
Kernel support for Cisco Aironet cards
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Hermes 802.11b chipset support
|
||||
DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT +kmod-crypto-michael-mic
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco.ko
|
||||
AUTOLOAD:=$(call AutoProbe,orinoco)
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes/description
|
||||
Kernel support for Hermes 802.11b chipsets
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes-pci
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Intersil Prism 2.5 PCI support
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-hermes
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,orinoco_pci)
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes-pci/description
|
||||
Kernel modules for Intersil Prism 2.5 PCI support
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes-plx
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=PLX9052 based PCI adaptor
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-hermes
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_plx.ko
|
||||
AUTOLOAD:=$(call AutoProbe,orinoco_plx)
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes-plx/description
|
||||
Kernel modules for Hermes in PLX9052 based PCI adaptors
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes-pcmcia
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Hermes based PCMCIA adaptors
|
||||
DEPENDS:=@PCMCIA_SUPPORT +kmod-hermes +kmod-pcmcia-core
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_cs.ko
|
||||
AUTOLOAD:=$(call AutoProbe,orinoco_cs)
|
||||
endef
|
||||
|
||||
define KernelPackage/hermes-pcmcia/description
|
||||
Kernel modules for Hermes based PCMCIA adaptors
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/lib80211
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=802.11 Networking stack
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-crypto-hash +kmod-crypto-ccm
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
|
||||
$(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
|
||||
$(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_ccmp.ko \
|
||||
$(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_tkip.ko
|
||||
AUTOLOAD:=$(call AutoProbe, \
|
||||
lib80211 \
|
||||
lib80211_crypt_wep \
|
||||
lib80211_crypt_ccmp \
|
||||
lib80211_crypt_tkip \
|
||||
)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib80211/description
|
||||
Kernel modules for 802.11 Networking stack
|
||||
Includes:
|
||||
- lib80211
|
||||
- lib80211_crypt_wep
|
||||
- lib80211_crypt_tkip
|
||||
- lib80211_crytp_ccmp
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/mac80211-hwsim
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=mac80211 HW simulation device
|
||||
DEPENDS+= +kmod-mac80211 +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT
|
||||
DEPENDS+= +kmod-mac80211 +@DRIVER_11AX_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
|
||||
endef
|
||||
@@ -279,38 +177,6 @@ define KernelPackage/mt7601u
|
||||
AUTOLOAD:=$(call AutoProbe,mt7601u)
|
||||
endef
|
||||
|
||||
define KernelPackage/p54/Default
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Prism54 Drivers
|
||||
endef
|
||||
|
||||
define KernelPackage/p54/description
|
||||
Kernel module for Prism54 chipsets (mac80211)
|
||||
endef
|
||||
|
||||
define KernelPackage/p54-common
|
||||
$(call KernelPackage/p54/Default)
|
||||
DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 +kmod-lib-crc-ccitt
|
||||
TITLE+= (COMMON)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54common.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/p54-pci
|
||||
$(call KernelPackage/p54/Default)
|
||||
TITLE+= (PCI)
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-p54-common +p54-pci-firmware
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,p54pci)
|
||||
endef
|
||||
|
||||
define KernelPackage/p54-usb
|
||||
$(call KernelPackage/p54/Default)
|
||||
TITLE+= (USB)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common +p54-usb-firmware
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54usb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,p54usb)
|
||||
endef
|
||||
|
||||
define KernelPackage/rsi91x
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Redpine Signals Inc 91x WLAN driver support
|
||||
@@ -376,23 +242,6 @@ define KernelPackage/wl18xx/description
|
||||
endef
|
||||
|
||||
|
||||
ZD1211FW_NAME:=zd1211-firmware
|
||||
ZD1211FW_VERSION:=1.4
|
||||
define Download/zd1211rw
|
||||
FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
|
||||
URL:=@SF/zd1211/
|
||||
HASH:=866308f6f59f7075f075d4959dff2ede47735c751251fecd1496df1ba4d338e1
|
||||
endef
|
||||
$(eval $(call Download,zd1211rw))
|
||||
|
||||
define KernelPackage/zd1211rw
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Zydas ZD1211 support
|
||||
DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zydas/zd1211rw/zd1211rw.ko
|
||||
AUTOLOAD:=$(call AutoProbe,zd1211rw)
|
||||
endef
|
||||
|
||||
ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
||||
config-y += \
|
||||
CFG80211_DEBUGFS \
|
||||
@@ -404,30 +253,14 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING
|
||||
IWLWIFI_DEVICE_TRACING
|
||||
endif
|
||||
|
||||
config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
|
||||
|
||||
config-$(call config_package,airo) += AIRO
|
||||
|
||||
config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
|
||||
config-$(call config_package,mt7601u) += MT7601U
|
||||
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,hermes) += HERMES
|
||||
config-$(call config_package,hermes-pci) += PCI_HERMES
|
||||
config-$(call config_package,hermes-plx) += PLX_HERMES
|
||||
config-$(call config_package,hermes-pcmcia) += PCMCIA_HERMES
|
||||
config-y += HERMES_PRISM
|
||||
|
||||
config-$(call config_package,adm8211) += ADM8211
|
||||
config-$(call config_package,wlcore) += WLCORE WLCORE_SDIO
|
||||
config-$(call config_package,wl12xx) += WL12XX
|
||||
config-$(call config_package,wl18xx) += WL18XX
|
||||
config-y += WL_TI WILINK_PLATFORM_DATA
|
||||
config-$(call config_package,zd1211rw) += ZD1211RW
|
||||
config-$(call config_package,rsi91x) += RSI_91X
|
||||
config-$(call config_package,rsi91x-usb) += RSI_USB
|
||||
config-$(call config_package,rsi91x-sdio) += RSI_SDIO
|
||||
@@ -464,9 +297,6 @@ define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(PKG_UNPACK)
|
||||
$(Build/Patch)
|
||||
$(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
|
||||
$(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
|
||||
$(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
|
||||
rm -rf \
|
||||
$(PKG_BUILD_DIR)/include/linux/ssb \
|
||||
$(PKG_BUILD_DIR)/include/linux/bcma \
|
||||
@@ -477,14 +307,14 @@ define Build/Prepare
|
||||
$(PKG_BUILD_DIR)/include/linux/crc8.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/wl12xx.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/spi/libertas_spi.h \
|
||||
$(PKG_BUILD_DIR)/include/linux/mhi.h \
|
||||
$(PKG_BUILD_DIR)/include/net/ieee80211.h \
|
||||
$(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
|
||||
|
||||
echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),)
|
||||
define Build/Compile/kmod
|
||||
rm -rf $(PKG_BUILD_DIR)/modules
|
||||
+$(MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules
|
||||
@@ -507,9 +337,14 @@ define Build/Patch
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/build,build/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/subsys,subsys/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath,ath/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath5k,ath5k/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rtl,rtl/)
|
||||
$(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
|
||||
endef
|
||||
|
||||
@@ -517,9 +352,14 @@ define Quilt/Refresh/Package
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/build,build/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/subsys,subsys/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath,ath/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath5k,ath5k/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/)
|
||||
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rtl,rtl/)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@@ -545,17 +385,11 @@ endef
|
||||
define KernelPackage/cfg80211/install
|
||||
$(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
|
||||
$(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
|
||||
$(INSTALL_DATA) ./files/lib/netifd/mac80211.sh $(1)/lib/netifd
|
||||
$(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
|
||||
$(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/10-wifi-detect
|
||||
endef
|
||||
|
||||
define KernelPackage/zd1211rw/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/zd1211
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
|
||||
endef
|
||||
|
||||
$(eval $(foreach drv,$(PKG_DRIVERS),$(call KernelPackage,$(drv))))
|
||||
$(eval $(call KernelPackage,cfg80211))
|
||||
$(eval $(call KernelPackage,mac80211))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
PKG_DRIVERS += \
|
||||
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \
|
||||
carl9170 owl-loader ar5523 wil6210
|
||||
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc \
|
||||
ath10k ath10k-pci ath10k-sdio ath10k-smallbuffers ath11k ath11k-ahb \
|
||||
ath11k-pci ar5523 carl9170 owl-loader wil6210
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_PACKAGE_ATH_DEBUG \
|
||||
@@ -12,6 +13,9 @@ PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_ATH9K_TX99 \
|
||||
CONFIG_ATH10K_LEDS \
|
||||
CONFIG_ATH10K_THERMAL \
|
||||
CONFIG_ATH11K_THERMAL \
|
||||
CONFIG_ATH11K_MEM_PROFILE_512MB \
|
||||
CONFIG_ATH11K_MEM_PROFILE_1GB \
|
||||
CONFIG_ATH_USER_REGD
|
||||
|
||||
ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
||||
@@ -19,6 +23,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
||||
ATH9K_DEBUGFS \
|
||||
ATH9K_HTC_DEBUGFS \
|
||||
ATH10K_DEBUGFS \
|
||||
ATH11K_DEBUGFS \
|
||||
CARL9170_DEBUGFS \
|
||||
ATH5K_DEBUG \
|
||||
ATH6KL_DEBUG \
|
||||
@@ -28,16 +33,17 @@ endif
|
||||
ifdef CONFIG_PACKAGE_MAC80211_TRACING
|
||||
config-y += \
|
||||
ATH10K_TRACING \
|
||||
ATH11K_TRACING \
|
||||
ATH6KL_TRACING \
|
||||
ATH_TRACEPOINTS \
|
||||
ATH5K_TRACER \
|
||||
WIL6210_TRACING
|
||||
endif
|
||||
|
||||
config-$(call config_package,ath) += ATH_CARDS ATH_COMMON ATH_REG_DYNAMIC_USER_REG_HINTS
|
||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
|
||||
config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
|
||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS
|
||||
config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
|
||||
config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL
|
||||
config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL
|
||||
config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
|
||||
config-$(call config_package,ath9k) += ATH9K
|
||||
config-$(call config_package,ath9k-common) += ATH9K_COMMON
|
||||
@@ -45,18 +51,27 @@ config-$(call config_package,owl-loader) += ATH9K_PCI_NO_EEPROM
|
||||
config-$(CONFIG_TARGET_ath79) += ATH9K_AHB
|
||||
config-$(CONFIG_TARGET_ipq40xx) += ATH10K_AHB
|
||||
config-$(CONFIG_PCI) += ATH9K_PCI
|
||||
config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
|
||||
config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD ATH_REG_DYNAMIC_USER_REG_HINTS
|
||||
config-$(CONFIG_ATH9K_HWRNG) += ATH9K_HWRNG
|
||||
config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM
|
||||
config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99
|
||||
config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
|
||||
config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
|
||||
config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
|
||||
config-$(CONFIG_ATH11K_THERMAL) += ATH11K_THERMA
|
||||
config-$(CONFIG_ATH11K_MEM_PROFILE_512MB) += ATH11K_MEM_PROFILE_512MB
|
||||
config-$(CONFIG_ATH11K_MEM_PROFILE_1GB) += ATH11K_MEM_PROFILE_1GB
|
||||
|
||||
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
||||
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
||||
config-$(call config_package,ath10k) += ATH10K
|
||||
config-$(call config_package,ath10k-pci) += ATH10K_PCI
|
||||
config-$(call config_package,ath10k-sdio) += ATH10K_SDIO
|
||||
config-$(call config_package,ath10k-smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS
|
||||
|
||||
config-$(call config_package,ath11k) += ATH11K
|
||||
config-$(call config_package,ath11k-ahb) += ATH11K_AHB
|
||||
config-$(call config_package,ath11k-pci) += ATH11K_PCI
|
||||
|
||||
config-$(call config_package,ath5k) += ATH5K
|
||||
ifdef CONFIG_TARGET_ath25
|
||||
config-y += ATH5K_AHB
|
||||
@@ -191,7 +206,7 @@ define KernelPackage/ath9k-common
|
||||
TITLE:=Atheros 802.11n wireless devices (common code for ath9k and ath9k_htc)
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
|
||||
HIDDEN:=1
|
||||
DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ath79 +kmod-ath +@DRIVER_11N_SUPPORT
|
||||
DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ath79 +kmod-ath +@DRIVER_11N_SUPPORT +kmod-random-core
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
|
||||
@@ -255,19 +270,17 @@ define KernelPackage/ath10k
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Atheros 802.11ac wireless cards support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath10k
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT \
|
||||
DEPENDS+= +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT \
|
||||
+ATH10K_THERMAL:kmod-hwmon-core +ATH10K_THERMAL:kmod-thermal
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath10k_pci)
|
||||
VARIANT:=regular
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath10k_core)
|
||||
MODPARAMS.ath10k_core:=frame_mode=2
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k/description
|
||||
This module adds support for wireless adapters based on
|
||||
Atheros IEEE 802.11ac family of chipsets. For now only
|
||||
PCI is supported.
|
||||
Atheros IEEE 802.11ac family of chipsets.
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k/config
|
||||
@@ -279,16 +292,116 @@ define KernelPackage/ath10k/config
|
||||
|
||||
config ATH10K_THERMAL
|
||||
bool "Enable thermal sensors and throttling support"
|
||||
default y
|
||||
depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers
|
||||
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-pci
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Atheros 802.11ac PCIE wireless cards support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath10k
|
||||
DEPENDS+= @PCI_SUPPORT kmod-ath10k
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath10k_pci)
|
||||
VARIANT:=regular
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-pci/description
|
||||
This module adds support for wireless adapters based on
|
||||
Atheros IEEE 802.11ac family of chipsets with PCIE bus.
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-sdio
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Atheros 802.11ac SDIO wireless cards support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath10k
|
||||
DEPENDS+= kmod-ath10k +kmod-mmc
|
||||
FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_sdio.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath10k_sdio)
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-sdio/description
|
||||
This module adds support for wireless adapters based on
|
||||
Atheros IEEE 802.11ac family of chipsets with SDIO bus.
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-smallbuffers
|
||||
$(call KernelPackage/ath10k)
|
||||
$(call KernelPackage/ath10k-pci)
|
||||
TITLE+= (small buffers for low-RAM devices)
|
||||
VARIANT:=smallbuffers
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Qualcomm 802.11ax wireless chipset support (common code)
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
|
||||
DEPENDS+= +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT \
|
||||
+kmod-qcom-qmi-helpers +kmod-crypto-michael-mic +ATH11K_THERMAL:kmod-hwmon-core \
|
||||
+ATH11K_THERMAL:kmod-thermal
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath11k)
|
||||
MODPARAMS.ath11k:=frame_mode=2
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k/description
|
||||
This module adds support for Qualcomm Technologies 802.11ax family of
|
||||
chipsets.
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k/config
|
||||
|
||||
config ATH11K_THERMAL
|
||||
bool "Enable thermal sensors and throttling support"
|
||||
depends on PACKAGE_kmod-ath11k
|
||||
default y if TARGET_ipq807x
|
||||
|
||||
if PACKAGE_kmod-ath11k
|
||||
|
||||
choice
|
||||
prompt "ath11k memory profile"
|
||||
default ATH11K_MEM_PROFILE_512MB
|
||||
help
|
||||
This allows selecting the ath11k memory size profile to be used.
|
||||
|
||||
config ATH11K_MEM_PROFILE_512MB
|
||||
bool "Use limits for the 512MB memory size"
|
||||
|
||||
config ATH11K_MEM_PROFILE_1GB
|
||||
bool "Use limits for the 1GB memory size"
|
||||
|
||||
endchoice
|
||||
endif
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k-ahb
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Qualcomm 802.11ax AHB wireless chipset support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
|
||||
DEPENDS+= @(TARGET_ipq60xx||TARGET_ipq807x) +kmod-ath11k +(LINUX_5_15||LINUX_6_1):kmod-qrtr-smd
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath11k_ahb)
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k-ahb/description
|
||||
This module adds support for Qualcomm Technologies 802.11ax family of
|
||||
chipsets with AHB bus.
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k-pci
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Qualcomm 802.11ax PCI wireless chipset support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
|
||||
DEPENDS+= @PCI_SUPPORT +(LINUX_5_15||LINUX_6_1):kmod-qrtr-mhi +kmod-ath11k
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath11k_pci)
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k-pci/description
|
||||
This module adds support for Qualcomm Technologies 802.11ax family of
|
||||
chipsets with PCI bus.
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Driver for Atheros AR9170 USB sticks
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PKG_DRIVERS += \
|
||||
b43 b43legacy brcmsmac brcmfmac brcmutil
|
||||
b43 brcmsmac brcmfmac brcmutil
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_PACKAGE_B43_DEBUG \
|
||||
@@ -24,9 +24,6 @@ config-$(CONFIG_PACKAGE_B43_PHY_HT) += B43_PHY_HT
|
||||
config-$(CONFIG_PACKAGE_B43_PIO) += B43_PIO
|
||||
config-$(CONFIG_PACKAGE_B43_DEBUG) += B43_DEBUG
|
||||
|
||||
config-$(call config_package,b43legacy) += B43LEGACY
|
||||
config-y += B43LEGACY_DMA_MODE
|
||||
|
||||
config-$(call config_package,brcmutil) += BRCMUTIL
|
||||
config-$(call config_package,brcmsmac) += BRCMSMAC
|
||||
config-$(call config_package,brcmfmac) += BRCMFMAC
|
||||
@@ -209,7 +206,7 @@ config PACKAGE_B43_USE_BCMA
|
||||
default "16,28,29,30" if TARGET_bcm47xx_mips74k
|
||||
default "5,6,7,8,9,10,11,13,15,16,28,29,30"
|
||||
help
|
||||
This is a comma seperated list of core revision numbers.
|
||||
This is a comma separated list of core revision numbers.
|
||||
|
||||
Example (keep files for rev5 only):
|
||||
5
|
||||
@@ -224,7 +221,7 @@ config PACKAGE_B43_USE_BCMA
|
||||
default "N,HT" if TARGET_bcm47xx_mips74k
|
||||
default "G,N,LP,HT"
|
||||
help
|
||||
This is a comma seperated list of PHY types:
|
||||
This is a comma separated list of PHY types:
|
||||
A => A-PHY
|
||||
AG => Dual A-PHY G-PHY
|
||||
G => G-PHY
|
||||
@@ -341,23 +338,6 @@ define KernelPackage/b43/description
|
||||
Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
|
||||
endef
|
||||
|
||||
define KernelPackage/b43legacy
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Broadcom 43xx-legacy wireless support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43
|
||||
KCONFIG:= \
|
||||
CONFIG_HW_RANDOM=y
|
||||
DEPENDS+= +kmod-mac80211 +!(TARGET_bcm47xx||TARGET_bcm63xx):kmod-ssb @!TARGET_bcm47xx_mips74k +b43legacy-firmware
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/b43legacy/b43legacy.ko
|
||||
AUTOLOAD:=$(call AutoProbe,b43legacy)
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define KernelPackage/b43legacy/description
|
||||
Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/brcmutil
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Broadcom IEEE802.11n common driver parts
|
||||
@@ -450,8 +430,8 @@ define KernelPackage/brcmfmac/config
|
||||
config BRCMFMAC_SDIO
|
||||
bool "Enable SDIO bus interface support"
|
||||
default y if TARGET_bcm27xx
|
||||
default y if TARGET_rockchip
|
||||
default y if TARGET_sunxi
|
||||
default y if TARGET_rockchip
|
||||
default n
|
||||
help
|
||||
Enable support for cards attached to an SDIO bus.
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
mac80211_phy_to_path() {
|
||||
local phy="$1"
|
||||
|
||||
[ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${phy} ] || return
|
||||
|
||||
local path="$(readlink -f /sys/class/ieee80211/${phy}/device)"
|
||||
[ -n "$path" ] || return
|
||||
|
||||
path="${path##/sys/devices/}"
|
||||
case "$path" in
|
||||
platform*/pci*) path="${path##platform/}";;
|
||||
esac
|
||||
|
||||
local p
|
||||
local seq=""
|
||||
for p in $(ls /sys/class/ieee80211/$phy/device/ieee80211); do
|
||||
[ "$p" = "$phy" ] && {
|
||||
echo "$path${seq:++$seq}"
|
||||
break
|
||||
}
|
||||
|
||||
seq=$((${seq:-0} + 1))
|
||||
done
|
||||
}
|
||||
|
||||
mac80211_path_to_phy() {
|
||||
local path="$1"
|
||||
|
||||
local p
|
||||
for p in $(ls /sys/class/ieee80211); do
|
||||
local cur="$(mac80211_phy_to_path "$p")"
|
||||
case "$cur" in
|
||||
*$path) echo "$p"; return;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
. /lib/netifd/netifd-wireless.sh
|
||||
. /lib/netifd/hostapd.sh
|
||||
. /lib/netifd/mac80211.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
init_wireless_driver "$@"
|
||||
|
||||
@@ -29,8 +29,8 @@ drv_mac80211_init_device_config() {
|
||||
config_add_string tx_burst
|
||||
config_add_string distance
|
||||
config_add_int beacon_int chanbw frag rts
|
||||
config_add_int rxantenna txantenna antenna_gain txpower
|
||||
config_add_boolean noscan ht_coex acs_exclude_dfs
|
||||
config_add_int rxantenna txantenna antenna_gain txpower min_tx_power
|
||||
config_add_boolean noscan ht_coex acs_exclude_dfs background_radar
|
||||
config_add_array ht_capab
|
||||
config_add_array channels
|
||||
config_add_array scan_list
|
||||
@@ -51,6 +51,8 @@ drv_mac80211_init_device_config() {
|
||||
rx_antenna_pattern \
|
||||
tx_antenna_pattern \
|
||||
he_spr_sr_control \
|
||||
he_spr_psr_enabled \
|
||||
he_bss_color_enabled \
|
||||
he_twt_required
|
||||
config_add_int \
|
||||
beamformer_antennas \
|
||||
@@ -138,13 +140,15 @@ mac80211_hostapd_setup_base() {
|
||||
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
|
||||
append base_cfg "acs_exclude_dfs=1" "$N"
|
||||
|
||||
json_get_vars noscan ht_coex vendor_vht
|
||||
json_get_vars noscan ht_coex vendor_vht min_tx_power:0
|
||||
json_get_values ht_capab_list ht_capab tx_burst
|
||||
json_get_values channel_list channels
|
||||
|
||||
[ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
|
||||
channel_list="$channel"
|
||||
|
||||
[ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power"
|
||||
|
||||
set_default noscan 0
|
||||
|
||||
[ "$noscan" -gt 0 ] && hostapd_noscan=1
|
||||
@@ -274,6 +278,11 @@ mac80211_hostapd_setup_base() {
|
||||
vht_center_seg0=$idx
|
||||
;;
|
||||
esac
|
||||
[ "$band" = "5g" ] && {
|
||||
json_get_vars background_radar:0
|
||||
|
||||
[ "$background_radar" -eq 1 ] && append base_cfg "enable_background_radar=1" "$N"
|
||||
}
|
||||
[ "$band" = "6g" ] && {
|
||||
op_class=
|
||||
case "$htmode" in
|
||||
@@ -407,20 +416,21 @@ mac80211_hostapd_setup_base() {
|
||||
if [ "$enable_ax" != "0" ]; then
|
||||
json_get_vars \
|
||||
he_su_beamformer:1 \
|
||||
he_su_beamformee:0 \
|
||||
he_su_beamformee:1 \
|
||||
he_mu_beamformer:1 \
|
||||
he_twt_required:0 \
|
||||
he_spr_sr_control:0 \
|
||||
he_spr_non_srg_obss_pd_max_offset:1 \
|
||||
he_bss_color
|
||||
he_spr_sr_control:3 \
|
||||
he_spr_psr_enabled:0 \
|
||||
he_spr_non_srg_obss_pd_max_offset:0 \
|
||||
he_bss_color:128 \
|
||||
he_bss_color_enabled:1
|
||||
|
||||
he_phy_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
|
||||
he_phy_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
|
||||
he_phy_cap=${he_phy_cap:2}
|
||||
he_mac_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
|
||||
he_mac_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
|
||||
he_mac_cap=${he_mac_cap:2}
|
||||
|
||||
append base_cfg "ieee80211ax=1" "$N"
|
||||
[ -n "$he_bss_color" ] && append base_cfg "he_bss_color=$he_bss_color" "$N"
|
||||
[ "$hwmode" = "a" ] && {
|
||||
append base_cfg "he_oper_chwidth=$vht_oper_chwidth" "$N"
|
||||
append base_cfg "he_oper_centr_freq_seg0_idx=$vht_center_seg0" "$N"
|
||||
@@ -430,10 +440,21 @@ mac80211_hostapd_setup_base() {
|
||||
he_su_beamformer:${he_phy_cap:6:2}:0x80:$he_su_beamformer \
|
||||
he_su_beamformee:${he_phy_cap:8:2}:0x1:$he_su_beamformee \
|
||||
he_mu_beamformer:${he_phy_cap:8:2}:0x2:$he_mu_beamformer \
|
||||
he_spr_sr_control:${he_phy_cap:14:2}:0x1:$he_spr_sr_control \
|
||||
he_spr_psr_enabled:${he_phy_cap:14:2}:0x1:$he_spr_psr_enabled \
|
||||
he_twt_required:${he_mac_cap:0:2}:0x6:$he_twt_required
|
||||
|
||||
[ "$he_spr_sr_control" -gt 0 ] && append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N"
|
||||
if [ "$he_bss_color_enabled" -gt 0 ]; then
|
||||
append base_cfg "he_bss_color=$he_bss_color" "$N"
|
||||
[ "$he_spr_non_srg_obss_pd_max_offset" -gt 0 ] && { \
|
||||
append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N"
|
||||
he_spr_sr_control=$((he_spr_sr_control | (1 << 2)))
|
||||
}
|
||||
[ "$he_spr_psr_enabled" -gt 0 ] || he_spr_sr_control=$((he_spr_sr_control | (1 << 0)))
|
||||
append base_cfg "he_spr_sr_control=$he_spr_sr_control" "$N"
|
||||
else
|
||||
append base_cfg "he_bss_color_disabled=1" "$N"
|
||||
fi
|
||||
|
||||
|
||||
append base_cfg "he_default_pe_duration=4" "$N"
|
||||
append base_cfg "he_rts_threshold=1023" "$N"
|
||||
@@ -563,7 +584,7 @@ mac80211_generate_mac() {
|
||||
find_phy() {
|
||||
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
|
||||
[ -n "$path" ] && {
|
||||
phy="$(mac80211_path_to_phy "$path")"
|
||||
phy="$(iwinfo nl80211 phyname "path=$path")"
|
||||
[ -n "$phy" ] && return 0
|
||||
}
|
||||
[ -n "$macaddr" ] && {
|
||||
@@ -620,8 +641,7 @@ mac80211_iw_interface_add() {
|
||||
}
|
||||
|
||||
[ "$rc" = 233 ] && {
|
||||
#iw dev "$ifname" del >/dev/null 2>&1
|
||||
ip link set dev "$ifname" down 2>/dev/null
|
||||
iw dev "$ifname" del >/dev/null 2>&1
|
||||
[ "$?" = 0 ] && {
|
||||
sleep 1
|
||||
|
||||
@@ -660,10 +680,12 @@ mac80211_prepare_vif() {
|
||||
|
||||
json_select ..
|
||||
|
||||
[ -n "$macaddr" ] || {
|
||||
if [ -z "$macaddr" ]; then
|
||||
macaddr="$(mac80211_generate_mac $phy)"
|
||||
macidx="$(($macidx + 1))"
|
||||
}
|
||||
elif [ "$macaddr" = 'random' ]; then
|
||||
macaddr="$(macaddr_random)"
|
||||
fi
|
||||
|
||||
json_add_object data
|
||||
json_add_string ifname "$ifname"
|
||||
@@ -725,7 +747,8 @@ mac80211_prepare_vif() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$mode" != "ap" ]; then
|
||||
# We do not set hostpad macaddr if it is 00:00:00:00:00:00
|
||||
if [ "$mode" != "ap" ] && [ "$macaddr" != "00:00:00:00:00:00" ]; then
|
||||
# ALL ap functionality will be passed to hostapd
|
||||
# All interfaces must have unique mac addresses
|
||||
# which can either be explicitly set in the device
|
||||
@@ -744,13 +767,12 @@ mac80211_setup_supplicant() {
|
||||
[ "$enable" = 0 ] && {
|
||||
ubus call wpa_supplicant.${phy} config_remove "{\"iface\":\"$ifname\"}"
|
||||
ip link set dev "$ifname" down
|
||||
#iw dev "$ifname" del
|
||||
iw dev "$ifname" del
|
||||
return 0
|
||||
}
|
||||
|
||||
wpa_supplicant_prepare_interface "$ifname" nl80211 || {
|
||||
#iw dev "$ifname" del
|
||||
ip link set dev "$ifname" down
|
||||
iw dev "$ifname" del
|
||||
return 1
|
||||
}
|
||||
if [ "$mode" = "sta" ]; then
|
||||
@@ -782,8 +804,7 @@ mac80211_setup_supplicant_noctl() {
|
||||
local enable=$1
|
||||
local spobj="$(ubus -S list | grep wpa_supplicant.${ifname})"
|
||||
wpa_supplicant_prepare_interface "$ifname" nl80211 || {
|
||||
#iw dev "$ifname" del
|
||||
ip link set dev "$ifname" down
|
||||
iw dev "$ifname" del
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -1003,7 +1024,7 @@ mac80211_vap_cleanup() {
|
||||
for wdev in $vaps; do
|
||||
[ "$service" != "none" ] && ubus call ${service} config_remove "{\"iface\":\"$wdev\"}"
|
||||
ip link set dev "$wdev" down 2>/dev/null
|
||||
#iw dev "$wdev" del
|
||||
iw dev "$wdev" del
|
||||
done
|
||||
}
|
||||
|
||||
@@ -1064,7 +1085,7 @@ drv_mac80211_setup() {
|
||||
done
|
||||
if [ "$found" = "0" ]; then
|
||||
ip link set dev "$wdev" down
|
||||
#iw dev "$wdev" del
|
||||
iw dev "$wdev" del
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
. /lib/netifd/mac80211.sh
|
||||
|
||||
append DRIVERS "mac80211"
|
||||
|
||||
@@ -11,7 +10,7 @@ lookup_phy() {
|
||||
local devpath
|
||||
config_get devpath "$device" path
|
||||
[ -n "$devpath" ] && {
|
||||
phy="$(mac80211_path_to_phy "$devpath")"
|
||||
phy="$(iwinfo nl80211 phyname "path=$devpath")"
|
||||
[ -n "$phy" ] && return
|
||||
}
|
||||
|
||||
@@ -161,54 +160,28 @@ detect_mac80211() {
|
||||
|
||||
get_band_defaults "$dev"
|
||||
|
||||
path="$(mac80211_phy_to_path "$dev")"
|
||||
path="$(iwinfo nl80211 path "$dev")"
|
||||
if [ -n "$path" ]; then
|
||||
dev_id="set wireless.radio${devidx}.path='$path'"
|
||||
else
|
||||
dev_id="set wireless.radio${devidx}.macaddr=$(cat /sys/class/ieee80211/${dev}/macaddress)"
|
||||
fi
|
||||
|
||||
if [ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${dev} ]; then
|
||||
product=`cat $(readlink -f /sys/class/ieee80211/${dev}/device)/uevent | grep PRODUCT= | cut -d= -f 2`
|
||||
else
|
||||
product=""
|
||||
fi
|
||||
|
||||
case "${product}" in
|
||||
"bda/c811/200" | \
|
||||
"bda/c820/200")
|
||||
# 80211ac 5Ghz 433Mb
|
||||
mode_band='5g'
|
||||
htmode='VHT80'
|
||||
channel='44'
|
||||
# 80211n 2.4Ghz 150Mb
|
||||
# mode_band='2g'
|
||||
# htmode='HT40'
|
||||
# channel='6'
|
||||
;;
|
||||
|
||||
*)
|
||||
country=""
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
uci -q batch <<-EOF
|
||||
set wireless.radio${devidx}=wifi-device
|
||||
set wireless.radio${devidx}.type=mac80211
|
||||
${dev_id}
|
||||
set wireless.radio${devidx}.channel=${channel}
|
||||
set wireless.radio${devidx}.band=${mode_band}
|
||||
set wireless.radio${devidx}.htmode=${htmode}
|
||||
set wireless.radio${devidx}.country='RU'
|
||||
set wireless.radio${devidx}.htmode=$htmode
|
||||
set wireless.radio${devidx}.disabled=0
|
||||
set wireless.radio${devidx}.country=US
|
||||
|
||||
set wireless.default_radio${devidx}=wifi-iface
|
||||
set wireless.default_radio${devidx}.device=radio${devidx}
|
||||
set wireless.default_radio${devidx}.network=lan
|
||||
set wireless.default_radio${devidx}.mode=ap
|
||||
set wireless.default_radio${devidx}.ssid=OpenWrt${devidx}
|
||||
set wireless.default_radio${devidx}.ssid=OpenWrt
|
||||
set wireless.default_radio${devidx}.encryption=none
|
||||
EOF
|
||||
uci -q commit wireless
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
PKG_DRIVERS += \
|
||||
iwl-legacy iwl3945 iwl4965 iwlwifi \
|
||||
libipw ipw2100 ipw2200 \
|
||||
PKG_DRIVERS += iwlwifi
|
||||
|
||||
config-$(call config_package,iwl-legacy) += IWLEGACY
|
||||
config-$(call config_package,iwl3945) += IWL3945
|
||||
config-$(call config_package,iwl4965) += IWL4965
|
||||
config-$(call config_package,iwlwifi) += IWLWIFI IWLDVM IWLMVM
|
||||
config-$(CONFIG_PACKAGE_IWLWIFI_DEBUG)+= IWLWIFI_DEBUG
|
||||
config-$(CONFIG_PACKAGE_IWLWIFI_DEBUGFS)+= IWLWIFI_DEBUGFS
|
||||
|
||||
config-$(call config_package,libipw) += LIBIPW
|
||||
config-$(call config_package,ipw2100) += IPW2100
|
||||
config-$(call config_package,ipw2200) += IPW2200
|
||||
|
||||
define KernelPackage/iwlwifi
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
||||
@@ -84,117 +75,3 @@ define KernelPackage/iwlwifi/config
|
||||
endif
|
||||
endef
|
||||
|
||||
define KernelPackage/iwl-legacy
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
|
||||
TITLE:=Intel legacy Wireless support
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwlegacy.ko
|
||||
AUTOLOAD:=$(call AutoProbe,iwlegacy)
|
||||
endef
|
||||
|
||||
define KernelPackage/iwl-legacy/description
|
||||
iwl-legacy kernel module for legacy Intel wireless support
|
||||
endef
|
||||
|
||||
define KernelPackage/iwl3945
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +iwl3945-firmware
|
||||
TITLE:=Intel iwl3945 Wireless support
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwl3945.ko
|
||||
AUTOLOAD:=$(call AutoProbe,iwl3945)
|
||||
endef
|
||||
|
||||
define KernelPackage/iwl3945/description
|
||||
iwl3945 kernel module for Intel 3945 support
|
||||
endef
|
||||
|
||||
define KernelPackage/iwl4965
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +@DRIVER_11N_SUPPORT +iwl4965-firmware
|
||||
TITLE:=Intel iwl4965 Wireless support
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwl4965.ko
|
||||
AUTOLOAD:=$(call AutoProbe,iwl4965)
|
||||
endef
|
||||
|
||||
define KernelPackage/iwl4965/description
|
||||
iwl4965 kernel module for Intel 4965 support
|
||||
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
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/libipw.ko
|
||||
AUTOLOAD:=$(call AutoProbe,libipw)
|
||||
endef
|
||||
|
||||
define KernelPackage/libipw/description
|
||||
Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200.
|
||||
endef
|
||||
|
||||
IPW2100_NAME:=ipw2100-fw
|
||||
IPW2100_VERSION:=1.3
|
||||
|
||||
define Download/ipw2100
|
||||
URL:= \
|
||||
https://src.fedoraproject.org/repo/pkgs/ipw2100-firmware/ipw2100-fw-1.3.tgz/46aa75bcda1a00efa841f9707bbbd113/ \
|
||||
https://archlinux.mirror.pkern.at/other/packages/ipw2100-fw/ \
|
||||
http://mirror.ox.ac.uk/sites/ftp.openbsd.org/pub/OpenBSD/distfiles/firmware/ \
|
||||
http://firmware.openbsd.org/firmware-dist/
|
||||
FILE:=$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
|
||||
HASH:=e1107c455e48d324a616b47a622593bc8413dcce72026f72731c0b03dae3a7a2
|
||||
endef
|
||||
$(eval $(call Download,ipw2100))
|
||||
|
||||
define KernelPackage/ipw2100
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Intel IPW2100 driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-libipw
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/ipw2100.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ipw2100)
|
||||
endef
|
||||
|
||||
define KernelPackage/ipw2100/description
|
||||
Kernel support for Intel IPW2100
|
||||
Includes:
|
||||
- ipw2100
|
||||
endef
|
||||
|
||||
IPW2200_NAME:=ipw2200-fw
|
||||
IPW2200_VERSION:=3.1
|
||||
|
||||
define Download/ipw2200
|
||||
URL:= \
|
||||
https://src.fedoraproject.org/repo/pkgs/ipw2200-firmware/ipw2200-fw-3.1.tgz/eaba788643c7cc7483dd67ace70f6e99/ \
|
||||
https://archlinux.mirror.pkern.at/other/packages/ipw2200-fw/ \
|
||||
http://mirror.ox.ac.uk/sites/ftp.openbsd.org/pub/OpenBSD/distfiles/firmware/ \
|
||||
http://firmware.openbsd.org/firmware-dist/
|
||||
FILE:=$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
|
||||
HASH:=c6818c11c18cc030d55ff83f64b2bad8feef485e7742f84f94a61d811a6258bd
|
||||
endef
|
||||
$(eval $(call Download,ipw2200))
|
||||
|
||||
define KernelPackage/ipw2200
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Intel IPW2200 driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-libipw
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/ipw2200.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ipw2200)
|
||||
endef
|
||||
|
||||
define KernelPackage/ipw2200/description
|
||||
Kernel support for Intel IPW2200
|
||||
Includes:
|
||||
- ipw2200
|
||||
endef
|
||||
|
||||
define KernelPackage/ipw2100/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ipw2100-$(IPW2100_VERSION)*.fw $(1)/lib/firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/ipw2200/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw $(1)/lib/firmware
|
||||
endef
|
||||
|
||||
@@ -1,49 +1,10 @@
|
||||
PKG_DRIVERS += \
|
||||
libertas-sdio libertas-usb libertas-spi \
|
||||
mwl8k mwifiex-pcie mwifiex-sdio
|
||||
|
||||
config-$(call config_package,libertas-sdio) += LIBERTAS LIBERTAS_SDIO
|
||||
config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB
|
||||
config-$(call config_package,libertas-spi) += LIBERTAS LIBERTAS_SPI
|
||||
config-$(call config_package,mwl8k) += MWL8K
|
||||
config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE
|
||||
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
|
||||
TITLE:=Marvell 88W8015 Wireless Driver
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/usb8xxx.ko
|
||||
AUTOLOAD:=$(call AutoProbe,libertas usb8xxx)
|
||||
endef
|
||||
|
||||
define KernelPackage/libertas-sdio
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
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 \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas_sdio.ko
|
||||
AUTOLOAD:=$(call AutoProbe,libertas libertas_sdio)
|
||||
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
|
||||
KCONFIG := \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
TITLE:=Marvell 88W8686 SPI Wireless Driver
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas_spi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,libertas libertas_spi)
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/mwl8k
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Sat, 16 Nov 2019 19:25:24 +0100
|
||||
Subject: [PATCH] owl_loader: compatibility patch
|
||||
|
||||
This patch includes OpenWrt specific changes that are
|
||||
not included in the upstream owl-loader.
|
||||
|
||||
This includes a platform data handling changes for ar71xx.
|
||||
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
@@ -103,6 +103,7 @@ static void owl_fw_cb(const struct firmw
|
||||
{
|
||||
struct pci_dev *pdev = (struct pci_dev *)context;
|
||||
struct owl_ctx *ctx = (struct owl_ctx *)pci_get_drvdata(pdev);
|
||||
+ struct ath9k_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct pci_bus *bus;
|
||||
|
||||
complete(&ctx->eeprom_load);
|
||||
@@ -118,6 +119,16 @@ static void owl_fw_cb(const struct firmw
|
||||
goto release;
|
||||
}
|
||||
|
||||
+ if (pdata) {
|
||||
+ memcpy(pdata->eeprom_data, fw->data, fw->size);
|
||||
+
|
||||
+ /*
|
||||
+ * eeprom has been successfully loaded - pass the data to ath9k
|
||||
+ * but remove the eeprom_name, so it doesn't try to load it too.
|
||||
+ */
|
||||
+ pdata->eeprom_name = NULL;
|
||||
+ }
|
||||
+
|
||||
if (ath9k_pci_fixup(pdev, (const u16 *)fw->data, fw->size))
|
||||
goto release;
|
||||
|
||||
@@ -137,8 +148,14 @@ release:
|
||||
static const char *owl_get_eeprom_name(struct pci_dev *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
+ struct ath9k_platform_data *pdata;
|
||||
char *eeprom_name;
|
||||
|
||||
+ /* try the existing platform data first */
|
||||
+ pdata = dev_get_platdata(dev);
|
||||
+ if (pdata && pdata->eeprom_name)
|
||||
+ return pdata->eeprom_name;
|
||||
+
|
||||
dev_dbg(dev, "using auto-generated eeprom filename\n");
|
||||
|
||||
eeprom_name = devm_kzalloc(dev, EEPROM_FILENAME_LEN, GFP_KERNEL);
|
||||
@@ -37,7 +37,7 @@
|
||||
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||
if (!wiphy->bands[band])
|
||||
continue;
|
||||
@@ -378,6 +387,9 @@ ath_reg_apply_ir_flags(struct wiphy *wip
|
||||
@@ -379,6 +388,9 @@ ath_reg_apply_ir_flags(struct wiphy *wip
|
||||
{
|
||||
struct ieee80211_supported_band *sband;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
sband = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
if (!sband)
|
||||
return;
|
||||
@@ -407,6 +419,9 @@ static void ath_reg_apply_radar_flags(st
|
||||
@@ -408,6 +420,9 @@ static void ath_reg_apply_radar_flags(st
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if (!wiphy->bands[NL80211_BAND_5GHZ])
|
||||
return;
|
||||
|
||||
@@ -639,6 +654,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
@@ -640,6 +655,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
const struct ieee80211_regdomain *regd;
|
||||
|
||||
wiphy->reg_notifier = reg_notifier;
|
||||
@@ -82,7 +82,7 @@
|
||||
help
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -85,6 +85,7 @@ ADM8211=
|
||||
@@ -110,6 +110,7 @@ ADM8211=
|
||||
ATH_COMMON=
|
||||
WLAN_VENDOR_ATH=
|
||||
ATH_DEBUG=
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3252,6 +3252,8 @@ void regulatory_hint_country_ie(struct w
|
||||
@@ -3370,6 +3370,8 @@ void regulatory_hint_country_ie(struct w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3503,6 +3505,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
@@ -3621,6 +3623,7 @@ static bool is_wiphy_all_set_reg_flag(en
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
FRANCE_RES = 0x31,
|
||||
FCC3_FCCA = 0x3A,
|
||||
FCC3_WORLD = 0x3B,
|
||||
@@ -172,6 +173,7 @@ static struct reg_dmn_pair_mapping regDo
|
||||
@@ -173,6 +174,7 @@ static struct reg_dmn_pair_mapping regDo
|
||||
{FCC2_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{FCC2_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_FCCA, CTL_FCC, CTL_FCC},
|
||||
@@ -16,7 +16,7 @@
|
||||
{FCC3_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC4_FCCA, CTL_FCC, CTL_FCC},
|
||||
@@ -483,6 +485,7 @@ static struct country_code_to_enum_rd al
|
||||
@@ -486,6 +488,7 @@ static struct country_code_to_enum_rd al
|
||||
{CTRY_UAE, NULL1_WORLD, "AE"},
|
||||
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
|
||||
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
bool ath_is_world_regd(struct ath_regulatory *reg)
|
||||
{
|
||||
return is_wwr_sku(ath_regd_get_eepromRD(reg));
|
||||
@@ -658,6 +666,9 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
@@ -659,6 +667,9 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -627,6 +627,12 @@ static int ath9k_of_init(struct ath_soft
|
||||
|
||||
ath_dbg(common, CONFIG, "parsing configuration from OF node\n");
|
||||
|
||||
+ if (of_property_read_bool(np, "qca,disable-2ghz"))
|
||||
+ ah->disable_2ghz = true;
|
||||
+
|
||||
+ if (of_property_read_bool(np, "qca,disable-5ghz"))
|
||||
+ ah->disable_5ghz = true;
|
||||
+
|
||||
if (of_property_read_bool(np, "qca,no-eeprom")) {
|
||||
/* ath9k-eeprom-<bus>-<id>.bin */
|
||||
scnprintf(eeprom_name, sizeof(eeprom_name),
|
||||
@@ -1,37 +0,0 @@
|
||||
From: Linus Lüssing <ll@simonwunderlich.de>
|
||||
Date: Wed, 5 Feb 2020 20:10:43 +0100
|
||||
Subject: ath10k: increase rx buffer size to 2048
|
||||
|
||||
Before, only frames with a maximum size of 1528 bytes could be
|
||||
transmitted between two 802.11s nodes.
|
||||
|
||||
For batman-adv for instance, which adds its own header to each frame,
|
||||
we typically need an MTU of at least 1532 bytes to be able to transmit
|
||||
without fragmentation.
|
||||
|
||||
This patch now increases the maxmimum frame size from 1528 to 1656
|
||||
bytes.
|
||||
|
||||
Tested with two ath10k devices in 802.11s mode, as well as with
|
||||
batman-adv on top of 802.11s with forwarding disabled.
|
||||
|
||||
Fix originally found and developed by Ben Greear.
|
||||
|
||||
Link: https://github.com/greearb/ath10k-ct/issues/89
|
||||
Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d
|
||||
Cc: Ben Greear <greearb@candelatech.com>
|
||||
Signed-off-by: Linus Lüssing <ll@simonwunderlich.de>
|
||||
|
||||
Forwarded: https://patchwork.kernel.org/patch/11367055/
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
@@ -2243,7 +2243,7 @@ struct htt_rx_chan_info {
|
||||
* Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size,
|
||||
* rounded up to a cache line size.
|
||||
*/
|
||||
-#define HTT_RX_BUF_SIZE 1920
|
||||
+#define HTT_RX_BUF_SIZE 2048
|
||||
#define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc))
|
||||
|
||||
/* Refill a bunch of RX buffers for each refill round so that FW/HW can handle
|
||||
@@ -37,7 +37,7 @@
|
||||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -142,6 +142,7 @@ ATH10K_SNOC=
|
||||
@@ -169,6 +169,7 @@ ATH10K_SNOC=
|
||||
ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
@@ -14,7 +14,7 @@ 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
|
||||
@@ -3189,6 +3189,16 @@ int ath10k_core_register(struct ath10k *
|
||||
@@ -3500,6 +3500,16 @@ int ath10k_core_register(struct ath10k *
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -9732,6 +9732,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
@@ -9909,6 +9909,21 @@ static int ath10k_mac_init_rd(struct ath
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10081,6 +10096,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10267,6 +10282,12 @@ int ath10k_mac_register(struct ath10k *a
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
@@ -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
|
||||
@@ -70,6 +70,16 @@ config ATH10K_DEBUGFS
|
||||
@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS
|
||||
|
||||
If unsure, say Y to make it easier to debug problems.
|
||||
|
||||
@@ -114,7 +114,7 @@ v13:
|
||||
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -145,6 +145,7 @@ ATH10K_DEBUG=
|
||||
@@ -170,6 +170,7 @@ ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
ATH10K_THERMAL=
|
||||
@@ -124,7 +124,7 @@ v13:
|
||||
WCN36XX=
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "testmode.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "coredump.h"
|
||||
@@ -132,7 +132,7 @@ v13:
|
||||
|
||||
unsigned int ath10k_debug_mask;
|
||||
EXPORT_SYMBOL(ath10k_debug_mask);
|
||||
@@ -61,6 +62,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -65,6 +66,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca988x hw2.0",
|
||||
@@ -140,7 +140,7 @@ v13:
|
||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -130,6 +132,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -144,6 +146,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9887 hw1.0",
|
||||
@@ -148,7 +148,7 @@ v13:
|
||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -335,6 +338,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -379,6 +382,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
@@ -156,7 +156,7 @@ v13:
|
||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.otp_exe_param = 0x00000700,
|
||||
@@ -375,6 +379,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -424,6 +428,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
@@ -164,7 +164,7 @@ v13:
|
||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -422,6 +427,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -476,6 +481,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
@@ -172,7 +172,7 @@ v13:
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -2904,6 +2910,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
@@ -3215,6 +3221,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
goto err_hif_stop;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ v13:
|
||||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -3162,9 +3172,18 @@ static void ath10k_core_register_work(st
|
||||
@@ -3473,9 +3483,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:
|
||||
@@ -3210,6 +3229,8 @@ void ath10k_core_unregister(struct ath10
|
||||
@@ -3521,6 +3540,8 @@ void ath10k_core_unregister(struct ath10
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
@@ -221,7 +221,7 @@ v13:
|
||||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -1237,6 +1238,13 @@ struct ath10k {
|
||||
@@ -1253,6 +1254,13 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
@@ -237,7 +237,7 @@ v13:
|
||||
u32 fw_crash_counter;
|
||||
--- a/drivers/net/wireless/ath/ath10k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/hw.h
|
||||
@@ -517,6 +517,7 @@ struct ath10k_hw_params {
|
||||
@@ -519,6 +519,7 @@ struct ath10k_hw_params {
|
||||
const char *name;
|
||||
u32 patch_load_addr;
|
||||
int uart_pin;
|
||||
@@ -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
|
||||
@@ -1290,6 +1290,10 @@ struct ath10k {
|
||||
bool coex_support;
|
||||
int coex_gpio_pin;
|
||||
@@ -1309,6 +1309,10 @@ struct ath10k {
|
||||
s32 tx_power_2g_limit;
|
||||
s32 tx_power_5g_limit;
|
||||
|
||||
+#ifdef CPTCFG_MAC80211_LEDS
|
||||
+ const char *led_default_trigger;
|
||||
@@ -42,7 +42,7 @@ 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
|
||||
@@ -10098,7 +10098,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
@@ -10284,7 +10284,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
@@ -28,7 +28,7 @@ Forwarded: no
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -1010,6 +1010,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
@@ -1028,6 +1028,40 @@ static inline int ath10k_vdev_setup_sync
|
||||
return ar->last_wmi_vdev_start_status;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ Forwarded: no
|
||||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1042,7 +1076,8 @@ static int ath10k_monitor_vdev_start(str
|
||||
@@ -1060,7 +1094,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);
|
||||
reinit_completion(&ar->vdev_delete_done);
|
||||
@@ -1488,7 +1523,8 @@ static int ath10k_vdev_start_restart(str
|
||||
@@ -1506,7 +1541,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;
|
||||
@@ -3259,7 +3295,8 @@ static int ath10k_update_channel_list(st
|
||||
@@ -3437,7 +3473,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;
|
||||
@@ -0,0 +1,37 @@
|
||||
From 22fb5991a44c78ff18ec0082dc90c809356eb893 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 27 Sep 2020 19:23:35 +0200
|
||||
Subject: [PATCH 1/2] ath10k: Try to get mac-address from dts
|
||||
|
||||
Most of embedded device that have the ath10k wifi integrated store the
|
||||
mac-address in nvmem partitions. Try to fetch the mac-address using the
|
||||
standard 'of_get_mac_address' than in all the check also try to fetch the
|
||||
address using the nvmem api searching for a defined 'mac-address' cell.
|
||||
Mac-address defined in the dts have priority than any other address found.
|
||||
|
||||
Tested-on: QCA9984 hw1.0 PCI 10.4
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/core.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/of.h>
|
||||
+#include <linux/of_net.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
@@ -3391,6 +3392,8 @@ static int ath10k_core_probe_fw(struct a
|
||||
|
||||
device_get_mac_address(ar->dev, ar->mac_addr);
|
||||
|
||||
+ of_get_mac_address(ar->dev->of_node, ar->mac_addr);
|
||||
+
|
||||
ret = ath10k_core_init_firmware_features(ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar, "fatal problem with firmware features: %d\n",
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -4718,6 +4718,7 @@ static void ath10k_mac_setup_ht_vht_cap(
|
||||
@@ -5034,6 +5034,7 @@ static void ath10k_mac_setup_ht_vht_cap(
|
||||
if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
|
||||
band = &ar->mac.sbands[NL80211_BAND_2GHZ];
|
||||
band->ht_cap = ht_cap;
|
||||
@@ -0,0 +1,78 @@
|
||||
From 81e60b2dfb2744ab6642c4aa62534b4f711fdc5d Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Date: Tue, 27 Sep 2022 09:18:54 +0300
|
||||
Subject: [PATCH] wifi: ath11k: stop tx queues immediately upon firmware exit
|
||||
|
||||
Currently, recovery flag is set immediately upon firmware
|
||||
exit but tx queues are stopped once firmware arrives back
|
||||
and is ready which is during ath11k_core_restart. Once
|
||||
ieee80211 hw restart is completed, tx queues are resumed.
|
||||
If during the time delta between firmware exit and firmware
|
||||
ready, mac80211 send packets, currently ath11k will drop it
|
||||
since recovery flag will be set. But warning prints will
|
||||
come -
|
||||
"ath11k c000000.wifi: failed to transmit frame -108"
|
||||
|
||||
If more tx packets are there, this could lead to flooding
|
||||
of above print.
|
||||
|
||||
However, actually tx queues should be stopped immediately
|
||||
when firmware leaves. This will prevent packets to get
|
||||
dropped when firmware is recovering.
|
||||
|
||||
Add fix to stop tx queues immediately after firmware exit.
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/core.c | 5 +----
|
||||
drivers/net/wireless/ath/ath11k/core.h | 1 +
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 3 +++
|
||||
3 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -1641,7 +1641,7 @@ static void ath11k_update_11d(struct wor
|
||||
}
|
||||
}
|
||||
|
||||
-static void ath11k_core_pre_reconfigure_recovery(struct ath11k_base *ab)
|
||||
+void ath11k_core_pre_reconfigure_recovery(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k *ar;
|
||||
struct ath11k_pdev *pdev;
|
||||
@@ -1730,9 +1730,6 @@ static void ath11k_core_restart(struct w
|
||||
struct ath11k_base *ab = container_of(work, struct ath11k_base, restart_work);
|
||||
int ret;
|
||||
|
||||
- if (!ab->is_reset)
|
||||
- ath11k_core_pre_reconfigure_recovery(ab);
|
||||
-
|
||||
ret = ath11k_core_reconfigure_on_crash(ab);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to reconfigure driver on crash recovery\n");
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -1157,6 +1157,7 @@ int ath11k_core_check_smbios(struct ath1
|
||||
void ath11k_core_halt(struct ath11k *ar);
|
||||
int ath11k_core_resume(struct ath11k_base *ab);
|
||||
int ath11k_core_suspend(struct ath11k_base *ab);
|
||||
+void ath11k_core_pre_reconfigure_recovery(struct ath11k_base *ab);
|
||||
|
||||
const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
|
||||
const char *filename);
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -3158,6 +3158,9 @@ static void ath11k_qmi_driver_event_work
|
||||
case ATH11K_QMI_EVENT_SERVER_EXIT:
|
||||
set_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags);
|
||||
set_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags);
|
||||
+
|
||||
+ if (!ab->is_reset)
|
||||
+ ath11k_core_pre_reconfigure_recovery(ab);
|
||||
break;
|
||||
case ATH11K_QMI_EVENT_REQUEST_MEM:
|
||||
ret = ath11k_qmi_event_mem_request(qmi);
|
||||
@@ -0,0 +1,45 @@
|
||||
From 45d2e268369b0c768d5a644f319758bcfd370521 Mon Sep 17 00:00:00 2001
|
||||
From: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Date: Wed, 28 Sep 2022 09:51:40 +0800
|
||||
Subject: [PATCH] wifi: ath11k: Don't exit on wakeup failure
|
||||
|
||||
Currently, ath11k_pcic_read() returns an error if wakeup()
|
||||
fails, this makes firmware crash debug quite hard because we can
|
||||
get nothing.
|
||||
|
||||
Change to go ahead on wakeup failure, in that case we still may
|
||||
get something valid to check. There should be no mislead due
|
||||
to incorrect content because we are aware of the failure with the
|
||||
log printed.
|
||||
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
|
||||
|
||||
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20220928015140.5431-1-quic_bqiang@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/pcic.c | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
|
||||
@@ -218,9 +218,16 @@ int ath11k_pcic_read(struct ath11k_base
|
||||
if (wakeup_required && ab->pci.ops->wakeup) {
|
||||
ret = ab->pci.ops->wakeup(ab);
|
||||
if (ret) {
|
||||
- ath11k_warn(ab, "failed to wakeup for read from 0x%x: %d\n",
|
||||
- start, ret);
|
||||
- return ret;
|
||||
+ ath11k_warn(ab,
|
||||
+ "wakeup failed, data may be invalid: %d",
|
||||
+ ret);
|
||||
+ /* Even though wakeup() failed, continue processing rather
|
||||
+ * than returning because some parts of the data may still
|
||||
+ * be valid and useful in some cases, e.g. could give us
|
||||
+ * some clues on firmware crash.
|
||||
+ * Mislead due to invalid data could be avoided because we
|
||||
+ * are aware of the wakeup failure.
|
||||
+ */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
From f74878433d5ade360447da5d92e9c2e535780d80 Mon Sep 17 00:00:00 2001
|
||||
From: Wen Gong <quic_wgong@quicinc.com>
|
||||
Date: Wed, 28 Sep 2022 03:38:32 -0400
|
||||
Subject: [PATCH] wifi: ath11k: fix warning in dma_free_coherent() of memory
|
||||
chunks while recovery
|
||||
|
||||
Commit 26f3a021b37c ("ath11k: allocate smaller chunks of memory for
|
||||
firmware") and commit f6f92968e1e5 ("ath11k: qmi: try to allocate a
|
||||
big block of DMA memory first") change ath11k to allocate the memory
|
||||
chunks for target twice while wlan load. It fails for the 1st time
|
||||
because of large memory and then changed to allocate many small chunks
|
||||
for the 2nd time sometimes as below log.
|
||||
|
||||
1st time failed:
|
||||
[10411.640620] ath11k_pci 0000:05:00.0: qmi firmware request memory request
|
||||
[10411.640625] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 6881280
|
||||
[10411.640630] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 3784704
|
||||
[10411.640658] ath11k_pci 0000:05:00.0: qmi dma allocation failed (6881280 B type 1), will try later with small size
|
||||
[10411.640671] ath11k_pci 0000:05:00.0: qmi delays mem_request 2
|
||||
[10411.640677] ath11k_pci 0000:05:00.0: qmi respond memory request delayed 1
|
||||
2nd time success:
|
||||
[10411.642004] ath11k_pci 0000:05:00.0: qmi firmware request memory request
|
||||
[10411.642008] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642012] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642014] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642016] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642018] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642020] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642022] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642024] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642027] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642029] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
[10411.642031] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 458752
|
||||
[10411.642033] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 131072
|
||||
[10411.642035] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288
|
||||
[10411.642037] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288
|
||||
[10411.642039] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288
|
||||
[10411.642041] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288
|
||||
[10411.642043] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288
|
||||
[10411.642045] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288
|
||||
[10411.642047] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 491520
|
||||
[10411.642049] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288
|
||||
|
||||
And then commit 5962f370ce41 ("ath11k: Reuse the available memory after
|
||||
firmware reload") skip the ath11k_qmi_free_resource() which frees the
|
||||
memory chunks while recovery, after that, when run recovery test on
|
||||
WCN6855, a warning happened every time as below and finally leads fail
|
||||
for recovery.
|
||||
|
||||
[ 159.570318] BUG: Bad page state in process kworker/u16:5 pfn:33300
|
||||
[ 159.570320] page:0000000096ffdbb9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x33300
|
||||
[ 159.570324] flags: 0xfffffc0000000(node=0|zone=1|lastcpupid=0x1fffff)
|
||||
[ 159.570329] raw: 000fffffc0000000 0000000000000000 dead000000000122 0000000000000000
|
||||
[ 159.570332] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
|
||||
[ 159.570334] page dumped because: nonzero _refcount
|
||||
[ 159.570440] firewire_ohci syscopyarea sysfillrect psmouse sdhci_pci ahci sysimgblt firewire_core fb_sys_fops libahci crc_itu_t cqhci drm sdhci e1000e wmi video
|
||||
[ 159.570460] CPU: 2 PID: 217 Comm: kworker/u16:5 Kdump: loaded Tainted: G B 5.19.0-rc1-wt-ath+ #3
|
||||
[ 159.570465] Hardware name: LENOVO 418065C/418065C, BIOS 83ET63WW (1.33 ) 07/29/2011
|
||||
[ 159.570467] Workqueue: qmi_msg_handler qmi_data_ready_work [qmi_helpers]
|
||||
[ 159.570475] Call Trace:
|
||||
[ 159.570476] <TASK>
|
||||
[ 159.570478] dump_stack_lvl+0x49/0x5f
|
||||
[ 159.570486] dump_stack+0x10/0x12
|
||||
[ 159.570493] bad_page+0xab/0xf0
|
||||
[ 159.570502] check_free_page_bad+0x66/0x70
|
||||
[ 159.570511] __free_pages_ok+0x530/0x9a0
|
||||
[ 159.570517] ? __dev_printk+0x58/0x6b
|
||||
[ 159.570525] ? _dev_printk+0x56/0x72
|
||||
[ 159.570534] ? qmi_decode+0x119/0x470 [qmi_helpers]
|
||||
[ 159.570543] __free_pages+0x91/0xd0
|
||||
[ 159.570548] dma_free_contiguous+0x50/0x60
|
||||
[ 159.570556] dma_direct_free+0xe5/0x140
|
||||
[ 159.570564] dma_free_attrs+0x35/0x50
|
||||
[ 159.570570] ath11k_qmi_msg_mem_request_cb+0x2ae/0x3c0 [ath11k]
|
||||
[ 159.570620] qmi_invoke_handler+0xac/0xe0 [qmi_helpers]
|
||||
[ 159.570630] qmi_handle_message+0x6d/0x180 [qmi_helpers]
|
||||
[ 159.570643] qmi_data_ready_work+0x2ca/0x440 [qmi_helpers]
|
||||
[ 159.570656] process_one_work+0x227/0x440
|
||||
[ 159.570667] worker_thread+0x31/0x3d0
|
||||
[ 159.570676] ? process_one_work+0x440/0x440
|
||||
[ 159.570685] kthread+0xfe/0x130
|
||||
[ 159.570692] ? kthread_complete_and_exit+0x20/0x20
|
||||
[ 159.570701] ret_from_fork+0x22/0x30
|
||||
[ 159.570712] </TASK>
|
||||
|
||||
The reason is because when wlan start to recovery, the type, size and
|
||||
count is not same for the 1st and 2nd QMI_WLFW_REQUEST_MEM_IND message,
|
||||
Then it leads the parameter size is not correct for the dma_free_coherent().
|
||||
For the chunk[1], the actual dma size is 524288 which allocate in the
|
||||
2nd time of the initial wlan load phase, and the size which pass to
|
||||
dma_free_coherent() is 3784704 which is got in the 1st time of recovery
|
||||
phase, then warning above happened.
|
||||
|
||||
Change to use prev_size of struct target_mem_chunk for the paramter of
|
||||
dma_free_coherent() since prev_size is the real size of last load/recovery.
|
||||
Also change to check both type and size of struct target_mem_chunk to
|
||||
reuse the memory to avoid mismatch buffer size for target. Then the
|
||||
warning disappear and recovery success. When the 1st QMI_WLFW_REQUEST_MEM_IND
|
||||
for recovery arrived, the trunk[0] is freed in ath11k_qmi_alloc_target_mem_chunk()
|
||||
and then dma_alloc_coherent() failed caused by large size, and then
|
||||
trunk[1] is freed in ath11k_qmi_free_target_mem_chunk(), the left 18
|
||||
trunks will be reuse for the 2nd QMI_WLFW_REQUEST_MEM_IND message.
|
||||
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
|
||||
Fixes: 5962f370ce41 ("ath11k: Reuse the available memory after firmware reload")
|
||||
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20220928073832.16251-1-quic_wgong@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -1961,7 +1961,7 @@ static void ath11k_qmi_free_target_mem_c
|
||||
continue;
|
||||
|
||||
dma_free_coherent(ab->dev,
|
||||
- ab->qmi.target_mem[i].size,
|
||||
+ ab->qmi.target_mem[i].prev_size,
|
||||
ab->qmi.target_mem[i].vaddr,
|
||||
ab->qmi.target_mem[i].paddr);
|
||||
ab->qmi.target_mem[i].vaddr = NULL;
|
||||
@@ -1982,12 +1982,12 @@ static int ath11k_qmi_alloc_target_mem_c
|
||||
* in such case, no need to allocate memory for FW again.
|
||||
*/
|
||||
if (chunk->vaddr) {
|
||||
- if (chunk->prev_type == chunk->type ||
|
||||
+ if (chunk->prev_type == chunk->type &&
|
||||
chunk->prev_size == chunk->size)
|
||||
continue;
|
||||
|
||||
/* cannot reuse the existing chunk */
|
||||
- dma_free_coherent(ab->dev, chunk->size,
|
||||
+ dma_free_coherent(ab->dev, chunk->prev_size,
|
||||
chunk->vaddr, chunk->paddr);
|
||||
chunk->vaddr = NULL;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
From a797f479bf3e02c6d179c2e6aeace7f9b22b0acd Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.i.king@gmail.com>
|
||||
Date: Wed, 28 Sep 2022 15:38:34 +0100
|
||||
Subject: [PATCH] wifi: ath11k: Fix spelling mistake "chnange" -> "change"
|
||||
|
||||
There is a spelling mistake in an ath11k_dbg debug message. Fix it.
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20220928143834.35189-1-colin.i.king@gmail.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/wmi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
|
||||
@@ -6829,7 +6829,7 @@ static void ath11k_wmi_event_peer_sta_ps
|
||||
}
|
||||
|
||||
ath11k_dbg(ab, ATH11K_DBG_WMI,
|
||||
- "peer sta ps chnange ev addr %pM state %u sup_bitmap %x ps_valid %u ts %u\n",
|
||||
+ "peer sta ps change ev addr %pM state %u sup_bitmap %x ps_valid %u ts %u\n",
|
||||
ev->peer_macaddr.addr, ev->peer_ps_state,
|
||||
ev->ps_supported_bitmap, ev->peer_ps_valid,
|
||||
ev->peer_ps_timestamp);
|
||||
@@ -0,0 +1,225 @@
|
||||
From 3ff51d7416ee1ea2d771051a0ffa1ec8be054768 Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Date: Wed, 5 Oct 2022 15:24:30 +0530
|
||||
Subject: [PATCH 6/9] wifi: ath11k: fix firmware assert during bandwidth change
|
||||
for peer sta
|
||||
|
||||
Currently, ath11k sends peer assoc command for each peer to
|
||||
firmware when bandwidth changes. Peer assoc command is a
|
||||
bulky command and if many clients are connected, this could
|
||||
lead to firmware buffer getting overflowed leading to a firmware
|
||||
assert.
|
||||
|
||||
However, during bandwidth change, only phymode and bandwidth
|
||||
also can be updated by WMI set peer param command. This makes
|
||||
the overall command light when compared to peer assoc and for
|
||||
multi-client cases, firmware buffer overflow also does not
|
||||
occur.
|
||||
|
||||
Remove sending peer assoc command during sta bandwidth change
|
||||
and instead add sending WMI set peer param command for phymode
|
||||
and bandwidth.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Fixes: f187fe8e3bc65 ("ath11k: fix firmware crash during channel switch")
|
||||
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221005095430.19890-1-quic_adisi@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/core.h | 2 +
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 122 +++++++++++++++++--------
|
||||
2 files changed, 87 insertions(+), 37 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -505,6 +505,8 @@ struct ath11k_sta {
|
||||
u64 ps_start_jiffies;
|
||||
u64 ps_total_duration;
|
||||
bool peer_current_ps_valid;
|
||||
+
|
||||
+ u32 bw_prev;
|
||||
};
|
||||
|
||||
#define ATH11K_MIN_5G_FREQ 4150
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4215,10 +4215,11 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
const u16 *he_mcs_mask;
|
||||
- u32 changed, bw, nss, smps;
|
||||
+ u32 changed, bw, nss, smps, bw_prev;
|
||||
int err, num_vht_rates, num_he_rates;
|
||||
const struct cfg80211_bitrate_mask *mask;
|
||||
struct peer_assoc_params peer_arg;
|
||||
+ enum wmi_phy_mode peer_phymode;
|
||||
|
||||
arsta = container_of(wk, struct ath11k_sta, update_wk);
|
||||
sta = container_of((void *)arsta, struct ieee80211_sta, drv_priv);
|
||||
@@ -4239,6 +4240,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
arsta->changed = 0;
|
||||
|
||||
bw = arsta->bw;
|
||||
+ bw_prev = arsta->bw_prev;
|
||||
nss = arsta->nss;
|
||||
smps = arsta->smps;
|
||||
|
||||
@@ -4252,26 +4254,57 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
ath11k_mac_max_he_nss(he_mcs_mask)));
|
||||
|
||||
if (changed & IEEE80211_RC_BW_CHANGED) {
|
||||
- /* Send peer assoc command before set peer bandwidth param to
|
||||
- * avoid the mismatch between the peer phymode and the peer
|
||||
- * bandwidth.
|
||||
- */
|
||||
- ath11k_peer_assoc_prepare(ar, arvif->vif, sta, &peer_arg, true);
|
||||
+ /* Get the peer phymode */
|
||||
+ ath11k_peer_assoc_h_phymode(ar, arvif->vif, sta, &peer_arg);
|
||||
+ peer_phymode = peer_arg.peer_phymode;
|
||||
+
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac update sta %pM peer bw %d phymode %d\n",
|
||||
+ sta->addr, bw, peer_phymode);
|
||||
+
|
||||
+ if (bw > bw_prev) {
|
||||
+ /* BW is upgraded. In this case we send WMI_PEER_PHYMODE
|
||||
+ * followed by WMI_PEER_CHWIDTH
|
||||
+ */
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac BW upgrade for sta %pM new BW %d, old BW %d\n",
|
||||
+ sta->addr, bw, bw_prev);
|
||||
+
|
||||
+ err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
+ WMI_PEER_PHYMODE, peer_phymode);
|
||||
+
|
||||
+ if (err) {
|
||||
+ ath11k_warn(ar->ab, "failed to update STA %pM peer phymode %d: %d\n",
|
||||
+ sta->addr, peer_phymode, err);
|
||||
+ goto err_rc_bw_changed;
|
||||
+ }
|
||||
|
||||
- peer_arg.is_assoc = false;
|
||||
- err = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg);
|
||||
- if (err) {
|
||||
- ath11k_warn(ar->ab, "failed to send peer assoc for STA %pM vdev %i: %d\n",
|
||||
- sta->addr, arvif->vdev_id, err);
|
||||
- } else if (wait_for_completion_timeout(&ar->peer_assoc_done, 1 * HZ)) {
|
||||
err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
WMI_PEER_CHWIDTH, bw);
|
||||
+
|
||||
if (err)
|
||||
ath11k_warn(ar->ab, "failed to update STA %pM peer bw %d: %d\n",
|
||||
sta->addr, bw, err);
|
||||
} else {
|
||||
- ath11k_warn(ar->ab, "failed to get peer assoc conf event for %pM vdev %i\n",
|
||||
- sta->addr, arvif->vdev_id);
|
||||
+ /* BW is downgraded. In this case we send WMI_PEER_CHWIDTH
|
||||
+ * followed by WMI_PEER_PHYMODE
|
||||
+ */
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac BW downgrade for sta %pM new BW %d,old BW %d\n",
|
||||
+ sta->addr, bw, bw_prev);
|
||||
+
|
||||
+ err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
+ WMI_PEER_CHWIDTH, bw);
|
||||
+
|
||||
+ if (err) {
|
||||
+ ath11k_warn(ar->ab, "failed to update STA %pM peer bw %d: %d\n",
|
||||
+ sta->addr, bw, err);
|
||||
+ goto err_rc_bw_changed;
|
||||
+ }
|
||||
+
|
||||
+ err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
|
||||
+ WMI_PEER_PHYMODE, peer_phymode);
|
||||
+
|
||||
+ if (err)
|
||||
+ ath11k_warn(ar->ab, "failed to update STA %pM peer phymode %d: %d\n",
|
||||
+ sta->addr, peer_phymode, err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4352,6 +4385,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
}
|
||||
}
|
||||
|
||||
+err_rc_bw_changed:
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
}
|
||||
|
||||
@@ -4505,6 +4539,34 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static u32 ath11k_mac_ieee80211_sta_bw_to_wmi(struct ath11k *ar,
|
||||
+ struct ieee80211_sta *sta)
|
||||
+{
|
||||
+ u32 bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
+
|
||||
+ switch (sta->deflink.bandwidth) {
|
||||
+ case IEEE80211_STA_RX_BW_20:
|
||||
+ bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
+ break;
|
||||
+ case IEEE80211_STA_RX_BW_40:
|
||||
+ bw = WMI_PEER_CHWIDTH_40MHZ;
|
||||
+ break;
|
||||
+ case IEEE80211_STA_RX_BW_80:
|
||||
+ bw = WMI_PEER_CHWIDTH_80MHZ;
|
||||
+ break;
|
||||
+ case IEEE80211_STA_RX_BW_160:
|
||||
+ bw = WMI_PEER_CHWIDTH_160MHZ;
|
||||
+ break;
|
||||
+ default:
|
||||
+ ath11k_warn(ar->ab, "Invalid bandwidth %d for %pM\n",
|
||||
+ sta->deflink.bandwidth, sta->addr);
|
||||
+ bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return bw;
|
||||
+}
|
||||
+
|
||||
static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
@@ -4590,6 +4652,12 @@ static int ath11k_mac_op_sta_state(struc
|
||||
if (ret)
|
||||
ath11k_warn(ar->ab, "Failed to associate station: %pM\n",
|
||||
sta->addr);
|
||||
+
|
||||
+ spin_lock_bh(&ar->data_lock);
|
||||
+ /* Set arsta bw and prev bw */
|
||||
+ arsta->bw = ath11k_mac_ieee80211_sta_bw_to_wmi(ar, sta);
|
||||
+ arsta->bw_prev = arsta->bw;
|
||||
+ spin_unlock_bh(&ar->data_lock);
|
||||
} else if (old_state == IEEE80211_STA_ASSOC &&
|
||||
new_state == IEEE80211_STA_AUTHORIZED) {
|
||||
spin_lock_bh(&ar->ab->base_lock);
|
||||
@@ -4713,28 +4781,8 @@ static void ath11k_mac_op_sta_rc_update(
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
|
||||
if (changed & IEEE80211_RC_BW_CHANGED) {
|
||||
- bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
-
|
||||
- switch (sta->deflink.bandwidth) {
|
||||
- case IEEE80211_STA_RX_BW_20:
|
||||
- bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
- break;
|
||||
- case IEEE80211_STA_RX_BW_40:
|
||||
- bw = WMI_PEER_CHWIDTH_40MHZ;
|
||||
- break;
|
||||
- case IEEE80211_STA_RX_BW_80:
|
||||
- bw = WMI_PEER_CHWIDTH_80MHZ;
|
||||
- break;
|
||||
- case IEEE80211_STA_RX_BW_160:
|
||||
- bw = WMI_PEER_CHWIDTH_160MHZ;
|
||||
- break;
|
||||
- default:
|
||||
- ath11k_warn(ar->ab, "Invalid bandwidth %d in rc update for %pM\n",
|
||||
- sta->deflink.bandwidth, sta->addr);
|
||||
- bw = WMI_PEER_CHWIDTH_20MHZ;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
+ bw = ath11k_mac_ieee80211_sta_bw_to_wmi(ar, sta);
|
||||
+ arsta->bw_prev = arsta->bw;
|
||||
arsta->bw = bw;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From 638b26652b0438563a76ec90014c8cba34db982b Mon Sep 17 00:00:00 2001
|
||||
From: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
|
||||
Date: Thu, 6 Oct 2022 06:28:42 +0530
|
||||
Subject: [PATCH 7/9] wifi: ath11k: suppress add interface error
|
||||
|
||||
In the VIF (other than monitor type) creation request, we should not
|
||||
throw the error code when the monitor VIF creation fails, since the
|
||||
actual VIF creation succeeds. If we throw the error code from driver
|
||||
then the actual VIF creation get fail. So suppress the monitor VIF
|
||||
creation error by throwing warning message instead of error code.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6421,18 +6421,16 @@ static int ath11k_mac_op_add_interface(s
|
||||
|
||||
ath11k_dp_vdev_tx_attach(ar, arvif);
|
||||
|
||||
+ ath11k_debugfs_add_interface(arvif);
|
||||
+
|
||||
if (vif->type != NL80211_IFTYPE_MONITOR &&
|
||||
test_bit(ATH11K_FLAG_MONITOR_CONF_ENABLED, &ar->monitor_flags)) {
|
||||
ret = ath11k_mac_monitor_vdev_create(ar);
|
||||
- if (ret) {
|
||||
+ if (ret)
|
||||
ath11k_warn(ar->ab, "failed to create monitor vdev during add interface: %d",
|
||||
ret);
|
||||
- goto err_peer_del;
|
||||
- }
|
||||
}
|
||||
|
||||
- ath11k_debugfs_add_interface(arvif);
|
||||
-
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
return 0;
|
||||
@@ -6457,7 +6455,6 @@ err_vdev_del:
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
err:
|
||||
- ath11k_debugfs_remove_interface(arvif);
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
return ret;
|
||||
@@ -0,0 +1,102 @@
|
||||
From c362daa213cdeb0a9e7c2ed84849544c24505720 Mon Sep 17 00:00:00 2001
|
||||
From: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
|
||||
Date: Fri, 7 Oct 2022 10:41:30 +0530
|
||||
Subject: [PATCH 8/9] wifi: ath11k: add support to configure channel dwell time
|
||||
|
||||
Add support to configure channel dwell time during scan.
|
||||
Dwell time help to stay on the channel for a specified duration
|
||||
during scan and aid userspace in finding WiFi networks. Very
|
||||
useful in passive scans where longer dwell times are needed
|
||||
to find the WiFi networks.
|
||||
|
||||
Configure channel dwell time from duration of the scan request
|
||||
received from mac80211 when the duration is non-zero. When the
|
||||
scan request does not have duration value, use the default ones,
|
||||
the current implementation.
|
||||
|
||||
Advertise corresponding feature flag NL80211_EXT_FEATURE_SET_SCAN_DWELL
|
||||
to enable the feature.
|
||||
|
||||
Change is applicable for all ath11k hardware.
|
||||
|
||||
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
|
||||
|
||||
Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
|
||||
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 33 +++++++++++++++++++++++----
|
||||
1 file changed, 29 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -241,7 +241,10 @@ const struct htt_rx_ring_tlv_filter ath1
|
||||
#define ath11k_a_rates (ath11k_legacy_rates + 4)
|
||||
#define ath11k_a_rates_size (ARRAY_SIZE(ath11k_legacy_rates) - 4)
|
||||
|
||||
-#define ATH11K_MAC_SCAN_TIMEOUT_MSECS 200 /* in msecs */
|
||||
+#define ATH11K_MAC_SCAN_CMD_EVT_OVERHEAD 200 /* in msecs */
|
||||
+
|
||||
+/* Overhead due to the processing of channel switch events from FW */
|
||||
+#define ATH11K_SCAN_CHANNEL_SWITCH_WMI_EVT_OVERHEAD 10 /* in msecs */
|
||||
|
||||
static const u32 ath11k_smps_map[] = {
|
||||
[WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC,
|
||||
@@ -3612,6 +3615,7 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
struct scan_req_params arg;
|
||||
int ret = 0;
|
||||
int i;
|
||||
+ u32 scan_timeout;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
@@ -3681,6 +3685,26 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
ether_addr_copy(arg.mac_mask.addr, req->mac_addr_mask);
|
||||
}
|
||||
|
||||
+ /* if duration is set, default dwell times will be overwritten */
|
||||
+ if (req->duration) {
|
||||
+ arg.dwell_time_active = req->duration;
|
||||
+ arg.dwell_time_active_2g = req->duration;
|
||||
+ arg.dwell_time_active_6g = req->duration;
|
||||
+ arg.dwell_time_passive = req->duration;
|
||||
+ arg.dwell_time_passive_6g = req->duration;
|
||||
+ arg.burst_duration = req->duration;
|
||||
+
|
||||
+ scan_timeout = min_t(u32, arg.max_rest_time *
|
||||
+ (arg.num_chan - 1) + (req->duration +
|
||||
+ ATH11K_SCAN_CHANNEL_SWITCH_WMI_EVT_OVERHEAD) *
|
||||
+ arg.num_chan, arg.max_scan_time);
|
||||
+ } else {
|
||||
+ scan_timeout = arg.max_scan_time;
|
||||
+ }
|
||||
+
|
||||
+ /* Add a margin to account for event/command processing */
|
||||
+ scan_timeout += ATH11K_MAC_SCAN_CMD_EVT_OVERHEAD;
|
||||
+
|
||||
ret = ath11k_start_scan(ar, &arg);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
|
||||
@@ -3689,10 +3713,8 @@ static int ath11k_mac_op_hw_scan(struct
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
}
|
||||
|
||||
- /* Add a 200ms margin to account for event/command processing */
|
||||
ieee80211_queue_delayed_work(ar->hw, &ar->scan.timeout,
|
||||
- msecs_to_jiffies(arg.max_scan_time +
|
||||
- ATH11K_MAC_SCAN_TIMEOUT_MSECS));
|
||||
+ msecs_to_jiffies(scan_timeout));
|
||||
|
||||
exit:
|
||||
kfree(arg.chan_list);
|
||||
@@ -9060,6 +9082,9 @@ static int __ath11k_mac_register(struct
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP);
|
||||
}
|
||||
|
||||
+ wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
+ NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
||||
+
|
||||
ath11k_reg_init(ar);
|
||||
|
||||
if (!test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags)) {
|
||||
@@ -0,0 +1,39 @@
|
||||
From 3f9b09ccf7d5f23066b02881a737bee42def9d1a Mon Sep 17 00:00:00 2001
|
||||
From: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Date: Mon, 10 Oct 2022 11:32:37 +0800
|
||||
Subject: [PATCH 9/9] wifi: ath11k: Send PME message during wakeup from D3cold
|
||||
|
||||
We are seeing system stuck on some specific platforms due to
|
||||
WLAN chip fails to wakeup from D3cold state.
|
||||
|
||||
With this flag, firmware will send PME message during wakeup
|
||||
and this issue is gone.
|
||||
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
|
||||
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221010033237.415478-1-quic_bqiang@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02
|
||||
#define HOST_CSTATE_BIT 0x04
|
||||
#define PLATFORM_CAP_PCIE_GLOBAL_RESET 0x08
|
||||
+#define PLATFORM_CAP_PCIE_PME_D3COLD 0x10
|
||||
|
||||
#define FW_BUILD_ID_MASK "QC_IMAGE_VERSION_STRING="
|
||||
|
||||
@@ -1752,6 +1753,8 @@ static int ath11k_qmi_host_cap_send(stru
|
||||
if (ab->hw_params.global_reset)
|
||||
req.nm_modem |= PLATFORM_CAP_PCIE_GLOBAL_RESET;
|
||||
|
||||
+ req.nm_modem |= PLATFORM_CAP_PCIE_PME_D3COLD;
|
||||
+
|
||||
ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi host cap request\n");
|
||||
|
||||
ret = qmi_txn_init(&ab->qmi.handle, &txn,
|
||||
@@ -0,0 +1,116 @@
|
||||
From 3811fa1f231f1a3e29759efef4992116604aab8b Mon Sep 17 00:00:00 2001
|
||||
From: Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>
|
||||
Date: Tue, 11 Oct 2022 15:23:46 +0530
|
||||
Subject: [PATCH] wifi: ath11k: Fix firmware crash on vdev delete race
|
||||
condition
|
||||
|
||||
Current code does not wait for vdev delete completion on vdev create
|
||||
failures and tries to send another vdev create followed by vdev set
|
||||
param to firmware with same vdev id. This causes firmware crash.
|
||||
Fix this crash by waiting for vdev delete completion on vdev
|
||||
create failures.
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.6.0.1-00905-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 60 +++++++++++++++++----------
|
||||
1 file changed, 37 insertions(+), 23 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6233,6 +6233,40 @@ void ath11k_mac_11d_scan_stop_all(struct
|
||||
}
|
||||
}
|
||||
|
||||
+static int ath11k_mac_vdev_delete(struct ath11k *ar, struct ath11k_vif *arvif)
|
||||
+{
|
||||
+ unsigned long time_left;
|
||||
+ struct ieee80211_vif *vif = arvif->vif;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ lockdep_assert_held(&ar->conf_mutex);
|
||||
+
|
||||
+ reinit_completion(&ar->vdev_delete_done);
|
||||
+
|
||||
+ ret = ath11k_wmi_vdev_delete(ar, arvif->vdev_id);
|
||||
+ if (ret) {
|
||||
+ ath11k_warn(ar->ab, "failed to delete WMI vdev %d: %d\n",
|
||||
+ arvif->vdev_id, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ time_left = wait_for_completion_timeout(&ar->vdev_delete_done,
|
||||
+ ATH11K_VDEV_DELETE_TIMEOUT_HZ);
|
||||
+ if (time_left == 0) {
|
||||
+ ath11k_warn(ar->ab, "Timeout in receiving vdev delete response\n");
|
||||
+ return -ETIMEDOUT;
|
||||
+ }
|
||||
+
|
||||
+ ar->ab->free_vdev_map |= 1LL << (arvif->vdev_id);
|
||||
+ ar->allocated_vdev_map &= ~(1LL << arvif->vdev_id);
|
||||
+ ar->num_created_vdevs--;
|
||||
+
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev %pM deleted, vdev_id %d\n",
|
||||
+ vif->addr, arvif->vdev_id);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -6468,10 +6502,7 @@ err_peer_del:
|
||||
}
|
||||
|
||||
err_vdev_del:
|
||||
- ath11k_wmi_vdev_delete(ar, arvif->vdev_id);
|
||||
- ar->num_created_vdevs--;
|
||||
- ar->allocated_vdev_map &= ~(1LL << arvif->vdev_id);
|
||||
- ab->free_vdev_map |= 1LL << arvif->vdev_id;
|
||||
+ ath11k_mac_vdev_delete(ar, arvif);
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
list_del(&arvif->list);
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
@@ -6499,7 +6530,6 @@ static void ath11k_mac_op_remove_interfa
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
- unsigned long time_left;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -6520,29 +6550,13 @@ static void ath11k_mac_op_remove_interfa
|
||||
arvif->vdev_id, ret);
|
||||
}
|
||||
|
||||
- reinit_completion(&ar->vdev_delete_done);
|
||||
-
|
||||
- ret = ath11k_wmi_vdev_delete(ar, arvif->vdev_id);
|
||||
+ ret = ath11k_mac_vdev_delete(ar, arvif);
|
||||
if (ret) {
|
||||
- ath11k_warn(ab, "failed to delete WMI vdev %d: %d\n",
|
||||
+ ath11k_warn(ab, "failed to delete vdev %d: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
goto err_vdev_del;
|
||||
}
|
||||
|
||||
- time_left = wait_for_completion_timeout(&ar->vdev_delete_done,
|
||||
- ATH11K_VDEV_DELETE_TIMEOUT_HZ);
|
||||
- if (time_left == 0) {
|
||||
- ath11k_warn(ab, "Timeout in receiving vdev delete response\n");
|
||||
- goto err_vdev_del;
|
||||
- }
|
||||
-
|
||||
- ab->free_vdev_map |= 1LL << (arvif->vdev_id);
|
||||
- ar->allocated_vdev_map &= ~(1LL << arvif->vdev_id);
|
||||
- ar->num_created_vdevs--;
|
||||
-
|
||||
- ath11k_dbg(ab, ATH11K_DBG_MAC, "vdev %pM deleted, vdev_id %d\n",
|
||||
- vif->addr, arvif->vdev_id);
|
||||
-
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
|
||||
clear_bit(ATH11K_FLAG_MONITOR_VDEV_CREATED, &ar->monitor_flags);
|
||||
ar->monitor_vdev_id = -1;
|
||||
@@ -0,0 +1,40 @@
|
||||
From f3ca72b0327101a074a871539e61775d43908ca4 Mon Sep 17 00:00:00 2001
|
||||
From: Nagarajan Maran <quic_nmaran@quicinc.com>
|
||||
Date: Fri, 14 Oct 2022 21:20:54 +0530
|
||||
Subject: [PATCH] wifi: ath11k: fix monitor vdev creation with firmware
|
||||
recovery
|
||||
|
||||
During firmware recovery, the monitor interface is not
|
||||
getting created in the driver and firmware since
|
||||
the respective flags are not updated properly.
|
||||
|
||||
So after firmware recovery is successful, when monitor
|
||||
interface is brought down manually, firmware assertion
|
||||
is observed, since we are trying to bring down the
|
||||
interface which is not yet created in the firmware.
|
||||
|
||||
Fix this by updating the monitor flags properly per
|
||||
phy#, during firmware recovery.
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221014155054.11471-1-quic_nmaran@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/core.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -1677,6 +1677,10 @@ void ath11k_core_pre_reconfigure_recover
|
||||
ath11k_mac_tx_mgmt_pending_free, ar);
|
||||
idr_destroy(&ar->txmgmt_idr);
|
||||
wake_up(&ar->txmgmt_empty_waitq);
|
||||
+
|
||||
+ ar->monitor_vdev_id = -1;
|
||||
+ clear_bit(ATH11K_FLAG_MONITOR_STARTED, &ar->monitor_flags);
|
||||
+ clear_bit(ATH11K_FLAG_MONITOR_VDEV_CREATED, &ar->monitor_flags);
|
||||
}
|
||||
|
||||
wake_up(&ab->wmi_ab.tx_credits_wq);
|
||||
@@ -0,0 +1,33 @@
|
||||
From ed3725e15a154ebebf44e0c34806c57525483f92 Mon Sep 17 00:00:00 2001
|
||||
From: Rahul Bhattacharjee <quic_rbhattac@quicinc.com>
|
||||
Date: Fri, 21 Oct 2022 14:31:26 +0530
|
||||
Subject: [PATCH] wifi: ath11k: Fix qmi_msg_handler data structure
|
||||
initialization
|
||||
|
||||
qmi_msg_handler is required to be null terminated by QMI module.
|
||||
There might be a case where a handler for a msg id is not present in the
|
||||
handlers array which can lead to infinite loop while searching the handler
|
||||
and therefore out of bound access in qmi_invoke_handler().
|
||||
Hence update the initialization in qmi_msg_handler data structure.
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Rahul Bhattacharjee <quic_rbhattac@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221021090126.28626-1-quic_rbhattac@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -3090,6 +3090,9 @@ static const struct qmi_msg_handler ath1
|
||||
sizeof(struct qmi_wlfw_fw_init_done_ind_msg_v01),
|
||||
.fn = ath11k_qmi_msg_fw_init_done_cb,
|
||||
},
|
||||
+
|
||||
+ /* end of list */
|
||||
+ {},
|
||||
};
|
||||
|
||||
static int ath11k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,
|
||||
@@ -0,0 +1,42 @@
|
||||
From dd1c2322694522f674c874f5fa02ac5ae39135dd Mon Sep 17 00:00:00 2001
|
||||
From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
|
||||
Date: Mon, 31 Oct 2022 12:43:41 +0100
|
||||
Subject: [PATCH] wifi: ath11k: synchronize
|
||||
ath11k_mac_he_gi_to_nl80211_he_gi()'s return type
|
||||
|
||||
ath11k_mac_he_gi_to_nl80211_he_gi() generates a valid warning with gcc-13:
|
||||
drivers/net/wireless/ath/ath11k/mac.c:321:20: error: conflicting types for 'ath11k_mac_he_gi_to_nl80211_he_gi' due to enum/integer mismatch; have 'enum nl80211_he_gi(u8)'
|
||||
drivers/net/wireless/ath/ath11k/mac.h:166:5: note: previous declaration of 'ath11k_mac_he_gi_to_nl80211_he_gi' with type 'u32(u8)'
|
||||
|
||||
I.e. the type of the return value ath11k_mac_he_gi_to_nl80211_he_gi() in
|
||||
the declaration is u32, while the definition spells enum nl80211_he_gi.
|
||||
Synchronize them to the latter.
|
||||
|
||||
Cc: Martin Liska <mliska@suse.cz>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>
|
||||
Cc: "David S. Miller" <davem@davemloft.net>
|
||||
Cc: Eric Dumazet <edumazet@google.com>
|
||||
Cc: Jakub Kicinski <kuba@kernel.org>
|
||||
Cc: Paolo Abeni <pabeni@redhat.com>
|
||||
Cc: ath11k@lists.infradead.org
|
||||
Cc: linux-wireless@vger.kernel.org
|
||||
Cc: netdev@vger.kernel.org
|
||||
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
|
||||
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221031114341.10377-1-jirislaby@kernel.org
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.h
|
||||
@@ -163,7 +163,7 @@ void ath11k_mac_drain_tx(struct ath11k *
|
||||
void ath11k_mac_peer_cleanup_all(struct ath11k *ar);
|
||||
int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx);
|
||||
u8 ath11k_mac_bw_to_mac80211_bw(u8 bw);
|
||||
-u32 ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
|
||||
+enum nl80211_he_gi ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
|
||||
enum nl80211_he_ru_alloc ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(u16 ru_phy);
|
||||
enum nl80211_he_ru_alloc ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones);
|
||||
enum ath11k_supported_bw ath11k_mac_mac80211_bw_to_ath11k_bw(enum rate_info_bw bw);
|
||||
@@ -0,0 +1,341 @@
|
||||
From 93c1592889fca46d09d833455628bab05516cdbf Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Date: Wed, 14 Sep 2022 17:23:03 -0700
|
||||
Subject: [PATCH] wifi: ath11k: Make QMI message rules const
|
||||
|
||||
Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct
|
||||
qmi_elem_info") allows QMI message encoding/decoding rules to be
|
||||
const, so do that for ath11k.
|
||||
|
||||
Compile tested only.
|
||||
|
||||
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20220915002303.12206-1-quic_jjohnson@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 72 +++++++++++++--------------
|
||||
1 file changed, 36 insertions(+), 36 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -29,7 +29,7 @@ module_param_named(cold_boot_cal, ath11k
|
||||
MODULE_PARM_DESC(cold_boot_cal,
|
||||
"Decrease the channel switch time but increase the driver load time (Default: true)");
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_host_cap_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_host_cap_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_OPT_FLAG,
|
||||
.elem_len = 1,
|
||||
@@ -280,7 +280,7 @@ static struct qmi_elem_info qmi_wlanfw_h
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_host_cap_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_host_cap_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -297,7 +297,7 @@ static struct qmi_elem_info qmi_wlanfw_h
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_ind_register_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_ind_register_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_OPT_FLAG,
|
||||
.elem_len = 1,
|
||||
@@ -522,7 +522,7 @@ static struct qmi_elem_info qmi_wlanfw_i
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_ind_register_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_ind_register_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -558,7 +558,7 @@ static struct qmi_elem_info qmi_wlanfw_i
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_mem_cfg_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_mem_cfg_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_8_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -590,7 +590,7 @@ static struct qmi_elem_info qmi_wlanfw_m
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_mem_seg_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_mem_seg_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -632,7 +632,7 @@ static struct qmi_elem_info qmi_wlanfw_m
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_request_mem_ind_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_request_mem_ind_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_DATA_LEN,
|
||||
.elem_len = 1,
|
||||
@@ -659,7 +659,7 @@ static struct qmi_elem_info qmi_wlanfw_r
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_mem_seg_resp_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_mem_seg_resp_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_8_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -699,7 +699,7 @@ static struct qmi_elem_info qmi_wlanfw_m
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_respond_mem_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_respond_mem_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_DATA_LEN,
|
||||
.elem_len = 1,
|
||||
@@ -726,7 +726,7 @@ static struct qmi_elem_info qmi_wlanfw_r
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_respond_mem_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_respond_mem_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -744,7 +744,7 @@ static struct qmi_elem_info qmi_wlanfw_r
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_cap_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_cap_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
@@ -752,7 +752,7 @@ static struct qmi_elem_info qmi_wlanfw_c
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_device_info_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_device_info_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
@@ -760,7 +760,7 @@ static struct qmi_elem_info qmi_wlanfw_d
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlfw_device_info_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlfw_device_info_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -814,7 +814,7 @@ static struct qmi_elem_info qmi_wlfw_dev
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_rf_chip_info_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_rf_chip_info_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -840,7 +840,7 @@ static struct qmi_elem_info qmi_wlanfw_r
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_rf_board_info_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_rf_board_info_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -857,7 +857,7 @@ static struct qmi_elem_info qmi_wlanfw_r
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_soc_info_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_soc_info_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -873,7 +873,7 @@ static struct qmi_elem_info qmi_wlanfw_s
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_fw_version_info_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_fw_version_info_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -899,7 +899,7 @@ static struct qmi_elem_info qmi_wlanfw_f
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_cap_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_cap_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -1100,7 +1100,7 @@ static struct qmi_elem_info qmi_wlanfw_c
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_bdf_download_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_bdf_download_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_1_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -1235,7 +1235,7 @@ static struct qmi_elem_info qmi_wlanfw_b
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_bdf_download_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_bdf_download_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -1253,7 +1253,7 @@ static struct qmi_elem_info qmi_wlanfw_b
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_m3_info_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_m3_info_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_8_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -1277,7 +1277,7 @@ static struct qmi_elem_info qmi_wlanfw_m
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_m3_info_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_m3_info_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -1294,7 +1294,7 @@ static struct qmi_elem_info qmi_wlanfw_m
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_ce_tgt_pipe_cfg_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_ce_tgt_pipe_cfg_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -1347,7 +1347,7 @@ static struct qmi_elem_info qmi_wlanfw_c
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_ce_svc_pipe_cfg_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_ce_svc_pipe_cfg_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -1382,7 +1382,7 @@ static struct qmi_elem_info qmi_wlanfw_c
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_shadow_reg_cfg_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_shadow_reg_cfg_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_2_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -1406,7 +1406,7 @@ static struct qmi_elem_info qmi_wlanfw_s
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_shadow_reg_v2_cfg_s_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_shadow_reg_v2_cfg_s_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -1423,7 +1423,7 @@ static struct qmi_elem_info qmi_wlanfw_s
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_wlan_mode_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_wlan_mode_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_4_BYTE,
|
||||
.elem_len = 1,
|
||||
@@ -1458,7 +1458,7 @@ static struct qmi_elem_info qmi_wlanfw_w
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_wlan_mode_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_wlan_mode_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -1476,7 +1476,7 @@ static struct qmi_elem_info qmi_wlanfw_w
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_wlan_cfg_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_wlan_cfg_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_OPT_FLAG,
|
||||
.elem_len = 1,
|
||||
@@ -1615,7 +1615,7 @@ static struct qmi_elem_info qmi_wlanfw_w
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_wlan_cfg_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_wlan_cfg_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -1632,28 +1632,28 @@ static struct qmi_elem_info qmi_wlanfw_w
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_mem_ready_ind_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_mem_ready_ind_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_fw_ready_ind_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_fw_ready_ind_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_cold_boot_cal_done_ind_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_cold_boot_cal_done_ind_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_wlan_ini_req_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_wlan_ini_req_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_OPT_FLAG,
|
||||
.elem_len = 1,
|
||||
@@ -1679,7 +1679,7 @@ static struct qmi_elem_info qmi_wlanfw_w
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlanfw_wlan_ini_resp_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlanfw_wlan_ini_resp_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_STRUCT,
|
||||
.elem_len = 1,
|
||||
@@ -1697,7 +1697,7 @@ static struct qmi_elem_info qmi_wlanfw_w
|
||||
},
|
||||
};
|
||||
|
||||
-static struct qmi_elem_info qmi_wlfw_fw_init_done_ind_msg_v01_ei[] = {
|
||||
+static const struct qmi_elem_info qmi_wlfw_fw_init_done_ind_msg_v01_ei[] = {
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.array_type = NO_ARRAY,
|
||||
@@ -0,0 +1,119 @@
|
||||
From a018750a2cceaf4427c4ee3d9ce3e83a171d5bd6 Mon Sep 17 00:00:00 2001
|
||||
From: Youghandhar Chintala <quic_youghand@quicinc.com>
|
||||
Date: Fri, 4 Nov 2022 14:24:03 +0530
|
||||
Subject: [PATCH] wifi: ath11k: Trigger sta disconnect on hardware restart
|
||||
|
||||
Currently after the hardware restart triggered from the driver, the
|
||||
station interface connection remains intact, since a disconnect trigger
|
||||
is not sent to userspace. This can lead to a problem in targets where
|
||||
the wifi mac sequence is added by the firmware.
|
||||
|
||||
After the target restart, its wifi mac sequence number gets reset to
|
||||
zero. Hence AP to which our device is connected will receive frames with
|
||||
a wifi mac sequence number jump to the past, thereby resulting in the
|
||||
AP dropping all these frames, until the frame arrives with a wifi mac
|
||||
sequence number which AP was expecting.
|
||||
|
||||
To avoid such frame drops, its better to trigger a station disconnect
|
||||
upon target hardware restart which can be done with API
|
||||
ieee80211_reconfig_disconnect exposed to mac80211.
|
||||
|
||||
The other targets are not affected by this change, since the hardware
|
||||
params flag is not set.
|
||||
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
|
||||
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
|
||||
|
||||
Signed-off-by: Youghandhar Chintala <quic_youghand@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/core.c | 6 ++++++
|
||||
drivers/net/wireless/ath/ath11k/hw.h | 1 +
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 7 +++++++
|
||||
3 files changed, 14 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -195,6 +195,7 @@ static const struct ath11k_hw_params ath
|
||||
.tcl_ring_retry = true,
|
||||
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
|
||||
.smp2p_wow_exit = false,
|
||||
+ .support_fw_mac_sequence = false,
|
||||
},
|
||||
{
|
||||
.name = "qca6390 hw2.0",
|
||||
@@ -277,6 +278,7 @@ static const struct ath11k_hw_params ath
|
||||
.tcl_ring_retry = true,
|
||||
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
|
||||
.smp2p_wow_exit = false,
|
||||
+ .support_fw_mac_sequence = true,
|
||||
},
|
||||
{
|
||||
.name = "qcn9074 hw1.0",
|
||||
@@ -356,6 +358,7 @@ static const struct ath11k_hw_params ath
|
||||
.tcl_ring_retry = true,
|
||||
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
|
||||
.smp2p_wow_exit = false,
|
||||
+ .support_fw_mac_sequence = false,
|
||||
},
|
||||
{
|
||||
.name = "wcn6855 hw2.0",
|
||||
@@ -438,6 +441,7 @@ static const struct ath11k_hw_params ath
|
||||
.tcl_ring_retry = true,
|
||||
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
|
||||
.smp2p_wow_exit = false,
|
||||
+ .support_fw_mac_sequence = true,
|
||||
},
|
||||
{
|
||||
.name = "wcn6855 hw2.1",
|
||||
@@ -519,6 +523,7 @@ static const struct ath11k_hw_params ath
|
||||
.tcl_ring_retry = true,
|
||||
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
|
||||
.smp2p_wow_exit = false,
|
||||
+ .support_fw_mac_sequence = true,
|
||||
},
|
||||
{
|
||||
.name = "wcn6750 hw1.0",
|
||||
@@ -597,6 +602,7 @@ static const struct ath11k_hw_params ath
|
||||
.tcl_ring_retry = false,
|
||||
.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
|
||||
.smp2p_wow_exit = true,
|
||||
+ .support_fw_mac_sequence = true,
|
||||
},
|
||||
};
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
||||
@@ -219,6 +219,7 @@ struct ath11k_hw_params {
|
||||
bool tcl_ring_retry;
|
||||
u32 tx_ring_size;
|
||||
bool smp2p_wow_exit;
|
||||
+ bool support_fw_mac_sequence;
|
||||
};
|
||||
|
||||
struct ath11k_hw_ops {
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8010,6 +8010,7 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
int recovery_count;
|
||||
+ struct ath11k_vif *arvif;
|
||||
|
||||
if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART)
|
||||
return;
|
||||
@@ -8045,6 +8046,12 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset success\n");
|
||||
}
|
||||
}
|
||||
+ if (ar->ab->hw_params.support_fw_mac_sequence) {
|
||||
+ list_for_each_entry(arvif, &ar->arvifs, list) {
|
||||
+ if (arvif->is_up && arvif->vdev_type == WMI_VDEV_TYPE_STA)
|
||||
+ ieee80211_hw_restart_disconnect(arvif->vif);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
@@ -0,0 +1,103 @@
|
||||
From e44de90453bb2b46a523df78c39eb896bab35dcd Mon Sep 17 00:00:00 2001
|
||||
From: Govindaraj Saminathan <quic_gsaminat@quicinc.com>
|
||||
Date: Tue, 29 Nov 2022 13:04:02 +0200
|
||||
Subject: [PATCH] wifi: ath11k: Fix race condition with struct
|
||||
htt_ppdu_stats_info
|
||||
|
||||
A crash happens when running the traffic with multiple clients:
|
||||
|
||||
Crash Signature : Unable to handle kernel paging request at
|
||||
virtual address ffffffd700970918 During the crash, PC points to
|
||||
"ieee80211_tx_rate_update+0x30/0x68 [mac80211]"
|
||||
LR points to "ath11k_dp_htt_htc_t2h_msg_handler+0x5a8/0x8a0 [ath11k]".
|
||||
|
||||
Struct ppdu_stats_info is allocated and accessed from event callback via copy
|
||||
engine tasklet, this has a problem when freeing it from ath11k_mac_op_stop().
|
||||
|
||||
Use data_lock during entire ath11k_dp_htt_get_ppdu_desc() call to protect
|
||||
struct htt_ppdu_stats_info access and to avoid race condition when accessing it
|
||||
from ath11k_mac_op_stop().
|
||||
|
||||
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Govindaraj Saminathan <quic_gsaminat@quicinc.com>
|
||||
Co-developed-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
||||
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/20221124071104.22506-1-quic_kathirve@quicinc.com
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/dp_rx.c | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -1535,13 +1535,12 @@ struct htt_ppdu_stats_info *ath11k_dp_ht
|
||||
{
|
||||
struct htt_ppdu_stats_info *ppdu_info;
|
||||
|
||||
- spin_lock_bh(&ar->data_lock);
|
||||
+ lockdep_assert_held(&ar->data_lock);
|
||||
+
|
||||
if (!list_empty(&ar->ppdu_stats_info)) {
|
||||
list_for_each_entry(ppdu_info, &ar->ppdu_stats_info, list) {
|
||||
- if (ppdu_info->ppdu_id == ppdu_id) {
|
||||
- spin_unlock_bh(&ar->data_lock);
|
||||
+ if (ppdu_info->ppdu_id == ppdu_id)
|
||||
return ppdu_info;
|
||||
- }
|
||||
}
|
||||
|
||||
if (ar->ppdu_stat_list_depth > HTT_PPDU_DESC_MAX_DEPTH) {
|
||||
@@ -1553,16 +1552,13 @@ struct htt_ppdu_stats_info *ath11k_dp_ht
|
||||
kfree(ppdu_info);
|
||||
}
|
||||
}
|
||||
- spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
ppdu_info = kzalloc(sizeof(*ppdu_info), GFP_ATOMIC);
|
||||
if (!ppdu_info)
|
||||
return NULL;
|
||||
|
||||
- spin_lock_bh(&ar->data_lock);
|
||||
list_add_tail(&ppdu_info->list, &ar->ppdu_stats_info);
|
||||
ar->ppdu_stat_list_depth++;
|
||||
- spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
return ppdu_info;
|
||||
}
|
||||
@@ -1586,16 +1582,17 @@ static int ath11k_htt_pull_ppdu_stats(st
|
||||
ar = ath11k_mac_get_ar_by_pdev_id(ab, pdev_id);
|
||||
if (!ar) {
|
||||
ret = -EINVAL;
|
||||
- goto exit;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
if (ath11k_debugfs_is_pktlog_lite_mode_enabled(ar))
|
||||
trace_ath11k_htt_ppdu_stats(ar, skb->data, len);
|
||||
|
||||
+ spin_lock_bh(&ar->data_lock);
|
||||
ppdu_info = ath11k_dp_htt_get_ppdu_desc(ar, ppdu_id);
|
||||
if (!ppdu_info) {
|
||||
ret = -EINVAL;
|
||||
- goto exit;
|
||||
+ goto out_unlock_data;
|
||||
}
|
||||
|
||||
ppdu_info->ppdu_id = ppdu_id;
|
||||
@@ -1604,10 +1601,13 @@ static int ath11k_htt_pull_ppdu_stats(st
|
||||
(void *)ppdu_info);
|
||||
if (ret) {
|
||||
ath11k_warn(ab, "Failed to parse tlv %d\n", ret);
|
||||
- goto exit;
|
||||
+ goto out_unlock_data;
|
||||
}
|
||||
|
||||
-exit:
|
||||
+out_unlock_data:
|
||||
+ spin_unlock_bh(&ar->data_lock);
|
||||
+
|
||||
+out:
|
||||
rcu_read_unlock();
|
||||
|
||||
return ret;
|
||||
@@ -0,0 +1,66 @@
|
||||
From 703d6551f71e7290619d6effe2a25a64e10538b7 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 15 Dec 2022 12:20:52 +0100
|
||||
Subject: [PATCH] ath11k: control thermal support via symbol
|
||||
|
||||
Currently, thermal support will get built if CONFIG_THERMAL is reachable,
|
||||
however this is not suitable for OpenWrt as with ALL_KMODS being set to y
|
||||
ATH11K_THERMAL wont get selected and so hwmon and thermal kmods wont get
|
||||
pulled in resulting in a build-failure.
|
||||
|
||||
So, to avoid that, lets do what is already done for ath10k and add a
|
||||
config symbol into backports for enabling thermal support.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/Kconfig | 7 +++++++
|
||||
drivers/net/wireless/ath/ath11k/Makefile | 2 +-
|
||||
drivers/net/wireless/ath/ath11k/thermal.h | 2 +-
|
||||
local-symbols | 1 +
|
||||
4 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
@@ -61,3 +61,10 @@ config ATH11K_SPECTRAL
|
||||
Enable ath11k spectral scan support
|
||||
|
||||
Say Y to enable access to the FFT/spectral data via debugfs.
|
||||
+
|
||||
+config ATH11K_THERMAL
|
||||
+ bool "ath11k thermal sensors and throttling support"
|
||||
+ depends on ATH11K
|
||||
+ depends on THERMAL
|
||||
+ help
|
||||
+ Enable ath11k thermal sensors and throttling support.
|
||||
--- a/drivers/net/wireless/ath/ath11k/Makefile
|
||||
+++ b/drivers/net/wireless/ath/ath11k/Makefile
|
||||
@@ -22,7 +22,7 @@ ath11k-y += core.o \
|
||||
ath11k-$(CPTCFG_ATH11K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o
|
||||
ath11k-$(CPTCFG_NL80211_TESTMODE) += testmode.o
|
||||
ath11k-$(CPTCFG_ATH11K_TRACING) += trace.o
|
||||
-ath11k-$(CONFIG_THERMAL) += thermal.o
|
||||
+ath11k-$(CPTCFG_ATH11K_THERMAL) += thermal.o
|
||||
ath11k-$(CPTCFG_ATH11K_SPECTRAL) += spectral.o
|
||||
ath11k-$(CONFIG_PM) += wow.o
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/thermal.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/thermal.h
|
||||
@@ -25,7 +25,7 @@ struct ath11k_thermal {
|
||||
int temperature;
|
||||
};
|
||||
|
||||
-#if IS_REACHABLE(CONFIG_THERMAL)
|
||||
+#if IS_REACHABLE(CPTCFG_ATH11K_THERMAL)
|
||||
int ath11k_thermal_register(struct ath11k_base *sc);
|
||||
void ath11k_thermal_unregister(struct ath11k_base *sc);
|
||||
int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -174,6 +174,7 @@ ATH11K_DEBUG=
|
||||
ATH11K_DEBUGFS=
|
||||
ATH11K_TRACING=
|
||||
ATH11K_SPECTRAL=
|
||||
+ATH11K_THERMAL=
|
||||
WLAN_VENDOR_ATMEL=
|
||||
ATMEL=
|
||||
PCI_ATMEL=
|
||||
@@ -0,0 +1,29 @@
|
||||
From 04178918e7f6b5f34dde81ec79ee8a1ccace3be3 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Mon, 17 Oct 2022 11:45:03 +0200
|
||||
Subject: [PATCH] wifi: ath11k: pci: fix compilation in 5.16 and older
|
||||
|
||||
Commit ("genirq/msi, treewide: Use a named struct for PCI/MSI attributes")
|
||||
changed the msi_desc structure a bit, however that is only available in
|
||||
kernels 5.17 and newer, so check for kernel version to allow compilation
|
||||
in 5.16 and older.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/pci.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
||||
@@ -451,7 +451,11 @@ static int ath11k_pci_alloc_msi(struct a
|
||||
pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_LO,
|
||||
&ab->pci.msi.addr_lo);
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0))
|
||||
if (msi_desc->pci.msi_attrib.is_64) {
|
||||
+#else
|
||||
+ if (msi_desc->msi_attrib.is_64) {
|
||||
+#endif
|
||||
pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_HI,
|
||||
&ab->pci.msi.addr_hi);
|
||||
} else {
|
||||
@@ -0,0 +1,24 @@
|
||||
From fee0e35d4e652243bfd8cf4c52e1706e0cc9b88d Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Sat, 16 Oct 2021 19:34:10 +0200
|
||||
Subject: [PATCH] ath11k: Disable coldboot calibration for IPQ8074
|
||||
|
||||
There is a bug with the remoteproc reset after coldboot calibration,
|
||||
so until that is resolved disabled it to allow using the radio.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -81,7 +81,7 @@ static const struct ath11k_hw_params ath
|
||||
.supports_shadow_regs = false,
|
||||
.idle_ps = false,
|
||||
.supports_sta_ps = false,
|
||||
- .cold_boot_calib = true,
|
||||
+ .cold_boot_calib = false,
|
||||
.cbcal_restart_fw = true,
|
||||
.fw_mem_mode = 0,
|
||||
.num_vdevs = 16 + 1,
|
||||
@@ -0,0 +1,66 @@
|
||||
From 20ad5a47dd5093a8eb934a64f398d16d4952de91 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Wed, 15 Dec 2021 19:44:52 +0100
|
||||
Subject: [PATCH] ath11k: ipq8074: support 512MB memory profile
|
||||
|
||||
ath11k is really memory intensive for devices with less that 1GB of ram,
|
||||
so lets port the QSDK patch that adds a profile for devices with 512MB
|
||||
of RAM.
|
||||
|
||||
Signed-off-by: Csaba Sipos <metro4@freemail.hu>
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/Kconfig | 12 ++
|
||||
drivers/net/wireless/ath/ath11k/core.c | 6 +
|
||||
local-symbols | 2 +
|
||||
4 files changed, 176 insertions(+)
|
||||
--- a/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
@@ -61,6 +61,18 @@
|
||||
Enable ath11k spectral scan support
|
||||
|
||||
Say Y to enable access to the FFT/spectral data via debugfs.
|
||||
+
|
||||
+config ATH11K_MEM_PROFILE_512MB
|
||||
+ bool "Atheros ath11k 512MB memory profile"
|
||||
+ depends on ATH11K
|
||||
+ help
|
||||
+ Use limits for the 512MB memory size instead of 1GB.
|
||||
+
|
||||
+config ATH11K_MEM_PROFILE_1GB
|
||||
+ bool "Atheros ath11k 1GB memory profile"
|
||||
+ depends on ATH11K
|
||||
+ help
|
||||
+ Use limits for the 1GB memory size.
|
||||
|
||||
config ATH11K_THERMAL
|
||||
bool "ath11k thermal sensors and throttling support"
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
||||
@@ -83,9 +83,15 @@ static const struct ath11k_hw_params ath
|
||||
.supports_sta_ps = false,
|
||||
.cold_boot_calib = false,
|
||||
.cbcal_restart_fw = true,
|
||||
+#ifdef CPTCFG_ATH11K_MEM_PROFILE_1GB
|
||||
.fw_mem_mode = 0,
|
||||
.num_vdevs = 16 + 1,
|
||||
.num_peers = 512,
|
||||
+#elif CPTCFG_ATH11K_MEM_PROFILE_512MB
|
||||
+ .fw_mem_mode = 1,
|
||||
+ .num_vdevs = 8,
|
||||
+ .num_peers = 128,
|
||||
+#endif
|
||||
.supports_suspend = false,
|
||||
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
|
||||
.supports_regdb = false,
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -182,6 +182,8 @@ ATH11K_DEBUG=
|
||||
ATH11K_DEBUGFS=
|
||||
ATH11K_TRACING=
|
||||
ATH11K_SPECTRAL=
|
||||
+ATH11K_MEM_PROFILE_512MB=
|
||||
+ATH11K_MEM_PROFILE_1GB=
|
||||
ATH11K_THERMAL=
|
||||
WLAN_VENDOR_ATMEL=
|
||||
ATMEL=
|
||||
@@ -17,7 +17,7 @@
|
||||
{ AR5K_RXNOFRM, 8 },
|
||||
--- a/drivers/net/wireless/ath/ath5k/dma.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/dma.c
|
||||
@@ -869,10 +869,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
|
||||
@@ -854,10 +854,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
|
||||
* guess we can tweak it and see how it goes ;-)
|
||||
*/
|
||||
if (ah->ah_version != AR5K_AR5210) {
|
||||
@@ -18,7 +18,7 @@
|
||||
goto end;
|
||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||
@@ -1964,7 +1964,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||
@@ -2009,7 +2009,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);
|
||||
@@ -2050,7 +2050,7 @@ ath5k_beacon_update_timers(struct ath5k_
|
||||
@@ -2095,7 +2095,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",
|
||||
@@ -2516,6 +2516,7 @@ static const struct ieee80211_iface_limi
|
||||
@@ -2561,6 +2561,7 @@ static const struct ieee80211_iface_limi
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
#endif
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
@@ -130,7 +130,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++
|
||||
/* Antenna Control */
|
||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||
@@ -466,6 +466,9 @@ ath5k_chan_set(struct ath5k_hw *ah, stru
|
||||
@@ -465,6 +465,9 @@ ath5k_chan_set(struct ath5k_hw *ah, stru
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,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
|
||||
@@ -1435,8 +1435,12 @@ static bool ath9k_hw_set_reset(struct at
|
||||
@@ -1434,8 +1434,12 @@ static bool ath9k_hw_set_reset(struct at
|
||||
if (!AR_SREV_9100(ah))
|
||||
REG_WRITE(ah, AR_RC, 0);
|
||||
|
||||
@@ -10,7 +10,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
|
||||
@@ -1312,39 +1312,56 @@ void ath9k_hw_get_delta_slope_vals(struc
|
||||
@@ -1311,39 +1311,56 @@ void ath9k_hw_get_delta_slope_vals(struc
|
||||
*coef_exponent = coef_exp - 16;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1397,24 +1414,24 @@ static bool ath9k_hw_set_reset(struct at
|
||||
@@ -1396,24 +1413,24 @@ static bool ath9k_hw_set_reset(struct at
|
||||
rst_flags |= AR_RTC_RC_MAC_COLD;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ This reverts commit 71f5137bf010c6faffab50c0ec15374c59c4a411.
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2979,7 +2979,8 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2977,7 +2977,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)
|
||||
@@ -2991,9 +2992,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2989,9 +2990,14 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
channel = chan->chan;
|
||||
chan_pwr = min_t(int, channel->max_power * 2, MAX_COMBINED_POWER);
|
||||
new_pwr = min_t(int, chan_pwr, reg->power_limit);
|
||||
@@ -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
|
||||
@@ -2998,6 +2998,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2996,6 +2996,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
if (ant_gain > max_gain)
|
||||
ant_reduction = ant_gain - max_gain;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -830,6 +830,7 @@ static const struct ieee80211_iface_limi
|
||||
@@ -882,6 +882,7 @@ static const struct ieee80211_iface_limi
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO) },
|
||||
+ { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
|
||||
};
|
||||
|
||||
#ifdef CPTCFG_WIRELESS_WDS
|
||||
#ifdef CPTCFG_ATH9K_CHANNEL_CONTEXT
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -927,6 +927,7 @@ static void ath9k_set_hw_capab(struct at
|
||||
@@ -963,6 +963,7 @@ static void ath9k_set_hw_capab(struct at
|
||||
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||
ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
if (ath9k_ps_enable)
|
||||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||
@@ -939,9 +940,6 @@ static void ath9k_set_hw_capab(struct at
|
||||
@@ -975,9 +976,6 @@ static void ath9k_set_hw_capab(struct at
|
||||
IEEE80211_RADIOTAP_MCS_HAVE_STBC;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1364,6 +1364,53 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
@@ -1413,6 +1413,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);
|
||||
@@ -1383,6 +1430,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1432,6 +1479,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);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -1143,25 +1143,25 @@ static int __init ath9k_init(void)
|
||||
@@ -1178,25 +1178,25 @@ static int __init ath9k_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -403,13 +403,8 @@ static void ath9k_hw_init_config(struct
|
||||
@@ -402,13 +402,8 @@ static void ath9k_hw_init_config(struct
|
||||
|
||||
ah->config.rx_intr_mitigation = true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1411,6 +1411,52 @@ static const struct file_operations fops
|
||||
@@ -1460,6 +1460,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);
|
||||
@@ -1432,6 +1478,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1481,6 +1527,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
|
||||
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_eeprom);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -663,6 +663,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
||||
@@ -662,6 +662,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
||||
|
||||
/* These are all the AR5008/AR9001/AR9002/AR9003 hardware family of chipsets */
|
||||
switch (ah->hw_version.devid) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -844,6 +844,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,7 +10,7 @@
|
||||
#else
|
||||
static inline void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
@@ -980,6 +983,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||
@@ -979,6 +982,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||
|
||||
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -1033,9 +1043,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
|
||||
@@ -1055,7 +1055,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -1088,7 +1088,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
|
||||
@@ -1456,6 +1456,61 @@ static const struct file_operations fops
|
||||
@@ -1505,6 +1505,61 @@ static const struct file_operations fops
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
@@ -1480,6 +1535,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1529,6 +1584,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);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1512,6 +1512,50 @@ static const struct file_operations fops
|
||||
@@ -1561,6 +1561,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);
|
||||
@@ -1539,6 +1583,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1588,6 +1632,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
|
||||
@@ -84,7 +84,7 @@
|
||||
bool reset_power_on;
|
||||
bool htc_reset_init;
|
||||
|
||||
@@ -1077,6 +1085,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
@@ -1079,6 +1087,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||
|
||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||
@@ -94,7 +94,7 @@
|
||||
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1882,6 +1882,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
|
||||
@@ -1881,6 +1881,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
struct ath9k_hw_cal_data *caldata, bool fastcc)
|
||||
{
|
||||
@@ -2090,6 +2104,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2089,6 +2103,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
ar9003_hw_disable_phy_restart(ah);
|
||||
|
||||
ath9k_hw_apply_gpio_override(ah);
|
||||
@@ -18,7 +18,7 @@
|
||||
void (*spectral_scan_trigger)(struct ath_hw *ah);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -1927,6 +1927,26 @@ void ar9003_hw_init_rate_txpower(struct
|
||||
@@ -1918,6 +1918,26 @@ void ar9003_hw_init_rate_txpower(struct
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
|
||||
@@ -1963,6 +1983,7 @@ void ar9003_hw_attach_phy_ops(struct ath
|
||||
@@ -1954,6 +1974,7 @@ void ar9003_hw_attach_phy_ops(struct ath
|
||||
priv_ops->set_radar_params = ar9003_hw_set_radar_params;
|
||||
priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -818,7 +818,8 @@ static void ath9k_init_txpower_limits(st
|
||||
@@ -870,7 +870,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,7 +65,7 @@
|
||||
}
|
||||
|
||||
static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -1015,6 +1016,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
@@ -1048,6 +1049,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
|
||||
}
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -1060,6 +1073,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
ARRAY_SIZE(ath9k_tpt_blink));
|
||||
#endif
|
||||
@@ -1095,6 +1108,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
wiphy_read_of_freq_limits(hw->wiphy);
|
||||
|
||||
+ ath_get_initial_entropy(sc);
|
||||
+
|
||||
@@ -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
|
||||
@@ -1349,9 +1349,30 @@ void ar5008_hw_init_rate_txpower(struct
|
||||
@@ -1340,9 +1340,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,
|
||||
@@ -1366,6 +1387,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
|
||||
@@ -1357,6 +1378,8 @@ int ar5008_hw_attach_phy_ops(struct ath_
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -248,6 +248,19 @@ void ath9k_hw_get_channel_centers(struct
|
||||
@@ -247,6 +247,19 @@ void ath9k_hw_get_channel_centers(struct
|
||||
centers->synth_center + (extoff * HT40_CHANNEL_CENTER_SHIFT);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/******************/
|
||||
/* Chip Revisions */
|
||||
/******************/
|
||||
@@ -1455,6 +1468,9 @@ static bool ath9k_hw_set_reset(struct at
|
||||
@@ -1454,6 +1467,9 @@ static bool ath9k_hw_set_reset(struct at
|
||||
udelay(50);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1554,6 +1570,9 @@ static bool ath9k_hw_chip_reset(struct a
|
||||
@@ -1553,6 +1569,9 @@ static bool ath9k_hw_chip_reset(struct a
|
||||
ar9003_hw_internal_regulator_apply(ah);
|
||||
ath9k_hw_init_pll(ah, chan);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1860,8 +1879,14 @@ static int ath9k_hw_do_fastcc(struct ath
|
||||
@@ -1859,8 +1878,14 @@ static int ath9k_hw_do_fastcc(struct ath
|
||||
if (AR_SREV_9271(ah))
|
||||
ar9002_hw_load_ani_reg(ah, chan);
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -2115,6 +2140,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2114,6 +2139,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
ath9k_hw_set_radar_params(ah);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -978,55 +978,6 @@ static bool ar5008_hw_ani_control_new(st
|
||||
@@ -969,55 +969,6 @@ static bool ar5008_hw_ani_control_new(st
|
||||
* on == 0 means more noise imm
|
||||
*/
|
||||
u32 on = param ? 1 : 0;
|
||||
@@ -79,7 +79,7 @@
|
||||
static const u8 ofdm2pwr[] = {
|
||||
ALL_TARGET_LEGACY_6_24,
|
||||
ALL_TARGET_LEGACY_6_24,
|
||||
@@ -1077,11 +1063,6 @@ static bool ar9003_hw_ani_control(struct
|
||||
@@ -1068,11 +1054,6 @@ static bool ar9003_hw_ani_control(struct
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_channel *chan = ah->curchan;
|
||||
struct ar5416AniState *aniState = &ah->ani;
|
||||
@@ -91,7 +91,7 @@
|
||||
s32 value, value2;
|
||||
|
||||
switch (cmd & ah->ani_function) {
|
||||
@@ -1095,61 +1076,6 @@ static bool ar9003_hw_ani_control(struct
|
||||
@@ -1086,61 +1067,6 @@ static bool ar9003_hw_ani_control(struct
|
||||
*/
|
||||
u32 on = param ? 1 : 0;
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -990,6 +991,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;
|
||||
@@ -1045,6 +1054,9 @@ struct ath_softc {
|
||||
@@ -1044,6 +1053,9 @@ struct ath_softc {
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
const char *led_default_trigger;
|
||||
struct list_head leds;
|
||||
@@ -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
|
||||
@@ -1056,6 +1056,7 @@ struct ath_softc {
|
||||
@@ -1055,6 +1055,7 @@ struct ath_softc {
|
||||
struct list_head leds;
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
struct ath9k_gpio_chip *gpiochip;
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -112,6 +112,7 @@ ATH9K_WOW=
|
||||
@@ -137,6 +137,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
static const struct platform_device_id ath9k_platform_id_table[] = {
|
||||
{
|
||||
@@ -69,6 +77,242 @@ static const struct ath_bus_ops ath_ahb_
|
||||
@@ -69,6 +77,236 @@ static const struct ath_bus_ops ath_ahb_
|
||||
.eeprom_read = ath_ahb_eeprom_read,
|
||||
};
|
||||
|
||||
@@ -218,12 +218,6 @@
|
||||
+ else
|
||||
+ pdata->led_pin = -1;
|
||||
+
|
||||
+ if (of_property_read_bool(pdev->dev.of_node, "qca,disable-2ghz"))
|
||||
+ pdata->disable_2ghz = true;
|
||||
+
|
||||
+ if (of_property_read_bool(pdev->dev.of_node, "qca,disable-5ghz"))
|
||||
+ pdata->disable_5ghz = true;
|
||||
+
|
||||
+ if (of_property_read_bool(pdev->dev.of_node, "qca,tx-gain-buffalo"))
|
||||
+ pdata->tx_gain_buffalo = true;
|
||||
+
|
||||
@@ -259,7 +253,7 @@
|
||||
static int ath_ahb_probe(struct platform_device *pdev)
|
||||
{
|
||||
void __iomem *mem;
|
||||
@@ -80,6 +324,17 @@ static int ath_ahb_probe(struct platform
|
||||
@@ -80,6 +318,17 @@ static int ath_ahb_probe(struct platform
|
||||
int ret = 0;
|
||||
struct ath_hw *ah;
|
||||
char hw_name[64];
|
||||
@@ -277,7 +271,7 @@
|
||||
|
||||
if (!dev_get_platdata(&pdev->dev)) {
|
||||
dev_err(&pdev->dev, "no platform data specified\n");
|
||||
@@ -122,13 +377,16 @@ static int ath_ahb_probe(struct platform
|
||||
@@ -118,13 +367,16 @@ static int ath_ahb_probe(struct platform
|
||||
sc->mem = mem;
|
||||
sc->irq = irq;
|
||||
|
||||
@@ -295,7 +289,7 @@
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||
goto err_irq;
|
||||
@@ -159,6 +417,9 @@ static int ath_ahb_remove(struct platfor
|
||||
@@ -155,6 +407,9 @@ static int ath_ahb_remove(struct platfor
|
||||
free_irq(sc->irq, sc);
|
||||
ieee80211_free_hw(sc->hw);
|
||||
}
|
||||
@@ -305,7 +299,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -168,6 +429,9 @@ static struct platform_driver ath_ahb_dr
|
||||
@@ -164,6 +419,9 @@ static struct platform_driver ath_ahb_dr
|
||||
.remove = ath_ahb_remove,
|
||||
.driver = {
|
||||
.name = "ath9k",
|
||||
@@ -325,7 +319,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
@@ -1012,6 +1013,9 @@ struct ath_softc {
|
||||
@@ -1011,6 +1012,9 @@ struct ath_softc {
|
||||
struct ath_hw *sc_ah;
|
||||
void __iomem *mem;
|
||||
int irq;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -654,6 +654,12 @@ static int ath9k_of_init(struct ath_soft
|
||||
@@ -696,6 +696,12 @@ static int ath9k_of_init(struct ath_soft
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -757,6 +763,9 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -803,6 +809,9 @@ static int ath9k_init_softc(u16 devid, s
|
||||
if (ret)
|
||||
goto err_hw;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
if (phy->type == B43_PHYTYPE_B) {
|
||||
value16 = b43_read16(dev, 0x005E);
|
||||
@@ -3985,7 +3985,6 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -3986,7 +3986,6 @@ static int b43_op_config(struct ieee8021
|
||||
struct b43_wldev *dev = wl->current_dev;
|
||||
struct b43_phy *phy = &dev->phy;
|
||||
struct ieee80211_conf *conf = &hw->conf;
|
||||
@@ -28,7 +28,7 @@
|
||||
int err = 0;
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -4028,11 +4027,9 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -4029,11 +4028,9 @@ static int b43_op_config(struct ieee8021
|
||||
}
|
||||
|
||||
/* Antennas for RX and management frame TX. */
|
||||
@@ -89,8 +89,8 @@
|
||||
+
|
||||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.tx = b43_op_tx,
|
||||
.conf_tx = b43_op_conf_tx,
|
||||
@@ -5197,6 +5235,8 @@ static const struct ieee80211_ops b43_hw
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
@@ -5198,6 +5236,8 @@ static const struct ieee80211_ops b43_hw
|
||||
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
||||
.get_survey = b43_op_get_survey,
|
||||
.rfkill_poll = b43_rfkill_poll,
|
||||
@@ -99,7 +99,7 @@
|
||||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
@@ -5498,6 +5538,8 @@ static int b43_one_core_attach(struct b4
|
||||
@@ -5499,6 +5539,8 @@ static int b43_one_core_attach(struct b4
|
||||
if (!wldev)
|
||||
goto out;
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
wldev->use_pio = b43_modparam_pio;
|
||||
wldev->dev = dev;
|
||||
wldev->wl = wl;
|
||||
@@ -5592,6 +5634,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
@@ -5590,6 +5632,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||
@@ -114,7 +114,7 @@ static int b43_modparam_pio = 0;
|
||||
@@ -114,7 +114,7 @@ static int b43_modparam_pio;
|
||||
module_param_named(pio, b43_modparam_pio, int, 0644);
|
||||
MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
|
||||
|
||||
|
||||
@@ -13,15 +13,15 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -431,6 +431,7 @@ struct brcmf_fw {
|
||||
struct brcmf_fw_request *req;
|
||||
@@ -459,6 +459,7 @@ struct brcmf_fw {
|
||||
u32 curpos;
|
||||
unsigned int board_index;
|
||||
void (*done)(struct device *dev, int err, struct brcmf_fw_request *req);
|
||||
+ struct completion *completion;
|
||||
};
|
||||
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx);
|
||||
@@ -638,6 +639,8 @@ static void brcmf_fw_request_done(const
|
||||
#ifdef CONFIG_EFI
|
||||
@@ -686,6 +687,8 @@ static void brcmf_fw_request_done(const
|
||||
fwctx->req = NULL;
|
||||
}
|
||||
fwctx->done(fwctx->dev, ret, fwctx->req);
|
||||
@@ -30,16 +30,16 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
kfree(fwctx);
|
||||
}
|
||||
|
||||
@@ -662,6 +665,8 @@ int brcmf_fw_get_firmwares(struct device
|
||||
@@ -751,6 +754,8 @@ int brcmf_fw_get_firmwares(struct device
|
||||
{
|
||||
struct brcmf_fw_item *first = &req->items[0];
|
||||
struct brcmf_fw *fwctx;
|
||||
+ struct completion completion;
|
||||
+ unsigned long time_left;
|
||||
char *alt_path = NULL;
|
||||
int ret;
|
||||
|
||||
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
|
||||
@@ -678,6 +683,9 @@ int brcmf_fw_get_firmwares(struct device
|
||||
@@ -768,6 +773,9 @@ int brcmf_fw_get_firmwares(struct device
|
||||
fwctx->dev = dev;
|
||||
fwctx->req = req;
|
||||
fwctx->done = fw_cb;
|
||||
@@ -47,9 +47,9 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
+ init_completion(&completion);
|
||||
+ fwctx->completion = &completion;
|
||||
|
||||
ret = request_firmware_nowait(THIS_MODULE, true, first->path,
|
||||
fwctx->dev, GFP_KERNEL, fwctx,
|
||||
@@ -685,6 +693,12 @@ int brcmf_fw_get_firmwares(struct device
|
||||
/* First try alternative board-specific path if any */
|
||||
if (fwctx->req->board_types[0])
|
||||
@@ -787,6 +795,12 @@ int brcmf_fw_get_firmwares(struct device
|
||||
if (ret < 0)
|
||||
brcmf_fw_request_done(NULL, fwctx);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -715,8 +715,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
@@ -710,8 +710,36 @@ static struct wireless_dev *brcmf_cfg802
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct wireless_dev *wdev;
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2961,6 +2961,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
@@ -2973,6 +2973,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
|
||||
* preference in cfg struct to apply this to
|
||||
* FW later while initializing the dongle
|
||||
*/
|
||||
|
||||
@@ -12,9 +12,9 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -12,6 +12,36 @@
|
||||
#include "common.h"
|
||||
#include "of.h"
|
||||
@@ -65,6 +65,36 @@ static int brcmf_of_get_country_codes(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* TODO: FIXME: Use DT */
|
||||
+static void brcmf_of_probe_cc(struct device *dev,
|
||||
@@ -49,12 +49,12 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
@@ -43,6 +73,8 @@ void brcmf_of_probe(struct device *dev,
|
||||
@@ -105,6 +135,8 @@ void brcmf_of_probe(struct device *dev,
|
||||
of_node_put(root);
|
||||
}
|
||||
|
||||
+ brcmf_of_probe_cc(dev, settings);
|
||||
+
|
||||
if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
|
||||
!of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
return;
|
||||
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
From 4e32024cbb14230af3048e249e84f8c2b25ce45a Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Thu, 28 Oct 2021 15:03:16 +0100
|
||||
Subject: [PATCH] brcmfmac: Read alternative firmware names from DT
|
||||
|
||||
Add the ability to load the names of alternative firmwares from the
|
||||
Device Tree node. This permits separate firmwares for 43436s and 43438
|
||||
and allows downstream firmwares to coexist with upstream.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/of.c | 36 ++++++++++++++
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/of.h | 7 +++
|
||||
.../broadcom/brcm80211/brcmfmac/sdio.c | 47 +++++++++++++++++--
|
||||
3 files changed, 87 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "debug.h"
|
||||
#include "core.h"
|
||||
#include "common.h"
|
||||
+#include "firmware.h"
|
||||
#include "of.h"
|
||||
|
||||
static int brcmf_of_get_country_codes(struct device *dev,
|
||||
@@ -167,3 +168,38 @@ void brcmf_of_probe(struct device *dev,
|
||||
sdio->oob_irq_nr = irq;
|
||||
sdio->oob_irq_flags = irqf;
|
||||
}
|
||||
+
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *fwname_count)
|
||||
+{
|
||||
+ struct device_node *np = dev->of_node;
|
||||
+ struct brcmf_firmware_mapping *fwnames;
|
||||
+ struct device_node *map_np, *fw_np;
|
||||
+ int of_count;
|
||||
+ int count = 0;
|
||||
+
|
||||
+ map_np = of_get_child_by_name(np, "firmwares");
|
||||
+ of_count = of_get_child_count(map_np);
|
||||
+ if (!of_count)
|
||||
+ return NULL;
|
||||
+
|
||||
+ fwnames = devm_kcalloc(dev, of_count,
|
||||
+ sizeof(struct brcmf_firmware_mapping),
|
||||
+ GFP_KERNEL);
|
||||
+
|
||||
+ for_each_child_of_node(map_np, fw_np)
|
||||
+ {
|
||||
+ struct brcmf_firmware_mapping *cur = &fwnames[count];
|
||||
+
|
||||
+ if (of_property_read_u32(fw_np, "chipid", &cur->chipid) ||
|
||||
+ of_property_read_u32(fw_np, "revmask", &cur->revmask))
|
||||
+ continue;
|
||||
+ cur->fw_base = of_get_property(fw_np, "fw_base", NULL);
|
||||
+ if (cur->fw_base)
|
||||
+ count++;
|
||||
+ }
|
||||
+
|
||||
+ *fwname_count = count;
|
||||
+
|
||||
+ return count ? fwnames : NULL;
|
||||
+}
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
@@ -5,9 +5,16 @@
|
||||
#ifdef CONFIG_OF
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings);
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count);
|
||||
#else
|
||||
static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
}
|
||||
+static struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
#endif /* CONFIG_OF */
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "core.h"
|
||||
#include "common.h"
|
||||
#include "bcdc.h"
|
||||
+#include "of.h"
|
||||
|
||||
#define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500)
|
||||
#define CTL_DONE_TIMEOUT msecs_to_jiffies(2500)
|
||||
@@ -634,7 +635,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "b
|
||||
/* per-board firmware binaries */
|
||||
MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.bin");
|
||||
|
||||
-static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
+static const struct brcmf_firmware_mapping sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
|
||||
@@ -662,6 +663,9 @@ static const struct brcmf_firmware_mappi
|
||||
BRCMF_FW_ENTRY(CY_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752)
|
||||
};
|
||||
|
||||
+static const struct brcmf_firmware_mapping *brcmf_sdio_fwnames = sdio_fwnames;
|
||||
+static u32 brcmf_sdio_fwnames_count = ARRAY_SIZE(sdio_fwnames);
|
||||
+
|
||||
#define TXCTL_CREDITS 2
|
||||
|
||||
static void pkt_align(struct sk_buff *p, int len, int align)
|
||||
@@ -4192,6 +4196,9 @@ static const struct brcmf_bus_ops brcmf_
|
||||
#define BRCMF_SDIO_FW_NVRAM 1
|
||||
#define BRCMF_SDIO_FW_CLM 2
|
||||
|
||||
+static struct brcmf_fw_request *
|
||||
+brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus);
|
||||
+
|
||||
static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||
struct brcmf_fw_request *fwreq)
|
||||
{
|
||||
@@ -4207,6 +4214,22 @@ static void brcmf_sdio_firmware_callback
|
||||
|
||||
brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err);
|
||||
|
||||
+ if (err && brcmf_sdio_fwnames != sdio_fwnames) {
|
||||
+ /* Try again with the standard firmware names */
|
||||
+ brcmf_sdio_fwnames = sdio_fwnames;
|
||||
+ brcmf_sdio_fwnames_count = ARRAY_SIZE(sdio_fwnames);
|
||||
+ kfree(fwreq);
|
||||
+ fwreq = brcmf_sdio_prepare_fw_request(bus);
|
||||
+ if (!fwreq) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ err = brcmf_fw_get_firmwares(dev, fwreq,
|
||||
+ brcmf_sdio_firmware_callback);
|
||||
+ if (!err)
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
@@ -4417,7 +4440,7 @@ brcmf_sdio_prepare_fw_request(struct brc
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
- ARRAY_SIZE(brcmf_sdio_fwnames),
|
||||
+ brcmf_sdio_fwnames_count,
|
||||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return NULL;
|
||||
@@ -4437,6 +4460,9 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
|
||||
struct brcmf_sdio *bus;
|
||||
struct workqueue_struct *wq;
|
||||
struct brcmf_fw_request *fwreq;
|
||||
+ struct brcmf_firmware_mapping *of_fwnames, *fwnames = NULL;
|
||||
+ const int fwname_size = sizeof(struct brcmf_firmware_mapping);
|
||||
+ u32 of_fw_count;
|
||||
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
@@ -4519,6 +4545,21 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
|
||||
|
||||
brcmf_dbg(INFO, "completed!!\n");
|
||||
|
||||
+ of_fwnames = brcmf_of_fwnames(sdiodev->dev, &of_fw_count);
|
||||
+ if (of_fwnames)
|
||||
+ fwnames = devm_kcalloc(sdiodev->dev,
|
||||
+ of_fw_count + brcmf_sdio_fwnames_count,
|
||||
+ fwname_size, GFP_KERNEL);
|
||||
+
|
||||
+ if (fwnames) {
|
||||
+ /* The array is scanned in order, so overrides come first */
|
||||
+ memcpy(fwnames, of_fwnames, of_fw_count * fwname_size);
|
||||
+ memcpy(fwnames + of_fw_count, sdio_fwnames,
|
||||
+ brcmf_sdio_fwnames_count * fwname_size);
|
||||
+ brcmf_sdio_fwnames = fwnames;
|
||||
+ brcmf_sdio_fwnames_count += of_fw_count;
|
||||
+ }
|
||||
+
|
||||
fwreq = brcmf_sdio_prepare_fw_request(bus);
|
||||
if (!fwreq) {
|
||||
ret = -ENOMEM;
|
||||
@@ -1,148 +0,0 @@
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2913,6 +2913,63 @@ done:
|
||||
}
|
||||
|
||||
static int
|
||||
+brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+ int idx, struct survey_info *survey)
|
||||
+{
|
||||
+ struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
+ struct brcmf_if *ifp = netdev_priv(ndev);
|
||||
+ struct brcmu_chan ch;
|
||||
+ enum nl80211_band band = 0;
|
||||
+ s32 err = 0;
|
||||
+ int noise;
|
||||
+ u32 freq;
|
||||
+ u32 chanspec;
|
||||
+
|
||||
+ memset(survey, 0, sizeof(struct survey_info));
|
||||
+ if (idx != 0) {
|
||||
+ if (idx >= cfg->pub->num_chan_stats || cfg->pub->chan_stats == NULL)
|
||||
+ return -ENOENT;
|
||||
+ if (cfg->pub->chan_stats[idx].freq == 0)
|
||||
+ return -ENOENT;
|
||||
+ survey->filled = SURVEY_INFO_NOISE_DBM;
|
||||
+ survey->channel = ieee80211_get_channel(wiphy, cfg->pub->chan_stats[idx].freq);
|
||||
+ survey->noise = cfg->pub->chan_stats[idx].noise;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
|
||||
+ if (err) {
|
||||
+ brcmf_err("chanspec failed (%d)\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ ch.chspec = chanspec;
|
||||
+ cfg->d11inf.decchspec(&ch);
|
||||
+
|
||||
+ switch (ch.band) {
|
||||
+ case BRCMU_CHAN_BAND_2G:
|
||||
+ band = NL80211_BAND_2GHZ;
|
||||
+ break;
|
||||
+ case BRCMU_CHAN_BAND_5G:
|
||||
+ band = NL80211_BAND_5GHZ;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ freq = ieee80211_channel_to_frequency(ch.control_ch_num, band);
|
||||
+ survey->channel = ieee80211_get_channel(wiphy, freq);
|
||||
+
|
||||
+ err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_PHY_NOISE, &noise);
|
||||
+ if (err) {
|
||||
+ brcmf_err("Could not get noise (%d)\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ survey->filled = SURVEY_INFO_NOISE_DBM | SURVEY_INFO_IN_USE;
|
||||
+ survey->noise = le32_to_cpu(noise);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
||||
int idx, u8 *mac, struct station_info *sinfo)
|
||||
{
|
||||
@@ -3008,6 +3065,7 @@ static s32 brcmf_inform_single_bss(struc
|
||||
struct brcmu_chan ch;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
+ int i;
|
||||
u16 notify_capability;
|
||||
u16 notify_interval;
|
||||
u8 *notify_ie;
|
||||
@@ -3032,6 +3090,17 @@ static s32 brcmf_inform_single_bss(struc
|
||||
band = NL80211_BAND_5GHZ;
|
||||
|
||||
freq = ieee80211_channel_to_frequency(channel, band);
|
||||
+ for (i = 0;i < cfg->pub->num_chan_stats;i++) {
|
||||
+ if (freq == cfg->pub->chan_stats[i].freq)
|
||||
+ break;
|
||||
+ if (cfg->pub->chan_stats[i].freq == 0)
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i < cfg->pub->num_chan_stats) {
|
||||
+ cfg->pub->chan_stats[i].freq = freq;
|
||||
+ cfg->pub->chan_stats[i].noise = bi->phy_noise;
|
||||
+ }
|
||||
+
|
||||
bss_data.chan = ieee80211_get_channel(wiphy, freq);
|
||||
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
|
||||
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
|
||||
@@ -5518,6 +5587,7 @@ static struct cfg80211_ops brcmf_cfg8021
|
||||
.leave_ibss = brcmf_cfg80211_leave_ibss,
|
||||
.get_station = brcmf_cfg80211_get_station,
|
||||
.dump_station = brcmf_cfg80211_dump_station,
|
||||
+ .dump_survey = brcmf_cfg80211_dump_survey,
|
||||
.set_tx_power = brcmf_cfg80211_set_tx_power,
|
||||
.get_tx_power = brcmf_cfg80211_get_tx_power,
|
||||
.add_key = brcmf_cfg80211_add_key,
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -1356,6 +1356,8 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
/* Link to bus module */
|
||||
drvr->hdrlen = 0;
|
||||
+ drvr->chan_stats = vzalloc(256 * sizeof(struct brcmf_chan_stats));
|
||||
+ drvr->num_chan_stats = 256;
|
||||
|
||||
/* Attach and link in the protocol */
|
||||
ret = brcmf_proto_attach(drvr);
|
||||
@@ -1438,6 +1440,12 @@ void brcmf_detach(struct device *dev)
|
||||
if (drvr == NULL)
|
||||
return;
|
||||
|
||||
+ drvr->num_chan_stats = 0;
|
||||
+ if (drvr->chan_stats) {
|
||||
+ vfree(drvr->chan_stats);
|
||||
+ drvr->chan_stats = NULL;
|
||||
+ }
|
||||
+
|
||||
#ifdef CONFIG_INET
|
||||
unregister_inetaddr_notifier(&drvr->inetaddr_notifier);
|
||||
#endif
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
@@ -91,6 +91,11 @@ struct brcmf_rev_info {
|
||||
u32 nvramrev;
|
||||
};
|
||||
|
||||
+struct brcmf_chan_stats {
|
||||
+ u32 freq;
|
||||
+ int noise;
|
||||
+};
|
||||
+
|
||||
/* Common structure for module and instance linkage */
|
||||
struct brcmf_pub {
|
||||
/* Linkage ponters */
|
||||
@@ -100,6 +105,9 @@ struct brcmf_pub {
|
||||
struct cfg80211_ops *ops;
|
||||
struct brcmf_cfg80211_info *config;
|
||||
|
||||
+ int num_chan_stats;
|
||||
+ struct brcmf_chan_stats *chan_stats;
|
||||
+
|
||||
/* Internal brcmf items */
|
||||
uint hdrlen; /* Total BRCMF header length (proto + bus) */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/compat/main.c
|
||||
+++ b/compat/main.c
|
||||
@@ -20,31 +20,6 @@ MODULE_LICENSE("GPL");
|
||||
@@ -19,31 +19,6 @@ MODULE_LICENSE("GPL");
|
||||
#error "You need a CPTCFG_VERSION"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
--- a/backport-include/linux/kconfig.h
|
||||
+++ b/backport-include/linux/kconfig.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#include_next <linux/kconfig.h>
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
|
||||
+
|
||||
#ifndef __ARG_PLACEHOLDER_1
|
||||
#define __ARG_PLACEHOLDER_1 0,
|
||||
#define config_enabled(cfg) _config_enabled(cfg)
|
||||
@@ -16,6 +18,7 @@
|
||||
* 3.1 - 3.3 had a broken version of this, so undef
|
||||
* (they didn't have __ARG_PLACEHOLDER_1)
|
||||
*/
|
||||
+
|
||||
#undef IS_ENABLED
|
||||
#define IS_ENABLED(option) \
|
||||
(config_enabled(option) || config_enabled(option##_MODULE))
|
||||
@@ -31,6 +34,8 @@
|
||||
#undef IS_BUILTIN
|
||||
#define IS_BUILTIN(option) config_enabled(option)
|
||||
|
||||
+#endif
|
||||
+
|
||||
#ifndef IS_REACHABLE
|
||||
/*
|
||||
* IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled
|
||||
@@ -1,15 +0,0 @@
|
||||
--- a/backport-include/linux/rfkill.h
|
||||
+++ b/backport-include/linux/rfkill.h
|
||||
@@ -2,6 +2,12 @@
|
||||
#define __COMPAT_RFKILL_H
|
||||
#include <linux/version.h>
|
||||
|
||||
+#undef CONFIG_RFKILL
|
||||
+#undef CONFIG_RFKILL_FULL
|
||||
+#undef CONFIG_RFKILL_LEDS
|
||||
+#undef CONFIG_RFKILL_MODULE
|
||||
+#undef CONFIG_RFKILL_FULL_MODULE
|
||||
+
|
||||
#if LINUX_VERSION_IS_GEQ(3,10,0)
|
||||
#include_next <linux/rfkill.h>
|
||||
#else
|
||||
@@ -1,34 +0,0 @@
|
||||
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
@@ -11470,6 +11470,15 @@ static const struct attribute_group ipw_
|
||||
.attrs = ipw_sysfs_entries,
|
||||
};
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
+static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||
+ if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||
+ return -EINVAL;
|
||||
+ ndev->mtu = new_mtu;
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifdef CPTCFG_IPW2200_PROMISCUOUS
|
||||
static int ipw_prom_open(struct net_device *dev)
|
||||
{
|
||||
@@ -11518,15 +11527,6 @@ static netdev_tx_t ipw_prom_hard_start_x
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
-static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||
- if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||
- return -EINVAL;
|
||||
- ndev->mtu = new_mtu;
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static const struct net_device_ops ipw_prom_netdev_ops = {
|
||||
#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
.ndo_change_mtu = __change_mtu,
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -437,43 +437,6 @@ USB_SIERRA_NET=
|
||||
USB_VL600=
|
||||
@@ -470,43 +470,6 @@ USB_VL600=
|
||||
USB_NET_CH9200=
|
||||
USB_NET_AQC111=
|
||||
USB_RTL8153_ECM=
|
||||
-SSB_POSSIBLE=
|
||||
-SSB=
|
||||
-SSB_SPROM=
|
||||
@@ -99,7 +99,7 @@
|
||||
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
|
||||
#else
|
||||
return bus->chipco.dev;
|
||||
@@ -4870,7 +4870,7 @@ static int b43_wireless_core_init(struct
|
||||
@@ -4871,7 +4871,7 @@ static int b43_wireless_core_init(struct
|
||||
}
|
||||
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
|
||||
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
|
||||
@@ -158,27 +158,6 @@
|
||||
pcidev = bus->pcicore.dev;
|
||||
#endif
|
||||
gpiodev = bus->chipco.dev ? : pcidev;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
@@ -24,7 +24,7 @@ struct brcms_led {
|
||||
struct gpio_desc *gpiod;
|
||||
};
|
||||
|
||||
-#ifdef CPTCFG_BCMA_DRIVER_GPIO
|
||||
+#ifdef CONFIG_BCMA_DRIVER_GPIO
|
||||
void brcms_led_unregister(struct brcms_info *wl);
|
||||
int brcms_led_register(struct brcms_info *wl);
|
||||
#else
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
@@ -42,6 +42,6 @@ brcmsmac-y := \
|
||||
brcms_trace_events.o \
|
||||
debug.o
|
||||
|
||||
-brcmsmac-$(CPTCFG_BCMA_DRIVER_GPIO) += led.o
|
||||
+brcmsmac-$(CONFIG_BCMA_DRIVER_GPIO) += led.o
|
||||
|
||||
obj-$(CPTCFG_BRCMSMAC) += brcmsmac.o
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -8,7 +8,7 @@ config BRCMSMAC
|
||||
@@ -187,15 +166,15 @@
|
||||
depends on BCMA_POSSIBLE
|
||||
- select BCMA
|
||||
+ depends on BCMA
|
||||
select NEW_LEDS if BCMA_DRIVER_GPIO
|
||||
select LEDS_CLASS if BCMA_DRIVER_GPIO
|
||||
select BRCMUTIL
|
||||
depends on FW_LOADER
|
||||
depends on CORDIC
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1315,117 +1315,6 @@ config BACKPORTED_USB_NET_CH9200
|
||||
config BACKPORTED_USB_NET_AQC111
|
||||
@@ -1414,117 +1414,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||
config BACKPORTED_USB_RTL8153_ECM
|
||||
tristate
|
||||
default USB_NET_AQC111
|
||||
default USB_RTL8153_ECM
|
||||
-config BACKPORTED_SSB_POSSIBLE
|
||||
- tristate
|
||||
- default SSB_POSSIBLE
|
||||
@@ -312,7 +291,7 @@
|
||||
default USB_ACM
|
||||
--- a/Kconfig.sources
|
||||
+++ b/Kconfig.sources
|
||||
@@ -7,9 +7,6 @@ source "$BACKPORT_DIR/net/mac80211/Kconf
|
||||
@@ -10,9 +10,6 @@ source "$BACKPORT_DIR/drivers/soc/qcom/K
|
||||
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
|
||||
|
||||
@@ -324,9 +303,9 @@
|
||||
source "$BACKPORT_DIR/drivers/staging/Kconfig"
|
||||
--- a/Makefile.kernel
|
||||
+++ b/Makefile.kernel
|
||||
@@ -40,8 +40,6 @@ obj-y += compat/
|
||||
obj-$(CPTCFG_CFG80211) += net/wireless/
|
||||
obj-$(CPTCFG_MAC80211) += net/mac80211/
|
||||
@@ -43,8 +43,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
|
||||
obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
|
||||
-obj-$(CPTCFG_SSB) += drivers/ssb/
|
||||
-obj-$(CPTCFG_BCMA) += drivers/bcma/
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/drivers/staging/rtl8723bs/Kconfig
|
||||
+++ b/drivers/staging/rtl8723bs/Kconfig
|
||||
@@ -5,7 +5,6 @@ config RTL8723BS
|
||||
depends on m
|
||||
depends on WLAN && MMC && CFG80211
|
||||
depends on m
|
||||
- select CFG80211_WEXT
|
||||
depends on CRYPTO
|
||||
select BPAUTO_CRYPTO_LIB_ARC4
|
||||
help
|
||||
@@ -0,0 +1,24 @@
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -5363,7 +5363,9 @@ static struct genl_family hwsim_genl_fam
|
||||
.module = THIS_MODULE,
|
||||
.small_ops = hwsim_ops,
|
||||
.n_small_ops = ARRAY_SIZE(hwsim_ops),
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,0)
|
||||
.resv_start_op = HWSIM_CMD_DEL_MAC_ADDR + 1,
|
||||
+#endif
|
||||
.mcgrps = hwsim_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
|
||||
};
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -17232,7 +17232,9 @@ static struct genl_family nl80211_fam __
|
||||
.n_ops = ARRAY_SIZE(nl80211_ops),
|
||||
.small_ops = nl80211_small_ops,
|
||||
.n_small_ops = ARRAY_SIZE(nl80211_small_ops),
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,0)
|
||||
.resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1,
|
||||
+#endif
|
||||
.mcgrps = nl80211_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(nl80211_mcgrps),
|
||||
.parallel_ops = true,
|
||||
13
package/kernel/mac80211/patches/build/090-bcma-otp.patch
Normal file
13
package/kernel/mac80211/patches/build/090-bcma-otp.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- /dev/null
|
||||
+++ b/backport-include/linux/bcma/bcma_driver_chipcommon.h
|
||||
@@ -0,0 +1,10 @@
|
||||
+#ifndef __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+#define __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+
|
||||
+#include_next <linux/bcma/bcma_driver_chipcommon.h>
|
||||
+
|
||||
+#ifndef BCMA_CC_SROM_CONTROL_OTP_PRESENT
|
||||
+#define BCMA_CC_SROM_CONTROL_OTP_PRESENT 0x00000020
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
@@ -0,0 +1,76 @@
|
||||
From 54e0f9aaf340377fb76acdffee9ec7372c4b70ae Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Mon, 17 Oct 2022 11:35:36 +0200
|
||||
Subject: [PATCH] backports: drop QRTR and MHI
|
||||
|
||||
Backports currently include QRTR and MHI due to ath11k-pci requiring them,
|
||||
however this at the same time prevents us from adding ath11k-ahb as it
|
||||
also requires QRTR however its AHB variant from the kernel will conflict
|
||||
with the core provided by backports.
|
||||
|
||||
Since MHI also conflicts with existing OpenWrt kmods providing MHI drop
|
||||
both from backports and use the ones provided by OpenWrt kernel.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
Kconfig.sources | 2 --
|
||||
Makefile.kernel | 2 --
|
||||
drivers/net/wireless/ath/ath11k/Kconfig | 6 +++---
|
||||
local-symbols | 8 --------
|
||||
4 files changed, 3 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/Kconfig.sources
|
||||
+++ b/Kconfig.sources
|
||||
@@ -4,8 +4,6 @@ source "$BACKPORT_DIR/compat/Kconfig"
|
||||
# these are copied from the kernel
|
||||
source "$BACKPORT_DIR/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/net/mac80211/Kconfig"
|
||||
-source "$BACKPORT_DIR/net/qrtr/Kconfig"
|
||||
-source "$BACKPORT_DIR/drivers/bus/mhi/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/soc/qcom/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
|
||||
--- a/Makefile.kernel
|
||||
+++ b/Makefile.kernel
|
||||
@@ -39,9 +39,7 @@ obj-y += compat/
|
||||
|
||||
obj-$(CPTCFG_CFG80211) += net/wireless/
|
||||
obj-$(CPTCFG_MAC80211) += net/mac80211/
|
||||
-obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
|
||||
-obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
|
||||
obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
@@ -25,9 +25,9 @@ config ATH11K_PCI
|
||||
tristate "Atheros ath11k PCI support"
|
||||
depends on m
|
||||
depends on ATH11K && PCI
|
||||
- select MHI_BUS
|
||||
- select QRTR
|
||||
- select QRTR_MHI
|
||||
+ depends on MHI_BUS
|
||||
+ depends on QRTR
|
||||
+ depends on QRTR_MHI
|
||||
help
|
||||
This module adds support for PCIE bus
|
||||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -65,14 +65,6 @@ MAC80211_MESH_PS_DEBUG=
|
||||
MAC80211_TDLS_DEBUG=
|
||||
MAC80211_DEBUG_COUNTERS=
|
||||
MAC80211_STA_HASH_MAX_SIZE=
|
||||
-QRTR=
|
||||
-QRTR_SMD=
|
||||
-QRTR_TUN=
|
||||
-QRTR_MHI=
|
||||
-MHI_BUS=
|
||||
-MHI_BUS_DEBUG=
|
||||
-MHI_BUS_PCI_GENERIC=
|
||||
-MHI_BUS_EP=
|
||||
QCOM_AOSS_QMP=
|
||||
QCOM_COMMAND_DB=
|
||||
QCOM_CPR=
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -5695,6 +5695,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||
@@ -5703,6 +5703,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||
|
||||
static const struct pci_device_id mwl8k_pci_id_table[] = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
@@ -2053,6 +2053,8 @@ struct wireless_dev *lbs_cfg_alloc(struc
|
||||
@@ -2052,6 +2052,8 @@ struct wireless_dev *lbs_cfg_alloc(struc
|
||||
goto err_wiphy_new;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
err_wiphy_new:
|
||||
--- a/drivers/net/wireless/marvell/libertas/main.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/main.c
|
||||
@@ -935,6 +935,7 @@ struct lbs_private *lbs_add_card(void *c
|
||||
@@ -934,6 +934,7 @@ struct lbs_private *lbs_add_card(void *c
|
||||
goto err_adapter;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
@@ -2129,6 +2129,8 @@ int lbs_cfg_register(struct lbs_private
|
||||
@@ -2128,6 +2128,8 @@ int lbs_cfg_register(struct lbs_private
|
||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
||||
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From ef8098cd6cb8b5989afef2e8461fe6ba9570a854 Mon Sep 17 00:00:00 2001
|
||||
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||
Date: Wed, 24 Nov 2021 12:47:40 +0100
|
||||
Subject: [PATCH] mwifiex: increase the global limit up to 4 SSID
|
||||
|
||||
Firmware for SDIO (88W8997), which is used in Turris MOX SDIO addon [1],
|
||||
allows up to 4 SSID. Unfortunately, driver (even in mainline kernel)
|
||||
has a global limit for all Marvell cards up to 3 SSID.
|
||||
|
||||
Pali Rohár tested this patch and verified that the SDIO Wi-Fi addon works
|
||||
with the 4 SSID. So, let's increase the global limit from 3 to 4.
|
||||
|
||||
Ideally, this patch should be done differently before sending
|
||||
it to Linux kernel. It means that limit definition should be moved to
|
||||
the card-specific structure.
|
||||
|
||||
[1] https://docs.turris.cz/hw/mox/addons/#wi-fi-sdio
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/decl.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
|
||||
#define MWIFIEX_BSS_COEX_COUNT 2
|
||||
-#define MWIFIEX_MAX_BSS_NUM (3)
|
||||
+#define MWIFIEX_MAX_BSS_NUM (4)
|
||||
|
||||
#define MWIFIEX_DMA_ALIGN_SZ 64
|
||||
#define MWIFIEX_RX_HEADROOM 64
|
||||
@@ -100,7 +100,7 @@
|
||||
#define MWIFIEX_RATE_INDEX_OFDM0 4
|
||||
|
||||
#define MWIFIEX_MAX_STA_NUM 3
|
||||
-#define MWIFIEX_MAX_UAP_NUM 3
|
||||
+#define MWIFIEX_MAX_UAP_NUM 4
|
||||
#define MWIFIEX_MAX_P2P_NUM 3
|
||||
|
||||
#define MWIFIEX_A_BAND_START_FREQ 5000
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -6280,6 +6280,8 @@ static int mwl8k_probe(struct pci_dev *p
|
||||
@@ -6289,6 +6289,8 @@ static int mwl8k_probe(struct pci_dev *p
|
||||
|
||||
priv->running_bsses = 0;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
return rc;
|
||||
|
||||
err_stop_firmware:
|
||||
@@ -6313,8 +6315,6 @@ static void mwl8k_remove(struct pci_dev
|
||||
@@ -6322,8 +6324,6 @@ static void mwl8k_remove(struct pci_dev
|
||||
return;
|
||||
priv = hw->priv;
|
||||
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
From f7252b1b5755150535af226e806594bbefd45e0f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
|
||||
Date: Sun, 26 Sep 2021 14:39:44 +0200
|
||||
Subject: [PATCH] mwifiex: Print stringified name of command in error log
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Failed hex command number in error log is hard to understand.
|
||||
So add also more human readable stringified command name into error log.
|
||||
|
||||
Signed-off-by: Pali Rohár <pali@kernel.org>
|
||||
---
|
||||
drivers/net/wireless/marvell/mwifiex/cmdevt.c | 96 +++++++++++++++++--
|
||||
drivers/net/wireless/marvell/mwifiex/main.h | 2 +
|
||||
.../wireless/marvell/mwifiex/sta_cmdresp.c | 5 +-
|
||||
.../net/wireless/marvell/mwifiex/uap_cmd.c | 3 +-
|
||||
4 files changed, 95 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
@@ -16,6 +16,85 @@
|
||||
|
||||
static void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter);
|
||||
|
||||
+const char *
|
||||
+mwifiex_cmd_to_str(u16 command)
|
||||
+{
|
||||
+ switch (command) {
|
||||
+ case HostCmd_CMD_GET_HW_SPEC: return "GET_HW_SPEC";
|
||||
+ case HostCmd_CMD_802_11_SCAN: return "SCAN";
|
||||
+ case HostCmd_CMD_802_11_GET_LOG: return "GET_LOG";
|
||||
+ case HostCmd_CMD_MAC_MULTICAST_ADR: return "MAC_MULTICAST_ADR";
|
||||
+ case HostCmd_CMD_802_11_EEPROM_ACCESS: return "EEPROM_ACCESS";
|
||||
+ case HostCmd_CMD_802_11_ASSOCIATE: return "ASSOCIATE";
|
||||
+ case HostCmd_CMD_802_11_SNMP_MIB: return "SNMP_MIB";
|
||||
+ case HostCmd_CMD_MAC_REG_ACCESS: return "MAC_REG_ACCESS";
|
||||
+ case HostCmd_CMD_BBP_REG_ACCESS: return "BBP_REG_ACCESS";
|
||||
+ case HostCmd_CMD_RF_REG_ACCESS: return "RF_REG_ACCESS";
|
||||
+ case HostCmd_CMD_PMIC_REG_ACCESS: return "PMIC_REG_ACCESS";
|
||||
+ case HostCmd_CMD_RF_TX_PWR: return "RF_TX_PWR";
|
||||
+ case HostCmd_CMD_RF_ANTENNA: return "RF_ANTENNA";
|
||||
+ case HostCmd_CMD_802_11_DEAUTHENTICATE: return "DEAUTHENTICATE";
|
||||
+ case HostCmd_CMD_MAC_CONTROL: return "MAC_CONTROL";
|
||||
+ case HostCmd_CMD_802_11_AD_HOC_START: return "AD_HOC_START";
|
||||
+ case HostCmd_CMD_802_11_AD_HOC_JOIN: return "AD_HOC_JOIN";
|
||||
+ case HostCmd_CMD_802_11_AD_HOC_STOP: return "AD_HOC_STOP";
|
||||
+ case HostCmd_CMD_802_11_MAC_ADDRESS: return "MAC_ADDRESS";
|
||||
+ case HostCmd_CMD_802_11D_DOMAIN_INFO: return "DOMAIN_INFO";
|
||||
+ case HostCmd_CMD_802_11_KEY_MATERIAL: return "KEY_MATERIAL";
|
||||
+ case HostCmd_CMD_802_11_BG_SCAN_CONFIG: return "BG_SCAN_CONFIG";
|
||||
+ case HostCmd_CMD_802_11_BG_SCAN_QUERY: return "BG_SCAN_QUERY";
|
||||
+ case HostCmd_CMD_WMM_GET_STATUS: return "WMM_GET_STATUS";
|
||||
+ case HostCmd_CMD_802_11_SUBSCRIBE_EVENT: return "SUBSCRIBE_EVENT";
|
||||
+ case HostCmd_CMD_802_11_TX_RATE_QUERY: return "TX_RATE_QUERY";
|
||||
+ case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS: return "IBSS_COALESCING_STATUS";
|
||||
+ case HostCmd_CMD_MEM_ACCESS: return "MEM_ACCESS";
|
||||
+ case HostCmd_CMD_CFG_DATA: return "CFG_DATA";
|
||||
+ case HostCmd_CMD_VERSION_EXT: return "VERSION_EXT";
|
||||
+ case HostCmd_CMD_MEF_CFG: return "MEF_CFG";
|
||||
+ case HostCmd_CMD_RSSI_INFO: return "RSSI_INFO";
|
||||
+ case HostCmd_CMD_FUNC_INIT: return "FUNC_INIT";
|
||||
+ case HostCmd_CMD_FUNC_SHUTDOWN: return "FUNC_SHUTDOWN";
|
||||
+ case HOST_CMD_APCMD_SYS_RESET: return "SYS_RESET";
|
||||
+ case HostCmd_CMD_UAP_SYS_CONFIG: return "UAP_SYS_CONFIG";
|
||||
+ case HostCmd_CMD_UAP_BSS_START: return "UAP_BSS_START";
|
||||
+ case HostCmd_CMD_UAP_BSS_STOP: return "UAP_BSS_STOP";
|
||||
+ case HOST_CMD_APCMD_STA_LIST: return "STA_LIST";
|
||||
+ case HostCmd_CMD_UAP_STA_DEAUTH: return "UAP_STA_DEAUTH";
|
||||
+ case HostCmd_CMD_11N_CFG: return "11N_CFG";
|
||||
+ case HostCmd_CMD_11N_ADDBA_REQ: return "ADDBA_REQ";
|
||||
+ case HostCmd_CMD_11N_ADDBA_RSP: return "ADDBA_RSP";
|
||||
+ case HostCmd_CMD_11N_DELBA: return "DELBA";
|
||||
+ case HostCmd_CMD_RECONFIGURE_TX_BUFF: return "RECONFIGURE_TX_BUFF";
|
||||
+ case HostCmd_CMD_CHAN_REPORT_REQUEST: return "CHAN_REPORT_REQUEST";
|
||||
+ case HostCmd_CMD_AMSDU_AGGR_CTRL: return "AMSDU_AGGR_CTRL";
|
||||
+ case HostCmd_CMD_TXPWR_CFG: return "TXPWR_CFG";
|
||||
+ case HostCmd_CMD_TX_RATE_CFG: return "TX_RATE_CFG";
|
||||
+ case HostCmd_CMD_ROBUST_COEX: return "ROBUST_COEX";
|
||||
+ case HostCmd_CMD_802_11_PS_MODE_ENH: return "PS_MODE_ENH";
|
||||
+ case HostCmd_CMD_802_11_HS_CFG_ENH: return "HS_CFG_ENH";
|
||||
+ case HostCmd_CMD_P2P_MODE_CFG: return "P2P_MODE_CFG";
|
||||
+ case HostCmd_CMD_CAU_REG_ACCESS: return "CAU_REG_ACCESS";
|
||||
+ case HostCmd_CMD_SET_BSS_MODE: return "SET_BSS_MODE";
|
||||
+ case HostCmd_CMD_PCIE_DESC_DETAILS: return "PCIE_DESC_DETAILS";
|
||||
+ case HostCmd_CMD_802_11_SCAN_EXT: return "SCAN_EXT";
|
||||
+ case HostCmd_CMD_COALESCE_CFG: return "COALESCE_CFG";
|
||||
+ case HostCmd_CMD_MGMT_FRAME_REG: return "MGMT_FRAME_REG";
|
||||
+ case HostCmd_CMD_REMAIN_ON_CHAN: return "REMAIN_ON_CHAN";
|
||||
+ case HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG: return "GTK_REKEY_OFFLOAD_CFG";
|
||||
+ case HostCmd_CMD_11AC_CFG: return "11AC_CFG";
|
||||
+ case HostCmd_CMD_HS_WAKEUP_REASON: return "HS_WAKEUP_REASON";
|
||||
+ case HostCmd_CMD_TDLS_CONFIG: return "TDLS_CONFIG";
|
||||
+ case HostCmd_CMD_MC_POLICY: return "MC_POLICY";
|
||||
+ case HostCmd_CMD_TDLS_OPER: return "TDLS_OPER";
|
||||
+ case HostCmd_CMD_FW_DUMP_EVENT: return "FW_DUMP_EVENT";
|
||||
+ case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG: return "SDIO_SP_RX_AGGR_CFG";
|
||||
+ case HostCmd_CMD_STA_CONFIGURE: return "STA_CONFIGURE";
|
||||
+ case HostCmd_CMD_CHAN_REGION_CFG: return "CHAN_REGION_CFG";
|
||||
+ case HostCmd_CMD_PACKET_AGGR_CTRL: return "PACKET_AGGR_CTRL";
|
||||
+ default: return "UNKNOWN";
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* This function initializes a command node.
|
||||
*
|
||||
@@ -193,8 +272,8 @@ static int mwifiex_dnld_cmd_to_fw(struct
|
||||
cmd_code != HostCmd_CMD_FUNC_SHUTDOWN &&
|
||||
cmd_code != HostCmd_CMD_FUNC_INIT) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "DNLD_CMD: FW in reset state, ignore cmd %#x\n",
|
||||
- cmd_code);
|
||||
+ "DNLD_CMD: FW in reset state, ignore cmd %s (%#x)\n",
|
||||
+ mwifiex_cmd_to_str(cmd_code), cmd_code);
|
||||
mwifiex_recycle_cmd_node(adapter, cmd_node);
|
||||
queue_work(adapter->workqueue, &adapter->main_work);
|
||||
return -1;
|
||||
@@ -653,8 +732,8 @@ int mwifiex_send_cmd(struct mwifiex_priv
|
||||
/* Return error, since the command preparation failed */
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "PREP_CMD: cmd %#x preparation failed\n",
|
||||
- cmd_no);
|
||||
+ "PREP_CMD: cmd %s (%#x) preparation failed\n",
|
||||
+ mwifiex_cmd_to_str(cmd_no), cmd_no);
|
||||
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
|
||||
return -1;
|
||||
}
|
||||
@@ -902,8 +981,9 @@ int mwifiex_process_cmdresp(struct mwifi
|
||||
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "%s: cmd %#x failed during\t"
|
||||
- "initialization\n", __func__, cmdresp_no);
|
||||
+ "%s: cmd %s (%#x) failed during\t"
|
||||
+ "initialization\n", __func__,
|
||||
+ mwifiex_cmd_to_str(cmdresp_no), cmdresp_no);
|
||||
mwifiex_init_fw_complete(adapter);
|
||||
return -1;
|
||||
} else if (adapter->last_init_cmd == cmdresp_no)
|
||||
@@ -1273,8 +1353,8 @@ mwifiex_process_sleep_confirm_resp(struc
|
||||
|
||||
if (command != HostCmd_CMD_802_11_PS_MODE_ENH) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "%s: rcvd unexpected resp for cmd %#x, result = %x\n",
|
||||
- __func__, command, result);
|
||||
+ "%s: rcvd unexpected resp for cmd %s (%#x), result = %x\n",
|
||||
+ __func__, mwifiex_cmd_to_str(command), command, result);
|
||||
return;
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
@@ -1099,6 +1099,8 @@ void mwifiex_cancel_all_pending_cmd(stru
|
||||
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_scan(struct mwifiex_adapter *adapter);
|
||||
|
||||
+const char *mwifiex_cmd_to_str(u16 command);
|
||||
+
|
||||
void mwifiex_recycle_cmd_node(struct mwifiex_adapter *adapter,
|
||||
struct cmd_ctrl_node *cmd_node);
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
@@ -36,8 +36,9 @@ mwifiex_process_cmdresp_error(struct mwi
|
||||
struct host_cmd_ds_802_11_ps_mode_enh *pm;
|
||||
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
- "CMD_RESP: cmd %#x error, result=%#x\n",
|
||||
- resp->command, resp->result);
|
||||
+ "CMD_RESP: cmd %s (%#x) error, result=%#x\n",
|
||||
+ mwifiex_cmd_to_str(le16_to_cpu(resp->command)),
|
||||
+ le16_to_cpu(resp->command), le16_to_cpu(resp->result));
|
||||
|
||||
if (adapter->curr_cmd->wait_q_enabled)
|
||||
adapter->cmd_wait_q.status = -1;
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
@@ -794,7 +794,8 @@ int mwifiex_uap_prepare_cmd(struct mwifi
|
||||
break;
|
||||
default:
|
||||
mwifiex_dbg(priv->adapter, ERROR,
|
||||
- "PREP_CMD: unknown cmd %#x\n", cmd_no);
|
||||
+ "PREP_CMD: unknown cmd (%s) %#x\n",
|
||||
+ mwifiex_cmd_to_str(cmd_no), cmd_no);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user