Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
ec18b5890b
@ -307,7 +307,7 @@ define Build/fit
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/gzip
|
define Build/gzip
|
||||||
gzip -f -9n -c $@ $(1) > $@.new
|
$(STAGING_DIR_HOST)/bin/gzip -f -9n -c $@ $(1) > $@.new
|
||||||
@mv $@.new $@
|
@mv $@.new $@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -520,6 +520,7 @@ define Device/Build/compile
|
|||||||
$$(_COMPILE_TARGET): $(KDIR)/$(1)
|
$$(_COMPILE_TARGET): $(KDIR)/$(1)
|
||||||
$(eval $(call Device/Export,$(KDIR)/$(1)))
|
$(eval $(call Device/Export,$(KDIR)/$(1)))
|
||||||
$(KDIR)/$(1): FORCE
|
$(KDIR)/$(1): FORCE
|
||||||
|
rm -f $(KDIR)/$(1)
|
||||||
$$(call concat_cmd,$(COMPILE/$(1)))
|
$$(call concat_cmd,$(COMPILE/$(1)))
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
LINUX_VERSION-5.10 = .159
|
LINUX_VERSION-5.10 = .160
|
||||||
LINUX_KERNEL_HASH-5.10.159 = 1ba9bf57b6bf36d76447d5044b80b746cb5fd61d981c811603dc763b7789cea7
|
LINUX_KERNEL_HASH-5.10.160 = 30d5076acae863941045880c4c5c5109d26a54a932168fa1324237e8aeaa840b
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
LINUX_VERSION-5.15 = .83
|
LINUX_VERSION-5.15 = .84
|
||||||
LINUX_KERNEL_HASH-5.15.83 = 40590843c04c85789105157f69efbd71a4efe87ae2568e40d1b7258c3f747ff3
|
LINUX_KERNEL_HASH-5.15.84 = 318dc30cb059c2e35b59652b166b39804bb3a941f11878aae6119019a04b8217
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
PKG_NAME ?= trusted-firmware-a
|
PKG_NAME ?= trusted-firmware-a
|
||||||
PKG_CPE_ID ?= cpe:/a:arm:arm_trusted_firmware
|
PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a
|
||||||
|
|
||||||
ifndef PKG_SOURCE_PROTO
|
ifndef PKG_SOURCE_PROTO
|
||||||
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
|
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=arm-trusted-firmware-sunxi
|
PKG_NAME:=arm-trusted-firmware-sunxi
|
||||||
PKG_CPE_ID:=cpe:/o:arm:arm_trusted_firmware
|
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
@ -173,7 +173,7 @@ Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
|
|||||||
+};
|
+};
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/configs/nanopi_r1_defconfig
|
+++ b/configs/nanopi_r1_defconfig
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,21 @@
|
||||||
+CONFIG_ARM=y
|
+CONFIG_ARM=y
|
||||||
+CONFIG_ARCH_SUNXI=y
|
+CONFIG_ARCH_SUNXI=y
|
||||||
+CONFIG_SPL=y
|
+CONFIG_SPL=y
|
||||||
@ -186,7 +186,6 @@ Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
|
|||||||
+CONFIG_NR_DRAM_BANKS=1
|
+CONFIG_NR_DRAM_BANKS=1
|
||||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||||
+CONFIG_CONSOLE_MUX=y
|
+CONFIG_CONSOLE_MUX=y
|
||||||
+CONFIG_SYS_CLK_FREQ=480000000
|
|
||||||
+# CONFIG_CMD_FLASH is not set
|
+# CONFIG_CMD_FLASH is not set
|
||||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
+# CONFIG_SPL_EFI_PARTITION is not set
|
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
setenv fdt_high ffffffff
|
setenv fdt_high ffffffff
|
||||||
setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
|
setenv mmc_rootpart 2
|
||||||
setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
|
part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid
|
||||||
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
|
setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_addr_r uImage
|
||||||
|
setenv loaddtb fatload mmc \$mmc_bootdev \$fdt_addr_r dtb
|
||||||
|
setenv bootargs console=ttyS0,115200 earlyprintk root=PARTUUID=${uuid} rootwait
|
||||||
setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
|
setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
|
||||||
run uenvcmd
|
run uenvcmd
|
||||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=linux-firmware
|
PKG_NAME:=linux-firmware
|
||||||
PKG_VERSION:=20221109
|
PKG_VERSION:=20221109
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
23
package/firmware/linux-firmware/qca_ath11k.mk
Normal file
23
package/firmware/linux-firmware/qca_ath11k.mk
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Package/ath11k-firmware-qca6390 = $(call Package/firmware-default,QCA6390 ath11k firmware)
|
||||||
|
define Package/ath11k-firmware-qca6390/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCA6390/hw2.0
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/ath11k/QCA6390/hw2.0/* $(1)/lib/firmware/ath11k/QCA6390/hw2.0/
|
||||||
|
endef
|
||||||
|
$(eval $(call BuildPackage,ath11k-firmware-qca6390))
|
||||||
|
|
||||||
|
Package/ath11k-firmware-wcn6750 = $(call Package/firmware-default,WCN6750 ath11k firmware)
|
||||||
|
define Package/ath11k-firmware-wcn6750/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/WCN6750/hw1.0
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/ath11k/WCN6750/hw1.0/* $(1)/lib/firmware/ath11k/WCN6750/hw1.0/
|
||||||
|
endef
|
||||||
|
$(eval $(call BuildPackage,ath11k-firmware-wcn6750))
|
||||||
|
|
||||||
|
Package/ath11k-firmware-wcn6855 = $(call Package/firmware-default,WCN6855 ath11k firmware)
|
||||||
|
define Package/ath11k-firmware-wcn6855/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/WCN6855/hw2.0
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/ath11k/WCN6855/hw2.0/* $(1)/lib/firmware/ath11k/WCN6855/hw2.0/
|
||||||
|
endef
|
||||||
|
$(eval $(call BuildPackage,ath11k-firmware-wcn6855))
|
@ -1438,3 +1438,67 @@ define KernelPackage/netconsole/description
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,netconsole))
|
$(eval $(call KernelPackage,netconsole))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/qrtr
|
||||||
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
|
TITLE:=Qualcomm IPC Router support
|
||||||
|
HIDDEN:=1
|
||||||
|
DEPENDS:=@!LINUX_5_10
|
||||||
|
KCONFIG:=CONFIG_QRTR
|
||||||
|
FILES:= \
|
||||||
|
$(LINUX_DIR)/net/qrtr/qrtr.ko \
|
||||||
|
$(LINUX_DIR)/net/qrtr/ns.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,qrtr)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/qrtr/description
|
||||||
|
Qualcomm IPC Router support
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,qrtr))
|
||||||
|
|
||||||
|
define KernelPackage/qrtr-tun
|
||||||
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
|
TITLE:=TUN device for Qualcomm IPC Router
|
||||||
|
DEPENDS:=+kmod-qrtr
|
||||||
|
KCONFIG:=CONFIG_QRTR_TUN
|
||||||
|
FILES:= $(LINUX_DIR)/net/qrtr/qrtr-tun.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,qrtr-tun)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/qrtr-tun/description
|
||||||
|
TUN device for Qualcomm IPC Router
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,qrtr-tun))
|
||||||
|
|
||||||
|
define KernelPackage/qrtr-smd
|
||||||
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
|
TITLE:=SMD IPC Router channels
|
||||||
|
DEPENDS:=+kmod-qrtr @TARGET_ipq807x
|
||||||
|
KCONFIG:=CONFIG_QRTR_SMD
|
||||||
|
FILES:= $(LINUX_DIR)/net/qrtr/qrtr-smd.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,qrtr-smd)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/qrtr-smd/description
|
||||||
|
SMD IPC Router channels
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,qrtr-smd))
|
||||||
|
|
||||||
|
define KernelPackage/qrtr-mhi
|
||||||
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
|
TITLE:=MHI IPC Router channels
|
||||||
|
DEPENDS:=+kmod-mhi-bus +kmod-qrtr
|
||||||
|
KCONFIG:=CONFIG_QRTR_MHI
|
||||||
|
FILES:= $(LINUX_DIR)/net/qrtr/qrtr-mhi.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,qrtr-mhi)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/qrtr-mhi/description
|
||||||
|
MHI IPC Router channels
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,qrtr-mhi))
|
||||||
|
@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
PKG_NAME:=mac80211
|
PKG_NAME:=mac80211
|
||||||
|
|
||||||
PKG_VERSION:=6.1-rc8
|
PKG_VERSION:=6.1-rc8
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
# PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
|
# PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||||
PKG_HASH:=7f3d96c2573183cd79d6a3ebe5e1b7b73c19d1326d443c85b69c4181f14e6e2b
|
PKG_HASH:=7f3d96c2573183cd79d6a3ebe5e1b7b73c19d1326d443c85b69c4181f14e6e2b
|
||||||
@ -307,6 +307,7 @@ define Build/Prepare
|
|||||||
$(PKG_BUILD_DIR)/include/linux/crc8.h \
|
$(PKG_BUILD_DIR)/include/linux/crc8.h \
|
||||||
$(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
|
$(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
|
||||||
$(PKG_BUILD_DIR)/include/linux/wl12xx.h \
|
$(PKG_BUILD_DIR)/include/linux/wl12xx.h \
|
||||||
|
$(PKG_BUILD_DIR)/include/linux/mhi.h \
|
||||||
$(PKG_BUILD_DIR)/include/net/ieee80211.h \
|
$(PKG_BUILD_DIR)/include/net/ieee80211.h \
|
||||||
$(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
|
$(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
PKG_DRIVERS += \
|
PKG_DRIVERS += \
|
||||||
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \
|
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \
|
||||||
carl9170 owl-loader ar5523 wil6210
|
ath11k ath11k-pci carl9170 owl-loader ar5523 wil6210
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS += \
|
PKG_CONFIG_DEPENDS += \
|
||||||
CONFIG_PACKAGE_ATH_DEBUG \
|
CONFIG_PACKAGE_ATH_DEBUG \
|
||||||
@ -12,6 +12,7 @@ PKG_CONFIG_DEPENDS += \
|
|||||||
CONFIG_ATH9K_TX99 \
|
CONFIG_ATH9K_TX99 \
|
||||||
CONFIG_ATH10K_LEDS \
|
CONFIG_ATH10K_LEDS \
|
||||||
CONFIG_ATH10K_THERMAL \
|
CONFIG_ATH10K_THERMAL \
|
||||||
|
CONFIG_ATH11K_THERMAL \
|
||||||
CONFIG_ATH_USER_REGD
|
CONFIG_ATH_USER_REGD
|
||||||
|
|
||||||
ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
||||||
@ -19,6 +20,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
|
|||||||
ATH9K_DEBUGFS \
|
ATH9K_DEBUGFS \
|
||||||
ATH9K_HTC_DEBUGFS \
|
ATH9K_HTC_DEBUGFS \
|
||||||
ATH10K_DEBUGFS \
|
ATH10K_DEBUGFS \
|
||||||
|
ATH11K_DEBUGFS \
|
||||||
CARL9170_DEBUGFS \
|
CARL9170_DEBUGFS \
|
||||||
ATH5K_DEBUG \
|
ATH5K_DEBUG \
|
||||||
ATH6KL_DEBUG \
|
ATH6KL_DEBUG \
|
||||||
@ -28,6 +30,7 @@ endif
|
|||||||
ifdef CONFIG_PACKAGE_MAC80211_TRACING
|
ifdef CONFIG_PACKAGE_MAC80211_TRACING
|
||||||
config-y += \
|
config-y += \
|
||||||
ATH10K_TRACING \
|
ATH10K_TRACING \
|
||||||
|
ATH11K_TRACING \
|
||||||
ATH6KL_TRACING \
|
ATH6KL_TRACING \
|
||||||
ATH_TRACEPOINTS \
|
ATH_TRACEPOINTS \
|
||||||
ATH5K_TRACER \
|
ATH5K_TRACER \
|
||||||
@ -35,9 +38,9 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
|
config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
|
||||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
|
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_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-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
|
||||||
config-$(call config_package,ath9k) += ATH9K
|
config-$(call config_package,ath9k) += ATH9K
|
||||||
config-$(call config_package,ath9k-common) += ATH9K_COMMON
|
config-$(call config_package,ath9k-common) += ATH9K_COMMON
|
||||||
@ -52,10 +55,13 @@ config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99
|
|||||||
config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
|
config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
|
||||||
config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
|
config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
|
||||||
config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
|
config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
|
||||||
|
config-$(CONFIG_ATH11K_THERMAL) += ATH11K_THERMAL
|
||||||
|
|
||||||
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
||||||
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
||||||
config-$(call config_package,ath10k-smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS
|
config-$(call config_package,ath10k-smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS
|
||||||
|
config-$(call config_package,ath11k) += ATH11K
|
||||||
|
config-$(call config_package,ath11k-pci) += ATH11K_PCI
|
||||||
|
|
||||||
config-$(call config_package,ath5k) += ATH5K
|
config-$(call config_package,ath5k) += ATH5K
|
||||||
ifdef CONFIG_TARGET_ath25
|
ifdef CONFIG_TARGET_ath25
|
||||||
@ -291,6 +297,43 @@ define KernelPackage/ath10k-smallbuffers
|
|||||||
VARIANT:=smallbuffers
|
VARIANT:=smallbuffers
|
||||||
endef
|
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_11AC_SUPPORT +@DRIVER_11AX_SUPPORT \
|
||||||
|
+kmod-crypto-michael-mic +ATH11K_THERMAL:kmod-hwmon-core +ATH11K_THERMAL:kmod-thermal
|
||||||
|
FILES:=$(PKG_BUILD_DIR)/drivers/soc/qcom/qmi_helpers.ko \
|
||||||
|
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
|
||||||
|
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
|
||||||
|
|
||||||
|
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 +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
|
define KernelPackage/carl9170
|
||||||
$(call KernelPackage/mac80211/Default)
|
$(call KernelPackage/mac80211/Default)
|
||||||
TITLE:=Driver for Atheros AR9170 USB sticks
|
TITLE:=Driver for Atheros AR9170 USB sticks
|
||||||
|
@ -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,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=
|
@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
|||||||
|
|
||||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_DATE:=2022-12-09
|
PKG_SOURCE_DATE:=2022-12-22
|
||||||
PKG_SOURCE_VERSION:=7fae1de12ae7832a6095fd2df198f41fabd5223d
|
PKG_SOURCE_VERSION:=5b509e80384ab019ac11aa90c81ec0dbb5b0d7f2
|
||||||
PKG_MIRROR_HASH:=c2bf2f23265d5e181c275a62a64f487b190f19b43fc4c584b62b9e6c16e992ef
|
PKG_MIRROR_HASH:=6fc25df4d28becd010ff4971b23731c08b53e69381a9e4c868091899712f78a9
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
PKG_USE_NINJA:=0
|
PKG_USE_NINJA:=0
|
||||||
|
@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define KernelPackage/rtl8188eu
|
define KernelPackage/rtl8188eu
|
||||||
SUBMENU:=Wireless Drivers
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=Realtek 8188EU(S)/8188ETV support
|
TITLE:=Realtek 8188EU(S)/8188ETV support
|
||||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT
|
DEPENDS:=+kmod-cfg80211 +kmod-usb-core
|
||||||
FILES:=$(PKG_BUILD_DIR)/rtl8188eu.ko
|
FILES:=$(PKG_BUILD_DIR)/rtl8188eu.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,rtl8188eu)
|
AUTOLOAD:=$(call AutoProbe,rtl8188eu)
|
||||||
endef
|
endef
|
||||||
|
@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define KernelPackage/rtl8189es
|
define KernelPackage/rtl8189es
|
||||||
SUBMENU:=Wireless Drivers
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=Realtek RTL8189ETV SDIO WiFi
|
TITLE:=Realtek RTL8189ETV SDIO WiFi
|
||||||
DEPENDS:=+kmod-cfg80211 +kmod-mmc +@DRIVER_11N_SUPPORT
|
DEPENDS:=+kmod-cfg80211 +kmod-mmc
|
||||||
FILES:=$(PKG_BUILD_DIR)/rtl8189es.ko
|
FILES:=$(PKG_BUILD_DIR)/rtl8189es.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,rtl8189es)
|
AUTOLOAD:=$(call AutoProbe,rtl8189es)
|
||||||
endef
|
endef
|
||||||
|
@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define KernelPackage/rtl8192eu
|
define KernelPackage/rtl8192eu
|
||||||
SUBMENU:=Wireless Drivers
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=Realtek RTL8192EU support
|
TITLE:=Realtek RTL8192EU support
|
||||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT
|
DEPENDS:=+kmod-cfg80211 +kmod-usb-core
|
||||||
FILES:=$(PKG_BUILD_DIR)/rtl8192eu.ko
|
FILES:=$(PKG_BUILD_DIR)/rtl8192eu.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,rtl8192eu)
|
AUTOLOAD:=$(call AutoProbe,rtl8192eu)
|
||||||
endef
|
endef
|
||||||
|
@ -30,7 +30,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define KernelPackage/rtl8812au-ac
|
define KernelPackage/rtl8812au-ac
|
||||||
SUBMENU:=Wireless Drivers
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=Realtek RTL8812AU/21AU wireless drivers
|
TITLE:=Realtek RTL8812AU/21AU wireless drivers
|
||||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT
|
||||||
FILES:=$(PKG_BUILD_DIR)/rtl8812au.ko
|
FILES:=$(PKG_BUILD_DIR)/rtl8812au.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,rtl8812au)
|
AUTOLOAD:=$(call AutoProbe,rtl8812au)
|
||||||
CONFLICTS:=kmod-rtl8812au-ct
|
CONFLICTS:=kmod-rtl8812au-ct
|
||||||
|
@ -31,7 +31,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define KernelPackage/rtl8821cu
|
define KernelPackage/rtl8821cu
|
||||||
SUBMENU:=Wireless Drivers
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=Realtek RTL8811CU/RTL8821CU support
|
TITLE:=Realtek RTL8811CU/RTL8821CU support
|
||||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT
|
||||||
FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko
|
FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,rtl8821cu)
|
AUTOLOAD:=$(call AutoProbe,rtl8821cu)
|
||||||
PROVIDES:=kmod-rtl8821cu
|
PROVIDES:=kmod-rtl8821cu
|
||||||
|
@ -30,7 +30,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define KernelPackage/rtl88x2bu
|
define KernelPackage/rtl88x2bu
|
||||||
SUBMENU:=Wireless Drivers
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=Realtek 8812BU/8822BU support
|
TITLE:=Realtek 8812BU/8822BU support
|
||||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT
|
||||||
FILES:=$(PKG_BUILD_DIR)/rtl88x2bu.ko
|
FILES:=$(PKG_BUILD_DIR)/rtl88x2bu.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,rtl88x2bu)
|
AUTOLOAD:=$(call AutoProbe,rtl88x2bu)
|
||||||
PROVIDES:=kmod-rtl88x2bu
|
PROVIDES:=kmod-rtl88x2bu
|
||||||
|
@ -4,20 +4,25 @@ config WPA_RFKILL_SUPPORT
|
|||||||
depends on PACKAGE_wpa-supplicant || \
|
depends on PACKAGE_wpa-supplicant || \
|
||||||
PACKAGE_wpa-supplicant-openssl || \
|
PACKAGE_wpa-supplicant-openssl || \
|
||||||
PACKAGE_wpa-supplicant-wolfssl || \
|
PACKAGE_wpa-supplicant-wolfssl || \
|
||||||
|
PACKAGE_wpa-supplicant-mbedtls || \
|
||||||
PACKAGE_wpa-supplicant-mesh-openssl || \
|
PACKAGE_wpa-supplicant-mesh-openssl || \
|
||||||
PACKAGE_wpa-supplicant-mesh-wolfssl || \
|
PACKAGE_wpa-supplicant-mesh-wolfssl || \
|
||||||
|
PACKAGE_wpa-supplicant-mesh-mbedtls || \
|
||||||
PACKAGE_wpa-supplicant-basic || \
|
PACKAGE_wpa-supplicant-basic || \
|
||||||
PACKAGE_wpa-supplicant-mini || \
|
PACKAGE_wpa-supplicant-mini || \
|
||||||
PACKAGE_wpa-supplicant-p2p || \
|
PACKAGE_wpa-supplicant-p2p || \
|
||||||
PACKAGE_wpad || \
|
PACKAGE_wpad || \
|
||||||
PACKAGE_wpad-openssl || \
|
PACKAGE_wpad-openssl || \
|
||||||
PACKAGE_wpad-wolfssl || \
|
PACKAGE_wpad-wolfssl || \
|
||||||
|
PACKAGE_wpad-mbedtls || \
|
||||||
PACKAGE_wpad-basic || \
|
PACKAGE_wpad-basic || \
|
||||||
PACKAGE_wpad-basic-openssl || \
|
PACKAGE_wpad-basic-openssl || \
|
||||||
PACKAGE_wpad-basic-wolfssl || \
|
PACKAGE_wpad-basic-wolfssl || \
|
||||||
|
PACKAGE_wpad-basic-mbedtls || \
|
||||||
PACKAGE_wpad-mini || \
|
PACKAGE_wpad-mini || \
|
||||||
PACKAGE_wpad-mesh-openssl || \
|
PACKAGE_wpad-mesh-openssl || \
|
||||||
PACKAGE_wpad-mesh-wolfssl
|
PACKAGE_wpad-mesh-wolfssl || \
|
||||||
|
PACKAGE_wpad-mesh-mbedtls
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config WPA_MSG_MIN_PRIORITY
|
config WPA_MSG_MIN_PRIORITY
|
||||||
@ -25,20 +30,25 @@ config WPA_MSG_MIN_PRIORITY
|
|||||||
depends on PACKAGE_wpa-supplicant || \
|
depends on PACKAGE_wpa-supplicant || \
|
||||||
PACKAGE_wpa-supplicant-openssl || \
|
PACKAGE_wpa-supplicant-openssl || \
|
||||||
PACKAGE_wpa-supplicant-wolfssl || \
|
PACKAGE_wpa-supplicant-wolfssl || \
|
||||||
|
PACKAGE_wpa-supplicant-mbedtls || \
|
||||||
PACKAGE_wpa-supplicant-mesh-openssl || \
|
PACKAGE_wpa-supplicant-mesh-openssl || \
|
||||||
PACKAGE_wpa-supplicant-mesh-wolfssl || \
|
PACKAGE_wpa-supplicant-mesh-wolfssl || \
|
||||||
|
PACKAGE_wpa-supplicant-mesh-mbedtls || \
|
||||||
PACKAGE_wpa-supplicant-basic || \
|
PACKAGE_wpa-supplicant-basic || \
|
||||||
PACKAGE_wpa-supplicant-mini || \
|
PACKAGE_wpa-supplicant-mini || \
|
||||||
PACKAGE_wpa-supplicant-p2p || \
|
PACKAGE_wpa-supplicant-p2p || \
|
||||||
PACKAGE_wpad || \
|
PACKAGE_wpad || \
|
||||||
PACKAGE_wpad-openssl || \
|
PACKAGE_wpad-openssl || \
|
||||||
PACKAGE_wpad-wolfssl || \
|
PACKAGE_wpad-wolfssl || \
|
||||||
|
PACKAGE_wpad-mbedtls || \
|
||||||
PACKAGE_wpad-basic || \
|
PACKAGE_wpad-basic || \
|
||||||
PACKAGE_wpad-basic-openssl || \
|
PACKAGE_wpad-basic-openssl || \
|
||||||
PACKAGE_wpad-basic-wolfssl || \
|
PACKAGE_wpad-basic-wolfssl || \
|
||||||
|
PACKAGE_wpad-basic-mbedtls || \
|
||||||
PACKAGE_wpad-mini || \
|
PACKAGE_wpad-mini || \
|
||||||
PACKAGE_wpad-mesh-openssl || \
|
PACKAGE_wpad-mesh-openssl || \
|
||||||
PACKAGE_wpad-mesh-wolfssl
|
PACKAGE_wpad-mesh-wolfssl || \
|
||||||
|
PACKAGE_wpad-mesh-mbedtls
|
||||||
default 3
|
default 3
|
||||||
help
|
help
|
||||||
Useful values are:
|
Useful values are:
|
||||||
@ -91,9 +101,11 @@ config WPA_MBO_SUPPORT
|
|||||||
default PACKAGE_wpa-supplicant || \
|
default PACKAGE_wpa-supplicant || \
|
||||||
PACKAGE_wpa-supplicant-openssl || \
|
PACKAGE_wpa-supplicant-openssl || \
|
||||||
PACKAGE_wpa-supplicant-wolfssl || \
|
PACKAGE_wpa-supplicant-wolfssl || \
|
||||||
|
PACKAGE_wpa-supplicant-mbedtls || \
|
||||||
PACKAGE_wpad || \
|
PACKAGE_wpad || \
|
||||||
PACKAGE_wpad-openssl || \
|
PACKAGE_wpad-openssl || \
|
||||||
PACKAGE_wpad-wolfssl
|
PACKAGE_wpad-wolfssl || \
|
||||||
|
PACKAGE_wpad-mbedtls
|
||||||
help
|
help
|
||||||
Multi Band Operation aka (Agile Multiband) enables features
|
Multi Band Operation aka (Agile Multiband) enables features
|
||||||
that facilitate efficient use of multiple frequency bands.
|
that facilitate efficient use of multiple frequency bands.
|
||||||
|
@ -52,14 +52,16 @@ LOCAL_AND_LIB_VARIANT=$(patsubst hostapd-%,%,\
|
|||||||
LOCAL_VARIANT=$(patsubst %-internal,%,\
|
LOCAL_VARIANT=$(patsubst %-internal,%,\
|
||||||
$(patsubst %-openssl,%,\
|
$(patsubst %-openssl,%,\
|
||||||
$(patsubst %-wolfssl,%,\
|
$(patsubst %-wolfssl,%,\
|
||||||
|
$(patsubst %-mbedtls,%,\
|
||||||
$(LOCAL_AND_LIB_VARIANT)\
|
$(LOCAL_AND_LIB_VARIANT)\
|
||||||
)))
|
))))
|
||||||
|
|
||||||
SSL_VARIANT=$(strip \
|
SSL_VARIANT=$(strip \
|
||||||
$(if $(findstring openssl,$(LOCAL_AND_LIB_VARIANT)),openssl,\
|
$(if $(findstring openssl,$(LOCAL_AND_LIB_VARIANT)),openssl,\
|
||||||
$(if $(findstring wolfssl,$(LOCAL_AND_LIB_VARIANT)),wolfssl,\
|
$(if $(findstring wolfssl,$(LOCAL_AND_LIB_VARIANT)),wolfssl,\
|
||||||
|
$(if $(findstring mbedtls,$(LOCAL_AND_LIB_VARIANT)),mbedtls,\
|
||||||
internal\
|
internal\
|
||||||
)))
|
))))
|
||||||
|
|
||||||
CONFIG_VARIANT:=$(LOCAL_VARIANT)
|
CONFIG_VARIANT:=$(LOCAL_VARIANT)
|
||||||
ifeq ($(LOCAL_VARIANT),mesh)
|
ifeq ($(LOCAL_VARIANT),mesh)
|
||||||
@ -116,6 +118,21 @@ ifeq ($(SSL_VARIANT),wolfssl)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(SSL_VARIANT),mbedtls)
|
||||||
|
DRIVER_MAKEOPTS += CONFIG_TLS=mbedtls CONFIG_SAE=y
|
||||||
|
TARGET_LDFLAGS += -lmbedcrypto -lmbedx509 -lmbedtls
|
||||||
|
|
||||||
|
ifeq ($(LOCAL_VARIANT),basic)
|
||||||
|
DRIVER_MAKEOPTS += CONFIG_OWE=y
|
||||||
|
endif
|
||||||
|
ifeq ($(LOCAL_VARIANT),mesh)
|
||||||
|
DRIVER_MAKEOPTS += CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1
|
||||||
|
endif
|
||||||
|
ifeq ($(LOCAL_VARIANT),full)
|
||||||
|
DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(LOCAL_TYPE),hostapd)
|
ifneq ($(LOCAL_TYPE),hostapd)
|
||||||
ifdef CONFIG_WPA_RFKILL_SUPPORT
|
ifdef CONFIG_WPA_RFKILL_SUPPORT
|
||||||
DRIVER_MAKEOPTS += NEED_RFKILL=y
|
DRIVER_MAKEOPTS += NEED_RFKILL=y
|
||||||
@ -173,6 +190,15 @@ endef
|
|||||||
|
|
||||||
Package/hostapd-wolfssl/description = $(Package/hostapd/description)
|
Package/hostapd-wolfssl/description = $(Package/hostapd/description)
|
||||||
|
|
||||||
|
define Package/hostapd-mbedtls
|
||||||
|
$(call Package/hostapd/Default,$(1))
|
||||||
|
TITLE+= (mbedTLS full)
|
||||||
|
VARIANT:=full-mbedtls
|
||||||
|
DEPENDS+=+PACKAGE_hostapd-mbedtls:libmbedtls
|
||||||
|
endef
|
||||||
|
|
||||||
|
Package/hostapd-mbedtls/description = $(Package/hostapd/description)
|
||||||
|
|
||||||
define Package/hostapd-basic
|
define Package/hostapd-basic
|
||||||
$(call Package/hostapd/Default,$(1))
|
$(call Package/hostapd/Default,$(1))
|
||||||
TITLE+= (WPA-PSK, 11r, 11w)
|
TITLE+= (WPA-PSK, 11r, 11w)
|
||||||
@ -205,6 +231,17 @@ define Package/hostapd-basic-wolfssl/description
|
|||||||
This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
|
This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/hostapd-basic-mbedtls
|
||||||
|
$(call Package/hostapd/Default,$(1))
|
||||||
|
TITLE+= (WPA-PSK, 11r and 11w)
|
||||||
|
VARIANT:=basic-mbedtls
|
||||||
|
DEPENDS+=+PACKAGE_hostapd-basic-mbedtls:libmbedtls
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/hostapd-basic-mbedtls/description
|
||||||
|
This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/hostapd-mini
|
define Package/hostapd-mini
|
||||||
$(call Package/hostapd/Default,$(1))
|
$(call Package/hostapd/Default,$(1))
|
||||||
TITLE+= (WPA-PSK only)
|
TITLE+= (WPA-PSK only)
|
||||||
@ -260,6 +297,15 @@ endef
|
|||||||
|
|
||||||
Package/wpad-wolfssl/description = $(Package/wpad/description)
|
Package/wpad-wolfssl/description = $(Package/wpad/description)
|
||||||
|
|
||||||
|
define Package/wpad-mbedtls
|
||||||
|
$(call Package/wpad/Default,$(1))
|
||||||
|
TITLE+= (mbedTLS full)
|
||||||
|
VARIANT:=wpad-full-mbedtls
|
||||||
|
DEPENDS+=+PACKAGE_wpad-mbedtls:libmbedtls
|
||||||
|
endef
|
||||||
|
|
||||||
|
Package/wpad-mbedtls/description = $(Package/wpad/description)
|
||||||
|
|
||||||
define Package/wpad-basic
|
define Package/wpad-basic
|
||||||
$(call Package/wpad/Default,$(1))
|
$(call Package/wpad/Default,$(1))
|
||||||
TITLE+= (WPA-PSK, 11r, 11w)
|
TITLE+= (WPA-PSK, 11r, 11w)
|
||||||
@ -292,6 +338,17 @@ define Package/wpad-basic-wolfssl/description
|
|||||||
This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w support.
|
This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w support.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/wpad-basic-mbedtls
|
||||||
|
$(call Package/wpad/Default,$(1))
|
||||||
|
TITLE+= (mbedTLS, 11r, 11w)
|
||||||
|
VARIANT:=wpad-basic-mbedtls
|
||||||
|
DEPENDS+=+PACKAGE_wpad-basic-mbedtls:libmbedtls
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/wpad-basic-mbedtls/description
|
||||||
|
This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w support.
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/wpad-mini
|
define Package/wpad-mini
|
||||||
$(call Package/wpad/Default,$(1))
|
$(call Package/wpad/Default,$(1))
|
||||||
TITLE+= (WPA-PSK only)
|
TITLE+= (WPA-PSK only)
|
||||||
@ -330,6 +387,15 @@ endef
|
|||||||
|
|
||||||
Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
|
Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
|
||||||
|
|
||||||
|
define Package/wpad-mesh-mbedtls
|
||||||
|
$(call Package/wpad-mesh,$(1))
|
||||||
|
TITLE+= (mbedTLS, 11s, SAE)
|
||||||
|
DEPENDS+=+PACKAGE_wpad-mesh-mbedtls:libmbedtls
|
||||||
|
VARIANT:=wpad-mesh-mbedtls
|
||||||
|
endef
|
||||||
|
|
||||||
|
Package/wpad-mesh-mbedtls/description = $(Package/wpad-mesh/description)
|
||||||
|
|
||||||
|
|
||||||
define Package/wpa-supplicant/Default
|
define Package/wpa-supplicant/Default
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
@ -365,6 +431,13 @@ $(call Package/wpa-supplicant/Default,$(1))
|
|||||||
DEPENDS+=+PACKAGE_wpa-supplicant-wolfssl:libwolfssl
|
DEPENDS+=+PACKAGE_wpa-supplicant-wolfssl:libwolfssl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/wpa-supplicant-mbedtls
|
||||||
|
$(call Package/wpa-supplicant/Default,$(1))
|
||||||
|
TITLE+= (mbedTLS full)
|
||||||
|
VARIANT:=supplicant-full-mbedtls
|
||||||
|
DEPENDS+=+PACKAGE_wpa-supplicant-mbedtls:libmbedtls
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/wpa-supplicant/config
|
define Package/wpa-supplicant/config
|
||||||
source "$(SOURCE)/Config.in"
|
source "$(SOURCE)/Config.in"
|
||||||
endef
|
endef
|
||||||
@ -396,6 +469,13 @@ $(call Package/wpa-supplicant-mesh/Default,$(1))
|
|||||||
DEPENDS+=+PACKAGE_wpa-supplicant-mesh-wolfssl:libwolfssl
|
DEPENDS+=+PACKAGE_wpa-supplicant-mesh-wolfssl:libwolfssl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/wpa-supplicant-mesh-mbedtls
|
||||||
|
$(call Package/wpa-supplicant-mesh/Default,$(1))
|
||||||
|
TITLE+= (mbedTLS, 11s, SAE)
|
||||||
|
VARIANT:=supplicant-mesh-mbedtls
|
||||||
|
DEPENDS+=+PACKAGE_wpa-supplicant-mesh-mbedtls:libmbedtls
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/wpa-supplicant-basic
|
define Package/wpa-supplicant-basic
|
||||||
$(call Package/wpa-supplicant/Default,$(1))
|
$(call Package/wpa-supplicant/Default,$(1))
|
||||||
TITLE+= (11r, 11w)
|
TITLE+= (11r, 11w)
|
||||||
@ -472,6 +552,15 @@ define Package/eapol-test-wolfssl
|
|||||||
PROVIDES:=eapol-test
|
PROVIDES:=eapol-test
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/eapol-test-mbedtls
|
||||||
|
$(call Package/eapol-test/Default,$(1))
|
||||||
|
TITLE+= (mbedTLS full)
|
||||||
|
VARIANT:=supplicant-full-mbedtls
|
||||||
|
CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-mbedtls ,$(EAPOL_TEST_PROVIDERS)))
|
||||||
|
DEPENDS+=+PACKAGE_eapol-test-mbedtls:libmbedtls
|
||||||
|
PROVIDES:=eapol-test
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
|
ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
|
||||||
define Build/Configure/rebuild
|
define Build/Configure/rebuild
|
||||||
@ -580,6 +669,12 @@ define Build/Compile/supplicant-full-wolfssl
|
|||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/Compile/supplicant-full-mbedtls
|
||||||
|
+$(call Build/RunMake,wpa_supplicant, \
|
||||||
|
eapol_test \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(Build/Compile/$(LOCAL_TYPE))
|
$(Build/Compile/$(LOCAL_TYPE))
|
||||||
$(Build/Compile/$(BUILD_VARIANT))
|
$(Build/Compile/$(BUILD_VARIANT))
|
||||||
@ -610,9 +705,11 @@ endef
|
|||||||
Package/hostapd-basic/install = $(Package/hostapd/install)
|
Package/hostapd-basic/install = $(Package/hostapd/install)
|
||||||
Package/hostapd-basic-openssl/install = $(Package/hostapd/install)
|
Package/hostapd-basic-openssl/install = $(Package/hostapd/install)
|
||||||
Package/hostapd-basic-wolfssl/install = $(Package/hostapd/install)
|
Package/hostapd-basic-wolfssl/install = $(Package/hostapd/install)
|
||||||
|
Package/hostapd-basic-mbedtls/install = $(Package/hostapd/install)
|
||||||
Package/hostapd-mini/install = $(Package/hostapd/install)
|
Package/hostapd-mini/install = $(Package/hostapd/install)
|
||||||
Package/hostapd-openssl/install = $(Package/hostapd/install)
|
Package/hostapd-openssl/install = $(Package/hostapd/install)
|
||||||
Package/hostapd-wolfssl/install = $(Package/hostapd/install)
|
Package/hostapd-wolfssl/install = $(Package/hostapd/install)
|
||||||
|
Package/hostapd-mbedtls/install = $(Package/hostapd/install)
|
||||||
|
|
||||||
ifneq ($(LOCAL_TYPE),supplicant)
|
ifneq ($(LOCAL_TYPE),supplicant)
|
||||||
define Package/hostapd-utils/install
|
define Package/hostapd-utils/install
|
||||||
@ -631,11 +728,14 @@ endef
|
|||||||
Package/wpad-basic/install = $(Package/wpad/install)
|
Package/wpad-basic/install = $(Package/wpad/install)
|
||||||
Package/wpad-basic-openssl/install = $(Package/wpad/install)
|
Package/wpad-basic-openssl/install = $(Package/wpad/install)
|
||||||
Package/wpad-basic-wolfssl/install = $(Package/wpad/install)
|
Package/wpad-basic-wolfssl/install = $(Package/wpad/install)
|
||||||
|
Package/wpad-basic-mbedtls/install = $(Package/wpad/install)
|
||||||
Package/wpad-mini/install = $(Package/wpad/install)
|
Package/wpad-mini/install = $(Package/wpad/install)
|
||||||
Package/wpad-openssl/install = $(Package/wpad/install)
|
Package/wpad-openssl/install = $(Package/wpad/install)
|
||||||
Package/wpad-wolfssl/install = $(Package/wpad/install)
|
Package/wpad-wolfssl/install = $(Package/wpad/install)
|
||||||
|
Package/wpad-mbedtls/install = $(Package/wpad/install)
|
||||||
Package/wpad-mesh-openssl/install = $(Package/wpad/install)
|
Package/wpad-mesh-openssl/install = $(Package/wpad/install)
|
||||||
Package/wpad-mesh-wolfssl/install = $(Package/wpad/install)
|
Package/wpad-mesh-wolfssl/install = $(Package/wpad/install)
|
||||||
|
Package/wpad-mesh-mbedtls/install = $(Package/wpad/install)
|
||||||
|
|
||||||
define Package/wpa-supplicant/install
|
define Package/wpa-supplicant/install
|
||||||
$(call Install/supplicant,$(1))
|
$(call Install/supplicant,$(1))
|
||||||
@ -646,8 +746,10 @@ Package/wpa-supplicant-mini/install = $(Package/wpa-supplicant/install)
|
|||||||
Package/wpa-supplicant-p2p/install = $(Package/wpa-supplicant/install)
|
Package/wpa-supplicant-p2p/install = $(Package/wpa-supplicant/install)
|
||||||
Package/wpa-supplicant-openssl/install = $(Package/wpa-supplicant/install)
|
Package/wpa-supplicant-openssl/install = $(Package/wpa-supplicant/install)
|
||||||
Package/wpa-supplicant-wolfssl/install = $(Package/wpa-supplicant/install)
|
Package/wpa-supplicant-wolfssl/install = $(Package/wpa-supplicant/install)
|
||||||
|
Package/wpa-supplicant-mbedtls/install = $(Package/wpa-supplicant/install)
|
||||||
Package/wpa-supplicant-mesh-openssl/install = $(Package/wpa-supplicant/install)
|
Package/wpa-supplicant-mesh-openssl/install = $(Package/wpa-supplicant/install)
|
||||||
Package/wpa-supplicant-mesh-wolfssl/install = $(Package/wpa-supplicant/install)
|
Package/wpa-supplicant-mesh-wolfssl/install = $(Package/wpa-supplicant/install)
|
||||||
|
Package/wpa-supplicant-mesh-mbedtls/install = $(Package/wpa-supplicant/install)
|
||||||
|
|
||||||
ifneq ($(LOCAL_TYPE),hostapd)
|
ifneq ($(LOCAL_TYPE),hostapd)
|
||||||
define Package/wpa-cli/install
|
define Package/wpa-cli/install
|
||||||
@ -677,6 +779,13 @@ ifeq ($(BUILD_VARIANT),supplicant-full-wolfssl)
|
|||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),supplicant-full-mbedtls)
|
||||||
|
define Package/eapol-test-mbedtls/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
# Build hostapd-common before its dependents, to avoid
|
# Build hostapd-common before its dependents, to avoid
|
||||||
# spurious rebuilds when building multiple variants.
|
# spurious rebuilds when building multiple variants.
|
||||||
$(eval $(call BuildPackage,hostapd-common))
|
$(eval $(call BuildPackage,hostapd-common))
|
||||||
@ -684,28 +793,36 @@ $(eval $(call BuildPackage,hostapd))
|
|||||||
$(eval $(call BuildPackage,hostapd-basic))
|
$(eval $(call BuildPackage,hostapd-basic))
|
||||||
$(eval $(call BuildPackage,hostapd-basic-openssl))
|
$(eval $(call BuildPackage,hostapd-basic-openssl))
|
||||||
$(eval $(call BuildPackage,hostapd-basic-wolfssl))
|
$(eval $(call BuildPackage,hostapd-basic-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,hostapd-basic-mbedtls))
|
||||||
$(eval $(call BuildPackage,hostapd-mini))
|
$(eval $(call BuildPackage,hostapd-mini))
|
||||||
$(eval $(call BuildPackage,hostapd-openssl))
|
$(eval $(call BuildPackage,hostapd-openssl))
|
||||||
$(eval $(call BuildPackage,hostapd-wolfssl))
|
$(eval $(call BuildPackage,hostapd-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,hostapd-mbedtls))
|
||||||
$(eval $(call BuildPackage,wpad))
|
$(eval $(call BuildPackage,wpad))
|
||||||
$(eval $(call BuildPackage,wpad-mesh-openssl))
|
$(eval $(call BuildPackage,wpad-mesh-openssl))
|
||||||
$(eval $(call BuildPackage,wpad-mesh-wolfssl))
|
$(eval $(call BuildPackage,wpad-mesh-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,wpad-mesh-mbedtls))
|
||||||
$(eval $(call BuildPackage,wpad-basic))
|
$(eval $(call BuildPackage,wpad-basic))
|
||||||
$(eval $(call BuildPackage,wpad-basic-openssl))
|
$(eval $(call BuildPackage,wpad-basic-openssl))
|
||||||
$(eval $(call BuildPackage,wpad-basic-wolfssl))
|
$(eval $(call BuildPackage,wpad-basic-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,wpad-basic-mbedtls))
|
||||||
$(eval $(call BuildPackage,wpad-mini))
|
$(eval $(call BuildPackage,wpad-mini))
|
||||||
$(eval $(call BuildPackage,wpad-openssl))
|
$(eval $(call BuildPackage,wpad-openssl))
|
||||||
$(eval $(call BuildPackage,wpad-wolfssl))
|
$(eval $(call BuildPackage,wpad-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,wpad-mbedtls))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant))
|
$(eval $(call BuildPackage,wpa-supplicant))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant-mesh-openssl))
|
$(eval $(call BuildPackage,wpa-supplicant-mesh-openssl))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant-mesh-wolfssl))
|
$(eval $(call BuildPackage,wpa-supplicant-mesh-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,wpa-supplicant-mesh-mbedtls))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant-basic))
|
$(eval $(call BuildPackage,wpa-supplicant-basic))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant-mini))
|
$(eval $(call BuildPackage,wpa-supplicant-mini))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant-p2p))
|
$(eval $(call BuildPackage,wpa-supplicant-p2p))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant-openssl))
|
$(eval $(call BuildPackage,wpa-supplicant-openssl))
|
||||||
$(eval $(call BuildPackage,wpa-supplicant-wolfssl))
|
$(eval $(call BuildPackage,wpa-supplicant-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,wpa-supplicant-mbedtls))
|
||||||
$(eval $(call BuildPackage,wpa-cli))
|
$(eval $(call BuildPackage,wpa-cli))
|
||||||
$(eval $(call BuildPackage,hostapd-utils))
|
$(eval $(call BuildPackage,hostapd-utils))
|
||||||
$(eval $(call BuildPackage,eapol-test))
|
$(eval $(call BuildPackage,eapol-test))
|
||||||
$(eval $(call BuildPackage,eapol-test-openssl))
|
$(eval $(call BuildPackage,eapol-test-openssl))
|
||||||
$(eval $(call BuildPackage,eapol-test-wolfssl))
|
$(eval $(call BuildPackage,eapol-test-wolfssl))
|
||||||
|
$(eval $(call BuildPackage,eapol-test-mbedtls))
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,114 @@
|
|||||||
|
From c8dba4bd750269bcc80fed3d546e2077cb4cdf0e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
Date: Tue, 19 Jul 2022 20:02:21 -0400
|
||||||
|
Subject: [PATCH 2/7] mbedtls: fips186_2_prf()
|
||||||
|
|
||||||
|
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
---
|
||||||
|
hostapd/Makefile | 4 ---
|
||||||
|
src/crypto/crypto_mbedtls.c | 60 +++++++++++++++++++++++++++++++++++++
|
||||||
|
wpa_supplicant/Makefile | 4 ---
|
||||||
|
3 files changed, 60 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
--- a/hostapd/Makefile
|
||||||
|
+++ b/hostapd/Makefile
|
||||||
|
@@ -759,10 +759,6 @@ endif
|
||||||
|
OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||||
|
HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||||
|
SOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||||
|
-ifdef NEED_FIPS186_2_PRF
|
||||||
|
-OBJS += ../src/crypto/fips_prf_internal.o
|
||||||
|
-SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||||
|
-endif
|
||||||
|
ifeq ($(CONFIG_CRYPTO), mbedtls)
|
||||||
|
ifdef CONFIG_DPP
|
||||||
|
LIBS += -lmbedx509
|
||||||
|
--- a/src/crypto/crypto_mbedtls.c
|
||||||
|
+++ b/src/crypto/crypto_mbedtls.c
|
||||||
|
@@ -132,6 +132,12 @@
|
||||||
|
#define CRYPTO_MBEDTLS_HMAC_KDF_SHA512
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if defined(EAP_SIM) || defined(EAP_SIM_DYNAMIC) || defined(EAP_SERVER_SIM) \
|
||||||
|
+ || defined(EAP_AKA) || defined(EAP_AKA_DYNAMIC) || defined(EAP_SERVER_AKA)
|
||||||
|
+/* EAP_SIM=y EAP_AKA=y */
|
||||||
|
+#define CRYPTO_MBEDTLS_FIPS186_2_PRF
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || defined(EAP_SERVER_FAST) \
|
||||||
|
|| defined(EAP_TEAP) || defined(EAP_TEAP_DYNAMIC) || defined(EAP_SERVER_FAST)
|
||||||
|
#define CRYPTO_MBEDTLS_SHA1_T_PRF
|
||||||
|
@@ -813,6 +819,60 @@ int sha1_t_prf(const u8 *key, size_t key
|
||||||
|
|
||||||
|
#endif /* CRYPTO_MBEDTLS_SHA1_T_PRF */
|
||||||
|
|
||||||
|
+#ifdef CRYPTO_MBEDTLS_FIPS186_2_PRF
|
||||||
|
+
|
||||||
|
+/* fips_prf_internal.c sha1-internal.c */
|
||||||
|
+
|
||||||
|
+/* used only by src/eap_common/eap_sim_common.c:eap_sim_prf()
|
||||||
|
+ * for eap_sim_derive_keys() and eap_sim_derive_keys_reauth()
|
||||||
|
+ * where xlen is 160 */
|
||||||
|
+
|
||||||
|
+int fips186_2_prf(const u8 *seed, size_t seed_len, u8 *x, size_t xlen)
|
||||||
|
+{
|
||||||
|
+ /* FIPS 186-2 + change notice 1 */
|
||||||
|
+
|
||||||
|
+ mbedtls_sha1_context ctx;
|
||||||
|
+ u8 * const xkey = ctx.MBEDTLS_PRIVATE(buffer);
|
||||||
|
+ u32 * const xstate = ctx.MBEDTLS_PRIVATE(state);
|
||||||
|
+ const u32 xstate_init[] =
|
||||||
|
+ { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 };
|
||||||
|
+
|
||||||
|
+ mbedtls_sha1_init(&ctx);
|
||||||
|
+ os_memcpy(xkey, seed, seed_len < 64 ? seed_len : 64);
|
||||||
|
+
|
||||||
|
+ /* note: does not fill extra bytes if (xlen % 20) (SHA1_MAC_LEN) */
|
||||||
|
+ for (; xlen >= 20; xlen -= 20) {
|
||||||
|
+ /* XSEED_j = 0 */
|
||||||
|
+ /* XVAL = (XKEY + XSEED_j) mod 2^b */
|
||||||
|
+
|
||||||
|
+ /* w_i = G(t, XVAL) */
|
||||||
|
+ os_memcpy(xstate, xstate_init, sizeof(xstate_init));
|
||||||
|
+ mbedtls_internal_sha1_process(&ctx, xkey);
|
||||||
|
+
|
||||||
|
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
+ xstate[0] = host_to_be32(xstate[0]);
|
||||||
|
+ xstate[1] = host_to_be32(xstate[1]);
|
||||||
|
+ xstate[2] = host_to_be32(xstate[2]);
|
||||||
|
+ xstate[3] = host_to_be32(xstate[3]);
|
||||||
|
+ xstate[4] = host_to_be32(xstate[4]);
|
||||||
|
+ #endif
|
||||||
|
+ os_memcpy(x, xstate, 20);
|
||||||
|
+ if (xlen == 20) /*(done; skip prep for next loop)*/
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ /* XKEY = (1 + XKEY + w_i) mod 2^b */
|
||||||
|
+ for (u32 carry = 1, k = 20; k-- > 0; carry >>= 8)
|
||||||
|
+ xkey[k] = (carry += xkey[k] + x[k]) & 0xff;
|
||||||
|
+ x += 20;
|
||||||
|
+ /* x_j = w_0|w_1 (each pair of iterations through loop)*/
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ mbedtls_sha1_free(&ctx);
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif /* CRYPTO_MBEDTLS_FIPS186_2_PRF */
|
||||||
|
+
|
||||||
|
#endif /* MBEDTLS_SHA1_C */
|
||||||
|
|
||||||
|
|
||||||
|
--- a/wpa_supplicant/Makefile
|
||||||
|
+++ b/wpa_supplicant/Makefile
|
||||||
|
@@ -1160,10 +1160,6 @@ endif
|
||||||
|
OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||||
|
OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||||
|
OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||||
|
-ifdef NEED_FIPS186_2_PRF
|
||||||
|
-OBJS += ../src/crypto/fips_prf_internal.o
|
||||||
|
-SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||||
|
-endif
|
||||||
|
ifeq ($(CONFIG_CRYPTO), mbedtls)
|
||||||
|
LIBS += -lmbedcrypto
|
||||||
|
LIBS_p += -lmbedcrypto
|
@ -0,0 +1,421 @@
|
|||||||
|
From 31bd19e0e0254b910cccfd3ddc6a6a9222bbcfc0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
Date: Sun, 9 Oct 2022 05:12:17 -0400
|
||||||
|
Subject: [PATCH 3/7] mbedtls: annotate with TEST_FAIL() for hwsim tests
|
||||||
|
|
||||||
|
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
---
|
||||||
|
src/crypto/crypto_mbedtls.c | 124 ++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 124 insertions(+)
|
||||||
|
|
||||||
|
--- a/src/crypto/crypto_mbedtls.c
|
||||||
|
+++ b/src/crypto/crypto_mbedtls.c
|
||||||
|
@@ -280,6 +280,9 @@ __attribute_noinline__
|
||||||
|
static int md_vector(size_t num_elem, const u8 *addr[], const size_t *len,
|
||||||
|
u8 *mac, mbedtls_md_type_t md_type)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_md_context_t ctx;
|
||||||
|
mbedtls_md_init(&ctx);
|
||||||
|
if (mbedtls_md_setup(&ctx, mbedtls_md_info_from_type(md_type), 0) != 0){
|
||||||
|
@@ -343,6 +346,9 @@ __attribute_noinline__
|
||||||
|
static int sha384_512_vector(size_t num_elem, const u8 *addr[],
|
||||||
|
const size_t *len, u8 *mac, int is384)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
struct mbedtls_sha512_context ctx;
|
||||||
|
mbedtls_sha512_init(&ctx);
|
||||||
|
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||||
|
@@ -375,6 +381,9 @@ int sha384_vector(size_t num_elem, const
|
||||||
|
#include <mbedtls/sha256.h>
|
||||||
|
int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
struct mbedtls_sha256_context ctx;
|
||||||
|
mbedtls_sha256_init(&ctx);
|
||||||
|
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||||
|
@@ -397,6 +406,9 @@ int sha256_vector(size_t num_elem, const
|
||||||
|
#include <mbedtls/sha1.h>
|
||||||
|
int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
struct mbedtls_sha1_context ctx;
|
||||||
|
mbedtls_sha1_init(&ctx);
|
||||||
|
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||||
|
@@ -419,6 +431,9 @@ int sha1_vector(size_t num_elem, const u
|
||||||
|
#include <mbedtls/md5.h>
|
||||||
|
int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
struct mbedtls_md5_context ctx;
|
||||||
|
mbedtls_md5_init(&ctx);
|
||||||
|
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||||
|
@@ -441,6 +456,9 @@ int md5_vector(size_t num_elem, const u8
|
||||||
|
#include <mbedtls/md4.h>
|
||||||
|
int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
struct mbedtls_md4_context ctx;
|
||||||
|
mbedtls_md4_init(&ctx);
|
||||||
|
mbedtls_md4_starts_ret(&ctx);
|
||||||
|
@@ -460,6 +478,9 @@ static int hmac_vector(const u8 *key, si
|
||||||
|
const u8 *addr[], const size_t *len, u8 *mac,
|
||||||
|
mbedtls_md_type_t md_type)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_md_context_t ctx;
|
||||||
|
mbedtls_md_init(&ctx);
|
||||||
|
if (mbedtls_md_setup(&ctx, mbedtls_md_info_from_type(md_type), 1) != 0){
|
||||||
|
@@ -571,6 +592,9 @@ static int hmac_kdf_expand(const u8 *prk
|
||||||
|
const char *label, const u8 *info, size_t info_len,
|
||||||
|
u8 *okm, size_t okm_len, mbedtls_md_type_t md_type)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type(md_type);
|
||||||
|
#ifdef MBEDTLS_HKDF_C
|
||||||
|
if (label == NULL) /* RFC 5869 HKDF-Expand when (label == NULL) */
|
||||||
|
@@ -663,6 +687,9 @@ static int hmac_prf_bits(const u8 *key,
|
||||||
|
const u8 *data, size_t data_len, u8 *buf,
|
||||||
|
size_t buf_len_bits, mbedtls_md_type_t md_type)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_md_context_t ctx;
|
||||||
|
mbedtls_md_init(&ctx);
|
||||||
|
const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type(md_type);
|
||||||
|
@@ -938,6 +965,9 @@ int pbkdf2_sha1(const char *passphrase,
|
||||||
|
|
||||||
|
static void *aes_crypt_init_mode(const u8 *key, size_t len, int mode)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
mbedtls_aes_context *aes = os_malloc(sizeof(*aes));
|
||||||
|
if (!aes)
|
||||||
|
return NULL;
|
||||||
|
@@ -996,6 +1026,9 @@ void aes_decrypt_deinit(void *ctx)
|
||||||
|
/* aes-wrap.c */
|
||||||
|
int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_nist_kw_context ctx;
|
||||||
|
mbedtls_nist_kw_init(&ctx);
|
||||||
|
size_t olen;
|
||||||
|
@@ -1010,6 +1043,9 @@ int aes_wrap(const u8 *kek, size_t kek_l
|
||||||
|
/* aes-unwrap.c */
|
||||||
|
int aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_nist_kw_context ctx;
|
||||||
|
mbedtls_nist_kw_init(&ctx);
|
||||||
|
size_t olen;
|
||||||
|
@@ -1041,6 +1077,9 @@ int omac1_aes_vector(
|
||||||
|
const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[],
|
||||||
|
const size_t *len, u8 *mac)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_cipher_type_t cipher_type;
|
||||||
|
switch (key_len) {
|
||||||
|
case 16: cipher_type = MBEDTLS_CIPHER_AES_128_ECB; break;
|
||||||
|
@@ -1103,6 +1142,9 @@ int omac1_aes_256(const u8 *key, const u
|
||||||
|
/* aes-encblock.c */
|
||||||
|
int aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_aes_context aes;
|
||||||
|
mbedtls_aes_init(&aes);
|
||||||
|
int ret = mbedtls_aes_setkey_enc(&aes, key, 128)
|
||||||
|
@@ -1118,6 +1160,9 @@ int aes_128_encrypt_block(const u8 *key,
|
||||||
|
int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce,
|
||||||
|
u8 *data, size_t data_len)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
unsigned char counter[MBEDTLS_AES_BLOCK_SIZE];
|
||||||
|
unsigned char stream_block[MBEDTLS_AES_BLOCK_SIZE];
|
||||||
|
os_memcpy(counter, nonce, MBEDTLS_AES_BLOCK_SIZE);/*(must be writable)*/
|
||||||
|
@@ -1160,11 +1205,17 @@ static int aes_128_cbc_oper(const u8 *ke
|
||||||
|
|
||||||
|
int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return aes_128_cbc_oper(key, iv, data, data_len, MBEDTLS_AES_ENCRYPT);
|
||||||
|
}
|
||||||
|
|
||||||
|
int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return aes_128_cbc_oper(key, iv, data, data_len, MBEDTLS_AES_DECRYPT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1407,6 +1458,10 @@ int crypto_hash_finish(struct crypto_has
|
||||||
|
}
|
||||||
|
mbedtls_md_free(mctx);
|
||||||
|
os_free(mctx);
|
||||||
|
+
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1421,6 +1476,9 @@ int crypto_hash_finish(struct crypto_has
|
||||||
|
|
||||||
|
struct crypto_bignum *crypto_bignum_init(void)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
mbedtls_mpi *bn = os_malloc(sizeof(*bn));
|
||||||
|
if (bn)
|
||||||
|
mbedtls_mpi_init(bn);
|
||||||
|
@@ -1429,6 +1487,9 @@ struct crypto_bignum *crypto_bignum_init
|
||||||
|
|
||||||
|
struct crypto_bignum *crypto_bignum_init_set(const u8 *buf, size_t len)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
mbedtls_mpi *bn = os_malloc(sizeof(*bn));
|
||||||
|
if (bn) {
|
||||||
|
mbedtls_mpi_init(bn);
|
||||||
|
@@ -1442,6 +1503,9 @@ struct crypto_bignum *crypto_bignum_init
|
||||||
|
|
||||||
|
struct crypto_bignum *crypto_bignum_init_uint(unsigned int val)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
#if 0 /*(hostap use of this interface passes int, not uint)*/
|
||||||
|
val = host_to_be32(val);
|
||||||
|
return crypto_bignum_init_set((const u8 *)&val, sizeof(val));
|
||||||
|
@@ -1467,6 +1531,9 @@ void crypto_bignum_deinit(struct crypto_
|
||||||
|
int crypto_bignum_to_bin(const struct crypto_bignum *a,
|
||||||
|
u8 *buf, size_t buflen, size_t padlen)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
size_t n = mbedtls_mpi_size((mbedtls_mpi *)a);
|
||||||
|
if (n < padlen)
|
||||||
|
n = padlen;
|
||||||
|
@@ -1477,6 +1544,9 @@ int crypto_bignum_to_bin(const struct cr
|
||||||
|
|
||||||
|
int crypto_bignum_rand(struct crypto_bignum *r, const struct crypto_bignum *m)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
/*assert(r != m);*//* r must not be same as m for mbedtls_mpi_random()*/
|
||||||
|
#if MBEDTLS_VERSION_NUMBER >= 0x021B0000 /* mbedtls 2.27.0 */
|
||||||
|
return mbedtls_mpi_random((mbedtls_mpi *)r, 0, (mbedtls_mpi *)m,
|
||||||
|
@@ -1513,6 +1583,9 @@ int crypto_bignum_exptmod(const struct c
|
||||||
|
const struct crypto_bignum *c,
|
||||||
|
struct crypto_bignum *d)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
/* (check if input params match d; d is the result) */
|
||||||
|
/* (a == d) is ok in current mbedtls implementation */
|
||||||
|
if (b == d || c == d) { /*(not ok; store result in intermediate)*/
|
||||||
|
@@ -1540,6 +1613,9 @@ int crypto_bignum_inverse(const struct c
|
||||||
|
const struct crypto_bignum *b,
|
||||||
|
struct crypto_bignum *c)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return mbedtls_mpi_inv_mod((mbedtls_mpi *)c,
|
||||||
|
(const mbedtls_mpi *)a,
|
||||||
|
(const mbedtls_mpi *)b) ? -1 : 0;
|
||||||
|
@@ -1549,6 +1625,9 @@ int crypto_bignum_sub(const struct crypt
|
||||||
|
const struct crypto_bignum *b,
|
||||||
|
struct crypto_bignum *c)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return mbedtls_mpi_sub_mpi((mbedtls_mpi *)c,
|
||||||
|
(const mbedtls_mpi *)a,
|
||||||
|
(const mbedtls_mpi *)b) ? -1 : 0;
|
||||||
|
@@ -1558,6 +1637,9 @@ int crypto_bignum_div(const struct crypt
|
||||||
|
const struct crypto_bignum *b,
|
||||||
|
struct crypto_bignum *c)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
/*(most current use of this crypto.h interface has a == c (result),
|
||||||
|
* so store result in an intermediate to avoid overwritten input)*/
|
||||||
|
mbedtls_mpi R;
|
||||||
|
@@ -1575,6 +1657,9 @@ int crypto_bignum_addmod(const struct cr
|
||||||
|
const struct crypto_bignum *c,
|
||||||
|
struct crypto_bignum *d)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return mbedtls_mpi_add_mpi((mbedtls_mpi *)d,
|
||||||
|
(const mbedtls_mpi *)a,
|
||||||
|
(const mbedtls_mpi *)b)
|
||||||
|
@@ -1588,6 +1673,9 @@ int crypto_bignum_mulmod(const struct cr
|
||||||
|
const struct crypto_bignum *c,
|
||||||
|
struct crypto_bignum *d)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return mbedtls_mpi_mul_mpi((mbedtls_mpi *)d,
|
||||||
|
(const mbedtls_mpi *)a,
|
||||||
|
(const mbedtls_mpi *)b)
|
||||||
|
@@ -1600,6 +1688,9 @@ int crypto_bignum_sqrmod(const struct cr
|
||||||
|
const struct crypto_bignum *b,
|
||||||
|
struct crypto_bignum *c)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
#if 1
|
||||||
|
return crypto_bignum_mulmod(a, a, b, c);
|
||||||
|
#else
|
||||||
|
@@ -1650,6 +1741,9 @@ int crypto_bignum_is_odd(const struct cr
|
||||||
|
int crypto_bignum_legendre(const struct crypto_bignum *a,
|
||||||
|
const struct crypto_bignum *p)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -2;
|
||||||
|
+
|
||||||
|
/* Security Note:
|
||||||
|
* mbedtls_mpi_exp_mod() is not documented to run in constant time,
|
||||||
|
* though mbedtls/library/bignum.c uses constant_time_internal.h funcs.
|
||||||
|
@@ -1702,6 +1796,9 @@ int crypto_mod_exp(const u8 *base, size_
|
||||||
|
const u8 *modulus, size_t modulus_len,
|
||||||
|
u8 *result, size_t *result_len)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
mbedtls_mpi bn_base, bn_exp, bn_modulus, bn_result;
|
||||||
|
mbedtls_mpi_init(&bn_base);
|
||||||
|
mbedtls_mpi_init(&bn_exp);
|
||||||
|
@@ -1769,6 +1866,9 @@ static int crypto_mbedtls_dh_init_public
|
||||||
|
int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey,
|
||||||
|
u8 *pubkey)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
#if 0 /*(crypto_dh_init() duplicated (and identical) in crypto_*.c modules)*/
|
||||||
|
size_t pubkey_len, pad;
|
||||||
|
|
||||||
|
@@ -1810,6 +1910,9 @@ int crypto_dh_derive_secret(u8 generator
|
||||||
|
const u8 *pubkey, size_t pubkey_len,
|
||||||
|
u8 *secret, size_t *len)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
#if 0
|
||||||
|
if (pubkey_len > prime_len ||
|
||||||
|
(pubkey_len == prime_len &&
|
||||||
|
@@ -2512,6 +2615,9 @@ const struct crypto_ec_point * crypto_ec
|
||||||
|
|
||||||
|
struct crypto_ec_point *crypto_ec_point_init(struct crypto_ec *e)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
mbedtls_ecp_point *p = os_malloc(sizeof(*p));
|
||||||
|
if (p != NULL)
|
||||||
|
mbedtls_ecp_point_init(p);
|
||||||
|
@@ -2536,6 +2642,9 @@ int crypto_ec_point_x(struct crypto_ec *
|
||||||
|
int crypto_ec_point_to_bin(struct crypto_ec *e,
|
||||||
|
const struct crypto_ec_point *point, u8 *x, u8 *y)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
/* crypto.h documents crypto_ec_point_to_bin() output is big-endian */
|
||||||
|
size_t len = CRYPTO_EC_plen(e);
|
||||||
|
if (x) {
|
||||||
|
@@ -2563,6 +2672,9 @@ int crypto_ec_point_to_bin(struct crypto
|
||||||
|
struct crypto_ec_point * crypto_ec_point_from_bin(struct crypto_ec *e,
|
||||||
|
const u8 *val)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
size_t len = CRYPTO_EC_plen(e);
|
||||||
|
mbedtls_ecp_point *p = os_malloc(sizeof(*p));
|
||||||
|
u8 buf[1+MBEDTLS_MPI_MAX_SIZE*2];
|
||||||
|
@@ -2615,6 +2727,9 @@ int crypto_ec_point_add(struct crypto_ec
|
||||||
|
const struct crypto_ec_point *b,
|
||||||
|
struct crypto_ec_point *c)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
/* mbedtls does not provide an mbedtls_ecp_point add function */
|
||||||
|
mbedtls_mpi one;
|
||||||
|
mbedtls_mpi_init(&one);
|
||||||
|
@@ -2631,6 +2746,9 @@ int crypto_ec_point_mul(struct crypto_ec
|
||||||
|
const struct crypto_bignum *b,
|
||||||
|
struct crypto_ec_point *res)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
return mbedtls_ecp_mul(
|
||||||
|
(mbedtls_ecp_group *)e, (mbedtls_ecp_point *)res,
|
||||||
|
(const mbedtls_mpi *)b, (const mbedtls_ecp_point *)p,
|
||||||
|
@@ -2639,6 +2757,9 @@ int crypto_ec_point_mul(struct crypto_ec
|
||||||
|
|
||||||
|
int crypto_ec_point_invert(struct crypto_ec *e, struct crypto_ec_point *p)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
if (mbedtls_ecp_get_type((mbedtls_ecp_group *)e)
|
||||||
|
== MBEDTLS_ECP_TYPE_MONTGOMERY) {
|
||||||
|
/* e.g. MBEDTLS_ECP_DP_CURVE25519 and MBEDTLS_ECP_DP_CURVE448 */
|
||||||
|
@@ -2751,6 +2872,9 @@ struct crypto_bignum *
|
||||||
|
crypto_ec_point_compute_y_sqr(struct crypto_ec *e,
|
||||||
|
const struct crypto_bignum *x)
|
||||||
|
{
|
||||||
|
+ if (TEST_FAIL())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
mbedtls_mpi *y2 = os_malloc(sizeof(*y2));
|
||||||
|
if (y2 == NULL)
|
||||||
|
return NULL;
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,45 @@
|
|||||||
|
From 33afce36c54b0cad38643629ded10ff5d727f077 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
Date: Fri, 12 Aug 2022 05:34:47 -0400
|
||||||
|
Subject: [PATCH 5/7] add NULL checks (encountered during tests/hwsim)
|
||||||
|
|
||||||
|
sae_derive_commit_element_ecc NULL pwe_ecc check
|
||||||
|
dpp_gen_keypair() NULL curve check
|
||||||
|
|
||||||
|
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
---
|
||||||
|
src/common/dpp_crypto.c | 6 ++++++
|
||||||
|
src/common/sae.c | 7 +++++++
|
||||||
|
2 files changed, 13 insertions(+)
|
||||||
|
|
||||||
|
--- a/src/common/dpp_crypto.c
|
||||||
|
+++ b/src/common/dpp_crypto.c
|
||||||
|
@@ -248,6 +248,12 @@ struct crypto_ec_key * dpp_set_pubkey_po
|
||||||
|
|
||||||
|
struct crypto_ec_key * dpp_gen_keypair(const struct dpp_curve_params *curve)
|
||||||
|
{
|
||||||
|
+ if (curve == NULL) {
|
||||||
|
+ wpa_printf(MSG_DEBUG,
|
||||||
|
+ "DPP: %s curve must be initialized", __func__);
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
struct crypto_ec_key *key;
|
||||||
|
|
||||||
|
wpa_printf(MSG_DEBUG, "DPP: Generating a keypair");
|
||||||
|
--- a/src/common/sae.c
|
||||||
|
+++ b/src/common/sae.c
|
||||||
|
@@ -1278,6 +1278,13 @@ void sae_deinit_pt(struct sae_pt *pt)
|
||||||
|
static int sae_derive_commit_element_ecc(struct sae_data *sae,
|
||||||
|
struct crypto_bignum *mask)
|
||||||
|
{
|
||||||
|
+ if (sae->tmp->pwe_ecc == NULL) {
|
||||||
|
+ wpa_printf(MSG_DEBUG,
|
||||||
|
+ "SAE: %s sae->tmp->pwe_ecc must be initialized",
|
||||||
|
+ __func__);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* COMMIT-ELEMENT = inverse(scalar-op(mask, PWE)) */
|
||||||
|
if (!sae->tmp->own_commit_element_ecc) {
|
||||||
|
sae->tmp->own_commit_element_ecc =
|
@ -0,0 +1,26 @@
|
|||||||
|
From 54211caa2e0e5163aefef390daf88a971367a702 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
Date: Tue, 4 Oct 2022 17:09:24 -0400
|
||||||
|
Subject: [PATCH 6/7] dpp_pkex: EC point mul w/ value < prime
|
||||||
|
|
||||||
|
crypto_ec_point_mul() with mbedtls requires point
|
||||||
|
be multiplied by a multiplicand with value < prime
|
||||||
|
|
||||||
|
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
---
|
||||||
|
src/common/dpp_crypto.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/src/common/dpp_crypto.c
|
||||||
|
+++ b/src/common/dpp_crypto.c
|
||||||
|
@@ -1567,7 +1567,9 @@ dpp_pkex_derive_Qr(const struct dpp_curv
|
||||||
|
Pr = crypto_ec_key_get_public_key(Pr_key);
|
||||||
|
Qr = crypto_ec_point_init(ec);
|
||||||
|
hash_bn = crypto_bignum_init_set(hash, curve->hash_len);
|
||||||
|
- if (!Pr || !Qr || !hash_bn || crypto_ec_point_mul(ec, Pr, hash_bn, Qr))
|
||||||
|
+ if (!Pr || !Qr || !hash_bn ||
|
||||||
|
+ crypto_bignum_mod(hash_bn, crypto_ec_get_prime(ec), hash_bn) ||
|
||||||
|
+ crypto_ec_point_mul(ec, Pr, hash_bn, Qr))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
if (crypto_ec_point_is_at_infinity(ec, Qr)) {
|
@ -0,0 +1,32 @@
|
|||||||
|
From 639bb1bb912029ec4ff110c3ed807b62f583d6bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
Date: Sun, 9 Oct 2022 04:02:44 -0400
|
||||||
|
Subject: [PATCH 7/7] DPP: fix memleak of intro.peer_key
|
||||||
|
|
||||||
|
fix memleak of intro.peer_key in wpas_dpp_rx_peer_disc_resp()
|
||||||
|
|
||||||
|
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
---
|
||||||
|
wpa_supplicant/dpp_supplicant.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/wpa_supplicant/dpp_supplicant.c
|
||||||
|
+++ b/wpa_supplicant/dpp_supplicant.c
|
||||||
|
@@ -2610,6 +2610,8 @@ static void wpas_dpp_rx_peer_disc_resp(s
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ os_memset(&intro, 0, sizeof(intro));
|
||||||
|
+
|
||||||
|
trans_id = dpp_get_attr(buf, len, DPP_ATTR_TRANSACTION_ID,
|
||||||
|
&trans_id_len);
|
||||||
|
if (!trans_id || trans_id_len != 1) {
|
||||||
|
@@ -2720,7 +2722,7 @@ static void wpas_dpp_rx_peer_disc_resp(s
|
||||||
|
wpa_supplicant_req_scan(wpa_s, 0, 0);
|
||||||
|
}
|
||||||
|
fail:
|
||||||
|
- os_memset(&intro, 0, sizeof(intro));
|
||||||
|
+ dpp_peer_intro_deinit(&intro);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
|||||||
LIBS += $(DRV_AP_LIBS)
|
LIBS += $(DRV_AP_LIBS)
|
||||||
|
|
||||||
ifdef CONFIG_L2_PACKET
|
ifdef CONFIG_L2_PACKET
|
||||||
@@ -1291,6 +1297,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
|
@@ -1378,6 +1384,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
|
||||||
_OBJS_VAR := OBJS
|
_OBJS_VAR := OBJS
|
||||||
include ../src/objs.mk
|
include ../src/objs.mk
|
||||||
|
|
||||||
@ -49,7 +49,7 @@
|
|||||||
hostapd: $(OBJS)
|
hostapd: $(OBJS)
|
||||||
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
@@ -1365,6 +1377,12 @@ include ../src/objs.mk
|
@@ -1458,6 +1470,12 @@ include ../src/objs.mk
|
||||||
_OBJS_VAR := SOBJS
|
_OBJS_VAR := SOBJS
|
||||||
include ../src/objs.mk
|
include ../src/objs.mk
|
||||||
|
|
||||||
@ -128,7 +128,7 @@
|
|||||||
NEED_AES_WRAP=y
|
NEED_AES_WRAP=y
|
||||||
OBJS += ../src/ap/wpa_auth.o
|
OBJS += ../src/ap/wpa_auth.o
|
||||||
OBJS += ../src/ap/wpa_auth_ie.o
|
OBJS += ../src/ap/wpa_auth_ie.o
|
||||||
@@ -1920,6 +1937,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
@@ -1996,6 +2013,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||||
|
|
||||||
_OBJS_VAR := OBJS
|
_OBJS_VAR := OBJS
|
||||||
include ../src/objs.mk
|
include ../src/objs.mk
|
||||||
@ -141,7 +141,7 @@
|
|||||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
@@ -2052,6 +2075,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
|
@@ -2128,6 +2151,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
|
||||||
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
||||||
@$(E) " sed" $<
|
@$(E) " sed" $<
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/hostapd/Makefile
|
--- a/hostapd/Makefile
|
||||||
+++ b/hostapd/Makefile
|
+++ b/hostapd/Makefile
|
||||||
@@ -1307,7 +1307,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
|
@@ -1394,7 +1394,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
|
||||||
@$(AR) cr $@ hostapd_multi.o $(OBJS)
|
@$(AR) cr $@ hostapd_multi.o $(OBJS)
|
||||||
|
|
||||||
hostapd: $(OBJS)
|
hostapd: $(OBJS)
|
||||||
@ -9,7 +9,7 @@
|
|||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
ifdef CONFIG_WPA_TRACE
|
ifdef CONFIG_WPA_TRACE
|
||||||
@@ -1318,7 +1318,7 @@ _OBJS_VAR := OBJS_c
|
@@ -1405,7 +1405,7 @@ _OBJS_VAR := OBJS_c
|
||||||
include ../src/objs.mk
|
include ../src/objs.mk
|
||||||
|
|
||||||
hostapd_cli: $(OBJS_c)
|
hostapd_cli: $(OBJS_c)
|
||||||
@ -20,7 +20,7 @@
|
|||||||
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
|
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
|
||||||
--- a/wpa_supplicant/Makefile
|
--- a/wpa_supplicant/Makefile
|
||||||
+++ b/wpa_supplicant/Makefile
|
+++ b/wpa_supplicant/Makefile
|
||||||
@@ -1949,31 +1949,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
|
@@ -2025,31 +2025,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
|
||||||
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
|
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
|
||||||
|
|
||||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=iproute2
|
PKG_NAME:=iproute2
|
||||||
PKG_VERSION:=6.0.0
|
PKG_VERSION:=6.1.0
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
|
||||||
PKG_HASH:=523139e9e72aec996374fa2de74be4c53d2dd05589488934d21ff97bae19580a
|
PKG_HASH:=5ce12a0fec6b212725ef218735941b2dab76244db7e72646a76021b0537b43ab
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_BUILD_DEPENDS:=iptables
|
PKG_BUILD_DEPENDS:=iptables
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
||||||
--- a/ip/ip.c
|
--- a/ip/ip.c
|
||||||
+++ b/ip/ip.c
|
+++ b/ip/ip.c
|
||||||
@@ -64,11 +64,17 @@ static void usage(void)
|
@@ -65,11 +65,17 @@ static void usage(void)
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
|
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
|
||||||
" ip [ -force ] -batch filename\n"
|
" ip [ -force ] -batch filename\n"
|
||||||
@ -43,7 +43,7 @@
|
|||||||
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
|
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
|
||||||
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
|
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
|
||||||
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
|
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
|
||||||
@@ -91,37 +97,49 @@ static const struct cmd {
|
@@ -92,37 +98,49 @@ static const struct cmd {
|
||||||
int (*func)(int argc, char **argv);
|
int (*func)(int argc, char **argv);
|
||||||
} cmds[] = {
|
} cmds[] = {
|
||||||
{ "address", do_ipaddr },
|
{ "address", do_ipaddr },
|
||||||
|
@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=xdp-tools
|
PKG_NAME:=xdp-tools
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
PKG_VERSION:=1.2.8
|
PKG_VERSION:=1.2.9
|
||||||
PKG_HASH:=2c575e5242e60055b0e7fc720f5b6ea87d74911f967dde3d50046d751f35bff0
|
PKG_HASH:=159ed8d3c8195d812ec3cde83bd736245a72743af372998320d39c2ba69ab142
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)?
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -138,7 +138,7 @@ int main(int argc, char **argv) {
|
@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -9,7 +9,7 @@
|
|||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
echo "HAVE_PCAP:=y" >>$CONFIG
|
echo "HAVE_PCAP:=y" >>$CONFIG
|
||||||
[ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
|
[ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
|
||||||
@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
|
@@ -222,7 +222,7 @@ int main(int argc, char **argv) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -18,7 +18,7 @@
|
|||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
|
echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
|
||||||
echo "yes"
|
echo "yes"
|
||||||
@@ -253,7 +253,7 @@ int main(int argc, char **argv) {
|
@@ -289,7 +289,7 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
2
rules.mk
2
rules.mk
@ -409,7 +409,7 @@ $(shell \
|
|||||||
if git log -1 >/dev/null 2>/dev/null; then \
|
if git log -1 >/dev/null 2>/dev/null; then \
|
||||||
if [ -n "$(1)" ]; then \
|
if [ -n "$(1)" ]; then \
|
||||||
last_bump="$$(git log --pretty=format:'%h %s' . | \
|
last_bump="$$(git log --pretty=format:'%h %s' . | \
|
||||||
grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
|
grep -m 1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
|
||||||
cut -f 1 -d ' ')"; \
|
cut -f 1 -d ' ')"; \
|
||||||
fi; \
|
fi; \
|
||||||
if [ -n "$$last_bump" ]; then \
|
if [ -n "$$last_bump" ]; then \
|
||||||
|
@ -8,6 +8,7 @@ ARCH:=mips
|
|||||||
BOARD:=ath25
|
BOARD:=ath25
|
||||||
BOARDNAME:=Atheros AR231x/AR5312
|
BOARDNAME:=Atheros AR231x/AR5312
|
||||||
FEATURES:=squashfs low_mem small_flash
|
FEATURES:=squashfs low_mem small_flash
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.10
|
||||||
KERNEL_TESTING_PATCHVER:=5.10
|
KERNEL_TESTING_PATCHVER:=5.10
|
||||||
|
1
target/linux/ath25/generic/target.mk
Normal file
1
target/linux/ath25/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -83,7 +83,7 @@ define Device/loader-okli-uimage
|
|||||||
LOADER_TYPE := bin
|
LOADER_TYPE := bin
|
||||||
COMPILE := loader-$(1).bin loader-$(1).uImage
|
COMPILE := loader-$(1).bin loader-$(1).uImage
|
||||||
COMPILE/loader-$(1).bin := loader-okli-compile
|
COMPILE/loader-$(1).bin := loader-okli-compile
|
||||||
COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | \
|
COMPILE/loader-$(1).uImage := loader-okli-compile | pad-to 64k | \
|
||||||
lzma | uImage lzma
|
lzma | uImage lzma
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -197,7 +197,6 @@ CONFIG_HZ_FIXED=0
|
|||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
# CONFIG_I2C_BCM2708 is not set
|
# CONFIG_I2C_BCM2708 is not set
|
||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
# CONFIG_I2C_BRCMSTB is not set
|
|
||||||
CONFIG_INPUT=y
|
CONFIG_INPUT=y
|
||||||
CONFIG_INPUT_MOUSEDEV=y
|
CONFIG_INPUT_MOUSEDEV=y
|
||||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||||
|
@ -250,7 +250,6 @@ CONFIG_HZ_FIXED=0
|
|||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
# CONFIG_I2C_BCM2708 is not set
|
# CONFIG_I2C_BCM2708 is not set
|
||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
# CONFIG_I2C_BRCMSTB is not set
|
|
||||||
CONFIG_INPUT=y
|
CONFIG_INPUT=y
|
||||||
CONFIG_INPUT_MOUSEDEV=y
|
CONFIG_INPUT_MOUSEDEV=y
|
||||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||||
|
@ -248,7 +248,6 @@ CONFIG_HW_RANDOM_BCM2835=y
|
|||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
# CONFIG_I2C_BCM2708 is not set
|
# CONFIG_I2C_BCM2708 is not set
|
||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
# CONFIG_I2C_BRCMSTB is not set
|
|
||||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||||
CONFIG_INPUT=y
|
CONFIG_INPUT=y
|
||||||
CONFIG_INPUT_MOUSEDEV=y
|
CONFIG_INPUT_MOUSEDEV=y
|
||||||
|
@ -255,7 +255,6 @@ CONFIG_HW_RANDOM_IPROC_RNG200=y
|
|||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
# CONFIG_I2C_BCM2708 is not set
|
# CONFIG_I2C_BCM2708 is not set
|
||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
# CONFIG_I2C_BRCMSTB is not set
|
|
||||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||||
CONFIG_INPUT=y
|
CONFIG_INPUT=y
|
||||||
CONFIG_INPUT_MOUSEDEV=y
|
CONFIG_INPUT_MOUSEDEV=y
|
||||||
|
@ -9,6 +9,7 @@ BOARD:=gemini
|
|||||||
BOARDNAME:=Cortina Systems CS351x
|
BOARDNAME:=Cortina Systems CS351x
|
||||||
FEATURES:=squashfs pci rtc usb dt gpio display ext4 rootfs-part boot-part
|
FEATURES:=squashfs pci rtc usb dt gpio display ext4 rootfs-part boot-part
|
||||||
CPU_TYPE:=fa526
|
CPU_TYPE:=fa526
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.15
|
KERNEL_PATCHVER:=5.15
|
||||||
|
|
||||||
|
1
target/linux/gemini/generic/target.mk
Normal file
1
target/linux/gemini/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -126,6 +126,7 @@ CONFIG_AEABI=y
|
|||||||
# CONFIG_AF_RXRPC_INJECT_LOSS is not set
|
# CONFIG_AF_RXRPC_INJECT_LOSS is not set
|
||||||
# CONFIG_AF_RXRPC_IPV6 is not set
|
# CONFIG_AF_RXRPC_IPV6 is not set
|
||||||
# CONFIG_AGP is not set
|
# CONFIG_AGP is not set
|
||||||
|
# CONFIG_AHCI_BRCM is not set
|
||||||
# CONFIG_AHCI_CEVA is not set
|
# CONFIG_AHCI_CEVA is not set
|
||||||
# CONFIG_AHCI_IMX is not set
|
# CONFIG_AHCI_IMX is not set
|
||||||
# CONFIG_AHCI_MVEBU is not set
|
# CONFIG_AHCI_MVEBU is not set
|
||||||
@ -2392,6 +2393,7 @@ CONFIG_HZ_100=y
|
|||||||
# CONFIG_I2C_AU1550 is not set
|
# CONFIG_I2C_AU1550 is not set
|
||||||
# CONFIG_I2C_BCM2835 is not set
|
# CONFIG_I2C_BCM2835 is not set
|
||||||
# CONFIG_I2C_BCM_IPROC is not set
|
# CONFIG_I2C_BCM_IPROC is not set
|
||||||
|
# CONFIG_I2C_BRCMSTB is not set
|
||||||
# CONFIG_I2C_CADENCE is not set
|
# CONFIG_I2C_CADENCE is not set
|
||||||
# CONFIG_I2C_CBUS_GPIO is not set
|
# CONFIG_I2C_CBUS_GPIO is not set
|
||||||
# CONFIG_I2C_CHARDEV is not set
|
# CONFIG_I2C_CHARDEV is not set
|
||||||
@ -2537,7 +2539,6 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
|
|||||||
# CONFIG_INA2XX_ADC is not set
|
# CONFIG_INA2XX_ADC is not set
|
||||||
# CONFIG_INDIRECT_PIO is not set
|
# CONFIG_INDIRECT_PIO is not set
|
||||||
CONFIG_INET=y
|
CONFIG_INET=y
|
||||||
CONFIG_INET_TABLE_PERTURB_ORDER=16
|
|
||||||
# CONFIG_INET6_AH is not set
|
# CONFIG_INET6_AH is not set
|
||||||
# CONFIG_INET6_ESP is not set
|
# CONFIG_INET6_ESP is not set
|
||||||
# CONFIG_INET6_ESPINTCP is not set
|
# CONFIG_INET6_ESPINTCP is not set
|
||||||
@ -2550,6 +2551,7 @@ CONFIG_INET_TABLE_PERTURB_ORDER=16
|
|||||||
# CONFIG_INET_ESPINTCP is not set
|
# CONFIG_INET_ESPINTCP is not set
|
||||||
# CONFIG_INET_IPCOMP is not set
|
# CONFIG_INET_IPCOMP is not set
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
|
CONFIG_INET_TABLE_PERTURB_ORDER=16
|
||||||
# CONFIG_INET_TCP_DIAG is not set
|
# CONFIG_INET_TCP_DIAG is not set
|
||||||
# CONFIG_INET_TUNNEL is not set
|
# CONFIG_INET_TUNNEL is not set
|
||||||
# CONFIG_INET_UDP_DIAG is not set
|
# CONFIG_INET_UDP_DIAG is not set
|
||||||
@ -3479,6 +3481,7 @@ CONFIG_MMC_BLOCK_MINORS=8
|
|||||||
# CONFIG_MMC_SDHCI_ACPI is not set
|
# CONFIG_MMC_SDHCI_ACPI is not set
|
||||||
# CONFIG_MMC_SDHCI_AM654 is not set
|
# CONFIG_MMC_SDHCI_AM654 is not set
|
||||||
# CONFIG_MMC_SDHCI_BCM_KONA is not set
|
# CONFIG_MMC_SDHCI_BCM_KONA is not set
|
||||||
|
# CONFIG_MMC_SDHCI_BRCMSTB is not set
|
||||||
# CONFIG_MMC_SDHCI_CADENCE is not set
|
# CONFIG_MMC_SDHCI_CADENCE is not set
|
||||||
# CONFIG_MMC_SDHCI_F_SDH30 is not set
|
# CONFIG_MMC_SDHCI_F_SDH30 is not set
|
||||||
# CONFIG_MMC_SDHCI_IPROC is not set
|
# CONFIG_MMC_SDHCI_IPROC is not set
|
||||||
@ -4655,7 +4658,9 @@ CONFIG_PROC_SYSCTL=y
|
|||||||
# CONFIG_PWM is not set
|
# CONFIG_PWM is not set
|
||||||
# CONFIG_PWM_DEBUG is not set
|
# CONFIG_PWM_DEBUG is not set
|
||||||
# CONFIG_PWM_FSL_FTM is not set
|
# CONFIG_PWM_FSL_FTM is not set
|
||||||
|
# CONFIG_PWM_IMG is not set
|
||||||
# CONFIG_PWM_JZ4740 is not set
|
# CONFIG_PWM_JZ4740 is not set
|
||||||
|
# CONFIG_PWM_MEDIATEK is not set
|
||||||
# CONFIG_PWM_PCA9685 is not set
|
# CONFIG_PWM_PCA9685 is not set
|
||||||
CONFIG_PWRSEQ_EMMC=y
|
CONFIG_PWRSEQ_EMMC=y
|
||||||
# CONFIG_PWRSEQ_SD8787 is not set
|
# CONFIG_PWRSEQ_SD8787 is not set
|
||||||
|
@ -130,6 +130,7 @@ CONFIG_AEABI=y
|
|||||||
# CONFIG_AF_RXRPC_IPV6 is not set
|
# CONFIG_AF_RXRPC_IPV6 is not set
|
||||||
CONFIG_AF_UNIX_OOB=y
|
CONFIG_AF_UNIX_OOB=y
|
||||||
# CONFIG_AGP is not set
|
# CONFIG_AGP is not set
|
||||||
|
# CONFIG_AHCI_BRCM is not set
|
||||||
# CONFIG_AHCI_CEVA is not set
|
# CONFIG_AHCI_CEVA is not set
|
||||||
# CONFIG_AHCI_IMX is not set
|
# CONFIG_AHCI_IMX is not set
|
||||||
# CONFIG_AHCI_MVEBU is not set
|
# CONFIG_AHCI_MVEBU is not set
|
||||||
@ -1665,6 +1666,7 @@ CONFIG_DQL=y
|
|||||||
# CONFIG_DRM_VKMS is not set
|
# CONFIG_DRM_VKMS is not set
|
||||||
# CONFIG_DRM_VMWGFX is not set
|
# CONFIG_DRM_VMWGFX is not set
|
||||||
# CONFIG_DRM_XEN is not set
|
# CONFIG_DRM_XEN is not set
|
||||||
|
# CONFIG_DRM_XEN_FRONTEND is not set
|
||||||
# CONFIG_DS1682 is not set
|
# CONFIG_DS1682 is not set
|
||||||
# CONFIG_DS1803 is not set
|
# CONFIG_DS1803 is not set
|
||||||
# CONFIG_DS4424 is not set
|
# CONFIG_DS4424 is not set
|
||||||
@ -2487,6 +2489,7 @@ CONFIG_HZ_100=y
|
|||||||
# CONFIG_I2C_AU1550 is not set
|
# CONFIG_I2C_AU1550 is not set
|
||||||
# CONFIG_I2C_BCM2835 is not set
|
# CONFIG_I2C_BCM2835 is not set
|
||||||
# CONFIG_I2C_BCM_IPROC is not set
|
# CONFIG_I2C_BCM_IPROC is not set
|
||||||
|
# CONFIG_I2C_BRCMSTB is not set
|
||||||
# CONFIG_I2C_CADENCE is not set
|
# CONFIG_I2C_CADENCE is not set
|
||||||
# CONFIG_I2C_CBUS_GPIO is not set
|
# CONFIG_I2C_CBUS_GPIO is not set
|
||||||
# CONFIG_I2C_CHARDEV is not set
|
# CONFIG_I2C_CHARDEV is not set
|
||||||
@ -2638,7 +2641,6 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
|
|||||||
# CONFIG_INA2XX_ADC is not set
|
# CONFIG_INA2XX_ADC is not set
|
||||||
# CONFIG_INDIRECT_PIO is not set
|
# CONFIG_INDIRECT_PIO is not set
|
||||||
CONFIG_INET=y
|
CONFIG_INET=y
|
||||||
CONFIG_INET_TABLE_PERTURB_ORDER=16
|
|
||||||
# CONFIG_INET6_AH is not set
|
# CONFIG_INET6_AH is not set
|
||||||
# CONFIG_INET6_ESP is not set
|
# CONFIG_INET6_ESP is not set
|
||||||
# CONFIG_INET6_ESPINTCP is not set
|
# CONFIG_INET6_ESPINTCP is not set
|
||||||
@ -2651,6 +2653,7 @@ CONFIG_INET_TABLE_PERTURB_ORDER=16
|
|||||||
# CONFIG_INET_ESPINTCP is not set
|
# CONFIG_INET_ESPINTCP is not set
|
||||||
# CONFIG_INET_IPCOMP is not set
|
# CONFIG_INET_IPCOMP is not set
|
||||||
# CONFIG_INET_LRO is not set
|
# CONFIG_INET_LRO is not set
|
||||||
|
CONFIG_INET_TABLE_PERTURB_ORDER=16
|
||||||
# CONFIG_INET_TCP_DIAG is not set
|
# CONFIG_INET_TCP_DIAG is not set
|
||||||
# CONFIG_INET_TUNNEL is not set
|
# CONFIG_INET_TUNNEL is not set
|
||||||
# CONFIG_INET_UDP_DIAG is not set
|
# CONFIG_INET_UDP_DIAG is not set
|
||||||
@ -3206,8 +3209,8 @@ CONFIG_LOCALVERSION=""
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
# CONFIG_LOCKD is not set
|
# CONFIG_LOCKD is not set
|
||||||
CONFIG_LOCKDEP_BITS=15
|
CONFIG_LOCKDEP_BITS=15
|
||||||
CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
|
|
||||||
CONFIG_LOCKDEP_CHAINS_BITS=16
|
CONFIG_LOCKDEP_CHAINS_BITS=16
|
||||||
|
CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
|
||||||
CONFIG_LOCKDEP_STACK_TRACE_BITS=19
|
CONFIG_LOCKDEP_STACK_TRACE_BITS=19
|
||||||
CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
|
CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
|
||||||
CONFIG_LOCKDEP_SUPPORT=y
|
CONFIG_LOCKDEP_SUPPORT=y
|
||||||
@ -3633,6 +3636,7 @@ CONFIG_MMC_BLOCK_MINORS=8
|
|||||||
# CONFIG_MMC_SDHCI_ACPI is not set
|
# CONFIG_MMC_SDHCI_ACPI is not set
|
||||||
# CONFIG_MMC_SDHCI_AM654 is not set
|
# CONFIG_MMC_SDHCI_AM654 is not set
|
||||||
# CONFIG_MMC_SDHCI_BCM_KONA is not set
|
# CONFIG_MMC_SDHCI_BCM_KONA is not set
|
||||||
|
# CONFIG_MMC_SDHCI_BRCMSTB is not set
|
||||||
# CONFIG_MMC_SDHCI_CADENCE is not set
|
# CONFIG_MMC_SDHCI_CADENCE is not set
|
||||||
# CONFIG_MMC_SDHCI_F_SDH30 is not set
|
# CONFIG_MMC_SDHCI_F_SDH30 is not set
|
||||||
# CONFIG_MMC_SDHCI_IPROC is not set
|
# CONFIG_MMC_SDHCI_IPROC is not set
|
||||||
@ -4873,7 +4877,9 @@ CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
|
|||||||
# CONFIG_PWM_DEBUG is not set
|
# CONFIG_PWM_DEBUG is not set
|
||||||
# CONFIG_PWM_DWC is not set
|
# CONFIG_PWM_DWC is not set
|
||||||
# CONFIG_PWM_FSL_FTM is not set
|
# CONFIG_PWM_FSL_FTM is not set
|
||||||
|
# CONFIG_PWM_IMG is not set
|
||||||
# CONFIG_PWM_JZ4740 is not set
|
# CONFIG_PWM_JZ4740 is not set
|
||||||
|
# CONFIG_PWM_MEDIATEK is not set
|
||||||
# CONFIG_PWM_PCA9685 is not set
|
# CONFIG_PWM_PCA9685 is not set
|
||||||
# CONFIG_PWM_RASPBERRYPI_POE is not set
|
# CONFIG_PWM_RASPBERRYPI_POE is not set
|
||||||
CONFIG_PWRSEQ_EMMC=y
|
CONFIG_PWRSEQ_EMMC=y
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
From e6866ed4219b8c7754dcd3eb1a654f6f524b0e56 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Johnny S. Lee" <foss@jsl.io>
|
||||||
|
Date: Thu, 15 Dec 2022 17:49:04 +0800
|
||||||
|
Subject: [PATCH] net: dsa: mv88e6xxx: depend on PTP conditionally
|
||||||
|
|
||||||
|
PTP hardware timestamping related objects are not linked when PTP
|
||||||
|
support for MV88E6xxx (NET_DSA_MV88E6XXX_PTP) is disabled, therefore
|
||||||
|
NET_DSA_MV88E6XXX should not depend on PTP_1588_CLOCK_OPTIONAL
|
||||||
|
regardless of NET_DSA_MV88E6XXX_PTP.
|
||||||
|
|
||||||
|
Instead, condition more strictly on how NET_DSA_MV88E6XXX_PTP's
|
||||||
|
dependencies are met, making sure that it cannot be enabled when
|
||||||
|
NET_DSA_MV88E6XXX=y and PTP_1588_CLOCK=m.
|
||||||
|
|
||||||
|
In other words, this commit allows NET_DSA_MV88E6XXX to be built-in
|
||||||
|
while PTP_1588_CLOCK is a module, as long as NET_DSA_MV88E6XXX_PTP is
|
||||||
|
prevented from being enabled.
|
||||||
|
|
||||||
|
Fixes: e5f31552674e ("ethernet: fix PTP_1588_CLOCK dependencies")
|
||||||
|
Signed-off-by: Johnny S. Lee <foss@jsl.io>
|
||||||
|
---
|
||||||
|
drivers/net/dsa/mv88e6xxx/Kconfig | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/drivers/net/dsa/mv88e6xxx/Kconfig
|
||||||
|
+++ b/drivers/net/dsa/mv88e6xxx/Kconfig
|
||||||
|
@@ -2,7 +2,6 @@
|
||||||
|
config NET_DSA_MV88E6XXX
|
||||||
|
tristate "Marvell 88E6xxx Ethernet switch fabric support"
|
||||||
|
depends on NET_DSA
|
||||||
|
- depends on PTP_1588_CLOCK_OPTIONAL
|
||||||
|
select IRQ_DOMAIN
|
||||||
|
select NET_DSA_TAG_EDSA
|
||||||
|
select NET_DSA_TAG_DSA
|
||||||
|
@@ -13,7 +12,8 @@ config NET_DSA_MV88E6XXX
|
||||||
|
config NET_DSA_MV88E6XXX_PTP
|
||||||
|
bool "PTP support for Marvell 88E6xxx"
|
||||||
|
default n
|
||||||
|
- depends on NET_DSA_MV88E6XXX && PTP_1588_CLOCK
|
||||||
|
+ depends on (NET_DSA_MV88E6XXX = y && PTP_1588_CLOCK = y) || \
|
||||||
|
+ (NET_DSA_MV88E6XXX = m && PTP_1588_CLOCK)
|
||||||
|
help
|
||||||
|
Say Y to enable PTP hardware timestamping on Marvell 88E6xxx switch
|
||||||
|
chips that support it.
|
@ -9,6 +9,7 @@ BOARD:=kirkwood
|
|||||||
BOARDNAME:=Marvell Kirkwood
|
BOARDNAME:=Marvell Kirkwood
|
||||||
FEATURES:=usb nand squashfs ramdisk
|
FEATURES:=usb nand squashfs ramdisk
|
||||||
CPU_TYPE:=xscale
|
CPU_TYPE:=xscale
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.10
|
||||||
KERNEL_TESTING_PATCHVER:=5.15
|
KERNEL_TESTING_PATCHVER:=5.15
|
||||||
|
1
target/linux/kirkwood/generic/target.mk
Normal file
1
target/linux/kirkwood/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -9,8 +9,7 @@ BOARDNAME:=Marvell EBU Armada
|
|||||||
FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part legacy-sdcard targz
|
FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part legacy-sdcard targz
|
||||||
SUBTARGETS:=cortexa9 cortexa53 cortexa72
|
SUBTARGETS:=cortexa9 cortexa53 cortexa72
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.15
|
||||||
KERNEL_TESTING_PATCHVER:=5.15
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/target.mk
|
include $(INCLUDE_DIR)/target.mk
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ BOARD:=mxs
|
|||||||
BOARDNAME:=Freescale i.MX23/i.MX28
|
BOARDNAME:=Freescale i.MX23/i.MX28
|
||||||
FEATURES:=ext4 rtc usb gpio
|
FEATURES:=ext4 rtc usb gpio
|
||||||
CPU_TYPE:=arm926ej-s
|
CPU_TYPE:=arm926ej-s
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.10
|
||||||
KERNEL_TESTING_PATCHVER:=5.15
|
KERNEL_TESTING_PATCHVER:=5.15
|
||||||
|
1
target/linux/mxs/generic/target.mk
Normal file
1
target/linux/mxs/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -8,6 +8,7 @@ ARCH:=aarch64
|
|||||||
BOARD:=octeontx
|
BOARD:=octeontx
|
||||||
BOARDNAME:=Octeon-TX
|
BOARDNAME:=Octeon-TX
|
||||||
FEATURES:=targz pcie gpio rtc usb fpu
|
FEATURES:=targz pcie gpio rtc usb fpu
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.10
|
||||||
|
|
||||||
|
1
target/linux/octeontx/generic/target.mk
Normal file
1
target/linux/octeontx/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -10,6 +10,7 @@ BOARDNAME:=TI OMAP3/4/AM33xx
|
|||||||
FEATURES:=usb usbgadget ext4 targz fpu audio display nand rootfs-part squashfs
|
FEATURES:=usb usbgadget ext4 targz fpu audio display nand rootfs-part squashfs
|
||||||
CPU_TYPE:=cortex-a8
|
CPU_TYPE:=cortex-a8
|
||||||
CPU_SUBTYPE:=vfpv3
|
CPU_SUBTYPE:=vfpv3
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.10
|
||||||
KERNEL_TESTING_PATCHVER:=5.15
|
KERNEL_TESTING_PATCHVER:=5.15
|
||||||
|
1
target/linux/omap/generic/target.mk
Normal file
1
target/linux/omap/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -10,6 +10,7 @@ BOARDNAME:=MIPS pistachio
|
|||||||
FEATURES:=fpu usb usbgadget squashfs targz nand
|
FEATURES:=fpu usb usbgadget squashfs targz nand
|
||||||
CPU_TYPE:=24kc
|
CPU_TYPE:=24kc
|
||||||
CPU_SUBTYPE:=24kf
|
CPU_SUBTYPE:=24kf
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.10
|
||||||
|
|
||||||
|
1
target/linux/pistachio/generic/target.mk
Normal file
1
target/linux/pistachio/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
163
target/linux/ramips/dts/mt7628an_linksys_e5400.dts
Normal file
163
target/linux/ramips/dts/mt7628an_linksys_e5400.dts
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "mt7628an.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "linksys,e5400", "mediatek,mt7628an-soc";
|
||||||
|
model = "Linksys E5400";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_wps;
|
||||||
|
led-failsafe = &led_wps;
|
||||||
|
led-running = &led_wps;
|
||||||
|
led-upgrade = &led_wps;
|
||||||
|
label-mac-device = ðernet;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "console=ttyS0,115200";
|
||||||
|
};
|
||||||
|
|
||||||
|
memory@0 {
|
||||||
|
device_type = "memory";
|
||||||
|
reg = <0x0 0x4000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_wps: wps {
|
||||||
|
label = "green:wps";
|
||||||
|
gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <40000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "u-boot";
|
||||||
|
reg = <0x0 0x30000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@30000 {
|
||||||
|
label = "u-boot-env";
|
||||||
|
reg = <0x30000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
factory: partition@40000 {
|
||||||
|
label = "factory";
|
||||||
|
reg = <0x40000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_factory_28: macaddr@28 {
|
||||||
|
reg = <0x28 0x6>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@50000 {
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x50000 0xfa0000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@ff0000 {
|
||||||
|
label = "cbtinfo";
|
||||||
|
reg = <0xff0000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&ehci {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&esw {
|
||||||
|
mediatek,portmap = <0x2f>;
|
||||||
|
mediatek,portdisable = <0x20>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ðernet {
|
||||||
|
nvmem-cells = <&macaddr_factory_28>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&ohci {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie0 {
|
||||||
|
wifi5: wifi@0,0 {
|
||||||
|
compatible = "mediatek,mt76";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||||
|
ieee80211-freq-limit = <5000000 6000000>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_factory_28>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
mac-address-increment = <3>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&state_default {
|
||||||
|
gpio {
|
||||||
|
group = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an";
|
||||||
|
function = "gpio";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbphy {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wmac {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||||
|
nvmem-cells = <&macaddr_factory_28>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
mac-address-increment = <2>;
|
||||||
|
};
|
||||||
|
|
@ -343,6 +343,21 @@ define Device/kroks_kndrt31r19
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += kroks_kndrt31r19
|
TARGET_DEVICES += kroks_kndrt31r19
|
||||||
|
|
||||||
|
define Device/linksys_e5400
|
||||||
|
IMAGE_SIZE := 16000k
|
||||||
|
DEVICE_VENDOR := Linksys
|
||||||
|
DEVICE_MODEL := E5400
|
||||||
|
DEVICE_ALT0_VENDOR := Linksys
|
||||||
|
DEVICE_ALT0_MODEL := E2500
|
||||||
|
DEVICE_ALT0_VARIANT := v4
|
||||||
|
DEVICE_ALT1_VENDOR := Linksys
|
||||||
|
DEVICE_ALT1_MODEL := E5300
|
||||||
|
DEVICE_ALT2_VENDOR := Linksys
|
||||||
|
DEVICE_ALT2_MODEL := E5350
|
||||||
|
DEVICE_PACKAGES := kmod-mt76x2
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += linksys_e5400
|
||||||
|
|
||||||
define Device/mediatek_linkit-smart-7688
|
define Device/mediatek_linkit-smart-7688
|
||||||
IMAGE_SIZE := 32448k
|
IMAGE_SIZE := 32448k
|
||||||
DEVICE_VENDOR := MediaTek
|
DEVICE_VENDOR := MediaTek
|
||||||
|
@ -125,6 +125,10 @@ ramips_setup_interfaces()
|
|||||||
ucidef_set_interface_lan "eth0"
|
ucidef_set_interface_lan "eth0"
|
||||||
ucidef_set_interface "wan" device "/dev/cdc-wdm0" protocol "qmi"
|
ucidef_set_interface "wan" device "/dev/cdc-wdm0" protocol "qmi"
|
||||||
;;
|
;;
|
||||||
|
linksys,e5400)
|
||||||
|
ucidef_add_switch "switch0" \
|
||||||
|
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan" "6@eth0"
|
||||||
|
;;
|
||||||
motorola,mwr03)
|
motorola,mwr03)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"1:lan" "2:lan" "3:lan" "0:wan" "6@eth0"
|
"1:lan" "2:lan" "3:lan" "0:wan" "6@eth0"
|
||||||
@ -248,6 +252,9 @@ ramips_setup_macs()
|
|||||||
totolink,lr1200)
|
totolink,lr1200)
|
||||||
wan_mac=$(mtd_get_mac_binary factory 0x2e)
|
wan_mac=$(mtd_get_mac_binary factory 0x2e)
|
||||||
;;
|
;;
|
||||||
|
linksys,e5400)
|
||||||
|
wan_mac=$(mtd_get_mac_binary factory 0x22)
|
||||||
|
;;
|
||||||
mercury,mac1200r-v2)
|
mercury,mac1200r-v2)
|
||||||
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory_info 0xd)" 1)
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory_info 0xd)" 1)
|
||||||
;;
|
;;
|
||||||
|
@ -149,7 +149,6 @@ CONFIG_PINCTRL=y
|
|||||||
# CONFIG_PINCTRL_AW9523 is not set
|
# CONFIG_PINCTRL_AW9523 is not set
|
||||||
CONFIG_PINCTRL_RT2880=y
|
CONFIG_PINCTRL_RT2880=y
|
||||||
# CONFIG_PINCTRL_SINGLE is not set
|
# CONFIG_PINCTRL_SINGLE is not set
|
||||||
# CONFIG_PWM_MEDIATEK is not set
|
|
||||||
CONFIG_RALINK=y
|
CONFIG_RALINK=y
|
||||||
# CONFIG_RALINK_WDT is not set
|
# CONFIG_RALINK_WDT is not set
|
||||||
CONFIG_REGMAP=y
|
CONFIG_REGMAP=y
|
||||||
|
@ -41,7 +41,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
obj-$(CONFIG_PWM_NTXEC) += pwm-ntxec.o
|
obj-$(CONFIG_PWM_NTXEC) += pwm-ntxec.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/pwm/pwm-mediatek-ramips.c
|
+++ b/drivers/pwm/pwm-mediatek-ramips.c
|
||||||
@@ -0,0 +1,173 @@
|
@@ -0,0 +1,175 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Mediatek Pulse Width Modulator driver
|
+ * Mediatek Pulse Width Modulator driver
|
||||||
+ *
|
+ *
|
||||||
@ -190,7 +190,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
+ for (i = 0; i < NUM_PWM; i++)
|
+ for (i = 0; i < NUM_PWM; i++)
|
||||||
+ pwm_disable(&pc->chip.pwms[i]);
|
+ pwm_disable(&pc->chip.pwms[i]);
|
||||||
+
|
+
|
||||||
+ return pwmchip_remove(&pc->chip);
|
+ pwmchip_remove(&pc->chip);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static const struct of_device_id mtk_pwm_of_match[] = {
|
+static const struct of_device_id mtk_pwm_of_match[] = {
|
||||||
|
@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|||||||
|
|
||||||
--- a/MAINTAINERS
|
--- a/MAINTAINERS
|
||||||
+++ b/MAINTAINERS
|
+++ b/MAINTAINERS
|
||||||
@@ -15887,6 +15887,13 @@ S: Maintained
|
@@ -15882,6 +15882,13 @@ S: Maintained
|
||||||
F: include/sound/rt*.h
|
F: include/sound/rt*.h
|
||||||
F: sound/soc/codecs/rt*
|
F: sound/soc/codecs/rt*
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ BOARDNAME := NVIDIA Tegra
|
|||||||
FEATURES := audio boot-part display ext4 fpu gpio pci pcie rootfs-part rtc squashfs usb
|
FEATURES := audio boot-part display ext4 fpu gpio pci pcie rootfs-part rtc squashfs usb
|
||||||
CPU_TYPE := cortex-a9
|
CPU_TYPE := cortex-a9
|
||||||
CPU_SUBTYPE := vfpv3-d16
|
CPU_SUBTYPE := vfpv3-d16
|
||||||
|
SUBTARGETS := generic
|
||||||
|
|
||||||
KERNEL_PATCHVER := 5.10
|
KERNEL_PATCHVER := 5.10
|
||||||
KERNEL_TESTING_PATCHVER := 5.15
|
KERNEL_TESTING_PATCHVER := 5.15
|
||||||
|
1
target/linux/tegra/generic/target.mk
Normal file
1
target/linux/tegra/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -150,7 +150,6 @@ CONFIG_DRM_TTM=y
|
|||||||
CONFIG_DRM_TTM_HELPER=y
|
CONFIG_DRM_TTM_HELPER=y
|
||||||
CONFIG_DRM_VIRTIO_GPU=y
|
CONFIG_DRM_VIRTIO_GPU=y
|
||||||
CONFIG_DRM_VRAM_HELPER=y
|
CONFIG_DRM_VRAM_HELPER=y
|
||||||
# CONFIG_DRM_XEN_FRONTEND is not set
|
|
||||||
CONFIG_EFI=y
|
CONFIG_EFI=y
|
||||||
CONFIG_EFIVAR_FS=m
|
CONFIG_EFIVAR_FS=m
|
||||||
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
||||||
|
@ -106,7 +106,6 @@ CONFIG_DRM_TTM=y
|
|||||||
CONFIG_DRM_TTM_HELPER=y
|
CONFIG_DRM_TTM_HELPER=y
|
||||||
CONFIG_DRM_VIRTIO_GPU=y
|
CONFIG_DRM_VIRTIO_GPU=y
|
||||||
CONFIG_DRM_VRAM_HELPER=y
|
CONFIG_DRM_VRAM_HELPER=y
|
||||||
# CONFIG_DRM_XEN_FRONTEND is not set
|
|
||||||
CONFIG_EFI=y
|
CONFIG_EFI=y
|
||||||
CONFIG_EFIVAR_FS=m
|
CONFIG_EFIVAR_FS=m
|
||||||
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
||||||
|
@ -10,6 +10,7 @@ BOARDNAME:=Xilinx Zynq 7000 SoCs
|
|||||||
FEATURES:=fpu gpio rtc usb usbgadget boot-part rootfs-part squashfs
|
FEATURES:=fpu gpio rtc usb usbgadget boot-part rootfs-part squashfs
|
||||||
CPU_TYPE:=cortex-a9
|
CPU_TYPE:=cortex-a9
|
||||||
CPU_SUBTYPE:=neon
|
CPU_SUBTYPE:=neon
|
||||||
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
# future support SUBTARGETS: for both zynq and zynqmp
|
# future support SUBTARGETS: for both zynq and zynqmp
|
||||||
|
|
||||||
|
1
target/linux/zynq/generic/target.mk
Normal file
1
target/linux/zynq/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -0,0 +1,39 @@
|
|||||||
|
From d2356ebb0084a0d80dbfe33040c9afe938c15d19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Liska <mliska@suse.cz>
|
||||||
|
Date: Mon, 11 Jul 2022 22:03:14 +0200
|
||||||
|
Subject: [PATCH] libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream
|
||||||
|
|
||||||
|
9cf13067cb5088626ba7ee1ec4c42ec59c7995a0 [sanitizer] Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
|
||||||
|
|
||||||
|
(cherry picked from commit 2701442d0cf6292f6624443c15813d6d1a3562fe)
|
||||||
|
---
|
||||||
|
.../sanitizer_platform_limits_posix.cpp | 10 ++++++----
|
||||||
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||||
|
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||||
|
@@ -72,7 +72,9 @@
|
||||||
|
#include <sys/vt.h>
|
||||||
|
#include <linux/cdrom.h>
|
||||||
|
#include <linux/fd.h>
|
||||||
|
+#if SANITIZER_ANDROID
|
||||||
|
#include <linux/fs.h>
|
||||||
|
+#endif
|
||||||
|
#include <linux/hdreg.h>
|
||||||
|
#include <linux/input.h>
|
||||||
|
#include <linux/ioctl.h>
|
||||||
|
@@ -828,10 +830,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||||
|
unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT;
|
||||||
|
unsigned IOCTL_EVIOCSKEYCODE_V2 = IOCTL_NOT_PRESENT;
|
||||||
|
#endif
|
||||||
|
- unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS;
|
||||||
|
- unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION;
|
||||||
|
- unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS;
|
||||||
|
- unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION;
|
||||||
|
+ unsigned IOCTL_FS_IOC_GETFLAGS = _IOR('f', 1, long);
|
||||||
|
+ unsigned IOCTL_FS_IOC_GETVERSION = _IOR('v', 1, long);
|
||||||
|
+ unsigned IOCTL_FS_IOC_SETFLAGS = _IOW('f', 2, long);
|
||||||
|
+ unsigned IOCTL_FS_IOC_SETVERSION = _IOW('v', 2, long);
|
||||||
|
unsigned IOCTL_GIO_CMAP = GIO_CMAP;
|
||||||
|
unsigned IOCTL_GIO_FONT = GIO_FONT;
|
||||||
|
unsigned IOCTL_GIO_UNIMAP = GIO_UNIMAP;
|
@ -7,13 +7,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=glibc
|
PKG_NAME:=glibc
|
||||||
PKG_VERSION:=2.35
|
PKG_VERSION:=2.36
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE_VERSION:=813a8d01716d4e099ec57194a93b14fa08b4beca
|
PKG_SOURCE_VERSION:=3aae843e9e9e6a2502e98ff44d2671b20a023f8e
|
||||||
PKG_MIRROR_HASH:=8c8d92dde334f0e0f9a0949d25b2950db513ce8723c31ae0b0ef64730a00322f
|
PKG_MIRROR_HASH:=29bdd6ca699f297de500ea457741d0706d57a69836fa7d45e6cc2cc20484cad4
|
||||||
PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
|
PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ provides them.
|
|||||||
int totfails = 0;
|
int totfails = 0;
|
||||||
|
|
||||||
int main (int argc, char *argv[]);
|
int main (int argc, char *argv[]);
|
||||||
@@ -120,13 +104,3 @@ put8 (char *cp)
|
@@ -119,13 +103,3 @@ put8 (char *cp)
|
||||||
printf("%02x", t);
|
printf("%02x", t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -627,7 +627,7 @@ provides them.
|
|||||||
range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
|
range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
|
||||||
--- a/stdlib/stdlib.h
|
--- a/stdlib/stdlib.h
|
||||||
+++ b/stdlib/stdlib.h
|
+++ b/stdlib/stdlib.h
|
||||||
@@ -971,6 +971,12 @@ extern int getsubopt (char **__restrict
|
@@ -984,6 +984,12 @@ extern int getsubopt (char **__restrict
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ add /usr/lib to default search path for the dynamic linker
|
|||||||
|
|
||||||
--- a/Makeconfig
|
--- a/Makeconfig
|
||||||
+++ b/Makeconfig
|
+++ b/Makeconfig
|
||||||
@@ -618,6 +618,9 @@ else
|
@@ -631,6 +631,9 @@ else
|
||||||
default-rpath = $(libdir)
|
default-rpath = $(libdir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libressl
|
PKG_NAME:=libressl
|
||||||
PKG_VERSION:=3.5.3
|
PKG_VERSION:=3.7.0
|
||||||
PKG_HASH:=3ab5e5eaef69ce20c6b170ee64d785b42235f48f2e62b095fca5d7b6672b8b28
|
PKG_HASH:=3fc1290f4007ec75f6e9acecbb25512630d1b9ab8c53ba79844e395868c3e006
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_CPE_ID:=cpe:/a:openbsd:libressl
|
PKG_CPE_ID:=cpe:/a:openbsd:libressl
|
||||||
|
@ -7,12 +7,11 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=patchelf
|
PKG_NAME:=patchelf
|
||||||
|
PKG_VERSION:=0.17.0
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=https://github.com/NixOS/patchelf.git
|
PKG_SOURCE_URL:=https://github.com/NixOS/patchelf/releases/download/$(PKG_VERSION)
|
||||||
PKG_SOURCE_VERSION:=f34751b88bd07d7f44f5cd3200fb4122bf916c7e
|
PKG_HASH:=45d76f4a31688a523718ec512f31650b1f35d1affec3eafeb3feeb5448d341e1
|
||||||
PKG_SOURCE_DATE:=2020-12-07
|
|
||||||
PKG_MIRROR_HASH:=ac746930b919b97da40f259cfc9ab7bbd48a0c9cbf2eebd8cee5ae19a94356fd
|
|
||||||
|
|
||||||
HOST_BUILD_PARALLEL:=1
|
HOST_BUILD_PARALLEL:=1
|
||||||
HOST_FIXUP:=autoreconf
|
HOST_FIXUP:=autoreconf
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
From 8f600f2df293d539e9e9137f6f82faa1633b97c1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
Date: Sat, 17 Dec 2022 20:56:29 -0800
|
||||||
|
Subject: [PATCH] sed: fix symlink bufsize readlink check
|
||||||
|
|
||||||
|
Problem reported by Hauke Mehrtens.
|
||||||
|
* sed/utils.c (follow_symlink): Fix typo when checking size of
|
||||||
|
second and later symlink, when that symlink is so large that it
|
||||||
|
does not fit into the buffer. Although the bug is not a buffer
|
||||||
|
overflow, it does cause sed to mishandle the symlink.
|
||||||
|
* testsuite/follow-symlinks.sh: Test for the bug.
|
||||||
|
---
|
||||||
|
sed/utils.c | 2 +-
|
||||||
|
testsuite/follow-symlinks.sh | 13 +++++++++++++
|
||||||
|
3 files changed, 18 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/sed/utils.c
|
||||||
|
+++ b/sed/utils.c
|
||||||
|
@@ -345,7 +345,7 @@ follow_symlink (const char *fname)
|
||||||
|
while ((linklen = (buf_used < buf_size
|
||||||
|
? readlink (fn, buf + buf_used, buf_size - buf_used)
|
||||||
|
: 0))
|
||||||
|
- == buf_size)
|
||||||
|
+ == buf_size - buf_used)
|
||||||
|
{
|
||||||
|
buf = xpalloc (buf, &buf_size, 1, SSIZE_IDX_MAX, 1);
|
||||||
|
if (num_links)
|
||||||
|
--- a/testsuite/follow-symlinks.sh
|
||||||
|
+++ b/testsuite/follow-symlinks.sh
|
||||||
|
@@ -73,4 +73,17 @@ compare_ exp-la-abs out-la-abs || fail=1
|
||||||
|
ln -s la-loop la-loop || framework_failure_
|
||||||
|
sed --follow-symlinks -i s/a/b/ la-loop && fail=1
|
||||||
|
|
||||||
|
+# symlink of length 128
|
||||||
|
+long=d/
|
||||||
|
+for i in 2 3 4 5 6 7; do
|
||||||
|
+ long=$long$long
|
||||||
|
+done
|
||||||
|
+dir=${long%/d/}
|
||||||
|
+file=$dir/xx
|
||||||
|
+mkdir -p $dir &&
|
||||||
|
+echo x >$file &&
|
||||||
|
+ln -s $file yy &&
|
||||||
|
+ln -s yy xx || framework_failure_
|
||||||
|
+sed -i --follow-symlinks s/x/y/ xx || fail=1
|
||||||
|
+
|
||||||
|
Exit $fail
|
@ -7,12 +7,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=xz
|
PKG_NAME:=xz
|
||||||
PKG_VERSION:=5.2.9
|
PKG_VERSION:=5.2.10
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=@SF/lzmautils \
|
PKG_SOURCE_URL:=@SF/lzmautils \
|
||||||
http://tukaani.org/xz
|
http://tukaani.org/xz
|
||||||
PKG_HASH:=b194507fba3a462a753c553149ccdaa168337bcb7deefddd067ba987c83dfce6
|
PKG_HASH:=01b71df61521d9da698ce3c33148bff06a131628ff037398c09482f3a26e5408
|
||||||
PKG_CPE_ID:=cpe:/a:tukaani:xz
|
PKG_CPE_ID:=cpe:/a:tukaani:xz
|
||||||
|
|
||||||
HOST_BUILD_PARALLEL:=1
|
HOST_BUILD_PARALLEL:=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user