Merge branch 'openwrt:master' into master
This commit is contained in:
commit
ad2cb4fd48
280 changed files with 22665 additions and 1935 deletions
|
@ -159,6 +159,19 @@ menu "Global build settings"
|
||||||
Adds LTO flags to the CFLAGS and LDFLAGS.
|
Adds LTO flags to the CFLAGS and LDFLAGS.
|
||||||
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto
|
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto
|
||||||
|
|
||||||
|
config MOLD
|
||||||
|
depends on (aarch64 || arm || i386 || i686 || m68k || powerpc || powerpc64 || sh4 || x86_64)
|
||||||
|
depends on !GCC_USE_VERSION_11
|
||||||
|
def_bool $(shell, ./config/check-hostcxx.sh 10 2 12)
|
||||||
|
|
||||||
|
config USE_MOLD
|
||||||
|
bool
|
||||||
|
prompt "Use the mold linker for all packages"
|
||||||
|
depends on MOLD
|
||||||
|
help
|
||||||
|
Link packages with mold, a modern linker
|
||||||
|
Packages can opt-out via setting PKG_BUILD_FLAGS:=no-mold
|
||||||
|
|
||||||
config IPV6
|
config IPV6
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
@ -182,7 +195,6 @@ menu "Global build settings"
|
||||||
help
|
help
|
||||||
This will install binaries stripped using strip from binutils.
|
This will install binaries stripped using strip from binutils.
|
||||||
|
|
||||||
|
|
||||||
config USE_SSTRIP
|
config USE_SSTRIP
|
||||||
bool "sstrip"
|
bool "sstrip"
|
||||||
depends on !USE_GLIBC
|
depends on !USE_GLIBC
|
||||||
|
@ -199,13 +211,12 @@ menu "Global build settings"
|
||||||
help
|
help
|
||||||
Specifies arguments passed to the strip command when stripping binaries.
|
Specifies arguments passed to the strip command when stripping binaries.
|
||||||
|
|
||||||
config SSTRIP_ARGS
|
config SSTRIP_DISCARD_TRAILING_ZEROES
|
||||||
string
|
bool "Strip trailing zero bytes"
|
||||||
prompt "Sstrip arguments"
|
depends on USE_SSTRIP && !USE_MOLD
|
||||||
depends on USE_SSTRIP
|
default y
|
||||||
default "-z"
|
|
||||||
help
|
help
|
||||||
Specifies arguments passed to the sstrip command when stripping binaries.
|
Use sstrip's -z option to discard trailing zero bytes
|
||||||
|
|
||||||
config STRIP_KERNEL_EXPORTS
|
config STRIP_KERNEL_EXPORTS
|
||||||
bool "Strip unnecessary exports from the kernel image"
|
bool "Strip unnecessary exports from the kernel image"
|
||||||
|
|
|
@ -1107,6 +1107,12 @@ config KERNEL_NET_L3_MASTER_DEV
|
||||||
This module provides glue between core networking code and device
|
This module provides glue between core networking code and device
|
||||||
drivers to support L3 master devices like VRF.
|
drivers to support L3 master devices like VRF.
|
||||||
|
|
||||||
|
config KERNEL_XDP_SOCKETS
|
||||||
|
bool "XDP sockets support"
|
||||||
|
help
|
||||||
|
XDP sockets allows a channel between XDP programs and
|
||||||
|
userspace applications.
|
||||||
|
|
||||||
config KERNEL_WIRELESS_EXT
|
config KERNEL_WIRELESS_EXT
|
||||||
def_bool n
|
def_bool n
|
||||||
|
|
||||||
|
|
12
config/check-hostcxx.sh
Executable file
12
config/check-hostcxx.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
cat << EOF | "$STAGING_DIR_HOST/bin/g++" -c -x c++ -o /dev/null - >/dev/null 2>&1
|
||||||
|
#if __clang__
|
||||||
|
#if __clang_major__ < $3
|
||||||
|
#error "clang too old"
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if __GNUC__ < $1 || (__GNUC__ == $1 && (__GNUC_MINOR__ < $2))
|
||||||
|
#error "gcc too old"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
[ $? -eq 0 ] && echo y || echo n
|
|
@ -346,6 +346,7 @@ define Device/InitProfile
|
||||||
DEVICE_ALT2_TITLE = $$(DEVICE_ALT2_VENDOR) $$(DEVICE_ALT2_MODEL)$$(if $$(DEVICE_ALT2_VARIANT), $$(DEVICE_ALT2_VARIANT))
|
DEVICE_ALT2_TITLE = $$(DEVICE_ALT2_VENDOR) $$(DEVICE_ALT2_MODEL)$$(if $$(DEVICE_ALT2_VARIANT), $$(DEVICE_ALT2_VARIANT))
|
||||||
DEVICE_ALT3_TITLE = $$(DEVICE_ALT3_VENDOR) $$(DEVICE_ALT3_MODEL)$$(if $$(DEVICE_ALT3_VARIANT), $$(DEVICE_ALT3_VARIANT))
|
DEVICE_ALT3_TITLE = $$(DEVICE_ALT3_VENDOR) $$(DEVICE_ALT3_MODEL)$$(if $$(DEVICE_ALT3_VARIANT), $$(DEVICE_ALT3_VARIANT))
|
||||||
DEVICE_ALT4_TITLE = $$(DEVICE_ALT4_VENDOR) $$(DEVICE_ALT4_MODEL)$$(if $$(DEVICE_ALT4_VARIANT), $$(DEVICE_ALT4_VARIANT))
|
DEVICE_ALT4_TITLE = $$(DEVICE_ALT4_VENDOR) $$(DEVICE_ALT4_MODEL)$$(if $$(DEVICE_ALT4_VARIANT), $$(DEVICE_ALT4_VARIANT))
|
||||||
|
DEVICE_ALT5_TITLE = $$(DEVICE_ALT5_VENDOR) $$(DEVICE_ALT5_MODEL)$$(if $$(DEVICE_ALT5_VARIANT), $$(DEVICE_ALT5_VARIANT))
|
||||||
DEVICE_VENDOR :=
|
DEVICE_VENDOR :=
|
||||||
DEVICE_MODEL :=
|
DEVICE_MODEL :=
|
||||||
DEVICE_VARIANT :=
|
DEVICE_VARIANT :=
|
||||||
|
@ -364,6 +365,9 @@ define Device/InitProfile
|
||||||
DEVICE_ALT4_VENDOR :=
|
DEVICE_ALT4_VENDOR :=
|
||||||
DEVICE_ALT4_MODEL :=
|
DEVICE_ALT4_MODEL :=
|
||||||
DEVICE_ALT4_VARIANT :=
|
DEVICE_ALT4_VARIANT :=
|
||||||
|
DEVICE_ALT5_VENDOR :=
|
||||||
|
DEVICE_ALT5_MODEL :=
|
||||||
|
DEVICE_ALT5_VARIANT :=
|
||||||
DEVICE_PACKAGES :=
|
DEVICE_PACKAGES :=
|
||||||
DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
|
DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
|
||||||
endef
|
endef
|
||||||
|
@ -448,7 +452,8 @@ DEFAULT_DEVICE_VARS := \
|
||||||
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
|
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
|
||||||
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT \
|
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT \
|
||||||
DEVICE_ALT3_VENDOR DEVICE_ALT3_MODEL DEVICE_ALT3_VARIANT \
|
DEVICE_ALT3_VENDOR DEVICE_ALT3_MODEL DEVICE_ALT3_VARIANT \
|
||||||
DEVICE_ALT4_VENDOR DEVICE_ALT4_MODEL DEVICE_ALT4_VARIANT
|
DEVICE_ALT4_VENDOR DEVICE_ALT4_MODEL DEVICE_ALT4_VARIANT \
|
||||||
|
DEVICE_ALT5_VENDOR DEVICE_ALT5_MODEL DEVICE_ALT5_VARIANT
|
||||||
|
|
||||||
define Device/ExportVar
|
define Device/ExportVar
|
||||||
$(1) : $(2):=$$($(2))
|
$(1) : $(2):=$$($(2))
|
||||||
|
@ -537,6 +542,9 @@ define Device/Build/initramfs
|
||||||
DEVICE_ALT4_VENDOR="$$(DEVICE_ALT4_VENDOR)" \
|
DEVICE_ALT4_VENDOR="$$(DEVICE_ALT4_VENDOR)" \
|
||||||
DEVICE_ALT4_MODEL="$$(DEVICE_ALT4_MODEL)" \
|
DEVICE_ALT4_MODEL="$$(DEVICE_ALT4_MODEL)" \
|
||||||
DEVICE_ALT4_VARIANT="$$(DEVICE_ALT4_VARIANT)" \
|
DEVICE_ALT4_VARIANT="$$(DEVICE_ALT4_VARIANT)" \
|
||||||
|
DEVICE_ALT5_VENDOR="$$(DEVICE_ALT5_VENDOR)" \
|
||||||
|
DEVICE_ALT5_MODEL="$$(DEVICE_ALT5_MODEL)" \
|
||||||
|
DEVICE_ALT5_VARIANT="$$(DEVICE_ALT5_VARIANT)" \
|
||||||
DEVICE_TITLE="$$(DEVICE_TITLE)" \
|
DEVICE_TITLE="$$(DEVICE_TITLE)" \
|
||||||
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
|
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
|
||||||
TARGET="$(BOARD)" \
|
TARGET="$(BOARD)" \
|
||||||
|
@ -668,6 +676,9 @@ define Device/Build/image
|
||||||
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
|
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
|
||||||
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
|
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
|
||||||
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
|
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
|
||||||
|
DEVICE_ALT5_VENDOR="$(DEVICE_ALT5_VENDOR)" \
|
||||||
|
DEVICE_ALT5_MODEL="$(DEVICE_ALT5_MODEL)" \
|
||||||
|
DEVICE_ALT5_VARIANT="$(DEVICE_ALT5_VARIANT)" \
|
||||||
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
||||||
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
||||||
TARGET="$(BOARD)" \
|
TARGET="$(BOARD)" \
|
||||||
|
@ -719,6 +730,9 @@ define Device/Build/artifact
|
||||||
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
|
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
|
||||||
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
|
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
|
||||||
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
|
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
|
||||||
|
DEVICE_ALT5_VENDOR="$(DEVICE_ALT5_VENDOR)" \
|
||||||
|
DEVICE_ALT5_MODEL="$(DEVICE_ALT5_MODEL)" \
|
||||||
|
DEVICE_ALT5_VARIANT="$(DEVICE_ALT5_VARIANT)" \
|
||||||
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
||||||
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
||||||
TARGET="$(BOARD)" \
|
TARGET="$(BOARD)" \
|
||||||
|
@ -762,6 +776,7 @@ $(if $(strip $(DEVICE_ALT1_TITLE)),- $(DEVICE_ALT1_TITLE))
|
||||||
$(if $(strip $(DEVICE_ALT2_TITLE)),- $(DEVICE_ALT2_TITLE))
|
$(if $(strip $(DEVICE_ALT2_TITLE)),- $(DEVICE_ALT2_TITLE))
|
||||||
$(if $(strip $(DEVICE_ALT3_TITLE)),- $(DEVICE_ALT3_TITLE))
|
$(if $(strip $(DEVICE_ALT3_TITLE)),- $(DEVICE_ALT3_TITLE))
|
||||||
$(if $(strip $(DEVICE_ALT4_TITLE)),- $(DEVICE_ALT4_TITLE))
|
$(if $(strip $(DEVICE_ALT4_TITLE)),- $(DEVICE_ALT4_TITLE))
|
||||||
|
$(if $(strip $(DEVICE_ALT5_TITLE)),- $(DEVICE_ALT5_TITLE))
|
||||||
@@
|
@@
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
@ -787,6 +802,10 @@ ifneq ($$(strip $$(DEVICE_ALT4_TITLE)),)
|
||||||
DEVICE_DISPLAY = $$(DEVICE_ALT4_TITLE) ($$(DEVICE_TITLE))
|
DEVICE_DISPLAY = $$(DEVICE_ALT4_TITLE) ($$(DEVICE_TITLE))
|
||||||
$$(info $$(call Device/DumpInfo,$(1)))
|
$$(info $$(call Device/DumpInfo,$(1)))
|
||||||
endif
|
endif
|
||||||
|
ifneq ($$(strip $$(DEVICE_ALT5_TITLE)),)
|
||||||
|
DEVICE_DISPLAY = $$(DEVICE_ALT5_TITLE) ($$(DEVICE_TITLE))
|
||||||
|
$$(info $$(call Device/DumpInfo,$(1)))
|
||||||
|
endif
|
||||||
DEVICE_DISPLAY = $$(DEVICE_TITLE)
|
DEVICE_DISPLAY = $$(DEVICE_TITLE)
|
||||||
$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1)))))
|
$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1)))))
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
LINUX_VERSION-5.15 = .119
|
LINUX_VERSION-5.15 = .120
|
||||||
LINUX_KERNEL_HASH-5.15.119 = 7aa5a0fd3520947e5599e811d28acdc30e36446c016c7dcee3793e6d1cbecfcf
|
LINUX_KERNEL_HASH-5.15.120 = 6499089eae6b271063cb3e873ab7f4ba0543cfb21dcc9c54d9bcf5357db683f6
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
LINUX_VERSION-6.1 = .35
|
LINUX_VERSION-6.1 = .38
|
||||||
LINUX_KERNEL_HASH-6.1.35 = be368143bc5d0dc73dd3e8c6191630c1620520379baf6f47c16116b2c0bc26ac
|
LINUX_KERNEL_HASH-6.1.38 = f9a4f91b609f7d332a5f2be01ab86336fa00149fae6bdc19f16fa19f78802d43
|
|
@ -78,6 +78,7 @@ define Meson/CreateCrossFile
|
||||||
$(STAGING_DIR_HOST)/bin/sed \
|
$(STAGING_DIR_HOST)/bin/sed \
|
||||||
-e "s|@CC@|$(foreach BIN,$(TARGET_CC),'$(BIN)',)|" \
|
-e "s|@CC@|$(foreach BIN,$(TARGET_CC),'$(BIN)',)|" \
|
||||||
-e "s|@CXX@|$(foreach BIN,$(TARGET_CXX),'$(BIN)',)|" \
|
-e "s|@CXX@|$(foreach BIN,$(TARGET_CXX),'$(BIN)',)|" \
|
||||||
|
-e "s|@LD@|$(foreach FLAG,$(TARGET_LINKER),'$(FLAG)',)|" \
|
||||||
-e "s|@AR@|$(TARGET_AR)|" \
|
-e "s|@AR@|$(TARGET_AR)|" \
|
||||||
-e "s|@STRIP@|$(TARGET_CROSS)strip|" \
|
-e "s|@STRIP@|$(TARGET_CROSS)strip|" \
|
||||||
-e "s|@NM@|$(TARGET_NM)|" \
|
-e "s|@NM@|$(TARGET_NM)|" \
|
||||||
|
|
|
@ -24,7 +24,7 @@ PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PKG_BUILD_FLAGS?=
|
PKG_BUILD_FLAGS?=
|
||||||
__unknown_flags=$(filter-out no-iremap no-mips16 gc-sections no-gc-sections lto no-lto,$(PKG_BUILD_FLAGS))
|
__unknown_flags=$(filter-out no-iremap no-mips16 gc-sections no-gc-sections lto no-lto no-mold,$(PKG_BUILD_FLAGS))
|
||||||
ifneq ($(__unknown_flags),)
|
ifneq ($(__unknown_flags),)
|
||||||
$(error unknown PKG_BUILD_FLAGS: $(__unknown_flags))
|
$(error unknown PKG_BUILD_FLAGS: $(__unknown_flags))
|
||||||
endif
|
endif
|
||||||
|
@ -55,6 +55,11 @@ ifeq ($(call pkg_build_flag,lto,$(if $(CONFIG_USE_LTO),1,0)),1)
|
||||||
TARGET_CXXFLAGS+= -flto=auto -fno-fat-lto-objects
|
TARGET_CXXFLAGS+= -flto=auto -fno-fat-lto-objects
|
||||||
TARGET_LDFLAGS+= -flto=auto -fuse-linker-plugin
|
TARGET_LDFLAGS+= -flto=auto -fuse-linker-plugin
|
||||||
endif
|
endif
|
||||||
|
ifdef CONFIG_USE_MOLD
|
||||||
|
ifeq ($(call pkg_build_flag,mold,1),1)
|
||||||
|
TARGET_LINKER:=mold
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/hardening.mk
|
include $(INCLUDE_DIR)/hardening.mk
|
||||||
include $(INCLUDE_DIR)/prereq.mk
|
include $(INCLUDE_DIR)/prereq.mk
|
||||||
|
|
|
@ -25,7 +25,7 @@ ifneq ($(BUILD_VARIANT),none)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PKG_FLAGS:=nonshared
|
PKG_FLAGS:=nonshared
|
||||||
PKG_BUILD_FLAGS:=no-lto
|
PKG_BUILD_FLAGS:=no-lto no-mold
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/host-build.mk
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
|
@ -25,6 +25,10 @@ araknis,an-300-ap-i-n|\
|
||||||
araknis,an-500-ap-i-ac|\
|
araknis,an-500-ap-i-ac|\
|
||||||
araknis,an-700-ap-i-ac|\
|
araknis,an-700-ap-i-ac|\
|
||||||
arduino,yun|\
|
arduino,yun|\
|
||||||
|
asus,rt-ac59u|\
|
||||||
|
asus,rt-ac59u-v2|\
|
||||||
|
asus,zenwifi-cd6n|\
|
||||||
|
asus,zenwifi-cd6r|\
|
||||||
buffalo,bhr-4grv2|\
|
buffalo,bhr-4grv2|\
|
||||||
devolo,magic-2-wifi|\
|
devolo,magic-2-wifi|\
|
||||||
dlink,dir-859-a1|\
|
dlink,dir-859-a1|\
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
{
|
{
|
||||||
--- a/boot/image-fit.c
|
--- a/boot/image-fit.c
|
||||||
+++ b/boot/image-fit.c
|
+++ b/boot/image-fit.c
|
||||||
@@ -2051,6 +2051,50 @@ static const char *fit_get_image_type_pr
|
@@ -2051,6 +2051,49 @@ static const char *fit_get_image_type_pr
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,9 +89,8 @@
|
||||||
+
|
+
|
||||||
+ hdrsize = fdt_totalsize(fit);
|
+ hdrsize = fdt_totalsize(fit);
|
||||||
+
|
+
|
||||||
+ /* simple FIT with internal images */
|
+ /* take care of simple FIT with internal images */
|
||||||
+ if (hdrsize > 0x1000)
|
+ max_size = hdrsize;
|
||||||
+ return hdrsize;
|
|
||||||
+
|
+
|
||||||
+ images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
|
+ images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
|
||||||
+ if (images_noffset < 0) {
|
+ if (images_noffset < 0) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/version.mk
|
include $(INCLUDE_DIR)/version.mk
|
||||||
|
|
||||||
PKG_NAME:=ipq-wifi
|
PKG_NAME:=ipq-wifi
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
|
||||||
|
@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \
|
||||||
wallys_dr40x9 \
|
wallys_dr40x9 \
|
||||||
xiaomi_ax3600 \
|
xiaomi_ax3600 \
|
||||||
xiaomi_ax9000 \
|
xiaomi_ax9000 \
|
||||||
|
zte_mf289f \
|
||||||
zte_mf287plus \
|
zte_mf287plus \
|
||||||
zyxel_nbg7815
|
zyxel_nbg7815
|
||||||
|
|
||||||
|
@ -127,6 +128,7 @@ $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
|
||||||
$(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
|
$(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
|
||||||
$(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
|
$(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
|
||||||
$(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
|
$(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,zte_mf289f,ZTE MF289F))
|
||||||
$(eval $(call generate-ipq-wifi-package,zte_mf287plus,ZTE MF287Plus))
|
$(eval $(call generate-ipq-wifi-package,zte_mf287plus,ZTE MF287Plus))
|
||||||
$(eval $(call generate-ipq-wifi-package,zyxel_nbg7815,Zyxel NBG7815))
|
$(eval $(call generate-ipq-wifi-package,zyxel_nbg7815,Zyxel NBG7815))
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
From f7d6edafe4358e3880a26775cfde4cd5c71ba063 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Bauer <mail@david-bauer.net>
|
||||||
|
Date: Wed, 5 Jul 2023 01:30:29 +0200
|
||||||
|
Subject: [PATCH] ath10k: always use mac80211 loss detection
|
||||||
|
|
||||||
|
ath10k does not report excessive loss in case of broken block-ack
|
||||||
|
sessions. The loss is communicated to the host-os, but ath10k does not
|
||||||
|
trigger a low-ack events by itself.
|
||||||
|
|
||||||
|
The mac80211 framework for loss detection however detects this
|
||||||
|
circumstance well in case of ath10k. So use it regardless of ath10k's
|
||||||
|
own loss detection mechanism.
|
||||||
|
|
||||||
|
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||||
|
---
|
||||||
|
ath10k-6.2/mac.c | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/ath10k-6.2/mac.c
|
||||||
|
+++ b/ath10k-6.2/mac.c
|
||||||
|
@@ -11306,7 +11306,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||||
|
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||||
|
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||||
|
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||||
|
- ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK);
|
||||||
|
|
||||||
|
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
|
||||||
|
ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL);
|
|
@ -23,6 +23,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||||
PKG_EXTMOD_SUBDIRS:=src
|
PKG_EXTMOD_SUBDIRS:=src
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
|
PKG_BUILD_FLAGS:=no-mold
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ PKG_EXTMOD_SUBDIRS:=src
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
PKG_FLAGS:=nonshared
|
PKG_FLAGS:=nonshared
|
||||||
|
PKG_BUILD_FLAGS:=no-mold
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ PKG_LICENSE:=GPL-2.0 BSD-2-Clause
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
|
PKG_BUILD_FLAGS:=no-mold
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <linux/property.h>
|
#include <linux/property.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#define WS2812B_BYTES_PER_COLOR 3
|
#define WS2812B_BYTES_PER_COLOR 3
|
||||||
#define WS2812B_NUM_COLORS 3
|
#define WS2812B_NUM_COLORS 3
|
||||||
|
@ -191,7 +192,11 @@ ERR_UNREG_LEDS:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0)
|
||||||
|
static void ws2812b_remove(struct spi_device *spi)
|
||||||
|
#else
|
||||||
static int ws2812b_remove(struct spi_device *spi)
|
static int ws2812b_remove(struct spi_device *spi)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct ws2812b_priv *priv = spi_get_drvdata(spi);
|
struct ws2812b_priv *priv = spi_get_drvdata(spi);
|
||||||
int cur_led;
|
int cur_led;
|
||||||
|
@ -201,7 +206,9 @@ static int ws2812b_remove(struct spi_device *spi)
|
||||||
kfree(priv->data_buf);
|
kfree(priv->data_buf);
|
||||||
mutex_destroy(&priv->mutex);
|
mutex_destroy(&priv->mutex);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct spi_device_id ws2812b_spi_ids[] = {
|
static const struct spi_device_id ws2812b_spi_ids[] = {
|
||||||
|
|
|
@ -87,10 +87,14 @@ define KernelPackage/fs-smbfs-common
|
||||||
SUBMENU:=$(FS_MENU)
|
SUBMENU:=$(FS_MENU)
|
||||||
TITLE:=SMBFS common dependencies support
|
TITLE:=SMBFS common dependencies support
|
||||||
HIDDEN:=1
|
HIDDEN:=1
|
||||||
KCONFIG:=CONFIG_SMBFS_COMMON
|
KCONFIG:=\
|
||||||
|
CONFIG_SMBFS_COMMON@lt6.1 \
|
||||||
|
CONFIG_SMBFS@ge6.1
|
||||||
FILES:= \
|
FILES:= \
|
||||||
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko \
|
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@lt6.1 \
|
||||||
$(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko
|
$(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@lt6.1 \
|
||||||
|
$(LINUX_DIR)/fs/smb/common/cifs_arc4.ko@ge6.1 \
|
||||||
|
$(LINUX_DIR)/fs/smb/common/cifs_md4.ko@ge6.1
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/fs-smbfs-common/description
|
define KernelPackage/fs-smbfs-common/description
|
||||||
|
@ -108,7 +112,8 @@ define KernelPackage/fs-cifs
|
||||||
CONFIG_CIFS_DFS_UPCALL=n \
|
CONFIG_CIFS_DFS_UPCALL=n \
|
||||||
CONFIG_CIFS_UPCALL=n
|
CONFIG_CIFS_UPCALL=n
|
||||||
FILES:= \
|
FILES:= \
|
||||||
$(LINUX_DIR)/fs/cifs/cifs.ko
|
$(LINUX_DIR)/fs/cifs/cifs.ko@lt6.1 \
|
||||||
|
$(LINUX_DIR)/fs/smb/client/cifs.ko@ge6.1
|
||||||
AUTOLOAD:=$(call AutoLoad,30,cifs)
|
AUTOLOAD:=$(call AutoLoad,30,cifs)
|
||||||
$(call AddDepends/nls)
|
$(call AddDepends/nls)
|
||||||
DEPENDS+= \
|
DEPENDS+= \
|
||||||
|
@ -373,7 +378,9 @@ define KernelPackage/fs-ksmbd
|
||||||
CONFIG_SMB_SERVER_SMBDIRECT=n \
|
CONFIG_SMB_SERVER_SMBDIRECT=n \
|
||||||
CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=n \
|
CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=n \
|
||||||
CONFIG_SMB_SERVER_KERBEROS5=n
|
CONFIG_SMB_SERVER_KERBEROS5=n
|
||||||
FILES:=$(LINUX_DIR)/fs/ksmbd/ksmbd.ko
|
FILES:= \
|
||||||
|
$(LINUX_DIR)/fs/ksmbd/ksmbd.ko@lt6.1 \
|
||||||
|
$(LINUX_DIR)/fs/smb/server/ksmbd.ko@ge6.1
|
||||||
AUTOLOAD:=$(call AutoLoad,41,ksmbd)
|
AUTOLOAD:=$(call AutoLoad,41,ksmbd)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,21 @@ endef
|
||||||
$(eval $(call KernelPackage,hwmon-it87))
|
$(eval $(call KernelPackage,hwmon-it87))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/hwmon-jc42
|
||||||
|
TITLE:=Jedec JC42.4 compliant temperature sensors support
|
||||||
|
KCONFIG:=CONFIG_SENSORS_JC42
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/hwmon/jc42.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,jc42)
|
||||||
|
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/hwmon-jc42/description
|
||||||
|
Kernel module for Jedec JC42.4 compliant temperature sensors
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,hwmon-jc42))
|
||||||
|
|
||||||
|
|
||||||
define KernelPackage/hwmon-lm63
|
define KernelPackage/hwmon-lm63
|
||||||
TITLE:=LM63/64 monitoring support
|
TITLE:=LM63/64 monitoring support
|
||||||
KCONFIG:=CONFIG_SENSORS_LM63
|
KCONFIG:=CONFIG_SENSORS_LM63
|
||||||
|
@ -369,6 +384,21 @@ endef
|
||||||
$(eval $(call KernelPackage,hwmon-max6642))
|
$(eval $(call KernelPackage,hwmon-max6642))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/hwmon-max6697
|
||||||
|
TITLE:=MAX6697 monitoring support
|
||||||
|
KCONFIG:=CONFIG_SENSORS_MAX6697
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/hwmon/max6697.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,max6697)
|
||||||
|
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/hwmon-max6697/description
|
||||||
|
Kernel module for Maxim MAX6697 temperature monitor
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,hwmon-max6697))
|
||||||
|
|
||||||
|
|
||||||
define KernelPackage/hwmon-mcp3021
|
define KernelPackage/hwmon-mcp3021
|
||||||
TITLE:=MCP3021/3221 monitoring support
|
TITLE:=MCP3021/3221 monitoring support
|
||||||
KCONFIG:=CONFIG_SENSORS_MCP3021
|
KCONFIG:=CONFIG_SENSORS_MCP3021
|
||||||
|
|
|
@ -200,6 +200,22 @@ endef
|
||||||
$(eval $(call KernelPackage,i2c-mux-gpio))
|
$(eval $(call KernelPackage,i2c-mux-gpio))
|
||||||
|
|
||||||
|
|
||||||
|
I2C_MUX_REG_MODULES:= \
|
||||||
|
CONFIG_I2C_MUX_REG:drivers/i2c/muxes/i2c-mux-reg
|
||||||
|
|
||||||
|
define KernelPackage/i2c-mux-reg
|
||||||
|
$(call i2c_defaults,$(I2C_MUX_REG_MODULES),51)
|
||||||
|
TITLE:=Register-based I2C mux/switches
|
||||||
|
DEPENDS:=+kmod-i2c-mux
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/i2c-mux-reg/description
|
||||||
|
Kernel modules for register-based I2C bus mux/switching devices
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,i2c-mux-reg))
|
||||||
|
|
||||||
|
|
||||||
I2C_MUX_PCA9541_MODULES:= \
|
I2C_MUX_PCA9541_MODULES:= \
|
||||||
CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541
|
CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541
|
||||||
|
|
||||||
|
|
|
@ -1434,6 +1434,22 @@ endef
|
||||||
$(eval $(call KernelPackage,inet-diag))
|
$(eval $(call KernelPackage,inet-diag))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/xdp-sockets-diag
|
||||||
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
|
TITLE:=PF_XDP sockets monitoring interface support for ss utility
|
||||||
|
DEPENDS:=@KERNEL_XDP_SOCKETS
|
||||||
|
KCONFIG:=CONFIG_XDP_SOCKETS_DIAG
|
||||||
|
FILES:=$(LINUX_DIR)/net/xdp/xsk_diag.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,31,xsk_diag)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/xdp-sockets-diag/description
|
||||||
|
Support for PF_XDP sockets monitoring interface used by the ss tool
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,xdp-sockets-diag))
|
||||||
|
|
||||||
|
|
||||||
define KernelPackage/wireguard
|
define KernelPackage/wireguard
|
||||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
TITLE:=WireGuard secure network tunnel
|
TITLE:=WireGuard secure network tunnel
|
||||||
|
|
|
@ -10,6 +10,7 @@ VIDEO_MENU:=Video Support
|
||||||
|
|
||||||
V4L2_DIR=v4l2-core
|
V4L2_DIR=v4l2-core
|
||||||
V4L2_USB_DIR=usb
|
V4L2_USB_DIR=usb
|
||||||
|
V4L2_MEM2MEM_DIR=platform
|
||||||
|
|
||||||
#
|
#
|
||||||
# Video Display
|
# Video Display
|
||||||
|
@ -438,6 +439,10 @@ $(AddDepends/video)
|
||||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define AddDepends/framegrabber
|
||||||
|
$(AddDepends/video)
|
||||||
|
KCONFIG+=CONFIG_MEDIA_PCI_SUPPORT=y
|
||||||
|
endef
|
||||||
|
|
||||||
define KernelPackage/video-videobuf2
|
define KernelPackage/video-videobuf2
|
||||||
TITLE:=videobuf2 lib
|
TITLE:=videobuf2 lib
|
||||||
|
@ -1044,3 +1049,96 @@ define KernelPackage/video-gspca-konica/description
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,video-gspca-konica))
|
$(eval $(call KernelPackage,video-gspca-konica))
|
||||||
|
|
||||||
|
#
|
||||||
|
# Video Processing
|
||||||
|
#
|
||||||
|
|
||||||
|
define KernelPackage/video-mem2mem
|
||||||
|
SUBMENU:=$(VIDEO_MENU)
|
||||||
|
TITLE:=Memory 2 Memory device support
|
||||||
|
HIDDEN:=1
|
||||||
|
DEPENDS:=+kmod-video-videobuf2
|
||||||
|
KCONFIG:= CONFIG_V4L_MEM2MEM_DRIVERS=y
|
||||||
|
FILES:= $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-mem2mem.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,66,v4l2-mem2mem)
|
||||||
|
$(call AddDepends/video)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/video-mem2mem/description
|
||||||
|
Memory 2 memory device support
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,video-mem2mem))
|
||||||
|
|
||||||
|
define KernelPackage/video-dma
|
||||||
|
SUBMENU:=$(VIDEO_MENU)
|
||||||
|
TITLE:=Video DMA support
|
||||||
|
HIDDEN:=1
|
||||||
|
DEPENDS:=+kmod-video-videobuf2
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_VIDEOBUF2_DMA_CONTIG \
|
||||||
|
CONFIG_VIDEOBUF2_DMA_SG
|
||||||
|
FILES:= $(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-dma-*.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,66,videobuf2-dma-contig videobuf2-dma-sg)
|
||||||
|
$(call AddDepends/video)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/video-dma/description
|
||||||
|
Video DMA support
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,video-dma))
|
||||||
|
|
||||||
|
define KernelPackage/video-coda
|
||||||
|
TITLE:=i.MX VPU support
|
||||||
|
DEPENDS:=@(TARGET_imx&&!TARGET_imx_cortexa7) +kmod-video-mem2mem +kmod-video-dma
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_VIDEO_CODA \
|
||||||
|
CONFIG_VIDEO_IMX_VDOA
|
||||||
|
FILES:= \
|
||||||
|
$(LINUX_DIR)/drivers/media/$(V4L2_MEM2MEM_DIR)/coda/coda-vpu.ko \
|
||||||
|
$(LINUX_DIR)/drivers/media/$(V4L2_MEM2MEM_DIR)/coda/imx-vdoa.ko \
|
||||||
|
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-jpeg.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,coda-vpu imx-vdoa v4l2-jpeg)
|
||||||
|
$(call AddDepends/video)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/video-coda/description
|
||||||
|
The i.MX Video Processing Unit (VPU) kernel module
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,video-coda))
|
||||||
|
|
||||||
|
define KernelPackage/video-pxp
|
||||||
|
TITLE:=i.MX PXP support
|
||||||
|
DEPENDS:=@TARGET_imx +kmod-video-mem2mem +kmod-video-dma
|
||||||
|
KCONFIG:= CONFIG_VIDEO_IMX_PXP
|
||||||
|
FILES:= $(LINUX_DIR)/drivers/media/$(V4L2_MEM2MEM_DIR)/imx-pxp.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,imx-pxp)
|
||||||
|
$(call AddDepends/video)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/video-pxp/description
|
||||||
|
The i.MX Pixel Pipeline (PXP) kernel module
|
||||||
|
This enables hardware accelerated support for image
|
||||||
|
Colour Conversion, Scaling and Rotation
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,video-pxp))
|
||||||
|
|
||||||
|
define KernelPackage/video-tw686x
|
||||||
|
TITLE:=TW686x support
|
||||||
|
DEPENDS:=@PCIE_SUPPORT +kmod-video-dma +kmod-sound-core
|
||||||
|
KCONFIG:= CONFIG_VIDEO_TW686X
|
||||||
|
FILES:= $(LINUX_DIR)/drivers/media/pci/tw686x/tw686x.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,tw686x)
|
||||||
|
MODPARAMS.tw686x:=dma_mode=contig
|
||||||
|
$(call AddDepends/framegrabber)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/video-tw686x/description
|
||||||
|
The Intersil/Techwell TW686x kernel module
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,video-tw686x))
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
From f7d6edafe4358e3880a26775cfde4cd5c71ba063 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Bauer <mail@david-bauer.net>
|
||||||
|
Date: Wed, 5 Jul 2023 01:30:29 +0200
|
||||||
|
Subject: [PATCH] ath10k: always use mac80211 loss detection
|
||||||
|
|
||||||
|
ath10k does not report excessive loss in case of broken block-ack
|
||||||
|
sessions. The loss is communicated to the host-os, but ath10k does not
|
||||||
|
trigger a low-ack events by itself.
|
||||||
|
|
||||||
|
The mac80211 framework for loss detection however detects this
|
||||||
|
circumstance well in case of ath10k. So use it regardless of ath10k's
|
||||||
|
own loss detection mechanism.
|
||||||
|
|
||||||
|
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||||
|
---
|
||||||
|
drivers/net/wireless/ath/ath10k/mac.c | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||||
|
@@ -10080,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||||
|
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||||
|
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||||
|
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||||
|
- ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK);
|
||||||
|
|
||||||
|
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
|
||||||
|
ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL);
|
|
@ -1,36 +0,0 @@
|
||||||
From cdf461888f900c3a149b10a04d72b4a590ecdec3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Bauer <mail@david-bauer.net>
|
|
||||||
Date: Tue, 16 May 2023 23:11:32 +0200
|
|
||||||
Subject: [PATCH] mac80211: always use mac80211 loss detection
|
|
||||||
|
|
||||||
ath10k does not report excessive loss in case of broken block-ack
|
|
||||||
sessions. The loss is communicated to the host-os, but ath10k does not
|
|
||||||
trigger a low-ack events by itself.
|
|
||||||
|
|
||||||
The mac80211 framework for loss detection however detects this
|
|
||||||
circumstance well in case of ath10k. So use it regardless of ath10k's
|
|
||||||
own loss detection mechanism.
|
|
||||||
|
|
||||||
Patching this in mac80211 does allow this hack to be used with any
|
|
||||||
flavor of ath10k/ath11k.
|
|
||||||
|
|
||||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
||||||
---
|
|
||||||
net/mac80211/status.c | 6 ------
|
|
||||||
1 file changed, 6 deletions(-)
|
|
||||||
|
|
||||||
--- a/net/mac80211/status.c
|
|
||||||
+++ b/net/mac80211/status.c
|
|
||||||
@@ -794,12 +794,6 @@ static void ieee80211_lost_packet(struct
|
|
||||||
unsigned long pkt_time = STA_LOST_PKT_TIME;
|
|
||||||
unsigned int pkt_thr = STA_LOST_PKT_THRESHOLD;
|
|
||||||
|
|
||||||
- /* If driver relies on its own algorithm for station kickout, skip
|
|
||||||
- * mac80211 packet loss mechanism.
|
|
||||||
- */
|
|
||||||
- if (ieee80211_hw_check(&sta->local->hw, REPORTS_LOW_ACK))
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
/* This packet was aggregated but doesn't carry status info */
|
|
||||||
if ((info->flags & IEEE80211_TX_CTL_AMPDU) &&
|
|
||||||
!(info->flags & IEEE80211_TX_STAT_AMPDU))
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=wolfssl
|
PKG_NAME:=wolfssl
|
||||||
PKG_VERSION:=5.5.4-stable
|
PKG_VERSION:=5.6.3-stable
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||||
PKG_HASH:=b7ee150e49def77c765bc02aac92ddeb0bebefd4cb12aa263d8f95e405221fb8
|
PKG_HASH:=2e74a397fa797c2902d7467d500de904907666afb4ff80f6464f6efd5afb114a
|
||||||
|
|
||||||
PKG_FIXUP:=libtool libtool-abiver
|
PKG_FIXUP:=libtool libtool-abiver
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
From 41d248461bd9ad44193a4806ecb5361513e8944e Mon Sep 17 00:00:00 2001
|
||||||
|
From: jordan <jordan@wolfssl.com>
|
||||||
|
Date: Tue, 27 Jun 2023 13:18:25 -0500
|
||||||
|
Subject: [PATCH] fix detection of cut tool in configure.ac
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.ac | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -8723,10 +8723,11 @@ echo "extern \"C\" {" >> $OPTION_FILE
|
||||||
|
echo "#endif" >> $OPTION_FILE
|
||||||
|
echo "" >> $OPTION_FILE
|
||||||
|
|
||||||
|
-# check for supported command to trim option with
|
||||||
|
+# Check for supported command to trim option with.
|
||||||
|
+# note: cut requires an argument to exit with success.
|
||||||
|
if colrm >/dev/null 2>&1 </dev/null; then
|
||||||
|
TRIM="colrm 3"
|
||||||
|
-elif cut >/dev/null 2>&1 </dev/null; then
|
||||||
|
+elif cut --version >/dev/null 2>&1 </dev/null; then
|
||||||
|
TRIM="cut -c1-2"
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Could not find colrm or cut to make options file])
|
|
@ -1,10 +1,10 @@
|
||||||
--- a/wolfssl/wolfcrypt/settings.h
|
--- a/wolfssl/wolfcrypt/settings.h
|
||||||
+++ b/wolfssl/wolfcrypt/settings.h
|
+++ b/wolfssl/wolfcrypt/settings.h
|
||||||
@@ -2496,7 +2496,7 @@ extern void uITRON4_free(void *p) ;
|
@@ -2630,7 +2630,7 @@ extern void uITRON4_free(void *p) ;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* warning for not using harden build options (default with ./configure) */
|
/* warning for not using harden build options (default with ./configure) */
|
||||||
-#ifndef WC_NO_HARDEN
|
/* do not warn if big integer support is disabled */
|
||||||
|
-#if !defined(WC_NO_HARDEN) && !defined(NO_BIG_INT)
|
||||||
+#if 0
|
+#if 0
|
||||||
#if (defined(USE_FAST_MATH) && !defined(TFM_TIMING_RESISTANT)) || \
|
#if (defined(USE_FAST_MATH) && !defined(TFM_TIMING_RESISTANT)) || \
|
||||||
(defined(HAVE_ECC) && !defined(ECC_TIMING_RESISTANT)) || \
|
(defined(HAVE_ECC) && !defined(ECC_TIMING_RESISTANT)) || \
|
||||||
|
|
|
@ -9,9 +9,9 @@ PKG_RELEASE:=1.2
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_DATE:=2023-03-29
|
PKG_SOURCE_DATE:=2023-06-22
|
||||||
PKG_SOURCE_VERSION:=bb945b98fefc64887dffb40773a19d77585cee42
|
PKG_SOURCE_VERSION:=599d00be9de2846c6ea18c1487d8329522ade22b
|
||||||
PKG_MIRROR_HASH:=1da8a39c7c81ce257994874402a86d00080a6145b5eb5c5fc44b2fae1853fe8d
|
PKG_MIRROR_HASH:=828810c558ea181e45ed0c8b940f5c41e55775e2979a15aed8cf0ab17dd7723c
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
|
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -2621,7 +2621,7 @@ static int drv_supports_vht(struct wpa_s
|
@@ -2638,7 +2638,7 @@ static int drv_supports_vht(struct wpa_s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -2630,7 +2630,10 @@ static bool ibss_mesh_is_80mhz_avail(int
|
@@ -2647,7 +2647,10 @@ static bool ibss_mesh_is_80mhz_avail(int
|
||||||
|
|
||||||
chan = hw_get_channel_chan(mode, i, NULL);
|
chan = hw_get_channel_chan(mode, i, NULL);
|
||||||
if (!chan ||
|
if (!chan ||
|
||||||
|
@ -35,7 +35,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2757,7 +2760,7 @@ static void ibss_mesh_select_40mhz(struc
|
@@ -2774,7 +2777,7 @@ static void ibss_mesh_select_40mhz(struc
|
||||||
const struct wpa_ssid *ssid,
|
const struct wpa_ssid *ssid,
|
||||||
struct hostapd_hw_modes *mode,
|
struct hostapd_hw_modes *mode,
|
||||||
struct hostapd_freq_params *freq,
|
struct hostapd_freq_params *freq,
|
||||||
|
@ -44,7 +44,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
int chan_idx;
|
int chan_idx;
|
||||||
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
|
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
|
||||||
int i, res;
|
int i, res;
|
||||||
@@ -2781,8 +2784,11 @@ static void ibss_mesh_select_40mhz(struc
|
@@ -2798,8 +2801,11 @@ static void ibss_mesh_select_40mhz(struc
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Check primary channel flags */
|
/* Check primary channel flags */
|
||||||
|
@ -57,7 +57,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
|
|
||||||
#ifdef CONFIG_HT_OVERRIDES
|
#ifdef CONFIG_HT_OVERRIDES
|
||||||
if (ssid->disable_ht40)
|
if (ssid->disable_ht40)
|
||||||
@@ -2808,8 +2814,11 @@ static void ibss_mesh_select_40mhz(struc
|
@@ -2825,8 +2831,11 @@ static void ibss_mesh_select_40mhz(struc
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Check secondary channel flags */
|
/* Check secondary channel flags */
|
||||||
|
@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
|
|
||||||
if (ht40 == -1) {
|
if (ht40 == -1) {
|
||||||
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
|
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
|
||||||
@@ -2863,7 +2872,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
@@ -2880,7 +2889,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||||
const struct wpa_ssid *ssid,
|
const struct wpa_ssid *ssid,
|
||||||
struct hostapd_hw_modes *mode,
|
struct hostapd_hw_modes *mode,
|
||||||
struct hostapd_freq_params *freq,
|
struct hostapd_freq_params *freq,
|
||||||
|
@ -79,7 +79,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
static const int bw80[] = {
|
static const int bw80[] = {
|
||||||
5180, 5260, 5500, 5580, 5660, 5745, 5825,
|
5180, 5260, 5500, 5580, 5660, 5745, 5825,
|
||||||
5955, 6035, 6115, 6195, 6275, 6355, 6435,
|
5955, 6035, 6115, 6195, 6275, 6355, 6435,
|
||||||
@@ -2908,7 +2917,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
@@ -2925,7 +2934,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||||
goto skip_80mhz;
|
goto skip_80mhz;
|
||||||
|
|
||||||
/* Use 40 MHz if channel not usable */
|
/* Use 40 MHz if channel not usable */
|
||||||
|
@ -88,7 +88,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
goto skip_80mhz;
|
goto skip_80mhz;
|
||||||
|
|
||||||
chwidth = CONF_OPER_CHWIDTH_80MHZ;
|
chwidth = CONF_OPER_CHWIDTH_80MHZ;
|
||||||
@@ -2922,7 +2931,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
@@ -2939,7 +2948,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||||
if ((mode->he_capab[ieee80211_mode].phy_cap[
|
if ((mode->he_capab[ieee80211_mode].phy_cap[
|
||||||
HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
|
HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
|
||||||
HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
|
HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
|
||||||
|
@ -97,7 +97,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
for (j = 0; j < ARRAY_SIZE(bw160); j++) {
|
for (j = 0; j < ARRAY_SIZE(bw160); j++) {
|
||||||
if (freq->freq == bw160[j]) {
|
if (freq->freq == bw160[j]) {
|
||||||
chwidth = CONF_OPER_CHWIDTH_160MHZ;
|
chwidth = CONF_OPER_CHWIDTH_160MHZ;
|
||||||
@@ -2950,10 +2959,12 @@ static bool ibss_mesh_select_80_160mhz(s
|
@@ -2967,10 +2976,12 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||||
if (!chan)
|
if (!chan)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
|
|
||||||
/* Found a suitable second segment for 80+80 */
|
/* Found a suitable second segment for 80+80 */
|
||||||
chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
|
chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
|
||||||
@@ -3008,6 +3019,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
@@ -3025,6 +3036,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||||
int i, obss_scan = 1;
|
int i, obss_scan = 1;
|
||||||
u8 channel;
|
u8 channel;
|
||||||
bool is_6ghz;
|
bool is_6ghz;
|
||||||
|
@ -121,7 +121,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||||
|
|
||||||
freq->freq = ssid->frequency;
|
freq->freq = ssid->frequency;
|
||||||
|
|
||||||
@@ -3053,9 +3065,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
@@ -3070,9 +3082,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||||
freq->channel = channel;
|
freq->channel = channel;
|
||||||
/* Setup higher BW only for 5 GHz */
|
/* Setup higher BW only for 5 GHz */
|
||||||
if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
|
if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||||
if (!chan) {
|
if (!chan) {
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -10739,6 +10739,10 @@ static int nl80211_switch_channel(void *
|
@@ -10977,6 +10977,10 @@ static int nl80211_switch_channel(void *
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/ieee802_11.c
|
--- a/src/ap/ieee802_11.c
|
||||||
+++ b/src/ap/ieee802_11.c
|
+++ b/src/ap/ieee802_11.c
|
||||||
@@ -4168,6 +4168,13 @@ static int add_associated_sta(struct hos
|
@@ -4601,6 +4601,13 @@ static int add_associated_sta(struct hos
|
||||||
* drivers to accept the STA parameter configuration. Since this is
|
* drivers to accept the STA parameter configuration. Since this is
|
||||||
* after a new FT-over-DS exchange, a new TK has been derived, so key
|
* after a new FT-over-DS exchange, a new TK has been derived, so key
|
||||||
* reinstallation is not a concern for this case.
|
* reinstallation is not a concern for this case.
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
|
wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
|
||||||
" (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
|
" (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
|
||||||
@@ -4181,7 +4188,8 @@ static int add_associated_sta(struct hos
|
@@ -4614,7 +4621,8 @@ static int add_associated_sta(struct hos
|
||||||
(!(sta->flags & WLAN_STA_AUTHORIZED) ||
|
(!(sta->flags & WLAN_STA_AUTHORIZED) ||
|
||||||
(reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
|
(reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
|
||||||
(!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
|
(!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
|
||||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -3562,7 +3562,7 @@ static int hostapd_change_config_freq(st
|
@@ -3764,7 +3764,7 @@ static int hostapd_change_config_freq(st
|
||||||
struct hostapd_freq_params *old_params)
|
struct hostapd_freq_params *old_params)
|
||||||
{
|
{
|
||||||
int channel;
|
int channel;
|
||||||
|
|
|
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#include <linux/rtnetlink.h>
|
#include <linux/rtnetlink.h>
|
||||||
#include <netpacket/packet.h>
|
#include <netpacket/packet.h>
|
||||||
#include <linux/errqueue.h>
|
#include <linux/errqueue.h>
|
||||||
@@ -5590,26 +5587,29 @@ fail:
|
@@ -5783,26 +5780,29 @@ fail:
|
||||||
|
|
||||||
static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
|
static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
|
wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
|
||||||
MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
|
MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
|
||||||
@@ -5619,9 +5619,8 @@ static void rtnl_neigh_delete_fdb_entry(
|
@@ -5812,9 +5812,8 @@ static void rtnl_neigh_delete_fdb_entry(
|
||||||
MACSTR, MAC2STR(addr));
|
MACSTR, MAC2STR(addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -8275,7 +8274,6 @@ static void *i802_init(struct hostapd_da
|
@@ -8492,7 +8491,6 @@ static void *i802_init(struct hostapd_da
|
||||||
(params->num_bridge == 0 || !params->bridge[0]))
|
(params->num_bridge == 0 || !params->bridge[0]))
|
||||||
add_ifidx(drv, br_ifindex, drv->ifindex);
|
add_ifidx(drv, br_ifindex, drv->ifindex);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
if (bss->added_if_into_bridge || bss->already_in_bridge) {
|
if (bss->added_if_into_bridge || bss->already_in_bridge) {
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@@ -8292,7 +8290,6 @@ static void *i802_init(struct hostapd_da
|
@@ -8509,7 +8507,6 @@ static void *i802_init(struct hostapd_da
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
|
if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
@@ -11605,13 +11602,14 @@ static int wpa_driver_br_add_ip_neigh(vo
|
@@ -11843,13 +11840,14 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||||
const u8 *ipaddr, int prefixlen,
|
const u8 *ipaddr, int prefixlen,
|
||||||
const u8 *addr)
|
const u8 *addr)
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (!ipaddr || prefixlen == 0 || !addr)
|
if (!ipaddr || prefixlen == 0 || !addr)
|
||||||
@@ -11630,85 +11628,66 @@ static int wpa_driver_br_add_ip_neigh(vo
|
@@ -11868,85 +11866,66 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version == 4) {
|
if (version == 4) {
|
||||||
|
@ -220,7 +220,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
addrsize = 16;
|
addrsize = 16;
|
||||||
} else {
|
} else {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -11726,41 +11705,30 @@ static int wpa_driver_br_delete_ip_neigh
|
@@ -11964,41 +11943,30 @@ static int wpa_driver_br_delete_ip_neigh
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/src/ap/ieee802_11.c
|
--- a/src/ap/ieee802_11.c
|
||||||
+++ b/src/ap/ieee802_11.c
|
+++ b/src/ap/ieee802_11.c
|
||||||
@@ -2948,15 +2948,6 @@ static void handle_auth(struct hostapd_d
|
@@ -3012,15 +3012,6 @@ static void handle_auth(struct hostapd_d
|
||||||
seq_ctrl);
|
seq_ctrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
- sta->plink_state == PLINK_BLOCKED) {
|
- sta->plink_state == PLINK_BLOCKED) {
|
||||||
- wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
|
- wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
|
||||||
- " is blocked - drop Authentication frame",
|
- " is blocked - drop Authentication frame",
|
||||||
- MAC2STR(mgmt->sa));
|
- MAC2STR(sa));
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
-#endif /* CONFIG_MESH */
|
-#endif /* CONFIG_MESH */
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
From c85ce84d942e1eabde33e120b18e5b1f1637b76e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nick Hainke <vincent@systemli.org>
|
|
||||||
Date: Tue, 14 Mar 2023 21:40:53 +0100
|
|
||||||
Subject: [PATCH] wpa_supplicant: fix compiling without IEEE8021X_EAPOL
|
|
||||||
|
|
||||||
If IEEE8021X_EAPOL is not defined wpa_supplicant will not compile with
|
|
||||||
following error:
|
|
||||||
|
|
||||||
events.c: In function 'wpa_supplicant_connect':
|
|
||||||
events.c:1827:14: warning: implicit declaration of function 'eap_is_wps_pbc_enrollee' [-Wimplicit-function-declaration]
|
|
||||||
1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
|
|
||||||
| ^~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
events.c:1827:43: error: 'struct wpa_ssid' has no member named 'eap'
|
|
||||||
1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
|
|
||||||
| ^~
|
|
||||||
|
|
||||||
Adding ifdef statements around the calling function fixes the issue.
|
|
||||||
|
|
||||||
Signed-off-by: Nick Hainke <vincent@systemli.org>
|
|
||||||
---
|
|
||||||
wpa_supplicant/events.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
--- a/wpa_supplicant/events.c
|
|
||||||
+++ b/wpa_supplicant/events.c
|
|
||||||
@@ -1824,6 +1824,7 @@ int wpa_supplicant_connect(struct wpa_su
|
|
||||||
struct wpa_bss *selected,
|
|
||||||
struct wpa_ssid *ssid)
|
|
||||||
{
|
|
||||||
+#ifdef IEEE8021X_EAPOL
|
|
||||||
if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
|
|
||||||
wpas_wps_partner_link_overlap_detect(wpa_s)) ||
|
|
||||||
wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
|
|
||||||
@@ -1846,6 +1847,7 @@ int wpa_supplicant_connect(struct wpa_su
|
|
||||||
#endif /* CONFIG_WPS */
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
+#endif /* IEEE8021X_EAPOL */
|
|
||||||
|
|
||||||
wpa_msg(wpa_s, MSG_DEBUG,
|
|
||||||
"Considering connect request: reassociate: %d selected: "
|
|
|
@ -156,7 +156,7 @@
|
||||||
wpa_cli.exe: wpa_cli
|
wpa_cli.exe: wpa_cli
|
||||||
--- a/src/drivers/driver.h
|
--- a/src/drivers/driver.h
|
||||||
+++ b/src/drivers/driver.h
|
+++ b/src/drivers/driver.h
|
||||||
@@ -6544,8 +6544,8 @@ union wpa_event_data {
|
@@ -6651,8 +6651,8 @@ union wpa_event_data {
|
||||||
* Driver wrapper code should call this function whenever an event is received
|
* Driver wrapper code should call this function whenever an event is received
|
||||||
* from the driver.
|
* from the driver.
|
||||||
*/
|
*/
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
|
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
|
||||||
@@ -6557,7 +6557,7 @@ void wpa_supplicant_event(void *ctx, enu
|
@@ -6664,7 +6664,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||||
* Same as wpa_supplicant_event(), but we search for the interface in
|
* Same as wpa_supplicant_event(), but we search for the interface in
|
||||||
* wpa_global.
|
* wpa_global.
|
||||||
*/
|
*/
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
/*
|
/*
|
||||||
--- a/src/ap/drv_callbacks.c
|
--- a/src/ap/drv_callbacks.c
|
||||||
+++ b/src/ap/drv_callbacks.c
|
+++ b/src/ap/drv_callbacks.c
|
||||||
@@ -1887,8 +1887,8 @@ err:
|
@@ -1994,8 +1994,8 @@ err:
|
||||||
#endif /* CONFIG_OWE */
|
#endif /* CONFIG_OWE */
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
{
|
{
|
||||||
struct hostapd_data *hapd = ctx;
|
struct hostapd_data *hapd = ctx;
|
||||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||||
@@ -2161,7 +2161,7 @@ void wpa_supplicant_event(void *ctx, enu
|
@@ -2271,7 +2271,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
os_memset(&global, 0, sizeof(global));
|
os_memset(&global, 0, sizeof(global));
|
||||||
--- a/wpa_supplicant/events.c
|
--- a/wpa_supplicant/events.c
|
||||||
+++ b/wpa_supplicant/events.c
|
+++ b/wpa_supplicant/events.c
|
||||||
@@ -5237,8 +5237,8 @@ static void wpas_event_unprot_beacon(str
|
@@ -5345,8 +5345,8 @@ static void wpas_link_reconfig(struct wp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@
|
||||||
{
|
{
|
||||||
struct wpa_supplicant *wpa_s = ctx;
|
struct wpa_supplicant *wpa_s = ctx;
|
||||||
int resched;
|
int resched;
|
||||||
@@ -6149,7 +6149,7 @@ void wpa_supplicant_event(void *ctx, enu
|
@@ -6264,7 +6264,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
struct wpa_supplicant *wpa_s;
|
struct wpa_supplicant *wpa_s;
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -7408,7 +7408,6 @@ struct wpa_interface * wpa_supplicant_ma
|
@@ -7435,7 +7435,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@
|
||||||
/**
|
/**
|
||||||
* wpa_supplicant_match_existing - Match existing interfaces
|
* wpa_supplicant_match_existing - Match existing interfaces
|
||||||
* @global: Pointer to global data from wpa_supplicant_init()
|
* @global: Pointer to global data from wpa_supplicant_init()
|
||||||
@@ -7443,6 +7442,11 @@ static int wpa_supplicant_match_existing
|
@@ -7470,6 +7469,11 @@ static int wpa_supplicant_match_existing
|
||||||
|
|
||||||
#endif /* CONFIG_MATCH_IFACE */
|
#endif /* CONFIG_MATCH_IFACE */
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpa_supplicant_add_iface - Add a new network interface
|
* wpa_supplicant_add_iface - Add a new network interface
|
||||||
@@ -7699,6 +7703,8 @@ struct wpa_global * wpa_supplicant_init(
|
@@ -7726,6 +7730,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||||
#ifndef CONFIG_NO_WPA_MSG
|
#ifndef CONFIG_NO_WPA_MSG
|
||||||
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
||||||
#endif /* CONFIG_NO_WPA_MSG */
|
#endif /* CONFIG_NO_WPA_MSG */
|
||||||
|
@ -284,7 +284,7 @@
|
||||||
wpa_debug_open_file(params->wpa_debug_file_path);
|
wpa_debug_open_file(params->wpa_debug_file_path);
|
||||||
--- a/hostapd/main.c
|
--- a/hostapd/main.c
|
||||||
+++ b/hostapd/main.c
|
+++ b/hostapd/main.c
|
||||||
@@ -595,6 +595,11 @@ fail:
|
@@ -685,6 +685,11 @@ fail:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
|
|
||||||
#ifdef CONFIG_WPS
|
#ifdef CONFIG_WPS
|
||||||
static int gen_uuid(const char *txt_addr)
|
static int gen_uuid(const char *txt_addr)
|
||||||
@@ -688,6 +693,8 @@ int main(int argc, char *argv[])
|
@@ -778,6 +783,8 @@ int main(int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
#endif /* CONFIG_DPP */
|
#endif /* CONFIG_DPP */
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
||||||
--- a/src/ap/ap_config.h
|
--- a/src/ap/ap_config.h
|
||||||
+++ b/src/ap/ap_config.h
|
+++ b/src/ap/ap_config.h
|
||||||
@@ -1061,6 +1061,8 @@ struct hostapd_config {
|
@@ -1072,6 +1072,8 @@ struct hostapd_config {
|
||||||
|
|
||||||
int ht_op_mode_fixed;
|
int ht_op_mode_fixed;
|
||||||
u16 ht_capab;
|
u16 ht_capab;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/wpa_supplicant/config.c
|
--- a/wpa_supplicant/config.c
|
||||||
+++ b/wpa_supplicant/config.c
|
+++ b/wpa_supplicant/config.c
|
||||||
@@ -2599,6 +2599,7 @@ static const struct parse_data ssid_fiel
|
@@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel
|
||||||
#else /* CONFIG_MESH */
|
#else /* CONFIG_MESH */
|
||||||
{ INT_RANGE(mode, 0, 4) },
|
{ INT_RANGE(mode, 0, 4) },
|
||||||
#endif /* CONFIG_MESH */
|
#endif /* CONFIG_MESH */
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
/*
|
/*
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -2693,7 +2693,7 @@ static bool ibss_mesh_can_use_vht(struct
|
@@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct
|
||||||
const struct wpa_ssid *ssid,
|
const struct wpa_ssid *ssid,
|
||||||
struct hostapd_hw_modes *mode)
|
struct hostapd_hw_modes *mode)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!drv_supports_vht(wpa_s, ssid))
|
if (!drv_supports_vht(wpa_s, ssid))
|
||||||
@@ -2766,7 +2766,7 @@ static void ibss_mesh_select_40mhz(struc
|
@@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc
|
||||||
int i, res;
|
int i, res;
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
static const int ht40plus[] = {
|
static const int ht40plus[] = {
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
184, 192
|
184, 192
|
||||||
};
|
};
|
||||||
int ht40 = -1;
|
int ht40 = -1;
|
||||||
@@ -3016,7 +3016,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
@@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||||
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
|
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
|
||||||
enum hostapd_hw_mode hw_mode;
|
enum hostapd_hw_mode hw_mode;
|
||||||
struct hostapd_hw_modes *mode = NULL;
|
struct hostapd_hw_modes *mode = NULL;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -5713,7 +5713,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
@@ -5740,7 +5740,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||||
if (wpa_s == NULL)
|
if (wpa_s == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
wpa_s->scan_req = INITIAL_SCAN_REQ;
|
wpa_s->scan_req = INITIAL_SCAN_REQ;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -5224,7 +5224,7 @@ static int nl80211_set_channel(struct i8
|
@@ -5407,7 +5407,7 @@ static int nl80211_set_channel(struct i8
|
||||||
freq->he_enabled, freq->eht_enabled, freq->bandwidth,
|
freq->he_enabled, freq->eht_enabled, freq->bandwidth,
|
||||||
freq->center_freq1, freq->center_freq2);
|
freq->center_freq1, freq->center_freq2);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -142,6 +142,29 @@ static void hostapd_reload_bss(struct ho
|
@@ -143,6 +143,29 @@ static void hostapd_reload_bss(struct ho
|
||||||
#endif /* CONFIG_NO_RADIUS */
|
#endif /* CONFIG_NO_RADIUS */
|
||||||
|
|
||||||
ssid = &hapd->conf->ssid;
|
ssid = &hapd->conf->ssid;
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
|
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
|
||||||
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
|
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
|
||||||
/*
|
/*
|
||||||
@@ -250,6 +273,7 @@ int hostapd_reload_config(struct hostapd
|
@@ -251,6 +274,7 @@ int hostapd_reload_config(struct hostapd
|
||||||
struct hostapd_data *hapd = iface->bss[0];
|
struct hostapd_data *hapd = iface->bss[0];
|
||||||
struct hostapd_config *newconf, *oldconf;
|
struct hostapd_config *newconf, *oldconf;
|
||||||
size_t j;
|
size_t j;
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
if (iface->config_fname == NULL) {
|
if (iface->config_fname == NULL) {
|
||||||
/* Only in-memory config in use - assume it has been updated */
|
/* Only in-memory config in use - assume it has been updated */
|
||||||
@@ -300,6 +324,17 @@ int hostapd_reload_config(struct hostapd
|
@@ -301,6 +325,17 @@ int hostapd_reload_config(struct hostapd
|
||||||
}
|
}
|
||||||
iface->conf = newconf;
|
iface->conf = newconf;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
for (j = 0; j < iface->num_bss; j++) {
|
for (j = 0; j < iface->num_bss; j++) {
|
||||||
hapd = iface->bss[j];
|
hapd = iface->bss[j];
|
||||||
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
|
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
|
||||||
@@ -307,21 +342,6 @@ int hostapd_reload_config(struct hostapd
|
@@ -308,21 +343,6 @@ int hostapd_reload_config(struct hostapd
|
||||||
newconf->bss[j]->config_id) != 0)
|
newconf->bss[j]->config_id) != 0)
|
||||||
hostapd_clear_old_bss(hapd);
|
hostapd_clear_old_bss(hapd);
|
||||||
hapd->iconf = newconf;
|
hapd->iconf = newconf;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -3006,12 +3006,12 @@ static int wpa_driver_nl80211_del_beacon
|
@@ -3008,12 +3008,12 @@ static int wpa_driver_nl80211_del_beacon
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
|
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
if (!msg)
|
if (!msg)
|
||||||
return -ENOBUFS;
|
return -ENOBUFS;
|
||||||
|
|
||||||
@@ -5907,7 +5907,7 @@ static void nl80211_teardown_ap(struct i
|
@@ -6100,7 +6100,7 @@ static void nl80211_teardown_ap(struct i
|
||||||
nl80211_mgmt_unsubscribe(bss, "AP teardown");
|
nl80211_mgmt_unsubscribe(bss, "AP teardown");
|
||||||
|
|
||||||
nl80211_put_wiphy_data_ap(bss);
|
nl80211_put_wiphy_data_ap(bss);
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -8642,8 +8642,6 @@ static int wpa_driver_nl80211_if_remove(
|
@@ -8859,8 +8859,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||||
} else {
|
} else {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
|
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
|
||||||
nl80211_teardown_ap(bss);
|
nl80211_teardown_ap(bss);
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
#ifdef NEED_AP_MLME
|
#ifdef NEED_AP_MLME
|
||||||
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
|
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
|
||||||
@@ -3529,6 +3586,8 @@ static int hostapd_ctrl_iface_receive_pr
|
@@ -3564,6 +3621,8 @@ static int hostapd_ctrl_iface_receive_pr
|
||||||
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
|
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
|
||||||
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
|
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
|
||||||
reply_size);
|
reply_size);
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
#ifdef RADIUS_SERVER
|
#ifdef RADIUS_SERVER
|
||||||
--- a/src/ap/ctrl_iface_ap.c
|
--- a/src/ap/ctrl_iface_ap.c
|
||||||
+++ b/src/ap/ctrl_iface_ap.c
|
+++ b/src/ap/ctrl_iface_ap.c
|
||||||
@@ -1008,7 +1008,13 @@ int hostapd_parse_csa_settings(const cha
|
@@ -1023,7 +1023,13 @@ int hostapd_parse_csa_settings(const cha
|
||||||
|
|
||||||
int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
|
int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -172,7 +172,7 @@
|
||||||
wpa_s->new_connection = 1;
|
wpa_s->new_connection = 1;
|
||||||
wpa_drv_set_operstate(wpa_s, 0);
|
wpa_drv_set_operstate(wpa_s, 0);
|
||||||
#ifndef IEEE8021X_EAPOL
|
#ifndef IEEE8021X_EAPOL
|
||||||
@@ -2520,6 +2572,8 @@ void wpa_supplicant_associate(struct wpa
|
@@ -2537,6 +2589,8 @@ void wpa_supplicant_associate(struct wpa
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wpa_s->current_bss = bss;
|
wpa_s->current_bss = bss;
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
#else /* CONFIG_MESH */
|
#else /* CONFIG_MESH */
|
||||||
wpa_msg(wpa_s, MSG_ERROR,
|
wpa_msg(wpa_s, MSG_ERROR,
|
||||||
"mesh mode support not included in the build");
|
"mesh mode support not included in the build");
|
||||||
@@ -7010,6 +7064,16 @@ static int wpa_supplicant_init_iface(str
|
@@ -7037,6 +7091,16 @@ static int wpa_supplicant_init_iface(str
|
||||||
sizeof(wpa_s->bridge_ifname));
|
sizeof(wpa_s->bridge_ifname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
/* RSNA Supplicant Key Management - INITIALIZE */
|
/* RSNA Supplicant Key Management - INITIALIZE */
|
||||||
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
|
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
|
||||||
eapol_sm_notify_portValid(wpa_s->eapol, false);
|
eapol_sm_notify_portValid(wpa_s->eapol, false);
|
||||||
@@ -7352,6 +7416,11 @@ static void wpa_supplicant_deinit_iface(
|
@@ -7379,6 +7443,11 @@ static void wpa_supplicant_deinit_iface(
|
||||||
if (terminate)
|
if (terminate)
|
||||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
|
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@
|
||||||
|
|
||||||
--- a/hostapd/ctrl_iface.c
|
--- a/hostapd/ctrl_iface.c
|
||||||
+++ b/hostapd/ctrl_iface.c
|
+++ b/hostapd/ctrl_iface.c
|
||||||
@@ -2716,6 +2716,12 @@ static int hostapd_ctrl_iface_chan_switc
|
@@ -2751,6 +2751,12 @@ static int hostapd_ctrl_iface_chan_switc
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
/* Save CHAN_SWITCH VHT, HE, and EHT config */
|
/* Save CHAN_SWITCH VHT, HE, and EHT config */
|
||||||
--- a/src/ap/beacon.c
|
--- a/src/ap/beacon.c
|
||||||
+++ b/src/ap/beacon.c
|
+++ b/src/ap/beacon.c
|
||||||
@@ -2052,11 +2052,6 @@ static int __ieee802_11_set_beacon(struc
|
@@ -2108,11 +2108,6 @@ static int __ieee802_11_set_beacon(struc
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@
|
||||||
if (ieee802_11_build_ap_params(hapd, ¶ms) < 0)
|
if (ieee802_11_build_ap_params(hapd, ¶ms) < 0)
|
||||||
--- a/wpa_supplicant/events.c
|
--- a/wpa_supplicant/events.c
|
||||||
+++ b/wpa_supplicant/events.c
|
+++ b/wpa_supplicant/events.c
|
||||||
@@ -5237,6 +5237,60 @@ static void wpas_event_unprot_beacon(str
|
@@ -5345,6 +5345,60 @@ static void wpas_link_reconfig(struct wp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@
|
||||||
void supplicant_event(void *ctx, enum wpa_event_type event,
|
void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||||
union wpa_event_data *data)
|
union wpa_event_data *data)
|
||||||
{
|
{
|
||||||
@@ -5586,8 +5640,10 @@ void supplicant_event(void *ctx, enum wp
|
@@ -5697,8 +5751,10 @@ void supplicant_event(void *ctx, enum wp
|
||||||
channel_width_to_string(data->ch_switch.ch_width),
|
channel_width_to_string(data->ch_switch.ch_width),
|
||||||
data->ch_switch.cf1,
|
data->ch_switch.cf1,
|
||||||
data->ch_switch.cf2);
|
data->ch_switch.cf2);
|
||||||
|
@ -339,7 +339,7 @@
|
||||||
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
||||||
--- a/src/drivers/driver.h
|
--- a/src/drivers/driver.h
|
||||||
+++ b/src/drivers/driver.h
|
+++ b/src/drivers/driver.h
|
||||||
@@ -6324,6 +6324,7 @@ union wpa_event_data {
|
@@ -6421,6 +6421,7 @@ union wpa_event_data {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct ch_switch
|
* struct ch_switch
|
||||||
|
@ -347,7 +347,7 @@
|
||||||
* @freq: Frequency of new channel in MHz
|
* @freq: Frequency of new channel in MHz
|
||||||
* @ht_enabled: Whether this is an HT channel
|
* @ht_enabled: Whether this is an HT channel
|
||||||
* @ch_offset: Secondary channel offset
|
* @ch_offset: Secondary channel offset
|
||||||
@@ -6334,6 +6335,7 @@ union wpa_event_data {
|
@@ -6431,6 +6432,7 @@ union wpa_event_data {
|
||||||
* @punct_bitmap: Puncturing bitmap
|
* @punct_bitmap: Puncturing bitmap
|
||||||
*/
|
*/
|
||||||
struct ch_switch {
|
struct ch_switch {
|
||||||
|
@ -357,7 +357,7 @@
|
||||||
int ch_offset;
|
int ch_offset;
|
||||||
--- a/src/drivers/driver_nl80211_event.c
|
--- a/src/drivers/driver_nl80211_event.c
|
||||||
+++ b/src/drivers/driver_nl80211_event.c
|
+++ b/src/drivers/driver_nl80211_event.c
|
||||||
@@ -997,6 +997,7 @@ static void mlme_event_ch_switch(struct
|
@@ -1202,6 +1202,7 @@ static void mlme_event_ch_switch(struct
|
||||||
struct nlattr *bw, struct nlattr *cf1,
|
struct nlattr *bw, struct nlattr *cf1,
|
||||||
struct nlattr *cf2,
|
struct nlattr *cf2,
|
||||||
struct nlattr *punct_bitmap,
|
struct nlattr *punct_bitmap,
|
||||||
|
@ -365,7 +365,7 @@
|
||||||
int finished)
|
int finished)
|
||||||
{
|
{
|
||||||
struct i802_bss *bss;
|
struct i802_bss *bss;
|
||||||
@@ -1060,6 +1061,8 @@ static void mlme_event_ch_switch(struct
|
@@ -1265,6 +1266,8 @@ static void mlme_event_ch_switch(struct
|
||||||
data.ch_switch.cf1 = nla_get_u32(cf1);
|
data.ch_switch.cf1 = nla_get_u32(cf1);
|
||||||
if (cf2)
|
if (cf2)
|
||||||
data.ch_switch.cf2 = nla_get_u32(cf2);
|
data.ch_switch.cf2 = nla_get_u32(cf2);
|
||||||
|
@ -374,7 +374,7 @@
|
||||||
|
|
||||||
if (finished)
|
if (finished)
|
||||||
bss->flink->freq = data.ch_switch.freq;
|
bss->flink->freq = data.ch_switch.freq;
|
||||||
@@ -3604,6 +3607,7 @@ static void do_process_drv_event(struct
|
@@ -3848,6 +3851,7 @@ static void do_process_drv_event(struct
|
||||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||||
tb[NL80211_ATTR_PUNCT_BITMAP],
|
tb[NL80211_ATTR_PUNCT_BITMAP],
|
||||||
|
@ -382,7 +382,7 @@
|
||||||
0);
|
0);
|
||||||
break;
|
break;
|
||||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||||
@@ -3616,6 +3620,7 @@ static void do_process_drv_event(struct
|
@@ -3860,6 +3864,7 @@ static void do_process_drv_event(struct
|
||||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||||
tb[NL80211_ATTR_PUNCT_BITMAP],
|
tb[NL80211_ATTR_PUNCT_BITMAP],
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
else
|
else
|
||||||
--- a/hostapd/ctrl_iface.c
|
--- a/hostapd/ctrl_iface.c
|
||||||
+++ b/hostapd/ctrl_iface.c
|
+++ b/hostapd/ctrl_iface.c
|
||||||
@@ -3342,6 +3342,7 @@ static int hostapd_ctrl_iface_receive_pr
|
@@ -3377,6 +3377,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||||
reply_size);
|
reply_size);
|
||||||
} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
|
} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
|
||||||
reply_len = hostapd_drv_status(hapd, reply, reply_size);
|
reply_len = hostapd_drv_status(hapd, reply, reply_size);
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||||
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
|
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
|
||||||
if (reply_len >= 0) {
|
if (reply_len >= 0) {
|
||||||
@@ -3383,6 +3384,7 @@ static int hostapd_ctrl_iface_receive_pr
|
@@ -3418,6 +3419,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||||
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
|
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
|
||||||
reply_size);
|
reply_size);
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
if (os_snprintf_error(buflen - len, ret))
|
if (os_snprintf_error(buflen - len, ret))
|
||||||
--- a/src/ap/ieee802_1x.c
|
--- a/src/ap/ieee802_1x.c
|
||||||
+++ b/src/ap/ieee802_1x.c
|
+++ b/src/ap/ieee802_1x.c
|
||||||
@@ -2753,6 +2753,7 @@ static const char * bool_txt(bool val)
|
@@ -2834,6 +2834,7 @@ static const char * bool_txt(bool val)
|
||||||
return val ? "TRUE" : "FALSE";
|
return val ? "TRUE" : "FALSE";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@
|
||||||
|
|
||||||
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
|
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
@@ -2939,6 +2940,7 @@ int ieee802_1x_get_mib_sta(struct hostap
|
@@ -3020,6 +3021,7 @@ int ieee802_1x_get_mib_sta(struct hostap
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
|
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
|
||||||
--- a/src/ap/wpa_auth.c
|
--- a/src/ap/wpa_auth.c
|
||||||
+++ b/src/ap/wpa_auth.c
|
+++ b/src/ap/wpa_auth.c
|
||||||
@@ -4786,6 +4786,7 @@ static const char * wpa_bool_txt(int val
|
@@ -5328,6 +5328,7 @@ static const char * wpa_bool_txt(int val
|
||||||
return val ? "TRUE" : "FALSE";
|
return val ? "TRUE" : "FALSE";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
|
|
||||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||||
#define RSN_SUITE_ARG(s) \
|
#define RSN_SUITE_ARG(s) \
|
||||||
@@ -4938,7 +4939,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
@@ -5480,7 +5481,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
struct hapd_global {
|
struct hapd_global {
|
||||||
void **drv_priv;
|
void **drv_priv;
|
||||||
@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
|
@@ -786,7 +786,7 @@ int main(int argc, char *argv[])
|
||||||
wpa_supplicant_event = hostapd_wpa_event;
|
wpa_supplicant_event = hostapd_wpa_event;
|
||||||
wpa_supplicant_event_global = hostapd_wpa_event_global;
|
wpa_supplicant_event_global = hostapd_wpa_event_global;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
break;
|
break;
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@@ -733,6 +733,8 @@ int main(int argc, char *argv[])
|
@@ -823,6 +823,8 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_DEBUG_LINUX_TRACING */
|
#endif /* CONFIG_DEBUG_LINUX_TRACING */
|
||||||
case 'v':
|
case 'v':
|
||||||
|
|
|
@ -24,16 +24,16 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hostapd_driver_init - Preparate driver interface
|
* hostapd_driver_init - Preparate driver interface
|
||||||
@@ -164,6 +174,8 @@ static int hostapd_driver_init(struct ho
|
@@ -217,6 +227,8 @@ static int hostapd_driver_init(struct ho
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
|
|
||||||
+ hapd->setup_complete_cb = hostapd_setup_complete_cb;
|
+ hapd->setup_complete_cb = hostapd_setup_complete_cb;
|
||||||
+
|
+
|
||||||
/* Initialize the driver interface */
|
/* Initialize the driver interface */
|
||||||
if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
|
if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
|
||||||
b = NULL;
|
b = NULL;
|
||||||
@@ -407,8 +419,6 @@ static void hostapd_global_deinit(const
|
@@ -497,8 +509,6 @@ static void hostapd_global_deinit(const
|
||||||
#endif /* CONFIG_NATIVE_WINDOWS */
|
#endif /* CONFIG_NATIVE_WINDOWS */
|
||||||
|
|
||||||
eap_server_unregister_methods();
|
eap_server_unregister_methods();
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -434,18 +444,6 @@ static int hostapd_global_run(struct hap
|
@@ -524,18 +534,6 @@ static int hostapd_global_run(struct hap
|
||||||
}
|
}
|
||||||
#endif /* EAP_SERVER_TNC */
|
#endif /* EAP_SERVER_TNC */
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
eloop_run();
|
eloop_run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -649,8 +647,7 @@ int main(int argc, char *argv[])
|
@@ -739,8 +737,7 @@ int main(int argc, char *argv[])
|
||||||
struct hapd_interfaces interfaces;
|
struct hapd_interfaces interfaces;
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
|
|
|
@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||||
#include "common/defs.h"
|
#include "common/defs.h"
|
||||||
#include "common/ieee802_11_defs.h"
|
#include "common/ieee802_11_defs.h"
|
||||||
#include "common/wpa_common.h"
|
#include "common/wpa_common.h"
|
||||||
@@ -936,6 +937,9 @@ struct wpa_driver_associate_params {
|
@@ -953,6 +954,9 @@ struct wpa_driver_associate_params {
|
||||||
* responsible for selecting with which BSS to associate. */
|
* responsible for selecting with which BSS to associate. */
|
||||||
const u8 *bssid;
|
const u8 *bssid;
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||||
/* Helper macros for network block parser */
|
/* Helper macros for network block parser */
|
||||||
|
|
||||||
#ifdef OFFSET
|
#ifdef OFFSET
|
||||||
@@ -2673,6 +2765,8 @@ static const struct parse_data ssid_fiel
|
@@ -2674,6 +2766,8 @@ static const struct parse_data ssid_fiel
|
||||||
{ INT(ap_max_inactivity) },
|
{ INT(ap_max_inactivity) },
|
||||||
{ INT(dtim_period) },
|
{ INT(dtim_period) },
|
||||||
{ INT(beacon_int) },
|
{ INT(beacon_int) },
|
||||||
|
@ -174,7 +174,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||||
* macsec_policy - Determines the policy for MACsec secure session
|
* macsec_policy - Determines the policy for MACsec secure session
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -4177,6 +4177,12 @@ static void wpas_start_assoc_cb(struct w
|
@@ -4203,6 +4203,12 @@ static void wpas_start_assoc_cb(struct w
|
||||||
params.beacon_int = ssid->beacon_int;
|
params.beacon_int = ssid->beacon_int;
|
||||||
else
|
else
|
||||||
params.beacon_int = wpa_s->conf->beacon_int;
|
params.beacon_int = wpa_s->conf->beacon_int;
|
||||||
|
|
|
@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||||
|
|
||||||
--- a/src/drivers/driver.h
|
--- a/src/drivers/driver.h
|
||||||
+++ b/src/drivers/driver.h
|
+++ b/src/drivers/driver.h
|
||||||
@@ -1768,6 +1768,7 @@ struct wpa_driver_mesh_join_params {
|
@@ -1827,6 +1827,7 @@ struct wpa_driver_mesh_join_params {
|
||||||
#define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
|
#define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
bool handle_dfs;
|
bool handle_dfs;
|
||||||
|
@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||||
struct wpa_driver_set_key_params {
|
struct wpa_driver_set_key_params {
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -11388,6 +11388,18 @@ static int nl80211_put_mesh_id(struct nl
|
@@ -11626,6 +11626,18 @@ static int nl80211_put_mesh_id(struct nl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||||
static int nl80211_put_mesh_config(struct nl_msg *msg,
|
static int nl80211_put_mesh_config(struct nl_msg *msg,
|
||||||
struct wpa_driver_mesh_bss_params *params)
|
struct wpa_driver_mesh_bss_params *params)
|
||||||
{
|
{
|
||||||
@@ -11449,6 +11461,7 @@ static int nl80211_join_mesh(struct i802
|
@@ -11687,6 +11699,7 @@ static int nl80211_join_mesh(struct i802
|
||||||
nl80211_put_basic_rates(msg, params->basic_rates) ||
|
nl80211_put_basic_rates(msg, params->basic_rates) ||
|
||||||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
|
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
|
||||||
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -3077,6 +3077,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
@@ -3094,6 +3094,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||||
|
|
||||||
freq->freq = ssid->frequency;
|
freq->freq = ssid->frequency;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/hostapd.h
|
--- a/src/ap/hostapd.h
|
||||||
+++ b/src/ap/hostapd.h
|
+++ b/src/ap/hostapd.h
|
||||||
@@ -162,6 +162,21 @@ struct hostapd_sae_commit_queue {
|
@@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,9 +22,9 @@
|
||||||
* struct hostapd_data - hostapd per-BSS data structure
|
* struct hostapd_data - hostapd per-BSS data structure
|
||||||
*/
|
*/
|
||||||
struct hostapd_data {
|
struct hostapd_data {
|
||||||
@@ -175,6 +190,9 @@ struct hostapd_data {
|
@@ -182,6 +197,9 @@ struct hostapd_data {
|
||||||
|
|
||||||
u8 own_addr[ETH_ALEN];
|
struct hostapd_data *mld_first_bss;
|
||||||
|
|
||||||
+ /* OpenWrt specific statistics */
|
+ /* OpenWrt specific statistics */
|
||||||
+ struct hostapd_openwrt_stats openwrt_stats;
|
+ struct hostapd_openwrt_stats openwrt_stats;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
enum hostapd_chan_status {
|
enum hostapd_chan_status {
|
||||||
@@ -183,6 +184,7 @@ struct hostapd_data {
|
@@ -184,6 +185,7 @@ struct hostapd_data {
|
||||||
struct hostapd_iface *iface;
|
struct hostapd_iface *iface;
|
||||||
struct hostapd_config *iconf;
|
struct hostapd_config *iconf;
|
||||||
struct hostapd_bss_config *conf;
|
struct hostapd_bss_config *conf;
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
int interface_added; /* virtual interface added for this BSS */
|
int interface_added; /* virtual interface added for this BSS */
|
||||||
unsigned int started:1;
|
unsigned int started:1;
|
||||||
unsigned int disabled:1;
|
unsigned int disabled:1;
|
||||||
@@ -682,6 +684,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
@@ -695,6 +697,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||||
struct hostapd_bss_config *bss);
|
struct hostapd_bss_config *bss);
|
||||||
int hostapd_setup_interface(struct hostapd_iface *iface);
|
int hostapd_setup_interface(struct hostapd_iface *iface);
|
||||||
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
|
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
struct hostapd_iface * hostapd_alloc_iface(void);
|
struct hostapd_iface * hostapd_alloc_iface(void);
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -435,6 +435,7 @@ void hostapd_free_hapd_data(struct hosta
|
@@ -455,6 +455,7 @@ void hostapd_free_hapd_data(struct hosta
|
||||||
hapd->beacon_set_done = 0;
|
hapd->beacon_set_done = 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
accounting_deinit(hapd);
|
accounting_deinit(hapd);
|
||||||
hostapd_deinit_wpa(hapd);
|
hostapd_deinit_wpa(hapd);
|
||||||
vlan_deinit(hapd);
|
vlan_deinit(hapd);
|
||||||
@@ -1185,6 +1186,8 @@ static int hostapd_start_beacon(struct h
|
@@ -1207,6 +1208,8 @@ static int hostapd_start_beacon(struct h
|
||||||
if (hapd->driver && hapd->driver->set_operstate)
|
if (hapd->driver && hapd->driver->set_operstate)
|
||||||
hapd->driver->set_operstate(hapd->drv_priv, 1);
|
hapd->driver->set_operstate(hapd->drv_priv, 1);
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2126,6 +2129,7 @@ static int hostapd_setup_interface_compl
|
@@ -2295,6 +2298,7 @@ static int hostapd_setup_interface_compl
|
||||||
if (err)
|
if (err)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@ -74,15 +74,15 @@
|
||||||
wpa_printf(MSG_DEBUG, "Completing interface initialization");
|
wpa_printf(MSG_DEBUG, "Completing interface initialization");
|
||||||
if (iface->freq) {
|
if (iface->freq) {
|
||||||
#ifdef NEED_AP_MLME
|
#ifdef NEED_AP_MLME
|
||||||
@@ -2342,6 +2346,7 @@ dfs_offload:
|
@@ -2514,6 +2518,7 @@ dfs_offload:
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
wpa_printf(MSG_ERROR, "Interface initialization failed");
|
wpa_printf(MSG_ERROR, "Interface initialization failed");
|
||||||
+ hostapd_ubus_free_iface(iface);
|
+ hostapd_ubus_free_iface(iface);
|
||||||
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
|
|
||||||
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
|
if (iface->is_no_ir) {
|
||||||
#ifdef CONFIG_FST
|
hostapd_set_state(iface, HAPD_IFACE_NO_IR);
|
||||||
@@ -2817,6 +2822,7 @@ void hostapd_interface_deinit_free(struc
|
@@ -3004,6 +3009,7 @@ void hostapd_interface_deinit_free(struc
|
||||||
(unsigned int) iface->conf->num_bss);
|
(unsigned int) iface->conf->num_bss);
|
||||||
driver = iface->bss[0]->driver;
|
driver = iface->bss[0]->driver;
|
||||||
drv_priv = iface->bss[0]->drv_priv;
|
drv_priv = iface->bss[0]->drv_priv;
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
__func__, driver, drv_priv);
|
__func__, driver, drv_priv);
|
||||||
--- a/src/ap/ieee802_11.c
|
--- a/src/ap/ieee802_11.c
|
||||||
+++ b/src/ap/ieee802_11.c
|
+++ b/src/ap/ieee802_11.c
|
||||||
@@ -2740,13 +2740,18 @@ static void handle_auth(struct hostapd_d
|
@@ -2778,7 +2778,7 @@ static void handle_auth(struct hostapd_d
|
||||||
u16 auth_alg, auth_transaction, status_code;
|
u16 auth_alg, auth_transaction, status_code;
|
||||||
u16 resp = WLAN_STATUS_SUCCESS;
|
u16 resp = WLAN_STATUS_SUCCESS;
|
||||||
struct sta_info *sta = NULL;
|
struct sta_info *sta = NULL;
|
||||||
|
@ -101,9 +101,10 @@
|
||||||
u16 fc;
|
u16 fc;
|
||||||
const u8 *challenge = NULL;
|
const u8 *challenge = NULL;
|
||||||
u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
|
u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
|
||||||
size_t resp_ies_len = 0;
|
@@ -2787,6 +2787,11 @@ static void handle_auth(struct hostapd_d
|
||||||
u16 seq_ctrl;
|
|
||||||
struct radius_sta rad_info;
|
struct radius_sta rad_info;
|
||||||
|
const u8 *dst, *sa, *bssid;
|
||||||
|
bool mld_sta = false;
|
||||||
+ struct hostapd_ubus_request req = {
|
+ struct hostapd_ubus_request req = {
|
||||||
+ .type = HOSTAPD_UBUS_AUTH_REQ,
|
+ .type = HOSTAPD_UBUS_AUTH_REQ,
|
||||||
+ .mgmt_frame = mgmt,
|
+ .mgmt_frame = mgmt,
|
||||||
|
@ -112,7 +113,7 @@
|
||||||
|
|
||||||
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
|
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
|
||||||
wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
|
wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
|
||||||
@@ -2914,6 +2919,13 @@ static void handle_auth(struct hostapd_d
|
@@ -2978,6 +2983,13 @@ static void handle_auth(struct hostapd_d
|
||||||
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +127,7 @@
|
||||||
if (res == HOSTAPD_ACL_PENDING)
|
if (res == HOSTAPD_ACL_PENDING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -4695,7 +4707,7 @@ static void handle_assoc(struct hostapd_
|
@@ -5141,7 +5153,7 @@ static void handle_assoc(struct hostapd_
|
||||||
int resp = WLAN_STATUS_SUCCESS;
|
int resp = WLAN_STATUS_SUCCESS;
|
||||||
u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||||
const u8 *pos;
|
const u8 *pos;
|
||||||
|
@ -135,7 +136,7 @@
|
||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
u8 *tmp = NULL;
|
u8 *tmp = NULL;
|
||||||
#ifdef CONFIG_FILS
|
#ifdef CONFIG_FILS
|
||||||
@@ -4908,6 +4920,11 @@ static void handle_assoc(struct hostapd_
|
@@ -5354,6 +5366,11 @@ static void handle_assoc(struct hostapd_
|
||||||
left = res;
|
left = res;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_FILS */
|
#endif /* CONFIG_FILS */
|
||||||
|
@ -147,7 +148,7 @@
|
||||||
|
|
||||||
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
|
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
|
||||||
* is used */
|
* is used */
|
||||||
@@ -5006,6 +5023,13 @@ static void handle_assoc(struct hostapd_
|
@@ -5452,6 +5469,13 @@ static void handle_assoc(struct hostapd_
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_FILS */
|
#endif /* CONFIG_FILS */
|
||||||
|
|
||||||
|
@ -161,26 +162,26 @@
|
||||||
fail:
|
fail:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -5099,6 +5123,7 @@ static void handle_disassoc(struct hosta
|
@@ -5733,6 +5757,7 @@ static void handle_disassoc(struct hosta
|
||||||
wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d",
|
(unsigned long) len);
|
||||||
MAC2STR(mgmt->sa),
|
return;
|
||||||
le_to_host16(mgmt->u.disassoc.reason_code));
|
}
|
||||||
+ hostapd_ubus_notify(hapd, "disassoc", mgmt->sa);
|
+ hostapd_ubus_notify(hapd, "disassoc", mgmt->sa);
|
||||||
|
|
||||||
sta = ap_get_sta(hapd, mgmt->sa);
|
sta = ap_get_sta(hapd, mgmt->sa);
|
||||||
if (sta == NULL) {
|
if (!sta) {
|
||||||
@@ -5168,6 +5193,8 @@ static void handle_deauth(struct hostapd
|
@@ -5764,6 +5789,8 @@ static void handle_deauth(struct hostapd
|
||||||
/* Clear the PTKSA cache entries for PASN */
|
/* Clear the PTKSA cache entries for PASN */
|
||||||
ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
|
ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
|
||||||
|
|
||||||
+ hostapd_ubus_notify(hapd, "deauth", mgmt->sa);
|
+ hostapd_ubus_notify(hapd, "deauth", mgmt->sa);
|
||||||
+
|
+
|
||||||
sta = ap_get_sta(hapd, mgmt->sa);
|
sta = ap_get_sta(hapd, mgmt->sa);
|
||||||
if (sta == NULL) {
|
if (!sta) {
|
||||||
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
|
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR
|
||||||
--- a/src/ap/beacon.c
|
--- a/src/ap/beacon.c
|
||||||
+++ b/src/ap/beacon.c
|
+++ b/src/ap/beacon.c
|
||||||
@@ -1006,6 +1006,12 @@ void handle_probe_req(struct hostapd_dat
|
@@ -1036,6 +1036,12 @@ void handle_probe_req(struct hostapd_dat
|
||||||
u16 csa_offs[2];
|
u16 csa_offs[2];
|
||||||
size_t csa_offs_len;
|
size_t csa_offs_len;
|
||||||
struct radius_sta rad_info;
|
struct radius_sta rad_info;
|
||||||
|
@ -193,7 +194,7 @@
|
||||||
|
|
||||||
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
|
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
|
||||||
ssi_signal < hapd->iconf->rssi_ignore_probe_request)
|
ssi_signal < hapd->iconf->rssi_ignore_probe_request)
|
||||||
@@ -1192,6 +1198,12 @@ void handle_probe_req(struct hostapd_dat
|
@@ -1222,6 +1228,12 @@ void handle_probe_req(struct hostapd_dat
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
@ -234,7 +235,7 @@
|
||||||
wpabuf_free(sta->p2p_ie);
|
wpabuf_free(sta->p2p_ie);
|
||||||
--- a/src/ap/sta_info.c
|
--- a/src/ap/sta_info.c
|
||||||
+++ b/src/ap/sta_info.c
|
+++ b/src/ap/sta_info.c
|
||||||
@@ -460,6 +460,7 @@ void ap_handle_timer(void *eloop_ctx, vo
|
@@ -471,6 +471,7 @@ void ap_handle_timer(void *eloop_ctx, vo
|
||||||
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
|
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
|
||||||
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
|
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
|
||||||
"local deauth request");
|
"local deauth request");
|
||||||
|
@ -242,7 +243,7 @@
|
||||||
ap_free_sta(hapd, sta);
|
ap_free_sta(hapd, sta);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -615,6 +616,7 @@ skip_poll:
|
@@ -626,6 +627,7 @@ skip_poll:
|
||||||
mlme_deauthenticate_indication(
|
mlme_deauthenticate_indication(
|
||||||
hapd, sta,
|
hapd, sta,
|
||||||
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||||
|
@ -250,7 +251,7 @@
|
||||||
ap_free_sta(hapd, sta);
|
ap_free_sta(hapd, sta);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1305,15 +1307,28 @@ void ap_sta_set_authorized(struct hostap
|
@@ -1344,15 +1346,28 @@ void ap_sta_set_authorized(struct hostap
|
||||||
sta->addr, authorized, dev_addr);
|
sta->addr, authorized, dev_addr);
|
||||||
|
|
||||||
if (authorized) {
|
if (authorized) {
|
||||||
|
@ -279,7 +280,7 @@
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
|
if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
|
||||||
os_snprintf(ip_addr, sizeof(ip_addr),
|
os_snprintf(ip_addr, sizeof(ip_addr),
|
||||||
@@ -1323,6 +1338,13 @@ void ap_sta_set_authorized(struct hostap
|
@@ -1362,6 +1377,13 @@ void ap_sta_set_authorized(struct hostap
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
@ -293,7 +294,7 @@
|
||||||
keyid = ap_sta_wpa_get_keyid(hapd, sta);
|
keyid = ap_sta_wpa_get_keyid(hapd, sta);
|
||||||
if (keyid) {
|
if (keyid) {
|
||||||
os_snprintf(keyid_buf, sizeof(keyid_buf),
|
os_snprintf(keyid_buf, sizeof(keyid_buf),
|
||||||
@@ -1341,17 +1363,19 @@ void ap_sta_set_authorized(struct hostap
|
@@ -1380,17 +1402,19 @@ void ap_sta_set_authorized(struct hostap
|
||||||
dpp_pkhash, SHA256_MAC_LEN);
|
dpp_pkhash, SHA256_MAC_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,7 +355,7 @@
|
||||||
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
|
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -7608,6 +7608,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
@@ -7635,6 +7635,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
@ -363,7 +364,7 @@
|
||||||
return wpa_s;
|
return wpa_s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7634,6 +7636,8 @@ int wpa_supplicant_remove_iface(struct w
|
@@ -7661,6 +7663,8 @@ int wpa_supplicant_remove_iface(struct w
|
||||||
struct wpa_supplicant *parent = wpa_s->parent;
|
struct wpa_supplicant *parent = wpa_s->parent;
|
||||||
#endif /* CONFIG_MESH */
|
#endif /* CONFIG_MESH */
|
||||||
|
|
||||||
|
@ -372,7 +373,7 @@
|
||||||
/* Remove interface from the global list of interfaces */
|
/* Remove interface from the global list of interfaces */
|
||||||
prev = global->ifaces;
|
prev = global->ifaces;
|
||||||
if (prev == wpa_s) {
|
if (prev == wpa_s) {
|
||||||
@@ -7980,8 +7984,12 @@ int wpa_supplicant_run(struct wpa_global
|
@@ -8007,8 +8011,12 @@ int wpa_supplicant_run(struct wpa_global
|
||||||
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
|
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
|
||||||
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
|
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
|
||||||
|
|
||||||
|
@ -433,7 +434,7 @@
|
||||||
|
|
||||||
--- a/hostapd/main.c
|
--- a/hostapd/main.c
|
||||||
+++ b/hostapd/main.c
|
+++ b/hostapd/main.c
|
||||||
@@ -901,6 +901,7 @@ int main(int argc, char *argv[])
|
@@ -991,6 +991,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
hostapd_global_ctrl_iface_init(&interfaces);
|
hostapd_global_ctrl_iface_init(&interfaces);
|
||||||
|
@ -441,7 +442,7 @@
|
||||||
|
|
||||||
if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
|
if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
|
||||||
wpa_printf(MSG_ERROR, "Failed to start eloop");
|
wpa_printf(MSG_ERROR, "Failed to start eloop");
|
||||||
@@ -910,6 +911,7 @@ int main(int argc, char *argv[])
|
@@ -1000,6 +1001,7 @@ int main(int argc, char *argv[])
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -574,7 +575,7 @@
|
||||||
}
|
}
|
||||||
--- a/src/ap/sta_info.h
|
--- a/src/ap/sta_info.h
|
||||||
+++ b/src/ap/sta_info.h
|
+++ b/src/ap/sta_info.h
|
||||||
@@ -293,6 +293,7 @@ struct sta_info {
|
@@ -322,6 +322,7 @@ struct sta_info {
|
||||||
#endif /* CONFIG_TESTING_OPTIONS */
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
#ifdef CONFIG_AIRTIME_POLICY
|
#ifdef CONFIG_AIRTIME_POLICY
|
||||||
unsigned int airtime_weight;
|
unsigned int airtime_weight;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
} else if (os_strcmp(buf, "channel") == 0) {
|
} else if (os_strcmp(buf, "channel") == 0) {
|
||||||
--- a/src/ap/ap_config.c
|
--- a/src/ap/ap_config.c
|
||||||
+++ b/src/ap/ap_config.c
|
+++ b/src/ap/ap_config.c
|
||||||
@@ -997,6 +997,7 @@ void hostapd_config_free(struct hostapd_
|
@@ -998,6 +998,7 @@ void hostapd_config_free(struct hostapd_
|
||||||
|
|
||||||
for (i = 0; i < conf->num_bss; i++)
|
for (i = 0; i < conf->num_bss; i++)
|
||||||
hostapd_config_free_bss(conf->bss[i]);
|
hostapd_config_free_bss(conf->bss[i]);
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
os_free(conf->basic_rates);
|
os_free(conf->basic_rates);
|
||||||
--- a/src/ap/ap_config.h
|
--- a/src/ap/ap_config.h
|
||||||
+++ b/src/ap/ap_config.h
|
+++ b/src/ap/ap_config.h
|
||||||
@@ -987,6 +987,7 @@ struct eht_phy_capabilities_info {
|
@@ -998,6 +998,7 @@ struct eht_phy_capabilities_info {
|
||||||
struct hostapd_config {
|
struct hostapd_config {
|
||||||
struct hostapd_bss_config **bss, *last_bss;
|
struct hostapd_bss_config **bss, *last_bss;
|
||||||
size_t num_bss;
|
size_t num_bss;
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
int rts_threshold;
|
int rts_threshold;
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -254,6 +254,10 @@ static int hostapd_iface_conf_changed(st
|
@@ -255,6 +255,10 @@ static int hostapd_iface_conf_changed(st
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
if (newconf->num_bss != oldconf->num_bss)
|
if (newconf->num_bss != oldconf->num_bss)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@@ -267,7 +271,7 @@ static int hostapd_iface_conf_changed(st
|
@@ -268,7 +272,7 @@ static int hostapd_iface_conf_changed(st
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
{
|
{
|
||||||
struct hapd_interfaces *interfaces = iface->interfaces;
|
struct hapd_interfaces *interfaces = iface->interfaces;
|
||||||
struct hostapd_data *hapd = iface->bss[0];
|
struct hostapd_data *hapd = iface->bss[0];
|
||||||
@@ -295,6 +299,9 @@ int hostapd_reload_config(struct hostapd
|
@@ -296,6 +300,9 @@ int hostapd_reload_config(struct hostapd
|
||||||
char *fname;
|
char *fname;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
hostapd_clear_old(iface);
|
hostapd_clear_old(iface);
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
@@ -321,6 +328,24 @@ int hostapd_reload_config(struct hostapd
|
@@ -322,6 +329,24 @@ int hostapd_reload_config(struct hostapd
|
||||||
wpa_printf(MSG_ERROR,
|
wpa_printf(MSG_ERROR,
|
||||||
"Failed to enable interface on config reload");
|
"Failed to enable interface on config reload");
|
||||||
return res;
|
return res;
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
}
|
}
|
||||||
iface->conf = newconf;
|
iface->conf = newconf;
|
||||||
|
|
||||||
@@ -337,6 +362,12 @@ int hostapd_reload_config(struct hostapd
|
@@ -338,6 +363,12 @@ int hostapd_reload_config(struct hostapd
|
||||||
|
|
||||||
for (j = 0; j < iface->num_bss; j++) {
|
for (j = 0; j < iface->num_bss; j++) {
|
||||||
hapd = iface->bss[j];
|
hapd = iface->bss[j];
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
|
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
|
||||||
os_strcmp(hapd->conf->config_id,
|
os_strcmp(hapd->conf->config_id,
|
||||||
newconf->bss[j]->config_id) != 0)
|
newconf->bss[j]->config_id) != 0)
|
||||||
@@ -2514,6 +2545,10 @@ hostapd_alloc_bss_data(struct hostapd_if
|
@@ -2700,6 +2731,10 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||||
hapd->iconf = conf;
|
hapd->iconf = conf;
|
||||||
hapd->conf = bss;
|
hapd->conf = bss;
|
||||||
hapd->iface = hapd_iface;
|
hapd->iface = hapd_iface;
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
struct hostapd_config * (*config_read_cb)(const char *config_fname);
|
struct hostapd_config * (*config_read_cb)(const char *config_fname);
|
||||||
int (*ctrl_iface_init)(struct hostapd_data *hapd);
|
int (*ctrl_iface_init)(struct hostapd_data *hapd);
|
||||||
void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
|
void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
|
||||||
@@ -185,6 +185,7 @@ struct hostapd_data {
|
@@ -186,6 +186,7 @@ struct hostapd_data {
|
||||||
struct hostapd_config *iconf;
|
struct hostapd_config *iconf;
|
||||||
struct hostapd_bss_config *conf;
|
struct hostapd_bss_config *conf;
|
||||||
struct hostapd_ubus_bss ubus;
|
struct hostapd_ubus_bss ubus;
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
int interface_added; /* virtual interface added for this BSS */
|
int interface_added; /* virtual interface added for this BSS */
|
||||||
unsigned int started:1;
|
unsigned int started:1;
|
||||||
unsigned int disabled:1;
|
unsigned int disabled:1;
|
||||||
@@ -676,7 +677,7 @@ struct hostapd_iface {
|
@@ -689,7 +690,7 @@ struct hostapd_iface {
|
||||||
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
||||||
int (*cb)(struct hostapd_iface *iface,
|
int (*cb)(struct hostapd_iface *iface,
|
||||||
void *ctx), void *ctx);
|
void *ctx), void *ctx);
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
|
hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -5054,6 +5054,9 @@ static int wpa_driver_nl80211_set_ap(voi
|
@@ -5322,6 +5322,9 @@ static int wpa_driver_nl80211_set_ap(voi
|
||||||
if (ret) {
|
if (ret) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
|
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
|
||||||
ret, strerror(-ret));
|
ret, strerror(-ret));
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
+ ret = 0;
|
+ ret = 0;
|
||||||
+ bss->flink->beacon_set = 0;
|
+ bss->flink->beacon_set = 0;
|
||||||
} else {
|
} else {
|
||||||
bss->flink->beacon_set = 1;
|
link->beacon_set = 1;
|
||||||
nl80211_set_bss(bss, params->cts_protect, params->preamble,
|
nl80211_set_bss(bss, params->cts_protect, params->preamble,
|
||||||
--- a/hostapd/ctrl_iface.c
|
--- a/hostapd/ctrl_iface.c
|
||||||
+++ b/hostapd/ctrl_iface.c
|
+++ b/hostapd/ctrl_iface.c
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
}
|
}
|
||||||
--- a/hostapd/main.c
|
--- a/hostapd/main.c
|
||||||
+++ b/hostapd/main.c
|
+++ b/hostapd/main.c
|
||||||
@@ -320,7 +320,7 @@ static void handle_term(int sig, void *s
|
@@ -410,7 +410,7 @@ static void handle_term(int sig, void *s
|
||||||
|
|
||||||
static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
|
static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
} else if (os_strcmp(buf, "extended_key_id") == 0) {
|
} else if (os_strcmp(buf, "extended_key_id") == 0) {
|
||||||
--- a/src/ap/hostapd.h
|
--- a/src/ap/hostapd.h
|
||||||
+++ b/src/ap/hostapd.h
|
+++ b/src/ap/hostapd.h
|
||||||
@@ -721,6 +721,7 @@ void hostapd_cleanup_cs_params(struct ho
|
@@ -734,6 +734,7 @@ void hostapd_cleanup_cs_params(struct ho
|
||||||
void hostapd_periodic_iface(struct hostapd_iface *iface);
|
void hostapd_periodic_iface(struct hostapd_iface *iface);
|
||||||
int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
|
int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
|
||||||
void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
|
void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
|
void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -271,6 +271,30 @@ static int hostapd_iface_conf_changed(st
|
@@ -272,6 +272,30 @@ static int hostapd_iface_conf_changed(st
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
struct hapd_interfaces *interfaces = iface->interfaces;
|
struct hapd_interfaces *interfaces = iface->interfaces;
|
||||||
--- a/src/ap/beacon.c
|
--- a/src/ap/beacon.c
|
||||||
+++ b/src/ap/beacon.c
|
+++ b/src/ap/beacon.c
|
||||||
@@ -1222,7 +1222,7 @@ void handle_probe_req(struct hostapd_dat
|
@@ -1252,7 +1252,7 @@ void handle_probe_req(struct hostapd_dat
|
||||||
if (hapd->conf->no_probe_resp_if_max_sta &&
|
if (hapd->conf->no_probe_resp_if_max_sta &&
|
||||||
is_multicast_ether_addr(mgmt->da) &&
|
is_multicast_ether_addr(mgmt->da) &&
|
||||||
is_multicast_ether_addr(mgmt->bssid) &&
|
is_multicast_ether_addr(mgmt->bssid) &&
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
" since no room for additional STA",
|
" since no room for additional STA",
|
||||||
--- a/src/ap/ap_config.h
|
--- a/src/ap/ap_config.h
|
||||||
+++ b/src/ap/ap_config.h
|
+++ b/src/ap/ap_config.h
|
||||||
@@ -1026,6 +1026,8 @@ struct hostapd_config {
|
@@ -1037,6 +1037,8 @@ struct hostapd_config {
|
||||||
unsigned int track_sta_max_num;
|
unsigned int track_sta_max_num;
|
||||||
unsigned int track_sta_max_age;
|
unsigned int track_sta_max_age;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
int bridge_hairpin; /* hairpin_mode on bridge members */
|
int bridge_hairpin; /* hairpin_mode on bridge members */
|
||||||
--- a/src/ap/wpa_auth_glue.c
|
--- a/src/ap/wpa_auth_glue.c
|
||||||
+++ b/src/ap/wpa_auth_glue.c
|
+++ b/src/ap/wpa_auth_glue.c
|
||||||
@@ -1616,8 +1616,12 @@ int hostapd_setup_wpa(struct hostapd_dat
|
@@ -1727,8 +1727,12 @@ int hostapd_setup_wpa(struct hostapd_dat
|
||||||
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
|
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
|
||||||
const char *ft_iface;
|
const char *ft_iface;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
os_free(bss->dump_msk_file);
|
os_free(bss->dump_msk_file);
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -1499,6 +1499,7 @@ static int hostapd_setup_bss(struct host
|
@@ -1534,6 +1534,7 @@ static int hostapd_setup_bss(struct host
|
||||||
wpa_printf(MSG_ERROR, "GAS server initialization failed");
|
wpa_printf(MSG_ERROR, "GAS server initialization failed");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
if (conf->qos_map_set_len &&
|
if (conf->qos_map_set_len &&
|
||||||
hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
|
hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
|
||||||
@@ -1506,7 +1507,6 @@ static int hostapd_setup_bss(struct host
|
@@ -1541,7 +1542,6 @@ static int hostapd_setup_bss(struct host
|
||||||
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
|
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
wpa_printf(MSG_ERROR, "BSS Load initialization failed");
|
wpa_printf(MSG_ERROR, "BSS Load initialization failed");
|
||||||
--- a/wpa_supplicant/events.c
|
--- a/wpa_supplicant/events.c
|
||||||
+++ b/wpa_supplicant/events.c
|
+++ b/wpa_supplicant/events.c
|
||||||
@@ -2672,8 +2672,6 @@ void wnm_bss_keep_alive_deinit(struct wp
|
@@ -2683,8 +2683,6 @@ void wnm_bss_keep_alive_deinit(struct wp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
|
static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
|
||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
@@ -2706,8 +2704,6 @@ static void interworking_process_assoc_r
|
@@ -2717,8 +2715,6 @@ static void interworking_process_assoc_r
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
|
static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
@@ -3087,10 +3083,8 @@ static int wpa_supplicant_event_associnf
|
@@ -3098,10 +3094,8 @@ static int wpa_supplicant_event_associnf
|
||||||
wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
|
wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
|
||||||
data->assoc_info.resp_ies_len);
|
data->assoc_info.resp_ies_len);
|
||||||
#endif /* CONFIG_WNM */
|
#endif /* CONFIG_WNM */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/ap_drv_ops.c
|
--- a/src/ap/ap_drv_ops.c
|
||||||
+++ b/src/ap/ap_drv_ops.c
|
+++ b/src/ap/ap_drv_ops.c
|
||||||
@@ -874,7 +874,8 @@ int hostapd_start_dfs_cac(struct hostapd
|
@@ -927,7 +927,8 @@ int hostapd_start_dfs_cac(struct hostapd
|
||||||
int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
|
int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
|
||||||
const u8 *qos_map_set, u8 qos_map_set_len)
|
const u8 *qos_map_set, u8 qos_map_set_len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
RadiusType msg_type, const u8 *addr);
|
RadiusType msg_type, const u8 *addr);
|
||||||
--- a/src/ap/ieee802_1x.c
|
--- a/src/ap/ieee802_1x.c
|
||||||
+++ b/src/ap/ieee802_1x.c
|
+++ b/src/ap/ieee802_1x.c
|
||||||
@@ -535,6 +535,10 @@ int add_common_radius_attr(struct hostap
|
@@ -598,6 +598,10 @@ int add_common_radius_attr(struct hostap
|
||||||
struct hostapd_radius_attr *attr;
|
struct hostapd_radius_attr *attr;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
unsigned int time_window;
|
unsigned int time_window;
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -1442,6 +1442,7 @@ static int hostapd_setup_bss(struct host
|
@@ -1471,6 +1471,7 @@ static int hostapd_setup_bss(struct host
|
||||||
struct radius_das_conf das_conf;
|
|
||||||
os_memset(&das_conf, 0, sizeof(das_conf));
|
os_memset(&das_conf, 0, sizeof(das_conf));
|
||||||
das_conf.port = conf->radius_das_port;
|
das_conf.port = conf->radius_das_port;
|
||||||
+ das_conf.nas_identifier = conf->nas_identifier;
|
+ das_conf.nas_identifier = conf->nas_identifier;
|
||||||
das_conf.shared_secret = conf->radius_das_shared_secret;
|
das_conf.shared_secret = conf->radius_das_shared_secret;
|
||||||
das_conf.shared_secret_len =
|
das_conf.shared_secret_len =
|
||||||
conf->radius_das_shared_secret_len;
|
conf->radius_das_shared_secret_len;
|
||||||
--- a/src/radius/radius_das.c
|
--- a/src/radius/radius_das.c
|
||||||
+++ b/src/radius/radius_das.c
|
+++ b/src/radius/radius_das.c
|
||||||
@@ -12,13 +12,26 @@
|
@@ -12,13 +12,26 @@
|
||||||
|
|
|
@ -267,7 +267,6 @@ endef
|
||||||
define Package/tune2fs/install
|
define Package/tune2fs/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
|
||||||
$(LN) tune2fs $(1)/usr/sbin/findfs
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/resize2fs/install
|
define Package/resize2fs/install
|
||||||
|
|
|
@ -1600,18 +1600,18 @@
|
||||||
+ * (and doing them).
|
+ * (and doing them).
|
||||||
+ */
|
+ */
|
||||||
+int try_addint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
+int try_addint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||||
+ lua_Integer v= ib+ic; /* may overflow */
|
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||||
+ if (ib>0 && ic>0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
+ if (ic>0) { if (ib > LUA_INTEGER_MAX - ic) return 0; /*overflow, use floats*/ }
|
||||||
+ else if (ib<0 && ic<0) { if (v >= 0) return 0; }
|
+ else { if (ib < LUA_INTEGER_MIN - ic) return 0; }
|
||||||
+ *r= v;
|
+ *r = ib + ic;
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+int try_subint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
+int try_subint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||||
+ lua_Integer v= ib-ic; /* may overflow */
|
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||||
+ if (ib>=0 && ic<0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
+ if (ic>0) { if (ib < LUA_INTEGER_MIN + ic) return 0; /*overflow, use floats*/ }
|
||||||
+ else if (ib<0 && ic>0) { if (v >= 0) return 0; }
|
+ else { if (ib > LUA_INTEGER_MAX + ic) return 0; }
|
||||||
+ *r= v;
|
+ *r = ib - ic;
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
|
|
@ -1589,18 +1589,18 @@
|
||||||
+ * (and doing them).
|
+ * (and doing them).
|
||||||
+ */
|
+ */
|
||||||
+int try_addint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
+int try_addint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||||
+ lua_Integer v= ib+ic; /* may overflow */
|
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||||
+ if (ib>0 && ic>0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
+ if (ic>0) { if (ib > LUA_INTEGER_MAX - ic) return 0; /*overflow, use floats*/ }
|
||||||
+ else if (ib<0 && ic<0) { if (v >= 0) return 0; }
|
+ else { if (ib < LUA_INTEGER_MIN - ic) return 0; }
|
||||||
+ *r= v;
|
+ *r = ib + ic;
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+int try_subint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
+int try_subint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||||
+ lua_Integer v= ib-ic; /* may overflow */
|
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||||
+ if (ib>=0 && ic<0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
+ if (ic>0) { if (ib < LUA_INTEGER_MIN + ic) return 0; /*overflow, use floats*/ }
|
||||||
+ else if (ib<0 && ic>0) { if (v >= 0) return 0; }
|
+ else { if (ib > LUA_INTEGER_MAX + ic) return 0; }
|
||||||
+ *r= v;
|
+ *r = ib - ic;
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
|
9
rules.mk
9
rules.mk
|
@ -211,6 +211,10 @@ ifndef DUMP
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TARGET_LINKER?=bfd
|
||||||
|
TARGET_LDFLAGS+= -fuse-ld=$(TARGET_LINKER)
|
||||||
|
|
||||||
TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(STAGING_DIR_HOSTPKG)/bin:$(TARGET_PATH)
|
TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(STAGING_DIR_HOSTPKG)/bin:$(TARGET_PATH)
|
||||||
|
|
||||||
ifeq ($(CONFIG_SOFT_FLOAT),y)
|
ifeq ($(CONFIG_SOFT_FLOAT),y)
|
||||||
|
@ -252,6 +256,7 @@ TARGET_RANLIB:=$(TARGET_CROSS)gcc-ranlib
|
||||||
TARGET_NM:=$(TARGET_CROSS)gcc-nm
|
TARGET_NM:=$(TARGET_CROSS)gcc-nm
|
||||||
TARGET_CC:=$(TARGET_CROSS)gcc
|
TARGET_CC:=$(TARGET_CROSS)gcc
|
||||||
TARGET_CXX:=$(TARGET_CROSS)g++
|
TARGET_CXX:=$(TARGET_CROSS)g++
|
||||||
|
TARGET_LD:=$(TARGET_CROSS)ld.$(TARGET_LINKER)
|
||||||
KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
|
KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
|
||||||
FILECMD:=$(STAGING_DIR_HOST)/bin/file
|
FILECMD:=$(STAGING_DIR_HOST)/bin/file
|
||||||
SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
|
SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
|
||||||
|
@ -305,7 +310,7 @@ endif
|
||||||
TARGET_CONFIGURE_OPTS = \
|
TARGET_CONFIGURE_OPTS = \
|
||||||
AR="$(TARGET_AR)" \
|
AR="$(TARGET_AR)" \
|
||||||
AS="$(TARGET_CC) -c $(TARGET_ASFLAGS)" \
|
AS="$(TARGET_CC) -c $(TARGET_ASFLAGS)" \
|
||||||
LD=$(TARGET_CROSS)ld \
|
LD="$(TARGET_LD)" \
|
||||||
NM="$(TARGET_NM)" \
|
NM="$(TARGET_NM)" \
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
GCC="$(TARGET_CC)" \
|
GCC="$(TARGET_CC)" \
|
||||||
|
@ -325,7 +330,7 @@ else
|
||||||
STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
|
STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
|
||||||
else
|
else
|
||||||
ifneq ($(CONFIG_USE_SSTRIP),)
|
ifneq ($(CONFIG_USE_SSTRIP),)
|
||||||
STRIP:=$(STAGING_DIR_HOST)/bin/sstrip $(call qstrip,$(CONFIG_SSTRIP_ARGS))
|
STRIP:=$(STAGING_DIR_HOST)/bin/sstrip $(if $(CONFIG_SSTRIP_DISCARD_TRAILING_ZEROES),-z)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
RSTRIP= \
|
RSTRIP= \
|
||||||
|
|
|
@ -21,7 +21,7 @@ if not file_path.is_file():
|
||||||
|
|
||||||
def get_titles():
|
def get_titles():
|
||||||
titles = []
|
titles = []
|
||||||
for prefix in ["", "ALT0_", "ALT1_", "ALT2_", "ALT3_", "ALT4_"]:
|
for prefix in ["", "ALT0_", "ALT1_", "ALT2_", "ALT3_", "ALT4_", "ALT5_"]:
|
||||||
title = {}
|
title = {}
|
||||||
for var in ["vendor", "model", "variant"]:
|
for var in ["vendor", "model", "variant"]:
|
||||||
if getenv("DEVICE_{}{}".format(prefix, var.upper())):
|
if getenv("DEVICE_{}{}".format(prefix, var.upper())):
|
||||||
|
|
|
@ -108,10 +108,10 @@ if [ -n "${DTB}" ]; then
|
||||||
${DTADDR:+load = <${DTADDR}>;}
|
${DTADDR:+load = <${DTADDR}>;}
|
||||||
arch = \"${ARCH}\";
|
arch = \"${ARCH}\";
|
||||||
compression = \"none\";
|
compression = \"none\";
|
||||||
hash@1 {
|
hash${REFERENCE_CHAR}1 {
|
||||||
algo = \"crc32\";
|
algo = \"crc32\";
|
||||||
};
|
};
|
||||||
hash@2 {
|
hash${REFERENCE_CHAR}2 {
|
||||||
algo = \"${HASH}\";
|
algo = \"${HASH}\";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -128,10 +128,10 @@ if [ -n "${INITRD}" ]; then
|
||||||
type = \"ramdisk\";
|
type = \"ramdisk\";
|
||||||
arch = \"${ARCH}\";
|
arch = \"${ARCH}\";
|
||||||
os = \"linux\";
|
os = \"linux\";
|
||||||
hash@1 {
|
hash${REFERENCE_CHAR}1 {
|
||||||
algo = \"crc32\";
|
algo = \"crc32\";
|
||||||
};
|
};
|
||||||
hash@2 {
|
hash${REFERENCE_CHAR}2 {
|
||||||
algo = \"${HASH}\";
|
algo = \"${HASH}\";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -150,10 +150,10 @@ if [ -n "${ROOTFS}" ]; then
|
||||||
type = \"filesystem\";
|
type = \"filesystem\";
|
||||||
arch = \"${ARCH}\";
|
arch = \"${ARCH}\";
|
||||||
compression = \"none\";
|
compression = \"none\";
|
||||||
hash@1 {
|
hash${REFERENCE_CHAR}1 {
|
||||||
algo = \"crc32\";
|
algo = \"crc32\";
|
||||||
};
|
};
|
||||||
hash@2 {
|
hash${REFERENCE_CHAR}2 {
|
||||||
algo = \"${HASH}\";
|
algo = \"${HASH}\";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -181,10 +181,10 @@ OVCONFIGS=""
|
||||||
arch = \"${ARCH}\";
|
arch = \"${ARCH}\";
|
||||||
load = <${DTADDR}>;
|
load = <${DTADDR}>;
|
||||||
compression = \"none\";
|
compression = \"none\";
|
||||||
hash@1 {
|
hash${REFERENCE_CHAR}1 {
|
||||||
algo = \"crc32\";
|
algo = \"crc32\";
|
||||||
};
|
};
|
||||||
hash@2 {
|
hash${REFERENCE_CHAR}2 {
|
||||||
algo = \"${HASH}\";
|
algo = \"${HASH}\";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -216,10 +216,10 @@ DATA="/dts-v1/;
|
||||||
compression = \"${COMPRESS}\";
|
compression = \"${COMPRESS}\";
|
||||||
load = <${LOAD_ADDR}>;
|
load = <${LOAD_ADDR}>;
|
||||||
entry = <${ENTRY_ADDR}>;
|
entry = <${ENTRY_ADDR}>;
|
||||||
hash@1 {
|
hash${REFERENCE_CHAR}1 {
|
||||||
algo = \"crc32\";
|
algo = \"crc32\";
|
||||||
};
|
};
|
||||||
hash@2 {
|
hash${REFERENCE_CHAR}2 {
|
||||||
algo = \"$HASH\";
|
algo = \"$HASH\";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@ define KernelPackage/hw-crypto-4xx
|
||||||
+kmod-crypto-ccm +kmod-crypto-gcm \
|
+kmod-crypto-ccm +kmod-crypto-gcm \
|
||||||
+kmod-crypto-sha1 +kmod-crypto-sha256 +kmod-crypto-sha512
|
+kmod-crypto-sha1 +kmod-crypto-sha256 +kmod-crypto-sha512
|
||||||
FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
|
FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,09,sata_dwc_460ex,1)
|
AUTOLOAD:=$(call AutoLoad,09,crypto4xx,1)
|
||||||
$(call AddDepends/crypto)
|
$(call AddDepends/crypto)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,6 @@ CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||||
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
|
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
|
||||||
CONFIG_CRYPTO_BLAKE2S=y
|
|
||||||
CONFIG_CRYPTO_CHACHA20=y
|
CONFIG_CRYPTO_CHACHA20=y
|
||||||
CONFIG_CRYPTO_CHACHA20_NEON=y
|
CONFIG_CRYPTO_CHACHA20_NEON=y
|
||||||
CONFIG_CRYPTO_CRYPTD=y
|
CONFIG_CRYPTO_CRYPTD=y
|
||||||
|
|
|
@ -13,10 +13,10 @@ Signed-off-by: Mathew McBride <matt@traverse.com.au>
|
||||||
|
|
||||||
--- a/arch/arm/Kconfig
|
--- a/arch/arm/Kconfig
|
||||||
+++ b/arch/arm/Kconfig
|
+++ b/arch/arm/Kconfig
|
||||||
@@ -122,7 +122,6 @@ config ARM
|
@@ -123,7 +123,6 @@ config ARM
|
||||||
select HAVE_UID16
|
|
||||||
select HAVE_VIRT_CPU_ACCOUNTING_GEN
|
select HAVE_VIRT_CPU_ACCOUNTING_GEN
|
||||||
select IRQ_FORCED_THREADING
|
select IRQ_FORCED_THREADING
|
||||||
|
select LOCK_MM_AND_FIND_VMA
|
||||||
- select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
|
- select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
|
||||||
select MODULES_USE_ELF_REL
|
select MODULES_USE_ELF_REL
|
||||||
select NEED_DMA_MAP_STATE
|
select NEED_DMA_MAP_STATE
|
||||||
|
|
|
@ -34,7 +34,6 @@ CONFIG_CPU_R4K_CACHE_TLB=y
|
||||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||||
CONFIG_CPU_SUPPORTS_MSA=y
|
CONFIG_CPU_SUPPORTS_MSA=y
|
||||||
CONFIG_CRYPTO_BLAKE2S=y
|
|
||||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||||
CONFIG_CRYPTO_RNG2=y
|
CONFIG_CRYPTO_RNG2=y
|
||||||
|
|
114
target/linux/ath79/dts/qcn5502_asus.dtsi
Normal file
114
target/linux/ath79/dts/qcn5502_asus.dtsi
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qca956x.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
label-mac-device = ð0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ð0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pll-data = <0x03000101 0x00000101 0x00001919>;
|
||||||
|
|
||||||
|
phy-mode = "sgmii";
|
||||||
|
phy-handle = <&phy0>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_factory_1002>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
phy0: ethernet-phy@0 {
|
||||||
|
reg = <0>;
|
||||||
|
phy-mode = "sgmii";
|
||||||
|
qca,mib-poll-interval = <500>;
|
||||||
|
|
||||||
|
qca,ar8327-initvals = <
|
||||||
|
0x04 0x80080080 /* PORT0 PAD MODE CTRL */
|
||||||
|
0x08 0x00000000 /* PORT5 PAD MODE CTRL */
|
||||||
|
0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
|
||||||
|
0x10 0x00000080 /* POWER_ON_STRAP */
|
||||||
|
0x7c 0x0000007e /* PORT0_STATUS */
|
||||||
|
0x94 0x00000200 /* PORT6_STATUS */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
wifi@0,0 {
|
||||||
|
compatible = "qcom,ath10k";
|
||||||
|
reg = <0 0 0 0 0>;
|
||||||
|
|
||||||
|
nvmem-cells = <&precal_factory_5000>;
|
||||||
|
nvmem-cell-names = "pre-calibration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <25000000>;
|
||||||
|
m25p,fast-read;
|
||||||
|
|
||||||
|
mtdparts: partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "Bootloader";
|
||||||
|
reg = <0x000000 0x040000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@40000 {
|
||||||
|
label = "nvram";
|
||||||
|
reg = <0x040000 0x010000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@50000 {
|
||||||
|
label = "Factory";
|
||||||
|
reg = <0x050000 0x010000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
cal_factory_1000: cal@1000 {
|
||||||
|
reg = <0x1000 0x440>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_factory_1002: macaddr@1002 {
|
||||||
|
reg = <0x1002 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
precal_factory_5000: precal@5000 {
|
||||||
|
reg = <0x5000 0x2f20>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&wmac {
|
||||||
|
/* Does not work due to lack of QCN5502 support in ath9k. */
|
||||||
|
status = "disabled";
|
||||||
|
|
||||||
|
nvmem-cells = <&cal_factory_1000>;
|
||||||
|
nvmem-cell-names = "calibration";
|
||||||
|
};
|
19
target/linux/ath79/dts/qcn5502_asus_rt-ac59u-v2.dts
Normal file
19
target/linux/ath79/dts/qcn5502_asus_rt-ac59u-v2.dts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qcn5502_asus_rt-ac59u.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "asus,rt-ac59u-v2", "qca,qcn5500", "qca,qca9560";
|
||||||
|
model = "ASUS RT-AC59U v2";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mtdparts {
|
||||||
|
partition@60000 {
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x060000 0x1fa0000>;
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
};
|
||||||
|
};
|
19
target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dts
Normal file
19
target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qcn5502_asus_rt-ac59u.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "asus,rt-ac59u", "qca,qcn5500", "qca,qca9560";
|
||||||
|
model = "ASUS RT-AC59U";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mtdparts {
|
||||||
|
partition@60000 {
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x060000 0xfa0000>;
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
};
|
||||||
|
};
|
69
target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi
Normal file
69
target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qcn5502_asus.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_power;
|
||||||
|
led-failsafe = &led_power;
|
||||||
|
led-running = &led_power;
|
||||||
|
led-upgrade = &led_power;
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_power: power {
|
||||||
|
label = "blue:power";
|
||||||
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
usb {
|
||||||
|
label = "blue:usb";
|
||||||
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||||
|
trigger-sources = <&hub_port0>;
|
||||||
|
linux,default-trigger = "usbport";
|
||||||
|
};
|
||||||
|
|
||||||
|
wlan2g {
|
||||||
|
label = "blue:wlan2g";
|
||||||
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
wlan5g {
|
||||||
|
label = "blue:wlan5g";
|
||||||
|
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_phy0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
57
target/linux/ath79/dts/qcn5502_asus_zenwifi-cd6.dtsi
Normal file
57
target/linux/ath79/dts/qcn5502_asus_zenwifi-cd6.dtsi
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qcn5502_asus.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_blue;
|
||||||
|
led-failsafe = &led_red;
|
||||||
|
led-running = &led_blue;
|
||||||
|
led-upgrade = &led_red;
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_blue: blue {
|
||||||
|
label = "blue";
|
||||||
|
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
green {
|
||||||
|
label = "green";
|
||||||
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_red: red {
|
||||||
|
label = "red";
|
||||||
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
white {
|
||||||
|
label = "white";
|
||||||
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
19
target/linux/ath79/dts/qcn5502_asus_zenwifi-cd6n.dts
Normal file
19
target/linux/ath79/dts/qcn5502_asus_zenwifi-cd6n.dts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qcn5502_asus_zenwifi-cd6.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "asus,zenwifi-cd6n", "qca,qcn5500", "qca,qca9560";
|
||||||
|
model = "ASUS ZenWiFi CD6N";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mtdparts {
|
||||||
|
partition@60000 {
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x060000 0xfa0000>;
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
};
|
||||||
|
};
|
19
target/linux/ath79/dts/qcn5502_asus_zenwifi-cd6r.dts
Normal file
19
target/linux/ath79/dts/qcn5502_asus_zenwifi-cd6r.dts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "qcn5502_asus_zenwifi-cd6.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "asus,zenwifi-cd6r", "qca,qcn5500", "qca,qca9560";
|
||||||
|
model = "ASUS ZenWiFi CD6R";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mtdparts {
|
||||||
|
partition@60000 {
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x060000 0x1fa0000>;
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
};
|
||||||
|
};
|
|
@ -152,6 +152,14 @@ ath79_setup_interfaces()
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "6:lan:4"
|
"0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "6:lan:4"
|
||||||
;;
|
;;
|
||||||
|
asus,zenwifi-cd6n)
|
||||||
|
ucidef_add_switch "switch0" \
|
||||||
|
"0@eth0" "1:lan:1" "4:lan:2"
|
||||||
|
;;
|
||||||
|
asus,zenwifi-cd6r)
|
||||||
|
ucidef_add_switch "switch0" \
|
||||||
|
"0@eth0" "1:lan:2" "3:lan:1" "4:lan:3" "2:wan"
|
||||||
|
;;
|
||||||
atheros,db120)
|
atheros,db120)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
|
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
|
||||||
|
@ -381,6 +389,8 @@ ath79_setup_interfaces()
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0@eth1" "1:lan"
|
"0@eth1" "1:lan"
|
||||||
;;
|
;;
|
||||||
|
asus,rt-ac59u|\
|
||||||
|
asus,rt-ac59u-v2|\
|
||||||
mercury,mw4530r-v1|\
|
mercury,mw4530r-v1|\
|
||||||
tplink,archer-a7-v5|\
|
tplink,archer-a7-v5|\
|
||||||
tplink,archer-a9-v6|\
|
tplink,archer-a9-v6|\
|
||||||
|
|
|
@ -483,6 +483,70 @@ define Device/asus_rp-ac66
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += asus_rp-ac66
|
TARGET_DEVICES += asus_rp-ac66
|
||||||
|
|
||||||
|
define Device/asus_qcn5502
|
||||||
|
SOC := qcn5502
|
||||||
|
DEVICE_VENDOR := ASUS
|
||||||
|
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||||
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
|
||||||
|
IMAGES += factory.bin
|
||||||
|
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||||
|
append-rootfs | pad-rootfs
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Device/asus_rt-ac59u
|
||||||
|
$(Device/asus_qcn5502)
|
||||||
|
DEVICE_MODEL := RT-AC59U
|
||||||
|
DEVICE_ALT0_VENDOR := ASUS
|
||||||
|
DEVICE_ALT0_MODEL := RT-AC1200GE
|
||||||
|
DEVICE_ALT1_VENDOR := ASUS
|
||||||
|
DEVICE_ALT1_MODEL := RT-AC1500G PLUS
|
||||||
|
DEVICE_ALT2_VENDOR := ASUS
|
||||||
|
DEVICE_ALT2_MODEL := RT-AC1500UHP
|
||||||
|
DEVICE_ALT3_VENDOR := ASUS
|
||||||
|
DEVICE_ALT3_MODEL := RT-AC57U
|
||||||
|
DEVICE_ALT3_VARIANT := v2
|
||||||
|
DEVICE_ALT4_VENDOR := ASUS
|
||||||
|
DEVICE_ALT4_MODEL := RT-AC58U
|
||||||
|
DEVICE_ALT4_VARIANT := v2
|
||||||
|
DEVICE_ALT5_VENDOR := ASUS
|
||||||
|
DEVICE_ALT5_MODEL := RT-ACRH12
|
||||||
|
IMAGE_SIZE := 16000k
|
||||||
|
DEVICE_PACKAGES += kmod-usb2 kmod-usb-ledtrig-usbport
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += asus_rt-ac59u
|
||||||
|
|
||||||
|
define Device/asus_rt-ac59u-v2
|
||||||
|
$(Device/asus_qcn5502)
|
||||||
|
DEVICE_MODEL := RT-AC59U
|
||||||
|
DEVICE_VARIANT := v2
|
||||||
|
DEVICE_ALT0_VENDOR := ASUS
|
||||||
|
DEVICE_ALT0_MODEL := RT-AC1300G PLUS
|
||||||
|
DEVICE_ALT0_VARIANT := v3
|
||||||
|
DEVICE_ALT1_VENDOR := ASUS
|
||||||
|
DEVICE_ALT1_MODEL := RT-AC57U
|
||||||
|
DEVICE_ALT1_VARIANT := v3
|
||||||
|
DEVICE_ALT2_VENDOR := ASUS
|
||||||
|
DEVICE_ALT2_MODEL := RT-AC58U
|
||||||
|
DEVICE_ALT2_VARIANT := v3
|
||||||
|
IMAGE_SIZE := 32384k
|
||||||
|
DEVICE_PACKAGES += kmod-usb2 kmod-usb-ledtrig-usbport
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += asus_rt-ac59u-v2
|
||||||
|
|
||||||
|
define Device/asus_zenwifi-cd6n
|
||||||
|
$(Device/asus_qcn5502)
|
||||||
|
DEVICE_MODEL := ZenWiFi CD6N
|
||||||
|
IMAGE_SIZE := 16000k
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += asus_zenwifi-cd6n
|
||||||
|
|
||||||
|
define Device/asus_zenwifi-cd6r
|
||||||
|
$(Device/asus_qcn5502)
|
||||||
|
DEVICE_MODEL := ZenWiFi CD6R
|
||||||
|
IMAGE_SIZE := 32384k
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += asus_zenwifi-cd6r
|
||||||
|
|
||||||
define Device/atheros_db120
|
define Device/atheros_db120
|
||||||
$(Device/loader-okli-uimage)
|
$(Device/loader-okli-uimage)
|
||||||
SOC := ar9344
|
SOC := ar9344
|
||||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||||
|
|
||||||
--- a/kernel/cgroup/cgroup.c
|
--- a/kernel/cgroup/cgroup.c
|
||||||
+++ b/kernel/cgroup/cgroup.c
|
+++ b/kernel/cgroup/cgroup.c
|
||||||
@@ -6046,6 +6046,9 @@ int __init cgroup_init_early(void)
|
@@ -6060,6 +6060,9 @@ int __init cgroup_init_early(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||||
/**
|
/**
|
||||||
* cgroup_init - cgroup initialization
|
* cgroup_init - cgroup initialization
|
||||||
*
|
*
|
||||||
@@ -6079,6 +6082,12 @@ int __init cgroup_init(void)
|
@@ -6093,6 +6096,12 @@ int __init cgroup_init(void)
|
||||||
|
|
||||||
cgroup_unlock();
|
cgroup_unlock();
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||||
for_each_subsys(ss, ssid) {
|
for_each_subsys(ss, ssid) {
|
||||||
if (ss->early_init) {
|
if (ss->early_init) {
|
||||||
struct cgroup_subsys_state *css =
|
struct cgroup_subsys_state *css =
|
||||||
@@ -6716,6 +6725,10 @@ static int __init cgroup_disable(char *s
|
@@ -6730,6 +6739,10 @@ static int __init cgroup_disable(char *s
|
||||||
strcmp(token, ss->legacy_name))
|
strcmp(token, ss->legacy_name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||||
static_branch_disable(cgroup_subsys_enabled_key[i]);
|
static_branch_disable(cgroup_subsys_enabled_key[i]);
|
||||||
pr_info("Disabling %s control group subsystem\n",
|
pr_info("Disabling %s control group subsystem\n",
|
||||||
ss->name);
|
ss->name);
|
||||||
@@ -6734,6 +6747,31 @@ static int __init cgroup_disable(char *s
|
@@ -6748,6 +6761,31 @@ static int __init cgroup_disable(char *s
|
||||||
}
|
}
|
||||||
__setup("cgroup_disable=", cgroup_disable);
|
__setup("cgroup_disable=", cgroup_disable);
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||||
/* Device and char device-related information */
|
/* Device and char device-related information */
|
||||||
static DEFINE_IDA(gpio_ida);
|
static DEFINE_IDA(gpio_ida);
|
||||||
static dev_t gpio_devt;
|
static dev_t gpio_devt;
|
||||||
@@ -2414,8 +2416,8 @@ int gpiod_direction_output(struct gpio_d
|
@@ -2423,8 +2425,8 @@ int gpiod_direction_output(struct gpio_d
|
||||||
value = !!value;
|
value = !!value;
|
||||||
|
|
||||||
/* GPIOs used for enabled IRQs shall not be set as output */
|
/* GPIOs used for enabled IRQs shall not be set as output */
|
||||||
|
@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||||
gpiod_err(desc,
|
gpiod_err(desc,
|
||||||
"%s: tried to set a GPIO tied to an IRQ as output\n",
|
"%s: tried to set a GPIO tied to an IRQ as output\n",
|
||||||
__func__);
|
__func__);
|
||||||
@@ -3293,8 +3295,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
|
@@ -3302,8 +3304,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
|
||||||
}
|
}
|
||||||
|
|
||||||
/* To be valid for IRQ the line needs to be input or open drain */
|
/* To be valid for IRQ the line needs to be input or open drain */
|
||||||
|
|
|
@ -57,7 +57,6 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||||
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
CONFIG_CPU_SUPPORTS_CPUFREQ=y
|
||||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||||
CONFIG_CRASH_CORE=y
|
CONFIG_CRASH_CORE=y
|
||||||
CONFIG_CRYPTO_BLAKE2S=y
|
|
||||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||||
CONFIG_CRYPTO_RNG2=y
|
CONFIG_CRYPTO_RNG2=y
|
||||||
|
|
|
@ -13,7 +13,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||||
|
|
||||||
--- a/arch/mips/Kconfig
|
--- a/arch/mips/Kconfig
|
||||||
+++ b/arch/mips/Kconfig
|
+++ b/arch/mips/Kconfig
|
||||||
@@ -273,19 +273,13 @@ config BMIPS_GENERIC
|
@@ -274,19 +274,13 @@ config BMIPS_GENERIC
|
||||||
select SYNC_R4K
|
select SYNC_R4K
|
||||||
select COMMON_CLK
|
select COMMON_CLK
|
||||||
select BCM6345_L1_IRQ
|
select BCM6345_L1_IRQ
|
||||||
|
@ -33,7 +33,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||||
select SWAP_IO_SPACE
|
select SWAP_IO_SPACE
|
||||||
select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
|
select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
|
||||||
select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
|
select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
|
||||||
@@ -295,6 +289,7 @@ config BMIPS_GENERIC
|
@@ -296,6 +290,7 @@ config BMIPS_GENERIC
|
||||||
select HAVE_PCI
|
select HAVE_PCI
|
||||||
select PCI_DRIVERS_GENERIC
|
select PCI_DRIVERS_GENERIC
|
||||||
select FW_CFE
|
select FW_CFE
|
||||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||||
|
|
||||||
--- a/arch/mips/Kconfig
|
--- a/arch/mips/Kconfig
|
||||||
+++ b/arch/mips/Kconfig
|
+++ b/arch/mips/Kconfig
|
||||||
@@ -287,7 +287,6 @@ config BMIPS_GENERIC
|
@@ -288,7 +288,6 @@ config BMIPS_GENERIC
|
||||||
select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
|
select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
|
||||||
select HARDIRQS_SW_RESEND
|
select HARDIRQS_SW_RESEND
|
||||||
select HAVE_PCI
|
select HAVE_PCI
|
||||||
|
|
|
@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||||
#ifndef arch_wants_old_prefaulted_pte
|
#ifndef arch_wants_old_prefaulted_pte
|
||||||
static inline bool arch_wants_old_prefaulted_pte(void)
|
static inline bool arch_wants_old_prefaulted_pte(void)
|
||||||
{
|
{
|
||||||
@@ -2782,7 +2770,7 @@ static inline bool cow_user_page(struct
|
@@ -2791,7 +2779,7 @@ static inline int cow_user_page(struct p
|
||||||
* On architectures with software "accessed" bits, we would
|
* On architectures with software "accessed" bits, we would
|
||||||
* take a double page fault, so mark it accessed here.
|
* take a double page fault, so mark it accessed here.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -612,7 +612,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||||
mem_cgroup_id_remove(memcg);
|
mem_cgroup_id_remove(memcg);
|
||||||
--- a/mm/memory.c
|
--- a/mm/memory.c
|
||||||
+++ b/mm/memory.c
|
+++ b/mm/memory.c
|
||||||
@@ -4792,6 +4792,27 @@ static inline void mm_account_fault(stru
|
@@ -4805,6 +4805,27 @@ static inline void mm_account_fault(stru
|
||||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||||
/*
|
/*
|
||||||
* By the time we get here, we already hold the mm semaphore
|
* By the time we get here, we already hold the mm semaphore
|
||||||
*
|
*
|
||||||
@@ -4823,11 +4844,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
@@ -4836,11 +4857,15 @@ vm_fault_t handle_mm_fault(struct vm_are
|
||||||
if (flags & FAULT_FLAG_USER)
|
if (flags & FAULT_FLAG_USER)
|
||||||
mem_cgroup_enter_user_fault();
|
mem_cgroup_enter_user_fault();
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||||
mark_page_accessed(page);
|
mark_page_accessed(page);
|
||||||
}
|
}
|
||||||
rss[mm_counter(page)]--;
|
rss[mm_counter(page)]--;
|
||||||
@@ -4795,8 +4795,8 @@ static inline void mm_account_fault(stru
|
@@ -4808,8 +4808,8 @@ static inline void mm_account_fault(stru
|
||||||
#ifdef CONFIG_LRU_GEN
|
#ifdef CONFIG_LRU_GEN
|
||||||
static void lru_gen_enter_fault(struct vm_area_struct *vma)
|
static void lru_gen_enter_fault(struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
From e7731194fdf085f46d58b1adccfddbd0dfee4873 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||||
|
Date: Fri, 7 Jul 2023 08:53:25 +0200
|
||||||
|
Subject: [PATCH] net: bgmac: postpone turning IRQs off to avoid SoC hangs
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Turning IRQs off is done by accessing Ethernet controller registers.
|
||||||
|
That can't be done until device's clock is enabled. It results in a SoC
|
||||||
|
hang otherwise.
|
||||||
|
|
||||||
|
This bug remained unnoticed for years as most bootloaders keep all
|
||||||
|
Ethernet interfaces turned on. It seems to only affect a niche SoC
|
||||||
|
family BCM47189. It has two Ethernet controllers but CFE bootloader uses
|
||||||
|
only the first one.
|
||||||
|
|
||||||
|
Fixes: 34322615cbaa ("net: bgmac: Mask interrupts during probe")
|
||||||
|
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||||
|
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
|
||||||
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
---
|
||||||
|
drivers/net/ethernet/broadcom/bgmac.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||||
|
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||||
|
@@ -1492,8 +1492,6 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
||||||
|
|
||||||
|
bgmac->in_init = true;
|
||||||
|
|
||||||
|
- bgmac_chip_intrs_off(bgmac);
|
||||||
|
-
|
||||||
|
net_dev->irq = bgmac->irq;
|
||||||
|
SET_NETDEV_DEV(net_dev, bgmac->dev);
|
||||||
|
dev_set_drvdata(bgmac->dev, bgmac);
|
||||||
|
@@ -1511,6 +1509,8 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
||||||
|
*/
|
||||||
|
bgmac_clk_enable(bgmac, 0);
|
||||||
|
|
||||||
|
+ bgmac_chip_intrs_off(bgmac);
|
||||||
|
+
|
||||||
|
/* This seems to be fixing IRQ by assigning OOB #6 to the core */
|
||||||
|
if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) {
|
||||||
|
if (bgmac->feature_flags & BGMAC_FEAT_IRQ_ID_OOB_6)
|
|
@ -87,7 +87,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
|
||||||
mark_page_accessed(page);
|
mark_page_accessed(page);
|
||||||
}
|
}
|
||||||
rss[mm_counter(page)]--;
|
rss[mm_counter(page)]--;
|
||||||
@@ -5170,8 +5169,8 @@ static inline void mm_account_fault(stru
|
@@ -5182,8 +5181,8 @@ static inline void mm_account_fault(stru
|
||||||
#ifdef CONFIG_LRU_GEN
|
#ifdef CONFIG_LRU_GEN
|
||||||
static void lru_gen_enter_fault(struct vm_area_struct *vma)
|
static void lru_gen_enter_fault(struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
From e7731194fdf085f46d58b1adccfddbd0dfee4873 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||||
|
Date: Fri, 7 Jul 2023 08:53:25 +0200
|
||||||
|
Subject: [PATCH] net: bgmac: postpone turning IRQs off to avoid SoC hangs
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Turning IRQs off is done by accessing Ethernet controller registers.
|
||||||
|
That can't be done until device's clock is enabled. It results in a SoC
|
||||||
|
hang otherwise.
|
||||||
|
|
||||||
|
This bug remained unnoticed for years as most bootloaders keep all
|
||||||
|
Ethernet interfaces turned on. It seems to only affect a niche SoC
|
||||||
|
family BCM47189. It has two Ethernet controllers but CFE bootloader uses
|
||||||
|
only the first one.
|
||||||
|
|
||||||
|
Fixes: 34322615cbaa ("net: bgmac: Mask interrupts during probe")
|
||||||
|
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||||
|
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
|
||||||
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
---
|
||||||
|
drivers/net/ethernet/broadcom/bgmac.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
||||||
|
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
||||||
|
@@ -1492,8 +1492,6 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
||||||
|
|
||||||
|
bgmac->in_init = true;
|
||||||
|
|
||||||
|
- bgmac_chip_intrs_off(bgmac);
|
||||||
|
-
|
||||||
|
net_dev->irq = bgmac->irq;
|
||||||
|
SET_NETDEV_DEV(net_dev, bgmac->dev);
|
||||||
|
dev_set_drvdata(bgmac->dev, bgmac);
|
||||||
|
@@ -1511,6 +1509,8 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
||||||
|
*/
|
||||||
|
bgmac_clk_enable(bgmac, 0);
|
||||||
|
|
||||||
|
+ bgmac_chip_intrs_off(bgmac);
|
||||||
|
+
|
||||||
|
/* This seems to be fixing IRQ by assigning OOB #6 to the core */
|
||||||
|
if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) {
|
||||||
|
if (bgmac->feature_flags & BGMAC_FEAT_IRQ_ID_OOB_6)
|
|
@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
#include <linux/phylink.h>
|
#include <linux/phylink.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include <linux/regulator/consumer.h>
|
#include <linux/regulator/consumer.h>
|
||||||
@@ -2597,128 +2598,11 @@ static int mt7531_rgmii_setup(struct mt7
|
@@ -2611,128 +2612,11 @@ static int mt7531_rgmii_setup(struct mt7
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
static int
|
static int
|
||||||
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
|
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
|
||||||
phy_interface_t interface)
|
phy_interface_t interface)
|
||||||
@@ -2741,11 +2625,11 @@ mt7531_mac_config(struct dsa_switch *ds,
|
@@ -2755,11 +2639,11 @@ mt7531_mac_config(struct dsa_switch *ds,
|
||||||
phydev = dp->slave->phydev;
|
phydev = dp->slave->phydev;
|
||||||
return mt7531_rgmii_setup(priv, port, interface, phydev);
|
return mt7531_rgmii_setup(priv, port, interface, phydev);
|
||||||
case PHY_INTERFACE_MODE_SGMII:
|
case PHY_INTERFACE_MODE_SGMII:
|
||||||
|
@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -2770,11 +2654,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
|
@@ -2784,11 +2668,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
|
||||||
|
|
||||||
switch (interface) {
|
switch (interface) {
|
||||||
case PHY_INTERFACE_MODE_TRGMII:
|
case PHY_INTERFACE_MODE_TRGMII:
|
||||||
|
@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -3015,86 +2899,6 @@ static void mt7530_pcs_get_state(struct
|
@@ -3029,86 +2913,6 @@ static void mt7530_pcs_get_state(struct
|
||||||
state->pause |= MLO_PAUSE_TX;
|
state->pause |= MLO_PAUSE_TX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
|
static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
|
||||||
phy_interface_t interface,
|
phy_interface_t interface,
|
||||||
const unsigned long *advertising,
|
const unsigned long *advertising,
|
||||||
@@ -3114,18 +2918,57 @@ static const struct phylink_pcs_ops mt75
|
@@ -3128,18 +2932,57 @@ static const struct phylink_pcs_ops mt75
|
||||||
.pcs_an_restart = mt7530_pcs_an_restart,
|
.pcs_an_restart = mt7530_pcs_an_restart,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
/* Initialise the PCS devices */
|
/* Initialise the PCS devices */
|
||||||
@@ -3133,8 +2976,6 @@ mt753x_setup(struct dsa_switch *ds)
|
@@ -3147,8 +2990,6 @@ mt753x_setup(struct dsa_switch *ds)
|
||||||
priv->pcs[i].pcs.ops = priv->info->pcs_ops;
|
priv->pcs[i].pcs.ops = priv->info->pcs_ops;
|
||||||
priv->pcs[i].priv = priv;
|
priv->pcs[i].priv = priv;
|
||||||
priv->pcs[i].port = i;
|
priv->pcs[i].port = i;
|
||||||
|
@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = priv->info->sw_setup(ds);
|
ret = priv->info->sw_setup(ds);
|
||||||
@@ -3149,6 +2990,16 @@ mt753x_setup(struct dsa_switch *ds)
|
@@ -3163,6 +3004,16 @@ mt753x_setup(struct dsa_switch *ds)
|
||||||
if (ret && priv->irq)
|
if (ret && priv->irq)
|
||||||
mt7530_free_irq_common(priv);
|
mt7530_free_irq_common(priv);
|
||||||
|
|
||||||
|
@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3240,7 +3091,7 @@ static const struct mt753x_info mt753x_t
|
@@ -3254,7 +3105,7 @@ static const struct mt753x_info mt753x_t
|
||||||
},
|
},
|
||||||
[ID_MT7531] = {
|
[ID_MT7531] = {
|
||||||
.id = ID_MT7531,
|
.id = ID_MT7531,
|
||||||
|
@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
.sw_setup = mt7531_setup,
|
.sw_setup = mt7531_setup,
|
||||||
.phy_read = mt7531_ind_phy_read,
|
.phy_read = mt7531_ind_phy_read,
|
||||||
.phy_write = mt7531_ind_phy_write,
|
.phy_write = mt7531_ind_phy_write,
|
||||||
@@ -3348,7 +3199,7 @@ static void
|
@@ -3362,7 +3213,7 @@ static void
|
||||||
mt7530_remove(struct mdio_device *mdiodev)
|
mt7530_remove(struct mdio_device *mdiodev)
|
||||||
{
|
{
|
||||||
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
|
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
|
||||||
|
@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
|
|
||||||
if (!priv)
|
if (!priv)
|
||||||
return;
|
return;
|
||||||
@@ -3367,6 +3218,10 @@ mt7530_remove(struct mdio_device *mdiode
|
@@ -3381,6 +3232,10 @@ mt7530_remove(struct mdio_device *mdiode
|
||||||
mt7530_free_irq(priv);
|
mt7530_free_irq(priv);
|
||||||
|
|
||||||
dsa_unregister_switch(priv->ds);
|
dsa_unregister_switch(priv->ds);
|
||||||
|
@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mt7530.h
|
--- a/drivers/net/dsa/mt7530.h
|
||||||
+++ b/drivers/net/dsa/mt7530.h
|
+++ b/drivers/net/dsa/mt7530.h
|
||||||
@@ -364,47 +364,8 @@ enum mt7530_vlan_port_acc_frm {
|
@@ -369,47 +369,8 @@ enum mt7530_vlan_port_acc_frm {
|
||||||
CCR_TX_OCT_CNT_BAD)
|
CCR_TX_OCT_CNT_BAD)
|
||||||
|
|
||||||
/* MT7531 SGMII register group */
|
/* MT7531 SGMII register group */
|
||||||
|
@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
||||||
|
|
||||||
/* Register for system reset */
|
/* Register for system reset */
|
||||||
#define MT7530_SYS_CTRL 0x7000
|
#define MT7530_SYS_CTRL 0x7000
|
||||||
@@ -703,13 +664,13 @@ struct mt7530_fdb {
|
@@ -708,13 +669,13 @@ struct mt7530_fdb {
|
||||||
* @pm: The matrix used to show all connections with the port.
|
* @pm: The matrix used to show all connections with the port.
|
||||||
* @pvid: The VLAN specified is to be considered a PVID at ingress. Any
|
* @pvid: The VLAN specified is to be considered a PVID at ingress. Any
|
||||||
* untagged frames will be assigned to the related VLAN.
|
* untagged frames will be assigned to the related VLAN.
|
||||||
|
|
|
@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mt7530.c
|
--- a/drivers/net/dsa/mt7530.c
|
||||||
+++ b/drivers/net/dsa/mt7530.c
|
+++ b/drivers/net/dsa/mt7530.c
|
||||||
@@ -2950,26 +2950,56 @@ static const struct regmap_bus mt7531_re
|
@@ -2964,26 +2964,56 @@ static const struct regmap_bus mt7531_re
|
||||||
.reg_update_bits = mt7530_regmap_update_bits,
|
.reg_update_bits = mt7530_regmap_update_bits,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
/* Initialise the PCS devices */
|
/* Initialise the PCS devices */
|
||||||
@@ -2991,15 +3021,11 @@ mt753x_setup(struct dsa_switch *ds)
|
@@ -3005,15 +3035,11 @@ mt753x_setup(struct dsa_switch *ds)
|
||||||
if (ret && priv->irq)
|
if (ret && priv->irq)
|
||||||
mt7530_free_irq_common(priv);
|
mt7530_free_irq_common(priv);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mt7530.c
|
--- a/drivers/net/dsa/mt7530.c
|
||||||
+++ b/drivers/net/dsa/mt7530.c
|
+++ b/drivers/net/dsa/mt7530.c
|
||||||
@@ -2923,7 +2923,7 @@ static int mt7530_regmap_read(void *cont
|
@@ -2937,7 +2937,7 @@ static int mt7530_regmap_read(void *cont
|
||||||
{
|
{
|
||||||
struct mt7530_priv *priv = context;
|
struct mt7530_priv *priv = context;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2931,23 +2931,25 @@ static int mt7530_regmap_write(void *con
|
@@ -2945,23 +2945,25 @@ static int mt7530_regmap_write(void *con
|
||||||
{
|
{
|
||||||
struct mt7530_priv *priv = context;
|
struct mt7530_priv *priv = context;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -2973,6 +2975,9 @@ mt7531_create_sgmii(struct mt7530_priv *
|
@@ -2987,6 +2989,9 @@ mt7531_create_sgmii(struct mt7530_priv *
|
||||||
mt7531_pcs_config[i]->reg_stride = 4;
|
mt7531_pcs_config[i]->reg_stride = 4;
|
||||||
mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
|
mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
|
||||||
mt7531_pcs_config[i]->max_register = 0x17c;
|
mt7531_pcs_config[i]->max_register = 0x17c;
|
||||||
|
|
|
@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -2919,22 +2940,6 @@ static const struct phylink_pcs_ops mt75
|
@@ -2933,22 +2954,6 @@ static const struct phylink_pcs_ops mt75
|
||||||
.pcs_an_restart = mt7530_pcs_an_restart,
|
.pcs_an_restart = mt7530_pcs_an_restart,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
static void
|
static void
|
||||||
mt7530_mdio_regmap_lock(void *mdio_lock)
|
mt7530_mdio_regmap_lock(void *mdio_lock)
|
||||||
{
|
{
|
||||||
@@ -2947,7 +2952,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
|
@@ -2961,7 +2966,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
|
||||||
mutex_unlock(mdio_lock);
|
mutex_unlock(mdio_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.reg_write = mt7530_regmap_write,
|
.reg_write = mt7530_regmap_write,
|
||||||
.reg_read = mt7530_regmap_read,
|
.reg_read = mt7530_regmap_read,
|
||||||
};
|
};
|
||||||
@@ -2980,7 +2985,7 @@ mt7531_create_sgmii(struct mt7530_priv *
|
@@ -2994,7 +2999,7 @@ mt7531_create_sgmii(struct mt7530_priv *
|
||||||
mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
|
mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
|
||||||
|
|
||||||
regmap = devm_regmap_init(priv->dev,
|
regmap = devm_regmap_init(priv->dev,
|
||||||
|
@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
mt7531_pcs_config[i]);
|
mt7531_pcs_config[i]);
|
||||||
if (IS_ERR(regmap)) {
|
if (IS_ERR(regmap)) {
|
||||||
ret = PTR_ERR(regmap);
|
ret = PTR_ERR(regmap);
|
||||||
@@ -3145,6 +3150,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
|
@@ -3159,6 +3164,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
|
||||||
static int
|
static int
|
||||||
mt7530_probe(struct mdio_device *mdiodev)
|
mt7530_probe(struct mdio_device *mdiodev)
|
||||||
{
|
{
|
||||||
|
@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
struct mt7530_priv *priv;
|
struct mt7530_priv *priv;
|
||||||
struct device_node *dn;
|
struct device_node *dn;
|
||||||
|
|
||||||
@@ -3224,6 +3230,21 @@ mt7530_probe(struct mdio_device *mdiodev
|
@@ -3238,6 +3244,21 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||||
mutex_init(&priv->reg_mutex);
|
mutex_init(&priv->reg_mutex);
|
||||||
dev_set_drvdata(&mdiodev->dev, priv);
|
dev_set_drvdata(&mdiodev->dev, priv);
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mt7530.h
|
--- a/drivers/net/dsa/mt7530.h
|
||||||
+++ b/drivers/net/dsa/mt7530.h
|
+++ b/drivers/net/dsa/mt7530.h
|
||||||
@@ -747,6 +747,7 @@ struct mt753x_info {
|
@@ -752,6 +752,7 @@ struct mt753x_info {
|
||||||
* @dev: The device pointer
|
* @dev: The device pointer
|
||||||
* @ds: The pointer to the dsa core structure
|
* @ds: The pointer to the dsa core structure
|
||||||
* @bus: The bus used for the device and built-in PHY
|
* @bus: The bus used for the device and built-in PHY
|
||||||
|
@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
* @rstc: The pointer to reset control used by MCM
|
* @rstc: The pointer to reset control used by MCM
|
||||||
* @core_pwr: The power supplied into the core
|
* @core_pwr: The power supplied into the core
|
||||||
* @io_pwr: The power supplied into the I/O
|
* @io_pwr: The power supplied into the I/O
|
||||||
@@ -767,6 +768,7 @@ struct mt7530_priv {
|
@@ -772,6 +773,7 @@ struct mt7530_priv {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct dsa_switch *ds;
|
struct dsa_switch *ds;
|
||||||
struct mii_bus *bus;
|
struct mii_bus *bus;
|
||||||
|
|
|
@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mt7530.c
|
--- a/drivers/net/dsa/mt7530.c
|
||||||
+++ b/drivers/net/dsa/mt7530.c
|
+++ b/drivers/net/dsa/mt7530.c
|
||||||
@@ -3031,12 +3031,6 @@ mt753x_setup(struct dsa_switch *ds)
|
@@ -3045,12 +3045,6 @@ mt753x_setup(struct dsa_switch *ds)
|
||||||
if (ret && priv->irq)
|
if (ret && priv->irq)
|
||||||
mt7530_free_irq_common(priv);
|
mt7530_free_irq_common(priv);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3153,6 +3147,7 @@ mt7530_probe(struct mdio_device *mdiodev
|
@@ -3167,6 +3161,7 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||||
static struct regmap_config *regmap_config;
|
static struct regmap_config *regmap_config;
|
||||||
struct mt7530_priv *priv;
|
struct mt7530_priv *priv;
|
||||||
struct device_node *dn;
|
struct device_node *dn;
|
||||||
|
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
dn = mdiodev->dev.of_node;
|
dn = mdiodev->dev.of_node;
|
||||||
|
|
||||||
@@ -3245,6 +3240,12 @@ mt7530_probe(struct mdio_device *mdiodev
|
@@ -3259,6 +3254,12 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||||
if (IS_ERR(priv->regmap))
|
if (IS_ERR(priv->regmap))
|
||||||
return PTR_ERR(priv->regmap);
|
return PTR_ERR(priv->regmap);
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -1109,7 +1109,6 @@ static int
|
@@ -1121,7 +1121,6 @@ static int
|
||||||
mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
|
mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
|
||||||
{
|
{
|
||||||
struct mt7530_priv *priv = ds->priv;
|
struct mt7530_priv *priv = ds->priv;
|
||||||
|
@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
int length;
|
int length;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
@@ -1120,7 +1119,7 @@ mt7530_port_change_mtu(struct dsa_switch
|
@@ -1132,7 +1131,7 @@ mt7530_port_change_mtu(struct dsa_switch
|
||||||
if (!dsa_is_cpu_port(ds, port))
|
if (!dsa_is_cpu_port(ds, port))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
val = mt7530_mii_read(priv, MT7530_GMACCR);
|
val = mt7530_mii_read(priv, MT7530_GMACCR);
|
||||||
val &= ~MAX_RX_PKT_LEN_MASK;
|
val &= ~MAX_RX_PKT_LEN_MASK;
|
||||||
@@ -1141,7 +1140,7 @@ mt7530_port_change_mtu(struct dsa_switch
|
@@ -1153,7 +1152,7 @@ mt7530_port_change_mtu(struct dsa_switch
|
||||||
|
|
||||||
mt7530_mii_write(priv, MT7530_GMACCR, val);
|
mt7530_mii_write(priv, MT7530_GMACCR, val);
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1942,10 +1941,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
|
@@ -1954,10 +1953,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
|
||||||
u32 val;
|
u32 val;
|
||||||
int p;
|
int p;
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
for (p = 0; p < MT7530_NUM_PHYS; p++) {
|
for (p = 0; p < MT7530_NUM_PHYS; p++) {
|
||||||
if (BIT(p) & val) {
|
if (BIT(p) & val) {
|
||||||
@@ -1981,7 +1980,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
|
@@ -1993,7 +1992,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
|
||||||
{
|
{
|
||||||
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
|
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1990,7 +1989,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
|
@@ -2002,7 +2001,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
|
||||||
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
|
struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
|
||||||
|
|
||||||
mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
|
mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
|
||||||
|
|
|
@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
struct mt7530_priv *priv = ds->priv;
|
struct mt7530_priv *priv = ds->priv;
|
||||||
--- a/drivers/net/dsa/mt7530.h
|
--- a/drivers/net/dsa/mt7530.h
|
||||||
+++ b/drivers/net/dsa/mt7530.h
|
+++ b/drivers/net/dsa/mt7530.h
|
||||||
@@ -682,24 +682,6 @@ enum p5_interface_select {
|
@@ -687,24 +687,6 @@ enum p5_interface_select {
|
||||||
P5_INTF_SEL_GMAC5_SGMII,
|
P5_INTF_SEL_GMAC5_SGMII,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mt7530.c
|
--- a/drivers/net/dsa/mt7530.c
|
||||||
+++ b/drivers/net/dsa/mt7530.c
|
+++ b/drivers/net/dsa/mt7530.c
|
||||||
@@ -3159,44 +3159,21 @@ static const struct of_device_id mt7530_
|
@@ -3173,44 +3173,21 @@ static const struct of_device_id mt7530_
|
||||||
MODULE_DEVICE_TABLE(of, mt7530_of_match);
|
MODULE_DEVICE_TABLE(of, mt7530_of_match);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
if (!priv->info)
|
if (!priv->info)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@@ -3210,23 +3187,53 @@ mt7530_probe(struct mdio_device *mdiodev
|
@@ -3224,23 +3201,53 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
priv->id = priv->info->id;
|
priv->id = priv->info->id;
|
||||||
|
@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
|
priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
|
||||||
GPIOD_OUT_LOW);
|
GPIOD_OUT_LOW);
|
||||||
if (IS_ERR(priv->reset)) {
|
if (IS_ERR(priv->reset)) {
|
||||||
@@ -3235,12 +3242,15 @@ mt7530_probe(struct mdio_device *mdiodev
|
@@ -3249,12 +3256,15 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mt7530.c
|
--- a/drivers/net/dsa/mt7530.c
|
||||||
+++ b/drivers/net/dsa/mt7530.c
|
+++ b/drivers/net/dsa/mt7530.c
|
||||||
@@ -3277,6 +3277,17 @@ mt7530_probe(struct mdio_device *mdiodev
|
@@ -3291,6 +3291,17 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
mt7530_remove(struct mdio_device *mdiodev)
|
mt7530_remove(struct mdio_device *mdiodev)
|
||||||
{
|
{
|
||||||
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
|
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
|
||||||
@@ -3295,15 +3306,10 @@ mt7530_remove(struct mdio_device *mdiode
|
@@ -3309,15 +3320,10 @@ mt7530_remove(struct mdio_device *mdiode
|
||||||
dev_err(priv->dev, "Failed to disable io pwr: %d\n",
|
dev_err(priv->dev, "Failed to disable io pwr: %d\n",
|
||||||
ret);
|
ret);
|
||||||
|
|
||||||
|
|
|
@ -416,7 +416,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
static u32
|
static u32
|
||||||
mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
|
mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
|
||||||
{
|
{
|
||||||
@@ -2957,72 +2908,6 @@ static const struct phylink_pcs_ops mt75
|
@@ -2971,72 +2922,6 @@ static const struct phylink_pcs_ops mt75
|
||||||
.pcs_an_restart = mt7530_pcs_an_restart,
|
.pcs_an_restart = mt7530_pcs_an_restart,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
static int
|
static int
|
||||||
mt753x_setup(struct dsa_switch *ds)
|
mt753x_setup(struct dsa_switch *ds)
|
||||||
{
|
{
|
||||||
@@ -3081,7 +2966,7 @@ static int mt753x_set_mac_eee(struct dsa
|
@@ -3095,7 +2980,7 @@ static int mt753x_set_mac_eee(struct dsa
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.get_tag_protocol = mtk_get_tag_protocol,
|
.get_tag_protocol = mtk_get_tag_protocol,
|
||||||
.setup = mt753x_setup,
|
.setup = mt753x_setup,
|
||||||
.get_strings = mt7530_get_strings,
|
.get_strings = mt7530_get_strings,
|
||||||
@@ -3115,8 +3000,9 @@ static const struct dsa_switch_ops mt753
|
@@ -3129,8 +3014,9 @@ static const struct dsa_switch_ops mt753
|
||||||
.get_mac_eee = mt753x_get_mac_eee,
|
.get_mac_eee = mt753x_get_mac_eee,
|
||||||
.set_mac_eee = mt753x_set_mac_eee,
|
.set_mac_eee = mt753x_set_mac_eee,
|
||||||
};
|
};
|
||||||
|
@ -509,7 +509,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
[ID_MT7621] = {
|
[ID_MT7621] = {
|
||||||
.id = ID_MT7621,
|
.id = ID_MT7621,
|
||||||
.pcs_ops = &mt7530_pcs_ops,
|
.pcs_ops = &mt7530_pcs_ops,
|
||||||
@@ -3149,16 +3035,9 @@ static const struct mt753x_info mt753x_t
|
@@ -3163,16 +3049,9 @@ static const struct mt753x_info mt753x_t
|
||||||
.mac_port_config = mt7531_mac_config,
|
.mac_port_config = mt7531_mac_config,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -528,7 +528,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
mt7530_probe_common(struct mt7530_priv *priv)
|
mt7530_probe_common(struct mt7530_priv *priv)
|
||||||
{
|
{
|
||||||
struct device *dev = priv->dev;
|
struct device *dev = priv->dev;
|
||||||
@@ -3195,88 +3074,9 @@ mt7530_probe_common(struct mt7530_priv *
|
@@ -3209,88 +3088,9 @@ mt7530_probe_common(struct mt7530_priv *
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -619,7 +619,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
mt7530_remove_common(struct mt7530_priv *priv)
|
mt7530_remove_common(struct mt7530_priv *priv)
|
||||||
{
|
{
|
||||||
if (priv->irq)
|
if (priv->irq)
|
||||||
@@ -3286,55 +3086,7 @@ mt7530_remove_common(struct mt7530_priv
|
@@ -3300,55 +3100,7 @@ mt7530_remove_common(struct mt7530_priv
|
||||||
|
|
||||||
mutex_destroy(&priv->reg_mutex);
|
mutex_destroy(&priv->reg_mutex);
|
||||||
}
|
}
|
||||||
|
@ -678,7 +678,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch");
|
MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch");
|
||||||
--- a/drivers/net/dsa/mt7530.h
|
--- a/drivers/net/dsa/mt7530.h
|
||||||
+++ b/drivers/net/dsa/mt7530.h
|
+++ b/drivers/net/dsa/mt7530.h
|
||||||
@@ -807,4 +807,10 @@ static inline void INIT_MT7530_DUMMY_POL
|
@@ -812,4 +812,10 @@ static inline void INIT_MT7530_DUMMY_POL
|
||||||
p->reg = reg;
|
p->reg = reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue