mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add alpha version for kernel 6.12 support
This commit is contained in:
parent
2d47118221
commit
6e713f6367
281 changed files with 65491 additions and 0 deletions
127
6.12/package/boot/uboot-envtools/files/mediatek_filogic
Normal file
127
6.12/package/boot/uboot-envtools/files/mediatek_filogic
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ax59u)
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000"
|
||||
;;
|
||||
bananapi,bpi-r3)
|
||||
rootdev="$(cmdline_get_var root)"
|
||||
rootdev="${rootdev##*/}"
|
||||
rootdev="${rootdev%%p[0-9]*}"
|
||||
case "$rootdev" in
|
||||
mmc*)
|
||||
local envdev=$(find_mmc_part "ubootenv" $rootdev)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
mtd*)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x20000" "0x20000" "0x20000" "1"
|
||||
;;
|
||||
ubi*)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cmcc,rax3000m)
|
||||
case "$(cmdline_get_var root)" in
|
||||
/dev/mmc*)
|
||||
local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
|
||||
;;
|
||||
*)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
cetron,ct3003|\
|
||||
netgear,wax220|\
|
||||
zbtlink,zbt-z8102ax|\
|
||||
z8102ax-128m|\
|
||||
z8102ax-64m|\
|
||||
zbtlink,zbt-z8103ax)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
h3c,magic-nx30-pro|\
|
||||
jcg,q30-pro|\
|
||||
qihoo,360t7|\
|
||||
tplink,tl-xdr4288|\
|
||||
tplink,tl-xdr6086|\
|
||||
tplink,tl-xdr6088|\
|
||||
xiaomi,mi-router-ax3000t-ubootmod|\
|
||||
xiaomi,mi-router-wr30u-ubootmod|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
||||
;;
|
||||
glinet,gl-mt2500|\
|
||||
glinet,gl-mt6000)
|
||||
local envdev=$(find_mmc_part "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
|
||||
;;
|
||||
glinet,gl-mt3000)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
|
||||
;;
|
||||
mercusys,mr90x-v1|\
|
||||
routerich,ax3000)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
|
||||
;;
|
||||
ubnt,unifi-6-plus)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t|\
|
||||
xiaomi,mi-router-wr30u-112m-nmbm|\
|
||||
xiaomi,mi-router-wr30u-stock|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
||||
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
||||
;;
|
||||
zyxel,ex5601-t0)
|
||||
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x40000" "2"
|
||||
;;
|
||||
zyxel,ex5601-t0-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
||||
;;
|
||||
zyxel,ex5700-telenor)
|
||||
ubootenv_add_uci_config "/dev/ubootenv" "0x0" "0x4000" "0x4000" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config
|
||||
|
||||
exit 0
|
||||
1740
6.12/package/boot/uboot-mediatek/patches/900-add-z8102ax.patch
Normal file
1740
6.12/package/boot/uboot-mediatek/patches/900-add-z8102ax.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
index 1dd0ff2a1a1abf..8537a93d6a8d2f 100644
|
||||
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
@@ -674,7 +674,11 @@ static void gpio_keys_irq_close(struct gpio_keys_button_dev *bdev)
|
||||
}
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
static int gpio_keys_remove(struct platform_device *pdev)
|
||||
+#else
|
||||
+static void gpio_keys_remove(struct platform_device *pdev)
|
||||
+#endif
|
||||
{
|
||||
struct gpio_keys_button_dev *bdev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -685,7 +689,9 @@ static int gpio_keys_remove(struct platform_device *pdev)
|
||||
else
|
||||
gpio_keys_irq_close(bdev);
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static struct platform_driver gpio_keys_driver = {
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
|
||||
index eb1cf8494abe2..00dc4dcd9424f 100644
|
||||
--- a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
|
||||
+++ b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
|
||||
@@ -300,7 +300,11 @@ static int nct5104d_gpio_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
static int nct5104d_gpio_remove(struct platform_device *pdev)
|
||||
+#else
|
||||
+static void nct5104d_gpio_remove(struct platform_device *pdev)
|
||||
+#endif
|
||||
{
|
||||
int i;
|
||||
struct nct5104d_gpio_data *data = platform_get_drvdata(pdev);
|
||||
@@ -311,7 +315,9 @@ static int nct5104d_gpio_remove(struct platform_device *pdev)
|
||||
gpiochip_remove (&bank->chip);
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||
return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static int __init nct5104d_find(int addr, struct nct5104d_sio *sio)
|
||||
723
6.12/package/kernel/linux/modules/fs.mk
Normal file
723
6.12/package/kernel/linux/modules/fs.mk
Normal file
|
|
@ -0,0 +1,723 @@
|
|||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
FS_MENU:=Filesystems
|
||||
|
||||
define KernelPackage/fs-9p
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Plan 9 Resource Sharing Support
|
||||
DEPENDS:=+kmod-9pnet +LINUX_6_1:kmod-fs-netfs +LINUX_6_6:kmod-fs-netfs
|
||||
KCONFIG:=\
|
||||
CONFIG_9P_FS \
|
||||
CONFIG_9P_FS_POSIX_ACL=n \
|
||||
CONFIG_9P_FS_SECURITY=n \
|
||||
CONFIG_9P_FSCACHE=n
|
||||
FILES:=$(LINUX_DIR)/fs/9p/9p.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,9p)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-9p/description
|
||||
Kernel module for Plan 9 Resource Sharing Support support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-9p))
|
||||
|
||||
|
||||
define KernelPackage/fs-afs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Andrew FileSystem client
|
||||
DEFAULT:=n
|
||||
DEPENDS:=+kmod-rxrpc +kmod-dnsresolver +kmod-fs-fscache
|
||||
KCONFIG:=\
|
||||
CONFIG_AFS_FS=m \
|
||||
CONFIG_AFS_DEBUG=n \
|
||||
CONFIG_AFS_FSCACHE=y
|
||||
FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,kafs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-afs/description
|
||||
Kernel module for Andrew FileSystem client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-afs))
|
||||
|
||||
define KernelPackage/fs-autofs4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=AUTOFS4 filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_AUTOFS4_FS \
|
||||
CONFIG_AUTOFS_FS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/autofs/autofs4.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,autofs4)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-autofs4/description
|
||||
Kernel module for AutoFS4 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-autofs4))
|
||||
|
||||
|
||||
define KernelPackage/fs-btrfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=BTRFS filesystem support
|
||||
DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd
|
||||
KCONFIG:=\
|
||||
CONFIG_BTRFS_FS \
|
||||
CONFIG_BTRFS_FS_CHECK_INTEGRITY=n
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/fs/btrfs/btrfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,btrfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-btrfs/description
|
||||
Kernel module for BTRFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-btrfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-smbfs-common
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SMBFS common dependencies support
|
||||
HIDDEN:=1
|
||||
DEPENDS:=+LINUX_6_6:kmod-fs-netfs +LINUX_6_6:kmod-nls-ucs2-utils
|
||||
KCONFIG:=\
|
||||
CONFIG_SMBFS_COMMON@lt6.1 \
|
||||
CONFIG_SMBFS@ge6.1
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@lt6.1 \
|
||||
$(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
|
||||
|
||||
define KernelPackage/fs-smbfs-common/description
|
||||
Kernel module dependency for CIFS or SMB_SERVER support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-smbfs-common))
|
||||
|
||||
|
||||
define KernelPackage/fs-cifs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=CIFS support
|
||||
KCONFIG:= \
|
||||
CONFIG_CIFS \
|
||||
CONFIG_CIFS_DFS_UPCALL=n \
|
||||
CONFIG_CIFS_UPCALL=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/cifs/cifs.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/client/cifs.ko@ge6.1
|
||||
AUTOLOAD:=$(call AutoLoad,30,cifs)
|
||||
$(call AddDepends/nls)
|
||||
DEPENDS+= \
|
||||
+kmod-fs-smbfs-common \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+kmod-asn1-decoder \
|
||||
+kmod-oid-registry \
|
||||
+kmod-dnsresolver
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cifs/description
|
||||
Kernel module for CIFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-cifs))
|
||||
|
||||
|
||||
define KernelPackage/fs-configfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Configuration filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_CONFIGFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/configfs/configfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,configfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-configfs/description
|
||||
Kernel module for configfs support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-configfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-cramfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Compressed RAM/ROM filesystem support
|
||||
DEPENDS:=+kmod-lib-zlib-inflate
|
||||
KCONFIG:= \
|
||||
CONFIG_CRAMFS
|
||||
FILES:=$(LINUX_DIR)/fs/cramfs/cramfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,cramfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cramfs/description
|
||||
Kernel module for cramfs support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-cramfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-efivarfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=efivar filesystem support
|
||||
KCONFIG:=CONFIG_EFIVAR_FS
|
||||
FILES:=$(LINUX_DIR)/fs/efivarfs/efivarfs.ko
|
||||
DEPENDS:=@(x86_64||x86)
|
||||
AUTOLOAD:=$(call Autoload,90,efivarfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-efivarfs/description
|
||||
Kernel module to support efivarfs file system mountpoint.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-efivarfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-exfat
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=exFAT filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_EXFAT_FS \
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
FILES:= $(LINUX_DIR)/fs/exfat/exfat.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,exfat,1)
|
||||
DEPENDS:=+kmod-nls-base
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-exfat/description
|
||||
Kernel module for exFAT filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-exfat))
|
||||
|
||||
|
||||
define KernelPackage/fs-exportfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=exportfs kernel server support
|
||||
KCONFIG:=CONFIG_EXPORTFS
|
||||
FILES=$(LINUX_DIR)/fs/exportfs/exportfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,exportfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-exportfs/description
|
||||
Kernel module for exportfs. Needed for some other modules.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-exportfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ext4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=EXT4 filesystem support
|
||||
DEPENDS := \
|
||||
+kmod-lib-crc16 \
|
||||
+kmod-crypto-hash \
|
||||
+kmod-crypto-crc32c
|
||||
KCONFIG:= \
|
||||
CONFIG_EXT4_FS \
|
||||
CONFIG_EXT4_ENCRYPTION=n \
|
||||
CONFIG_JBD2
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ext4/ext4.ko \
|
||||
$(LINUX_DIR)/fs/jbd2/jbd2.ko \
|
||||
$(LINUX_DIR)/fs/mbcache.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,mbcache jbd2 ext4,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ext4/description
|
||||
Kernel module for EXT4 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ext4))
|
||||
|
||||
|
||||
define KernelPackage/fs-f2fs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=F2FS filesystem support
|
||||
DEPENDS:= +kmod-crypto-hash +kmod-crypto-crc32 +kmod-nls-base
|
||||
KCONFIG:=CONFIG_F2FS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/f2fs/f2fs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,f2fs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-f2fs/description
|
||||
Kernel module for F2FS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-f2fs))
|
||||
|
||||
|
||||
#define KernelPackage/fs-fscache
|
||||
# SUBMENU:=$(FS_MENU)
|
||||
# TITLE:=General filesystem local cache manager
|
||||
# DEPENDS:=+kmod-fs-netfs
|
||||
# KCONFIG:=\
|
||||
# CONFIG_FSCACHE \
|
||||
# CONFIG_FSCACHE_STATS=y \
|
||||
# CONFIG_FSCACHE_HISTOGRAM=n \
|
||||
# CONFIG_FSCACHE_DEBUG=n \
|
||||
# CONFIG_FSCACHE_OBJECT_LIST=n \
|
||||
# CONFIG_CACHEFILES \
|
||||
# CONFIG_CACHEFILES_DEBUG=n \
|
||||
# CONFIG_CACHEFILES_HISTOGRAM=n \
|
||||
# CONFIG_CACHEFILES_ERROR_INJECTION=n@ge5.17 \
|
||||
# CONFIG_CACHEFILES_ONDEMAND=n@ge5.19
|
||||
# FILES:= \
|
||||
# $(LINUX_DIR)/fs/fscache/fscache.ko \
|
||||
# $(LINUX_DIR)/fs/cachefiles/cachefiles.ko
|
||||
# AUTOLOAD:=$(call AutoLoad,29,fscache cachefiles)
|
||||
#endef
|
||||
|
||||
#$(eval $(call KernelPackage,fs-fscache))
|
||||
|
||||
|
||||
define KernelPackage/fs-hfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=HFS filesystem support
|
||||
DEPENDS:=+kmod-cdrom
|
||||
KCONFIG:=CONFIG_HFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/hfs/hfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,hfs)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-hfs/description
|
||||
Kernel module for HFS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-hfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-hfsplus
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=HFS+ filesystem support
|
||||
DEPENDS:=+kmod-cdrom
|
||||
KCONFIG:=CONFIG_HFSPLUS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/hfsplus/hfsplus.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,hfsplus)
|
||||
$(call AddDepends/nls,utf8)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-hfsplus/description
|
||||
Kernel module for HFS+ filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-hfsplus))
|
||||
|
||||
|
||||
define KernelPackage/fs-isofs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=ISO9660 filesystem support
|
||||
DEPENDS:=+kmod-lib-zlib-inflate +kmod-cdrom
|
||||
KCONFIG:=CONFIG_ISO9660_FS CONFIG_JOLIET=y CONFIG_ZISOFS=n
|
||||
FILES:=$(LINUX_DIR)/fs/isofs/isofs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,isofs)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-isofs/description
|
||||
Kernel module for ISO9660 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-isofs))
|
||||
|
||||
|
||||
define KernelPackage/fs-jfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=JFS filesystem support
|
||||
KCONFIG:=CONFIG_JFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/jfs/jfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,jfs,1)
|
||||
DEPENDS:=+LINUX_6_6:kmod-nls-ucs2-utils
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-jfs/description
|
||||
Kernel module for JFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-jfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ksmbd
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SMB kernel server support
|
||||
DEPENDS:= \
|
||||
+kmod-nls-base \
|
||||
+kmod-nls-utf8 \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-gcm \
|
||||
+kmod-asn1-decoder \
|
||||
+kmod-oid-registry \
|
||||
+kmod-fs-smbfs-common
|
||||
KCONFIG:= \
|
||||
CONFIG_SMB_SERVER \
|
||||
CONFIG_SMB_SERVER_SMBDIRECT=n \
|
||||
CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=n \
|
||||
CONFIG_SMB_SERVER_KERBEROS5=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ksmbd/ksmbd.ko@lt6.1 \
|
||||
$(LINUX_DIR)/fs/smb/server/ksmbd.ko@ge6.1
|
||||
AUTOLOAD:=$(call AutoLoad,41,ksmbd)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ksmbd/description
|
||||
Kernel module for SMB kernel server support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ksmbd))
|
||||
|
||||
|
||||
define KernelPackage/fs-minix
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Minix filesystem support
|
||||
KCONFIG:=CONFIG_MINIX_FS
|
||||
FILES:=$(LINUX_DIR)/fs/minix/minix.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,minix)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-minix/description
|
||||
Kernel module for Minix filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-minix))
|
||||
|
||||
|
||||
define KernelPackage/fs-msdos
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=MSDOS filesystem support
|
||||
DEPENDS:=+kmod-fs-vfat
|
||||
KCONFIG:=CONFIG_MSDOS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/fat/msdos.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,msdos)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-msdos/description
|
||||
Kernel module for MSDOS filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-msdos))
|
||||
|
||||
|
||||
define KernelPackage/fs-netfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Network Filesystems support
|
||||
KCONFIG:= CONFIG_NETFS_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,netfs)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-netfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs-common +kmod-dnsresolver
|
||||
KCONFIG:= \
|
||||
CONFIG_NFS_FS \
|
||||
CONFIG_NFS_USE_LEGACY_DNS=n \
|
||||
CONFIG_NFS_USE_NEW_IDMAPPER=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,nfs)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs/description
|
||||
Kernel module for NFS client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-common
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Common NFS filesystem modules
|
||||
DEPENDS:=+kmod-oid-registry
|
||||
KCONFIG:= \
|
||||
CONFIG_LOCKD \
|
||||
CONFIG_SUNRPC \
|
||||
CONFIG_GRACE_PERIOD \
|
||||
CONFIG_NFS_V4=y \
|
||||
CONFIG_NFS_V4_1=y \
|
||||
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" \
|
||||
CONFIG_NFS_V4_1_MIGRATION=n \
|
||||
CONFIG_NFS_V4_2=y \
|
||||
CONFIG_NFS_V4_2_READ_PLUS=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/lockd/lockd.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/sunrpc.ko \
|
||||
$(LINUX_DIR)/fs/nfs_common/grace.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,grace sunrpc lockd)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-common))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-common-rpcsec
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS Secure RPC
|
||||
DEPENDS:= \
|
||||
+kmod-fs-nfs-common \
|
||||
+kmod-crypto-des \
|
||||
+kmod-crypto-cbc \
|
||||
+kmod-crypto-cts \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha1 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-arc4
|
||||
KCONFIG:= \
|
||||
CONFIG_SUNRPC_GSS \
|
||||
CONFIG_RPCSEC_GSS_KRB5
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/rpcsec_gss_krb5.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,auth_rpcgss rpcsec_gss_krb5)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-common-rpcsec/description
|
||||
Kernel modules for NFS Secure RPC
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-common-rpcsec))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-v3
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS3 filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfsv3.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,nfsv3)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-v3/description
|
||||
Kernel module for NFS v3 client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-v3))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-v4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS4 filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs
|
||||
KCONFIG:= \
|
||||
CONFIG_NFS_V4=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/nfs/nfsv4.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,nfsv4)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-v4/description
|
||||
Kernel module for NFS v4 client support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-v4))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfsd
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS kernel server support
|
||||
DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs +kmod-fs-nfs-common-rpcsec
|
||||
KCONFIG:= \
|
||||
CONFIG_NFSD \
|
||||
CONFIG_NFSD_V4=y \
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=n \
|
||||
CONFIG_NFSD_BLOCKLAYOUT=n \
|
||||
CONFIG_NFSD_SCSILAYOUT=n \
|
||||
CONFIG_NFSD_FLEXFILELAYOUT=n \
|
||||
CONFIG_NFSD_FAULT_INJECTION=n \
|
||||
CONFIG_NFSD_V4_2_INTER_SSC=n
|
||||
FILES:=$(LINUX_DIR)/fs/nfsd/nfsd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,nfsd)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfsd/description
|
||||
Kernel module for NFS kernel server support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfsd))
|
||||
|
||||
|
||||
#define KernelPackage/fs-ntfs
|
||||
# SUBMENU:=$(FS_MENU)
|
||||
# TITLE:=NTFS filesystem read-only (old driver) support
|
||||
# KCONFIG:=CONFIG_NTFS_FS
|
||||
# FILES:=$(LINUX_DIR)/fs/ntfs/ntfs.ko
|
||||
# AUTOLOAD:=$(call AutoLoad,30,ntfs)
|
||||
# $(call AddDepends/nls)
|
||||
#endef
|
||||
|
||||
#define KernelPackage/fs-ntfs/description
|
||||
# Kernel module for limited NTFS filesystem support. Support for writing
|
||||
# is extremely limited and disabled as a result.
|
||||
#endef
|
||||
|
||||
#$(eval $(call KernelPackage,fs-ntfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-ntfs3
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NTFS filesystem read & write (new driver) support
|
||||
KCONFIG:= CONFIG_NTFS3_FS CONFIG_NTFS3_FS_POSIX_ACL=y
|
||||
FILES:=$(LINUX_DIR)/fs/ntfs3/ntfs3.ko
|
||||
$(call AddDepends/nls)
|
||||
AUTOLOAD:=$(call AutoLoad,80,ntfs3)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ntfs3/description
|
||||
Kernel module for fully functional NTFS filesystem support. It allows
|
||||
reading as well as writing.
|
||||
|
||||
It supports NTFS versions up to 3.1.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ntfs3))
|
||||
|
||||
|
||||
define KernelPackage/fs-reiserfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=ReiserFS filesystem support
|
||||
KCONFIG:=CONFIG_REISERFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/reiserfs/reiserfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,reiserfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-reiserfs/description
|
||||
Kernel module for ReiserFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-reiserfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-squashfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=SquashFS 4.0 filesystem support
|
||||
KCONFIG:=CONFIG_SQUASHFS \
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
FILES:=$(LINUX_DIR)/fs/squashfs/squashfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,squashfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-squashfs/description
|
||||
Kernel module for SquashFS 4.0 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-squashfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-udf
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=UDF filesystem support
|
||||
KCONFIG:=CONFIG_UDF_FS
|
||||
FILES:=$(LINUX_DIR)/fs/udf/udf.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,udf)
|
||||
DEPENDS:=+kmod-lib-crc-itu-t +kmod-cdrom
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-udf/description
|
||||
Kernel module for UDF filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-udf))
|
||||
|
||||
|
||||
define KernelPackage/fs-vfat
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=VFAT filesystem support
|
||||
KCONFIG:= \
|
||||
CONFIG_FAT_FS \
|
||||
CONFIG_VFAT_FS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/fat/fat.ko \
|
||||
$(LINUX_DIR)/fs/fat/vfat.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,fat vfat,1)
|
||||
$(call AddDepends/nls,cp437 iso8859-1 utf8)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-vfat/description
|
||||
Kernel module for VFAT filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-vfat))
|
||||
|
||||
|
||||
define KernelPackage/fs-xfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=XFS filesystem support
|
||||
KCONFIG:=CONFIG_XFS_FS
|
||||
DEPENDS:= +kmod-fs-exportfs +kmod-lib-crc32c
|
||||
FILES:=$(LINUX_DIR)/fs/xfs/xfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,xfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-xfs/description
|
||||
Kernel module for XFS support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-xfs))
|
||||
|
||||
|
||||
define KernelPackage/fuse
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=FUSE (Filesystem in Userspace) support
|
||||
KCONFIG:= CONFIG_FUSE_FS
|
||||
FILES:=$(LINUX_DIR)/fs/fuse/fuse.ko
|
||||
AUTOLOAD:=$(call AutoLoad,80,fuse)
|
||||
endef
|
||||
|
||||
define KernelPackage/fuse/description
|
||||
Kernel module for userspace filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fuse))
|
||||
|
||||
|
||||
define KernelPackage/pstore
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Pstore file system
|
||||
DEFAULT:=m if ALL_KMODS
|
||||
KCONFIG:= \
|
||||
CONFIG_PSTORE \
|
||||
CONFIG_PSTORE_COMPRESS=y \
|
||||
CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" \
|
||||
CONFIG_PSTORE_DEFLATE_COMPRESS=y \
|
||||
CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
|
||||
FILES:= $(LINUX_DIR)/fs/pstore/pstore.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,pstore,1)
|
||||
DEPENDS:=+LINUX_6_6:kmod-lib-zlib-deflate +LINUX_6_6:kmod-lib-zlib-inflate
|
||||
endef
|
||||
|
||||
define KernelPackage/pstore/description
|
||||
Kernel module for pstore filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pstore))
|
||||
1153
6.12/package/kernel/linux/modules/other.mk
Normal file
1153
6.12/package/kernel/linux/modules/other.mk
Normal file
File diff suppressed because it is too large
Load diff
1269
6.12/package/kernel/linux/modules/video.mk
Normal file
1269
6.12/package/kernel/linux/modules/video.mk
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,403 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/channel.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/channel.c
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "ath9k.h"
|
||||
+#include "hsr.h"
|
||||
|
||||
/* Set/change channels. If the channel is really being changed, it's done
|
||||
* by reseting the chip. To accomplish this we must first cleanup any pending
|
||||
@@ -22,6 +23,7 @@
|
||||
*/
|
||||
static int ath_set_channel(struct ath_softc *sc)
|
||||
{
|
||||
+ struct device_node *np = sc->dev->of_node;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_hw *hw = sc->hw;
|
||||
@@ -42,6 +44,11 @@ static int ath_set_channel(struct ath_so
|
||||
ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n",
|
||||
chan->center_freq, chandef->width);
|
||||
|
||||
+ if (of_property_read_bool(np, "ubnt,hsr")) {
|
||||
+ ath9k_hsr_enable(ah, chandef->width, chan->center_freq);
|
||||
+ ath9k_hsr_status(ah);
|
||||
+ }
|
||||
+
|
||||
/* update survey stats for the old channel before switching */
|
||||
spin_lock_irqsave(&common->cc_lock, flags);
|
||||
ath_update_survey_stats(sc);
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hsr.c
|
||||
@@ -0,0 +1,247 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * The MIT License (MIT)
|
||||
+ *
|
||||
+ * Copyright (c) 2015 Kirill Berezin
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+ * of this software and associated documentation files (the "Software"), to deal
|
||||
+ * in the Software without restriction, including without limitation the rights
|
||||
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
+ * copies of the Software, and to permit persons to whom the Software is
|
||||
+ * furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
+ * SOFTWARE.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/time.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/etherdevice.h>
|
||||
+#include <linux/rtnetlink.h>
|
||||
+#include <linux/unaligned.h>
|
||||
+
|
||||
+#include "hw.h"
|
||||
+#include "ath9k.h"
|
||||
+
|
||||
+#define HSR_GPIO_CSN 8
|
||||
+#define HSR_GPIO_CLK 6
|
||||
+#define HSR_GPIO_DOUT 7
|
||||
+#define HSR_GPIO_DIN 5
|
||||
+
|
||||
+/* delays are in useconds */
|
||||
+#define HSR_DELAY_HALF_TICK 100
|
||||
+#define HSR_DELAY_PRE_WRITE 75
|
||||
+#define HSR_DELAY_FINAL 20000
|
||||
+#define HSR_DELAY_TRAILING 200
|
||||
+
|
||||
+void ath9k_hsr_init(struct ath_hw *ah)
|
||||
+{
|
||||
+ ath9k_hw_gpio_request_in(ah, HSR_GPIO_DIN, NULL);
|
||||
+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CSN, NULL,
|
||||
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_CLK, NULL,
|
||||
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
+ ath9k_hw_gpio_request_out(ah, HSR_GPIO_DOUT, NULL,
|
||||
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1);
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0);
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, 0);
|
||||
+
|
||||
+ udelay(HSR_DELAY_TRAILING);
|
||||
+}
|
||||
+
|
||||
+static u32 ath9k_hsr_write_byte(struct ath_hw *ah, int delay, u32 value)
|
||||
+{
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ int i;
|
||||
+ u32 rval = 0;
|
||||
+
|
||||
+ udelay(delay);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 0);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ for (i = 0; i < 8; ++i) {
|
||||
+ rval = rval << 1;
|
||||
+
|
||||
+ /* pattern is left to right, that is 7-th bit runs first */
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_DOUT, (value >> (7 - i)) & 0x1);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 1);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ rval |= ath9k_hw_gpio_get(ah, HSR_GPIO_DIN);
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CLK, 0);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+ }
|
||||
+
|
||||
+ ath9k_hw_set_gpio(ah, HSR_GPIO_CSN, 1);
|
||||
+ udelay(HSR_DELAY_HALF_TICK);
|
||||
+
|
||||
+ ath_dbg(common, CONFIG, "ath9k_hsr_write_byte: write byte %d return value is %d %c\n",
|
||||
+ value, rval, rval > 32 ? rval : '-');
|
||||
+
|
||||
+ return rval & 0xff;
|
||||
+}
|
||||
+
|
||||
+static int ath9k_hsr_write_a_chain(struct ath_hw *ah, char *chain, int items)
|
||||
+{
|
||||
+ int status = 0;
|
||||
+ int i = 0;
|
||||
+ int err;
|
||||
+
|
||||
+ /* a preamble */
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+
|
||||
+ /* clear HSR's reply buffer */
|
||||
+ if (status) {
|
||||
+ int loop = 0;
|
||||
+
|
||||
+ for (loop = 0; (loop < 42) && status; ++loop)
|
||||
+ status = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE,
|
||||
+ 0);
|
||||
+
|
||||
+ if (loop >= 42) {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_write_a_chain: can't clear an output buffer after a 42 cycles.\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; (i < items) && (chain[i] != 0); ++i)
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, (u32)chain[i]);
|
||||
+
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ mdelay(HSR_DELAY_FINAL / 1000);
|
||||
+
|
||||
+ /* reply */
|
||||
+ memset(chain, 0, items);
|
||||
+
|
||||
+ ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ udelay(HSR_DELAY_TRAILING);
|
||||
+
|
||||
+ for (i = 0; i < (items - 1); ++i) {
|
||||
+ u32 ret;
|
||||
+
|
||||
+ ret = ath9k_hsr_write_byte(ah, HSR_DELAY_PRE_WRITE, 0);
|
||||
+ if (ret != 0)
|
||||
+ chain[i] = (char)ret;
|
||||
+ else
|
||||
+ break;
|
||||
+
|
||||
+ udelay(HSR_DELAY_TRAILING);
|
||||
+ }
|
||||
+
|
||||
+ if (i <= 1)
|
||||
+ return 0;
|
||||
+
|
||||
+ err = kstrtoint(chain + 1, 10, &i);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+int ath9k_hsr_disable(struct ath_hw *ah)
|
||||
+{
|
||||
+ char cmd[10] = {'b', '4', '0', 0, 0, 0, 0, 0, 0, 0};
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if ((ret > 0) && (*cmd == 'B'))
|
||||
+ return 0;
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq)
|
||||
+{
|
||||
+ char cmd[10];
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Bandwidth argument is 0 sometimes. Assume default 802.11bgn
|
||||
+ * 20MHz on invalid values
|
||||
+ */
|
||||
+ if ((bw != 5) && (bw != 10) && (bw != 20) && (bw != 40))
|
||||
+ bw = 20;
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'b';
|
||||
+ snprintf(cmd + 1, 3, "%02d", bw);
|
||||
+
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if ((*cmd != 'B') || (ret != bw)) {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed changing bandwidth -> set (%d,%d) reply (%d, %d)\n",
|
||||
+ 'b', bw, *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'x';
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if (*cmd != 'X') {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed 'x' command -> reply (%d, %d)\n",
|
||||
+ *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'm';
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if (*cmd != 'M') {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed 'm' command -> reply (%d, %d)\n",
|
||||
+ *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ memset(cmd, 0, sizeof(cmd));
|
||||
+ *cmd = 'f';
|
||||
+ snprintf(cmd + 1, 6, "%05d", fq);
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if ((*cmd != 'F') && (ret != fq)) {
|
||||
+ ATH_DBG_WARN(1,
|
||||
+ "ath9k_hsr_enable: failed set frequency -> reply (%d, %d)\n",
|
||||
+ *cmd, ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int ath9k_hsr_status(struct ath_hw *ah)
|
||||
+{
|
||||
+ char cmd[10] = {'s', 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = ath9k_hsr_write_a_chain(ah, cmd, sizeof(cmd));
|
||||
+ if (*cmd != 'S') {
|
||||
+ ATH_DBG_WARN(1, "ath9k_hsr_status: returned %d,%d\n", *cmd,
|
||||
+ ret);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hsr.h
|
||||
@@ -0,0 +1,48 @@
|
||||
+/*
|
||||
+ * The MIT License (MIT)
|
||||
+ *
|
||||
+ * Copyright (c) 2015 Kirill Berezin
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+ * of this software and associated documentation files (the "Software"), to deal
|
||||
+ * in the Software without restriction, including without limitation the rights
|
||||
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
+ * copies of the Software, and to permit persons to whom the Software is
|
||||
+ * furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
+ * SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef HSR_H
|
||||
+#define HSR_H
|
||||
+
|
||||
+#ifdef CPTCFG_ATH9K_UBNTHSR
|
||||
+
|
||||
+void ath9k_hsr_init(struct ath_hw *ah);
|
||||
+int ath9k_hsr_disable(struct ath_hw *ah);
|
||||
+int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq);
|
||||
+int ath9k_hsr_status(struct ath_hw *ah);
|
||||
+
|
||||
+#else
|
||||
+static inline void ath9k_hsr_init(struct ath_hw *ah) {}
|
||||
+
|
||||
+static inline int ath9k_hsr_enable(struct ath_hw *ah, int bw, int fq)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline int ath9k_hsr_disable(struct ath_hw *ah) { return 0; }
|
||||
+static inline int ath9k_hsr_status(struct ath_hw *ah) { return 0; }
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#endif /* HSR_H */
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include "ath9k.h"
|
||||
#include "btcoex.h"
|
||||
+#include "hsr.h"
|
||||
|
||||
static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
u32 queues, bool drop);
|
||||
@@ -658,6 +659,7 @@ void ath_reset_work(struct work_struct *
|
||||
static int ath9k_start(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
+ struct device_node *np = sc->dev->of_node;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
|
||||
@@ -736,6 +738,11 @@ static int ath9k_start(struct ieee80211_
|
||||
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||
}
|
||||
|
||||
+ if (of_property_read_bool(np, "ubnt,hsr")) {
|
||||
+ ath9k_hsr_init(ah);
|
||||
+ ath9k_hsr_disable(ah);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Reset key cache to sane defaults (all entries cleared) instead of
|
||||
* semi-random values after suspend/resume.
|
||||
--- a/drivers/net/wireless/ath/ath9k/Makefile
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Makefile
|
||||
@@ -17,6 +17,7 @@ ath9k-$(CPTCFG_ATH9K_DFS_CERTIFIED) += d
|
||||
ath9k-$(CPTCFG_ATH9K_TX99) += tx99.o
|
||||
ath9k-$(CPTCFG_ATH9K_WOW) += wow.o
|
||||
ath9k-$(CPTCFG_ATH9K_HWRNG) += rng.o
|
||||
+ath9k-$(CPTCFG_ATH9K_UBNTHSR) += hsr.o
|
||||
|
||||
ath9k-$(CPTCFG_ATH9K_DEBUGFS) += debug.o
|
||||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -121,6 +121,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
+ATH9K_UBNTHSR=
|
||||
ATH9K_PCI_NO_EEPROM=
|
||||
ATH9K_HTC=
|
||||
ATH9K_HTC_DEBUGFS=
|
||||
--- a/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
@@ -58,6 +58,19 @@ config ATH9K_AHB
|
||||
Say Y, if you have a SoC with a compatible built-in
|
||||
wireless MAC. Say N if unsure.
|
||||
|
||||
+config ATH9K_UBNTHSR
|
||||
+ bool "Ubiquiti UniFi Outdoor Plus HSR support"
|
||||
+ depends on ATH9K
|
||||
+ ---help---
|
||||
+ This options enables code to control the HSR RF
|
||||
+ filter in the receive path of the Ubiquiti UniFi
|
||||
+ Outdoor Plus access point.
|
||||
+
|
||||
+ Say Y if you want to use the access point. The
|
||||
+ code will only be used if the device is detected,
|
||||
+ so it does not harm other setup other than occupying
|
||||
+ a bit of memory.
|
||||
+
|
||||
config ATH9K_DEBUGFS
|
||||
bool "Atheros ath9k debugging"
|
||||
depends on ATH9K && DEBUG_FS && MAC80211_DEBUGFS
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/gpio.c 2024-09-16 14:38:11.938379419 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c 2024-09-16 14:38:30.390115635 +0200
|
||||
@@ -111,7 +111,7 @@
|
||||
gc->gchip.get = ath9k_gpio_pin_get;
|
||||
gc->gchip.set = ath9k_gpio_pin_set;
|
||||
|
||||
- if (gpiochip_add(&gc->gchip)) {
|
||||
+ if (gpiochip_add_data(&gc->gchip, NULL)) {
|
||||
kfree(gc);
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
--- a/backport-include/linux/acpi_amd_wbrf.h 2024-09-13 14:55:36.816379630 +0200
|
||||
+++ b/backport-include/linux/acpi_amd_wbrf.h 2024-09-13 14:55:47.792224160 +0200
|
||||
@@ -7,9 +7,6 @@
|
||||
#ifndef _ACPI_AMD_WBRF_H
|
||||
#define _ACPI_AMD_WBRF_H
|
||||
|
||||
-#if LINUX_VERSION_IS_GEQ(6,8,0)
|
||||
-#include_next <linux/acpi_amd_wbrf.h>
|
||||
-#else
|
||||
#include <linux/device.h>
|
||||
#include <linux/notifier.h>
|
||||
|
||||
@@ -82,5 +79,4 @@
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
-#endif /* >=6,8,0 */
|
||||
#endif /* _ACPI_AMD_WBRF_H */
|
||||
|
|
@ -0,0 +1,541 @@
|
|||
--- a/net/wireless/trace.h 2024-09-13 13:11:10.145025393 +0200
|
||||
+++ b/net/wireless/trace.h 2024-09-13 13:14:21.774308452 +0200
|
||||
@@ -372,7 +372,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
WIPHY_ASSIGN;
|
||||
- __assign_str(vir_intf_name, name ? name : "<noname>");
|
||||
+ __assign_str(vir_intf_name);
|
||||
__entry->type = type;
|
||||
),
|
||||
TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
|
||||
--- a/net/mac80211/trace.h 2024-09-13 13:27:20.887264216 +0200
|
||||
+++ b/net/mac80211/trace.h 2024-09-13 13:29:33.057391014 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
__string(vif_name, sdata->name)
|
||||
#define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
|
||||
__entry->p2p = sdata->vif.p2p; \
|
||||
- __assign_str(vif_name, sdata->name)
|
||||
+ __assign_str(vif_name)
|
||||
#define VIF_PR_FMT " vif:%s(%d%s)"
|
||||
#define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
|
||||
|
||||
--- a/drivers/bus/mhi/host/trace.h 2024-09-13 13:31:32.207702337 +0200
|
||||
+++ b/drivers/bus/mhi/host/trace.h 2024-09-13 13:32:22.330991957 +0200
|
||||
@@ -103,7 +103,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->ch_num = mhi_chan->chan;
|
||||
__entry->wp = mhi_tre;
|
||||
__entry->tre_ptr = mhi_tre->ptr;
|
||||
@@ -131,7 +131,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->local_ee = mhi_cntrl->ee;
|
||||
__entry->state = mhi_cntrl->dev_state;
|
||||
__entry->dev_ee = dev_ee;
|
||||
@@ -158,7 +158,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
if (pm_state)
|
||||
pm_state = __fls(pm_state);
|
||||
__entry->pm_state = pm_state;
|
||||
@@ -184,7 +184,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->rp = rp;
|
||||
__entry->ptr = rp->ptr;
|
||||
__entry->dword0 = rp->dword[0];
|
||||
@@ -226,7 +226,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->ch_num = mhi_chan->chan;
|
||||
__entry->state = state;
|
||||
__entry->reason = reason;
|
||||
@@ -265,7 +265,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(name, mhi_cntrl->mhi_dev->name);
|
||||
+ __assign_str(name);
|
||||
__entry->state = state;
|
||||
),
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/trace.h 2024-09-13 13:31:32.087704038 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath10k/trace.h 2024-09-13 13:35:37.760222205 +0200
|
||||
@@ -55,8 +55,8 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk(
|
||||
@@ -92,8 +92,8 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->level = level;
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
@@ -121,10 +121,10 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
- __assign_str(msg, msg);
|
||||
- __assign_str(prefix, prefix);
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
+ __assign_str(msg);
|
||||
+ __assign_str(prefix);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
@@ -152,8 +152,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -182,8 +182,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -211,8 +211,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
@@ -239,8 +239,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->hw_type = ar->hw_rev;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -269,8 +269,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->hw_type = ar->hw_rev;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(pktlog), buf, buf_len);
|
||||
@@ -301,8 +301,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->msdu_id = msdu_id;
|
||||
__entry->msdu_len = msdu_len;
|
||||
__entry->vdev_id = vdev_id;
|
||||
@@ -332,8 +332,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->msdu_id = msdu_id;
|
||||
),
|
||||
|
||||
@@ -358,8 +358,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = ath10k_frm_hdr_len(data, len);
|
||||
memcpy(__get_dynamic_array(data), data, __entry->len);
|
||||
),
|
||||
@@ -386,8 +386,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len - ath10k_frm_hdr_len(data, len);
|
||||
memcpy(__get_dynamic_array(payload),
|
||||
data + ath10k_frm_hdr_len(data, len), __entry->len);
|
||||
@@ -435,8 +435,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->hw_type = ar->hw_rev;
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(rxdesc), data, len);
|
||||
@@ -472,8 +472,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->type = type;
|
||||
__entry->timestamp = timestamp;
|
||||
__entry->code = code;
|
||||
@@ -505,8 +505,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
--- a/drivers/net/wireless/ath/ath11k/trace.h 2024-09-13 13:31:32.047704605 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath11k/trace.h 2024-09-13 13:37:29.026645264 +0200
|
||||
@@ -48,8 +48,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->buf_len = buf_len;
|
||||
__entry->pktlog_checksum = pktlog_checksum;
|
||||
memcpy(__get_dynamic_array(pktlog), buf, buf_len);
|
||||
@@ -77,8 +77,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(ppdu), data, len);
|
||||
),
|
||||
@@ -105,8 +105,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
__entry->log_type = log_type;
|
||||
memcpy(__get_dynamic_array(rxdesc), data, len);
|
||||
@@ -130,8 +130,8 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk(
|
||||
@@ -171,8 +171,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -201,8 +201,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->id = id;
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
@@ -230,8 +230,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->level = level;
|
||||
WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
|
||||
ATH11K_MSG_MAX, vaf->fmt,
|
||||
@@ -262,10 +262,10 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
- __assign_str(msg, msg);
|
||||
- __assign_str(prefix, prefix);
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
+ __assign_str(msg);
|
||||
+ __assign_str(prefix);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
@@ -292,8 +292,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
@@ -318,8 +318,8 @@
|
||||
__field(u32, peer_ps_timestamp)
|
||||
),
|
||||
|
||||
- TP_fast_assign(__assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ TP_fast_assign(__assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
memcpy(__get_dynamic_array(peer_addr), peer_addr,
|
||||
ETH_ALEN);
|
||||
__entry->peer_ps_state = peer_ps_state;
|
||||
--- a/drivers/net/wireless/ath/ath12k/trace.h 2024-09-13 13:31:32.071704265 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath12k/trace.h 2024-09-13 13:38:04.682139931 +0200
|
||||
@@ -36,8 +36,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->buf_len = buf_len;
|
||||
__entry->pktlog_checksum = pktlog_checksum;
|
||||
memcpy(__get_dynamic_array(pktlog), buf, buf_len);
|
||||
@@ -73,8 +73,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
__entry->info = ar->pdev->timestamp.info;
|
||||
__entry->sync_tstmp_lo_us = ar->pdev->timestamp.sync_timestamp_hi_us;
|
||||
@@ -117,8 +117,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ar->ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ar->ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
__entry->type = type;
|
||||
__entry->info = ar->pdev->timestamp.info;
|
||||
@@ -153,8 +153,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, dev_name(ab->dev));
|
||||
- __assign_str(driver, dev_driver_string(ab->dev));
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(data), data, len);
|
||||
),
|
||||
--- a/drivers/net/wireless/ath/ath6kl/trace.h 2024-09-13 13:31:32.079704151 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath6kl/trace.h 2024-09-13 13:33:01.462437360 +0200
|
||||
@@ -304,8 +304,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(msg, msg);
|
||||
- __assign_str(prefix, prefix);
|
||||
+ __assign_str(msg);
|
||||
+ __assign_str(prefix);
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(buf), buf, buf_len);
|
||||
),
|
||||
--- a/drivers/net/wireless/ath/trace.h 2024-09-13 13:31:32.043704662 +0200
|
||||
+++ b/drivers/net/wireless/ath/trace.h 2024-09-13 13:44:05.849032491 +0200
|
||||
@@ -44,8 +44,8 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(device, wiphy_name(wiphy));
|
||||
- __assign_str(driver, KBUILD_MODNAME);
|
||||
+ __assign_str(device);
|
||||
+ __assign_str(driver);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.h 2024-09-13 13:31:31.999705285 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.h 2024-09-13 13:42:28.746405624 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
__vstring(msg, vaf->fmt, vaf->va)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(func, func);
|
||||
+ __assign_str(func);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s: %s", __get_str(func), __get_str(msg))
|
||||
@@ -57,7 +57,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->level = level;
|
||||
- __assign_str(func, func);
|
||||
+ __assign_str(func);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s: %s", __get_str(func), __get_str(msg))
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac.h 2024-09-13 13:31:32.011705114 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac.h 2024-09-13 13:42:44.218186836 +0200
|
||||
@@ -81,7 +81,7 @@
|
||||
__field(u32, mask)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
__entry->in_isr = in_isr;
|
||||
__entry->macintstatus = macintstatus;
|
||||
__entry->mask = mask;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h 2024-09-13 13:31:32.011705114 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h 2024-09-13 13:42:52.242073370 +0200
|
||||
@@ -71,7 +71,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->level = level;
|
||||
- __assign_str(func, func);
|
||||
+ __assign_str(func);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s: %s", __get_str(func), __get_str(msg))
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_tx.h 2024-09-13 13:31:32.011705114 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_tx.h 2024-09-13 13:43:12.721783766 +0200
|
||||
@@ -31,7 +31,7 @@
|
||||
__dynamic_array(u8, txh, txh_len)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
memcpy(__get_dynamic_array(txh), txh, txh_len);
|
||||
),
|
||||
TP_printk("[%s] txdesc", __get_str(dev))
|
||||
@@ -54,7 +54,7 @@
|
||||
__field(u16, ackphyrxsh)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
__entry->framelen = framelen;
|
||||
__entry->frameid = frameid;
|
||||
__entry->status = status;
|
||||
@@ -85,7 +85,7 @@
|
||||
__field(u16, dma_len)
|
||||
),
|
||||
TP_fast_assign(
|
||||
- __assign_str(dev, dev_name(dev));
|
||||
+ __assign_str(dev);
|
||||
__entry->max_ampdu_len = max_ampdu_len;
|
||||
__entry->max_ampdu_frames = max_ampdu_frames;
|
||||
__entry->ampdu_len = ampdu_len;
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h 2024-09-13 13:31:31.915706475 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h 2024-09-13 13:41:47.314991509 +0200
|
||||
@@ -87,7 +87,7 @@
|
||||
#endif
|
||||
|
||||
#define DEV_ENTRY __string(dev, dev_name(dev))
|
||||
-#define DEV_ASSIGN __assign_str(dev, dev_name(dev))
|
||||
+#define DEV_ASSIGN __assign_str(dev)
|
||||
|
||||
#include "iwl-devtrace-io.h"
|
||||
#include "iwl-devtrace-ucode.h"
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h 2024-09-13 13:31:31.915706475 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h 2024-09-13 13:41:36.363146379 +0200
|
||||
@@ -57,7 +57,7 @@
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->level = level;
|
||||
- __assign_str(function, function);
|
||||
+ __assign_str(function);
|
||||
__assign_vstr(msg, vaf->fmt, vaf->va);
|
||||
),
|
||||
TP_printk("%s", __get_str(msg))
|
||||
--- a/include/trace/events/qrtr.h 2024-09-13 13:31:32.207702337 +0200
|
||||
+++ b/include/trace/events/qrtr.h 2024-09-13 13:39:51.068635354 +0200
|
||||
@@ -102,7 +102,7 @@
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
- __assign_str(ctrl_pkt_str, ctrl_pkt_str);
|
||||
+ __assign_str(ctrl_pkt_str);
|
||||
__entry->sq_node = sq_node;
|
||||
__entry->sq_port = sq_port;
|
||||
),
|
||||
|
|
@ -0,0 +1,798 @@
|
|||
diff '--color=auto' -aurN a/backport-include/asm/unaligned.h b/backport-include/asm/unaligned.h
|
||||
--- a/backport-include/asm/unaligned.h 2024-10-08 14:34:12.163916078 +0200
|
||||
+++ b/backport-include/asm/unaligned.h 2024-10-08 14:35:43.894639195 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef __BACKPORT_ASM_GENERIC_UNALIGNED_H
|
||||
#define __BACKPORT_ASM_GENERIC_UNALIGNED_H
|
||||
-#include_next <asm/unaligned.h>
|
||||
+#include_next <linux/unaligned.h>
|
||||
|
||||
#if LINUX_VERSION_IS_LESS(5,7,0)
|
||||
static inline u32 __get_unaligned_be24(const u8 *p)
|
||||
diff '--color=auto' -aurN a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
|
||||
--- a/drivers/net/usb/sierra_net.c 2024-10-08 14:34:12.107916857 +0200
|
||||
+++ b/drivers/net/usb/sierra_net.c 2024-10-08 14:35:43.982637970 +0200
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <linux/usb/cdc.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/udp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <linux/usb/usbnet.h>
|
||||
|
||||
#define SWI_USB_REQUEST_GET_FW_ATTR 0x06
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
|
||||
--- a/drivers/net/wireless/ath/ath5k/base.c 2024-10-08 14:34:12.155916189 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath5k/base.c 2024-10-08 14:35:44.266634016 +0200
|
||||
@@ -59,7 +59,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include <net/mac80211.h>
|
||||
#include "base.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c 2024-10-08 14:34:12.155916189 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c 2024-10-08 14:35:44.342632959 +0200
|
||||
@@ -44,7 +44,7 @@
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <net/mac80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ath5k.h"
|
||||
#include "base.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
|
||||
--- a/drivers/net/wireless/ath/ath5k/pcu.c 2024-10-08 14:34:12.155916189 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath5k/pcu.c 2024-10-08 14:35:44.266634016 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
* Protocol Control Unit Functions *
|
||||
\*********************************/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ath5k.h"
|
||||
#include "reg.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
|
||||
--- a/drivers/net/wireless/ath/ath5k/phy.c 2024-10-08 14:34:12.155916189 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath5k/phy.c 2024-10-08 14:35:44.342632959 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sort.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ath5k.h"
|
||||
#include "reg.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
|
||||
--- a/drivers/net/wireless/ath/ath5k/reset.c 2024-10-08 14:34:12.155916189 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath5k/reset.c 2024-10-08 14:35:44.266634016 +0200
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include <linux/pci.h> /* To determine if a card is pci-e */
|
||||
#include <linux/log2.h>
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
|
||||
--- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c 2024-10-08 14:35:44.038637190 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "hif-ops.h"
|
||||
#include "trace.h"
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#define CALC_TXRX_PADDED_LEN(dev, len) (__ALIGN_MASK((len), (dev)->block_mask))
|
||||
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 2024-10-08 14:35:44.190635074 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <linux/kernel.h>
|
||||
#include "hw.h"
|
||||
#include "ar9003_phy.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c 2024-10-08 14:35:44.190635074 +0200
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/export.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ath9k.h"
|
||||
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
|
||||
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c 2024-10-08 14:35:44.266634016 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "hw.h"
|
||||
#include "ar9002_phy.h"
|
||||
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
|
||||
--- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c 2024-10-08 14:35:44.190635074 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "hw.h"
|
||||
#include "ar9002_phy.h"
|
||||
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
|
||||
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c 2024-10-08 14:35:44.190635074 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "hw.h"
|
||||
#include "ar9002_phy.h"
|
||||
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c 2024-10-08 14:35:44.190635074 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "htc.h"
|
||||
|
||||
MODULE_FIRMWARE(HTC_7010_MODULE_FW);
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c 2024-10-08 14:35:44.106636244 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/gpio.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "hw.h"
|
||||
#include "hw-ops.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/carl9170/mac.c b/drivers/net/wireless/ath/carl9170/mac.c
|
||||
--- a/drivers/net/wireless/ath/carl9170/mac.c 2024-10-08 14:34:12.151916244 +0200
|
||||
+++ b/drivers/net/wireless/ath/carl9170/mac.c 2024-10-08 14:35:44.106636244 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "carl9170.h"
|
||||
#include "cmd.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/hw.c b/drivers/net/wireless/ath/hw.c
|
||||
--- a/drivers/net/wireless/ath/hw.c 2024-10-08 14:34:12.143916356 +0200
|
||||
+++ b/drivers/net/wireless/ath/hw.c 2024-10-08 14:35:44.106636244 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/export.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ath.h"
|
||||
#include "reg.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c
|
||||
--- a/drivers/net/wireless/ath/key.c 2024-10-08 14:34:12.143916356 +0200
|
||||
+++ b/drivers/net/wireless/ath/key.c 2024-10-08 14:35:44.106636244 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/export.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <net/mac80211.h>
|
||||
|
||||
#include "ath.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c 2024-10-08 14:34:12.131916523 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c 2024-10-08 14:35:44.418631901 +0200
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "b43.h"
|
||||
#include "main.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
--- a/drivers/net/wireless/broadcom/b43legacy/main.c 2024-10-08 14:34:12.135916466 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/b43legacy/main.c 2024-10-08 14:35:44.342632959 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <net/dst.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "b43legacy.h"
|
||||
#include "main.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h 2024-10-08 14:34:12.135916466 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h 2024-10-08 14:35:44.342632959 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef FWEH_H_
|
||||
#define FWEH_H_
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/if.h>
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c 2024-10-08 14:34:12.135916466 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c 2024-10-08 14:35:44.418631901 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/random.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include <soc.h>
|
||||
#include <chipcommon.h>
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 2024-10-08 14:34:12.131916523 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 2024-10-08 14:35:44.342632959 +0200
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <linux/bcma/bcma.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/vmalloc.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <defs.h>
|
||||
#include <brcmu_wifi.h>
|
||||
#include <brcmu_utils.h>
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c 2024-10-08 14:34:12.135916466 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c 2024-10-08 14:35:44.342632959 +0200
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2019 Broadcom
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include <linux/math.h>
|
||||
#include <linux/string.h>
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/intel/iwlegacy/3945.c b/drivers/net/wireless/intel/iwlegacy/3945.c
|
||||
--- a/drivers/net/wireless/intel/iwlegacy/3945.c 2024-10-08 14:34:12.127916579 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlegacy/3945.c 2024-10-08 14:35:44.490630899 +0200
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/etherdevice.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <net/mac80211.h>
|
||||
|
||||
#include "common.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/intel/iwlegacy/4965.c b/drivers/net/wireless/intel/iwlegacy/4965.c
|
||||
--- a/drivers/net/wireless/intel/iwlegacy/4965.c 2024-10-08 14:34:12.127916579 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlegacy/4965.c 2024-10-08 14:35:44.490630899 +0200
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <linux/units.h>
|
||||
#include <net/mac80211.h>
|
||||
#include <linux/etherdevice.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "4965.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/intel/iwlwifi/dvm/led.c b/drivers/net/wireless/intel/iwlwifi/dvm/led.c
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/dvm/led.c 2024-10-08 14:34:12.123916635 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/led.c 2024-10-08 14:35:44.490630899 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/mac80211.h>
|
||||
#include <linux/etherdevice.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "iwl-io.h"
|
||||
#include "iwl-trans.h"
|
||||
#include "iwl-modparams.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/intel/iwlwifi/dvm/rx.c b/drivers/net/wireless/intel/iwlwifi/dvm/rx.c
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/dvm/rx.c 2024-10-08 14:34:12.123916635 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/rx.c 2024-10-08 14:35:44.490630899 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sched.h>
|
||||
#include <net/mac80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "iwl-trans.h"
|
||||
#include "iwl-io.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c 2024-10-08 14:34:12.123916635 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c 2024-10-08 14:35:44.490630899 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include "iwl-trans.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
--- a/drivers/net/wireless/marvell/libertas/cfg.c 2024-10-08 14:34:12.127916579 +0200
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c 2024-10-08 14:35:44.490630899 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/ieee80211.h>
|
||||
#include <net/cfg80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "decl.h"
|
||||
#include "cfg.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/marvell/libertas/cmdresp.c b/drivers/net/wireless/marvell/libertas/cmdresp.c
|
||||
--- a/drivers/net/wireless/marvell/libertas/cmdresp.c 2024-10-08 14:34:12.127916579 +0200
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cmdresp.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/sched.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <net/cfg80211.h>
|
||||
|
||||
#include "cfg.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c 2024-10-08 14:34:12.131916523 +0200
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c 2024-10-08 14:35:44.490630899 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright 2011-2020 NXP
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "decl.h"
|
||||
#include "ioctl.h"
|
||||
#include "util.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c
|
||||
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 2024-10-08 14:34:12.139916412 +0200
|
||||
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/etherdevice.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "mt76x0.h"
|
||||
#include "eeprom.h"
|
||||
#include "../mt76x02_phy.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c
|
||||
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c 2024-10-08 14:34:12.135916466 +0200
|
||||
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2018 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
|
||||
*/
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "mt76x02_eeprom.h"
|
||||
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c
|
||||
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 2024-10-08 14:34:12.139916412 +0200
|
||||
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "mt76x2.h"
|
||||
#include "eeprom.h"
|
||||
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/mediatek/mt7601u/dma.h b/drivers/net/wireless/mediatek/mt7601u/dma.h
|
||||
--- a/drivers/net/wireless/mediatek/mt7601u/dma.h 2024-10-08 14:34:12.143916356 +0200
|
||||
+++ b/drivers/net/wireless/mediatek/mt7601u/dma.h 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef __MT7601U_DMA_H
|
||||
#define __MT7601U_DMA_H
|
||||
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
#define MT_DMA_HDR_LEN 4
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/mediatek/mt7601u/eeprom.c b/drivers/net/wireless/mediatek/mt7601u/eeprom.c
|
||||
--- a/drivers/net/wireless/mediatek/mt7601u/eeprom.c 2024-10-08 14:34:12.143916356 +0200
|
||||
+++ b/drivers/net/wireless/mediatek/mt7601u/eeprom.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/etherdevice.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "mt7601u.h"
|
||||
#include "eeprom.h"
|
||||
#include "mac.h"
|
||||
diff '--color=auto' -aurN a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
|
||||
--- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c 2024-10-08 14:34:12.119916691 +0200
|
||||
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/module.h>
|
||||
#include <net/mac80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "zd_def.h"
|
||||
#include "zd_mac.h"
|
||||
diff '--color=auto' -aurN a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
|
||||
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c 2024-10-08 14:35:44.666628449 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
void init_mlme_ap_info(struct adapter *padapter)
|
||||
{
|
||||
diff '--color=auto' -aurN a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
|
||||
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c 2024-10-08 14:35:44.610629228 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <linux/of.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
u8 RTW_WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 };
|
||||
u16 RTW_WPA_VERSION = 1;
|
||||
diff '--color=auto' -aurN a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
|
||||
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <rtw_wifi_regd.h>
|
||||
#include <hal_btcoex.h>
|
||||
#include <linux/kernel.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
static struct mlme_handler mlme_sta_tbl[] = {
|
||||
{WIFI_ASSOCREQ, "OnAssocReq", &OnAssocReq},
|
||||
diff '--color=auto' -aurN a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
|
||||
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <linux/jiffies.h>
|
||||
#include <rtw_recv.h>
|
||||
#include <net/cfg80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
static u8 SNAP_ETH_TYPE_IPX[2] = {0x81, 0x37};
|
||||
static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
|
||||
diff '--color=auto' -aurN a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
|
||||
--- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c 2024-10-08 14:34:12.107916857 +0200
|
||||
+++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <rtw_debug.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <net/cfg80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
void rtw_os_free_recvframe(union recv_frame *precvframe)
|
||||
{
|
||||
diff '--color=auto' -aurN a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
|
||||
--- a/drivers/usb/class/cdc-wdm.c 2024-10-08 14:34:12.159916134 +0200
|
||||
+++ b/drivers/usb/class/cdc-wdm.c 2024-10-08 14:35:44.494630843 +0200
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <linux/usb/cdc.h>
|
||||
#include <linux/wwan.h>
|
||||
#include <asm/byteorder.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <linux/usb/cdc-wdm.h>
|
||||
|
||||
#define DRIVER_AUTHOR "Oliver Neukum"
|
||||
diff '--color=auto' -aurN a/include/linux/ieee80211.h b/include/linux/ieee80211.h
|
||||
--- a/include/linux/ieee80211.h 2024-10-08 14:34:12.163916078 +0200
|
||||
+++ b/include/linux/ieee80211.h 2024-10-08 14:35:44.734627502 +0200
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/bitfield.h>
|
||||
#include <asm/byteorder.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
/*
|
||||
* DS bit usage
|
||||
diff '--color=auto' -aurN a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
|
||||
--- a/include/net/ieee80211_radiotap.h 2024-10-08 14:34:12.159916134 +0200
|
||||
+++ b/include/net/ieee80211_radiotap.h 2024-10-08 14:35:44.666628449 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
#define __RADIOTAP_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
/**
|
||||
* struct ieee80211_radiotap_header - base radiotap header
|
||||
diff '--color=auto' -aurN a/include/net/mac80211.h b/include/net/mac80211.h
|
||||
--- a/include/net/mac80211.h 2024-10-08 14:34:12.159916134 +0200
|
||||
+++ b/include/net/mac80211.h 2024-10-08 14:35:44.666628449 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/codel.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
/**
|
||||
* DOC: Introduction
|
||||
diff '--color=auto' -aurN a/net/mac80211/key.c b/net/mac80211/key.c
|
||||
--- a/net/mac80211/key.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/key.c 2024-10-08 14:35:44.734627502 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/export.h>
|
||||
#include <net/mac80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "ieee80211_i.h"
|
||||
#include "driver-ops.h"
|
||||
#include "debugfs_key.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/mesh.c b/net/mac80211/mesh.c
|
||||
--- a/net/mac80211/mesh.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/mesh.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "ieee80211_i.h"
|
||||
#include "mesh.h"
|
||||
#include "wme.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
|
||||
--- a/net/mac80211/mesh_hwmp.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/mesh_hwmp.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <linux/slab.h>
|
||||
#include <linux/etherdevice.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "wme.h"
|
||||
#include "mesh.h"
|
||||
|
||||
diff '--color=auto' -aurN a/net/mac80211/michael.c b/net/mac80211/michael.c
|
||||
--- a/net/mac80211/michael.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/michael.c 2024-10-08 14:35:44.734627502 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/ieee80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "michael.h"
|
||||
|
||||
diff '--color=auto' -aurN a/net/mac80211/mlme.c b/net/mac80211/mlme.c
|
||||
--- a/net/mac80211/mlme.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/mlme.c 2024-10-08 14:35:44.842625999 +0200
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/export.h>
|
||||
#include <net/mac80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ieee80211_i.h"
|
||||
#include "driver-ops.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/ocb.c b/net/mac80211/ocb.c
|
||||
--- a/net/mac80211/ocb.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/ocb.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <net/mac80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ieee80211_i.h"
|
||||
#include "driver-ops.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/rx.c b/net/mac80211/rx.c
|
||||
--- a/net/mac80211/rx.c 2024-10-08 14:34:12.099916968 +0200
|
||||
+++ b/net/mac80211/rx.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <kunit/visibility.h>
|
||||
#include <net/mac80211.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include "ieee80211_i.h"
|
||||
#include "driver-ops.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/status.c b/net/mac80211/status.c
|
||||
--- a/net/mac80211/status.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/status.c 2024-10-08 14:35:44.734627502 +0200
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <net/mac80211.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include "ieee80211_i.h"
|
||||
#include "rate.h"
|
||||
#include "mesh.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/tkip.c b/net/mac80211/tkip.c
|
||||
--- a/net/mac80211/tkip.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/tkip.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/export.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include <net/mac80211.h>
|
||||
#include "driver-ops.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/tx.c b/net/mac80211/tx.c
|
||||
--- a/net/mac80211/tx.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/tx.c 2024-10-08 14:35:44.734627502 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <net/mac80211.h>
|
||||
#include <net/codel.h>
|
||||
#include <net/codel_impl.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <net/fq_impl.h>
|
||||
#include <net/gso.h>
|
||||
|
||||
diff '--color=auto' -aurN a/net/mac80211/wep.c b/net/mac80211/wep.c
|
||||
--- a/net/mac80211/wep.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/wep.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/slab.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
#include <net/mac80211.h>
|
||||
#include "ieee80211_i.h"
|
||||
diff '--color=auto' -aurN a/net/mac80211/wpa.c b/net/mac80211/wpa.c
|
||||
--- a/net/mac80211/wpa.c 2024-10-08 14:34:12.103916913 +0200
|
||||
+++ b/net/mac80211/wpa.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/ieee80211.h>
|
||||
#include <linux/gfp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <net/mac80211.h>
|
||||
#include <crypto/aes.h>
|
||||
#include <crypto/utils.h>
|
||||
diff '--color=auto' -aurN a/net/wireless/radiotap.c b/net/wireless/radiotap.c
|
||||
--- a/net/wireless/radiotap.c 2024-10-08 14:34:12.099916968 +0200
|
||||
+++ b/net/wireless/radiotap.c 2024-10-08 14:35:44.906625108 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
|
||||
/* function prototypes and related defs are in include/net/cfg80211.h */
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c 2024-10-08 14:34:12.135916466 +0200
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c 2024-10-08 14:55:42.245829406 +0200
|
||||
@@ -1184,7 +1184,6 @@
|
||||
|
||||
static const struct file_operations bus_reset_fops = {
|
||||
.open = simple_open,
|
||||
- .llseek = no_llseek,
|
||||
.write = bus_reset_write,
|
||||
};
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c 2024-10-08 14:34:12.123916635 +0200
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c 2024-10-08 14:56:04.293516668 +0200
|
||||
@@ -3490,7 +3490,6 @@
|
||||
}
|
||||
|
||||
const struct file_operations iwl_dbgfs_d3_test_ops = {
|
||||
- .llseek = no_llseek,
|
||||
.open = iwl_mvm_d3_test_open,
|
||||
.read = iwl_mvm_d3_test_read,
|
||||
.release = iwl_mvm_d3_test_release,
|
||||
diff '--color=auto' -aurN backports-6.9.9/net/wireless/core.c backports-6.9.9.old/net/wireless/core.c
|
||||
--- a/net/wireless/core.c 2024-10-08 15:14:57.293440176 +0200
|
||||
+++ b/net/wireless/core.c 2024-10-08 15:13:05.007033920 +0200
|
||||
@@ -165,11 +165,11 @@
|
||||
list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
|
||||
if (!wdev->netdev)
|
||||
continue;
|
||||
- wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL;
|
||||
+ wdev->netdev->netns_local = false;
|
||||
err = dev_change_net_namespace(wdev->netdev, net, "wlan%d");
|
||||
if (err)
|
||||
break;
|
||||
- wdev->netdev->features |= NETIF_F_NETNS_LOCAL;
|
||||
+ wdev->netdev->netns_local = true;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
@@ -181,11 +181,11 @@
|
||||
list) {
|
||||
if (!wdev->netdev)
|
||||
continue;
|
||||
- wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL;
|
||||
+ wdev->netdev->netns_local = false;
|
||||
err = dev_change_net_namespace(wdev->netdev, net,
|
||||
"wlan%d");
|
||||
WARN_ON(err);
|
||||
- wdev->netdev->features |= NETIF_F_NETNS_LOCAL;
|
||||
+ wdev->netdev->netns_local = true;
|
||||
}
|
||||
|
||||
return err;
|
||||
@@ -1453,7 +1453,7 @@
|
||||
SET_NETDEV_DEVTYPE(dev, &wiphy_type);
|
||||
wdev->netdev = dev;
|
||||
/* can only change netns with wiphy */
|
||||
- dev->features |= NETIF_F_NETNS_LOCAL;
|
||||
+ dev->netns_local = true;
|
||||
|
||||
cfg80211_init_wdev(wdev);
|
||||
break;
|
||||
diff '--color=auto' -aurN backports-6.9.9.old/net/mac80211/rc80211_minstrel_ht_debugfs.c backports-6.9.9/net/mac80211/rc80211_minstrel_ht_debugfs.c
|
||||
--- a/net/mac80211/rc80211_minstrel_ht_debugfs.c 2024-10-08 15:38:18.745318805 +0200
|
||||
+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c 2024-10-08 15:38:44.340958803 +0200
|
||||
@@ -187,7 +187,6 @@
|
||||
.open = minstrel_ht_stats_open,
|
||||
.read = minstrel_stats_read,
|
||||
.release = minstrel_stats_release,
|
||||
- .llseek = no_llseek,
|
||||
};
|
||||
|
||||
static char *
|
||||
@@ -322,7 +322,6 @@
|
||||
.open = minstrel_ht_stats_csv_open,
|
||||
.read = minstrel_stats_read,
|
||||
.release = minstrel_stats_release,
|
||||
- .llseek = no_llseek,
|
||||
};
|
||||
|
||||
void
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h 2024-07-03 20:09:49.622279338 +0200
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h 2024-07-03 20:10:26.157677785 +0200
|
||||
@@ -294,4 +294,5 @@
|
||||
unsigned short *rxwi_size);
|
||||
void rt2800_pre_reset_hw(struct rt2x00_dev *rt2x00dev);
|
||||
|
||||
+void rt6352_enable_pa_pin(struct rt2x00_dev *rt2x00dev, int enable);
|
||||
#endif /* RT2800LIB_H */
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h 2024-11-05 16:54:09.625006944 +0100
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h 2024-11-05 16:54:26.280764117 +0100
|
||||
@@ -1504,6 +1504,8 @@
|
||||
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
|
||||
bool rt2x00mac_tx_frames_pending(struct ieee80211_hw *hw);
|
||||
|
||||
+int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev);
|
||||
+
|
||||
/*
|
||||
* Driver allocation handlers.
|
||||
*/
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
--- a/debugfs.c 2024-09-06 11:08:19.656939190 +0200
|
||||
+++ b/debugfs.c 2024-09-06 11:09:04.772324072 +0200
|
||||
@@ -331,15 +331,19 @@
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct mwl_priv *priv = (struct mwl_priv *)file->private_data;
|
||||
+#if defined AARCH64
|
||||
struct pcie_priv *pcie_priv = priv->hif.priv;
|
||||
unsigned long flags;
|
||||
+#endif
|
||||
unsigned long page = get_zeroed_page(GFP_KERNEL);
|
||||
int tx_num = 4, rx_num = 4;
|
||||
char *p = (char *)page;
|
||||
int len = 0, size = PAGE_SIZE;
|
||||
ssize_t ret;
|
||||
const struct hostcmd_get_hw_spec *get_hw_spec;
|
||||
+#if defined AARCH64
|
||||
int i;
|
||||
+#endif
|
||||
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
@@ -359,6 +359,7 @@
|
||||
len += scnprintf(p + len, size - len,
|
||||
"num_wcb: %d\n", le32_to_cpu(get_hw_spec->num_wcb));
|
||||
|
||||
+#if defined AARCH64
|
||||
if (priv->chip_type == MWL8864) {
|
||||
len += scnprintf(p + len, size - len,
|
||||
"-----------------------=> address| address|qlen|fw_desc_cnt\n");
|
||||
@@ -370,6 +371,7 @@
|
||||
"wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
|
||||
spin_unlock_irqrestore(&pcie_priv->tx_desc_lock, flags);
|
||||
}
|
||||
+#endif
|
||||
|
||||
len += scnprintf(p + len, size - len,
|
||||
"num_mcast_addr: %X\n", le16_to_cpu(get_hw_spec->num_mcast_addr));
|
||||
34
6.12/package/kernel/nat46/Makefile
Normal file
34
6.12/package/kernel/nat46/Makefile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=nat46
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git
|
||||
PKG_SOURCE_DATE:=2024-07-02
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f367088db99c9235e16dea8164eb82cbd0d299ba
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/nat46
|
||||
DEPENDS:=@IPV6 +kmod-nf-conntrack6
|
||||
TITLE:=Stateless NAT46 translation kernel module
|
||||
SECTION:=kernel
|
||||
SUBMENU:=Network Support
|
||||
FILES:=$(PKG_BUILD_DIR)/nat46/modules/nat46.ko
|
||||
AUTOLOAD:=$(call AutoLoad,33,nat46)
|
||||
endef
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-defaults.mk
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/nat46/modules" \
|
||||
MODFLAGS="-DMODULE -mlong-calls" \
|
||||
EXTRA_CFLAGS="-DNAT46_VERSION=\\\"$(PKG_SOURCE_VERSION)\\\"" \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nat46))
|
||||
99
6.12/package/kernel/nat46/patches/001-fix-kernel-6.10.patch
Normal file
99
6.12/package/kernel/nat46/patches/001-fix-kernel-6.10.patch
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
--- a/nat46/modules/nat46-netdev.c 2024-08-14 16:36:59.249437588 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.c 2024-08-14 16:39:28.523016026 +0200
|
||||
@@ -193,7 +193,6 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if((0 == strcmp(dev->name, name)) && is_nat46(dev)) {
|
||||
@@ -205,7 +204,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -300,7 +298,6 @@
|
||||
|
||||
void nat64_show_all_configs(struct net *net, struct seq_file *m) {
|
||||
struct net_device *dev;
|
||||
- read_lock(&dev_base_lock);
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
if(is_nat46(dev)) {
|
||||
@@ -323,7 +320,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
|
||||
}
|
||||
|
||||
@@ -331,7 +327,6 @@
|
||||
struct net_device *dev;
|
||||
struct net_device *nat46dev;
|
||||
do {
|
||||
- read_lock(&dev_base_lock);
|
||||
nat46dev = NULL;
|
||||
dev = first_net_device(net);
|
||||
while (dev) {
|
||||
@@ -340,7 +335,6 @@
|
||||
}
|
||||
dev = next_net_device(dev);
|
||||
}
|
||||
- read_unlock(&dev_base_lock);
|
||||
if(nat46dev) {
|
||||
nat46_netdev_destroy(nat46dev);
|
||||
}
|
||||
--- a/nat46/modules/nat46-netdev.h 2024-08-14 16:39:50.726655831 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.h 2024-08-14 16:40:25.954084361 +0200
|
||||
@@ -25,4 +25,5 @@
|
||||
void nat64_show_all_configs(struct net *net, struct seq_file *m);
|
||||
void nat46_netdev_count_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
void *netdev_nat46_instance(struct net_device *dev);
|
||||
-
|
||||
+int nat46_netdev_create(struct net *net, char *basename, struct net_device **dev);
|
||||
+void nat46_netdev_destroy(struct net_device *dev);
|
||||
--- a/nat46/modules/nat46-core.h 2024-08-14 16:44:24.686211571 +0200
|
||||
+++ b/nat46/modules/nat46-core.h 2024-08-14 16:50:42.464086457 +0200
|
||||
@@ -82,4 +82,37 @@
|
||||
nat46_instance_t *alloc_nat46_instance(int npairs, nat46_instance_t *old, int from_ipair, int to_ipair, int remove_ipair);
|
||||
void release_nat46_instance(nat46_instance_t *nat46);
|
||||
|
||||
+void nat46debug_dump(nat46_instance_t *nat46, int level, void *addr, int len);
|
||||
+int try_parse_ipv6_prefix(struct in6_addr *pref, int *pref_len, char *arg);
|
||||
+int try_parse_ipv4_prefix(u32 *v4addr, int *pref_len, char *arg);
|
||||
+int try_parse_rule_arg(nat46_xlate_rule_t *rule, char *arg_name, char **ptail);
|
||||
+char *xlate_style_to_string(nat46_xlate_style_t style);
|
||||
+void xlate_v4_to_nat64(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6);
|
||||
+int xlate_nat64_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4);
|
||||
+int xlate_map_v4_to_v6(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6, uint16_t *pl4id, int map_version);
|
||||
+int xlate_map_v6_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4, int version);
|
||||
+int xlate_v4_to_v6(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv4, void *pipv6, uint16_t *pl4id);
|
||||
+int xlate_v6_to_v4(nat46_instance_t *nat46, nat46_xlate_rule_t *rule, void *pipv6, void *pipv4);
|
||||
+__sum16 csum16_upd(__sum16 csum, u16 old, u16 new);
|
||||
+__sum16 csum_tcpudp_remagic(__be32 saddr, __be32 daddr, u32 len, unsigned char proto, u16 csum);
|
||||
+__sum16 csum_ipv6_unmagic(nat46_instance_t *nat46, const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __sum16 csum);
|
||||
+void update_icmp6_type_code(nat46_instance_t *nat46, struct icmp6hdr *icmp6h, u8 type, u8 code);
|
||||
+u16 get_next_ip_id(void);
|
||||
+u16 fold_ipv6_frag_id(u32 v6id);
|
||||
+void *add_offset(void *ptr, u16 offset);
|
||||
+void *get_next_header_ptr6(void *pv6, int v6_len);
|
||||
+void fill_v4hdr_from_v6hdr(struct iphdr * iph, struct ipv6hdr *ip6h, __u32 v4saddr, __u32 v4daddr, __u16 id, __u16 frag_off, __u16 proto, int l3_payload_len);
|
||||
+u16 unchecksum16(void *p, int count, u16 csum);
|
||||
+u16 rechecksum16(void *p, int count, u16 csum);
|
||||
+int is_last_pair_in_group(nat46_xlate_rulepair_t *apair);
|
||||
+void pairs_xlate_v6_to_v4_inner(nat46_instance_t *nat46, struct ipv6hdr *ip6h, __u32 *pv4saddr, __u32 *pv4daddr);
|
||||
+int xlate_payload6_to4(nat46_instance_t *nat46, void *pv6, void *ptrans_hdr, int v6_len, u16 *ul_sum, int *ptailTruncSize);
|
||||
+u8 *icmp_parameter_ptr(struct icmphdr *icmph);
|
||||
+u32 *icmp6_parameter_ptr(struct icmp6hdr *icmp6h);
|
||||
+int ip6_input_not_interested(nat46_instance_t *nat46, struct ipv6hdr *ip6h, struct sk_buff *old_skb);
|
||||
+int pairs_xlate_v6_to_v4_outer(nat46_instance_t *nat46, struct ipv6hdr *ip6h, uint16_t proto, __u32 *pv4saddr, __u32 *pv4daddr);
|
||||
+void ip6_update_csum(struct sk_buff * skb, struct ipv6hdr * ip6hdr, int do_atomic_frag);
|
||||
+int ip4_input_not_interested(nat46_instance_t *nat46, struct iphdr *iph, struct sk_buff *old_skb);
|
||||
+int pairs_xlate_v4_to_v6_outer(nat46_instance_t *nat46, struct iphdr *hdr4, uint16_t *sport, uint16_t *dport, void *v6saddr, void *v6daddr);
|
||||
+int is_valid_nat46(nat46_instance_t *nat46);
|
||||
#endif
|
||||
10
6.12/package/kernel/nat46/patches/002-fix-kernel-6.11.patch
Normal file
10
6.12/package/kernel/nat46/patches/002-fix-kernel-6.11.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- a/nat46/modules/nat46-netdev.c 2024-09-13 09:39:48.960815094 +0200
|
||||
+++ b/nat46/modules/nat46-netdev.c 2024-09-13 09:40:11.128500472 +0200
|
||||
@@ -110,7 +110,6 @@
|
||||
dev->hard_header_len = 0;
|
||||
dev->addr_len = 0;
|
||||
dev->mtu = 16384; /* iptables does reassembly. Rather than using ETH_DATA_LEN, let's try to get as much mileage as we can with the Linux stack */
|
||||
- dev->features = NETIF_F_NETNS_LOCAL;
|
||||
dev->flags = IFF_NOARP | IFF_POINTOPOINT;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
--- a/ubootenv-nvram.c
|
||||
+++ b/ubootenv-nvram.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_reserved_mem.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/version.h>
|
||||
|
||||
#define NAME "ubootenv"
|
||||
|
||||
@@ -132,18 +133,30 @@ static int ubootenv_probe(struct platfor
|
||||
return misc_register(&data->misc);
|
||||
}
|
||||
|
||||
-static int ubootenv_remove(struct platform_device *pdev)
|
||||
+static
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||
+int
|
||||
+#else
|
||||
+void
|
||||
+#endif
|
||||
+ubootenv_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ubootenv_drvdata *data = platform_get_drvdata(pdev);
|
||||
|
||||
data->env = NULL;
|
||||
misc_deregister(&data->misc);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||
return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static struct platform_driver ubootenv_driver = {
|
||||
.probe = ubootenv_probe,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||
.remove = ubootenv_remove,
|
||||
+#else
|
||||
+ .remove_new = ubootenv_remove,
|
||||
+#endif
|
||||
.driver = {
|
||||
.name = NAME,
|
||||
.owner = THIS_MODULE,
|
||||
76
6.12/package/libs/libnftnl/Makefile
Normal file
76
6.12/package/libs/libnftnl/Makefile
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libnftnl
|
||||
PKG_CPE_ID:=cpe:/a:netfilter:libnftnl
|
||||
PKG_VERSION:=1.2.6
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
PKG_HASH:=ceeaea2cd92147da19f13a35a7f1a4bc2767ff897e838e4b479cf54b59c777f4
|
||||
|
||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=lto
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
DISABLE_NLS:=
|
||||
|
||||
define Package/libnftnl
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libmnl
|
||||
TITLE:=Low-level netlink library for the nf_tables subsystem
|
||||
URL:=http://www.netfilter.org/projects/libnftnl
|
||||
ABI_VERSION:=11
|
||||
endef
|
||||
|
||||
define Package/libnftnl/description
|
||||
libnftnl is a userspace library providing a low-level netlink
|
||||
programming interface (API) to the in-kernel nf_tables subsystem.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/libnftnl
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/libnftnl/*.h \
|
||||
$(1)/usr/include/libnftnl/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libnftnl.{so*,a,la} \
|
||||
$(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftnl.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libnftnl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libnftnl.so.* \
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libnftnl))
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
From 6c39f04febd7cfdbd474233379416babcd0fc341 Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Fri, 8 Apr 2022 23:52:11 +0800
|
||||
Subject: [PATCH] libnftnl: add fullcone expression support
|
||||
|
||||
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
|
||||
---
|
||||
include/libnftnl/expr.h | 6 +
|
||||
include/linux/netfilter/nf_tables.h | 16 +++
|
||||
src/Makefile.am | 1 +
|
||||
src/expr/fullcone.c | 167 ++++++++++++++++++++++++++++
|
||||
src/expr_ops.c | 2 +
|
||||
5 files changed, 192 insertions(+)
|
||||
create mode 100644 src/expr/fullcone.c
|
||||
|
||||
--- a/include/libnftnl/expr.h
|
||||
+++ b/include/libnftnl/expr.h
|
||||
@@ -245,6 +245,12 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
+ NFTNL_EXPR_FULLCONE_FLAGS = NFTNL_EXPR_BASE,
|
||||
+ NFTNL_EXPR_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTNL_EXPR_FULLCONE_REG_PROTO_MAX,
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
NFTNL_EXPR_REDIR_REG_PROTO_MIN = NFTNL_EXPR_BASE,
|
||||
NFTNL_EXPR_REDIR_REG_PROTO_MAX,
|
||||
NFTNL_EXPR_REDIR_FLAGS,
|
||||
--- a/include/linux/netfilter/nf_tables.h
|
||||
+++ b/include/linux/netfilter/nf_tables.h
|
||||
@@ -1434,6 +1434,22 @@ enum nft_masq_attributes {
|
||||
#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
|
||||
|
||||
/**
|
||||
+ * enum nft_fullcone_attributes - nf_tables fullcone expression attributes
|
||||
+ *
|
||||
+ * @NFTA_FULLCONE_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
|
||||
+ */
|
||||
+enum nft_fullcone_attributes {
|
||||
+ NFTA_FULLCONE_UNSPEC,
|
||||
+ NFTA_FULLCONE_FLAGS,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ __NFTA_FULLCONE_MAX
|
||||
+};
|
||||
+#define NFTA_FULLCONE_MAX (__NFTA_FULLCONE_MAX - 1)
|
||||
+
|
||||
+/**
|
||||
* enum nft_redir_attributes - nf_tables redirect expression netlink attributes
|
||||
*
|
||||
* @NFTA_REDIR_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -54,6 +54,7 @@ libnftnl_la_SOURCES = utils.c \
|
||||
expr/target.c \
|
||||
expr/tunnel.c \
|
||||
expr/masq.c \
|
||||
+ expr/fullcone.c \
|
||||
expr/redir.c \
|
||||
expr/hash.c \
|
||||
expr/socket.c \
|
||||
--- /dev/null
|
||||
+++ b/src/expr/fullcone.c
|
||||
@@ -0,0 +1,168 @@
|
||||
+/*
|
||||
+ * (C) 2022 wongsyrone
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published
|
||||
+ * by the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdint.h>
|
||||
+#include <arpa/inet.h>
|
||||
+#include <errno.h>
|
||||
+#include <inttypes.h>
|
||||
+
|
||||
+#include <linux/netfilter/nf_tables.h>
|
||||
+
|
||||
+#include "internal.h"
|
||||
+#include <libmnl/libmnl.h>
|
||||
+#include <libnftnl/expr.h>
|
||||
+#include <libnftnl/rule.h>
|
||||
+
|
||||
+struct nftnl_expr_fullcone {
|
||||
+ uint32_t flags;
|
||||
+ enum nft_registers sreg_proto_min;
|
||||
+ enum nft_registers sreg_proto_max;
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+nftnl_expr_fullcone_set(struct nftnl_expr *e, uint16_t type,
|
||||
+ const void *data, uint32_t data_len)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTNL_EXPR_FULLCONE_FLAGS:
|
||||
+ memcpy(&fullcone->flags, data, sizeof(fullcone->flags));
|
||||
+ break;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MIN:
|
||||
+ memcpy(&fullcone->sreg_proto_min, data, sizeof(fullcone->sreg_proto_min));
|
||||
+ break;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MAX:
|
||||
+ memcpy(&fullcone->sreg_proto_max, data, sizeof(fullcone->sreg_proto_max));
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const void *
|
||||
+nftnl_expr_fullcone_get(const struct nftnl_expr *e, uint16_t type,
|
||||
+ uint32_t *data_len)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTNL_EXPR_FULLCONE_FLAGS:
|
||||
+ *data_len = sizeof(fullcone->flags);
|
||||
+ return &fullcone->flags;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MIN:
|
||||
+ *data_len = sizeof(fullcone->sreg_proto_min);
|
||||
+ return &fullcone->sreg_proto_min;
|
||||
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MAX:
|
||||
+ *data_len = sizeof(fullcone->sreg_proto_max);
|
||||
+ return &fullcone->sreg_proto_max;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static int nftnl_expr_fullcone_cb(const struct nlattr *attr, void *data)
|
||||
+{
|
||||
+ const struct nlattr **tb = data;
|
||||
+ int type = mnl_attr_get_type(attr);
|
||||
+
|
||||
+ if (mnl_attr_type_valid(attr, NFTA_FULLCONE_MAX) < 0)
|
||||
+ return MNL_CB_OK;
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case NFTA_FULLCONE_REG_PROTO_MIN:
|
||||
+ case NFTA_FULLCONE_REG_PROTO_MAX:
|
||||
+ case NFTA_FULLCONE_FLAGS:
|
||||
+ if (mnl_attr_validate(attr, MNL_TYPE_U32) < 0)
|
||||
+ abi_breakage();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ tb[type] = attr;
|
||||
+ return MNL_CB_OK;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+nftnl_expr_fullcone_build(struct nlmsghdr *nlh, const struct nftnl_expr *e)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_FLAGS))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_FLAGS, htobe32(fullcone->flags));
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ htobe32(fullcone->sreg_proto_min));
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX))
|
||||
+ mnl_attr_put_u32(nlh, NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ htobe32(fullcone->sreg_proto_max));
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+nftnl_expr_fullcone_parse(struct nftnl_expr *e, struct nlattr *attr)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+ struct nlattr *tb[NFTA_FULLCONE_MAX+1] = {};
|
||||
+
|
||||
+ if (mnl_attr_parse_nested(attr, nftnl_expr_fullcone_cb, tb) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (tb[NFTA_FULLCONE_FLAGS]) {
|
||||
+ fullcone->flags = be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_FLAGS]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_FLAGS);
|
||||
+ }
|
||||
+ if (tb[NFTA_FULLCONE_REG_PROTO_MIN]) {
|
||||
+ fullcone->sreg_proto_min =
|
||||
+ be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_REG_PROTO_MIN]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN);
|
||||
+ }
|
||||
+ if (tb[NFTA_FULLCONE_REG_PROTO_MAX]) {
|
||||
+ fullcone->sreg_proto_max =
|
||||
+ be32toh(mnl_attr_get_u32(tb[NFTA_FULLCONE_REG_PROTO_MAX]));
|
||||
+ e->flags |= (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int nftnl_expr_fullcone_snprintf(char *buf, size_t remain,
|
||||
+ uint32_t flags, const struct nftnl_expr *e)
|
||||
+{
|
||||
+ struct nftnl_expr_fullcone *fullcone = nftnl_expr_data(e);
|
||||
+ int offset = 0, ret = 0;
|
||||
+
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MIN)) {
|
||||
+ ret = snprintf(buf + offset, remain, "proto_min reg %u ",
|
||||
+ fullcone->sreg_proto_min);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_REG_PROTO_MAX)) {
|
||||
+ ret = snprintf(buf + offset, remain, "proto_max reg %u ",
|
||||
+ fullcone->sreg_proto_max);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+ if (e->flags & (1 << NFTNL_EXPR_FULLCONE_FLAGS)) {
|
||||
+ ret = snprintf(buf + offset, remain, "flags 0x%x ", fullcone->flags);
|
||||
+ SNPRINTF_BUFFER_SIZE(ret, remain, offset);
|
||||
+ }
|
||||
+
|
||||
+ return offset;
|
||||
+}
|
||||
+
|
||||
+struct expr_ops expr_ops_fullcone = {
|
||||
+ .name = "fullcone",
|
||||
+ .alloc_len = sizeof(struct nftnl_expr_fullcone),
|
||||
+ .max_attr = NFTA_FULLCONE_MAX,
|
||||
+ .set = nftnl_expr_fullcone_set,
|
||||
+ .get = nftnl_expr_fullcone_get,
|
||||
+ .parse = nftnl_expr_fullcone_parse,
|
||||
+ .build = nftnl_expr_fullcone_build,
|
||||
+ .output = nftnl_expr_fullcone_snprintf,
|
||||
+};
|
||||
+
|
||||
--- a/src/expr_ops.c
|
||||
+++ b/src/expr_ops.c
|
||||
@@ -19,6 +19,7 @@ extern struct expr_ops expr_ops_limit;
|
||||
extern struct expr_ops expr_ops_log;
|
||||
extern struct expr_ops expr_ops_lookup;
|
||||
extern struct expr_ops expr_ops_masq;
|
||||
+extern struct expr_ops expr_ops_fullcone;
|
||||
extern struct expr_ops expr_ops_match;
|
||||
extern struct expr_ops expr_ops_meta;
|
||||
extern struct expr_ops expr_ops_ng;
|
||||
@@ -63,6 +64,7 @@ static struct expr_ops *expr_ops[] = {
|
||||
&expr_ops_log,
|
||||
&expr_ops_lookup,
|
||||
&expr_ops_masq,
|
||||
+ &expr_ops_fullcone,
|
||||
&expr_ops_match,
|
||||
&expr_ops_meta,
|
||||
&expr_ops_ng,
|
||||
11
6.12/package/libs/libpcap/patches/999-fix-compilation.patch
Normal file
11
6.12/package/libs/libpcap/patches/999-fix-compilation.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/CMakeLists.txt 2024-10-08 08:04:55.220966217 +0200
|
||||
+++ b/CMakeLists.txt 2024-10-08 08:09:03.593429433 +0200
|
||||
@@ -350,7 +350,7 @@
|
||||
if(NOT ${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} /utf-8")
|
||||
endif(NOT ${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
-else(MSVC)
|
||||
+elseif(FALSE)
|
||||
#
|
||||
# For checking if a compiler flag works, failing if it doesn't,
|
||||
# and adding it otherwise.
|
||||
200
6.12/package/libs/mbedtls/Config.in
Normal file
200
6.12/package/libs/mbedtls/Config.in
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
if PACKAGE_libmbedtls
|
||||
|
||||
comment "Option details in source code: include/mbedtls/mbedtls_config.h"
|
||||
|
||||
comment "Ciphers - unselect old or less-used ciphers to reduce binary size"
|
||||
|
||||
config MBEDTLS_AES_C
|
||||
bool "MBEDTLS_AES_C"
|
||||
default y
|
||||
|
||||
config MBEDTLS_CAMELLIA_C
|
||||
bool "MBEDTLS_CAMELLIA_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CCM_C
|
||||
bool "MBEDTLS_CCM_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CMAC_C
|
||||
bool "MBEDTLS_CMAC_C (old but used by hostapd)"
|
||||
default y
|
||||
|
||||
config MBEDTLS_DES_C
|
||||
bool "MBEDTLS_DES_C (old but used by hostapd)"
|
||||
default y
|
||||
|
||||
config MBEDTLS_GCM_C
|
||||
bool "MBEDTLS_GCM_C"
|
||||
default y
|
||||
|
||||
config MBEDTLS_NIST_KW_C
|
||||
bool "MBEDTLS_NIST_KW_C (old but used by hostapd)"
|
||||
default y
|
||||
|
||||
config MBEDTLS_RIPEMD160_C
|
||||
bool "MBEDTLS_RIPEMD160_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_XTEA_C
|
||||
bool "MBEDTLS_XTEA_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_RSA_NO_CRT
|
||||
bool "MBEDTLS_RSA_NO_CRT"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_PSK_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
|
||||
bool "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED"
|
||||
default n
|
||||
|
||||
comment "Curves - unselect old or less-used curves to reduce binary size"
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP192R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP192R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP224R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP224R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP256R1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP384R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP384R1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP521R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP521R1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP192K1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP192K1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP224K1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP224K1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_SECP256K1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_SECP256K1_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_BP256R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_BP256R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_BP384R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_BP384R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_BP512R1_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_BP512R1_ENABLED"
|
||||
default n
|
||||
|
||||
config MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_CURVE25519_ENABLED"
|
||||
default y
|
||||
|
||||
config MBEDTLS_ECP_DP_CURVE448_ENABLED
|
||||
bool "MBEDTLS_ECP_DP_CURVE448_ENABLED"
|
||||
default n
|
||||
|
||||
comment "Build Options - unselect features to reduce binary size"
|
||||
|
||||
config MBEDTLS_CERTS_C
|
||||
bool "MBEDTLS_CERTS_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CIPHER_MODE_OFB
|
||||
bool "MBEDTLS_CIPHER_MODE_OFB"
|
||||
default n
|
||||
|
||||
config MBEDTLS_CIPHER_MODE_XTS
|
||||
bool "MBEDTLS_CIPHER_MODE_XTS"
|
||||
default n
|
||||
|
||||
config MBEDTLS_DEBUG_C
|
||||
bool "MBEDTLS_DEBUG_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_HKDF_C
|
||||
bool "MBEDTLS_HKDF_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_PLATFORM_C
|
||||
bool "MBEDTLS_PLATFORM_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_SELF_TEST
|
||||
bool "MBEDTLS_SELF_TEST"
|
||||
default n
|
||||
|
||||
config MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
bool "MBEDTLS_SSL_TRUNCATED_HMAC"
|
||||
default n
|
||||
|
||||
config MBEDTLS_THREADING_C
|
||||
bool "MBEDTLS_THREADING_C"
|
||||
default y
|
||||
|
||||
config MBEDTLS_THREADING_PTHREAD
|
||||
def_bool MBEDTLS_THREADING_C
|
||||
|
||||
config MBEDTLS_VERSION_C
|
||||
bool "MBEDTLS_VERSION_C"
|
||||
default n
|
||||
|
||||
config MBEDTLS_VERSION_FEATURES
|
||||
bool "MBEDTLS_VERSION_FEATURES"
|
||||
default n
|
||||
|
||||
comment "Build Options"
|
||||
|
||||
config MBEDTLS_ENTROPY_FORCE_SHA256
|
||||
bool "MBEDTLS_ENTROPY_FORCE_SHA256"
|
||||
default y
|
||||
|
||||
config MBEDTLS_SSL_RENEGOTIATION
|
||||
bool "MBEDTLS_SSL_RENEGOTIATION"
|
||||
default n
|
||||
|
||||
endif
|
||||
164
6.12/package/libs/mbedtls/Makefile
Normal file
164
6.12/package/libs/mbedtls/Makefile
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
#
|
||||
# Copyright (C) 2011-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mbedtls
|
||||
PKG_VERSION:=2.28.7
|
||||
PKG_RELEASE:=2
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1df6073f0cf6a4e1953890bf5e0de2a8c7e6be50d6d6c69fa9fefcb1d14e981a
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=gpl-2.0.txt
|
||||
PKG_CPE_ID:=cpe:/a:arm:mbed_tls
|
||||
|
||||
MBEDTLS_BUILD_OPTS_CURVES= \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED \
|
||||
CONFIG_MBEDTLS_ECP_DP_CURVE448_ENABLED
|
||||
|
||||
MBEDTLS_BUILD_OPTS_CIPHERS= \
|
||||
CONFIG_MBEDTLS_AES_C \
|
||||
CONFIG_MBEDTLS_CAMELLIA_C \
|
||||
CONFIG_MBEDTLS_CCM_C \
|
||||
CONFIG_MBEDTLS_CMAC_C \
|
||||
CONFIG_MBEDTLS_DES_C \
|
||||
CONFIG_MBEDTLS_GCM_C \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED \
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED \
|
||||
CONFIG_MBEDTLS_NIST_KW_C \
|
||||
CONFIG_MBEDTLS_RIPEMD160_C \
|
||||
CONFIG_MBEDTLS_RSA_NO_CRT \
|
||||
CONFIG_MBEDTLS_XTEA_C
|
||||
|
||||
MBEDTLS_BUILD_OPTS= \
|
||||
$(MBEDTLS_BUILD_OPTS_CURVES) \
|
||||
$(MBEDTLS_BUILD_OPTS_CIPHERS) \
|
||||
CONFIG_MBEDTLS_CERTS_C \
|
||||
CONFIG_MBEDTLS_CIPHER_MODE_OFB \
|
||||
CONFIG_MBEDTLS_CIPHER_MODE_XTS \
|
||||
CONFIG_MBEDTLS_DEBUG_C \
|
||||
CONFIG_MBEDTLS_ENTROPY_FORCE_SHA256 \
|
||||
CONFIG_MBEDTLS_HKDF_C \
|
||||
CONFIG_MBEDTLS_PLATFORM_C \
|
||||
CONFIG_MBEDTLS_SELF_TEST \
|
||||
CONFIG_MBEDTLS_SSL_RENEGOTIATION \
|
||||
CONFIG_MBEDTLS_SSL_TRUNCATED_HMAC \
|
||||
CONFIG_MBEDTLS_THREADING_C \
|
||||
CONFIG_MBEDTLS_THREADING_PTHREAD \
|
||||
CONFIG_MBEDTLS_VERSION_C \
|
||||
CONFIG_MBEDTLS_VERSION_FEATURES
|
||||
|
||||
PKG_CONFIG_DEPENDS := $(MBEDTLS_BUILD_OPTS)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/mbedtls/Default
|
||||
TITLE:=Embedded SSL
|
||||
URL:=https://tls.mbed.org
|
||||
endef
|
||||
|
||||
define Package/mbedtls/Default/description
|
||||
The aim of the mbedtls project is to provide a quality, open-source
|
||||
cryptographic library written in C and targeted at embedded systems.
|
||||
endef
|
||||
|
||||
define Package/libmbedtls
|
||||
$(call Package/mbedtls/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
SUBMENU:=SSL
|
||||
TITLE+= (library)
|
||||
ABI_VERSION:=13
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libmbedtls/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/mbedtls-util
|
||||
$(call Package/mbedtls/Default)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE+= (utilities)
|
||||
DEPENDS:=+libmbedtls
|
||||
endef
|
||||
|
||||
define Package/libmbedtls/description
|
||||
$(call Package/mbedtls/Default/description)
|
||||
This package contains the mbedtls library.
|
||||
endef
|
||||
|
||||
define Package/mbedtls-util/description
|
||||
$(call Package/mbedtls/Default/description)
|
||||
This package contains mbedtls helper programs for private key and
|
||||
CSR generation (gen_key, cert_req)
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \
|
||||
-DENABLE_TESTING:Bool=OFF \
|
||||
-DENABLE_PROGRAMS:Bool=ON
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
$(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))),
|
||||
$(foreach opt,$(MBEDTLS_BUILD_OPTS),
|
||||
$(PKG_BUILD_DIR)/scripts/config.py \
|
||||
-f $(PKG_BUILD_DIR)/include/mbedtls/config.h \
|
||||
$(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libmbedtls/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/mbedtls-util/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gen_key $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cert_req $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libmbedtls))
|
||||
$(eval $(call BuildPackage,mbedtls-util))
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
From eb9d4fdf1846e688d51d86a9a50f0312aca2af25 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Sun, 23 Oct 2022 19:48:18 -0400
|
||||
Subject: [PATCH] x509 crt verify SAN iPAddress
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
include/mbedtls/x509_crt.h | 2 +-
|
||||
library/x509_crt.c | 126 ++++++++++++++++++++++++++++++-------
|
||||
2 files changed, 103 insertions(+), 25 deletions(-)
|
||||
|
||||
--- a/include/mbedtls/x509_crt.h
|
||||
+++ b/include/mbedtls/x509_crt.h
|
||||
@@ -608,7 +608,7 @@ int mbedtls_x509_crt_verify_info(char *b
|
||||
* \param cn The expected Common Name. This will be checked to be
|
||||
* present in the certificate's subjectAltNames extension or,
|
||||
* if this extension is absent, as a CN component in its
|
||||
- * Subject name. Currently only DNS names are supported. This
|
||||
+ * Subject name. DNS names and IP addresses are supported. This
|
||||
* may be \c NULL if the CN need not be verified.
|
||||
* \param flags The address at which to store the result of the verification.
|
||||
* If the verification couldn't be completed, the flag value is
|
||||
--- a/library/x509_crt.c
|
||||
+++ b/library/x509_crt.c
|
||||
@@ -57,6 +57,10 @@
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||
+#define WIN32_LEAN_AND_MEAN
|
||||
+#ifndef _WIN32_WINNT
|
||||
+#define _WIN32_WINNT 0x0600
|
||||
+#endif
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
@@ -3002,6 +3006,61 @@ find_parent:
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
+#pragma comment(lib, "ws2_32.lib")
|
||||
+#include <winsock2.h>
|
||||
+#include <ws2tcpip.h>
|
||||
+#elif (defined(__MINGW32__) || defined(__MINGW64__)) && _WIN32_WINNT >= 0x0600
|
||||
+#include <winsock2.h>
|
||||
+#include <ws2tcpip.h>
|
||||
+#endif
|
||||
+#elif defined(__sun)
|
||||
+/* Solaris requires -lsocket -lnsl for inet_pton() */
|
||||
+#elif defined(__has_include)
|
||||
+#if __has_include(<sys/socket.h>)
|
||||
+#include <sys/socket.h>
|
||||
+#endif
|
||||
+#if __has_include(<arpa/inet.h>)
|
||||
+#include <arpa/inet.h>
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+/* Use whether or not AF_INET6 is defined to indicate whether or not to use
|
||||
+ * the platform inet_pton() or a local implementation (below). The local
|
||||
+ * implementation may be used even in cases where the platform provides
|
||||
+ * inet_pton(), e.g. when there are different includes required and/or the
|
||||
+ * platform implementation requires dependencies on additional libraries.
|
||||
+ * Specifically, Windows requires custom includes and additional link
|
||||
+ * dependencies, and Solaris requires additional link dependencies.
|
||||
+ * Also, as a coarse heuristic, use the local implementation if the compiler
|
||||
+ * does not support __has_include(), or if the definition of AF_INET6 is not
|
||||
+ * provided by headers included (or not) via __has_include() above. */
|
||||
+#ifndef AF_INET6
|
||||
+
|
||||
+#define x509_cn_inet_pton(cn, dst) (0)
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+static int x509_inet_pton_ipv6(const char *src, void *dst)
|
||||
+{
|
||||
+ return inet_pton(AF_INET6, src, dst) == 1 ? 0 : -1;
|
||||
+}
|
||||
+
|
||||
+static int x509_inet_pton_ipv4(const char *src, void *dst)
|
||||
+{
|
||||
+ return inet_pton(AF_INET, src, dst) == 1 ? 0 : -1;
|
||||
+}
|
||||
+
|
||||
+#endif /* AF_INET6 */
|
||||
+
|
||||
+static size_t x509_cn_inet_pton(const char *cn, void *dst)
|
||||
+{
|
||||
+ return strchr(cn, ':') == NULL
|
||||
+ ? x509_inet_pton_ipv4(cn, dst) == 0 ? 4 : 0
|
||||
+ : x509_inet_pton_ipv6(cn, dst) == 0 ? 16 : 0;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Check for CN match
|
||||
*/
|
||||
@@ -3022,24 +3081,51 @@ static int x509_crt_check_cn(const mbedt
|
||||
return -1;
|
||||
}
|
||||
|
||||
+static int x509_crt_check_san_ip(const mbedtls_x509_sequence *san,
|
||||
+ const char *cn, size_t cn_len)
|
||||
+{
|
||||
+ uint32_t ip[4];
|
||||
+ cn_len = x509_cn_inet_pton(cn, ip);
|
||||
+ if (cn_len == 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
|
||||
+ const unsigned char san_type = (unsigned char) cur->buf.tag &
|
||||
+ MBEDTLS_ASN1_TAG_VALUE_MASK;
|
||||
+ if (san_type == MBEDTLS_X509_SAN_IP_ADDRESS &&
|
||||
+ cur->buf.len == cn_len && memcmp(cur->buf.p, ip, cn_len) == 0) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Check for SAN match, see RFC 5280 Section 4.2.1.6
|
||||
*/
|
||||
-static int x509_crt_check_san(const mbedtls_x509_buf *name,
|
||||
+static int x509_crt_check_san(const mbedtls_x509_sequence *san,
|
||||
const char *cn, size_t cn_len)
|
||||
{
|
||||
- const unsigned char san_type = (unsigned char) name->tag &
|
||||
- MBEDTLS_ASN1_TAG_VALUE_MASK;
|
||||
-
|
||||
- /* dNSName */
|
||||
- if (san_type == MBEDTLS_X509_SAN_DNS_NAME) {
|
||||
- return x509_crt_check_cn(name, cn, cn_len);
|
||||
+ int san_ip = 0;
|
||||
+ for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
|
||||
+ switch ((unsigned char) cur->buf.tag & MBEDTLS_ASN1_TAG_VALUE_MASK) {
|
||||
+ case MBEDTLS_X509_SAN_DNS_NAME: /* dNSName */
|
||||
+ if (x509_crt_check_cn(&cur->buf, cn, cn_len) == 0) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ break;
|
||||
+ case MBEDTLS_X509_SAN_IP_ADDRESS: /* iPAddress */
|
||||
+ san_ip = 1;
|
||||
+ break;
|
||||
+ /* (We may handle other types here later.) */
|
||||
+ default: /* Unrecognized type */
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
- /* (We may handle other types here later.) */
|
||||
-
|
||||
- /* Unrecognized type */
|
||||
- return -1;
|
||||
+ return san_ip ? x509_crt_check_san_ip(san, cn, cn_len) : -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3050,31 +3136,23 @@ static void x509_crt_verify_name(const m
|
||||
uint32_t *flags)
|
||||
{
|
||||
const mbedtls_x509_name *name;
|
||||
- const mbedtls_x509_sequence *cur;
|
||||
size_t cn_len = strlen(cn);
|
||||
|
||||
if (crt->ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME) {
|
||||
- for (cur = &crt->subject_alt_names; cur != NULL; cur = cur->next) {
|
||||
- if (x509_crt_check_san(&cur->buf, cn, cn_len) == 0) {
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (cur == NULL) {
|
||||
- *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
|
||||
+ if (x509_crt_check_san(&crt->subject_alt_names, cn, cn_len) == 0) {
|
||||
+ return;
|
||||
}
|
||||
} else {
|
||||
for (name = &crt->subject; name != NULL; name = name->next) {
|
||||
if (MBEDTLS_OID_CMP(MBEDTLS_OID_AT_CN, &name->oid) == 0 &&
|
||||
x509_crt_check_cn(&name->val, cn, cn_len) == 0) {
|
||||
- break;
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
- if (name == NULL) {
|
||||
- *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
|
||||
- }
|
||||
}
|
||||
+
|
||||
+ *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
|
||||
}
|
||||
|
||||
/*
|
||||
15
6.12/package/libs/mbedtls/patches/101-remove-test.patch
Normal file
15
6.12/package/libs/mbedtls/patches/101-remove-test.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- a/programs/CMakeLists.txt
|
||||
+++ b/programs/CMakeLists.txt
|
||||
@@ -1,12 +1,8 @@
|
||||
add_subdirectory(aes)
|
||||
-if (NOT WIN32)
|
||||
- add_subdirectory(fuzz)
|
||||
-endif()
|
||||
add_subdirectory(hash)
|
||||
add_subdirectory(pkey)
|
||||
add_subdirectory(psa)
|
||||
add_subdirectory(random)
|
||||
add_subdirectory(ssl)
|
||||
-add_subdirectory(test)
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(x509)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
--- a/tests/include/test/macros.h
|
||||
+++ b/tests/include/test/macros.h
|
||||
@@ -135,8 +135,8 @@
|
||||
do { \
|
||||
TEST_ASSERT((pointer) == NULL); \
|
||||
if ((item_count) != 0) { \
|
||||
- (pointer) = mbedtls_calloc(sizeof(*(pointer)), \
|
||||
- (item_count)); \
|
||||
+ (pointer) = mbedtls_calloc((item_count), \
|
||||
+ sizeof(*(pointer))); \
|
||||
TEST_ASSERT((pointer) != NULL); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -153,8 +153,8 @@
|
||||
do { \
|
||||
TEST_ASSERT((pointer) == NULL); \
|
||||
if ((item_count) != 0) { \
|
||||
- (pointer) = mbedtls_calloc(sizeof(*(pointer)), \
|
||||
- (item_count)); \
|
||||
+ (pointer) = mbedtls_calloc((item_count), \
|
||||
+ sizeof(*(pointer))); \
|
||||
TEST_ASSUME((pointer) != NULL); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- a/root/usr/share/firewall4/templates/ruleset.uc 2023-07-28 18:55:05.492297782 +0200
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc 2023-07-28 18:58:52.300598623 +0200
|
||||
@@ -218,9 +218,7 @@
|
||||
{% for (let rule in fw4.rules(`input_${zone.name}`)): %}
|
||||
{%+ include("rule.uc", { fw4, rule }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.dflags.dnat): %}
|
||||
ct status dnat accept comment "!fw4: Accept port redirections"
|
||||
-{% endif %}
|
||||
{% fw4.includes('chain-append', `input_${zone.name}`) %}
|
||||
jump {{ zone.input }}_from_{{ zone.name }}
|
||||
}
|
||||
@@ -239,9 +237,7 @@
|
||||
{% for (let rule in fw4.rules(`forward_${zone.name}`)): %}
|
||||
{%+ include("rule.uc", { fw4, rule }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.dflags.dnat): %}
|
||||
ct status dnat accept comment "!fw4: Accept port forwards"
|
||||
-{% endif %}
|
||||
{% fw4.includes('chain-append', `forward_${zone.name}`) %}
|
||||
jump {{ zone.forward }}_to_{{ zone.name }}
|
||||
{% if (fw4.forward_policy() != "accept" && (zone.log & 1)): %}
|
||||
|
|
@ -0,0 +1,248 @@
|
|||
From d4081c498ddca184578903fe5199d390bbc0707b Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Sat, 9 Apr 2022 13:24:19 +0800
|
||||
Subject: [PATCH] firewall4: add fullcone support
|
||||
|
||||
fullcone is drop-in replacement of masq for non-udp traffic
|
||||
|
||||
add runtime fullcone rule check, disable it globally if fullcone expr is
|
||||
invalid
|
||||
|
||||
defaults.fullcone is the global switch, while zone.fullcone4 and
|
||||
zone.fullcone6 are switches for IPv4 and IPv6 respectively, most
|
||||
IPv6 traffic do NOT need this FullCone NAT functionality.
|
||||
---
|
||||
root/etc/config/firewall | 3 +
|
||||
root/usr/share/firewall4/templates/ruleset.uc | 16 +++-
|
||||
.../firewall4/templates/zone-fullcone.uc | 4 +
|
||||
root/usr/share/ucode/fw4.uc | 76 ++++++++++++++++++-
|
||||
4 files changed, 96 insertions(+), 3 deletions(-)
|
||||
create mode 100644 root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
|
||||
diff --git a/root/etc/config/firewall b/root/etc/config/firewall
|
||||
index b9a4647..7187723 100644
|
||||
--- a/root/etc/config/firewall
|
||||
+++ b/root/etc/config/firewall
|
||||
@@ -5,6 +5,7 @@ config defaults
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
+ option fullcone '0'
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
@@ -20,6 +21,8 @@ config zone
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
+ option fullcone4 '0'
|
||||
+ option fullcone6 '0'
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
diff --git a/root/usr/share/firewall4/templates/ruleset.uc b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
index eaa1f04..e29eae6 100644
|
||||
--- a/root/usr/share/firewall4/templates/ruleset.uc
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
@@ -310,6 +310,12 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`dstnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{% endfor %}
|
||||
+{% if (zone.fullcone4): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 4, direction: "dstnat" }) %}
|
||||
+{% endif %}
|
||||
+{% if (zone.fullcone6): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 6, direction: "dstnat" }) %}
|
||||
+{% endif %}
|
||||
{% fw4.includes('chain-append', `dstnat_${zone.name}`) %}
|
||||
}
|
||||
|
||||
@@ -320,20 +326,26 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`srcnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{% endfor %}
|
||||
-{% if (zone.masq): %}
|
||||
+{% if (zone.masq && !zone.fullcone4): %}
|
||||
{% for (let saddrs in zone.masq4_src_subnets): %}
|
||||
{% for (let daddrs in zone.masq4_dest_subnets): %}
|
||||
{%+ include("zone-masq.uc", { fw4, zone, family: 4, saddrs, daddrs }) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
-{% if (zone.masq6): %}
|
||||
+{% if (zone.masq6 && !zone.fullcone6): %}
|
||||
{% for (let saddrs in zone.masq6_src_subnets): %}
|
||||
{% for (let daddrs in zone.masq6_dest_subnets): %}
|
||||
{%+ include("zone-masq.uc", { fw4, zone, family: 6, saddrs, daddrs }) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
+{% if (zone.fullcone4): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 4, direction: "srcnat" }) %}
|
||||
+{% endif %}
|
||||
+{% if (zone.fullcone6): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, family: 6, direction: "srcnat" }) %}
|
||||
+{% endif %}
|
||||
{% fw4.includes('chain-append', `srcnat_${zone.name}`) %}
|
||||
}
|
||||
|
||||
diff --git a/root/usr/share/firewall4/templates/zone-fullcone.uc b/root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
new file mode 100644
|
||||
index 0000000..77d9806
|
||||
--- /dev/null
|
||||
+++ b/root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
@@ -0,0 +1,4 @@
|
||||
+{# /usr/share/firewall4/templates/zone-fullcone.uc #}
|
||||
+ meta nfproto {{ fw4.nfproto(family) }} fullcone comment "!fw4: Handle {{
|
||||
+ zone.name
|
||||
+}} {{ fw4.nfproto(family, true) }} fullcone NAT {{ direction }} traffic"
|
||||
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
|
||||
index 1b4764c..c5716da 100644
|
||||
--- a/root/usr/share/ucode/fw4.uc
|
||||
+++ b/root/usr/share/ucode/fw4.uc
|
||||
@@ -1,3 +1,5 @@
|
||||
+// /usr/share/ucode/fw4.uc
|
||||
+
|
||||
const fs = require("fs");
|
||||
const uci = require("uci");
|
||||
const ubus = require("ubus");
|
||||
@@ -428,6 +430,25 @@ function nft_try_hw_offload(devices) {
|
||||
return (rc == 0);
|
||||
}
|
||||
|
||||
+function nft_try_fullcone() {
|
||||
+ let nft_test =
|
||||
+ 'add table inet fw4-fullcone-test; ' +
|
||||
+ 'add chain inet fw4-fullcone-test dstnat { ' +
|
||||
+ 'type nat hook prerouting priority -100; policy accept; ' +
|
||||
+ 'fullcone; ' +
|
||||
+ '}; ' +
|
||||
+ 'add chain inet fw4-fullcone-test srcnat { ' +
|
||||
+ 'type nat hook postrouting priority -100; policy accept; ' +
|
||||
+ 'fullcone; ' +
|
||||
+ '}; ';
|
||||
+ let cmd = sprintf("/usr/sbin/nft -c '%s' 2>/dev/null", replace(nft_test, "'", "'\\''"));
|
||||
+ let ok = system(cmd) == 0;
|
||||
+ //if (!ok) {
|
||||
+ // warn("nft_try_fullcone: cmd "+ cmd + "\n");
|
||||
+ //}
|
||||
+ return ok;
|
||||
+}
|
||||
+
|
||||
|
||||
return {
|
||||
read_kernel_version: function() {
|
||||
@@ -765,6 +786,18 @@ return {
|
||||
warn(`[!] ${msg}\n`);
|
||||
},
|
||||
|
||||
+ myinfo: function(fmt, ...args) {
|
||||
+ if (getenv("QUIET"))
|
||||
+ return;
|
||||
+
|
||||
+ let msg = sprintf(fmt, ...args);
|
||||
+
|
||||
+ if (getenv("TTY"))
|
||||
+ warn(`\033[32m${msg}\033[m\n`);
|
||||
+ else
|
||||
+ warn(`[I] ${msg}\n`);
|
||||
+ },
|
||||
+
|
||||
get: function(sid, opt) {
|
||||
return this.cursor.get("firewall", sid, opt);
|
||||
},
|
||||
@@ -946,6 +979,21 @@ return {
|
||||
}
|
||||
},
|
||||
|
||||
+ myinfo_section: function(s, msg) {
|
||||
+ if (s[".name"]) {
|
||||
+ if (s.name)
|
||||
+ this.myinfo("Section %s (%s) %s", this.section_id(s[".name"]), s.name, msg);
|
||||
+ else
|
||||
+ this.myinfo("Section %s %s", this.section_id(s[".name"]), msg);
|
||||
+ }
|
||||
+ else {
|
||||
+ if (s.name)
|
||||
+ this.myinfo("ubus %s (%s) %s", s.type || "rule", s.name, msg);
|
||||
+ else
|
||||
+ this.myinfo("ubus %s %s", s.type || "rule", msg);
|
||||
+ }
|
||||
+ },
|
||||
+
|
||||
parse_policy: function(val) {
|
||||
return this.parse_enum(val, [
|
||||
"accept",
|
||||
@@ -1385,6 +1433,7 @@ return {
|
||||
"dnat",
|
||||
"snat",
|
||||
"masquerade",
|
||||
+ "fullcone",
|
||||
"accept",
|
||||
"reject",
|
||||
"drop"
|
||||
@@ -1852,6 +1901,7 @@ return {
|
||||
}
|
||||
|
||||
let defs = this.parse_options(data, {
|
||||
+ fullcone: [ "bool", "0" ],
|
||||
input: [ "policy", "drop" ],
|
||||
output: [ "policy", "drop" ],
|
||||
forward: [ "policy", "drop" ],
|
||||
@@ -1884,6 +1934,11 @@ return {
|
||||
|
||||
delete defs.syn_flood;
|
||||
|
||||
+ if (!nft_try_fullcone()) {
|
||||
+ delete defs.fullcone;
|
||||
+ //warn("nft_try_fullcone failed, disable fullcone globally\n");
|
||||
+ }
|
||||
+
|
||||
this.state.defaults = defs;
|
||||
},
|
||||
|
||||
@@ -1908,6 +1963,8 @@ return {
|
||||
masq_dest: [ "network", null, PARSE_LIST ],
|
||||
|
||||
masq6: [ "bool" ],
|
||||
+ fullcone4: [ "bool", "0" ],
|
||||
+ fullcone6: [ "bool", "0" ],
|
||||
|
||||
extra: [ "string", null, UNSUPPORTED ],
|
||||
extra_src: [ "string", null, UNSUPPORTED ],
|
||||
@@ -1940,6 +1997,18 @@ return {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (this.state.defaults && !this.state.defaults.fullcone) {
|
||||
+ //this.warn_section(data, "fullcone in defaults not enabled, ignore zone fullcone settings");
|
||||
+ zone.fullcone4 = false;
|
||||
+ zone.fullcone6 = false;
|
||||
+ }
|
||||
+ if (zone.fullcone4) {
|
||||
+ this.myinfo_section(data, "IPv4 fullcone enabled for zone '" + zone.name + "'");
|
||||
+ }
|
||||
+ if (zone.fullcone6) {
|
||||
+ this.myinfo_section(data, "IPv6 fullcone enabled for zone '" + zone.name + "'");
|
||||
+ }
|
||||
+
|
||||
if (zone.mtu_fix && this.kernel < 0x040a0000) {
|
||||
this.warn_section(data, "option 'mtu_fix' requires kernel 4.10 or later");
|
||||
return;
|
||||
@@ -2110,10 +2179,15 @@ return {
|
||||
zone.related_subnets = related_subnets;
|
||||
zone.related_physdevs = related_physdevs;
|
||||
|
||||
+ if (zone.fullcone4 || zone.fullcone6) {
|
||||
+ zone.dflags.snat = true;
|
||||
+ zone.dflags.dnat = true;
|
||||
+ }
|
||||
+
|
||||
if (zone.masq || zone.masq6)
|
||||
zone.dflags.snat = true;
|
||||
|
||||
- if ((zone.auto_helper && !(zone.masq || zone.masq6)) || length(zone.helper)) {
|
||||
+ if ((zone.auto_helper && !(zone.masq || zone.masq6 || zone.fullcone4 || zone.fullcone6)) || length(zone.helper)) {
|
||||
zone.dflags.helper = true;
|
||||
|
||||
for (let helper in (length(zone.helper) ? zone.helper : this.state.helpers)) {
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
--- a/root/usr/share/firewall4/templates/ruleset.uc.old
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
@@ -181,7 +181,14 @@
|
||||
|
||||
chain prerouting {
|
||||
type filter hook prerouting priority filter; policy accept;
|
||||
+{% for (let rule in fw4.rules("forward")): %}
|
||||
+ {%+ include("rule.uc", { fw4, zone: (rule.src?.zone?.log_limit ? rule.src.zone : rule.dest?.zone), rule }) %}
|
||||
+{% endfor %}
|
||||
+
|
||||
{% for (let zone in fw4.zones()): %}
|
||||
+{% for (let rule in fw4.rules(`forward_${zone.name}`)): %}
|
||||
+ {%+ include("rule.uc", { fw4, zone, rule }) %}
|
||||
+{% endfor %}
|
||||
{% if (zone.dflags.helper): %}
|
||||
{% for (let rule in zone.match_rules): %}
|
||||
{% let devices_pos = fw4.filter_loopback_devs(rule.devices_pos, false); %}
|
||||
1347
6.12/package/network/services/dnsmasq/files/dnsmasq.init
Executable file
1347
6.12/package/network/services/dnsmasq/files/dnsmasq.init
Executable file
File diff suppressed because it is too large
Load diff
85
6.12/package/network/utils/nftables/Makefile
Normal file
85
6.12/package/network/utils/nftables/Makefile
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nftables
|
||||
PKG_VERSION:=1.0.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
PKG_HASH:=c12ac941fff9adaedf17367d5ce213789b98a0d314277bc22b3d71e10891f412
|
||||
|
||||
PKG_MAINTAINER:=
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_BUILD_FLAGS:=lto
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
DISABLE_NLS:=
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-debug \
|
||||
--disable-man-doc \
|
||||
--with-mini-gmp \
|
||||
--without-cli \
|
||||
--disable-python
|
||||
|
||||
define Package/nftables/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Firewall
|
||||
TITLE:=nftables userspace utility
|
||||
DEPENDS:=+kmod-nft-core +libnftnl
|
||||
URL:=http://netfilter.org/projects/nftables/
|
||||
PROVIDES:=nftables
|
||||
endef
|
||||
|
||||
define Package/nftables-nojson
|
||||
$(Package/nftables/Default)
|
||||
TITLE+= no JSON support
|
||||
VARIANT:=nojson
|
||||
DEFAULT_VARIANT:=1
|
||||
CONFLICTS:=nftables-json
|
||||
endef
|
||||
|
||||
define Package/nftables-json
|
||||
$(Package/nftables/Default)
|
||||
TITLE+= with JSON support
|
||||
VARIANT:=json
|
||||
DEPENDS+=+jansson
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),json)
|
||||
CONFIGURE_ARGS += --with-json
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/nftables $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftables.pc \
|
||||
$(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/nftables/install/Default
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
Package/nftables-nojson/install = $(Package/nftables/install/Default)
|
||||
Package/nftables-json/install = $(Package/nftables/install/Default)
|
||||
|
||||
$(eval $(call BuildPackage,nftables-nojson))
|
||||
$(eval $(call BuildPackage,nftables-json))
|
||||
|
|
@ -0,0 +1,223 @@
|
|||
From 58c89e8768711a959fdc6e953df3ea2254ff93c1 Mon Sep 17 00:00:00 2001
|
||||
From: Syrone Wong <wong.syrone@gmail.com>
|
||||
Date: Sat, 9 Apr 2022 00:38:51 +0800
|
||||
Subject: [PATCH] nftables: add fullcone expression support
|
||||
|
||||
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
|
||||
---
|
||||
include/linux/netfilter/nf_tables.h | 16 ++++++++++
|
||||
include/statement.h | 1 +
|
||||
src/netlink_delinearize.c | 48 +++++++++++++++++++++++++++++
|
||||
src/netlink_linearize.c | 7 +++++
|
||||
src/parser_bison.y | 28 +++++++++++++++--
|
||||
src/scanner.l | 1 +
|
||||
src/statement.c | 1 +
|
||||
7 files changed, 100 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
|
||||
index 75df968..beab9d8 100644
|
||||
--- a/include/linux/netfilter/nf_tables.h
|
||||
+++ b/include/linux/netfilter/nf_tables.h
|
||||
@@ -1409,6 +1409,22 @@ enum nft_masq_attributes {
|
||||
};
|
||||
#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
|
||||
|
||||
+/**
|
||||
+ * enum nft_fullcone_attributes - nf_tables fullcone expression attributes
|
||||
+ *
|
||||
+ * @NFTA_FULLCONE_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
|
||||
+ * @NFTA_FULLCONE_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
|
||||
+ */
|
||||
+enum nft_fullcone_attributes {
|
||||
+ NFTA_FULLCONE_UNSPEC,
|
||||
+ NFTA_FULLCONE_FLAGS,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MIN,
|
||||
+ NFTA_FULLCONE_REG_PROTO_MAX,
|
||||
+ __NFTA_FULLCONE_MAX
|
||||
+};
|
||||
+#define NFTA_FULLCONE_MAX (__NFTA_FULLCONE_MAX - 1)
|
||||
+
|
||||
/**
|
||||
* enum nft_redir_attributes - nf_tables redirect expression netlink attributes
|
||||
*
|
||||
diff --git a/include/statement.h b/include/statement.h
|
||||
index 2a2d300..cbd48dd 100644
|
||||
--- a/include/statement.h
|
||||
+++ b/include/statement.h
|
||||
@@ -122,6 +122,7 @@ enum nft_nat_etypes {
|
||||
__NFT_NAT_SNAT = NFT_NAT_SNAT,
|
||||
__NFT_NAT_DNAT = NFT_NAT_DNAT,
|
||||
NFT_NAT_MASQ,
|
||||
+ NFT_NAT_FULLCONE,
|
||||
NFT_NAT_REDIR,
|
||||
};
|
||||
|
||||
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
|
||||
index 068c3bb..8513113 100644
|
||||
--- a/src/netlink_delinearize.c
|
||||
+++ b/src/netlink_delinearize.c
|
||||
@@ -1369,6 +1369,53 @@ static void netlink_parse_masq(struct netlink_parse_ctx *ctx,
|
||||
stmt_free(stmt);
|
||||
}
|
||||
|
||||
+static void netlink_parse_fullcone(struct netlink_parse_ctx *ctx,
|
||||
+ const struct location *loc,
|
||||
+ const struct nftnl_expr *nle)
|
||||
+{
|
||||
+ enum nft_registers reg1, reg2;
|
||||
+ struct expr *proto;
|
||||
+ struct stmt *stmt;
|
||||
+ uint32_t flags = 0;
|
||||
+
|
||||
+ if (nftnl_expr_is_set(nle, NFTNL_EXPR_FULLCONE_FLAGS))
|
||||
+ flags = nftnl_expr_get_u32(nle, NFTNL_EXPR_FULLCONE_FLAGS);
|
||||
+
|
||||
+ stmt = nat_stmt_alloc(loc, NFT_NAT_FULLCONE);
|
||||
+ stmt->nat.flags = flags;
|
||||
+
|
||||
+ reg1 = netlink_parse_register(nle, NFTNL_EXPR_FULLCONE_REG_PROTO_MIN);
|
||||
+ if (reg1) {
|
||||
+ proto = netlink_get_register(ctx, loc, reg1);
|
||||
+ if (proto == NULL) {
|
||||
+ netlink_error(ctx, loc,
|
||||
+ "fullcone statement has no proto expression");
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+ expr_set_type(proto, &inet_service_type, BYTEORDER_BIG_ENDIAN);
|
||||
+ stmt->nat.proto = proto;
|
||||
+ }
|
||||
+
|
||||
+ reg2 = netlink_parse_register(nle, NFTNL_EXPR_FULLCONE_REG_PROTO_MAX);
|
||||
+ if (reg2 && reg2 != reg1) {
|
||||
+ proto = netlink_get_register(ctx, loc, reg2);
|
||||
+ if (proto == NULL) {
|
||||
+ netlink_error(ctx, loc,
|
||||
+ "fullcone statement has no proto expression");
|
||||
+ goto out_err;
|
||||
+ }
|
||||
+ expr_set_type(proto, &inet_service_type, BYTEORDER_BIG_ENDIAN);
|
||||
+ if (stmt->nat.proto != NULL)
|
||||
+ proto = range_expr_alloc(loc, stmt->nat.proto, proto);
|
||||
+ stmt->nat.proto = proto;
|
||||
+ }
|
||||
+
|
||||
+ ctx->stmt = stmt;
|
||||
+ return;
|
||||
+out_err:
|
||||
+ stmt_free(stmt);
|
||||
+}
|
||||
+
|
||||
static void netlink_parse_redir(struct netlink_parse_ctx *ctx,
|
||||
const struct location *loc,
|
||||
const struct nftnl_expr *nle)
|
||||
@@ -1787,6 +1834,7 @@ static const struct expr_handler netlink_parsers[] = {
|
||||
{ .name = "tproxy", .parse = netlink_parse_tproxy },
|
||||
{ .name = "notrack", .parse = netlink_parse_notrack },
|
||||
{ .name = "masq", .parse = netlink_parse_masq },
|
||||
+ { .name = "fullcone", .parse = netlink_parse_fullcone },
|
||||
{ .name = "redir", .parse = netlink_parse_redir },
|
||||
{ .name = "dup", .parse = netlink_parse_dup },
|
||||
{ .name = "queue", .parse = netlink_parse_queue },
|
||||
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c
|
||||
index c8bbcb7..505eafa 100644
|
||||
--- a/src/netlink_linearize.c
|
||||
+++ b/src/netlink_linearize.c
|
||||
@@ -1140,6 +1140,13 @@ static void netlink_gen_nat_stmt(struct netlink_linearize_ctx *ctx,
|
||||
nftnl_reg_pmin = NFTNL_EXPR_MASQ_REG_PROTO_MIN;
|
||||
nftnl_reg_pmax = NFTNL_EXPR_MASQ_REG_PROTO_MAX;
|
||||
break;
|
||||
+ case NFT_NAT_FULLCONE:
|
||||
+ nle = alloc_nft_expr("fullcone");
|
||||
+
|
||||
+ nftnl_flag_attr = NFTNL_EXPR_FULLCONE_FLAGS;
|
||||
+ nftnl_reg_pmin = NFTNL_EXPR_FULLCONE_REG_PROTO_MIN;
|
||||
+ nftnl_reg_pmax = NFTNL_EXPR_FULLCONE_REG_PROTO_MAX;
|
||||
+ break;
|
||||
case NFT_NAT_REDIR:
|
||||
nle = alloc_nft_expr("redir");
|
||||
|
||||
diff --git a/src/parser_bison.y b/src/parser_bison.y
|
||||
index ca5c488..ec9fc9b 100644
|
||||
--- a/src/parser_bison.y
|
||||
+++ b/src/parser_bison.y
|
||||
@@ -571,6 +571,7 @@ int nft_lex(void *, void *, void *);
|
||||
%token SNAT "snat"
|
||||
%token DNAT "dnat"
|
||||
%token MASQUERADE "masquerade"
|
||||
+%token FULLCONE "fullcone"
|
||||
%token REDIRECT "redirect"
|
||||
%token RANDOM "random"
|
||||
%token FULLY_RANDOM "fully-random"
|
||||
@@ -703,8 +704,8 @@ int nft_lex(void *, void *, void *);
|
||||
%type <val> limit_burst_pkts limit_burst_bytes limit_mode limit_bytes time_unit quota_mode
|
||||
%type <stmt> reject_stmt reject_stmt_alloc
|
||||
%destructor { stmt_free($$); } reject_stmt reject_stmt_alloc
|
||||
-%type <stmt> nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
-%destructor { stmt_free($$); } nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
+%type <stmt> nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc fullcone_stmt fullcone_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
+%destructor { stmt_free($$); } nat_stmt nat_stmt_alloc masq_stmt masq_stmt_alloc fullcone_stmt fullcone_stmt_alloc redir_stmt redir_stmt_alloc
|
||||
%type <val> nf_nat_flags nf_nat_flag offset_opt
|
||||
%type <stmt> tproxy_stmt
|
||||
%destructor { stmt_free($$); } tproxy_stmt
|
||||
@@ -2853,6 +2854,7 @@ stmt : verdict_stmt
|
||||
| queue_stmt
|
||||
| ct_stmt
|
||||
| masq_stmt close_scope_nat
|
||||
+ | fullcone_stmt close_scope_nat
|
||||
| redir_stmt close_scope_nat
|
||||
| dup_stmt close_scope_dup
|
||||
| fwd_stmt close_scope_fwd
|
||||
@@ -3753,6 +3755,28 @@ masq_stmt_args : TO COLON stmt_expr
|
||||
}
|
||||
;
|
||||
|
||||
+fullcone_stmt : fullcone_stmt_alloc fullcone_stmt_args
|
||||
+ | fullcone_stmt_alloc
|
||||
+ ;
|
||||
+
|
||||
+fullcone_stmt_alloc : FULLCONE { $$ = nat_stmt_alloc(&@$, NFT_NAT_FULLCONE); }
|
||||
+ ;
|
||||
+
|
||||
+fullcone_stmt_args : TO COLON stmt_expr
|
||||
+ {
|
||||
+ $<stmt>0->nat.proto = $3;
|
||||
+ }
|
||||
+ | TO COLON stmt_expr nf_nat_flags
|
||||
+ {
|
||||
+ $<stmt>0->nat.proto = $3;
|
||||
+ $<stmt>0->nat.flags = $4;
|
||||
+ }
|
||||
+ | nf_nat_flags
|
||||
+ {
|
||||
+ $<stmt>0->nat.flags = $1;
|
||||
+ }
|
||||
+ ;
|
||||
+
|
||||
redir_stmt : redir_stmt_alloc redir_stmt_arg
|
||||
| redir_stmt_alloc
|
||||
;
|
||||
diff --git a/src/scanner.l b/src/scanner.l
|
||||
index 2154281..c389860 100644
|
||||
--- a/src/scanner.l
|
||||
+++ b/src/scanner.l
|
||||
@@ -453,6 +453,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
|
||||
"snat" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return SNAT; }
|
||||
"dnat" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return DNAT; }
|
||||
"masquerade" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return MASQUERADE; }
|
||||
+"fullcone" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return FULLCONE; }
|
||||
"redirect" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_NAT); return REDIRECT; }
|
||||
"random" { return RANDOM; }
|
||||
<SCANSTATE_STMT_NAT>{
|
||||
diff --git a/src/statement.c b/src/statement.c
|
||||
index 30caf9c..f4866c2 100644
|
||||
--- a/src/statement.c
|
||||
+++ b/src/statement.c
|
||||
@@ -650,6 +650,7 @@ const char *nat_etype2str(enum nft_nat_etypes type)
|
||||
[NFT_NAT_SNAT] = "snat",
|
||||
[NFT_NAT_DNAT] = "dnat",
|
||||
[NFT_NAT_MASQ] = "masquerade",
|
||||
+ [NFT_NAT_FULLCONE] = "fullcone",
|
||||
[NFT_NAT_REDIR] = "redirect",
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue