Compare commits
147 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb5569750a | ||
|
|
75f69b01b4 | ||
|
|
f8624db86c | ||
|
|
b54ef39e0b | ||
|
|
a50f5b3fb2 | ||
|
|
c032ed3c26 | ||
|
|
4ec80cd907 | ||
|
|
b0968be02e | ||
|
|
44fa330a82 | ||
|
|
35502e01b4 | ||
|
|
98209da5e6 | ||
|
|
022e6c30c2 | ||
|
|
c6db6ff591 | ||
|
|
e3ec17d0ec | ||
|
|
838c73b219 | ||
|
|
bfe90c0a39 | ||
|
|
06892d7fbb | ||
|
|
0cb2bd2bf0 | ||
|
|
bd84d517eb | ||
|
|
3439c2ff70 | ||
|
|
8001e19955 | ||
|
|
76ee3e1225 | ||
|
|
c2147aeddc | ||
|
|
6d891adf39 | ||
|
|
78b7515c2e | ||
|
|
be0639063a | ||
|
|
60e88fde77 | ||
|
|
84600c082b | ||
|
|
96537ab2ce | ||
|
|
de3f18ed96 | ||
|
|
0a601a6dda | ||
|
|
93f9ad51e1 | ||
|
|
ac740b71ca | ||
|
|
fc8b00282f | ||
|
|
09a35619b8 | ||
|
|
898950ef06 | ||
|
|
04bd10f136 | ||
|
|
dd6afe1ce3 | ||
|
|
01dcdf7b3c | ||
|
|
d33e2efb70 | ||
|
|
80080fa5b5 | ||
|
|
395ebd8ba3 | ||
|
|
796af1301b | ||
|
|
6a8cbede96 | ||
|
|
bc3b667b1a | ||
|
|
0af10699de | ||
|
|
ac328e7526 | ||
|
|
f59551f2a7 | ||
|
|
1c3dd8c110 | ||
|
|
de926d2787 | ||
|
|
ef87b4b88b | ||
|
|
5eb77fd545 | ||
|
|
b9f511e746 | ||
|
|
168f9c8c85 | ||
|
|
c6350771e8 | ||
|
|
a47a4fb9a6 | ||
|
|
0f93eca744 | ||
|
|
f1af45a8f4 | ||
|
|
0a577183c8 | ||
|
|
e0f6eea81b | ||
|
|
d1faaf994d | ||
|
|
6fd0415bc6 | ||
|
|
02286bacf3 | ||
|
|
1a3d7dd1a9 | ||
|
|
dccc926e32 | ||
|
|
7ff2480d40 | ||
|
|
f077c0b13a | ||
|
|
80dddbf70f | ||
|
|
c7a557861a | ||
|
|
6e4ec2f0ab | ||
|
|
e74ac3575d | ||
|
|
1e529503e9 | ||
|
|
d1536ff664 | ||
|
|
a00a3fa00e | ||
|
|
540de2baef | ||
|
|
ab20146a56 | ||
|
|
3a899206e9 | ||
|
|
f1ede25688 | ||
|
|
6ee0a41e32 | ||
|
|
4a22f9ad8a | ||
|
|
ed1dbe076e | ||
|
|
ce92de8c8c | ||
|
|
7ae0f74bcd | ||
|
|
e0bdf83972 | ||
|
|
e3d47647ff | ||
|
|
31de1a60dc | ||
|
|
e76d256e08 | ||
|
|
6ccad0f882 | ||
|
|
e5ba7783a8 | ||
|
|
d3b1b97e0f | ||
|
|
009fbb76d2 | ||
|
|
6a8411f047 | ||
|
|
b4ea8e1089 | ||
|
|
eed8ef7527 | ||
|
|
0e2fa122b9 | ||
|
|
0dc6956f5d | ||
|
|
3a9bed5f92 | ||
|
|
13c88950a2 | ||
|
|
90ace9890f | ||
|
|
e9431a8335 | ||
|
|
4ae7eececd | ||
|
|
4f05d7bce2 | ||
|
|
c7e56771d4 | ||
|
|
dd58c12f0f | ||
|
|
5b7d01b427 | ||
|
|
39aaec62ca | ||
|
|
e2030fcfa7 | ||
|
|
1a2940f68e | ||
|
|
b4a9597154 | ||
|
|
5a18028c69 | ||
|
|
b519d76276 | ||
|
|
01cc5e195d | ||
|
|
44781b265c | ||
|
|
f7c445aa7d | ||
|
|
b15184627e | ||
|
|
159825dbad | ||
|
|
768d05d74e | ||
|
|
2b7af8a968 | ||
|
|
a36ec178b5 | ||
|
|
624c975a3e | ||
|
|
f033f6fcea | ||
|
|
4cf1b32141 | ||
|
|
d7c98b6ebb | ||
|
|
93ab8506e1 | ||
|
|
75cbd8de00 | ||
|
|
1418439da9 | ||
|
|
39f1815b3e | ||
|
|
1769e3162e | ||
|
|
30e47fb1e4 | ||
|
|
3f976d0225 | ||
|
|
6685eb29e5 | ||
|
|
47db830b82 | ||
|
|
6876465875 | ||
|
|
5d7805c78b | ||
|
|
01bbed7444 | ||
|
|
6491212ea7 | ||
|
|
a14c2d409c | ||
|
|
c652a06eef | ||
|
|
08ec622c46 | ||
|
|
4123f177f9 | ||
|
|
92af15077f | ||
|
|
55f8eb84d2 | ||
|
|
92489b4f82 | ||
|
|
bea1891182 | ||
|
|
6c44b157e5 | ||
|
|
f0f9b7ac5c | ||
|
|
42a15ca378 |
@@ -74,6 +74,11 @@ menuconfig DEVEL
|
||||
Store ccache in this directory.
|
||||
If not set, uses './.ccache'
|
||||
|
||||
config KERNEL_CFLAGS
|
||||
string "Kernel extra CFLAGS" if DEVEL
|
||||
default "-falign-functions=32" if TARGET_bcm53xx
|
||||
default ""
|
||||
|
||||
config EXTERNAL_KERNEL_TREE
|
||||
string "Use external kernel tree" if DEVEL
|
||||
default ""
|
||||
|
||||
@@ -243,6 +243,13 @@ menu "Target Images"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default y if BUILDBOT
|
||||
|
||||
config QCOW2_IMAGES
|
||||
bool "Build PVE/KVM image files (QCOW2)"
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
select PACKAGE_kmod-e1000
|
||||
default y if BUILDBOT
|
||||
|
||||
config VDI_IMAGES
|
||||
bool "Build VirtualBox image files (VDI)"
|
||||
depends on TARGET_x86
|
||||
@@ -257,6 +264,13 @@ menu "Target Images"
|
||||
select PACKAGE_kmod-e1000
|
||||
default y if BUILDBOT
|
||||
|
||||
config VHDX_IMAGES
|
||||
bool "Build Hyper-V image files (VHDX)"
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
select PACKAGE_kmod-e1000
|
||||
default y if BUILDBOT
|
||||
|
||||
config TARGET_IMAGES_GZIP
|
||||
bool "GZip images"
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
src-git packages https://github.com/immortalwrt/packages.git^2e0126bd43ba24038abccbddd9f8ad0231137764
|
||||
src-git luci https://github.com/immortalwrt/luci.git^7bab2206656cfb55492b7a7faca842e69b21f721
|
||||
src-git routing https://github.com/openwrt/routing.git^b987eb3a9093f7fcf68d250d0c58f64ca13f0bc0
|
||||
src-git telephony https://github.com/openwrt/telephony.git^818a3776c78897bbe0ad04874c86533f285975af
|
||||
src-git packages https://github.com/immortalwrt/packages.git^bf04e7076f6a538201f0b77f65eac597cea66609
|
||||
src-git luci https://github.com/immortalwrt/luci.git^ddf45cf3b5a82868cec10fcc2cddbbb1958340ef
|
||||
src-git routing https://github.com/openwrt/routing.git^b08cc3eef4ae2c1c52af989f42db23410d845d58
|
||||
src-git telephony https://github.com/openwrt/telephony.git^89cc8fccf757614eac1d45a684f4971393e0d984
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
cmake_bool = $(patsubst %,-D%:BOOL=$(if $($(1)),ON,OFF),$(2))
|
||||
|
||||
PKG_USE_NINJA ?= 1
|
||||
HOST_USE_NINJA ?= 1
|
||||
ifeq ($(PKG_USE_NINJA),1)
|
||||
PKG_BUILD_PARALLEL ?= 1
|
||||
endif
|
||||
ifeq ($(HOST_USE_NINJA),1)
|
||||
HOST_BUILD_PARALLEL ?= 1
|
||||
endif
|
||||
PKG_INSTALL:=1
|
||||
|
||||
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||
@@ -10,6 +18,7 @@ endif
|
||||
CMAKE_BINARY_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
|
||||
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
|
||||
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
|
||||
HOST_CMAKE_BINARY_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
|
||||
MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)
|
||||
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
@@ -43,6 +52,35 @@ CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))
|
||||
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
|
||||
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
|
||||
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
|
||||
CMAKE_HOST_INSTALL_PREFIX = $(HOST_BUILD_PREFIX)
|
||||
|
||||
ifeq ($(HOST_USE_NINJA),1)
|
||||
CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Ninja"
|
||||
|
||||
define Host/Compile/Default
|
||||
+$(NINJA) -C $(HOST_CMAKE_BINARY_DIR) $(1)
|
||||
endef
|
||||
|
||||
define Host/Install/Default
|
||||
+$(NINJA) -C $(HOST_CMAKE_BINARY_DIR) install
|
||||
endef
|
||||
|
||||
define Host/Uninstall/Default
|
||||
+$(NINJA) -C $(HOST_CMAKE_BINARY_DIR) uninstall
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_USE_NINJA),1)
|
||||
CMAKE_OPTIONS += -DCMAKE_GENERATOR="Ninja"
|
||||
|
||||
define Build/Compile/Default
|
||||
+$(NINJA) -C $(CMAKE_BINARY_DIR) $(1)
|
||||
endef
|
||||
|
||||
define Build/Install/Default
|
||||
+DESTDIR="$(PKG_INSTALL_DIR)" $(NINJA) -C $(CMAKE_BINARY_DIR) install
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/Configure/Default
|
||||
mkdir -p $(CMAKE_BINARY_DIR)
|
||||
@@ -97,7 +135,8 @@ endef
|
||||
Build/InstallDev = $(if $(CMAKE_INSTALL),$(Build/InstallDev/cmake))
|
||||
|
||||
define Host/Configure/Default
|
||||
(cd $(HOST_BUILD_DIR); \
|
||||
mkdir -p "$(HOST_CMAKE_BINARY_DIR)"
|
||||
(cd $(HOST_CMAKE_BINARY_DIR); \
|
||||
CFLAGS="$(HOST_CFLAGS)" \
|
||||
CXXFLAGS="$(HOST_CFLAGS)" \
|
||||
LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
@@ -119,7 +158,7 @@ define Host/Configure/Default
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
|
||||
-DCMAKE_STRIP=: \
|
||||
-DCMAKE_INSTALL_PREFIX=$(HOST_BUILD_PREFIX) \
|
||||
-DCMAKE_INSTALL_PREFIX=$(CMAKE_HOST_INSTALL_PREFIX) \
|
||||
-DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
|
||||
-DCMAKE_SKIP_RPATH=TRUE \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
|
||||
@@ -328,7 +328,7 @@ define Build/patch-cmdline
|
||||
endef
|
||||
|
||||
# Convert a raw image into a $1 type image.
|
||||
# E.g. | qemu-image vdi
|
||||
# E.g. | qemu-image vdi <optional extra arguments to qemu-img binary>
|
||||
define Build/qemu-image
|
||||
if command -v qemu-img; then \
|
||||
qemu-img convert -f raw -O $1 $@ $@.new; \
|
||||
|
||||
@@ -227,8 +227,7 @@ $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))
|
||||
define Image/mkfs/squashfs-common
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
|
||||
-nopad -noappend -root-owned \
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
|
||||
-processors $(shell nproc)
|
||||
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT)
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y)
|
||||
|
||||
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .188
|
||||
LINUX_VERSION-5.4 = .203
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.188 = 9fbc8bfdc28c9fce2307bdf7cf1172c9819df673397a411c40a5c3d0a570fdbc
|
||||
LINUX_KERNEL_HASH-5.4.203 = fc933f5b13066cfa54aacb5e86747a167bad1d8d23972e4a03ab5ee36c29798a
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@@ -101,7 +101,7 @@ endif
|
||||
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
|
||||
|
||||
KERNEL_MAKE_FLAGS = \
|
||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR)))" \
|
||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
|
||||
@@ -196,5 +196,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash
|
||||
|
||||
# Install ldconfig stub
|
||||
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
|
||||
touch $(STAGING_DIR_HOST)/bin/ldconfig && \
|
||||
chmod +x $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
$(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
|
||||
@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.0)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.1)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19295-891f3af4fb)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19441+1-f8624db86c)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/21.02.0)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/21.02.1)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt)
|
||||
|
||||
@@ -183,7 +183,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.immortalwrt.org/releases/21.02.0"
|
||||
default "https://downloads.immortalwrt.org/releases/21.02.1"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
blkdev=`dirname $DEVPATH`
|
||||
basename=`basename $blkdev`
|
||||
device=`basename $DEVPATH`
|
||||
skip=`block info | sed 's/\(.*\): .*/\1/' | grep -q $device ; echo $?`
|
||||
skip=`block info | grep -vE '(f2fs|kernel|squashfs)' | sed 's/\(.*\): .*/\1/' | grep -q $device ; echo $?`
|
||||
path=$DEVPATH
|
||||
|
||||
if [ $basename != "block" ] && [ -z "${device##sd*}" ] && [ $skip -eq 1 ]; then
|
||||
|
||||
@@ -5,7 +5,7 @@ uci -q batch <<-EOF
|
||||
set system.@system[0].zonename='Asia/Shanghai'
|
||||
|
||||
delete system.ntp.server
|
||||
add_list system.ntp.server='time1.cloud.tencent.com'
|
||||
add_list system.ntp.server='ntp.tencent.com'
|
||||
add_list system.ntp.server='ntp1.aliyun.com'
|
||||
add_list system.ntp.server='ntp.ntsc.ac.cn'
|
||||
add_list system.ntp.server='cn.ntp.org.cn'
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
[0;37m│[0m [0;37mmm#mm[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m#[0m [0;1;30;90m"#[0;1;34;94mm#"[0m [0;1;34;94m#[0m [0;1;34;94m"m[0;34mm[0m [0;34m"mm"#[0m [0;34m"mm[0m [0;1;34;94m│[0m
|
||||
[0;1;30;90m│[0m [0;37m│[0m
|
||||
[0;1;30;90m│[0;34m───────────────────[0;1;34;94m────────────[0;37m──────────────│[0m
|
||||
[0;1;30;90m│[0m [0;1;34;94mImmortalWrt[0m [0;1;34;94m21.02[0m [0;37m│[0m
|
||||
[0;1;30;90m│[0m [0;1;34;94mImmortalWrt[0m [0;1;34;94m21.02.1[0m [0;37m│[0m
|
||||
[0;1;34;94m└[0;1;34;94m─────────────[0;34m──────────────[0;1;30;90m───────────[0;37m───────┘[0m
|
||||
|
||||
@@ -27,6 +27,7 @@ endef
|
||||
ALLWIFIBOARDS:= \
|
||||
8dev_habanero-dvk \
|
||||
aruba_ap-303 \
|
||||
asus_rt-ac42u \
|
||||
avm_fritzrepeater-1200 \
|
||||
buffalo_wtr-m2133hp \
|
||||
cellc_rtl30vw \
|
||||
@@ -113,6 +114,7 @@ endef
|
||||
|
||||
$(eval $(call generate-ipq-wifi-package,8dev_habanero-dvk,8devices Habanero DVK))
|
||||
$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
|
||||
$(eval $(call generate-ipq-wifi-package,asus_rt-ac42u,ASUS RT-AC42U))
|
||||
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
|
||||
$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP))
|
||||
$(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW))
|
||||
|
||||
BIN
package/firmware/ipq-wifi/board-asus_rt-ac42u.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-asus_rt-ac42u.qca4019
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-asus_rt-ac42u.qca9984
Normal file
BIN
package/firmware/ipq-wifi/board-asus_rt-ac42u.qca9984
Normal file
Binary file not shown.
@@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=cryptodev-linux
|
||||
PKG_VERSION:=1.11
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.12
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=d71fd8dafc40147586f5bc6acca8fce5088d9c576d1142fe5aeb7b0813186a11
|
||||
PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001
|
||||
From: Joan Bruguera <joanbrugueram@gmail.com>
|
||||
Date: Fri, 14 Aug 2020 00:13:38 +0200
|
||||
Subject: [PATCH] Fix build for Linux 5.9-rc1
|
||||
|
||||
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6
|
||||
https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/
|
||||
|
||||
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
|
||||
---
|
||||
zc.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/zc.c
|
||||
+++ b/zc.c
|
||||
@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr,
|
||||
ret = get_user_pages_remote(task, mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL);
|
||||
-#else
|
||||
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
|
||||
ret = get_user_pages_remote(task, mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
||||
+#else
|
||||
+ ret = get_user_pages_remote(mm,
|
||||
+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
+ pg, NULL, NULL);
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
|
||||
up_read(&mm->mmap_sem);
|
||||
@@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=exfat
|
||||
PKG_VERSION:=5.14.1
|
||||
PKG_VERSION:=5.19.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/namjaejeon/linux-exfat-oot/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=5452a7c48ff7d19e258d1521213c84f5e486ffeec65b8af913bd43c85b010e86
|
||||
PKG_HASH:=80750bfa3bcdf743ca0d027be8244cc7b6ccd78f20304c2cabbb4011c88e4f0a
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-exfat-oot-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=
|
||||
|
||||
@@ -440,28 +440,6 @@ endef
|
||||
$(eval $(call KernelPackage,crypto-kpp))
|
||||
|
||||
|
||||
define KernelPackage/crypto-lib-blake2s
|
||||
TITLE:=BLAKE2s hash function library
|
||||
KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S
|
||||
HIDDEN:=1
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/lib/crypto/libblake2s.ko \
|
||||
$(LINUX_DIR)/lib/crypto/libblake2s-generic.ko
|
||||
$(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash)
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-lib-blake2s/config
|
||||
imply PACKAGE_kmod-crypto-hash
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-lib-blake2s/x86/64
|
||||
KCONFIG+=CONFIG_CRYPTO_BLAKE2S_X86
|
||||
FILES+=$(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,crypto-lib-blake2s))
|
||||
|
||||
|
||||
define KernelPackage/crypto-lib-chacha20
|
||||
TITLE:=ChaCha library interface
|
||||
KCONFIG:=CONFIG_CRYPTO_LIB_CHACHA
|
||||
|
||||
@@ -1200,7 +1200,7 @@ $(eval $(call KernelPackage,sfp))
|
||||
define KernelPackage/igc
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Intel(R) Ethernet Controller I225 Series support
|
||||
DEPENDS:=@PCI_SUPPORT
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp
|
||||
KCONFIG:=CONFIG_IGC
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igc/igc.ko
|
||||
AUTOLOAD:=$(call AutoProbe,igc)
|
||||
|
||||
@@ -1288,7 +1288,6 @@ define KernelPackage/wireguard
|
||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=WireGuard secure network tunnel
|
||||
DEPENDS:= \
|
||||
+kmod-crypto-lib-blake2s \
|
||||
+kmod-crypto-lib-chacha20poly1305 \
|
||||
+kmod-crypto-lib-curve25519 \
|
||||
+kmod-udptunnel4 \
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 4509e523dba46f789377cfec6f20579adf743416 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= <hacks+kernel@slashdirt.org>
|
||||
Date: Sun, 17 Apr 2022 11:31:35 +0200
|
||||
Subject: [PATCH v2] ath9k: fix QCA9561 PA bias level
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch fixes an invalid TX PA DC bias level on QCA9561, which
|
||||
results in a very low output power and very low throughput as devices
|
||||
are further away from the AP (compared to other 2.4GHz APs).
|
||||
|
||||
This patch was suggested by Felix Fietkau, who noted[1]:
|
||||
"The value written to that register is wrong, because while the mask
|
||||
definition AR_CH0_TOP2_XPABIASLVL uses a different value for 9561, the
|
||||
shift definition AR_CH0_TOP2_XPABIASLVL_S is hardcoded to 12, which is
|
||||
wrong for 9561."
|
||||
|
||||
In real life testing, without this patch the 2.4GHz throughput on
|
||||
Yuncore XD3200 is around 10Mbps sitting next to the AP, and closer to
|
||||
practical maximum with the patch applied.
|
||||
|
||||
[1] https://lore.kernel.org/all/91c58969-c60e-2f41-00ac-737786d435ae@nbd.name
|
||||
|
||||
Signed-off-by: Thibaut VARÈNE <hacks+kernel@slashdirt.org>
|
||||
---
|
||||
v2: Adjust #define per Felix's suggestion
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
index a171dbb29..ad949eb02 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
@@ -720,7 +720,7 @@
|
||||
#define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \
|
||||
(AR_SREV_9462(ah) ? 0x16290 : 0x16284))
|
||||
#define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000)
|
||||
-#define AR_CH0_TOP2_XPABIASLVL_S 12
|
||||
+#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12)
|
||||
|
||||
#define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \
|
||||
((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16298 : \
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -13,10 +13,10 @@ PKG_RELEASE:=1.3
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/vschagen/mtk-eip93.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=bb5fd1c88a8a74de06b70c281bceeb14d0d960ef
|
||||
PKG_MIRROR_HASH:=cb114b29f7e06e817341adb9127c4d053592be53356a64d932cf7ba418606260
|
||||
PKG_SOURCE_VERSION:=ca08387bf8352652129019bb19e2423ab313d5cb
|
||||
PKG_MIRROR_HASH:=4505ee2a175a6cf77a1a3b4fa7bf188da8f8b47894e5afa62c8cb008fbfa15ed
|
||||
|
||||
MAKE_PATH:=src
|
||||
MAKE_PATH:=crypto/mtk-eip93
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -31,9 +31,8 @@ define KernelPackage/crypto-hw-eip93
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha1 \
|
||||
+kmod-crypto-sha256
|
||||
KCONFIG:=
|
||||
TITLE:=MTK EIP93 crypto module.
|
||||
FILES:=$(PKG_BUILD_DIR)/src/crypto-hw-eip93.ko
|
||||
FILES:=$(PKG_BUILD_DIR)/crypto/mtk-eip93/crypto-hw-eip93.ko
|
||||
AUTOLOAD:=$(call AutoProbe,crypto-hw-eip93)
|
||||
endef
|
||||
|
||||
@@ -44,9 +43,22 @@ It enables DES/3DES/AES ECB/CBC/CTR and
|
||||
IPSEC offload with authenc(hmac(sha1/sha256), aes/cbc/rfc3686)
|
||||
endef
|
||||
|
||||
PKG_EXTRA_KCONFIG:= \
|
||||
CONFIG_CRYPTO_DEV_EIP93=m \
|
||||
CONFIG_CRYPTO_DEV_EIP93_AEAD=y \
|
||||
CONFIG_CRYPTO_DEV_EIP93_AES=y \
|
||||
CONFIG_CRYPTO_DEV_EIP93_DES=y \
|
||||
CONFIG_CRYPTO_DEV_EIP93_HMAC=y \
|
||||
CONFIG_CRYPTO_DEV_EIP93_SKCIPHER=y
|
||||
|
||||
PKG_EXTRA_CFLAGS:= \
|
||||
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG))))
|
||||
|
||||
MAKE_OPTS:= \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)/src"
|
||||
M="$(PKG_BUILD_DIR)/crypto/mtk-eip93" \
|
||||
$(PKG_EXTRA_KCONFIG) \
|
||||
EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)"
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" \
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
--- a/crypto/mtk-eip93/eip93-aead.c
|
||||
+++ b/crypto/mtk-eip93/eip93-aead.c
|
||||
@@ -13,8 +13,6 @@
|
||||
#include <crypto/internal/aead.h>
|
||||
#include <crypto/md5.h>
|
||||
#include <crypto/null.h>
|
||||
-#include <crypto/sha1.h>
|
||||
-#include <crypto/sha2.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_CRYPTO_DEV_EIP93_DES)
|
||||
#include <crypto/internal/des.h>
|
||||
@@ -22,6 +20,14 @@
|
||||
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
|
||||
+#include <crypto/sha.h>
|
||||
+#else
|
||||
+#include <crypto/sha1.h>
|
||||
+#include <crypto/sha2.h>
|
||||
+#endif
|
||||
|
||||
#include "eip93-aead.h"
|
||||
#include "eip93-cipher.h"
|
||||
--- a/crypto/mtk-eip93/eip93-common.c
|
||||
+++ b/crypto/mtk-eip93/eip93-common.c
|
||||
@@ -8,11 +8,17 @@
|
||||
#include <crypto/aes.h>
|
||||
#include <crypto/ctr.h>
|
||||
#include <crypto/hmac.h>
|
||||
-#include <crypto/sha1.h>
|
||||
-#include <crypto/sha2.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/scatterlist.h>
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
|
||||
+#include <crypto/sha.h>
|
||||
+#else
|
||||
+#include <crypto/sha1.h>
|
||||
+#include <crypto/sha2.h>
|
||||
+#endif
|
||||
|
||||
#include "eip93-cipher.h"
|
||||
#include "eip93-common.h"
|
||||
@@ -7,9 +7,17 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8125
|
||||
PKG_VERSION:=9.008.00
|
||||
PKG_VERSION:=9.009.01-1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=cdb80e51d330c89495fcf01b096792af079856f1feb6474c282d4ad954e3fda2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/r8125
|
||||
@@ -17,7 +25,7 @@ define KernelPackage/r8125
|
||||
SUBMENU:=Network Devices
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/r8125.ko
|
||||
FILES:= $(PKG_BUILD_DIR)/src/r8125.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8125)
|
||||
endef
|
||||
|
||||
@@ -26,7 +34,7 @@ define Package/r8125/description
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules
|
||||
+$(KERNEL_MAKE) M=$(PKG_BUILD_DIR)/src modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,r8125))
|
||||
|
||||
22
package/kernel/r8125/patches/010-config.patch
Normal file
22
package/kernel/r8125/patches/010-config.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -35,16 +35,16 @@ ENABLE_REALWOW_SUPPORT = n
|
||||
ENABLE_DASH_SUPPORT = n
|
||||
ENABLE_DASH_PRINTER_SUPPORT = n
|
||||
CONFIG_DOWN_SPEED_100 = n
|
||||
-CONFIG_ASPM = y
|
||||
+CONFIG_ASPM = n
|
||||
ENABLE_S5WOL = y
|
||||
ENABLE_S5_KEEP_CURR_MAC = n
|
||||
ENABLE_EEE = y
|
||||
ENABLE_S0_MAGIC_PACKET = n
|
||||
ENABLE_TX_NO_CLOSE = y
|
||||
-ENABLE_MULTIPLE_TX_QUEUE = n
|
||||
+ENABLE_MULTIPLE_TX_QUEUE = y
|
||||
ENABLE_PTP_SUPPORT = n
|
||||
ENABLE_PTP_MASTER_MODE = n
|
||||
-ENABLE_RSS_SUPPORT = n
|
||||
+ENABLE_RSS_SUPPORT = y
|
||||
ENABLE_LIB_SUPPORT = n
|
||||
ENABLE_USE_FIRMWARE_FILE = n
|
||||
DISABLE_PM_SUPPORT = n
|
||||
@@ -1,197 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# This product is covered by one or more of the following patents:
|
||||
# US6,570,884, US6,115,776, and US6,327,625.
|
||||
################################################################################
|
||||
|
||||
CONFIG_SOC_LAN = n
|
||||
ENABLE_REALWOW_SUPPORT = n
|
||||
ENABLE_DASH_SUPPORT = n
|
||||
ENABLE_DASH_PRINTER_SUPPORT = n
|
||||
CONFIG_DOWN_SPEED_100 = n
|
||||
CONFIG_ASPM = n
|
||||
ENABLE_S5WOL = y
|
||||
ENABLE_S5_KEEP_CURR_MAC = n
|
||||
ENABLE_EEE = y
|
||||
ENABLE_S0_MAGIC_PACKET = n
|
||||
ENABLE_TX_NO_CLOSE = y
|
||||
ENABLE_MULTIPLE_TX_QUEUE = y
|
||||
ENABLE_PTP_SUPPORT = n
|
||||
ENABLE_PTP_MASTER_MODE = n
|
||||
ENABLE_RSS_SUPPORT = y
|
||||
ENABLE_LIB_SUPPORT = n
|
||||
ENABLE_USE_FIRMWARE_FILE = n
|
||||
DISABLE_PM_SUPPORT = n
|
||||
DISABLE_MULTI_MSIX_VECTOR = n
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
obj-m := r8125.o
|
||||
r8125-objs := r8125_n.o rtl_eeprom.o rtltool.o
|
||||
ifeq ($(CONFIG_SOC_LAN), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_SOC_LAN
|
||||
endif
|
||||
ifeq ($(ENABLE_REALWOW_SUPPORT), y)
|
||||
r8125-objs += r8125_realwow.o
|
||||
EXTRA_CFLAGS += -DENABLE_REALWOW_SUPPORT
|
||||
endif
|
||||
ifeq ($(ENABLE_DASH_SUPPORT), y)
|
||||
r8125-objs += r8125_dash.o
|
||||
EXTRA_CFLAGS += -DENABLE_DASH_SUPPORT
|
||||
endif
|
||||
ifeq ($(ENABLE_DASH_PRINTER_SUPPORT), y)
|
||||
r8125-objs += r8125_dash.o
|
||||
EXTRA_CFLAGS += -DENABLE_DASH_SUPPORT -DENABLE_DASH_PRINTER_SUPPORT
|
||||
endif
|
||||
EXTRA_CFLAGS += -DCONFIG_R8125_NAPI
|
||||
EXTRA_CFLAGS += -DCONFIG_R8125_VLAN
|
||||
ifeq ($(CONFIG_DOWN_SPEED_100), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_DOWN_SPEED_100
|
||||
endif
|
||||
ifeq ($(CONFIG_ASPM), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_ASPM
|
||||
endif
|
||||
ifeq ($(ENABLE_S5WOL), y)
|
||||
EXTRA_CFLAGS += -DENABLE_S5WOL
|
||||
endif
|
||||
ifeq ($(ENABLE_S5_KEEP_CURR_MAC), y)
|
||||
EXTRA_CFLAGS += -DENABLE_S5_KEEP_CURR_MAC
|
||||
endif
|
||||
ifeq ($(ENABLE_EEE), y)
|
||||
EXTRA_CFLAGS += -DENABLE_EEE
|
||||
endif
|
||||
ifeq ($(ENABLE_S0_MAGIC_PACKET), y)
|
||||
EXTRA_CFLAGS += -DENABLE_S0_MAGIC_PACKET
|
||||
endif
|
||||
ifeq ($(ENABLE_TX_NO_CLOSE), y)
|
||||
EXTRA_CFLAGS += -DENABLE_TX_NO_CLOSE
|
||||
endif
|
||||
ifeq ($(ENABLE_MULTIPLE_TX_QUEUE), y)
|
||||
EXTRA_CFLAGS += -DENABLE_MULTIPLE_TX_QUEUE
|
||||
endif
|
||||
ifeq ($(ENABLE_PTP_SUPPORT), y)
|
||||
r8125-objs += r8125_ptp.o
|
||||
EXTRA_CFLAGS += -DENABLE_PTP_SUPPORT
|
||||
endif
|
||||
ifeq ($(ENABLE_PTP_MASTER_MODE), y)
|
||||
EXTRA_CFLAGS += -DENABLE_PTP_MASTER_MODE
|
||||
endif
|
||||
ifeq ($(ENABLE_RSS_SUPPORT), y)
|
||||
r8125-objs += r8125_rss.o
|
||||
EXTRA_CFLAGS += -DENABLE_RSS_SUPPORT
|
||||
endif
|
||||
ifeq ($(ENABLE_LIB_SUPPORT), y)
|
||||
r8125-objs += r8125_lib.o
|
||||
EXTRA_CFLAGS += -DENABLE_LIB_SUPPORT
|
||||
endif
|
||||
ifeq ($(ENABLE_USE_FIRMWARE_FILE), y)
|
||||
r8125-objs += r8125_firmware.o
|
||||
EXTRA_CFLAGS += -DENABLE_USE_FIRMWARE_FILE
|
||||
endif
|
||||
ifeq ($(DISABLE_PM_SUPPORT), y)
|
||||
EXTRA_CFLAGS += -DDISABLE_PM_SUPPORT
|
||||
endif
|
||||
ifeq ($(DISABLE_MULTI_MSIX_VECTOR), y)
|
||||
EXTRA_CFLAGS += -DDISABLE_MULTI_MSIX_VECTOR
|
||||
endif
|
||||
else
|
||||
BASEDIR := /lib/modules/$(shell uname -r)
|
||||
KERNELDIR ?= $(BASEDIR)/build
|
||||
PWD :=$(shell pwd)
|
||||
DRIVERDIR := $(shell find $(BASEDIR)/kernel/drivers/net/ethernet -name realtek -type d)
|
||||
ifeq ($(DRIVERDIR),)
|
||||
DRIVERDIR := $(shell find $(BASEDIR)/kernel/drivers/net -name realtek -type d)
|
||||
endif
|
||||
ifeq ($(DRIVERDIR),)
|
||||
DRIVERDIR := $(BASEDIR)/kernel/drivers/net
|
||||
endif
|
||||
RTKDIR := $(subst $(BASEDIR)/,,$(DRIVERDIR))
|
||||
|
||||
KERNEL_GCC_VERSION := $(shell cat /proc/version | sed -n 's/.*gcc version \([[:digit:]]\.[[:digit:]]\.[[:digit:]]\).*/\1/p')
|
||||
CCVERSION = $(shell $(CC) -dumpversion)
|
||||
|
||||
KVER = $(shell uname -r)
|
||||
KMAJ = $(shell echo $(KVER) | \
|
||||
sed -e 's/^\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*.*/\1/')
|
||||
KMIN = $(shell echo $(KVER) | \
|
||||
sed -e 's/^[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*.*/\1/')
|
||||
KREV = $(shell echo $(KVER) | \
|
||||
sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/')
|
||||
|
||||
kver_ge = $(shell \
|
||||
echo test | awk '{if($(KMAJ) < $(1)) {print 0} else { \
|
||||
if($(KMAJ) > $(1)) {print 1} else { \
|
||||
if($(KMIN) < $(2)) {print 0} else { \
|
||||
if($(KMIN) > $(2)) {print 1} else { \
|
||||
if($(KREV) < $(3)) {print 0} else { print 1 } \
|
||||
}}}}}' \
|
||||
)
|
||||
|
||||
.PHONY: all
|
||||
all: print_vars clean modules install
|
||||
|
||||
print_vars:
|
||||
@echo
|
||||
@echo "CC: " $(CC)
|
||||
@echo "CCVERSION: " $(CCVERSION)
|
||||
@echo "KERNEL_GCC_VERSION: " $(KERNEL_GCC_VERSION)
|
||||
@echo "KVER: " $(KVER)
|
||||
@echo "KMAJ: " $(KMAJ)
|
||||
@echo "KMIN: " $(KMIN)
|
||||
@echo "KREV: " $(KREV)
|
||||
@echo "BASEDIR: " $(BASEDIR)
|
||||
@echo "DRIVERDIR: " $(DRIVERDIR)
|
||||
@echo "PWD: " $(PWD)
|
||||
@echo "RTKDIR: " $(RTKDIR)
|
||||
@echo
|
||||
|
||||
.PHONY:modules
|
||||
modules:
|
||||
#ifeq ($(call kver_ge,5,0,0),1)
|
||||
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
|
||||
#else
|
||||
# $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules
|
||||
#endif
|
||||
|
||||
.PHONY:clean
|
||||
clean:
|
||||
#ifeq ($(call kver_ge,5,0,0),1)
|
||||
$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
|
||||
#else
|
||||
# $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) clean
|
||||
#endif
|
||||
|
||||
.PHONY:install
|
||||
install:
|
||||
#ifeq ($(call kver_ge,5,0,0),1)
|
||||
$(MAKE) -C $(KERNELDIR) M=$(PWD) INSTALL_MOD_DIR=$(RTKDIR) modules_install
|
||||
#else
|
||||
# $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) INSTALL_MOD_DIR=$(RTKDIR) modules_install
|
||||
#endif
|
||||
|
||||
endif
|
||||
@@ -1,75 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# This product is covered by one or more of the following patents:
|
||||
# US6,570,884, US6,115,776, and US6,327,625.
|
||||
################################################################################
|
||||
|
||||
CC := gcc
|
||||
LD := ld
|
||||
ARCH := $(shell uname -m | sed 's/i.86/i386/')
|
||||
KSRC := /lib/modules/$(shell uname -r)/build
|
||||
CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
|
||||
KMISC := /lib/modules/$(shell uname -r)/kernel/drivers/net/
|
||||
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
MODCFLAGS += -mcmodel=kernel -mno-red-zone
|
||||
endif
|
||||
|
||||
#standard flags for module builds
|
||||
MODCFLAGS += -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall
|
||||
MODCFLAGS += -I$(KSRC)/include -I.
|
||||
MODCFLAGS += -DMODVERSIONS -DEXPORT_SYMTAB -include $(KSRC)/include/linux/modversions.h
|
||||
SOURCE := r8125_n.c rtl_eeprom.c rtltool.c
|
||||
OBJS := $(SOURCE:.c=.o)
|
||||
|
||||
|
||||
SMP := $(shell $(CC) $(MODCFLAGS) -E -dM $(CONFIG_FILE) | \
|
||||
grep CONFIG_SMP | awk '{print $$3}')
|
||||
|
||||
ifneq ($(SMP),1)
|
||||
SMP := 0
|
||||
endif
|
||||
|
||||
ifeq ($(SMP),1)
|
||||
MODCFLAGS += -D__SMP__
|
||||
endif
|
||||
|
||||
modules: $(OBJS)
|
||||
$(LD) -r $^ -o r8125.o
|
||||
strip --strip-debug r8125.o
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(MODCFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm *.o -f
|
||||
|
||||
install:
|
||||
install -m 744 -c r8125.o $(KMISC)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,261 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#ifndef _LINUX_R8125_DASH_H
|
||||
#define _LINUX_R8125_DASH_H
|
||||
|
||||
#include <linux/if.h>
|
||||
|
||||
#define SIOCDEVPRIVATE_RTLDASH SIOCDEVPRIVATE+2
|
||||
|
||||
enum rtl_dash_cmd {
|
||||
RTL_DASH_ARP_NS_OFFLOAD = 0,
|
||||
RTL_DASH_SET_OOB_IPMAC,
|
||||
RTL_DASH_NOTIFY_OOB,
|
||||
|
||||
RTL_DASH_SEND_BUFFER_DATA_TO_DASH_FW,
|
||||
RTL_DASH_CHECK_SEND_BUFFER_TO_DASH_FW_COMPLETE,
|
||||
RTL_DASH_GET_RCV_FROM_FW_BUFFER_DATA,
|
||||
RTL_DASH_OOB_REQ,
|
||||
RTL_DASH_OOB_ACK,
|
||||
RTL_DASH_DETACH_OOB_REQ,
|
||||
RTL_DASH_DETACH_OOB_ACK,
|
||||
|
||||
RTL_FW_SET_IPV4 = 0x10,
|
||||
RTL_FW_GET_IPV4,
|
||||
RTL_FW_SET_IPV6,
|
||||
RTL_FW_GET_IPV6,
|
||||
RTL_FW_SET_EXT_SNMP,
|
||||
RTL_FW_GET_EXT_SNMP,
|
||||
RTL_FW_SET_WAKEUP_PATTERN,
|
||||
RTL_FW_GET_WAKEUP_PATTERN,
|
||||
RTL_FW_DEL_WAKEUP_PATTERN,
|
||||
|
||||
RTLT_DASH_COMMAND_INVALID,
|
||||
};
|
||||
|
||||
struct rtl_dash_ip_mac {
|
||||
struct sockaddr ifru_addr;
|
||||
struct sockaddr ifru_netmask;
|
||||
struct sockaddr ifru_hwaddr;
|
||||
};
|
||||
|
||||
struct rtl_dash_ioctl_struct {
|
||||
__u32 cmd;
|
||||
__u32 offset;
|
||||
__u32 len;
|
||||
union {
|
||||
__u32 data;
|
||||
void *data_buffer;
|
||||
};
|
||||
};
|
||||
|
||||
struct settings_ipv4 {
|
||||
__u32 IPv4addr;
|
||||
__u32 IPv4mask;
|
||||
__u32 IPv4Gateway;
|
||||
};
|
||||
|
||||
struct settings_ipv6 {
|
||||
__u32 reserved;
|
||||
__u32 prefixLen;
|
||||
__u16 IPv6addr[8];
|
||||
__u16 IPv6Gateway[8];
|
||||
};
|
||||
|
||||
struct settings_ext_snmp {
|
||||
__u16 index;
|
||||
__u16 oid_get_len;
|
||||
__u8 oid_for_get[24];
|
||||
__u8 reserved0[26];
|
||||
__u16 value_len;
|
||||
__u8 value[256];
|
||||
__u8 supported;
|
||||
__u8 reserved1[27];
|
||||
};
|
||||
|
||||
struct wakeup_pattern {
|
||||
__u8 index;
|
||||
__u8 valid;
|
||||
__u8 start;
|
||||
__u8 length;
|
||||
__u8 name[36];
|
||||
__u8 mask[16];
|
||||
__u8 pattern[128];
|
||||
__u32 reserved[2];
|
||||
};
|
||||
|
||||
typedef struct _RX_DASH_FROM_FW_DESC {
|
||||
u16 length;
|
||||
u8 statusLowByte;
|
||||
u8 statusHighByte;
|
||||
u32 resv;
|
||||
u64 BufferAddress;
|
||||
}
|
||||
RX_DASH_FROM_FW_DESC, *PRX_DASH_FROM_FW_DESC;
|
||||
|
||||
typedef struct _TX_DASH_SEND_FW_DESC {
|
||||
u16 length;
|
||||
u8 statusLowByte;
|
||||
u8 statusHighByte;
|
||||
u32 resv;
|
||||
u64 BufferAddress;
|
||||
}
|
||||
TX_DASH_SEND_FW_DESC, *PTX_DASH_SEND_FW_DESC;
|
||||
|
||||
typedef struct _OSOOBHdr {
|
||||
u32 len;
|
||||
u8 type;
|
||||
u8 flag;
|
||||
u8 hostReqV;
|
||||
u8 res;
|
||||
}
|
||||
OSOOBHdr, *POSOOBHdr;
|
||||
|
||||
typedef struct _RX_DASH_BUFFER_TYPE_2 {
|
||||
OSOOBHdr oobhdr;
|
||||
u8 RxDataBuffer[0];
|
||||
}
|
||||
RX_DASH_BUFFER_TYPE_2, *PRX_DASH_BUFFER_TYPE_2;
|
||||
|
||||
#define ALIGN_8 (0x7)
|
||||
#define ALIGN_16 (0xf)
|
||||
#define ALIGN_32 (0x1f)
|
||||
#define ALIGN_64 (0x3f)
|
||||
#define ALIGN_256 (0xff)
|
||||
#define ALIGN_4096 (0xfff)
|
||||
|
||||
#define OCP_REG_CONFIG0 (0x10)
|
||||
#define OCP_REG_CONFIG0_REV_F (0xB8)
|
||||
#define OCP_REG_DASH_POLL (0x30)
|
||||
#define OCP_REG_HOST_REQ (0x34)
|
||||
#define OCP_REG_DASH_REQ (0x35)
|
||||
#define OCP_REG_CR (0x36)
|
||||
#define OCP_REG_DMEMSTA (0x38)
|
||||
#define OCP_REG_GPHYAR (0x60)
|
||||
|
||||
|
||||
#define OCP_REG_CONFIG0_DASHEN BIT_15
|
||||
#define OCP_REG_CONFIG0_OOBRESET BIT_14
|
||||
#define OCP_REG_CONFIG0_APRDY BIT_13
|
||||
#define OCP_REG_CONFIG0_FIRMWARERDY BIT_12
|
||||
#define OCP_REG_CONFIG0_DRIVERRDY BIT_11
|
||||
#define OCP_REG_CONFIG0_OOB_WDT BIT_9
|
||||
#define OCP_REG_CONFIG0_DRV_WAIT_OOB BIT_8
|
||||
#define OCP_REG_CONFIG0_TLSEN BIT_7
|
||||
|
||||
#define HW_DASH_SUPPORT_DASH(_M) ((_M)->HwSuppDashVer > 0 )
|
||||
#define HW_DASH_SUPPORT_TYPE_1(_M) ((_M)->HwSuppDashVer == 1 )
|
||||
#define HW_DASH_SUPPORT_TYPE_2(_M) ((_M)->HwSuppDashVer == 2 )
|
||||
#define HW_DASH_SUPPORT_TYPE_3(_M) ((_M)->HwSuppDashVer == 3 )
|
||||
|
||||
#define RECV_FROM_FW_BUF_SIZE (1520)
|
||||
#define SEND_TO_FW_BUF_SIZE (1520)
|
||||
|
||||
#define RX_DASH_FROM_FW_OWN BIT_15
|
||||
#define TX_DASH_SEND_FW_OWN BIT_15
|
||||
#define TX_DASH_SEND_FW_OWN_HIGHBYTE BIT_7
|
||||
|
||||
#define TXS_CC3_0 (BIT_0|BIT_1|BIT_2|BIT_3)
|
||||
#define TXS_EXC BIT_4
|
||||
#define TXS_LNKF BIT_5
|
||||
#define TXS_OWC BIT_6
|
||||
#define TXS_TES BIT_7
|
||||
#define TXS_UNF BIT_9
|
||||
#define TXS_LGSEN BIT_11
|
||||
#define TXS_LS BIT_12
|
||||
#define TXS_FS BIT_13
|
||||
#define TXS_EOR BIT_14
|
||||
#define TXS_OWN BIT_15
|
||||
|
||||
#define TPPool_HRDY 0x20
|
||||
|
||||
#define HostReqReg (0xC0)
|
||||
#define SystemMasterDescStartAddrLow (0xF0)
|
||||
#define SystemMasterDescStartAddrHigh (0xF4)
|
||||
#define SystemSlaveDescStartAddrLow (0xF8)
|
||||
#define SystemSlaveDescStartAddrHigh (0xFC)
|
||||
|
||||
//DASH Request Type
|
||||
#define WSMANREG 0x01
|
||||
#define OSPUSHDATA 0x02
|
||||
|
||||
#define RXS_OWN BIT_15
|
||||
#define RXS_EOR BIT_14
|
||||
#define RXS_FS BIT_13
|
||||
#define RXS_LS BIT_12
|
||||
|
||||
#define ISRIMR_DP_DASH_OK BIT_15
|
||||
#define ISRIMR_DP_HOST_OK BIT_13
|
||||
#define ISRIMR_DP_REQSYS_OK BIT_11
|
||||
|
||||
#define ISRIMR_DASH_INTR_EN BIT_12
|
||||
#define ISRIMR_DASH_INTR_CMAC_RESET BIT_15
|
||||
|
||||
#define ISRIMR_DASH_TYPE2_ROK BIT_0
|
||||
#define ISRIMR_DASH_TYPE2_RDU BIT_1
|
||||
#define ISRIMR_DASH_TYPE2_TOK BIT_2
|
||||
#define ISRIMR_DASH_TYPE2_TDU BIT_3
|
||||
#define ISRIMR_DASH_TYPE2_TX_FIFO_FULL BIT_4
|
||||
#define ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE BIT_5
|
||||
#define ISRIMR_DASH_TYPE2_RX_DISABLE_IDLE BIT_6
|
||||
|
||||
#define CMAC_OOB_STOP 0x25
|
||||
#define CMAC_OOB_INIT 0x26
|
||||
#define CMAC_OOB_RESET 0x2a
|
||||
|
||||
#define NO_BASE_ADDRESS 0x00000000
|
||||
#define RTL8168FP_OOBMAC_BASE 0xBAF70000
|
||||
#define RTL8168FP_CMAC_IOBASE 0xBAF20000
|
||||
#define RTL8168FP_KVM_BASE 0xBAF80400
|
||||
#define CMAC_SYNC_REG 0x20
|
||||
#define CMAC_RXDESC_OFFSET 0x90 //RX: 0x90 - 0x98
|
||||
#define CMAC_TXDESC_OFFSET 0x98 //TX: 0x98 - 0x9F
|
||||
|
||||
/* cmac write/read MMIO register */
|
||||
#define RTL_CMAC_W8(tp, reg, val8) writeb ((val8), tp->cmac_ioaddr + (reg))
|
||||
#define RTL_CMAC_W16(tp, reg, val16) writew ((val16), tp->cmac_ioaddr + (reg))
|
||||
#define RTL_CMAC_W32(tp, reg, val32) writel ((val32), tp->cmac_ioaddr + (reg))
|
||||
#define RTL_CMAC_R8(tp, reg) readb (tp->cmac_ioaddr + (reg))
|
||||
#define RTL_CMAC_R16(tp, reg) readw (tp->cmac_ioaddr + (reg))
|
||||
#define RTL_CMAC_R32(tp, reg) ((unsigned long) readl (tp->cmac_ioaddr + (reg)))
|
||||
|
||||
int rtl8125_dash_ioctl(struct net_device *dev, struct ifreq *ifr);
|
||||
void HandleDashInterrupt(struct net_device *dev);
|
||||
int AllocateDashShareMemory(struct net_device *dev);
|
||||
void FreeAllocatedDashShareMemory(struct net_device *dev);
|
||||
void DashHwInit(struct net_device *dev);
|
||||
|
||||
|
||||
#endif /* _LINUX_R8125_DASH_H */
|
||||
@@ -1,264 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8168 is the Linux device driver released for Realtek Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/firmware.h>
|
||||
|
||||
#include "r8125_firmware.h"
|
||||
|
||||
enum rtl_fw_opcode {
|
||||
PHY_READ = 0x0,
|
||||
PHY_DATA_OR = 0x1,
|
||||
PHY_DATA_AND = 0x2,
|
||||
PHY_BJMPN = 0x3,
|
||||
PHY_MDIO_CHG = 0x4,
|
||||
PHY_CLEAR_READCOUNT = 0x7,
|
||||
PHY_WRITE = 0x8,
|
||||
PHY_READCOUNT_EQ_SKIP = 0x9,
|
||||
PHY_COMP_EQ_SKIPN = 0xa,
|
||||
PHY_COMP_NEQ_SKIPN = 0xb,
|
||||
PHY_WRITE_PREVIOUS = 0xc,
|
||||
PHY_SKIPN = 0xd,
|
||||
PHY_DELAY_MS = 0xe,
|
||||
};
|
||||
|
||||
struct fw_info {
|
||||
u32 magic;
|
||||
char version[RTL8125_VER_SIZE];
|
||||
__le32 fw_start;
|
||||
__le32 fw_len;
|
||||
u8 chksum;
|
||||
} __packed;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,16,0)
|
||||
#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
|
||||
#endif
|
||||
#define FW_OPCODE_SIZE sizeof_field(struct rtl8125_fw_phy_action, code[0])
|
||||
|
||||
static bool rtl8125_fw_format_ok(struct rtl8125_fw *rtl_fw)
|
||||
{
|
||||
const struct firmware *fw = rtl_fw->fw;
|
||||
struct fw_info *fw_info = (struct fw_info *)fw->data;
|
||||
struct rtl8125_fw_phy_action *pa = &rtl_fw->phy_action;
|
||||
|
||||
if (fw->size < FW_OPCODE_SIZE)
|
||||
return false;
|
||||
|
||||
if (!fw_info->magic) {
|
||||
size_t i, size, start;
|
||||
u8 checksum = 0;
|
||||
|
||||
if (fw->size < sizeof(*fw_info))
|
||||
return false;
|
||||
|
||||
for (i = 0; i < fw->size; i++)
|
||||
checksum += fw->data[i];
|
||||
if (checksum != 0)
|
||||
return false;
|
||||
|
||||
start = le32_to_cpu(fw_info->fw_start);
|
||||
if (start > fw->size)
|
||||
return false;
|
||||
|
||||
size = le32_to_cpu(fw_info->fw_len);
|
||||
if (size > (fw->size - start) / FW_OPCODE_SIZE)
|
||||
return false;
|
||||
|
||||
strscpy(rtl_fw->version, fw_info->version, RTL8125_VER_SIZE);
|
||||
|
||||
pa->code = (__le32 *)(fw->data + start);
|
||||
pa->size = size;
|
||||
} else {
|
||||
if (fw->size % FW_OPCODE_SIZE)
|
||||
return false;
|
||||
|
||||
strscpy(rtl_fw->version, rtl_fw->fw_name, RTL8125_VER_SIZE);
|
||||
|
||||
pa->code = (__le32 *)fw->data;
|
||||
pa->size = fw->size / FW_OPCODE_SIZE;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool rtl8125_fw_data_ok(struct rtl8125_fw *rtl_fw)
|
||||
{
|
||||
struct rtl8125_fw_phy_action *pa = &rtl_fw->phy_action;
|
||||
size_t index;
|
||||
|
||||
for (index = 0; index < pa->size; index++) {
|
||||
u32 action = le32_to_cpu(pa->code[index]);
|
||||
u32 val = action & 0x0000ffff;
|
||||
u32 regno = (action & 0x0fff0000) >> 16;
|
||||
|
||||
switch (action >> 28) {
|
||||
case PHY_READ:
|
||||
case PHY_DATA_OR:
|
||||
case PHY_DATA_AND:
|
||||
case PHY_CLEAR_READCOUNT:
|
||||
case PHY_WRITE:
|
||||
case PHY_WRITE_PREVIOUS:
|
||||
case PHY_DELAY_MS:
|
||||
break;
|
||||
|
||||
case PHY_MDIO_CHG:
|
||||
if (val > 1)
|
||||
goto out;
|
||||
break;
|
||||
|
||||
case PHY_BJMPN:
|
||||
if (regno > index)
|
||||
goto out;
|
||||
break;
|
||||
case PHY_READCOUNT_EQ_SKIP:
|
||||
if (index + 2 >= pa->size)
|
||||
goto out;
|
||||
break;
|
||||
case PHY_COMP_EQ_SKIPN:
|
||||
case PHY_COMP_NEQ_SKIPN:
|
||||
case PHY_SKIPN:
|
||||
if (index + 1 + regno >= pa->size)
|
||||
goto out;
|
||||
break;
|
||||
|
||||
default:
|
||||
dev_err(rtl_fw->dev, "Invalid action 0x%08x\n", action);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
out:
|
||||
dev_err(rtl_fw->dev, "Out of range of firmware\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtl8125_fw_write_firmware(struct rtl8125_private *tp, struct rtl8125_fw *rtl_fw)
|
||||
{
|
||||
struct rtl8125_fw_phy_action *pa = &rtl_fw->phy_action;
|
||||
rtl8125_fw_write_t fw_write = rtl_fw->phy_write;
|
||||
rtl8125_fw_read_t fw_read = rtl_fw->phy_read;
|
||||
int predata = 0, count = 0;
|
||||
size_t index;
|
||||
|
||||
for (index = 0; index < pa->size; index++) {
|
||||
u32 action = le32_to_cpu(pa->code[index]);
|
||||
u32 data = action & 0x0000ffff;
|
||||
u32 regno = (action & 0x0fff0000) >> 16;
|
||||
enum rtl_fw_opcode opcode = action >> 28;
|
||||
|
||||
if (!action)
|
||||
break;
|
||||
|
||||
switch (opcode) {
|
||||
case PHY_READ:
|
||||
predata = fw_read(tp, regno);
|
||||
count++;
|
||||
break;
|
||||
case PHY_DATA_OR:
|
||||
predata |= data;
|
||||
break;
|
||||
case PHY_DATA_AND:
|
||||
predata &= data;
|
||||
break;
|
||||
case PHY_BJMPN:
|
||||
index -= (regno + 1);
|
||||
break;
|
||||
case PHY_MDIO_CHG:
|
||||
if (data) {
|
||||
fw_write = rtl_fw->mac_mcu_write;
|
||||
fw_read = rtl_fw->mac_mcu_read;
|
||||
} else {
|
||||
fw_write = rtl_fw->phy_write;
|
||||
fw_read = rtl_fw->phy_read;
|
||||
}
|
||||
|
||||
break;
|
||||
case PHY_CLEAR_READCOUNT:
|
||||
count = 0;
|
||||
break;
|
||||
case PHY_WRITE:
|
||||
fw_write(tp, regno, data);
|
||||
break;
|
||||
case PHY_READCOUNT_EQ_SKIP:
|
||||
if (count == data)
|
||||
index++;
|
||||
break;
|
||||
case PHY_COMP_EQ_SKIPN:
|
||||
if (predata == data)
|
||||
index += regno;
|
||||
break;
|
||||
case PHY_COMP_NEQ_SKIPN:
|
||||
if (predata != data)
|
||||
index += regno;
|
||||
break;
|
||||
case PHY_WRITE_PREVIOUS:
|
||||
fw_write(tp, regno, predata);
|
||||
break;
|
||||
case PHY_SKIPN:
|
||||
index += regno;
|
||||
break;
|
||||
case PHY_DELAY_MS:
|
||||
mdelay(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rtl8125_fw_release_firmware(struct rtl8125_fw *rtl_fw)
|
||||
{
|
||||
release_firmware(rtl_fw->fw);
|
||||
}
|
||||
|
||||
int rtl8125_fw_request_firmware(struct rtl8125_fw *rtl_fw)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = request_firmware(&rtl_fw->fw, rtl_fw->fw_name, rtl_fw->dev);
|
||||
if (rc < 0)
|
||||
goto out;
|
||||
|
||||
if (!rtl8125_fw_format_ok(rtl_fw) || !rtl8125_fw_data_ok(rtl_fw)) {
|
||||
release_firmware(rtl_fw->fw);
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
return 0;
|
||||
out:
|
||||
dev_err(rtl_fw->dev, "Unable to load firmware %s (%d)\n",
|
||||
rtl_fw->fw_name, rc);
|
||||
return rc;
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#ifndef _LINUX_rtl8125_FIRMWARE_H
|
||||
#define _LINUX_rtl8125_FIRMWARE_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/firmware.h>
|
||||
|
||||
struct rtl8125_private;
|
||||
typedef void (*rtl8125_fw_write_t)(struct rtl8125_private *tp, u16 reg, u16 val);
|
||||
typedef u32 (*rtl8125_fw_read_t)(struct rtl8125_private *tp, u16 reg);
|
||||
|
||||
#define RTL8125_VER_SIZE 32
|
||||
|
||||
struct rtl8125_fw {
|
||||
rtl8125_fw_write_t phy_write;
|
||||
rtl8125_fw_read_t phy_read;
|
||||
rtl8125_fw_write_t mac_mcu_write;
|
||||
rtl8125_fw_read_t mac_mcu_read;
|
||||
const struct firmware *fw;
|
||||
const char *fw_name;
|
||||
struct device *dev;
|
||||
|
||||
char version[RTL8125_VER_SIZE];
|
||||
|
||||
struct rtl8125_fw_phy_action {
|
||||
__le32 *code;
|
||||
size_t size;
|
||||
} phy_action;
|
||||
};
|
||||
|
||||
int rtl8125_fw_request_firmware(struct rtl8125_fw *rtl_fw);
|
||||
void rtl8125_fw_release_firmware(struct rtl8125_fw *rtl_fw);
|
||||
void rtl8125_fw_write_firmware(struct rtl8125_private *tp, struct rtl8125_fw *rtl_fw);
|
||||
|
||||
#endif /* _LINUX_rtl8125_FIRMWARE_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,594 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mii.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/ethtool.h>
|
||||
|
||||
#include "r8125.h"
|
||||
#include "r8125_ptp.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
|
||||
static inline struct timespec timespec64_to_timespec(const struct timespec64 ts64)
|
||||
{
|
||||
return *(const struct timespec *)&ts64;
|
||||
}
|
||||
|
||||
static inline struct timespec64 timespec_to_timespec64(const struct timespec ts)
|
||||
{
|
||||
return *(const struct timespec64 *)&ts;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int _rtl8125_phc_gettime(struct rtl8125_private *tp, struct timespec64 *ts64)
|
||||
{
|
||||
//get local time
|
||||
RTL_W16(tp, PTP_TIME_CORRECT_CMD_8125, (PTP_CMD_LATCHED_LOCAL_TIME | PTP_EXEC_CMD));
|
||||
|
||||
/* nanoseconds */
|
||||
//0x6808[29:0]
|
||||
ts64->tv_nsec = (RTL_R32(tp, PTP_SOFT_CONFIG_Time_NS_8125) & 0x3fffffff) +
|
||||
tp->ptp_adjust;
|
||||
|
||||
/* seconds */
|
||||
//0x680C[47:0]
|
||||
ts64->tv_sec = RTL_R16(tp, PTP_SOFT_CONFIG_Time_S_8125 + 4);
|
||||
ts64->tv_sec <<= 32;
|
||||
ts64->tv_sec |= RTL_R32(tp, PTP_SOFT_CONFIG_Time_S_8125);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _rtl8125_phc_settime(struct rtl8125_private *tp, const struct timespec64 *ts64)
|
||||
{
|
||||
/* nanoseconds */
|
||||
//0x6808[29:0]
|
||||
RTL_W32(tp, PTP_SOFT_CONFIG_Time_NS_8125, (ts64->tv_nsec & 0x3fffffff));
|
||||
|
||||
/* seconds */
|
||||
//0x680C[47:0]
|
||||
RTL_W32(tp, PTP_SOFT_CONFIG_Time_S_8125, ts64->tv_sec);
|
||||
RTL_W16(tp, PTP_SOFT_CONFIG_Time_S_8125 + 4, (ts64->tv_sec >> 32));
|
||||
|
||||
//set local time
|
||||
RTL_W16(tp, PTP_TIME_CORRECT_CMD_8125, (PTP_CMD_SET_LOCAL_TIME | PTP_EXEC_CMD));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int _rtl8125_phc_adjtime(struct rtl8125_private *tp, s64 delta)
|
||||
{
|
||||
struct timespec64 now, then = ns_to_timespec64(delta);
|
||||
u32 nsec;
|
||||
u64 sec;
|
||||
|
||||
_rtl8125_phc_gettime(tp, &now);
|
||||
now = timespec64_add(now, then);
|
||||
|
||||
nsec = now.tv_nsec & 0x3fffffff;
|
||||
sec = now.tv_sec & 0x0000ffffffffffff;
|
||||
|
||||
/* nanoseconds */
|
||||
//0x6808[29:0]
|
||||
RTL_W32(tp, PTP_SOFT_CONFIG_Time_NS_8125, nsec);
|
||||
|
||||
/* seconds */
|
||||
//0x680C[47:0]
|
||||
RTL_W32(tp, PTP_SOFT_CONFIG_Time_S_8125, sec);
|
||||
RTL_W16(tp, PTP_SOFT_CONFIG_Time_S_8125 + 4, (sec >> 32));
|
||||
|
||||
//adjust local time
|
||||
//RTL_W16(tp, PTP_TIME_CORRECT_CMD_8125, (PTP_CMD_DRIFT_LOCAL_TIME | PTP_EXEC_CMD));
|
||||
RTL_W16(tp, PTP_TIME_CORRECT_CMD_8125, (PTP_CMD_SET_LOCAL_TIME | PTP_EXEC_CMD));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int rtl8125_phc_adjtime(struct ptp_clock_info *ptp, s64 delta)
|
||||
{
|
||||
struct rtl8125_private *tp = container_of(ptp, struct rtl8125_private, ptp_clock_info);
|
||||
unsigned long flags;
|
||||
//int ret = 0;
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "phc adjust time\n");
|
||||
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
//ret = _rtl8125_phc_adjtime(tp, delta);
|
||||
tp->ptp_adjust += delta;
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
1ppm means every 125MHz plus 125Hz. It also means every 8ns minus 8ns*10^(-6)
|
||||
|
||||
1ns=2^30 sub_ns
|
||||
|
||||
8ns*10^(-6) = 8 * 2^30 sub_ns * 10^(-6) = 2^33 sub_ns * 10^(-6) = 8590 = 0x218E sub_ns
|
||||
|
||||
1ppb means every 125MHz plus 0.125Hz. It also means every 8ns minus 8ns*10^(-9)
|
||||
|
||||
1ns=2^30 sub_ns
|
||||
|
||||
8ns*10^(-9) = 8 * 2^30 sub_ns * 10^(-9) = 2^33 sub_ns * 10^(-9) = 8.59 sub_ns = 9 sub_ns
|
||||
*/
|
||||
static int _rtl8125_phc_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
|
||||
{
|
||||
struct rtl8125_private *tp = container_of(ptp, struct rtl8125_private, ptp_clock_info);
|
||||
bool negative = false;
|
||||
u32 sub_ns;
|
||||
|
||||
if (ppb < 0) {
|
||||
negative = true;
|
||||
ppb = -ppb;
|
||||
}
|
||||
|
||||
sub_ns = ppb * 9;
|
||||
if (negative) {
|
||||
sub_ns = -sub_ns;
|
||||
sub_ns &= 0x3fffffff;
|
||||
sub_ns |= PTP_ADJUST_TIME_NS_NEGATIVE;
|
||||
} else
|
||||
sub_ns &= 0x3fffffff;
|
||||
|
||||
/* nanoseconds */
|
||||
//0x6808[29:0]
|
||||
RTL_W32(tp, PTP_SOFT_CONFIG_Time_NS_8125, sub_ns);
|
||||
|
||||
//adjust local time
|
||||
RTL_W16(tp, PTP_TIME_CORRECT_CMD_8125, (PTP_CMD_DRIFT_LOCAL_TIME | PTP_EXEC_CMD));
|
||||
//RTL_W16(tp, PTP_TIME_CORRECT_CMD_8125, (PTP_CMD_SET_LOCAL_TIME | PTP_EXEC_CMD));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtl8125_phc_adjfreq(struct ptp_clock_info *ptp, s32 delta)
|
||||
{
|
||||
//struct rtl8125_private *tp = container_of(ptp, struct rtl8125_private, ptp_clock_info);
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "phc adjust freq\n");
|
||||
|
||||
if (delta > ptp->max_adj || delta < -ptp->max_adj)
|
||||
return -EINVAL;
|
||||
|
||||
_rtl8125_phc_adjfreq(ptp, delta);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtl8125_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts64)
|
||||
{
|
||||
struct rtl8125_private *tp = container_of(ptp, struct rtl8125_private, ptp_clock_info);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "phc get ts\n");
|
||||
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
ret = _rtl8125_phc_gettime(tp, ts64);
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rtl8125_phc_settime(struct ptp_clock_info *ptp,
|
||||
const struct timespec64 *ts64)
|
||||
{
|
||||
struct rtl8125_private *tp = container_of(ptp, struct rtl8125_private, ptp_clock_info);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "phc set ts\n");
|
||||
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
ret = _rtl8125_phc_settime(tp, ts64);
|
||||
tp->ptp_adjust = 0;
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rtl8125_phc_enable(struct ptp_clock_info *ptp,
|
||||
struct ptp_clock_request *rq, int on)
|
||||
{
|
||||
struct rtl8125_private *tp = container_of(ptp, struct rtl8125_private, ptp_clock_info);
|
||||
unsigned long flags;
|
||||
u16 ptp_ctrl;
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "phc enable type %x on %d\n", rq->type, on);
|
||||
|
||||
switch (rq->type) {
|
||||
case PTP_CLK_REQ_PPS:
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
ptp_ctrl = RTL_R16(tp, PTP_CTRL_8125);
|
||||
ptp_ctrl &= ~BIT_15;
|
||||
if (on)
|
||||
ptp_ctrl |= BIT_14;
|
||||
else
|
||||
ptp_ctrl &= ~BIT_14;
|
||||
RTL_W16(tp, PTP_CTRL_8125, ptp_ctrl);
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
return 0;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
}
|
||||
|
||||
int rtl8125_get_ts_info(struct net_device *netdev,
|
||||
struct ethtool_ts_info *info)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(netdev);
|
||||
|
||||
/* we always support timestamping disabled */
|
||||
info->rx_filters = BIT(HWTSTAMP_FILTER_NONE);
|
||||
|
||||
if (tp->HwSuppPtpVer == 0)
|
||||
return ethtool_op_get_ts_info(netdev, info);
|
||||
|
||||
info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_RX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_SOFTWARE |
|
||||
SOF_TIMESTAMPING_TX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE;
|
||||
|
||||
if (tp->ptp_clock)
|
||||
info->phc_index = ptp_clock_index(tp->ptp_clock);
|
||||
else
|
||||
info->phc_index = -1;
|
||||
|
||||
info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
|
||||
|
||||
info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) |
|
||||
BIT(HWTSTAMP_FILTER_PTP_V2_EVENT) |
|
||||
BIT(HWTSTAMP_FILTER_PTP_V2_L4_EVENT) |
|
||||
BIT(HWTSTAMP_FILTER_PTP_V2_SYNC) |
|
||||
BIT(HWTSTAMP_FILTER_PTP_V2_L4_SYNC) |
|
||||
BIT(HWTSTAMP_FILTER_PTP_V2_DELAY_REQ) |
|
||||
BIT(HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct ptp_clock_info rtl_ptp_clock_info = {
|
||||
.owner = THIS_MODULE,
|
||||
.n_alarm = 0,
|
||||
.n_ext_ts = 0,
|
||||
.n_per_out = 0,
|
||||
.n_pins = 0,
|
||||
.pps = 1,
|
||||
.adjfreq = rtl8125_phc_adjfreq,
|
||||
.adjtime = rtl8125_phc_adjtime,
|
||||
.gettime64 = rtl8125_phc_gettime,
|
||||
.settime64 = rtl8125_phc_settime,
|
||||
.enable = rtl8125_phc_enable,
|
||||
};
|
||||
|
||||
static int rtl8125_get_tx_ptp_pkt_tstamp(struct rtl8125_private *tp, struct timespec64 *ts64)
|
||||
{
|
||||
return _rtl8125_phc_gettime(tp, ts64);
|
||||
}
|
||||
|
||||
static void rtl8125_ptp_tx_hwtstamp(struct rtl8125_private *tp)
|
||||
{
|
||||
struct sk_buff *skb = tp->ptp_tx_skb;
|
||||
struct skb_shared_hwtstamps shhwtstamps = {0};
|
||||
struct timespec64 ts64;
|
||||
|
||||
RTL_W8(tp, PTP_ISR_8125, PTP_ISR_TOK | PTP_ISR_TER);
|
||||
|
||||
rtl8125_get_tx_ptp_pkt_tstamp(tp, &ts64);
|
||||
|
||||
/* Upper 32 bits contain s, lower 32 bits contain ns. */
|
||||
shhwtstamps.hwtstamp = ktime_set(ts64.tv_sec,
|
||||
ts64.tv_nsec);
|
||||
|
||||
/* Clear the lock early before calling skb_tstamp_tx so that
|
||||
* applications are not woken up before the lock bit is clear. We use
|
||||
* a copy of the skb pointer to ensure other threads can't change it
|
||||
* while we're notifying the stack.
|
||||
*/
|
||||
tp->ptp_tx_skb = NULL;
|
||||
|
||||
/* Notify the stack and free the skb after we've unlocked */
|
||||
skb_tstamp_tx(skb, &shhwtstamps);
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
|
||||
#define RTL8125_PTP_TX_TIMEOUT (HZ * 15)
|
||||
static void rtl8125_ptp_tx_work(struct work_struct *work)
|
||||
{
|
||||
struct rtl8125_private *tp = container_of(work, struct rtl8125_private,
|
||||
ptp_tx_work);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
|
||||
if (!tp->ptp_tx_skb)
|
||||
goto Exit;
|
||||
|
||||
if (time_is_before_jiffies(tp->ptp_tx_start +
|
||||
RTL8125_PTP_TX_TIMEOUT)) {
|
||||
dev_kfree_skb_any(tp->ptp_tx_skb);
|
||||
tp->ptp_tx_skb = NULL;
|
||||
tp->tx_hwtstamp_timeouts++;
|
||||
/* Clear the tx valid bit in TSYNCTXCTL register to enable
|
||||
* interrupt
|
||||
*/
|
||||
RTL_W8(tp, PTP_ISR_8125, PTP_ISR_TOK | PTP_ISR_TER);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if (RTL_R8(tp, PTP_ISR_8125) & (PTP_ISR_TOK))
|
||||
rtl8125_ptp_tx_hwtstamp(tp);
|
||||
else
|
||||
/* reschedule to check later */
|
||||
schedule_work(&tp->ptp_tx_work);
|
||||
|
||||
Exit:
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
}
|
||||
|
||||
static int rtl8125_hwtstamp_enable(struct rtl8125_private *tp, bool enable)
|
||||
{
|
||||
RTL_W16(tp, PTP_CTRL_8125, 0);
|
||||
if (enable) {
|
||||
u16 ptp_ctrl;
|
||||
struct timespec64 ts64;
|
||||
|
||||
//clear ptp isr
|
||||
RTL_W8(tp, PTP_ISR_8125, 0xff);
|
||||
//ptp source 0:gphy 1:mac
|
||||
rtl8125_mac_ocp_write(tp, 0xDC00, rtl8125_mac_ocp_read(tp, 0xDC00) | BIT_6);
|
||||
//enable ptp
|
||||
ptp_ctrl = (BIT_0 | BIT_3 | BIT_4 | BIT_6 | BIT_10 | BIT_12 | BIT_13);
|
||||
if (tp->ptp_master_mode) {
|
||||
ptp_ctrl &= ~BIT_13;
|
||||
ptp_ctrl |= BIT_1;
|
||||
}
|
||||
RTL_W16(tp, PTP_CTRL_8125, ptp_ctrl);
|
||||
|
||||
//set system time
|
||||
/*
|
||||
if (ktime_to_timespec64_cond(ktime_get_real(), &ts64))
|
||||
_rtl8125_phc_settime(tp, timespec64_to_timespec(ts64));
|
||||
*/
|
||||
ktime_get_real_ts64(&ts64);
|
||||
ts64.tv_nsec += tp->ptp_adjust;
|
||||
_rtl8125_phc_settime(tp, &ts64);
|
||||
tp->ptp_adjust = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long rtl8125_ptp_create_clock(struct rtl8125_private *tp)
|
||||
{
|
||||
struct net_device *netdev = tp->dev;
|
||||
long err;
|
||||
|
||||
if (!IS_ERR_OR_NULL(tp->ptp_clock))
|
||||
return 0;
|
||||
|
||||
if (tp->HwSuppPtpVer == 0) {
|
||||
tp->ptp_clock = NULL;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
tp->ptp_clock_info = rtl_ptp_clock_info;
|
||||
snprintf(tp->ptp_clock_info.name, sizeof(tp->ptp_clock_info.name),
|
||||
"%pm", tp->dev->dev_addr);
|
||||
tp->ptp_clock_info.max_adj = 119304647;
|
||||
tp->ptp_clock = ptp_clock_register(&tp->ptp_clock_info, &tp->pci_dev->dev);
|
||||
if (IS_ERR(tp->ptp_clock)) {
|
||||
err = PTR_ERR(tp->ptp_clock);
|
||||
tp->ptp_clock = NULL;
|
||||
netif_err(tp, drv, tp->dev, "ptp_clock_register failed\n");
|
||||
return err;
|
||||
} else
|
||||
netif_info(tp, drv, tp->dev, "registered PHC device on %s\n", netdev->name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rtl8125_ptp_reset(struct rtl8125_private *tp)
|
||||
{
|
||||
if (!tp->ptp_clock)
|
||||
return;
|
||||
|
||||
netif_info(tp, drv, tp->dev, "reset PHC clock\n");
|
||||
|
||||
rtl8125_hwtstamp_enable(tp, false);
|
||||
}
|
||||
|
||||
void rtl8125_ptp_init(struct rtl8125_private *tp)
|
||||
{
|
||||
/* obtain a PTP device, or re-use an existing device */
|
||||
if (rtl8125_ptp_create_clock(tp))
|
||||
return;
|
||||
|
||||
/* we have a clock so we can initialize work now */
|
||||
INIT_WORK(&tp->ptp_tx_work, rtl8125_ptp_tx_work);
|
||||
|
||||
tp->ptp_adjust = 0;
|
||||
|
||||
/* reset the PTP related hardware bits */
|
||||
rtl8125_ptp_reset(tp);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void rtl8125_ptp_suspend(struct rtl8125_private *tp)
|
||||
{
|
||||
if (!tp->ptp_clock)
|
||||
return;
|
||||
|
||||
netif_info(tp, drv, tp->dev, "suspend PHC clock\n");
|
||||
|
||||
rtl8125_hwtstamp_enable(tp, false);
|
||||
|
||||
/* ensure that we cancel any pending PTP Tx work item in progress */
|
||||
cancel_work_sync(&tp->ptp_tx_work);
|
||||
}
|
||||
|
||||
void rtl8125_ptp_stop(struct rtl8125_private *tp)
|
||||
{
|
||||
struct net_device *netdev = tp->dev;
|
||||
|
||||
netif_info(tp, drv, tp->dev, "stop PHC clock\n");
|
||||
|
||||
/* first, suspend PTP activity */
|
||||
rtl8125_ptp_suspend(tp);
|
||||
|
||||
/* disable the PTP clock device */
|
||||
if (tp->ptp_clock) {
|
||||
ptp_clock_unregister(tp->ptp_clock);
|
||||
tp->ptp_clock = NULL;
|
||||
netif_info(tp, drv, tp->dev, "removed PHC on %s\n",
|
||||
netdev->name);
|
||||
}
|
||||
}
|
||||
|
||||
static int rtl8125_set_tstamp(struct net_device *netdev, struct ifreq *ifr)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(netdev);
|
||||
struct hwtstamp_config config;
|
||||
bool hwtstamp = 0;
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "ptp set ts\n");
|
||||
|
||||
if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
|
||||
return -EFAULT;
|
||||
|
||||
if (config.flags)
|
||||
return -EINVAL;
|
||||
|
||||
switch (config.tx_type) {
|
||||
case HWTSTAMP_TX_ON:
|
||||
hwtstamp = 1;
|
||||
case HWTSTAMP_TX_OFF:
|
||||
break;
|
||||
case HWTSTAMP_TX_ONESTEP_SYNC:
|
||||
default:
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
switch (config.rx_filter) {
|
||||
case HWTSTAMP_FILTER_PTP_V2_EVENT:
|
||||
case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
|
||||
case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
|
||||
case HWTSTAMP_FILTER_PTP_V2_SYNC:
|
||||
case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
|
||||
case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
|
||||
case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
|
||||
case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
|
||||
case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
|
||||
config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
|
||||
hwtstamp = 1;
|
||||
case HWTSTAMP_FILTER_NONE:
|
||||
break;
|
||||
default:
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
if (tp->hwtstamp_config.tx_type != config.tx_type ||
|
||||
tp->hwtstamp_config.rx_filter != config.rx_filter) {
|
||||
tp->hwtstamp_config = config;
|
||||
rtl8125_hwtstamp_enable(tp, hwtstamp);
|
||||
}
|
||||
|
||||
return copy_to_user(ifr->ifr_data, &config,
|
||||
sizeof(config)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int rtl8125_get_tstamp(struct net_device *netdev, struct ifreq *ifr)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(netdev);
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "ptp get ts\n");
|
||||
|
||||
return copy_to_user(ifr->ifr_data, &tp->hwtstamp_config,
|
||||
sizeof(tp->hwtstamp_config)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
int rtl8125_ptp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(netdev);
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
|
||||
//netif_info(tp, drv, tp->dev, "ptp ioctl\n");
|
||||
|
||||
ret = 0;
|
||||
switch (cmd) {
|
||||
#ifdef ENABLE_PTP_SUPPORT
|
||||
case SIOCSHWTSTAMP:
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
ret = rtl8125_set_tstamp(netdev, ifr);
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
break;
|
||||
case SIOCGHWTSTAMP:
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
ret = rtl8125_get_tstamp(netdev, ifr);
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void rtl8125_rx_ptp_pktstamp(struct rtl8125_private *tp, struct sk_buff *skb,
|
||||
struct RxDescV3 *descv3)
|
||||
{
|
||||
time64_t tv_sec;
|
||||
long tv_nsec;
|
||||
|
||||
tv_sec = le32_to_cpu(descv3->RxDescTimeStamp.TimeStampHigh) +
|
||||
((u64)le32_to_cpu(descv3->RxDescPTPDDWord4.TimeStampHHigh) << 32);
|
||||
tv_nsec = le32_to_cpu(descv3->RxDescTimeStamp.TimeStampLow) + tp->ptp_adjust;
|
||||
|
||||
skb_hwtstamps(skb)->hwtstamp = ktime_set(tv_sec, tv_nsec);
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#ifndef _LINUX_rtl8125_PTP_H
|
||||
#define _LINUX_rtl8125_PTP_H
|
||||
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/timecounter.h>
|
||||
#include <linux/net_tstamp.h>
|
||||
#include <linux/ptp_clock_kernel.h>
|
||||
#include <linux/ptp_classify.h>
|
||||
|
||||
struct rtl8125_ptp_info {
|
||||
s64 time_sec;
|
||||
u32 time_ns;
|
||||
u16 ts_info;
|
||||
};
|
||||
|
||||
#ifndef _STRUCT_TIMESPEC
|
||||
#define _STRUCT_TIMESPEC
|
||||
struct timespec {
|
||||
__kernel_old_time_t tv_sec; /* seconds */
|
||||
long tv_nsec; /* nanoseconds */
|
||||
};
|
||||
#endif
|
||||
|
||||
enum PTP_CMD_TYPE {
|
||||
PTP_CMD_SET_LOCAL_TIME = 0,
|
||||
PTP_CMD_DRIFT_LOCAL_TIME,
|
||||
PTP_CMD_LATCHED_LOCAL_TIME,
|
||||
};
|
||||
|
||||
|
||||
struct rtl8125_private;
|
||||
struct RxDescV3;
|
||||
|
||||
int rtl8125_get_ts_info(struct net_device *netdev,
|
||||
struct ethtool_ts_info *info);
|
||||
|
||||
void rtl8125_ptp_reset(struct rtl8125_private *tp);
|
||||
void rtl8125_ptp_init(struct rtl8125_private *tp);
|
||||
void rtl8125_ptp_suspend(struct rtl8125_private *tp);
|
||||
void rtl8125_ptp_stop(struct rtl8125_private *tp);
|
||||
|
||||
int rtl8125_ptp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
|
||||
|
||||
void rtl8125_rx_ptp_pktstamp(struct rtl8125_private *tp, struct sk_buff *skb,
|
||||
struct RxDescV3 *descv3);
|
||||
|
||||
#endif /* _LINUX_rtl8125_PTP_H */
|
||||
@@ -1,118 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#ifndef _LINUX_R8125_REALWOW_H
|
||||
#define _LINUX_R8125_REALWOW_H
|
||||
|
||||
#define SIOCDEVPRIVATE_RTLREALWOW SIOCDEVPRIVATE+3
|
||||
|
||||
#define MAX_RealWoW_KCP_SIZE (100)
|
||||
#define MAX_RealWoW_Payload (64)
|
||||
|
||||
#define KA_TX_PACKET_SIZE (100)
|
||||
#define KA_WAKEUP_PATTERN_SIZE (120)
|
||||
|
||||
//HwSuppKeepAliveOffloadVer
|
||||
#define HW_SUPPORT_KCP_OFFLOAD(_M) ((_M)->HwSuppKCPOffloadVer > 0)
|
||||
|
||||
enum rtl_realwow_cmd {
|
||||
|
||||
RTL_REALWOW_SET_KCP_DISABLE=0,
|
||||
RTL_REALWOW_SET_KCP_INFO,
|
||||
RTL_REALWOW_SET_KCP_CONTENT,
|
||||
|
||||
RTL_REALWOW_SET_KCP_ACKPKTINFO,
|
||||
RTL_REALWOW_SET_KCP_WPINFO,
|
||||
RTL_REALWOW_SET_KCPDHCP_TIMEOUT,
|
||||
|
||||
RTLT_REALWOW_COMMAND_INVALID
|
||||
};
|
||||
|
||||
struct rtl_realwow_ioctl_struct {
|
||||
__u32 cmd;
|
||||
__u32 offset;
|
||||
__u32 len;
|
||||
union {
|
||||
__u32 data;
|
||||
void *data_buffer;
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct _MP_KCPInfo {
|
||||
u8 DIPv4[4];
|
||||
u8 MacID[6];
|
||||
u16 UdpPort[2];
|
||||
u8 PKTLEN[2];
|
||||
|
||||
u16 ackLostCnt;
|
||||
u8 KCP_WakePattern[MAX_RealWoW_Payload];
|
||||
u8 KCP_AckPacket[MAX_RealWoW_Payload];
|
||||
u32 KCP_interval;
|
||||
u8 KCP_WakePattern_Len;
|
||||
u8 KCP_AckPacket_Len;
|
||||
u8 KCP_TxPacket[2][KA_TX_PACKET_SIZE];
|
||||
} MP_KCP_INFO, *PMP_KCP_INFO;
|
||||
|
||||
typedef struct _KCPInfo {
|
||||
u32 nId; // = id
|
||||
u8 DIPv4[4];
|
||||
u8 MacID[6];
|
||||
u16 UdpPort;
|
||||
u16 PKTLEN;
|
||||
} KCPInfo, *PKCPInfo;
|
||||
|
||||
typedef struct _KCPContent {
|
||||
u32 id; // = id
|
||||
u32 mSec; // = msec
|
||||
u32 size; // =size
|
||||
u8 bPacket[MAX_RealWoW_KCP_SIZE]; // put packet here
|
||||
} KCPContent, *PKCPContent;
|
||||
|
||||
typedef struct _RealWoWAckPktInfo {
|
||||
u16 ackLostCnt;
|
||||
u16 patterntSize;
|
||||
u8 pattern[MAX_RealWoW_Payload];
|
||||
} RealWoWAckPktInfo,*PRealWoWAckPktInfo;
|
||||
|
||||
typedef struct _RealWoWWPInfo {
|
||||
u16 patterntSize;
|
||||
u8 pattern[MAX_RealWoW_Payload];
|
||||
} RealWoWWPInfo,*PRealWoWWPInfo;
|
||||
|
||||
int rtl8125_realwow_ioctl(struct net_device *dev, struct ifreq *ifr);
|
||||
void rtl8125_realwow_hw_init(struct net_device *dev);
|
||||
void rtl8125_get_realwow_hw_version(struct net_device *dev);
|
||||
void rtl8125_set_realwow_d3_para(struct net_device *dev);
|
||||
|
||||
#endif /* _LINUX_R8125_REALWOW_H */
|
||||
@@ -1,481 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8168 is the Linux device driver released for Realtek Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#include <linux/version.h>
|
||||
#include "r8125.h"
|
||||
|
||||
enum rtl8125_rss_register_content {
|
||||
/* RSS */
|
||||
RSS_CTRL_TCP_IPV4_SUPP = (1 << 0),
|
||||
RSS_CTRL_IPV4_SUPP = (1 << 1),
|
||||
RSS_CTRL_TCP_IPV6_SUPP = (1 << 2),
|
||||
RSS_CTRL_IPV6_SUPP = (1 << 3),
|
||||
RSS_HALF_SUPP = (1 << 7),
|
||||
RSS_CTRL_UDP_IPV4_SUPP = (1 << 11),
|
||||
RSS_CTRL_UDP_IPV6_SUPP = (1 << 12),
|
||||
RSS_QUAD_CPU_EN = (1 << 16),
|
||||
RSS_HQ_Q_SUP_R = (1 << 31),
|
||||
};
|
||||
|
||||
static int rtl8125_get_rss_hash_opts(struct rtl8125_private *tp,
|
||||
struct ethtool_rxnfc *cmd)
|
||||
{
|
||||
cmd->data = 0;
|
||||
|
||||
/* Report default options for RSS */
|
||||
switch (cmd->flow_type) {
|
||||
case TCP_V4_FLOW:
|
||||
cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
|
||||
/* fallthrough */
|
||||
case UDP_V4_FLOW:
|
||||
if (tp->rss_flags & RTL_8125_RSS_FLAG_HASH_UDP_IPV4)
|
||||
cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
|
||||
/* fallthrough */
|
||||
case IPV4_FLOW:
|
||||
cmd->data |= RXH_IP_SRC | RXH_IP_DST;
|
||||
break;
|
||||
case TCP_V6_FLOW:
|
||||
cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
|
||||
/* fallthrough */
|
||||
case UDP_V6_FLOW:
|
||||
if (tp->rss_flags & RTL_8125_RSS_FLAG_HASH_UDP_IPV6)
|
||||
cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
|
||||
/* fallthrough */
|
||||
case IPV6_FLOW:
|
||||
cmd->data |= RXH_IP_SRC | RXH_IP_DST;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rtl8125_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
||||
u32 *rule_locs)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(dev);
|
||||
int ret = -EOPNOTSUPP;
|
||||
|
||||
netif_info(tp, drv, tp->dev, "rss get rxnfc\n");
|
||||
|
||||
if (!(dev->features & NETIF_F_RXHASH))
|
||||
return ret;
|
||||
|
||||
switch (cmd->cmd) {
|
||||
case ETHTOOL_GRXRINGS:
|
||||
cmd->data = rtl8125_tot_rx_rings(tp);
|
||||
ret = 0;
|
||||
break;
|
||||
case ETHTOOL_GRXFH:
|
||||
ret = rtl8125_get_rss_hash_opts(tp, cmd);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 rtl8125_rss_indir_tbl_entries(struct rtl8125_private *tp)
|
||||
{
|
||||
return tp->HwSuppIndirTblEntries;
|
||||
}
|
||||
|
||||
#define RSS_MASK_BITS_OFFSET (8)
|
||||
#define RSS_CPU_NUM_OFFSET (16)
|
||||
#define RTL8125_UDP_RSS_FLAGS (RTL_8125_RSS_FLAG_HASH_UDP_IPV4 | \
|
||||
RTL_8125_RSS_FLAG_HASH_UDP_IPV6)
|
||||
static int _rtl8125_set_rss_hash_opt(struct rtl8125_private *tp)
|
||||
{
|
||||
u32 rss_flags = tp->rss_flags;
|
||||
u32 hash_mask_len;
|
||||
u32 rss_ctrl;
|
||||
|
||||
rss_ctrl = ilog2(rtl8125_tot_rx_rings(tp));
|
||||
rss_ctrl &= (BIT_0 | BIT_1 | BIT_2);
|
||||
rss_ctrl <<= RSS_CPU_NUM_OFFSET;
|
||||
|
||||
/* Perform hash on these packet types */
|
||||
rss_ctrl |= RSS_CTRL_TCP_IPV4_SUPP
|
||||
| RSS_CTRL_IPV4_SUPP
|
||||
| RSS_CTRL_IPV6_SUPP
|
||||
| RSS_CTRL_TCP_IPV6_SUPP;
|
||||
|
||||
if (rss_flags & RTL_8125_RSS_FLAG_HASH_UDP_IPV4)
|
||||
rss_ctrl |= RSS_CTRL_UDP_IPV4_SUPP;
|
||||
|
||||
if (rss_flags & RTL_8125_RSS_FLAG_HASH_UDP_IPV6)
|
||||
rss_ctrl |= RSS_CTRL_UDP_IPV6_SUPP;
|
||||
|
||||
hash_mask_len = ilog2(rtl8125_rss_indir_tbl_entries(tp));
|
||||
hash_mask_len &= (BIT_0 | BIT_1 | BIT_2);
|
||||
rss_ctrl |= hash_mask_len << RSS_MASK_BITS_OFFSET;
|
||||
|
||||
RTL_W32(tp, RSS_CTRL_8125, rss_ctrl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtl8125_set_rss_hash_opt(struct rtl8125_private *tp,
|
||||
struct ethtool_rxnfc *nfc)
|
||||
{
|
||||
u32 rss_flags = tp->rss_flags;
|
||||
|
||||
netif_info(tp, drv, tp->dev, "rss set hash\n");
|
||||
|
||||
/*
|
||||
* RSS does not support anything other than hashing
|
||||
* to queues on src and dst IPs and ports
|
||||
*/
|
||||
if (nfc->data & ~(RXH_IP_SRC | RXH_IP_DST |
|
||||
RXH_L4_B_0_1 | RXH_L4_B_2_3))
|
||||
return -EINVAL;
|
||||
|
||||
switch (nfc->flow_type) {
|
||||
case TCP_V4_FLOW:
|
||||
case TCP_V6_FLOW:
|
||||
if (!(nfc->data & RXH_IP_SRC) ||
|
||||
!(nfc->data & RXH_IP_DST) ||
|
||||
!(nfc->data & RXH_L4_B_0_1) ||
|
||||
!(nfc->data & RXH_L4_B_2_3))
|
||||
return -EINVAL;
|
||||
break;
|
||||
case UDP_V4_FLOW:
|
||||
if (!(nfc->data & RXH_IP_SRC) ||
|
||||
!(nfc->data & RXH_IP_DST))
|
||||
return -EINVAL;
|
||||
switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
|
||||
case 0:
|
||||
rss_flags &= ~RTL_8125_RSS_FLAG_HASH_UDP_IPV4;
|
||||
break;
|
||||
case (RXH_L4_B_0_1 | RXH_L4_B_2_3):
|
||||
rss_flags |= RTL_8125_RSS_FLAG_HASH_UDP_IPV4;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case UDP_V6_FLOW:
|
||||
if (!(nfc->data & RXH_IP_SRC) ||
|
||||
!(nfc->data & RXH_IP_DST))
|
||||
return -EINVAL;
|
||||
switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
|
||||
case 0:
|
||||
rss_flags &= ~RTL_8125_RSS_FLAG_HASH_UDP_IPV6;
|
||||
break;
|
||||
case (RXH_L4_B_0_1 | RXH_L4_B_2_3):
|
||||
rss_flags |= RTL_8125_RSS_FLAG_HASH_UDP_IPV6;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case SCTP_V4_FLOW:
|
||||
case AH_ESP_V4_FLOW:
|
||||
case AH_V4_FLOW:
|
||||
case ESP_V4_FLOW:
|
||||
case SCTP_V6_FLOW:
|
||||
case AH_ESP_V6_FLOW:
|
||||
case AH_V6_FLOW:
|
||||
case ESP_V6_FLOW:
|
||||
case IP_USER_FLOW:
|
||||
case ETHER_FLOW:
|
||||
/* RSS is not supported for these protocols */
|
||||
if (nfc->data) {
|
||||
netif_err(tp, drv, tp->dev, "Command parameters not supported\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* if we changed something we need to update flags */
|
||||
if (rss_flags != tp->rss_flags) {
|
||||
u32 rss_ctrl = RTL_R32(tp, RSS_CTRL_8125);
|
||||
|
||||
if ((rss_flags & RTL8125_UDP_RSS_FLAGS) &&
|
||||
!(tp->rss_flags & RTL8125_UDP_RSS_FLAGS))
|
||||
netdev_warn(tp->dev,
|
||||
"enabling UDP RSS: fragmented packets may "
|
||||
"arrive out of order to the stack above\n");
|
||||
|
||||
tp->rss_flags = rss_flags;
|
||||
|
||||
/* Perform hash on these packet types */
|
||||
rss_ctrl |= RSS_CTRL_TCP_IPV4_SUPP
|
||||
| RSS_CTRL_IPV4_SUPP
|
||||
| RSS_CTRL_IPV6_SUPP
|
||||
| RSS_CTRL_TCP_IPV6_SUPP;
|
||||
|
||||
rss_ctrl &= ~(RSS_CTRL_UDP_IPV4_SUPP |
|
||||
RSS_CTRL_UDP_IPV6_SUPP);
|
||||
|
||||
if (rss_flags & RTL_8125_RSS_FLAG_HASH_UDP_IPV4)
|
||||
rss_ctrl |= RSS_CTRL_UDP_IPV4_SUPP;
|
||||
|
||||
if (rss_flags & RTL_8125_RSS_FLAG_HASH_UDP_IPV6)
|
||||
rss_ctrl |= RSS_CTRL_UDP_IPV6_SUPP;
|
||||
|
||||
RTL_W32(tp, RSS_CTRL_8125, rss_ctrl);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rtl8125_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(dev);
|
||||
int ret = -EOPNOTSUPP;
|
||||
|
||||
netif_info(tp, drv, tp->dev, "rss set rxnfc\n");
|
||||
|
||||
if (!(dev->features & NETIF_F_RXHASH))
|
||||
return ret;
|
||||
|
||||
switch (cmd->cmd) {
|
||||
case ETHTOOL_SRXFH:
|
||||
ret = rtl8125_set_rss_hash_opt(tp, cmd);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u32 _rtl8125_get_rxfh_key_size(struct rtl8125_private *tp)
|
||||
{
|
||||
return sizeof(tp->rss_key);
|
||||
}
|
||||
|
||||
u32 rtl8125_get_rxfh_key_size(struct net_device *dev)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(dev);
|
||||
|
||||
netif_info(tp, drv, tp->dev, "rss get key size\n");
|
||||
|
||||
if (!(dev->features & NETIF_F_RXHASH))
|
||||
return 0;
|
||||
|
||||
return _rtl8125_get_rxfh_key_size(tp);
|
||||
}
|
||||
|
||||
u32 rtl8125_rss_indir_size(struct net_device *dev)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(dev);
|
||||
|
||||
netif_info(tp, drv, tp->dev, "rss get indir tbl size\n");
|
||||
|
||||
if (!(dev->features & NETIF_F_RXHASH))
|
||||
return 0;
|
||||
|
||||
return rtl8125_rss_indir_tbl_entries(tp);
|
||||
}
|
||||
|
||||
static void rtl8125_get_reta(struct rtl8125_private *tp, u32 *indir)
|
||||
{
|
||||
int i, reta_size = rtl8125_rss_indir_tbl_entries(tp);
|
||||
|
||||
for (i = 0; i < reta_size; i++)
|
||||
indir[i] = tp->rss_indir_tbl[i];
|
||||
}
|
||||
|
||||
int rtl8125_get_rxfh(struct net_device *dev, u32 *indir, u8 *key,
|
||||
u8 *hfunc)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(dev);
|
||||
|
||||
netif_info(tp, drv, tp->dev, "rss get rxfh\n");
|
||||
|
||||
if (!(dev->features & NETIF_F_RXHASH))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (hfunc)
|
||||
*hfunc = ETH_RSS_HASH_TOP;
|
||||
|
||||
if (indir)
|
||||
rtl8125_get_reta(tp, indir);
|
||||
|
||||
if (key)
|
||||
memcpy(key, tp->rss_key, rtl8125_get_rxfh_key_size(dev));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 rtl8125_rss_key_reg(struct rtl8125_private *tp)
|
||||
{
|
||||
return RSS_KEY_8125;
|
||||
}
|
||||
|
||||
static u32 rtl8125_rss_indir_tbl_reg(struct rtl8125_private *tp)
|
||||
{
|
||||
return RSS_INDIRECTION_TBL_8125_V2;
|
||||
}
|
||||
|
||||
static void rtl8125_store_reta(struct rtl8125_private *tp)
|
||||
{
|
||||
u16 indir_tbl_reg = rtl8125_rss_indir_tbl_reg(tp);
|
||||
u32 i, reta_entries = rtl8125_rss_indir_tbl_entries(tp);
|
||||
u32 reta = 0;
|
||||
u8 *indir_tbl = tp->rss_indir_tbl;
|
||||
|
||||
/* Write redirection table to HW */
|
||||
for (i = 0; i < reta_entries; i++) {
|
||||
reta |= indir_tbl[i] << (i & 0x3) * 8;
|
||||
if ((i & 3) == 3) {
|
||||
RTL_W32(tp, indir_tbl_reg, reta);
|
||||
|
||||
indir_tbl_reg += 4;
|
||||
reta = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void rtl8125_store_rss_key(struct rtl8125_private *tp)
|
||||
{
|
||||
const u16 rss_key_reg = rtl8125_rss_key_reg(tp);
|
||||
u32 i, rss_key_size = _rtl8125_get_rxfh_key_size(tp);
|
||||
u32 *rss_key = (u32*)tp->rss_key;
|
||||
|
||||
/* Write redirection table to HW */
|
||||
for (i = 0; i < rss_key_size; i+=4)
|
||||
RTL_W32(tp, rss_key_reg + i, *rss_key++);
|
||||
}
|
||||
|
||||
int rtl8125_set_rxfh(struct net_device *dev, const u32 *indir,
|
||||
const u8 *key, const u8 hfunc)
|
||||
{
|
||||
struct rtl8125_private *tp = netdev_priv(dev);
|
||||
int i;
|
||||
u32 reta_entries = rtl8125_rss_indir_tbl_entries(tp);
|
||||
|
||||
netif_info(tp, drv, tp->dev, "rss set rxfh\n");
|
||||
|
||||
/* We require at least one supported parameter to be changed and no
|
||||
* change in any of the unsupported parameters
|
||||
*/
|
||||
if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Fill out the redirection table */
|
||||
if (indir) {
|
||||
int max_queues = tp->num_rx_rings;
|
||||
|
||||
/* Verify user input. */
|
||||
for (i = 0; i < reta_entries; i++)
|
||||
if (indir[i] >= max_queues)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < reta_entries; i++)
|
||||
tp->rss_indir_tbl[i] = indir[i];
|
||||
}
|
||||
|
||||
/* Fill out the rss hash key */
|
||||
if (key)
|
||||
memcpy(tp->rss_key, key, rtl8125_get_rxfh_key_size(dev));
|
||||
|
||||
rtl8125_store_reta(tp);
|
||||
|
||||
rtl8125_store_rss_key(tp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 rtl8125_get_rx_desc_hash(struct rtl8125_private *tp,
|
||||
struct RxDescV3 *descv3)
|
||||
{
|
||||
return le32_to_cpu(descv3->RxDescNormalDDWord2.RSSResult);
|
||||
}
|
||||
|
||||
#define RXS_8125B_RSS_UDP BIT(9)
|
||||
#define RXS_8125_RSS_IPV4 BIT(10)
|
||||
#define RXS_8125_RSS_IPV6 BIT(12)
|
||||
#define RXS_8125_RSS_TCP BIT(13)
|
||||
#define RTL8125_RXS_RSS_L3_TYPE_MASK (RXS_8125_RSS_IPV4 | RXS_8125_RSS_IPV6)
|
||||
#define RTL8125_RXS_RSS_L4_TYPE_MASK (RXS_8125_RSS_TCP | RXS_8125B_RSS_UDP)
|
||||
void rtl8125_rx_hash(struct rtl8125_private *tp,
|
||||
struct RxDescV3 *descv3,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
u16 rss_header_info;
|
||||
|
||||
if (!(tp->dev->features & NETIF_F_RXHASH))
|
||||
return;
|
||||
|
||||
rss_header_info = le16_to_cpu(descv3->RxDescNormalDDWord2.HeaderInfo);
|
||||
|
||||
if (!(rss_header_info & RTL8125_RXS_RSS_L3_TYPE_MASK))
|
||||
return;
|
||||
|
||||
skb_set_hash(skb, rtl8125_get_rx_desc_hash(tp, descv3),
|
||||
(RTL8125_RXS_RSS_L4_TYPE_MASK & rss_header_info) ?
|
||||
PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3);
|
||||
}
|
||||
|
||||
void rtl8125_disable_rss(struct rtl8125_private *tp)
|
||||
{
|
||||
RTL_W32(tp, RSS_CTRL_8125, 0x00);
|
||||
}
|
||||
|
||||
void _rtl8125_config_rss(struct rtl8125_private *tp)
|
||||
{
|
||||
_rtl8125_set_rss_hash_opt(tp);
|
||||
|
||||
rtl8125_store_reta(tp);
|
||||
|
||||
rtl8125_store_rss_key(tp);
|
||||
}
|
||||
|
||||
void rtl8125_config_rss(struct rtl8125_private *tp)
|
||||
{
|
||||
if (!tp->EnableRss) {
|
||||
rtl8125_disable_rss(tp);
|
||||
return;
|
||||
}
|
||||
|
||||
_rtl8125_config_rss(tp);
|
||||
}
|
||||
|
||||
void rtl8125_init_rss(struct rtl8125_private *tp)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < rtl8125_rss_indir_tbl_entries(tp); i++)
|
||||
tp->rss_indir_tbl[i] = ethtool_rxfh_indir_default(i, tp->num_rx_rings);
|
||||
|
||||
netdev_rss_key_fill(tp->rss_key, RTL8125_RSS_KEY_SIZE);
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#ifndef _LINUX_rtl8125_RSS_H
|
||||
#define _LINUX_rtl8125_RSS_H
|
||||
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define RTL8125_RSS_KEY_SIZE 40 /* size of RSS Hash Key in bytes */
|
||||
#define RTL8125_MAX_INDIRECTION_TABLE_ENTRIES 128
|
||||
|
||||
enum rtl8125_rss_flag {
|
||||
RTL_8125_RSS_FLAG_HASH_UDP_IPV4 = (1 << 0),
|
||||
RTL_8125_RSS_FLAG_HASH_UDP_IPV6 = (1 << 1),
|
||||
};
|
||||
|
||||
struct rtl8125_private;
|
||||
|
||||
int rtl8125_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
||||
u32 *rule_locs);
|
||||
int rtl8125_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd);
|
||||
u32 rtl8125_get_rxfh_key_size(struct net_device *netdev);
|
||||
u32 rtl8125_rss_indir_size(struct net_device *netdev);
|
||||
int rtl8125_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
|
||||
u8 *hfunc);
|
||||
int rtl8125_set_rxfh(struct net_device *netdev, const u32 *indir,
|
||||
const u8 *key, const u8 hfunc);
|
||||
void rtl8125_rx_hash(struct rtl8125_private *tp,
|
||||
struct RxDescV3 *descv3,
|
||||
struct sk_buff *skb);
|
||||
void _rtl8125_config_rss(struct rtl8125_private *tp);
|
||||
void rtl8125_config_rss(struct rtl8125_private *tp);
|
||||
void rtl8125_init_rss(struct rtl8125_private *tp);
|
||||
u32 rtl8125_rss_indir_tbl_entries(struct rtl8125_private *tp);
|
||||
void rtl8125_disable_rss(struct rtl8125_private *tp);
|
||||
|
||||
#endif /* _LINUX_rtl8125_RSS_H */
|
||||
@@ -1,289 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
|
||||
#include "r8125.h"
|
||||
#include "rtl_eeprom.h"
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
//rtl8125_eeprom_type():
|
||||
// tell the eeprom type
|
||||
//return value:
|
||||
// 0: the eeprom type is 93C46
|
||||
// 1: the eeprom type is 93C56 or 93C66
|
||||
//-------------------------------------------------------------------
|
||||
void rtl8125_eeprom_type(struct rtl8125_private *tp)
|
||||
{
|
||||
u16 magic = 0;
|
||||
|
||||
if (tp->mcfg == CFG_METHOD_DEFAULT)
|
||||
goto out_no_eeprom;
|
||||
|
||||
if(RTL_R8(tp, 0xD2)&0x04) {
|
||||
//not support
|
||||
//tp->eeprom_type = EEPROM_TWSI;
|
||||
//tp->eeprom_len = 256;
|
||||
goto out_no_eeprom;
|
||||
} else if(RTL_R32(tp, RxConfig) & RxCfg_9356SEL) {
|
||||
tp->eeprom_type = EEPROM_TYPE_93C56;
|
||||
tp->eeprom_len = 256;
|
||||
} else {
|
||||
tp->eeprom_type = EEPROM_TYPE_93C46;
|
||||
tp->eeprom_len = 128;
|
||||
}
|
||||
|
||||
magic = rtl8125_eeprom_read_sc(tp, 0);
|
||||
|
||||
out_no_eeprom:
|
||||
if ((magic != 0x8129) && (magic != 0x8128)) {
|
||||
tp->eeprom_type = EEPROM_TYPE_NONE;
|
||||
tp->eeprom_len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void rtl8125_eeprom_cleanup(struct rtl8125_private *tp)
|
||||
{
|
||||
u8 x;
|
||||
|
||||
x = RTL_R8(tp, Cfg9346);
|
||||
x &= ~(Cfg9346_EEDI | Cfg9346_EECS);
|
||||
|
||||
RTL_W8(tp, Cfg9346, x);
|
||||
|
||||
rtl8125_raise_clock(tp, &x);
|
||||
rtl8125_lower_clock(tp, &x);
|
||||
}
|
||||
|
||||
int rtl8125_eeprom_cmd_done(struct rtl8125_private *tp)
|
||||
{
|
||||
u8 x;
|
||||
int i;
|
||||
|
||||
rtl8125_stand_by(tp);
|
||||
|
||||
for (i = 0; i < 50000; i++) {
|
||||
x = RTL_R8(tp, Cfg9346);
|
||||
|
||||
if (x & Cfg9346_EEDO) {
|
||||
udelay(RTL_CLOCK_RATE * 2 * 3);
|
||||
return 0;
|
||||
}
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
//rtl8125_eeprom_read_sc():
|
||||
// read one word from eeprom
|
||||
//-------------------------------------------------------------------
|
||||
u16 rtl8125_eeprom_read_sc(struct rtl8125_private *tp, u16 reg)
|
||||
{
|
||||
int addr_sz = 6;
|
||||
u8 x;
|
||||
u16 data;
|
||||
|
||||
if(tp->eeprom_type == EEPROM_TYPE_NONE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tp->eeprom_type==EEPROM_TYPE_93C46)
|
||||
addr_sz = 6;
|
||||
else if (tp->eeprom_type==EEPROM_TYPE_93C56)
|
||||
addr_sz = 8;
|
||||
|
||||
x = Cfg9346_EEM1 | Cfg9346_EECS;
|
||||
RTL_W8(tp, Cfg9346, x);
|
||||
|
||||
rtl8125_shift_out_bits(tp, RTL_EEPROM_READ_OPCODE, 3);
|
||||
rtl8125_shift_out_bits(tp, reg, addr_sz);
|
||||
|
||||
data = rtl8125_shift_in_bits(tp);
|
||||
|
||||
rtl8125_eeprom_cleanup(tp);
|
||||
|
||||
RTL_W8(tp, Cfg9346, 0);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
//rtl8125_eeprom_write_sc():
|
||||
// write one word to a specific address in the eeprom
|
||||
//-------------------------------------------------------------------
|
||||
void rtl8125_eeprom_write_sc(struct rtl8125_private *tp, u16 reg, u16 data)
|
||||
{
|
||||
u8 x;
|
||||
int addr_sz = 6;
|
||||
int w_dummy_addr = 4;
|
||||
|
||||
if(tp->eeprom_type == EEPROM_TYPE_NONE) {
|
||||
return ;
|
||||
}
|
||||
|
||||
if (tp->eeprom_type==EEPROM_TYPE_93C46) {
|
||||
addr_sz = 6;
|
||||
w_dummy_addr = 4;
|
||||
} else if (tp->eeprom_type==EEPROM_TYPE_93C56) {
|
||||
addr_sz = 8;
|
||||
w_dummy_addr = 6;
|
||||
}
|
||||
|
||||
x = Cfg9346_EEM1 | Cfg9346_EECS;
|
||||
RTL_W8(tp, Cfg9346, x);
|
||||
|
||||
rtl8125_shift_out_bits(tp, RTL_EEPROM_EWEN_OPCODE, 5);
|
||||
rtl8125_shift_out_bits(tp, reg, w_dummy_addr);
|
||||
rtl8125_stand_by(tp);
|
||||
|
||||
rtl8125_shift_out_bits(tp, RTL_EEPROM_ERASE_OPCODE, 3);
|
||||
rtl8125_shift_out_bits(tp, reg, addr_sz);
|
||||
if (rtl8125_eeprom_cmd_done(tp) < 0) {
|
||||
return;
|
||||
}
|
||||
rtl8125_stand_by(tp);
|
||||
|
||||
rtl8125_shift_out_bits(tp, RTL_EEPROM_WRITE_OPCODE, 3);
|
||||
rtl8125_shift_out_bits(tp, reg, addr_sz);
|
||||
rtl8125_shift_out_bits(tp, data, 16);
|
||||
if (rtl8125_eeprom_cmd_done(tp) < 0) {
|
||||
return;
|
||||
}
|
||||
rtl8125_stand_by(tp);
|
||||
|
||||
rtl8125_shift_out_bits(tp, RTL_EEPROM_EWDS_OPCODE, 5);
|
||||
rtl8125_shift_out_bits(tp, reg, w_dummy_addr);
|
||||
|
||||
rtl8125_eeprom_cleanup(tp);
|
||||
RTL_W8(tp, Cfg9346, 0);
|
||||
}
|
||||
|
||||
void rtl8125_raise_clock(struct rtl8125_private *tp, u8 *x)
|
||||
{
|
||||
*x = *x | Cfg9346_EESK;
|
||||
RTL_W8(tp, Cfg9346, *x);
|
||||
udelay(RTL_CLOCK_RATE);
|
||||
}
|
||||
|
||||
void rtl8125_lower_clock(struct rtl8125_private *tp, u8 *x)
|
||||
{
|
||||
|
||||
*x = *x & ~Cfg9346_EESK;
|
||||
RTL_W8(tp, Cfg9346, *x);
|
||||
udelay(RTL_CLOCK_RATE);
|
||||
}
|
||||
|
||||
void rtl8125_shift_out_bits(struct rtl8125_private *tp, int data, int count)
|
||||
{
|
||||
u8 x;
|
||||
int mask;
|
||||
|
||||
mask = 0x01 << (count - 1);
|
||||
x = RTL_R8(tp, Cfg9346);
|
||||
x &= ~(Cfg9346_EEDI | Cfg9346_EEDO);
|
||||
|
||||
do {
|
||||
if (data & mask)
|
||||
x |= Cfg9346_EEDI;
|
||||
else
|
||||
x &= ~Cfg9346_EEDI;
|
||||
|
||||
RTL_W8(tp, Cfg9346, x);
|
||||
udelay(RTL_CLOCK_RATE);
|
||||
rtl8125_raise_clock(tp, &x);
|
||||
rtl8125_lower_clock(tp, &x);
|
||||
mask = mask >> 1;
|
||||
} while(mask);
|
||||
|
||||
x &= ~Cfg9346_EEDI;
|
||||
RTL_W8(tp, Cfg9346, x);
|
||||
}
|
||||
|
||||
u16 rtl8125_shift_in_bits(struct rtl8125_private *tp)
|
||||
{
|
||||
u8 x;
|
||||
u16 d, i;
|
||||
|
||||
x = RTL_R8(tp, Cfg9346);
|
||||
x &= ~(Cfg9346_EEDI | Cfg9346_EEDO);
|
||||
|
||||
d = 0;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
d = d << 1;
|
||||
rtl8125_raise_clock(tp, &x);
|
||||
|
||||
x = RTL_R8(tp, Cfg9346);
|
||||
x &= ~Cfg9346_EEDI;
|
||||
|
||||
if (x & Cfg9346_EEDO)
|
||||
d |= 1;
|
||||
|
||||
rtl8125_lower_clock(tp, &x);
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
void rtl8125_stand_by(struct rtl8125_private *tp)
|
||||
{
|
||||
u8 x;
|
||||
|
||||
x = RTL_R8(tp, Cfg9346);
|
||||
x &= ~(Cfg9346_EECS | Cfg9346_EESK);
|
||||
RTL_W8(tp, Cfg9346, x);
|
||||
udelay(RTL_CLOCK_RATE);
|
||||
|
||||
x |= Cfg9346_EECS;
|
||||
RTL_W8(tp, Cfg9346, x);
|
||||
}
|
||||
|
||||
void rtl8125_set_eeprom_sel_low(struct rtl8125_private *tp)
|
||||
{
|
||||
RTL_W8(tp, Cfg9346, Cfg9346_EEM1);
|
||||
RTL_W8(tp, Cfg9346, Cfg9346_EEM1 | Cfg9346_EESK);
|
||||
|
||||
udelay(20);
|
||||
|
||||
RTL_W8(tp, Cfg9346, Cfg9346_EEM1);
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
//EEPROM opcodes
|
||||
#define RTL_EEPROM_READ_OPCODE 06
|
||||
#define RTL_EEPROM_WRITE_OPCODE 05
|
||||
#define RTL_EEPROM_ERASE_OPCODE 07
|
||||
#define RTL_EEPROM_EWEN_OPCODE 19
|
||||
#define RTL_EEPROM_EWDS_OPCODE 16
|
||||
|
||||
#define RTL_CLOCK_RATE 3
|
||||
|
||||
void rtl8125_eeprom_type(struct rtl8125_private *tp);
|
||||
void rtl8125_eeprom_cleanup(struct rtl8125_private *tp);
|
||||
u16 rtl8125_eeprom_read_sc(struct rtl8125_private *tp, u16 reg);
|
||||
void rtl8125_eeprom_write_sc(struct rtl8125_private *tp, u16 reg, u16 data);
|
||||
void rtl8125_shift_out_bits(struct rtl8125_private *tp, int data, int count);
|
||||
u16 rtl8125_shift_in_bits(struct rtl8125_private *tp);
|
||||
void rtl8125_raise_clock(struct rtl8125_private *tp, u8 *x);
|
||||
void rtl8125_lower_clock(struct rtl8125_private *tp, u8 *x);
|
||||
void rtl8125_stand_by(struct rtl8125_private *tp);
|
||||
void rtl8125_set_eeprom_sel_low(struct rtl8125_private *tp);
|
||||
@@ -1,320 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include "r8125.h"
|
||||
#include "rtl_eeprom.h"
|
||||
#include "rtltool.h"
|
||||
|
||||
int rtl8125_tool_ioctl(struct rtl8125_private *tp, struct ifreq *ifr)
|
||||
{
|
||||
struct rtltool_cmd my_cmd;
|
||||
int ret;
|
||||
|
||||
if (copy_from_user(&my_cmd, ifr->ifr_data, sizeof(my_cmd)))
|
||||
return -EFAULT;
|
||||
|
||||
ret = 0;
|
||||
switch (my_cmd.cmd) {
|
||||
case RTLTOOL_READ_MAC:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (my_cmd.len==1)
|
||||
my_cmd.data = readb(tp->mmio_addr+my_cmd.offset);
|
||||
else if (my_cmd.len==2)
|
||||
my_cmd.data = readw(tp->mmio_addr+(my_cmd.offset&~1));
|
||||
else if (my_cmd.len==4)
|
||||
my_cmd.data = readl(tp->mmio_addr+(my_cmd.offset&~3));
|
||||
else {
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case RTLTOOL_WRITE_MAC:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (my_cmd.len==1)
|
||||
writeb(my_cmd.data, tp->mmio_addr+my_cmd.offset);
|
||||
else if (my_cmd.len==2)
|
||||
writew(my_cmd.data, tp->mmio_addr+(my_cmd.offset&~1));
|
||||
else if (my_cmd.len==4)
|
||||
writel(my_cmd.data, tp->mmio_addr+(my_cmd.offset&~3));
|
||||
else {
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RTLTOOL_READ_PHY:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
my_cmd.data = rtl8125_mdio_prot_read(tp, my_cmd.offset);
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RTLTOOL_WRITE_PHY:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
rtl8125_mdio_prot_write(tp, my_cmd.offset, my_cmd.data);
|
||||
break;
|
||||
|
||||
case RTLTOOL_READ_EPHY:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
my_cmd.data = rtl8125_ephy_read(tp, my_cmd.offset);
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RTLTOOL_WRITE_EPHY:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
rtl8125_ephy_write(tp, my_cmd.offset, my_cmd.data);
|
||||
break;
|
||||
|
||||
case RTLTOOL_READ_ERI:
|
||||
my_cmd.data = 0;
|
||||
if (my_cmd.len==1 || my_cmd.len==2 || my_cmd.len==4) {
|
||||
my_cmd.data = rtl8125_eri_read(tp, my_cmd.offset, my_cmd.len, ERIAR_ExGMAC);
|
||||
} else {
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RTLTOOL_WRITE_ERI:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (my_cmd.len==1 || my_cmd.len==2 || my_cmd.len==4) {
|
||||
rtl8125_eri_write(tp, my_cmd.offset, my_cmd.len, my_cmd.data, ERIAR_ExGMAC);
|
||||
} else {
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case RTLTOOL_READ_PCI:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
my_cmd.data = 0;
|
||||
if (my_cmd.len==1)
|
||||
pci_read_config_byte(tp->pci_dev, my_cmd.offset,
|
||||
(u8 *)&my_cmd.data);
|
||||
else if (my_cmd.len==2)
|
||||
pci_read_config_word(tp->pci_dev, my_cmd.offset,
|
||||
(u16 *)&my_cmd.data);
|
||||
else if (my_cmd.len==4)
|
||||
pci_read_config_dword(tp->pci_dev, my_cmd.offset,
|
||||
&my_cmd.data);
|
||||
else {
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case RTLTOOL_WRITE_PCI:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (my_cmd.len==1)
|
||||
pci_write_config_byte(tp->pci_dev, my_cmd.offset,
|
||||
my_cmd.data);
|
||||
else if (my_cmd.len==2)
|
||||
pci_write_config_word(tp->pci_dev, my_cmd.offset,
|
||||
my_cmd.data);
|
||||
else if (my_cmd.len==4)
|
||||
pci_write_config_dword(tp->pci_dev, my_cmd.offset,
|
||||
my_cmd.data);
|
||||
else {
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RTLTOOL_READ_EEPROM:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
my_cmd.data = rtl8125_eeprom_read_sc(tp, my_cmd.offset);
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RTLTOOL_WRITE_EEPROM:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
rtl8125_eeprom_write_sc(tp, my_cmd.offset, my_cmd.data);
|
||||
break;
|
||||
|
||||
case RTL_READ_OOB_MAC:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
rtl8125_oob_mutex_lock(tp);
|
||||
my_cmd.data = rtl8125_ocp_read(tp, my_cmd.offset, 4);
|
||||
rtl8125_oob_mutex_unlock(tp);
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case RTL_WRITE_OOB_MAC:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (my_cmd.len == 0 || my_cmd.len > 4)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
rtl8125_oob_mutex_lock(tp);
|
||||
rtl8125_ocp_write(tp, my_cmd.offset, my_cmd.len, my_cmd.data);
|
||||
rtl8125_oob_mutex_unlock(tp);
|
||||
break;
|
||||
|
||||
case RTL_ENABLE_PCI_DIAG:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
tp->rtk_enable_diag = 1;
|
||||
|
||||
dprintk("enable rtk diag\n");
|
||||
break;
|
||||
|
||||
case RTL_DISABLE_PCI_DIAG:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
tp->rtk_enable_diag = 0;
|
||||
|
||||
dprintk("disable rtk diag\n");
|
||||
break;
|
||||
|
||||
case RTL_READ_MAC_OCP:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (my_cmd.offset % 2)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
my_cmd.data = rtl8125_mac_ocp_read(tp, my_cmd.offset);
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case RTL_WRITE_MAC_OCP:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if ((my_cmd.offset % 2) || (my_cmd.len != 2))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
rtl8125_mac_ocp_write(tp, my_cmd.offset, (u16)my_cmd.data);
|
||||
break;
|
||||
|
||||
case RTL_DIRECT_READ_PHY_OCP:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
my_cmd.data = rtl8125_mdio_prot_direct_read_phy_ocp(tp, my_cmd.offset);
|
||||
if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) {
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RTL_DIRECT_WRITE_PHY_OCP:
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
rtl8125_mdio_prot_direct_write_phy_ocp(tp, my_cmd.offset, my_cmd.data);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
################################################################################
|
||||
#
|
||||
# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet
|
||||
# controllers with PCI-Express interface.
|
||||
#
|
||||
# Copyright(c) 2022 Realtek Semiconductor Corp. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author:
|
||||
# Realtek NIC software team <nicfae@realtek.com>
|
||||
# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* This product is covered by one or more of the following patents:
|
||||
* US6,570,884, US6,115,776, and US6,327,625.
|
||||
***********************************************************************************/
|
||||
|
||||
#ifndef _LINUX_RTLTOOL_H
|
||||
#define _LINUX_RTLTOOL_H
|
||||
|
||||
#define SIOCRTLTOOL SIOCDEVPRIVATE+1
|
||||
|
||||
enum rtl_cmd {
|
||||
RTLTOOL_READ_MAC=0,
|
||||
RTLTOOL_WRITE_MAC,
|
||||
RTLTOOL_READ_PHY,
|
||||
RTLTOOL_WRITE_PHY,
|
||||
RTLTOOL_READ_EPHY,
|
||||
RTLTOOL_WRITE_EPHY,
|
||||
RTLTOOL_READ_ERI,
|
||||
RTLTOOL_WRITE_ERI,
|
||||
RTLTOOL_READ_PCI,
|
||||
RTLTOOL_WRITE_PCI,
|
||||
RTLTOOL_READ_EEPROM,
|
||||
RTLTOOL_WRITE_EEPROM,
|
||||
|
||||
RTL_READ_OOB_MAC,
|
||||
RTL_WRITE_OOB_MAC,
|
||||
|
||||
RTL_ENABLE_PCI_DIAG,
|
||||
RTL_DISABLE_PCI_DIAG,
|
||||
|
||||
RTL_READ_MAC_OCP,
|
||||
RTL_WRITE_MAC_OCP,
|
||||
|
||||
RTL_DIRECT_READ_PHY_OCP,
|
||||
RTL_DIRECT_WRITE_PHY_OCP,
|
||||
|
||||
RTLTOOL_INVALID
|
||||
};
|
||||
|
||||
struct rtltool_cmd {
|
||||
__u32 cmd;
|
||||
__u32 offset;
|
||||
__u32 len;
|
||||
__u32 data;
|
||||
};
|
||||
|
||||
enum mode_access {
|
||||
MODE_NONE=0,
|
||||
MODE_READ,
|
||||
MODE_WRITE
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
int rtl8125_tool_ioctl(struct rtl8125_private *tp, struct ifreq *ifr);
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_RTLTOOL_H */
|
||||
@@ -8,19 +8,17 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8152
|
||||
PKG_VERSION:=2.15.20211119
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=2.16.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/wget/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=b7926db3b4ca71d453ac1cf875d7a8ab409ece108edc6913e8bc1c0c3b99179d
|
||||
|
||||
PKG_HASH:=2be6a02f6e29485efd107bb7e777ad3c482d9db0ff7e5e6c5ef034a1557a395b
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-linux-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/usb-net-rtl8152-vendor
|
||||
@@ -37,20 +35,8 @@ define KernelPackage/usb-net-rtl8152-vendor/description
|
||||
Kernel module for Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
|
||||
endef
|
||||
|
||||
R8152_MAKEOPTS= -C $(PKG_BUILD_DIR) \
|
||||
PATH="$(TARGET_PATH)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
TARGET="$(HAL_TARGET)" \
|
||||
TOOLPREFIX="$(KERNEL_CROSS)" \
|
||||
TOOLPATH="$(KERNEL_CROSS)" \
|
||||
KERNELPATH="$(LINUX_DIR)" \
|
||||
KERNELDIR="$(LINUX_DIR)" \
|
||||
LDOPTS=" " \
|
||||
DOMULTI=1
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) $(R8152_MAKEOPTS) modules
|
||||
+$(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-net-rtl8152-vendor))
|
||||
|
||||
@@ -22,8 +22,8 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -9804,6 +9805,22 @@ static void rtl_tally_reset(struct r8152
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
|
||||
@@ -10107,6 +10108,22 @@ static void rtl_disable_spi(struct r8152
|
||||
ocp_write_word(tp, MCU_TYPE_USB, 0xcbf0, ocp_data);
|
||||
}
|
||||
|
||||
+static int r8152_led_configuration(struct r8152 *tp)
|
||||
@@ -45,7 +45,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
static void r8152b_init(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -9865,6 +9882,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
@@ -10168,6 +10185,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
||||
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
}
|
||||
|
||||
static void r8153_init(struct r8152 *tp)
|
||||
@@ -10008,6 +10027,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
@@ -10311,6 +10330,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
tp->coalesce = COALESCE_SLOW;
|
||||
break;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
}
|
||||
|
||||
static void r8153b_init(struct r8152 *tp)
|
||||
@@ -10098,6 +10119,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
@@ -10413,6 +10434,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
rtl_tally_reset(tp);
|
||||
|
||||
tp->coalesce = 15000; /* 15 us */
|
||||
|
||||
@@ -7,14 +7,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8168
|
||||
PKG_VERSION:=8.049.02
|
||||
PKG_VERSION:=8.050.03
|
||||
PKG_RELEASE:=$(AUTORELEAE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/BROBIRD/openwrt-r8168.git
|
||||
PKG_SOURCE_DATE:=2021-10-08
|
||||
PKG_SOURCE_VERSION:=2b969c15afe403a685fc7ee069620782241e3ad6
|
||||
PKG_MIRROR_HASH:=e4632c10d460f005eff76da8a183d7ff0c8819b0d099872589b7b06a9b8d9952
|
||||
PKG_SOURCE_VERSION:=ddfaceacd1b7ed2857fb995642a8ffb1fc37e989
|
||||
PKG_MIRROR_HASH:=5428f60dc33e9503c6cfdf690c00077149dce24cbb0591129d905b9f1aad9202
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -23482,6 +23483,22 @@ rtl8168_set_bios_setting(struct net_devi
|
||||
@@ -24643,6 +24644,22 @@ rtl8168_set_bios_setting(struct net_devi
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
static void
|
||||
rtl8168_init_software_variable(struct net_device *dev)
|
||||
{
|
||||
@@ -24000,6 +24017,8 @@ rtl8168_init_software_variable(struct ne
|
||||
@@ -25206,6 +25223,8 @@ rtl8168_init_software_variable(struct ne
|
||||
tp->NotWrMcuPatchCode = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libmnl
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=1.0.5
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:= \
|
||||
http://www.netfilter.org/projects/libmnl/files \
|
||||
ftp://ftp.netfilter.org/pub/libmnl
|
||||
PKG_HASH:=171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81
|
||||
PKG_HASH:=274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libnfnetlink
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=1.0.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:= \
|
||||
http://www.netfilter.org/projects/libnfnetlink/files/ \
|
||||
ftp://ftp.netfilter.org/pub/libnfnetlink/
|
||||
PKG_HASH:=f270e19de9127642d2a11589ef2ec97ef90a649a74f56cf9a96306b04817b51a
|
||||
PKG_HASH:=b064c7c3d426efb4786e60a8e6859b82ee2f2c5e49ffeea640cfe4fe33cbc376
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
--- a/include/libnfnetlink/libnfnetlink.h
|
||||
+++ b/include/libnfnetlink/libnfnetlink.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#define aligned_u64 unsigned long long __attribute__((aligned(8)))
|
||||
#endif
|
||||
|
||||
+#include <sys/types.h>
|
||||
#include <sys/socket.h> /* for sa_family_t */
|
||||
#include <linux/netlink.h>
|
||||
#include <libnfnetlink/linux_nfnetlink.h>
|
||||
--- a/include/libnfnetlink/linux_nfnetlink.h
|
||||
+++ b/include/libnfnetlink/linux_nfnetlink.h
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef _NFNETLINK_H
|
||||
#define _NFNETLINK_H
|
||||
-#include <linux/types.h>
|
||||
+#include <sys/types.h>
|
||||
#include <libnfnetlink/linux_nfnetlink_compat.h>
|
||||
|
||||
enum nfnetlink_groups {
|
||||
@@ -67,7 +67,7 @@ define Package/libubox-lua
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
||||
CMAKE_OPTIONS = \
|
||||
CMAKE_OPTIONS += \
|
||||
-DLUAPATH=/usr/lib/lua \
|
||||
-DABIVERSION="$(PKG_ABI_VERSION)"
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ $(call Package/mbedtls/Default)
|
||||
CATEGORY:=Libraries
|
||||
SUBMENU:=SSL
|
||||
TITLE+= (library)
|
||||
PKGFLAGS:=nonshared
|
||||
ABI_VERSION:=12
|
||||
endef
|
||||
|
||||
@@ -67,13 +68,11 @@ config LIBMBEDTLS_HAVE_ARMV8CE_AES
|
||||
bool
|
||||
default y
|
||||
prompt "Enable use of the ARMv8 Crypto Extensions"
|
||||
depends on aarch64 && !TARGET_bcm27xx && !TARGET_bcm4908
|
||||
depends on aarch64 && !TARGET_bcm27xx
|
||||
help
|
||||
Use of the ARMv8 Crypto Extensions greatly increase performance
|
||||
(up to 4x faster on AES-GCM while 10x faster on raw AES).
|
||||
|
||||
Related instructions should be included in all modern Aarch64
|
||||
devices, except some wastes like Broadcom.
|
||||
If you don't sure, say Y here.
|
||||
|
||||
config LIBMBEDTLS_HAVE_SSE2
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_BASE:=1.1.1
|
||||
PKG_BUGFIX:=n
|
||||
PKG_BUGFIX:=q
|
||||
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
@@ -28,7 +28,7 @@ PKG_SOURCE_URL:= \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
|
||||
|
||||
PKG_HASH:=40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a
|
||||
PKG_HASH:=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
|
||||
PKG_LICENSE:=OpenSSL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -23,7 +23,7 @@ diff --git a/crypto/init.c b/crypto/init.c
|
||||
index 1b0d523bea..ee3e2eb075 100644
|
||||
--- a/crypto/init.c
|
||||
+++ b/crypto/init.c
|
||||
@@ -329,18 +329,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
|
||||
@@ -328,18 +328,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
|
||||
engine_load_openssl_int();
|
||||
return 1;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ index 1b0d523bea..ee3e2eb075 100644
|
||||
|
||||
# ifndef OPENSSL_NO_RDRAND
|
||||
static CRYPTO_ONCE engine_rdrand = CRYPTO_ONCE_STATIC_INIT;
|
||||
@@ -365,6 +353,18 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_dynamic)
|
||||
@@ -364,6 +352,18 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_dynamic)
|
||||
return 1;
|
||||
}
|
||||
# ifndef OPENSSL_NO_STATIC_ENGINE
|
||||
@@ -61,7 +61,7 @@ index 1b0d523bea..ee3e2eb075 100644
|
||||
# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
|
||||
static CRYPTO_ONCE engine_padlock = CRYPTO_ONCE_STATIC_INIT;
|
||||
DEFINE_RUN_ONCE_STATIC(ossl_init_engine_padlock)
|
||||
@@ -713,11 +713,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
|
||||
@@ -704,11 +704,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
|
||||
if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
|
||||
&& !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
|
||||
return 0;
|
||||
@@ -73,7 +73,7 @@ index 1b0d523bea..ee3e2eb075 100644
|
||||
# ifndef OPENSSL_NO_RDRAND
|
||||
if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
|
||||
&& !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
|
||||
@@ -727,6 +722,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
|
||||
@@ -718,6 +713,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
|
||||
&& !RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
|
||||
return 0;
|
||||
# ifndef OPENSSL_NO_STATIC_ENGINE
|
||||
|
||||
@@ -43,6 +43,7 @@ config WOLFSSL_HAS_OCSP
|
||||
config WOLFSSL_HAS_WPAS
|
||||
bool "Include wpa_supplicant support"
|
||||
select WOLFSSL_HAS_ARC4
|
||||
select WOLFSSL_HAS_DH
|
||||
select WOLFSSL_HAS_OCSP
|
||||
select WOLFSSL_HAS_SESSION_TICKET
|
||||
default y
|
||||
@@ -58,13 +59,25 @@ config WOLFSSL_ALT_NAMES
|
||||
config WOLFSSL_HAS_DEVCRYPTO
|
||||
bool
|
||||
|
||||
config WOLFSSL_ASM_CAPABLE
|
||||
bool
|
||||
default x86_64 || (aarch64 && !TARGET_bcm27xx)
|
||||
|
||||
choice
|
||||
prompt "Hardware Acceleration"
|
||||
default WOLFSSL_HAS_CPU_CRYPTO if WOLFSSL_ASM_CAPABLE
|
||||
default WOLFSSL_HAS_NO_HW
|
||||
|
||||
config WOLFSSL_HAS_NO_HW
|
||||
bool "None"
|
||||
|
||||
config WOLFSSL_HAS_CPU_CRYPTO
|
||||
bool "Use CPU crypto instructions"
|
||||
depends on WOLFSSL_ASM_CAPABLE
|
||||
help
|
||||
This will use Intel AESNI insturctions or armv8 Crypto Extensions.
|
||||
Either of them should easily outperform hardware crypto in WolfSSL.
|
||||
|
||||
config WOLFSSL_HAS_AFALG
|
||||
bool "AF_ALG"
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=5.2.0-stable
|
||||
PKG_VERSION:=5.3.0-stable
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=409b4646c5f54f642de0e9f3544c3b83de7238134f5b1ff93fb44527bf119d05
|
||||
PKG_HASH:=1a3bb310dc01d3e73d9ad91b6ea8249d081016f8eef4ae8f21d3421f91ef1de9
|
||||
|
||||
PKG_FIXUP:=libtool libtool-abiver
|
||||
PKG_INSTALL:=1
|
||||
@@ -25,25 +25,42 @@ PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
|
||||
PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl
|
||||
|
||||
PKG_CONFIG_DEPENDS:=\
|
||||
CONFIG_WOLFSSL_HAS_AES_CCM CONFIG_WOLFSSL_HAS_AFALG \
|
||||
CONFIG_WOLFSSL_HAS_ARC4 CONFIG_WOLFSSL_HAS_CHACHA_POLY \
|
||||
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL \
|
||||
CONFIG_WOLFSSL_HAS_DH CONFIG_WOLFSSL_HAS_DTLS \
|
||||
CONFIG_WOLFSSL_HAS_ECC25519 CONFIG_WOLFSSL_HAS_OCSP \
|
||||
CONFIG_WOLFSSL_HAS_SESSION_TICKET CONFIG_WOLFSSL_HAS_TLSV10 \
|
||||
CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_HAS_CERTGEN \
|
||||
CONFIG_WOLFSSL_ALT_NAMES
|
||||
CONFIG_WOLFSSL_HAS_AES_CCM \
|
||||
CONFIG_WOLFSSL_HAS_ARC4 \
|
||||
CONFIG_WOLFSSL_HAS_CERTGEN \
|
||||
CONFIG_WOLFSSL_HAS_CHACHA_POLY \
|
||||
CONFIG_WOLFSSL_HAS_DH \
|
||||
CONFIG_WOLFSSL_HAS_DTLS \
|
||||
CONFIG_WOLFSSL_HAS_ECC25519 \
|
||||
CONFIG_WOLFSSL_HAS_OCSP \
|
||||
CONFIG_WOLFSSL_ALT_NAMES \
|
||||
CONFIG_WOLFSSL_HAS_SESSION_TICKET \
|
||||
CONFIG_WOLFSSL_HAS_TLSV10 \
|
||||
CONFIG_WOLFSSL_HAS_TLSV13 \
|
||||
CONFIG_WOLFSSL_HAS_WPAS
|
||||
|
||||
PKG_ABI_VERSION=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||
|
||||
PKG_CONFIG_DEPENDS+=\
|
||||
CONFIG_WOLFSSL_HAS_AFALG \
|
||||
CONFIG_WOLFSSL_HAS_CPU_CRYPTO \
|
||||
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \
|
||||
CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \
|
||||
CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libwolfssl
|
||||
define Package/libwolfssl/Default
|
||||
SECTION:=libs
|
||||
SUBMENU:=SSL
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=wolfSSL library
|
||||
URL:=http://www.wolfssl.com/
|
||||
endef
|
||||
|
||||
define Package/libwolfssl
|
||||
$(call Package/libwolfssl/Default)
|
||||
TITLE:=wolfSSL library
|
||||
PKGFLAGS:=nonshared
|
||||
MENU:=1
|
||||
PROVIDES:=libcyassl
|
||||
DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
|
||||
@@ -59,6 +76,16 @@ define Package/libwolfssl/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libwolfssl-benchmark
|
||||
$(call Package/libwolfssl/Default)
|
||||
TITLE:=wolfSSL Benchmark Utility
|
||||
DEPENDS:=libwolfssl
|
||||
endef
|
||||
|
||||
define Package/libwolfssl-benchmark/description
|
||||
This is the wolfssl benchmark utility.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
$(FPIC) \
|
||||
-fomit-frame-pointer \
|
||||
@@ -77,7 +104,7 @@ CONFIGURE_ARGS += \
|
||||
--enable-sni \
|
||||
--enable-stunnel \
|
||||
--enable-altcertchains \
|
||||
--disable-crypttests \
|
||||
--$(if $(CONFIG_PACKAGE_libwolfssl-benchmark),enable,disable)-crypttests \
|
||||
--disable-examples \
|
||||
--disable-jobserver \
|
||||
--$(if $(CONFIG_IPV6),enable,disable)-ipv6 \
|
||||
@@ -107,6 +134,15 @@ CONFIGURE_ARGS += \
|
||||
--enable-wpas --enable-fortress --enable-fastmath
|
||||
endif
|
||||
|
||||
ifdef CONFIG_WOLFSSL_HAS_CPU_CRYPTO
|
||||
ifdef CONFIG_aarch64
|
||||
CONFIGURE_ARGS += --enable-armasm
|
||||
TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
|
||||
else ifdef CONFIG_TARGET_x86_64
|
||||
CONFIGURE_ARGS += --enable-intelasm
|
||||
endif
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||
@@ -124,4 +160,10 @@ define Package/libwolfssl/install
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libwolfssl-benchmark/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/wolfcrypt/benchmark/.libs/benchmark $(1)/usr/bin/wolfssl-benchmark
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libwolfssl))
|
||||
$(eval $(call BuildPackage,libwolfssl-benchmark))
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From 9ba77300f9f5dea9f53aed00bf6c33d10b7b2fce Mon Sep 17 00:00:00 2001
|
||||
From: Sean Parkinson <sean@wolfssl.com>
|
||||
Date: Thu, 7 Jul 2022 09:30:48 +1000
|
||||
Subject: [PATCH] AESNI: fix configure to use minimal compiler flags
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index df97ac75c..6abb0c744 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2142,21 +2142,19 @@ then
|
||||
if test "$ENABLED_AESNI" = "yes" || test "$ENABLED_INTELASM" = "yes"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AESNI"
|
||||
- if test "$GCC" = "yes"
|
||||
+ if test "$CC" != "icc"
|
||||
then
|
||||
- # clang needs these flags
|
||||
- if test "$CC" = "clang"
|
||||
- then
|
||||
- AM_CFLAGS="$AM_CFLAGS -maes -mpclmul"
|
||||
- else
|
||||
- # GCC needs these flags, icc doesn't
|
||||
- # opt levels greater than 2 may cause problems on systems w/o
|
||||
- # aesni
|
||||
- if test "$CC" != "icc"
|
||||
- then
|
||||
- AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul"
|
||||
- fi
|
||||
- fi
|
||||
+ case $host_os in
|
||||
+ mingw*)
|
||||
+ # Windows uses intrinsics for GCM which uses SSE4 instructions.
|
||||
+ # MSVC has own build files.
|
||||
+ AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ # Intrinsics used in AES_set_decrypt_key (TODO: rework)
|
||||
+ AM_CFLAGS="$AM_CFLAGS -maes"
|
||||
+ ;;
|
||||
+ esac
|
||||
fi
|
||||
AS_IF([test "x$ENABLED_AESGCM" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"])
|
||||
fi
|
||||
@@ -1,24 +0,0 @@
|
||||
From 87e43dd63ba429297e439f2dfd1ee8b45981e18b Mon Sep 17 00:00:00 2001
|
||||
From: Juliusz Sosinowicz <juliusz@wolfssl.com>
|
||||
Date: Sat, 12 Feb 2022 00:34:24 +0100
|
||||
Subject: [PATCH] Reported in ZD13631
|
||||
|
||||
`ssl->peerVerifyRet` wasn't being cleared when retrying with an alternative cert chain
|
||||
|
||||
References: https://github.com/wolfSSL/wolfssl/issues/4879
|
||||
---
|
||||
src/internal.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/src/internal.c
|
||||
+++ b/src/internal.c
|
||||
@@ -12342,6 +12342,9 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte*
|
||||
}
|
||||
|
||||
ret = 0; /* clear errors and continue */
|
||||
+ #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||
+ ssl->peerVerifyRet = 0;
|
||||
+ #endif
|
||||
args->verifyErr = 0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firewall
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=1.1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
|
||||
|
||||
@@ -55,13 +55,11 @@ config rule
|
||||
option target ACCEPT
|
||||
|
||||
# Allow DHCPv6 replies
|
||||
# see https://dev.openwrt.org/ticket/10381
|
||||
# see https://github.com/openwrt/openwrt/issues/5066
|
||||
config rule
|
||||
option name Allow-DHCPv6
|
||||
option src wan
|
||||
option proto udp
|
||||
option src_ip fc00::/6
|
||||
option dest_ip fc00::/6
|
||||
option dest_port 546
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From df1306a96127e91ff2d513a0a67345baaf61d113 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Eckert <fe@dev.tdt.de>
|
||||
Date: Fri, 19 Nov 2021 09:51:02 +0100
|
||||
Subject: [PATCH] firewall3: fix locking issue
|
||||
|
||||
By calling the command 'fw3 reload' several times at the same time, I
|
||||
noticed that the locking was not working properly. It happened from time
|
||||
to time that some firewall rules were present twice in the system!
|
||||
|
||||
By removing the 'unlink' systemcall, this error no longer occurred on my
|
||||
systems.
|
||||
|
||||
Since fw3 does not run as a service, it makes no sense to delete this
|
||||
lock file every time a filehandler is no longer open on this lock file,
|
||||
because fw3 binary is not running.
|
||||
|
||||
If fw3 does run as a service then we can remove this lock file on
|
||||
service stop. But this is not the case for fw3.
|
||||
|
||||
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
||||
---
|
||||
utils.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/utils.c b/utils.c
|
||||
index 17d5bf9..92e966c 100644
|
||||
--- a/utils.c
|
||||
+++ b/utils.c
|
||||
@@ -397,7 +397,6 @@ fw3_unlock_path(int *fd, const char *lockpath)
|
||||
warn("Cannot release exclusive lock: %s", strerror(errno));
|
||||
|
||||
close(*fd);
|
||||
- unlink(FW3_LOCKFILE);
|
||||
|
||||
*fd = -1;
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
@@ -21,6 +21,8 @@ config dnsmasq
|
||||
#list bogusnxdomain '64.94.110.11'
|
||||
option localservice 1 # disable to allow DNS requests from non-local subnets
|
||||
option filter_aaaa 0
|
||||
option cachesize 8000
|
||||
option mini_ttl 3600
|
||||
option dns_redirect 1
|
||||
option ednspacket_max 1232
|
||||
|
||||
|
||||
@@ -424,9 +424,19 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -350,6 +353,9 @@ void hostapd_handle_radio_measurement(st
|
||||
mgmt->u.action.u.rrm.action, MAC2STR(mgmt->sa));
|
||||
|
||||
switch (mgmt->u.action.u.rrm.action) {
|
||||
+ case WLAN_RRM_LINK_MEASUREMENT_REPORT:
|
||||
+ hostapd_ubus_handle_link_measurement(hapd, buf, len);
|
||||
+ break;
|
||||
case WLAN_RRM_RADIO_MEASUREMENT_REPORT:
|
||||
hostapd_handle_radio_msmt_report(hapd, buf, len);
|
||||
break;
|
||||
--- a/src/ap/wnm_ap.c
|
||||
+++ b/src/ap/wnm_ap.c
|
||||
@@ -463,7 +463,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
@@ -461,7 +461,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
size_t len)
|
||||
{
|
||||
u8 dialog_token, status_code, bss_termination_delay;
|
||||
@@ -435,7 +445,7 @@
|
||||
int enabled = hapd->conf->bss_transition;
|
||||
struct sta_info *sta;
|
||||
|
||||
@@ -510,6 +510,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
@@ -508,6 +508,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
wpa_printf(MSG_DEBUG, "WNM: not enough room for Target BSSID field");
|
||||
return;
|
||||
}
|
||||
@@ -443,7 +453,7 @@
|
||||
sta->agreed_to_steer = 1;
|
||||
eloop_cancel_timeout(ap_sta_reset_steer_flag_timer, hapd, sta);
|
||||
eloop_register_timeout(2, 0, ap_sta_reset_steer_flag_timer,
|
||||
@@ -529,6 +530,10 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
@@ -527,6 +528,10 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
MAC2STR(addr), status_code, bss_termination_delay);
|
||||
}
|
||||
|
||||
|
||||
@@ -896,6 +896,7 @@ hostapd_rrm_print_nr(struct hostapd_neighbor_entry *nr)
|
||||
enum {
|
||||
BSS_MGMT_EN_NEIGHBOR,
|
||||
BSS_MGMT_EN_BEACON,
|
||||
BSS_MGMT_EN_LINK_MEASUREMENT,
|
||||
#ifdef CONFIG_WNM_AP
|
||||
BSS_MGMT_EN_BSS_TRANSITION,
|
||||
#endif
|
||||
@@ -923,6 +924,14 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
|
||||
WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
|
||||
WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
|
||||
|
||||
if (bss->radio_measurements[0] & flags == flags)
|
||||
return false;
|
||||
|
||||
bss->radio_measurements[0] |= (u8) flags;
|
||||
return true;
|
||||
case BSS_MGMT_EN_LINK_MEASUREMENT:
|
||||
flags = WLAN_RRM_CAPS_LINK_MEASUREMENT;
|
||||
|
||||
if (bss->radio_measurements[0] & flags == flags)
|
||||
return false;
|
||||
|
||||
@@ -960,6 +969,7 @@ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
|
||||
static const struct blobmsg_policy bss_mgmt_enable_policy[__BSS_MGMT_EN_MAX] = {
|
||||
[BSS_MGMT_EN_NEIGHBOR] = { "neighbor_report", BLOBMSG_TYPE_BOOL },
|
||||
[BSS_MGMT_EN_BEACON] = { "beacon_report", BLOBMSG_TYPE_BOOL },
|
||||
[BSS_MGMT_EN_LINK_MEASUREMENT] = { "link_measurement", BLOBMSG_TYPE_BOOL },
|
||||
#ifdef CONFIG_WNM_AP
|
||||
[BSS_MGMT_EN_BSS_TRANSITION] = { "bss_transition", BLOBMSG_TYPE_BOOL },
|
||||
#endif
|
||||
@@ -1238,6 +1248,98 @@ hostapd_rrm_beacon_req(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
return 0;
|
||||
}
|
||||
|
||||
enum {
|
||||
LM_REQ_ADDR,
|
||||
LM_REQ_TX_POWER_USED,
|
||||
LM_REQ_TX_POWER_MAX,
|
||||
__LM_REQ_MAX,
|
||||
};
|
||||
|
||||
static const struct blobmsg_policy lm_req_policy[__LM_REQ_MAX] = {
|
||||
[LM_REQ_ADDR] = { "addr", BLOBMSG_TYPE_STRING },
|
||||
[LM_REQ_TX_POWER_USED] = { "tx-power-used", BLOBMSG_TYPE_INT32 },
|
||||
[LM_REQ_TX_POWER_MAX] = { "tx-power-max", BLOBMSG_TYPE_INT32 },
|
||||
};
|
||||
|
||||
static int
|
||||
hostapd_rrm_lm_req(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
struct ubus_request_data *ureq, const char *method,
|
||||
struct blob_attr *msg)
|
||||
{
|
||||
struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
|
||||
struct blob_attr *tb[__LM_REQ_MAX];
|
||||
struct wpabuf *buf;
|
||||
u8 addr[ETH_ALEN];
|
||||
int ret;
|
||||
int8_t txp_used, txp_max;
|
||||
|
||||
txp_used = 0;
|
||||
txp_max = 0;
|
||||
|
||||
blobmsg_parse(lm_req_policy, __LM_REQ_MAX, tb, blob_data(msg), blob_len(msg));
|
||||
|
||||
if (!tb[LM_REQ_ADDR])
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
if (tb[LM_REQ_TX_POWER_USED])
|
||||
txp_used = (int8_t) blobmsg_get_u32(tb[LM_REQ_TX_POWER_USED]);
|
||||
|
||||
if (tb[LM_REQ_TX_POWER_MAX])
|
||||
txp_max = (int8_t) blobmsg_get_u32(tb[LM_REQ_TX_POWER_MAX]);
|
||||
|
||||
if (hwaddr_aton(blobmsg_data(tb[LM_REQ_ADDR]), addr))
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
buf = wpabuf_alloc(5);
|
||||
if (!buf)
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
|
||||
wpabuf_put_u8(buf, WLAN_ACTION_RADIO_MEASUREMENT);
|
||||
wpabuf_put_u8(buf, WLAN_RRM_LINK_MEASUREMENT_REQUEST);
|
||||
wpabuf_put_u8(buf, 1);
|
||||
/* TX-Power used */
|
||||
wpabuf_put_u8(buf, txp_used);
|
||||
/* Max TX Power */
|
||||
wpabuf_put_u8(buf, txp_max);
|
||||
|
||||
ret = hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr,
|
||||
wpabuf_head(buf), wpabuf_len(buf));
|
||||
|
||||
wpabuf_free(buf);
|
||||
if (ret < 0)
|
||||
return -ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void hostapd_ubus_handle_link_measurement(struct hostapd_data *hapd, const u8 *data, size_t len)
|
||||
{
|
||||
const struct ieee80211_mgmt *mgmt = (const struct ieee80211_mgmt *) data;
|
||||
const u8 *pos, *end;
|
||||
u8 token;
|
||||
|
||||
end = data + len;
|
||||
token = mgmt->u.action.u.rrm.dialog_token;
|
||||
pos = mgmt->u.action.u.rrm.variable;
|
||||
|
||||
if (end - pos < 8)
|
||||
return;
|
||||
|
||||
if (!hapd->ubus.obj.has_subscribers)
|
||||
return;
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
blobmsg_add_macaddr(&b, "address", mgmt->sa);
|
||||
blobmsg_add_u16(&b, "dialog-token", token);
|
||||
blobmsg_add_u16(&b, "rx-antenna-id", pos[4]);
|
||||
blobmsg_add_u16(&b, "tx-antenna-id", pos[5]);
|
||||
blobmsg_add_u16(&b, "rcpi", pos[6]);
|
||||
blobmsg_add_u16(&b, "rsni", pos[7]);
|
||||
|
||||
ubus_notify(ctx, &hapd->ubus.obj, "link-measurement-report", b.head, -1);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_WNM_AP
|
||||
|
||||
@@ -1431,6 +1533,7 @@ static const struct ubus_method bss_methods[] = {
|
||||
UBUS_METHOD_NOARG("rrm_nr_list", hostapd_rrm_nr_list),
|
||||
UBUS_METHOD("rrm_nr_set", hostapd_rrm_nr_set, nr_set_policy),
|
||||
UBUS_METHOD("rrm_beacon_req", hostapd_rrm_beacon_req, beacon_req_policy),
|
||||
UBUS_METHOD("link_measurement_req", hostapd_rrm_lm_req, lm_req_policy),
|
||||
#ifdef CONFIG_WNM_AP
|
||||
UBUS_METHOD("wnm_disassoc_imminent", hostapd_wnm_disassoc_imminent, wnm_disassoc_policy),
|
||||
UBUS_METHOD("bss_transition_request", hostapd_bss_transition_request, bss_tr_policy),
|
||||
|
||||
@@ -45,6 +45,7 @@ void hostapd_ubus_add_bss(struct hostapd_data *hapd);
|
||||
void hostapd_ubus_free_bss(struct hostapd_data *hapd);
|
||||
|
||||
int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_request *req);
|
||||
void hostapd_ubus_handle_link_measurement(struct hostapd_data *hapd, const u8 *data, size_t len);
|
||||
void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *mac);
|
||||
void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
|
||||
const u8 *addr, u8 token, u8 rep_mode,
|
||||
@@ -83,6 +84,10 @@ static inline int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct ho
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void hostapd_ubus_handle_link_measurement(struct hostapd_data *hapd, const u8 *data, size_t len)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *mac)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ endif
|
||||
|
||||
TARGET_LDFLAGS += -lcrypt
|
||||
|
||||
CMAKE_OPTIONS = -DTLS_SUPPORT=on
|
||||
CMAKE_OPTIONS += -DTLS_SUPPORT=on
|
||||
|
||||
define Package/uhttpd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libiwinfo
|
||||
PKG_RELEASE:=2.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
|
||||
PKG_SOURCE_DATE:=2021-04-30
|
||||
PKG_SOURCE_VERSION:=c45f0b584b4b86f8250f90ea19afca271c114fa2
|
||||
PKG_MIRROR_HASH:=24ad04791254a0523cd15a4fec6116d9ff121e006c93e5e41459f91347b33ec2
|
||||
PKG_SOURCE_DATE:=2022-04-26
|
||||
PKG_SOURCE_VERSION:=dc6847eb5ec8747867bc20f1024723c6397c1df7
|
||||
PKG_MIRROR_HASH:=3f243cf75f4cec02e9e8ecc2087577146845346c0172808f64dea066f84f88d4
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -105,7 +105,7 @@ endef
|
||||
|
||||
define Package/libiwinfo-data/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/libiwinfo
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hardware.txt $(1)/usr/share/libiwinfo/devices.txt
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/devices.txt $(1)/usr/share/libiwinfo/devices.txt
|
||||
endef
|
||||
|
||||
define Package/iwinfo/install
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From a0a0e02dd91d14a50155390d5fd3b95d6ec87bf4 Mon Sep 17 00:00:00 2001
|
||||
From: Jo-Philipp Wich <jo@mein.io>
|
||||
Date: Sun, 11 Jul 2021 15:56:35 +0200
|
||||
Subject: [PATCH] iwinfo: rename hardware.txt to devices.txt
|
||||
|
||||
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
||||
---
|
||||
include/iwinfo.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/iwinfo.h b/include/iwinfo.h
|
||||
index f7097cc..8469ee7 100644
|
||||
--- a/include/iwinfo.h
|
||||
+++ b/include/iwinfo.h
|
||||
@@ -255,7 +255,7 @@ struct iwinfo_hardware_entry {
|
||||
|
||||
extern const struct iwinfo_iso3166_label IWINFO_ISO3166_NAMES[];
|
||||
|
||||
-#define IWINFO_HARDWARE_FILE "/usr/share/libiwinfo/hardware.txt"
|
||||
+#define IWINFO_HARDWARE_FILE "/usr/share/libiwinfo/devices.txt"
|
||||
|
||||
|
||||
struct iwinfo_ops {
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ca-certificates
|
||||
PKG_VERSION:=20210119
|
||||
PKG_VERSION:=20211016
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
|
||||
PKG_HASH:=daa3afae563711c30a0586ddae4336e8e3974c2b627faaca404c4e0141b64665
|
||||
PKG_HASH:=2ae9b6dc5f40c25d6d7fe55e07b54f12a8967d1955d3b7b2f42ee46266eeef88
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 3c51cb5ff1d0db41fb3288fb555c7e7055cf3e86 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Wed, 1 Dec 2021 14:41:31 +0100
|
||||
Subject: [PATCH] ca-certificates: fix python3-cryptography woes in
|
||||
certdata2pem.py
|
||||
|
||||
reverts the code portion of the Debian's ca-certificate
|
||||
commit 033d52259172 ("mozilla/certdata2pem.py: print a warning for expired certificates.")
|
||||
|
||||
It broke builds with the popular Ubuntu 20.04 (focal) releases.
|
||||
This was due to them shipping with an older python3-cryptography
|
||||
version which is not compatible.
|
||||
|
||||
More concerns were raised by jow- as well:
|
||||
"We don't want the build to depend on the local system time anyway."
|
||||
|
||||
Reported-by: Chen Minqiang <ptpt52@gmail.com>
|
||||
Reported-by: Shane Synan <digitalcircuit36939@gmail.com>
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
--- a/work/mozilla/certdata2pem.py
|
||||
+++ b/work/mozilla/certdata2pem.py
|
||||
@@ -21,16 +21,12 @@
|
||||
# USA.
|
||||
|
||||
import base64
|
||||
-import datetime
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
import textwrap
|
||||
import io
|
||||
|
||||
-from cryptography import x509
|
||||
-
|
||||
-
|
||||
objects = []
|
||||
|
||||
# Dirty file parser.
|
||||
@@ -121,13 +117,6 @@ for obj in objects:
|
||||
if obj['CKA_CLASS'] == 'CKO_CERTIFICATE':
|
||||
if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]:
|
||||
continue
|
||||
-
|
||||
- cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
|
||||
- if cert.not_valid_after < datetime.datetime.now():
|
||||
- print('!'*74)
|
||||
- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
|
||||
- print('!'*74)
|
||||
-
|
||||
bname = obj['CKA_LABEL'][1:-1].replace('/', '_')\
|
||||
.replace(' ', '_')\
|
||||
.replace('(', '=')\
|
||||
@@ -79,14 +79,14 @@ define Package/block-mount
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Block device mounting and checking
|
||||
DEPENDS:=+ubox +libubox +libuci +libblobmsg-json +libjson-c
|
||||
DEPENDS:=+ubox +libubox +libuci +libblobmsg-json +libjson-c +fstools
|
||||
endef
|
||||
|
||||
define Package/blockd
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Block device automounting
|
||||
DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4 +libblobmsg-json +libjson-c
|
||||
DEPENDS:=+block-mount +libubus +kmod-fs-autofs4 +libblobmsg-json +libjson-c
|
||||
endef
|
||||
|
||||
define Package/fstools/install
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
From: Qi Liu <liuqi_colin@msn.com>
|
||||
|
||||
In order to support extroot, block extroot command has to be able to
|
||||
discover and properly mount the rootfs_data volume in order to discover
|
||||
the extroot volume. Currently this process can only discover MTD devices.
|
||||
This patch leverages libfstools in a similar way as mount_root to
|
||||
discover, initialize, and mount rootfs_data volume. It would enable any
|
||||
device with non-MTD rootfs_data volume to support extroot, including x86.
|
||||
|
||||
Signed-off-by: Qi Liu <liuqi_colin@msn.com>
|
||||
---
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -75,9 +75,9 @@ INSTALL(TARGETS blockd RUNTIME DESTINATION sbin)
|
||||
ADD_EXECUTABLE(block block.c probe.c probe-libblkid.c)
|
||||
IF(DEFINED CMAKE_UBIFS_EXTROOT)
|
||||
ADD_DEFINITIONS(-DUBIFS_EXTROOT)
|
||||
- TARGET_LINK_LIBRARIES(block blkid-tiny dl uci ubox ubus blobmsg_json ubi-utils ${json})
|
||||
+ TARGET_LINK_LIBRARIES(block blkid-tiny dl fstools uci ubox ubus blobmsg_json ubi-utils ${json})
|
||||
ELSE(DEFINED CMAKE_UBIFS_EXTROOT)
|
||||
- TARGET_LINK_LIBRARIES(block blkid-tiny dl uci ubox ubus blobmsg_json ${json})
|
||||
+ TARGET_LINK_LIBRARIES(block blkid-tiny dl fstools uci ubox ubus blobmsg_json ${json})
|
||||
ENDIF(DEFINED CMAKE_UBIFS_EXTROOT)
|
||||
INSTALL(TARGETS block RUNTIME DESTINATION sbin)
|
||||
|
||||
--- a/block.c
|
||||
+++ b/block.c
|
||||
@@ -46,6 +46,9 @@
|
||||
#include <libubox/vlist.h>
|
||||
#include <libubus.h>
|
||||
|
||||
+#include "libfstools/fstype.h"
|
||||
+#include "libfstools/volume.h"
|
||||
+
|
||||
#include "probe.h"
|
||||
|
||||
#define AUTOFS_MOUNT_PATH "/tmp/run/blockd/"
|
||||
@@ -1579,6 +1582,44 @@ static int main_extroot(int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
+ /* Find volume using libfstools */
|
||||
+ struct volume *data = volume_find("rootfs_data");
|
||||
+ if (data) {
|
||||
+ volume_init(data);
|
||||
+
|
||||
+ switch (volume_identify(data)) {
|
||||
+ case FS_EXT4: {
|
||||
+ char cfg[] = "/tmp/ext4_cfg";
|
||||
+
|
||||
+ /* Mount volume and try extroot (using fstab from that vol) */
|
||||
+ mkdir_p(cfg, 0755);
|
||||
+ if (!mount(data->blk, cfg, "ext4", MS_NOATIME, NULL)) {
|
||||
+ err = mount_extroot(cfg);
|
||||
+ umount2(cfg, MNT_DETACH);
|
||||
+ }
|
||||
+ if (err < 0)
|
||||
+ rmdir("/tmp/overlay");
|
||||
+ rmdir(cfg);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ case FS_F2FS: {
|
||||
+ char cfg[] = "/tmp/f2fs_cfg";
|
||||
+
|
||||
+ /* Mount volume and try extroot (using fstab from that vol) */
|
||||
+ mkdir_p(cfg, 0755);
|
||||
+ if (!mount(data->blk, cfg, "f2fs", MS_NOATIME, NULL)) {
|
||||
+ err = mount_extroot(cfg);
|
||||
+ umount2(cfg, MNT_DETACH);
|
||||
+ }
|
||||
+ if (err < 0)
|
||||
+ rmdir("/tmp/overlay");
|
||||
+ rmdir(cfg);
|
||||
+ return err;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* As a last resort look for /etc/config/fstab on "rootfs" partition */
|
||||
return mount_extroot(NULL);
|
||||
}
|
||||
--- /dev/null
|
||||
+++ b/libfstools/fstype.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef _FS_TYPE_H__
|
||||
+#define _FS_TYPE_H__
|
||||
+enum {
|
||||
+ FS_NONE,
|
||||
+ FS_SNAPSHOT,
|
||||
+ FS_JFFS2,
|
||||
+ FS_DEADCODE,
|
||||
+ FS_UBIFS,
|
||||
+ FS_F2FS,
|
||||
+ FS_EXT4,
|
||||
+};
|
||||
+#endif
|
||||
--- a/libfstools/libfstools.h
|
||||
+++ b/libfstools/libfstools.h
|
||||
@@ -18,19 +18,10 @@
|
||||
#include <libubox/blob.h>
|
||||
#include <libubox/ulog.h>
|
||||
#include <libubox/utils.h>
|
||||
+#include "fstype.h"
|
||||
|
||||
struct volume;
|
||||
|
||||
-enum {
|
||||
- FS_NONE,
|
||||
- FS_SNAPSHOT,
|
||||
- FS_JFFS2,
|
||||
- FS_DEADCODE,
|
||||
- FS_UBIFS,
|
||||
- FS_F2FS,
|
||||
- FS_EXT4,
|
||||
-};
|
||||
-
|
||||
enum fs_state {
|
||||
FS_STATE_UNKNOWN,
|
||||
FS_STATE_PENDING,
|
||||
@@ -53,7 +53,7 @@ endef
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -flto
|
||||
TARGET_LDFLAGS += -flto
|
||||
|
||||
CMAKE_OPTIONS = \
|
||||
CMAKE_OPTIONS += \
|
||||
-DLUAPATH=/usr/lib/lua \
|
||||
-DABIVERSION="$(PKG_ABI_VERSION)"
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ endef
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
||||
TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
|
||||
|
||||
CMAKE_OPTIONS = \
|
||||
CMAKE_OPTIONS += \
|
||||
-DLUAPATH=/usr/lib/lua \
|
||||
$(if $(DEBUG),-DUCI_DEBUG=ON)
|
||||
|
||||
|
||||
7
rules.mk
7
rules.mk
@@ -62,7 +62,6 @@ ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))
|
||||
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
|
||||
SUBTARGET:=$(call qstrip,$(CONFIG_TARGET_SUBTARGET))
|
||||
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
|
||||
export EXTRA_OPTIMIZATION:=$(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)))
|
||||
TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
|
||||
BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
|
||||
SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
||||
@@ -339,6 +338,12 @@ else
|
||||
$(SCRIPT_DIR)/rstrip.sh
|
||||
endif
|
||||
|
||||
NINJA = \
|
||||
MAKEFLAGS="$(MAKE_JOBSERVER)" \
|
||||
$(STAGING_DIR_HOST)/bin/ninja \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),-v) \
|
||||
$(if $(MAKE_JOBSERVER),,-j1)
|
||||
|
||||
ifeq ($(CONFIG_IPV6),y)
|
||||
DISABLE_IPV6:=
|
||||
else
|
||||
|
||||
@@ -276,7 +276,6 @@ foreach my $mirror (@ARGV) {
|
||||
}
|
||||
|
||||
# push @mirrors, 'https://mirror01.download.immortalwrt.eu.org';
|
||||
# push @mirrors, 'https://mirror02.download.immortalwrt.eu.org';
|
||||
push @mirrors, 'https://mirror2.immortalwrt.org/sources';
|
||||
push @mirrors, 'https://mirror.immortalwrt.org/sources';
|
||||
push @mirrors, 'https://sources.immortalwrt.org';
|
||||
|
||||
@@ -6,7 +6,7 @@ endef
|
||||
define Device/wd_mybooklive
|
||||
DEVICE_VENDOR := Western Digital
|
||||
DEVICE_MODEL := My Book Live Series (Single + Duo)
|
||||
DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic-wolfssl
|
||||
DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic-openssl
|
||||
SUPPORTED_DEVICES += mbl wd,mybooklive-duo
|
||||
BLOCKSIZE := 1k
|
||||
DTB_SIZE := 16384
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
BOARDNAME:=Devices with NAND flash (Routers)
|
||||
FEATURES += nand pcie
|
||||
|
||||
DEFAULT_PACKAGES += kmod-ath9k swconfig wpad-basic-wolfssl
|
||||
DEFAULT_PACKAGES += kmod-ath9k swconfig wpad-basic-openssl
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for APM821XX boards with NAND flash.
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
From ba068938e629eb1a8b423a54405233e685cedb78 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ba068938e629eb1a8b423a54405233e685cedb78.1647594132.git.chunkeey@gmail.com>
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Thu, 17 Mar 2022 21:29:28 +0100
|
||||
Subject: [PATCH v1 1/2] ata: sata_dwc_460ex: Fix crash due to OOB write
|
||||
To: linux-ide@vger.kernel.org
|
||||
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
|
||||
Jens Axboe <axboe@kernel.dk>,
|
||||
Tejun Heo <tj@kernel.org>,
|
||||
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
|
||||
the driver uses libata's "tag" values from in various arrays.
|
||||
Since the mentioned patch bumped the ATA_TAG_INTERNAL to 32,
|
||||
the value of the SATA_DWC_QCMD_MAX needs to be bumped to 33.
|
||||
|
||||
Otherwise ATA_TAG_INTERNAL cause a crash like this:
|
||||
|
||||
| BUG: Kernel NULL pointer dereference at 0x00000000
|
||||
| Faulting instruction address: 0xc03ed4b8
|
||||
| Oops: Kernel access of bad area, sig: 11 [#1]
|
||||
| BE PAGE_SIZE=4K PowerPC 44x Platform
|
||||
| CPU: 0 PID: 362 Comm: scsi_eh_1 Not tainted 5.4.163 #0
|
||||
| NIP: c03ed4b8 LR: c03d27e8 CTR: c03ed36c
|
||||
| REGS: cfa59950 TRAP: 0300 Not tainted (5.4.163)
|
||||
| MSR: 00021000 <CE,ME> CR: 42000222 XER: 00000000
|
||||
| DEAR: 00000000 ESR: 00000000
|
||||
| GPR00: c03d27e8 cfa59a08 cfa55fe0 00000000 0fa46bc0 [...]
|
||||
| [..]
|
||||
| NIP [c03ed4b8] sata_dwc_qc_issue+0x14c/0x254
|
||||
| LR [c03d27e8] ata_qc_issue+0x1c8/0x2dc
|
||||
| Call Trace:
|
||||
| [cfa59a08] [c003f4e0] __cancel_work_timer+0x124/0x194 (unreliable)
|
||||
| [cfa59a78] [c03d27e8] ata_qc_issue+0x1c8/0x2dc
|
||||
| [cfa59a98] [c03d2b3c] ata_exec_internal_sg+0x240/0x524
|
||||
| [cfa59b08] [c03d2e98] ata_exec_internal+0x78/0xe0
|
||||
| [cfa59b58] [c03d30fc] ata_read_log_page.part.38+0x1dc/0x204
|
||||
| [cfa59bc8] [c03d324c] ata_identify_page_supported+0x68/0x130
|
||||
| [...]
|
||||
|
||||
this is because sata_dwc_dma_xfer_complete() NULLs the
|
||||
dma_pending's next neighbour "chan" (a *dma_chan struct) in
|
||||
this '32' case right here (line ~735):
|
||||
> hsdevp->dma_pending[tag] = SATA_DWC_DMA_PENDING_NONE;
|
||||
|
||||
Then the next time, a dma gets issued; dma_dwc_xfer_setup() passes
|
||||
the NULL'd hsdevp->chan to the dmaengine_slave_config() which then
|
||||
causes the crash.
|
||||
|
||||
Reported-by: ticerex (OpenWrt Forum)
|
||||
Fixes: 28361c403683c ("libata: add extra internal command")
|
||||
Cc: stable@kernel.org # 4.18+
|
||||
Link: https://forum.openwrt.org/t/my-book-live-duo-reboot-loop/122464
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
--- a/drivers/ata/sata_dwc_460ex.c
|
||||
+++ b/drivers/ata/sata_dwc_460ex.c
|
||||
@@ -145,7 +145,7 @@ struct sata_dwc_device {
|
||||
#endif
|
||||
};
|
||||
|
||||
-#define SATA_DWC_QCMD_MAX 32
|
||||
+#define SATA_DWC_QCMD_MAX 33
|
||||
|
||||
struct sata_dwc_device_port {
|
||||
struct sata_dwc_device *hsdev;
|
||||
@@ -23,7 +23,7 @@ produce a noisy warning.
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -427,10 +427,14 @@ static int xhci_try_enable_msi(struct us
|
||||
@@ -425,10 +425,14 @@ static int xhci_try_enable_msi(struct us
|
||||
free_irq(hcd->irq, hcd);
|
||||
hcd->irq = 0;
|
||||
|
||||
@@ -43,7 +43,7 @@ produce a noisy warning.
|
||||
hcd->msi_enabled = 1;
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1887,6 +1887,7 @@ struct xhci_hcd {
|
||||
@@ -1890,6 +1890,7 @@ struct xhci_hcd {
|
||||
struct xhci_hub usb2_rhub;
|
||||
struct xhci_hub usb3_rhub;
|
||||
/* support xHCI 1.0 spec USB2 hardware LPM */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
define Profile/Default
|
||||
NAME:=Default Profile
|
||||
PRIORITY:=1
|
||||
PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic-wolfssl
|
||||
PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic-openssl
|
||||
endef
|
||||
|
||||
define Profile/Default/Description
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
define Profile/Default
|
||||
NAME:=Default Profile (all drivers)
|
||||
PACKAGES:= kmod-usb-ohci kmod-usb2 kmod-ath9k-htc wpad-basic-wolfssl
|
||||
PACKAGES:= kmod-usb-ohci kmod-usb2 kmod-ath9k-htc wpad-basic-openssl
|
||||
endef
|
||||
|
||||
define Profile/Default/Description
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
define Profile/Default
|
||||
NAME:=Default Profile (all drivers)
|
||||
PACKAGES:= kmod-usb2 kmod-ath9k-htc wpad-basic-wolfssl
|
||||
PACKAGES:= kmod-usb2 kmod-ath9k-htc wpad-basic-openssl
|
||||
endef
|
||||
|
||||
define Profile/Default/Description
|
||||
|
||||
@@ -17,6 +17,6 @@ endef
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl kmod-ath5k swconfig kmod-gpio-button-hotplug
|
||||
DEFAULT_PACKAGES += wpad-basic-openssl kmod-ath5k swconfig kmod-gpio-button-hotplug
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@@ -408,10 +408,6 @@ wd,mynet-wifi-rangeextender)
|
||||
xiaomi,aiot-ac2350)
|
||||
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
|
||||
;;
|
||||
xwrt,csac)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
|
||||
;;
|
||||
yuncore,a770)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10"
|
||||
|
||||
@@ -267,8 +267,7 @@ ath79_setup_interfaces()
|
||||
iodata,wn-ac1600dgr2|\
|
||||
iodata,wn-ag300dgr|\
|
||||
pcs,cr5000|\
|
||||
wd,mynet-n750|\
|
||||
xwrt,csac)
|
||||
wd,mynet-n750)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
;;
|
||||
@@ -666,11 +665,6 @@ ath79_setup_macs()
|
||||
xiaomi,aiot-ac2350)
|
||||
lan_mac=$(mtd_get_mac_binary art 0x1002)
|
||||
;;
|
||||
xwrt,csac)
|
||||
wan_mac=$(mtd_get_mac_binary art 0)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
zyxel,nbg6616)
|
||||
label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
;;
|
||||
|
||||
@@ -243,7 +243,6 @@ case "$FIRMWARE" in
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
|
||||
;;
|
||||
xwrt,csac|\
|
||||
yuncore,a782|\
|
||||
yuncore,xd4200)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
BOARDNAME:=Generic
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
DEFAULT_PACKAGES += wpad-basic-openssl
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for generic Atheros AR71xx/AR913x/AR934x based boards.
|
||||
|
||||
@@ -347,7 +347,7 @@ endef
|
||||
TARGET_DEVICES += ubnt_rocket-m
|
||||
|
||||
define Device/ubnt_routerstation_common
|
||||
DEVICE_PACKAGES := -kmod-ath9k -wpad-basic-wolfssl -uboot-envtools kmod-usb-ohci \
|
||||
DEVICE_PACKAGES := -kmod-ath9k -wpad-basic-openssl -uboot-envtools kmod-usb-ohci \
|
||||
kmod-usb2 fconfig
|
||||
DEVICE_VENDOR := Ubiquiti
|
||||
SOC := ar7161
|
||||
|
||||
@@ -1233,7 +1233,7 @@ define Device/hak5_lan-turtle
|
||||
TPLINK_HWID := 0x5348334c
|
||||
IMAGES := sysupgrade.bin
|
||||
DEVICE_PACKAGES := kmod-usb-chipidea2 -iwinfo -kmod-ath9k -swconfig \
|
||||
-uboot-envtools -wpad-basic-wolfssl
|
||||
-uboot-envtools -wpad-basic-openssl
|
||||
SUPPORTED_DEVICES += lan-turtle
|
||||
endef
|
||||
TARGET_DEVICES += hak5_lan-turtle
|
||||
@@ -1246,7 +1246,7 @@ define Device/hak5_packet-squirrel
|
||||
TPLINK_HWID := 0x5351524c
|
||||
IMAGES := sysupgrade.bin
|
||||
DEVICE_PACKAGES := kmod-usb-chipidea2 -iwinfo -kmod-ath9k -swconfig \
|
||||
-uboot-envtools -wpad-basic-wolfssl
|
||||
-uboot-envtools -wpad-basic-openssl
|
||||
SUPPORTED_DEVICES += packet-squirrel
|
||||
endef
|
||||
TARGET_DEVICES += hak5_packet-squirrel
|
||||
@@ -1269,7 +1269,7 @@ define Device/iodata_etg3-r
|
||||
DEVICE_VENDOR := I-O DATA
|
||||
DEVICE_MODEL := ETG3-R
|
||||
IMAGE_SIZE := 7680k
|
||||
DEVICE_PACKAGES := -iwinfo -kmod-ath9k -wpad-basic-wolfssl
|
||||
DEVICE_PACKAGES := -iwinfo -kmod-ath9k -wpad-basic-openssl
|
||||
endef
|
||||
TARGET_DEVICES += iodata_etg3-r
|
||||
|
||||
@@ -1329,7 +1329,7 @@ define Device/jjplus_ja76pf2
|
||||
SOC := ar7161
|
||||
DEVICE_VENDOR := jjPlus
|
||||
DEVICE_MODEL := JA76PF2
|
||||
DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-wolfssl -uboot-envtools fconfig
|
||||
DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-openssl -uboot-envtools fconfig
|
||||
IMAGES += kernel.bin rootfs.bin
|
||||
IMAGE/kernel.bin := append-kernel
|
||||
IMAGE/rootfs.bin := append-rootfs | pad-rootfs
|
||||
|
||||
@@ -3,7 +3,7 @@ FEATURES += minor nand
|
||||
KERNELNAME := vmlinux vmlinuz
|
||||
IMAGES_DIR := ../../..
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
DEFAULT_PACKAGES += wpad-basic-openssl
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for MikroTik devices based on Qualcomm Atheros
|
||||
|
||||
@@ -2,7 +2,7 @@ BOARDNAME := Generic devices with NAND flash
|
||||
|
||||
FEATURES += nand
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
DEFAULT_PACKAGES += wpad-basic-openssl
|
||||
|
||||
define Target/Description
|
||||
Firmware for boards using Qualcomm Atheros, MIPS-based SoCs
|
||||
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
|
||||
|
||||
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
@@ -272,6 +272,10 @@ static void fixup_use_write_buffers(stru
|
||||
@@ -276,6 +276,10 @@ static void fixup_use_write_buffers(stru
|
||||
{
|
||||
struct map_info *map = mtd->priv;
|
||||
struct cfi_private *cfi = map->fldrv_priv;
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
list_for_each_entry(p, head, list) {
|
||||
--- a/net/ipv4/tcp_output.c
|
||||
+++ b/net/ipv4/tcp_output.c
|
||||
@@ -460,48 +460,53 @@ static void tcp_options_write(__be32 *pt
|
||||
@@ -461,48 +461,53 @@ static void tcp_options_write(__be32 *pt
|
||||
u16 options = opts->options; /* mungable copy */
|
||||
|
||||
if (unlikely(OPTION_MD5 & options)) {
|
||||
@@ -382,7 +382,7 @@
|
||||
}
|
||||
|
||||
if (unlikely(opts->num_sack_blocks)) {
|
||||
@@ -509,16 +514,17 @@ static void tcp_options_write(__be32 *pt
|
||||
@@ -510,16 +515,17 @@ static void tcp_options_write(__be32 *pt
|
||||
tp->duplicate_sack : tp->selective_acks;
|
||||
int this_sack;
|
||||
|
||||
@@ -406,7 +406,7 @@
|
||||
}
|
||||
|
||||
tp->rx_opt.dsack = 0;
|
||||
@@ -531,13 +537,14 @@ static void tcp_options_write(__be32 *pt
|
||||
@@ -532,13 +538,14 @@ static void tcp_options_write(__be32 *pt
|
||||
|
||||
if (foc->exp) {
|
||||
len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
|
||||
@@ -656,8 +656,8 @@
|
||||
#include <linux/types.h>
|
||||
+#include <linux/in6.h>
|
||||
|
||||
u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
|
||||
u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
|
||||
u64 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
|
||||
u64 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
|
||||
--- a/include/uapi/linux/in.h
|
||||
+++ b/include/uapi/linux/in.h
|
||||
@@ -84,7 +84,7 @@ enum {
|
||||
@@ -706,7 +706,7 @@
|
||||
EXPORT_SYMBOL(xfrm_parse_spi);
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -3976,14 +3976,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
@@ -3980,14 +3980,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
{
|
||||
const __be32 *ptr = (const __be32 *)(th + 1);
|
||||
|
||||
@@ -799,7 +799,7 @@
|
||||
*sum = csum_fold(csum_partial(diff, sizeof(diff),
|
||||
--- a/include/linux/etherdevice.h
|
||||
+++ b/include/linux/etherdevice.h
|
||||
@@ -489,7 +489,7 @@ static inline bool is_etherdev_addr(cons
|
||||
@@ -488,7 +488,7 @@ static inline bool is_etherdev_addr(cons
|
||||
* @b: Pointer to Ethernet header
|
||||
*
|
||||
* Compare two Ethernet headers, returns 0 if equal.
|
||||
@@ -808,7 +808,7 @@
|
||||
* aligned OR the platform can handle unaligned access. This is the
|
||||
* case for all packets coming into netif_receive_skb or similar
|
||||
* entry points.
|
||||
@@ -512,11 +512,12 @@ static inline unsigned long compare_ethe
|
||||
@@ -511,11 +511,12 @@ static inline unsigned long compare_ethe
|
||||
fold |= *(unsigned long *)(a + 6) ^ *(unsigned long *)(b + 6);
|
||||
return fold;
|
||||
#else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
BOARDNAME:=Devices with small flash
|
||||
FEATURES += small_flash
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl
|
||||
DEFAULT_PACKAGES += wpad-basic-openssl
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for Atheros AR71xx/AR913x/AR934x based boards with small flash
|
||||
|
||||
@@ -18,6 +18,7 @@ CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
CONFIG_ARM64_CNP=y
|
||||
CONFIG_ARM64_CONT_SHIFT=4
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_ARM64_ERRATUM_1165522=y
|
||||
CONFIG_ARM64_ERRATUM_1286807=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
@@ -129,9 +130,13 @@ CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_CTR=y
|
||||
CONFIG_CRYPTO_CTS=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
@@ -152,7 +157,10 @@ CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64=y
|
||||
CONFIG_CRYPTO_SIMD=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
|
||||
@@ -18,6 +18,7 @@ CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
CONFIG_ARM64_CNP=y
|
||||
CONFIG_ARM64_CONT_SHIFT=4
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_ARM64_ERRATUM_1165522=y
|
||||
CONFIG_ARM64_ERRATUM_1286807=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
@@ -133,9 +134,13 @@ CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_CTR=y
|
||||
CONFIG_CRYPTO_CTS=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
@@ -156,7 +161,10 @@ CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64=y
|
||||
CONFIG_CRYPTO_SIMD=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
|
||||
@@ -77,7 +77,7 @@ define Device/rpi
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43430-sdio \
|
||||
cypress-nvram-43430-sdio-rpi-zero-w \
|
||||
kmod-brcmfmac wpad-basic-wolfssl
|
||||
kmod-brcmfmac wpad-basic-openssl
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2708)
|
||||
TARGET_DEVICES += rpi
|
||||
@@ -108,7 +108,7 @@ define Device/rpi-2
|
||||
cypress-nvram-43430-sdio-rpi-3b \
|
||||
cypress-firmware-43455-sdio \
|
||||
cypress-nvram-43455-sdio-rpi-3b-plus cypress-nvram-43455-sdio-rpi-4b \
|
||||
kmod-brcmfmac wpad-basic-wolfssl
|
||||
kmod-brcmfmac wpad-basic-openssl
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2708 | boot-2711 | sdcard-img | gzip
|
||||
endef
|
||||
@@ -137,7 +137,7 @@ define Device/rpi-3
|
||||
cypress-nvram-43430-sdio-rpi-3b \
|
||||
cypress-firmware-43455-sdio \
|
||||
cypress-nvram-43455-sdio-rpi-3b-plus \
|
||||
kmod-brcmfmac wpad-basic-wolfssl
|
||||
kmod-brcmfmac wpad-basic-openssl
|
||||
endef
|
||||
ifeq ($(SUBTARGET),bcm2710)
|
||||
TARGET_DEVICES += rpi-3
|
||||
@@ -158,7 +158,7 @@ define Device/rpi-4
|
||||
DEVICE_PACKAGES := \
|
||||
cypress-firmware-43455-sdio \
|
||||
cypress-nvram-43455-sdio-rpi-4b \
|
||||
kmod-brcmfmac wpad-basic-wolfssl
|
||||
kmod-brcmfmac wpad-basic-openssl
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-2711 | sdcard-img | gzip | append-metadata
|
||||
IMAGE/factory.img.gz := boot-common | boot-2711 | sdcard-img | gzip
|
||||
endef
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user