Merge branch 'master' of https://github.com/DifuseHQ/difos
This commit is contained in:
commit
ea5508b640
441 changed files with 7600 additions and 23862 deletions
|
@ -461,6 +461,7 @@ config KERNEL_BPF_EVENTS
|
|||
config KERNEL_BPF_KPROBE_OVERRIDE
|
||||
bool
|
||||
depends on KERNEL_KPROBES
|
||||
default n
|
||||
|
||||
config KERNEL_AIO
|
||||
bool "Compile the kernel with asynchronous IO support"
|
||||
|
|
|
@ -23,7 +23,8 @@ AM_TOOL_PATHS:= \
|
|||
LIBTOOLIZE=$(STAGING_DIR_HOST)/bin/libtoolize \
|
||||
LIBTOOL=$(STAGING_DIR_HOST)/bin/libtool \
|
||||
M4=$(STAGING_DIR_HOST)/bin/m4 \
|
||||
AUTOPOINT=true
|
||||
AUTOPOINT=true \
|
||||
GTKDOCIZE=true
|
||||
|
||||
# 1: build dir
|
||||
# 2: remove files
|
||||
|
|
|
@ -59,6 +59,7 @@ HOST_CONFIGURE_ARGS = \
|
|||
--target=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--disable-dependency-tracking \
|
||||
--program-prefix="" \
|
||||
--program-suffix="" \
|
||||
--prefix=$(HOST_BUILD_PREFIX) \
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
LINUX_VERSION-5.10 = .168
|
||||
LINUX_KERNEL_HASH-5.10.168 = b67d2596ba8d30510f743f31899c94c43eaf006a254ff44d7fc6ea26e7ab359c
|
||||
LINUX_VERSION-5.10 = .172
|
||||
LINUX_KERNEL_HASH-5.10.172 = f20dbae344df1c33cad617f7670c5e061557f592f422c842d3b30155df2927b1
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
LINUX_VERSION-5.15 = .94
|
||||
LINUX_KERNEL_HASH-5.15.94 = da9270dbe64ddf1db13c70470957ff6796eb996d867bb4aed7d14a70e1c65a72
|
||||
LINUX_VERSION-5.15 = .98
|
||||
LINUX_KERNEL_HASH-5.15.98 = 7dc62cd3a45f95c9b60316a5886ea9406aee256308869dac1e4ec088fbb37787
|
||||
|
|
|
@ -80,6 +80,7 @@ CONFIGURE_ARGS = \
|
|||
--target=$(GNU_TARGET_NAME) \
|
||||
--host=$(GNU_TARGET_NAME) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--disable-dependency-tracking \
|
||||
--program-prefix="" \
|
||||
--program-suffix="" \
|
||||
--prefix=$(CONFIGURE_PREFIX) \
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=kexec-tools
|
||||
PKG_VERSION:=2.0.21
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=2.0.26
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec
|
||||
PKG_HASH:=e113142dee891638ad96e0f72cf9277b244477619470b30c41999d312e8e8702
|
||||
PKG_HASH:=7fe36a064101cd5c515e41b2be393dce3ca88adce59d6ee668e0af7c0c4570cd
|
||||
|
||||
PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA
|
||||
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
From 9817ec81968a5eec7863902833fb77680544eae4 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
Date: Mon, 12 Apr 2021 13:18:05 +0200
|
||||
Subject: [PATCH 1/1] arm: do not copy magic 4 bytes of appended DTB in zImage
|
||||
|
||||
If the passed zImage happens to have a DTB appended, then the magic 4 bytes
|
||||
of the DTB are copied together with the kernel image. This leads to
|
||||
failed kexec boots because the decompressor finds the aforementioned
|
||||
DTB magic and falsely tries to replace the DTB passed in the register r2
|
||||
with the non-existent appended one.
|
||||
|
||||
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
Signed-off-by: Simon Horman <horms@verge.net.au>
|
||||
---
|
||||
kexec/arch/arm/kexec-zImage-arm.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/kexec/arch/arm/kexec-zImage-arm.c
|
||||
+++ b/kexec/arch/arm/kexec-zImage-arm.c
|
||||
@@ -382,6 +382,7 @@ int zImage_arm_load(int argc, char **arg
|
||||
unsigned int atag_offset = 0x1000; /* 4k offset from memory start */
|
||||
unsigned int extra_size = 0x8000; /* TEXT_OFFSET */
|
||||
const struct zimage_tag *tag;
|
||||
+ size_t kernel_buf_size;
|
||||
size_t kernel_mem_size;
|
||||
const char *command_line;
|
||||
char *modified_cmdline = NULL;
|
||||
@@ -538,6 +539,15 @@ int zImage_arm_load(int argc, char **arg
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Save the length of the compressed kernel image w/o the appended DTB.
|
||||
+ * This will be required later on when the kernel image contained
|
||||
+ * in the zImage will be loaded into a kernel memory segment.
|
||||
+ * And we want to load ONLY the compressed kernel image from the zImage
|
||||
+ * and discard the appended DTB.
|
||||
+ */
|
||||
+ kernel_buf_size = len;
|
||||
+
|
||||
+ /*
|
||||
* Always extend the zImage by four bytes to ensure that an appended
|
||||
* DTB image always sees an initialised value after _edata.
|
||||
*/
|
||||
@@ -759,7 +769,7 @@ int zImage_arm_load(int argc, char **arg
|
||||
add_segment(info, dtb_buf, dtb_length, dtb_offset, dtb_length);
|
||||
}
|
||||
|
||||
- add_segment(info, buf, len, kernel_base, kernel_mem_size);
|
||||
+ add_segment(info, buf, kernel_buf_size, kernel_base, kernel_mem_size);
|
||||
|
||||
info->entry = (void*)kernel_base;
|
||||
|
|
@ -16,6 +16,9 @@ ocedo,panda)
|
|||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
watchguard,firebox-t10)
|
||||
ubootenv_add_uci_config "$(find_mtd_part 'u-boot-env')" "0x0" "0x2000" "0x10000"
|
||||
;;
|
||||
aerohive,hiveap-330)
|
||||
ubootenv_add_uci_config "$(find_mtd_part 'u-boot-env')" "0x0" "0x20000" "0x10000"
|
||||
;;
|
||||
|
|
|
@ -85,6 +85,7 @@ linksys,ea8100-v2|\
|
|||
mts,wg430223)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
|
||||
;;
|
||||
snr,snr-cpe-me2-sfp|\
|
||||
snr,cpe-w4n-mt)
|
||||
idx="$(find_mtd_index uboot-env)"
|
||||
[ -n "$idx" ] && \
|
||||
|
|
|
@ -34,6 +34,7 @@ endif
|
|||
define U-Boot/Default
|
||||
BUILD_TARGET:=mediatek
|
||||
UBOOT_IMAGE:=u-boot-mtk.bin
|
||||
HIDDEN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/mt7620_rfb
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=binutils
|
||||
PKG_VERSION:=2.38
|
||||
PKG_VERSION:=2.40
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@GNU/binutils
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_VERSION:=$(PKG_VERSION)
|
||||
PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024
|
||||
PKG_HASH:=0f8a4c272d7f17f369ded10a4aca28b8e304828e95526da482b0ccc4dfc9d8e1
|
||||
|
||||
PKG_FIXUP:=patch-libtool
|
||||
PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl
|
||||
PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof gprofng binutils ld libiberty gold intl libctf libsframe
|
||||
PKG_REMOVE_FILES:=libtool.m4
|
||||
PKG_INSTALL:=1
|
||||
|
||||
|
@ -87,7 +87,11 @@ CONFIGURE_ARGS += \
|
|||
--enable-shared \
|
||||
--enable-install-libiberty \
|
||||
--enable-install-libbfd \
|
||||
--enable-install-libctf
|
||||
--enable-install-libctf \
|
||||
--with-system-zlib \
|
||||
--without-zstd \
|
||||
--without-msgpack \
|
||||
--disable-gprofng
|
||||
|
||||
define Build/Install
|
||||
$(call Build/Install/Default)
|
||||
|
@ -105,6 +109,7 @@ endef
|
|||
define Package/libbfd/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsframe*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libctf/install
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
Fix this compile error:
|
||||
----------------------
|
||||
./../common/cpuid.c:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__get_cpuid'
|
||||
27 | __get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax,
|
||||
| ^~~~~~~~~~~
|
||||
----------------------
|
||||
|
||||
and this error:
|
||||
----------------------
|
||||
unwind.c: In function '__collector_ext_return_address':
|
||||
unwind.c:236:34: error: '__u64' undeclared (first use in this function)
|
||||
236 | context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \
|
||||
| ^~~~~
|
||||
unwind.c:490:3: note: in expansion of macro 'FILL_CONTEXT'
|
||||
490 | FILL_CONTEXT ((&context));
|
||||
|
||||
----------------------
|
||||
--- a/gprofng/common/cpuid.c
|
||||
+++ b/gprofng/common/cpuid.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#elif defined(__aarch64__)
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
|
||||
-static inline uint_t __attribute_const__
|
||||
+static inline uint_t __attribute__((__const__))
|
||||
__get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax,
|
||||
unsigned int *ebx ATTRIBUTE_UNUSED,
|
||||
unsigned int *ecx ATTRIBUTE_UNUSED, unsigned int *edx ATTRIBUTE_UNUSED)
|
||||
--- a/gprofng/libcollector/unwind.c
|
||||
+++ b/gprofng/libcollector/unwind.c
|
||||
@@ -233,7 +233,7 @@ memory_error_func (int status ATTRIBUTE_
|
||||
#elif ARCH(Aarch64)
|
||||
#define FILL_CONTEXT(context) \
|
||||
{ CALL_UTIL (getcontext) (context); \
|
||||
- context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \
|
||||
+ context->uc_mcontext.sp = (uint64_t) __builtin_frame_address(0); \
|
||||
}
|
||||
|
||||
#endif /* ARCH() */
|
||||
@@ -4579,11 +4579,11 @@ stack_unwind (char *buf, int size, void
|
||||
if (buf && bptr && eptr && context && size + mode > 0)
|
||||
getByteInstruction ((unsigned char *) eptr);
|
||||
int ind = 0;
|
||||
- __u64 *lbuf = (void *) buf;
|
||||
- int lsize = size / sizeof (__u64);
|
||||
- __u64 pc = context->uc_mcontext.pc;
|
||||
- __u64 sp = context->uc_mcontext.sp;
|
||||
- __u64 stack_base;
|
||||
+ uint64_t *lbuf = (void *) buf;
|
||||
+ int lsize = size / sizeof (uint64_t);
|
||||
+ uint64_t pc = context->uc_mcontext.pc;
|
||||
+ uint64_t sp = context->uc_mcontext.sp;
|
||||
+ uint64_t stack_base;
|
||||
unsigned long tbgn = 0;
|
||||
unsigned long tend = 0;
|
||||
|
||||
@@ -4594,7 +4594,7 @@ stack_unwind (char *buf, int size, void
|
||||
{
|
||||
stack_base = sp + 0x100000;
|
||||
if (stack_base < sp) // overflow
|
||||
- stack_base = (__u64) -1;
|
||||
+ stack_base = (uint64_t) -1;
|
||||
}
|
||||
DprintfT (SP_DUMP_UNWIND,
|
||||
"unwind.c:%d stack_unwind %2d pc=0x%llx sp=0x%llx stack_base=0x%llx\n",
|
||||
@@ -4625,17 +4625,17 @@ stack_unwind (char *buf, int size, void
|
||||
__LINE__, (unsigned long) sp);
|
||||
break;
|
||||
}
|
||||
- pc = ((__u64 *) sp)[1];
|
||||
- __u64 old_sp = sp;
|
||||
- sp = ((__u64 *) sp)[0];
|
||||
+ pc = ((uint64_t *) sp)[1];
|
||||
+ uint64_t old_sp = sp;
|
||||
+ sp = ((uint64_t *) sp)[0];
|
||||
if (sp < old_sp)
|
||||
break;
|
||||
}
|
||||
if (ind >= lsize)
|
||||
{
|
||||
ind = lsize - 1;
|
||||
- lbuf[ind++] = (__u64) SP_TRUNC_STACK_MARKER;
|
||||
+ lbuf[ind++] = (uint64_t) SP_TRUNC_STACK_MARKER;
|
||||
}
|
||||
- return ind * sizeof (__u64);
|
||||
+ return ind * sizeof (uint64_t);
|
||||
}
|
||||
#endif /* ARCH() */
|
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
|||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=strace
|
||||
PKG_VERSION:=6.1
|
||||
PKG_VERSION:=6.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
PKG_HASH:=2579e9cec37dbb786f6ea0bebd15f40dd561ef2bde2a2a2ecdce5963b01859fd
|
||||
PKG_HASH:=0c7d38a449416268d3004029a220a15a77c2206a03cc88120f37f46e949177e8
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
|
|
|
@ -3,14 +3,17 @@ include $(INCLUDE_DIR)/version.mk
|
|||
|
||||
PKG_NAME:=ipq-wifi
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
|
||||
PKG_SOURCE_DATE:=2023-02-12
|
||||
PKG_SOURCE_VERSION:=c3ece63d6879e14c8d65a8dc3e32f47e0f891f27
|
||||
PKG_MIRROR_HASH:=7637fb1df3ad577650284b526ffaa4c038e1ba6b196a88724d63e4d1c1ab3c53
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
|
@ -114,7 +117,7 @@ Do not install it for any other device!
|
|||
endef
|
||||
|
||||
define Package/ipq-wifi-$(1)/install-overlay
|
||||
$$$$(foreach IPQ_WIFI_BOARD_FILE,$$$$(wildcard board-$(1).*),\
|
||||
$$$$(foreach IPQ_WIFI_BOARD_FILE,$$$$(wildcard $(PKG_BUILD_DIR)/board-$(1).*),\
|
||||
$$$$(call ipq-wifi-install-one,$$$$(IPQ_WIFI_BOARD_FILE),$$(1)))
|
||||
endef
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -68,3 +68,13 @@ define Package/mt7922bt-firmware/install
|
|||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
$(eval $(call BuildPackage,mt7922bt-firmware))
|
||||
|
||||
Package/mt7986-wo-firmware = $(call Package/firmware-default,MT7986 offload firmware)
|
||||
define Package/mt7986-wo-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/mediatek/mt7986_wo_0.bin \
|
||||
$(PKG_BUILD_DIR)/mediatek/mt7986_wo_1.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
$(eval $(call BuildPackage,mt7986-wo-firmware))
|
||||
|
|
|
@ -39,7 +39,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||
|
||||
define Package/bpf-headers
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel
|
||||
CATEGORY:=Kernel modules
|
||||
TITLE:=eBPF kernel headers
|
||||
BUILDONLY:=1
|
||||
HIDDEN:=1
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=hwmon-gsc
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/hwmon-gsc
|
||||
SUBMENU:=Hardware Monitoring Support
|
||||
DEPENDS:=@TARGET_imx +kmod-hwmon-core +kmod-i2c-core
|
||||
TITLE:=Driver for the Gateworks System Controller
|
||||
AUTOLOAD:=$(call AutoLoad,60,gsc)
|
||||
FILES:=$(PKG_BUILD_DIR)/gsc.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-gsc/description
|
||||
Kernel module for the Gateworks System Controller chips.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(BUILDFLAGS)" \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-gsc))
|
|
@ -1 +0,0 @@
|
|||
obj-m := gsc.o
|
|
@ -1,308 +0,0 @@
|
|||
/*
|
||||
* A hwmon driver for the Gateworks System Controller
|
||||
* Copyright (C) 2009 Gateworks Corporation
|
||||
*
|
||||
* Author: Chris Lang <clang@gateworks.com>
|
||||
*
|
||||
* 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 - version 2.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/hwmon.h>
|
||||
#include <linux/hwmon-sysfs.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define DRV_VERSION "0.2"
|
||||
|
||||
enum chips { gsp };
|
||||
|
||||
/* AD7418 registers */
|
||||
#define GSP_REG_TEMP_IN 0x00
|
||||
#define GSP_REG_VIN 0x02
|
||||
#define GSP_REG_3P3 0x05
|
||||
#define GSP_REG_BAT 0x08
|
||||
#define GSP_REG_5P0 0x0b
|
||||
#define GSP_REG_CORE 0x0e
|
||||
#define GSP_REG_CPU1 0x11
|
||||
#define GSP_REG_CPU2 0x14
|
||||
#define GSP_REG_DRAM 0x17
|
||||
#define GSP_REG_EXT_BAT 0x1a
|
||||
#define GSP_REG_IO1 0x1d
|
||||
#define GSP_REG_IO2 0x20
|
||||
#define GSP_REG_PCIE 0x23
|
||||
#define GSP_REG_CURRENT 0x26
|
||||
#define GSP_FAN_0 0x2C
|
||||
#define GSP_FAN_1 0x2E
|
||||
#define GSP_FAN_2 0x30
|
||||
#define GSP_FAN_3 0x32
|
||||
#define GSP_FAN_4 0x34
|
||||
#define GSP_FAN_5 0x36
|
||||
|
||||
struct gsp_sensor_info {
|
||||
const char* name;
|
||||
int reg;
|
||||
};
|
||||
|
||||
static const struct gsp_sensor_info gsp_sensors[] = {
|
||||
{"temp", GSP_REG_TEMP_IN},
|
||||
{"vin", GSP_REG_VIN},
|
||||
{"3p3", GSP_REG_3P3},
|
||||
{"bat", GSP_REG_BAT},
|
||||
{"5p0", GSP_REG_5P0},
|
||||
{"core", GSP_REG_CORE},
|
||||
{"cpu1", GSP_REG_CPU1},
|
||||
{"cpu2", GSP_REG_CPU2},
|
||||
{"dram", GSP_REG_DRAM},
|
||||
{"ext_bat", GSP_REG_EXT_BAT},
|
||||
{"io1", GSP_REG_IO1},
|
||||
{"io2", GSP_REG_IO2},
|
||||
{"pci2", GSP_REG_PCIE},
|
||||
{"current", GSP_REG_CURRENT},
|
||||
{"fan_point0", GSP_FAN_0},
|
||||
{"fan_point1", GSP_FAN_1},
|
||||
{"fan_point2", GSP_FAN_2},
|
||||
{"fan_point3", GSP_FAN_3},
|
||||
{"fan_point4", GSP_FAN_4},
|
||||
{"fan_point5", GSP_FAN_5},
|
||||
};
|
||||
|
||||
struct gsp_data {
|
||||
struct device *hwmon_dev;
|
||||
struct attribute_group attrs;
|
||||
enum chips type;
|
||||
};
|
||||
|
||||
static int gsp_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id);
|
||||
static int gsp_remove(struct i2c_client *client);
|
||||
|
||||
static const struct i2c_device_id gsp_id[] = {
|
||||
{ "gsp", 0 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, gsp_id);
|
||||
|
||||
static struct i2c_driver gsp_driver = {
|
||||
.driver = {
|
||||
.name = "gsp",
|
||||
},
|
||||
.probe = gsp_probe,
|
||||
.remove = gsp_remove,
|
||||
.id_table = gsp_id,
|
||||
};
|
||||
|
||||
/* All registers are word-sized, except for the configuration registers.
|
||||
* AD7418 uses a high-byte first convention. Do NOT use those functions to
|
||||
* access the configuration registers CONF and CONF2, as they are byte-sized.
|
||||
*/
|
||||
static inline int gsp_read(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
unsigned int adc = 0;
|
||||
if (reg == GSP_REG_TEMP_IN || reg > GSP_REG_CURRENT)
|
||||
{
|
||||
adc |= i2c_smbus_read_byte_data(client, reg);
|
||||
adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8;
|
||||
return adc;
|
||||
}
|
||||
else
|
||||
{
|
||||
adc |= i2c_smbus_read_byte_data(client, reg);
|
||||
adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8;
|
||||
adc |= i2c_smbus_read_byte_data(client, reg + 2) << 16;
|
||||
return adc;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int gsp_write(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
i2c_smbus_write_byte_data(client, reg, value & 0xff);
|
||||
i2c_smbus_write_byte_data(client, reg + 1, ((value >> 8) & 0xff));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static ssize_t show_adc(struct device *dev, struct device_attribute *devattr,
|
||||
char *buf)
|
||||
{
|
||||
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
return sprintf(buf, "%d\n", gsp_read(client, gsp_sensors[attr->index].reg));
|
||||
}
|
||||
|
||||
static ssize_t show_label(struct device *dev,
|
||||
struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
|
||||
|
||||
return sprintf(buf, "%s\n", gsp_sensors[attr->index].name);
|
||||
}
|
||||
|
||||
static ssize_t store_fan(struct device *dev,
|
||||
struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
u16 val;
|
||||
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
val = simple_strtoul(buf, NULL, 10);
|
||||
gsp_write(client, gsp_sensors[attr->index].reg, val);
|
||||
return count;
|
||||
}
|
||||
|
||||
static SENSOR_DEVICE_ATTR(temp0_input, S_IRUGO, show_adc, NULL, 0);
|
||||
static SENSOR_DEVICE_ATTR(temp0_label, S_IRUGO, show_label, NULL, 0);
|
||||
|
||||
static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_adc, NULL, 1);
|
||||
static SENSOR_DEVICE_ATTR(in0_label, S_IRUGO, show_label, NULL, 1);
|
||||
static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, show_adc, NULL, 2);
|
||||
static SENSOR_DEVICE_ATTR(in1_label, S_IRUGO, show_label, NULL, 2);
|
||||
static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, show_adc, NULL, 3);
|
||||
static SENSOR_DEVICE_ATTR(in2_label, S_IRUGO, show_label, NULL, 3);
|
||||
static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, show_adc, NULL, 4);
|
||||
static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_label, NULL, 4);
|
||||
static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, show_adc, NULL, 5);
|
||||
static SENSOR_DEVICE_ATTR(in4_label, S_IRUGO, show_label, NULL, 5);
|
||||
static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, show_adc, NULL, 6);
|
||||
static SENSOR_DEVICE_ATTR(in5_label, S_IRUGO, show_label, NULL, 6);
|
||||
static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, show_adc, NULL, 7);
|
||||
static SENSOR_DEVICE_ATTR(in6_label, S_IRUGO, show_label, NULL, 7);
|
||||
static SENSOR_DEVICE_ATTR(in7_input, S_IRUGO, show_adc, NULL, 8);
|
||||
static SENSOR_DEVICE_ATTR(in7_label, S_IRUGO, show_label, NULL, 8);
|
||||
static SENSOR_DEVICE_ATTR(in8_input, S_IRUGO, show_adc, NULL, 9);
|
||||
static SENSOR_DEVICE_ATTR(in8_label, S_IRUGO, show_label, NULL, 9);
|
||||
static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, show_adc, NULL, 10);
|
||||
static SENSOR_DEVICE_ATTR(in9_label, S_IRUGO, show_label, NULL, 10);
|
||||
static SENSOR_DEVICE_ATTR(in10_input, S_IRUGO, show_adc, NULL, 11);
|
||||
static SENSOR_DEVICE_ATTR(in10_label, S_IRUGO, show_label, NULL, 11);
|
||||
static SENSOR_DEVICE_ATTR(in11_input, S_IRUGO, show_adc, NULL, 12);
|
||||
static SENSOR_DEVICE_ATTR(in11_label, S_IRUGO, show_label, NULL, 12);
|
||||
static SENSOR_DEVICE_ATTR(in12_input, S_IRUGO, show_adc, NULL, 13);
|
||||
static SENSOR_DEVICE_ATTR(in12_label, S_IRUGO, show_label, NULL, 13);
|
||||
|
||||
static SENSOR_DEVICE_ATTR(fan0_point0, S_IRUGO | S_IWUSR, show_adc, store_fan, 14);
|
||||
static SENSOR_DEVICE_ATTR(fan0_point1, S_IRUGO | S_IWUSR, show_adc, store_fan, 15);
|
||||
static SENSOR_DEVICE_ATTR(fan0_point2, S_IRUGO | S_IWUSR, show_adc, store_fan, 16);
|
||||
static SENSOR_DEVICE_ATTR(fan0_point3, S_IRUGO | S_IWUSR, show_adc, store_fan, 17);
|
||||
static SENSOR_DEVICE_ATTR(fan0_point4, S_IRUGO | S_IWUSR, show_adc, store_fan, 18);
|
||||
static SENSOR_DEVICE_ATTR(fan0_point5, S_IRUGO | S_IWUSR, show_adc, store_fan, 19);
|
||||
|
||||
static struct attribute *gsp_attributes[] = {
|
||||
&sensor_dev_attr_temp0_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in0_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in1_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in2_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in3_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in4_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in5_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in6_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in7_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in8_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in9_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in10_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in11_input.dev_attr.attr,
|
||||
&sensor_dev_attr_in12_input.dev_attr.attr,
|
||||
|
||||
&sensor_dev_attr_temp0_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in0_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in1_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in2_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in3_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in4_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in5_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in6_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in7_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in8_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in9_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in10_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in11_label.dev_attr.attr,
|
||||
&sensor_dev_attr_in12_label.dev_attr.attr,
|
||||
|
||||
&sensor_dev_attr_fan0_point0.dev_attr.attr,
|
||||
&sensor_dev_attr_fan0_point1.dev_attr.attr,
|
||||
&sensor_dev_attr_fan0_point2.dev_attr.attr,
|
||||
&sensor_dev_attr_fan0_point3.dev_attr.attr,
|
||||
&sensor_dev_attr_fan0_point4.dev_attr.attr,
|
||||
&sensor_dev_attr_fan0_point5.dev_attr.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
static int gsp_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct i2c_adapter *adapter = client->adapter;
|
||||
struct gsp_data *data;
|
||||
int err;
|
||||
|
||||
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
|
||||
I2C_FUNC_SMBUS_WORD_DATA)) {
|
||||
err = -EOPNOTSUPP;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!(data = kzalloc(sizeof(struct gsp_data), GFP_KERNEL))) {
|
||||
err = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
i2c_set_clientdata(client, data);
|
||||
|
||||
data->type = id->driver_data;
|
||||
|
||||
switch (data->type) {
|
||||
case 0:
|
||||
data->attrs.attrs = gsp_attributes;
|
||||
break;
|
||||
}
|
||||
|
||||
dev_info(&client->dev, "%s chip found\n", client->name);
|
||||
|
||||
/* Register sysfs hooks */
|
||||
if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs)))
|
||||
goto exit_free;
|
||||
|
||||
data->hwmon_dev = hwmon_device_register(&client->dev);
|
||||
if (IS_ERR(data->hwmon_dev)) {
|
||||
err = PTR_ERR(data->hwmon_dev);
|
||||
goto exit_remove;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
exit_remove:
|
||||
sysfs_remove_group(&client->dev.kobj, &data->attrs);
|
||||
exit_free:
|
||||
kfree(data);
|
||||
exit:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int gsp_remove(struct i2c_client *client)
|
||||
{
|
||||
struct gsp_data *data = i2c_get_clientdata(client);
|
||||
hwmon_device_unregister(data->hwmon_dev);
|
||||
sysfs_remove_group(&client->dev.kobj, &data->attrs);
|
||||
kfree(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init gsp_init(void)
|
||||
{
|
||||
return i2c_add_driver(&gsp_driver);
|
||||
}
|
||||
|
||||
static void __exit gsp_exit(void)
|
||||
{
|
||||
i2c_del_driver(&gsp_driver);
|
||||
}
|
||||
|
||||
module_init(gsp_init);
|
||||
module_exit(gsp_exit);
|
||||
|
||||
MODULE_AUTHOR("Chris Lang <clang@gateworks.com>");
|
||||
MODULE_DESCRIPTION("GSC HWMON driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ksmbd
|
||||
PKG_VERSION:=3.4.6
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=3.4.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=d742992692dbe164060d2a0ea668895ed2b86252f10427db3d3a002df44c445b
|
||||
PKG_SOURCE_URL:=https://github.com/cifsd-team/ksmbd/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=ed9ecb2232046054bf0c1fef41690890f99d93b1d72b7e7d158746ac9be18c7f
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
From 8824b7af409f51f1316e92e9887c2fd48c0b26d6 Mon Sep 17 00:00:00 2001
|
||||
From: William Liu <will@willsroot.io>
|
||||
Date: Fri, 30 Dec 2022 09:13:35 +0900
|
||||
Subject: ksmbd: check nt_len to be at least CIFS_ENCPWD_SIZE in
|
||||
ksmbd_decode_ntlmssp_auth_blob
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
"nt_len - CIFS_ENCPWD_SIZE" is passed directly from
|
||||
ksmbd_decode_ntlmssp_auth_blob to ksmbd_auth_ntlmv2. Malicious requests
|
||||
can set nt_len to less than CIFS_ENCPWD_SIZE, which results in a negative
|
||||
number (or large unsigned value) used for a subsequent memcpy in
|
||||
ksmbd_auth_ntlvm2 and can cause a panic.
|
||||
|
||||
Fixes: e2f3448 ("cifsd: add server-side procedures for SMB3")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: William Liu <will@willsroot.io>
|
||||
Signed-off-by: Hrvoje Mišetić <misetichrvoje@gmail.com>
|
||||
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
|
||||
---
|
||||
auth.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/auth.c
|
||||
+++ b/auth.c
|
||||
@@ -583,7 +583,8 @@ int ksmbd_decode_ntlmssp_auth_blob(struc
|
||||
dn_off = le32_to_cpu(authblob->DomainName.BufferOffset);
|
||||
dn_len = le16_to_cpu(authblob->DomainName.Length);
|
||||
|
||||
- if (blob_len < (u64)dn_off + dn_len || blob_len < (u64)nt_off + nt_len)
|
||||
+ if (blob_len < (u64)dn_off + dn_len || blob_len < (u64)nt_off + nt_len ||
|
||||
+ nt_len < CIFS_ENCPWD_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef CONFIG_SMB_INSECURE_SERVER
|
|
@ -1,63 +0,0 @@
|
|||
From cc4f3b5a6ab4693aba94a45cc073188df4d67175 Mon Sep 17 00:00:00 2001
|
||||
From: Namjae Jeon <linkinjeon@kernel.org>
|
||||
Date: Mon, 26 Dec 2022 01:28:52 +0900
|
||||
Subject: ksmbd: fix infinite loop in ksmbd_conn_handler_loop()
|
||||
|
||||
If kernel_recvmsg() return -EAGAIN in ksmbd_tcp_readv() and go round
|
||||
again, It will cause infinite loop issue. And all threads from next
|
||||
connections would be doing that. This patch add max retry count(2) to
|
||||
avoid it. kernel_recvmsg() will wait during 7sec timeout and try to
|
||||
retry two time if -EAGAIN is returned. And add flags of kvmalloc to
|
||||
__GFP_NOWARN and __GFP_NORETRY to disconnect immediately without
|
||||
retrying on memory alloation failure.
|
||||
|
||||
Fixes: 0626e66 ("cifsd: add server handler for central processing and tranport layers")
|
||||
Cc: stable@vger.kernel.org
|
||||
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18259
|
||||
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
|
||||
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
|
||||
---
|
||||
connection.c | 7 +++++--
|
||||
transport_tcp.c | 5 ++++-
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/connection.c
|
||||
+++ b/connection.c
|
||||
@@ -337,9 +337,12 @@ int ksmbd_conn_handler_loop(void *p)
|
||||
|
||||
/* 4 for rfc1002 length field */
|
||||
size = pdu_size + 4;
|
||||
- conn->request_buf = kvmalloc(size, GFP_KERNEL);
|
||||
+ conn->request_buf = kvmalloc(size,
|
||||
+ GFP_KERNEL |
|
||||
+ __GFP_NOWARN |
|
||||
+ __GFP_NORETRY);
|
||||
if (!conn->request_buf)
|
||||
- continue;
|
||||
+ break;
|
||||
|
||||
memcpy(conn->request_buf, hdr_buf, sizeof(hdr_buf));
|
||||
if (!ksmbd_smb_request(conn))
|
||||
--- a/transport_tcp.c
|
||||
+++ b/transport_tcp.c
|
||||
@@ -323,6 +323,7 @@ static int ksmbd_tcp_readv(struct tcp_tr
|
||||
struct msghdr ksmbd_msg;
|
||||
struct kvec *iov;
|
||||
struct ksmbd_conn *conn = KSMBD_TRANS(t)->conn;
|
||||
+ int max_retry = 2;
|
||||
|
||||
iov = get_conn_iovec(t, nr_segs);
|
||||
if (!iov)
|
||||
@@ -349,9 +350,11 @@ static int ksmbd_tcp_readv(struct tcp_tr
|
||||
} else if (conn->status == KSMBD_SESS_NEED_RECONNECT) {
|
||||
total_read = -EAGAIN;
|
||||
break;
|
||||
- } else if (length == -ERESTARTSYS || length == -EAGAIN) {
|
||||
+ } else if ((length == -ERESTARTSYS || length == -EAGAIN) &&
|
||||
+ max_retry) {
|
||||
usleep_range(1000, 2000);
|
||||
length = 0;
|
||||
+ max_retry--;
|
||||
continue;
|
||||
} else if (length <= 0) {
|
||||
total_read = -EAGAIN;
|
|
@ -108,6 +108,25 @@ endef
|
|||
$(eval $(call KernelPackage,hwmon-drivetemp))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-gsc
|
||||
TITLE:=Gateworks System Controller support
|
||||
KCONFIG:=CONFIG_MFD_GATEWORKS_GSC \
|
||||
CONFIG_SENSORS_GSC
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/mfd/gateworks-gsc.ko \
|
||||
$(LINUX_DIR)/drivers/hwmon/gsc-hwmon.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,gsc-hwmon,1)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-gsc/description
|
||||
Kernel module for Gateworks System Controller with temperature sensor,
|
||||
ADCs, and FAN controller
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-gsc))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-gpiofan
|
||||
TITLE:=Generic GPIO FAN support
|
||||
KCONFIG:=CONFIG_SENSORS_GPIO_FAN
|
||||
|
@ -335,6 +354,21 @@ endef
|
|||
$(eval $(call KernelPackage,hwmon-ltc4151))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-max6642
|
||||
TITLE:=MAX6642 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_MAX6642
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/max6642.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,max6642 max6642)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-max6642/description
|
||||
Kernel module for Maxim MAX6642 temperature monitor
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-max6642))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-mcp3021
|
||||
TITLE:=MCP3021/3221 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_MCP3021
|
||||
|
|
|
@ -115,6 +115,23 @@ endef
|
|||
$(eval $(call KernelPackage,ledtrig-pattern))
|
||||
|
||||
|
||||
define KernelPackage/ledtrig-tty
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED Trigger for TTY devices
|
||||
DEPENDS:=@LINUX_5_15
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_TTY
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-tty.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-tty)
|
||||
endef
|
||||
|
||||
define KernelPackage/ledtrig-tty/description
|
||||
This allows LEDs to be controlled by activity on ttys which includes
|
||||
serial devices like '/dev/ttyS0'.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ledtrig-tty))
|
||||
|
||||
|
||||
define KernelPackage/leds-apu
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=PC Engines APU1 LED support
|
||||
|
|
|
@ -1523,3 +1523,19 @@ endef
|
|||
|
||||
$(eval $(call KernelPackage,atlantic))
|
||||
|
||||
|
||||
define KernelPackage/lan743x
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Microchip LAN743x PCI Express Gigabit Ethernet NIC
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-mdio-devres
|
||||
KCONFIG:=CONFIG_LAN743X
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/microchip/lan743x.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lan743x)
|
||||
endef
|
||||
|
||||
define KernelPackage/lan743x/description
|
||||
Kernel module for Microchip LAN743x PCI Express Gigabit Ethernet NIC
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lan743x))
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ define KernelPackage/ath9k/config
|
|||
bool "Add wireless noise as source of randomness to kernel entropy pool"
|
||||
depends on PACKAGE_kmod-ath9k
|
||||
select PACKAGE_kmod-random-core
|
||||
default n
|
||||
default y
|
||||
|
||||
config ATH9K_SUPPORT_PCOEM
|
||||
bool "Support chips used in PC OEM cards"
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
help
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -110,6 +110,7 @@ ADM8211=
|
||||
@@ -102,6 +102,7 @@ ADM8211=
|
||||
ATH_COMMON=
|
||||
WLAN_VENDOR_ATH=
|
||||
ATH_DEBUG=
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -169,6 +169,7 @@ ATH10K_SNOC=
|
||||
@@ -161,6 +161,7 @@ ATH10K_SNOC=
|
||||
ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
|
|
|
@ -114,7 +114,7 @@ v13:
|
|||
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -170,6 +170,7 @@ ATH10K_DEBUG=
|
||||
@@ -162,6 +162,7 @@ ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
ATH10K_THERMAL=
|
||||
|
|
|
@ -371,7 +371,7 @@
|
|||
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -137,6 +137,7 @@ ATH9K_WOW=
|
||||
@@ -129,6 +129,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -354,6 +354,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
@@ -347,6 +347,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
RT2X00_LIB_CRYPTO=
|
||||
RT2X00_LIB_LEDS=
|
||||
RT2X00_LIB_DEBUGFS=
|
||||
|
|
|
@ -90,7 +90,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
#include "driver-ops.h"
|
||||
|
||||
static int mesh_allocated;
|
||||
@@ -698,6 +699,102 @@ ieee80211_mesh_update_bss_params(struct
|
||||
@@ -698,6 +699,95 @@ ieee80211_mesh_update_bss_params(struct
|
||||
__le32_to_cpu(he_oper->he_oper_params);
|
||||
}
|
||||
|
||||
|
@ -137,8 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+ if (!entry)
|
||||
+ return false;
|
||||
+
|
||||
+ if (skb_headroom(skb) + 2 * ETH_ALEN < entry->hdrlen +
|
||||
+ entry->fast_tx.hdr_len)
|
||||
+ if (skb_headroom(skb) < entry->hdrlen + entry->fast_tx.hdr_len)
|
||||
+ return false;
|
||||
+
|
||||
+ sta = rcu_dereference(entry->mpath->next_hop);
|
||||
|
@ -154,16 +153,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+ tid_tx->last_tx = jiffies;
|
||||
+ }
|
||||
+
|
||||
+ /* If the skb is shared we need to obtain our own copy */
|
||||
+ if (skb_shared(skb)) {
|
||||
+ struct sk_buff *oskb = skb;
|
||||
+
|
||||
+ skb = skb_clone(skb, GFP_ATOMIC);
|
||||
+ if (!skb)
|
||||
+ return false;
|
||||
+
|
||||
+ kfree_skb(oskb);
|
||||
+ }
|
||||
+ skb = skb_share_check(skb, GFP_ATOMIC);
|
||||
+ if (!skb)
|
||||
+ return true;
|
||||
+
|
||||
+ skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb));
|
||||
+
|
||||
|
@ -184,6 +176,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+ if (copy_sa)
|
||||
+ ether_addr_copy(meshhdr->eaddr2, sa);
|
||||
+
|
||||
+ skb_push(skb, 2 * ETH_ALEN);
|
||||
+ __ieee80211_xmit_fast(sdata, sta, &entry->fast_tx, skb, tid_tx,
|
||||
+ entry->mpath->dst, sdata->vif.addr);
|
||||
+
|
||||
|
@ -193,7 +186,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
/**
|
||||
* ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame
|
||||
* @hdr: 802.11 frame header
|
||||
@@ -780,6 +877,8 @@ static void ieee80211_mesh_housekeeping(
|
||||
@@ -780,6 +870,8 @@ static void ieee80211_mesh_housekeeping(
|
||||
changed = mesh_accept_plinks_update(sdata);
|
||||
ieee80211_mbss_info_change_notify(sdata, changed);
|
||||
|
||||
|
@ -566,7 +559,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+ if (!entry)
|
||||
+ goto unlock_sta;
|
||||
+
|
||||
+ spin_lock_bh(&cache->walk_lock);
|
||||
+ spin_lock(&cache->walk_lock);
|
||||
+ prev = rhashtable_lookup_get_insert_fast(&cache->rht,
|
||||
+ &entry->rhash,
|
||||
+ fast_tx_rht_params);
|
||||
|
@ -589,7 +582,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+ hlist_add_head(&entry->walk_list, &cache->walk_head);
|
||||
+
|
||||
+unlock_cache:
|
||||
+ spin_unlock_bh(&cache->walk_lock);
|
||||
+ spin_unlock(&cache->walk_lock);
|
||||
+unlock_sta:
|
||||
+ spin_unlock_bh(&sta->lock);
|
||||
+}
|
||||
|
@ -771,28 +764,20 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
{
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
|
||||
@@ -3645,8 +3652,6 @@ static void __ieee80211_xmit_fast(struct
|
||||
struct ieee80211_tx_data tx;
|
||||
@@ -3646,7 +3653,6 @@ static void __ieee80211_xmit_fast(struct
|
||||
ieee80211_tx_result r;
|
||||
int hw_headroom = sdata->local->hw.extra_tx_headroom;
|
||||
- int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
|
||||
int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
|
||||
- struct ethhdr eth;
|
||||
|
||||
skb = skb_share_check(skb, GFP_ATOMIC);
|
||||
if (unlikely(!skb))
|
||||
@@ -3661,16 +3666,15 @@ static void __ieee80211_xmit_fast(struct
|
||||
* more room than we already have in 'extra_head'
|
||||
*/
|
||||
if (unlikely(ieee80211_skb_resize(sdata, skb,
|
||||
- max_t(int, extra_head + hw_headroom -
|
||||
+ max_t(int, fast_tx->hdr_len + hw_headroom -
|
||||
skb_headroom(skb), 0),
|
||||
@@ -3666,11 +3672,10 @@ static void __ieee80211_xmit_fast(struct
|
||||
ENCRYPT_NO)))
|
||||
goto free;
|
||||
|
||||
- memcpy(ð, skb->data, ETH_HLEN - 2);
|
||||
- hdr = skb_push(skb, extra_head);
|
||||
+ hdr = skb_push(skb, fast_tx->hdr_len);
|
||||
hdr = skb_push(skb, extra_head);
|
||||
memcpy(skb->data, fast_tx->hdr, fast_tx->hdr_len);
|
||||
- memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN);
|
||||
- memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN);
|
||||
|
@ -801,16 +786,17 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
memset(info, 0, sizeof(*info));
|
||||
@@ -3689,7 +3693,7 @@ static void __ieee80211_xmit_fast(struct
|
||||
@@ -3689,7 +3694,8 @@ static void __ieee80211_xmit_fast(struct
|
||||
#endif
|
||||
|
||||
if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
|
||||
- tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
|
||||
+ u8 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
|
||||
+
|
||||
*ieee80211_get_qos_ctl(hdr) = tid;
|
||||
}
|
||||
|
||||
@@ -3732,6 +3736,7 @@ static bool ieee80211_xmit_fast(struct i
|
||||
@@ -3732,6 +3738,7 @@ static bool ieee80211_xmit_fast(struct i
|
||||
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
|
||||
struct tid_ampdu_tx *tid_tx = NULL;
|
||||
struct sk_buff *next;
|
||||
|
@ -818,17 +804,16 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
u8 tid = IEEE80211_NUM_TIDS;
|
||||
|
||||
/* control port protocol needs a lot of special handling */
|
||||
@@ -3757,14 +3762,18 @@ static bool ieee80211_xmit_fast(struct i
|
||||
@@ -3757,6 +3764,8 @@ static bool ieee80211_xmit_fast(struct i
|
||||
}
|
||||
}
|
||||
|
||||
+ memcpy(ð, skb->data, ETH_HLEN - 2);
|
||||
+
|
||||
/* after this point (skb is modified) we cannot return false */
|
||||
+ skb_pull(skb, ETH_HLEN - 2);
|
||||
skb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata));
|
||||
if (!skb)
|
||||
return true;
|
||||
@@ -3764,7 +3773,8 @@ static bool ieee80211_xmit_fast(struct i
|
||||
|
||||
skb_list_walk_safe(skb, skb, next) {
|
||||
skb_mark_not_on_list(skb);
|
||||
|
@ -838,7 +823,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
}
|
||||
|
||||
return true;
|
||||
@@ -4244,8 +4253,15 @@ void __ieee80211_subif_start_xmit(struct
|
||||
@@ -4244,8 +4254,15 @@ void __ieee80211_subif_start_xmit(struct
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -854,7 +839,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
|
||||
goto out_free;
|
||||
|
||||
@@ -4255,8 +4271,6 @@ void __ieee80211_subif_start_xmit(struct
|
||||
@@ -4255,8 +4272,6 @@ void __ieee80211_subif_start_xmit(struct
|
||||
skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb));
|
||||
ieee80211_aggr_check(sdata, sta, skb);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+
|
||||
+ skb->dev = sdata->dev;
|
||||
+ memcpy(ð, skb->data, ETH_HLEN - 2);
|
||||
+ skb_pull(skb, sizeof(eth));
|
||||
+ skb_pull(skb, 2);
|
||||
+ __ieee80211_xmit_fast(sdata, sta, &entry->fast_tx, skb, tid_tx,
|
||||
+ eth.h_dest, eth.h_source);
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
From: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Date: Wed, 5 Oct 2022 14:54:45 -0700
|
||||
Subject: [PATCH] wifi: mac80211: Add VHT MU-MIMO related flags in
|
||||
ieee80211_bss_conf
|
||||
|
||||
Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and
|
||||
MU Beamformee for VHT. This is utilized to pass MU-MIMO
|
||||
configurations from user space to driver in AP mode.
|
||||
|
||||
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/1665006886-23874-1-git-send-email-quic_msinada@quicinc.com
|
||||
[fixed indentation, removed redundant !!]
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -653,6 +653,14 @@ struct ieee80211_fils_discovery {
|
||||
* write-protected by sdata_lock and local->mtx so holding either is fine
|
||||
* for read access.
|
||||
* @color_change_color: the bss color that will be used after the change.
|
||||
+ * @vht_su_beamformer: in AP mode, does this BSS support operation as an VHT SU
|
||||
+ * beamformer
|
||||
+ * @vht_su_beamformee: in AP mode, does this BSS support operation as an VHT SU
|
||||
+ * beamformee
|
||||
+ * @vht_mu_beamformer: in AP mode, does this BSS support operation as an VHT MU
|
||||
+ * beamformer
|
||||
+ * @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU
|
||||
+ * beamformee
|
||||
*/
|
||||
struct ieee80211_bss_conf {
|
||||
const u8 *bssid;
|
||||
@@ -726,6 +734,11 @@ struct ieee80211_bss_conf {
|
||||
|
||||
bool color_change_active;
|
||||
u8 color_change_color;
|
||||
+
|
||||
+ bool vht_su_beamformer;
|
||||
+ bool vht_su_beamformee;
|
||||
+ bool vht_mu_beamformer;
|
||||
+ bool vht_mu_beamformee;
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1251,6 +1251,21 @@ static int ieee80211_start_ap(struct wip
|
||||
prev_beacon_int = link_conf->beacon_int;
|
||||
link_conf->beacon_int = params->beacon_interval;
|
||||
|
||||
+ if (params->vht_cap) {
|
||||
+ link_conf->vht_su_beamformer =
|
||||
+ params->vht_cap->vht_cap_info &
|
||||
+ cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE);
|
||||
+ link_conf->vht_su_beamformee =
|
||||
+ params->vht_cap->vht_cap_info &
|
||||
+ cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE);
|
||||
+ link_conf->vht_mu_beamformer =
|
||||
+ params->vht_cap->vht_cap_info &
|
||||
+ cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE);
|
||||
+ link_conf->vht_mu_beamformee =
|
||||
+ params->vht_cap->vht_cap_info &
|
||||
+ cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
|
||||
+ }
|
||||
+
|
||||
if (params->he_cap && params->he_oper) {
|
||||
link_conf->he_support = true;
|
||||
link_conf->htc_trig_based_pkt_ext =
|
|
@ -0,0 +1,68 @@
|
|||
From: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Date: Wed, 5 Oct 2022 14:54:46 -0700
|
||||
Subject: [PATCH] wifi: mac80211: Add HE MU-MIMO related flags in
|
||||
ieee80211_bss_conf
|
||||
|
||||
Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and Full
|
||||
Bandwidth UL MU-MIMO for HE. This is utilized to pass MU-MIMO
|
||||
configurations from user space to driver in AP mode.
|
||||
|
||||
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
||||
Link: https://lore.kernel.org/r/1665006886-23874-2-git-send-email-quic_msinada@quicinc.com
|
||||
[fixed indentation, removed redundant !!]
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -661,6 +661,15 @@ struct ieee80211_fils_discovery {
|
||||
* beamformer
|
||||
* @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU
|
||||
* beamformee
|
||||
+ * @he_su_beamformer: in AP-mode, does this BSS support operation as an HE SU
|
||||
+ * beamformer
|
||||
+ * @he_su_beamformee: in AP-mode, does this BSS support operation as an HE SU
|
||||
+ * beamformee
|
||||
+ * @he_mu_beamformer: in AP-mode, does this BSS support operation as an HE MU
|
||||
+ * beamformer
|
||||
+ * @he_full_ul_mumimo: does this BSS support the reception (AP) or transmission
|
||||
+ * (non-AP STA) of an HE TB PPDU on an RU that spans the entire PPDU
|
||||
+ * bandwidth
|
||||
*/
|
||||
struct ieee80211_bss_conf {
|
||||
const u8 *bssid;
|
||||
@@ -739,6 +748,10 @@ struct ieee80211_bss_conf {
|
||||
bool vht_su_beamformee;
|
||||
bool vht_mu_beamformer;
|
||||
bool vht_mu_beamformee;
|
||||
+ bool he_su_beamformer;
|
||||
+ bool he_su_beamformee;
|
||||
+ bool he_mu_beamformer;
|
||||
+ bool he_full_ul_mumimo;
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1280,6 +1280,21 @@ static int ieee80211_start_ap(struct wip
|
||||
changed |= BSS_CHANGED_HE_BSS_COLOR;
|
||||
}
|
||||
|
||||
+ if (params->he_cap) {
|
||||
+ link_conf->he_su_beamformer =
|
||||
+ params->he_cap->phy_cap_info[3] &
|
||||
+ IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER;
|
||||
+ link_conf->he_su_beamformee =
|
||||
+ params->he_cap->phy_cap_info[4] &
|
||||
+ IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE;
|
||||
+ link_conf->he_mu_beamformer =
|
||||
+ params->he_cap->phy_cap_info[4] &
|
||||
+ IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
|
||||
+ link_conf->he_full_ul_mumimo =
|
||||
+ params->he_cap->phy_cap_info[2] &
|
||||
+ IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO;
|
||||
+ }
|
||||
+
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP &&
|
||||
params->mbssid_config.tx_wdev) {
|
||||
err = ieee80211_set_ap_mbssid_options(sdata,
|
|
@ -0,0 +1,60 @@
|
|||
From: Ryder Lee <ryder.lee@mediatek.com>
|
||||
Date: Sat, 18 Feb 2023 01:50:05 +0800
|
||||
Subject: [PATCH] wifi: mac80211: introduce
|
||||
ieee80211_refresh_tx_agg_session_timer()
|
||||
|
||||
This allows low level drivers to refresh the tx agg session timer, based on
|
||||
querying stats from the firmware usually. Especially for some mt76 devices
|
||||
support .net_fill_forward_path would bypass mac80211, which leads to tx BA
|
||||
session timeout for certain clients.
|
||||
|
||||
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -5968,6 +5968,18 @@ void ieee80211_queue_delayed_work(struct
|
||||
unsigned long delay);
|
||||
|
||||
/**
|
||||
+ * ieee80211_refresh_tx_agg_session_timer - Refresh a tx agg session timer.
|
||||
+ * @sta: the station for which to start a BA session
|
||||
+ * @tid: the TID to BA on.
|
||||
+ *
|
||||
+ * This function allows low level driver to refresh tx agg session timer
|
||||
+ * to maintain BA session, the session level will still be managed by the
|
||||
+ * mac80211.
|
||||
+ */
|
||||
+void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *sta,
|
||||
+ u16 tid);
|
||||
+
|
||||
+/**
|
||||
* ieee80211_start_tx_ba_session - Start a tx Block Ack session.
|
||||
* @sta: the station for which to start a BA session
|
||||
* @tid: the TID to BA on.
|
||||
--- a/net/mac80211/agg-tx.c
|
||||
+++ b/net/mac80211/agg-tx.c
|
||||
@@ -552,6 +552,23 @@ void ieee80211_tx_ba_session_handle_star
|
||||
ieee80211_send_addba_with_timeout(sta, tid_tx);
|
||||
}
|
||||
|
||||
+void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *pubsta,
|
||||
+ u16 tid)
|
||||
+{
|
||||
+ struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
|
||||
+ struct tid_ampdu_tx *tid_tx;
|
||||
+
|
||||
+ if (WARN_ON_ONCE(tid >= IEEE80211_NUM_TIDS))
|
||||
+ return;
|
||||
+
|
||||
+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
|
||||
+ if (!tid_tx)
|
||||
+ return;
|
||||
+
|
||||
+ tid_tx->last_tx = jiffies;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ieee80211_refresh_tx_agg_session_timer);
|
||||
+
|
||||
/*
|
||||
* After accepting the AddBA Response we activated a timer,
|
||||
* resetting it after each frame that we send.
|
|
@ -0,0 +1,77 @@
|
|||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 2 Mar 2023 13:52:29 +0100
|
||||
Subject: [PATCH] wifi: mac80211: add mesh fast-rx support
|
||||
|
||||
This helps bring down rx CPU usage by avoiding calls to the rx handlers in
|
||||
the slow path. Supports forwarding and local rx, including A-MSDU.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -4572,6 +4572,12 @@ void ieee80211_check_fast_rx(struct sta_
|
||||
}
|
||||
|
||||
break;
|
||||
+ case NL80211_IFTYPE_MESH_POINT:
|
||||
+ fastrx.expected_ds_bits = cpu_to_le16(IEEE80211_FCTL_FROMDS |
|
||||
+ IEEE80211_FCTL_TODS);
|
||||
+ fastrx.da_offs = offsetof(struct ieee80211_hdr, addr3);
|
||||
+ fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr4);
|
||||
+ break;
|
||||
default:
|
||||
goto clear;
|
||||
}
|
||||
@@ -4780,6 +4786,7 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
struct sk_buff *skb = rx->skb;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||
+ static ieee80211_rx_result res;
|
||||
int orig_len = skb->len;
|
||||
int hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
int snap_offs = hdrlen;
|
||||
@@ -4841,7 +4848,8 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
snap_offs += IEEE80211_CCMP_HDR_LEN;
|
||||
}
|
||||
|
||||
- if (!(status->rx_flags & IEEE80211_RX_AMSDU)) {
|
||||
+ if (!ieee80211_vif_is_mesh(&rx->sdata->vif) &&
|
||||
+ !(status->rx_flags & IEEE80211_RX_AMSDU)) {
|
||||
if (!pskb_may_pull(skb, snap_offs + sizeof(*payload)))
|
||||
return false;
|
||||
|
||||
@@ -4880,13 +4888,29 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
/* do the header conversion - first grab the addresses */
|
||||
ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs);
|
||||
ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs);
|
||||
- skb_postpull_rcsum(skb, skb->data + snap_offs,
|
||||
- sizeof(rfc1042_header) + 2);
|
||||
- /* remove the SNAP but leave the ethertype */
|
||||
- skb_pull(skb, snap_offs + sizeof(rfc1042_header));
|
||||
+ if (ieee80211_vif_is_mesh(&rx->sdata->vif)) {
|
||||
+ skb_pull(skb, snap_offs - 2);
|
||||
+ put_unaligned_be16(skb->len - 2, skb->data);
|
||||
+ } else {
|
||||
+ skb_postpull_rcsum(skb, skb->data + snap_offs,
|
||||
+ sizeof(rfc1042_header) + 2);
|
||||
+
|
||||
+ /* remove the SNAP but leave the ethertype */
|
||||
+ skb_pull(skb, snap_offs + sizeof(rfc1042_header));
|
||||
+ }
|
||||
/* push the addresses in front */
|
||||
memcpy(skb_push(skb, sizeof(addrs)), &addrs, sizeof(addrs));
|
||||
|
||||
+ res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb);
|
||||
+ switch (res) {
|
||||
+ case RX_QUEUED:
|
||||
+ return true;
|
||||
+ case RX_CONTINUE:
|
||||
+ break;
|
||||
+ default:
|
||||
+ goto drop;
|
||||
+ }
|
||||
+
|
||||
ieee80211_rx_8023(rx, fast_rx, orig_len);
|
||||
|
||||
return true;
|
|
@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
|||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2023-02-02
|
||||
PKG_SOURCE_VERSION:=b2360d59747c6fed2b65bc1c3563c10593c83f3e
|
||||
PKG_MIRROR_HASH:=f85f00fa8f549de348a115f92c4f0235e413ed924669aece390c7570882526dd
|
||||
PKG_SOURCE_DATE:=2023-03-01
|
||||
PKG_SOURCE_VERSION:=c32d6d849c43792abd8007e13e468b12d6d6e0b7
|
||||
PKG_MIRROR_HASH:=b7004bc920ba44cef2f7868d94beb2d288ff9d399af624ce5dad972f953723c8
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=elfutils
|
||||
PKG_VERSION:=0.188
|
||||
PKG_VERSION:=0.189
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
|
||||
PKG_HASH:=fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff
|
||||
PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8
|
||||
|
||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
|
@ -65,6 +65,7 @@ HOST_CONFIGURE_ARGS += \
|
|||
--disable-nls \
|
||||
--disable-debuginfod \
|
||||
--disable-libdebuginfod \
|
||||
--without-bzlib \
|
||||
--without-lzma \
|
||||
--without-zstd
|
||||
|
||||
|
@ -72,6 +73,7 @@ CONFIGURE_ARGS += \
|
|||
--program-prefix=eu- \
|
||||
--disable-debuginfod \
|
||||
--disable-libdebuginfod \
|
||||
--without-bzlib \
|
||||
--without-lzma \
|
||||
--without-zstd
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
+Libs: -L${libdir} -lelf @intl_LDFLAGS@
|
||||
Cflags: -I${includedir}
|
||||
|
||||
Requires.private: zlib
|
||||
Requires.private: zlib @LIBZSTD@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -652,6 +652,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
|
||||
@@ -717,6 +717,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
|
||||
AM_GNU_GETTEXT_VERSION([0.19.6])
|
||||
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=openssl
|
||||
PKG_VERSION:=3.0.8
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=4
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
@ -128,8 +128,8 @@ endef
|
|||
|
||||
define Package/libopenssl-conf/conffiles
|
||||
/etc/ssl/openssl.cnf
|
||||
$(if CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO,/etc/ssl/engines.cnf.d/devcrypto.cnf)
|
||||
$(if CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK,/etc/ssl/engines.cnf.d/padlock.cnf)
|
||||
$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO),/etc/ssl/engines.cnf.d/devcrypto.cnf)
|
||||
$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK),/etc/ssl/engines.cnf.d/padlock.cnf)
|
||||
endef
|
||||
|
||||
define Package/libopenssl-conf/description
|
||||
|
|
|
@ -17,8 +17,9 @@ default_algorithms = ALL
|
|||
# It is recommended to disable the ECB ciphers; in most cases, it will
|
||||
# only be used for PRNG, in small blocks, where performance is poor,
|
||||
# and there may be problems with apps forking with open crypto
|
||||
# contexts, leading to failures. The CBC ciphers work well:
|
||||
#CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC
|
||||
# contexts, leading to failures. The CBC ciphers work well.
|
||||
CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC, \
|
||||
AES-128-CTR, AES-192-CTR, AES-256-CTR
|
||||
|
||||
# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
|
||||
# enable [default=NONE]
|
||||
|
@ -26,6 +27,8 @@ default_algorithms = ALL
|
|||
# is poor, and there are many cases in which they will not work,
|
||||
# especially when calling fork with open crypto contexts. Openssh,
|
||||
# for example, does this, and you may not be able to login.
|
||||
#DIGESTS = NONE
|
||||
|
||||
# Sysupgrade will fail as well. If you're adventurous enough to change
|
||||
# this, you should change it back to NONE, and reboot before running
|
||||
# sysupgrade!
|
||||
DIGESTS = NONE
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Mon, 11 Mar 2019 09:29:13 -0300
|
||||
Subject: e_devcrypto: default to not use digests in engine
|
||||
|
||||
Digests are almost always slower when using /dev/crypto because of the
|
||||
cost of the context switches. Only for large blocks it is worth it.
|
||||
|
||||
Also, when forking, the open context structures are duplicated, but the
|
||||
internal kernel sessions are still shared between forks, which means an
|
||||
update/close operation in one fork affects all processes using that
|
||||
session.
|
||||
|
||||
This affects digests, especially for HMAC, where the session with the
|
||||
key hash is used as a source for subsequent operations. At least one
|
||||
popular application does this across a fork. Disabling digests by
|
||||
default will mitigate the problem, while still allowing the user to
|
||||
turn them on if it is safe and fast enough.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
--- a/engines/e_devcrypto.c
|
||||
+++ b/engines/e_devcrypto.c
|
||||
@@ -905,7 +905,7 @@ static void prepare_digest_methods(void)
|
||||
for (i = 0, known_digest_nids_amount = 0; i < OSSL_NELEM(digest_data);
|
||||
i++) {
|
||||
|
||||
- selected_digests[i] = 1;
|
||||
+ selected_digests[i] = 0;
|
||||
|
||||
/*
|
||||
* Check that the digest is usable
|
||||
@@ -1119,7 +1119,7 @@ static const ENGINE_CMD_DEFN devcrypto_c
|
||||
#ifdef IMPLEMENT_DIGEST
|
||||
{DEVCRYPTO_CMD_DIGESTS,
|
||||
"DIGESTS",
|
||||
- "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]",
|
||||
+ "either ALL, NONE, or a comma-separated list of digests to enable [default=NONE]",
|
||||
ENGINE_CMD_FLAG_STRING},
|
||||
#endif
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Mon, 11 Mar 2019 10:15:14 -0300
|
||||
Subject: e_devcrypto: ignore error when closing session
|
||||
|
||||
In cipher_init, ignore an eventual error when closing the previous
|
||||
session. It may have been closed by another process after a fork.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
--- a/engines/e_devcrypto.c
|
||||
+++ b/engines/e_devcrypto.c
|
||||
@@ -211,9 +211,8 @@ static int cipher_init(EVP_CIPHER_CTX *c
|
||||
int ret;
|
||||
|
||||
/* cleanup a previous session */
|
||||
- if (cipher_ctx->sess.ses != 0 &&
|
||||
- clean_devcrypto_session(&cipher_ctx->sess) == 0)
|
||||
- return 0;
|
||||
+ if (cipher_ctx->sess.ses != 0)
|
||||
+ clean_devcrypto_session(&cipher_ctx->sess);
|
||||
|
||||
cipher_ctx->sess.cipher = cipher_d->devcryptoid;
|
||||
cipher_ctx->sess.keylen = cipher_d->keylen;
|
|
@ -11,9 +11,9 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
PKG_NAME:=qosify
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-04-08
|
||||
PKG_SOURCE_VERSION:=ef82defaae26619e5b2ebddfdd86e9de61c399f1
|
||||
PKG_MIRROR_HASH:=8e4ca65d23a85aad774af51dc62cfaa4615111ffd2c7922258ac8f026a62b013
|
||||
PKG_SOURCE_DATE:=2023-03-07
|
||||
PKG_SOURCE_VERSION:=9a47ea4b683dd845ec94534fcd82d3117c9ab313
|
||||
PKG_MIRROR_HASH:=c4c313aed4a405492201612bdfef5e219c9a994a35f35acc84fc8327d9aa73d2
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=odhcp6c
|
||||
PKG_RELEASE:=19
|
||||
PKG_RELEASE:=20
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
||||
|
|
|
@ -39,6 +39,7 @@ proto_dhcpv6_init_config() {
|
|||
proto_config_add_boolean sourcefilter
|
||||
proto_config_add_boolean keep_ra_dnslifetime
|
||||
proto_config_add_int "ra_holdoff"
|
||||
proto_config_add_boolean verbose
|
||||
}
|
||||
|
||||
proto_dhcpv6_add_prefix() {
|
||||
|
@ -53,8 +54,8 @@ proto_dhcpv6_setup() {
|
|||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
|
||||
json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
|
||||
local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
json_for_each_item proto_dhcpv6_add_prefix ip6prefix ip6prefixes
|
||||
|
||||
# Configure
|
||||
|
@ -90,6 +91,8 @@ proto_dhcpv6_setup() {
|
|||
|
||||
[ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff"
|
||||
|
||||
[ "$verbose" = "1" ] && append opts "-v"
|
||||
|
||||
local opt
|
||||
for opt in $reqopts; do
|
||||
append opts "-r$opt"
|
||||
|
|
|
@ -142,7 +142,7 @@ CONFIG_PKCS12=y
|
|||
|
||||
# RADIUS authentication server. This provides access to the integrated EAP
|
||||
# server from external hosts using RADIUS.
|
||||
#CONFIG_RADIUS_SERVER=y
|
||||
CONFIG_RADIUS_SERVER=y
|
||||
|
||||
# Build IPv6 support for RADIUS operations
|
||||
CONFIG_IPV6=y
|
||||
|
|
|
@ -265,11 +265,11 @@ hostapd_common_add_bss_config() {
|
|||
config_add_int ieee80211w
|
||||
config_add_int eapol_version
|
||||
|
||||
config_add_string 'auth_server:host' 'server:host'
|
||||
config_add_array auth_server acct_server
|
||||
config_add_string 'server:host'
|
||||
config_add_string auth_secret key
|
||||
config_add_int 'auth_port:port' 'port:port'
|
||||
|
||||
config_add_string acct_server
|
||||
config_add_string acct_secret
|
||||
config_add_int acct_port
|
||||
config_add_int acct_interval
|
||||
|
@ -524,6 +524,20 @@ append_airtime_sta_weight() {
|
|||
[ -n "$1" ] && append bss_conf "airtime_sta_weight=$1" "$N"
|
||||
}
|
||||
|
||||
append_auth_server() {
|
||||
[ -n "$1" ] || return
|
||||
append bss_conf "auth_server_addr=$1" "$N"
|
||||
append bss_conf "auth_server_port=$auth_port" "$N"
|
||||
[ -n "$auth_secret" ] && append bss_conf "auth_server_shared_secret=$auth_secret" "$N"
|
||||
}
|
||||
|
||||
append_acct_server() {
|
||||
[ -n "$1" ] || return
|
||||
append bss_conf "acct_server_addr=$1" "$N"
|
||||
append bss_conf "acct_server_port=$acct_port" "$N"
|
||||
[ -n "$acct_secret" ] && append bss_conf "acct_server_shared_secret=$acct_secret" "$N"
|
||||
}
|
||||
|
||||
hostapd_set_bss_options() {
|
||||
local var="$1"
|
||||
local phy="$2"
|
||||
|
@ -542,7 +556,7 @@ hostapd_set_bss_options() {
|
|||
wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \
|
||||
macfilter ssid utf8_ssid wmm uapsd hidden short_preamble rsn_preauth \
|
||||
iapp_interface eapol_version dynamic_vlan ieee80211w nasid \
|
||||
acct_server acct_secret acct_port acct_interval \
|
||||
acct_secret acct_port acct_interval \
|
||||
bss_load_update_period chan_util_avg_period sae_require_mfp sae_pwe \
|
||||
multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \
|
||||
ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \
|
||||
|
@ -614,15 +628,10 @@ hostapd_set_bss_options() {
|
|||
set_default nasid "${macaddr//\:}"
|
||||
append bss_conf "nas_identifier=$nasid" "$N"
|
||||
|
||||
[ -n "$acct_server" ] && {
|
||||
append bss_conf "acct_server_addr=$acct_server" "$N"
|
||||
append bss_conf "acct_server_port=$acct_port" "$N"
|
||||
[ -n "$acct_secret" ] && \
|
||||
append bss_conf "acct_server_shared_secret=$acct_secret" "$N"
|
||||
[ -n "$acct_interval" ] && \
|
||||
append bss_conf "radius_acct_interim_interval=$acct_interval" "$N"
|
||||
json_for_each_item append_radius_acct_req_attr radius_acct_req_attr
|
||||
}
|
||||
[ -n "$acct_interval" ] && \
|
||||
append bss_conf "radius_acct_interim_interval=$acct_interval" "$N"
|
||||
json_for_each_item append_acct_server acct_server
|
||||
json_for_each_item append_radius_acct_req_attr radius_acct_req_attr
|
||||
|
||||
[ -n "$ocv" ] && append bss_conf "ocv=$ocv" "$N"
|
||||
|
||||
|
@ -659,11 +668,9 @@ hostapd_set_bss_options() {
|
|||
psk|sae|psk-sae)
|
||||
json_get_vars key wpa_psk_file
|
||||
if [ "$auth_type" = "psk" ] && [ "$ppsk" -ne 0 ] ; then
|
||||
json_get_vars auth_server auth_secret auth_port
|
||||
json_get_vars auth_secret auth_port
|
||||
set_default auth_port 1812
|
||||
append bss_conf "auth_server_addr=$auth_server" "$N"
|
||||
append bss_conf "auth_server_port=$auth_port" "$N"
|
||||
append bss_conf "auth_server_shared_secret=$auth_secret" "$N"
|
||||
json_for_each_item append_auth_server auth_server
|
||||
append bss_conf "macaddr_acl=2" "$N"
|
||||
append bss_conf "wpa_psk_radius=2" "$N"
|
||||
elif [ ${#key} -eq 64 ]; then
|
||||
|
@ -732,12 +739,7 @@ hostapd_set_bss_options() {
|
|||
set_default dae_port 3799
|
||||
set_default request_cui 0
|
||||
|
||||
[ "$eap_server" -eq 0 ] && {
|
||||
append bss_conf "auth_server_addr=$auth_server" "$N"
|
||||
append bss_conf "auth_server_port=$auth_port" "$N"
|
||||
append bss_conf "auth_server_shared_secret=$auth_secret" "$N"
|
||||
}
|
||||
|
||||
[ "$eap_server" -eq 0 ] && json_for_each_item append_auth_server auth_server
|
||||
[ "$request_cui" -gt 0 ] && append bss_conf "radius_request_cui=$request_cui" "$N"
|
||||
[ -n "$eap_reauth_period" ] && append bss_conf "eap_reauth_period=$eap_reauth_period" "$N"
|
||||
|
||||
|
@ -777,9 +779,7 @@ hostapd_set_bss_options() {
|
|||
[ -n "$auth_server" ] && {
|
||||
set_default auth_port 1812
|
||||
|
||||
append bss_conf "auth_server_addr=$auth_server" "$N"
|
||||
append bss_conf "auth_server_port=$auth_port" "$N"
|
||||
[ -n "$auth_secret" ] && append bss_conf "auth_server_shared_secret=$auth_secret" "$N"
|
||||
json_for_each_item append_auth_server auth_server
|
||||
[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N"
|
||||
[ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N"
|
||||
append bss_conf "macaddr_acl=2" "$N"
|
||||
|
|
|
@ -1084,6 +1084,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
}
|
||||
|
||||
__hostapd_bss_mgmt_enable(hapd, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
|||
|
||||
PKG_SOURCE_URL:=https://github.com/libbpf/bpftool
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-03-08
|
||||
PKG_SOURCE_VERSION:=04c465fd1f561f67796dc68bbfe1aa7cfa956c3c
|
||||
PKG_MIRROR_HASH:=e22a954cd186f43228a96586bbdc120b11e6c87360ab88ae96ba37afb9c7cb58
|
||||
PKG_SOURCE_DATE:=7.1.0
|
||||
PKG_SOURCE_VERSION:=b01941c8f7890489f09713348a7d89567538504b
|
||||
PKG_MIRROR_HASH:=641fb337342e25ae784a3efe72c71d8c88600a326300d8d5834e26be21547015
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
|
||||
PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
|
||||
|
@ -82,7 +82,7 @@ endef
|
|||
# LTO not compatible with DSO using PIC
|
||||
ifneq ($(BUILD_VARIANT),lib)
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections -flto
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),full)
|
||||
|
@ -102,11 +102,11 @@ MAKE_FLAGS += \
|
|||
LIBSUBDIR=lib \
|
||||
check_feat=0 \
|
||||
feature-clang-bpf-co-re=0 \
|
||||
feature-reallocarray=1 \
|
||||
feature-zlib=1 \
|
||||
feature-libbfd=$(full) \
|
||||
feature-llvm=0 \
|
||||
feature-libcap=0 \
|
||||
feature-disassembler-four-args=$(full)
|
||||
feature-disassembler-four-args=1 \
|
||||
feature-disassembler-init-styled=1
|
||||
|
||||
ifeq ($(BUILD_VARIANT),lib)
|
||||
MAKE_PATH = libbpf/src
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- a/libbpf/src/Makefile
|
||||
+++ b/libbpf/src/Makefile
|
||||
@@ -25,6 +25,7 @@ ALL_CFLAGS := $(INCLUDES)
|
||||
@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES)
|
||||
|
||||
SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED
|
||||
|
||||
+CFLAGS = $(EXTRA_CFLAGS)
|
||||
CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89
|
||||
ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
ALL_LDFLAGS += $(LDFLAGS)
|
||||
ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(EXTRA_CFLAGS)
|
||||
ALL_LDFLAGS += $(LDFLAGS) $(EXTRA_LDFLAGS)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
@@ -73,10 +73,10 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-p
|
||||
CFLAGS += $(filter-out -Wswitch-enum -Wnested-externs,$(EXTRA_WARNINGS))
|
||||
CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
|
||||
-I$(if $(OUTPUT),$(OUTPUT),.) \
|
||||
-I$(or $(OUTPUT),.) \
|
||||
- -I$(LIBBPF_INCLUDE) \
|
||||
-I$(srctree)/src/kernel/bpf/ \
|
||||
-I$(srctree)/include \
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uci
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE=2021-10-22
|
||||
PKG_SOURCE_VERSION:=f84f49f00fb70364f58b4cce72f1796a7190d370
|
||||
PKG_MIRROR_HASH:=9f4747a029976b43fcea9919643ce71e587e515edc21b280163f7262360d847f
|
||||
PKG_SOURCE_DATE=2023-03-05
|
||||
PKG_SOURCE_VERSION:=04d0c46cfe30f557da0c603516636830cab4a08a
|
||||
PKG_MIRROR_HASH:=5402091db0645d19a60c3ec51850062138af8fb9eda6764091819637d84f1036
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dtc
|
||||
PKG_VERSION:=1.6.1
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473
|
||||
PKG_HASH:=29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4
|
||||
PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
|
||||
|
||||
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
|
||||
|
|
|
@ -1,137 +0,0 @@
|
|||
From 17739b7ef510917471409d71fb45d8eaf6a1e1fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 9 Dec 2021 07:14:20 +0100
|
||||
Subject: [PATCH] Support 'r' format for printing raw bytes with fdtget
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
FT is sometimes used for storing raw data. That is quite common for
|
||||
U-Boot FIT images.
|
||||
|
||||
Extracting such data is not trivial currently. Using type 's' (string)
|
||||
will replace every 0x00 (NUL) with 0x20 (space). Using type 'x' will
|
||||
print bytes but in xxd incompatible format.
|
||||
|
||||
This commit adds support for 'r' (raw) format. Example usage:
|
||||
fdtget -t r firmware.itb /images/foo data > image.raw
|
||||
|
||||
Support for encoding isn't added as there isn't any clean way of passing
|
||||
binary data as command line argument.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Message-Id: <20211209061420.29466-1-zajec5@gmail.com>
|
||||
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||
---
|
||||
Documentation/manual.txt | 2 +-
|
||||
fdtget.c | 5 +++++
|
||||
fdtput.c | 2 ++
|
||||
tests/run_tests.sh | 2 ++
|
||||
tests/utilfdt_test.c | 5 ++++-
|
||||
util.c | 4 ++--
|
||||
util.h | 3 ++-
|
||||
7 files changed, 18 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/Documentation/manual.txt
|
||||
+++ b/Documentation/manual.txt
|
||||
@@ -712,7 +712,7 @@ The syntax of the fdtget command is:
|
||||
|
||||
where options are:
|
||||
|
||||
- <type> s=string, i=int, u=unsigned, x=hex
|
||||
+ <type> s=string, i=int, u=unsigned, x=hex, r=raw
|
||||
Optional modifier prefix:
|
||||
hh or b=byte, h=2 byte, l=4 byte (default)
|
||||
|
||||
--- a/fdtget.c
|
||||
+++ b/fdtget.c
|
||||
@@ -91,6 +91,11 @@ static int show_data(struct display_info
|
||||
if (len == 0)
|
||||
return 0;
|
||||
|
||||
+ if (disp->type == 'r') {
|
||||
+ fwrite(data, 1, len, stdout);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
is_string = (disp->type) == 's' ||
|
||||
(!disp->type && util_is_printable_string(data, len));
|
||||
if (is_string) {
|
||||
--- a/fdtput.c
|
||||
+++ b/fdtput.c
|
||||
@@ -433,6 +433,8 @@ int main(int argc, char *argv[])
|
||||
if (utilfdt_decode_type(optarg, &disp.type,
|
||||
&disp.size))
|
||||
usage("Invalid type string");
|
||||
+ if (disp.type == 'r')
|
||||
+ usage("Unsupported raw data type");
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
--- a/tests/run_tests.sh
|
||||
+++ b/tests/run_tests.sh
|
||||
@@ -852,6 +852,8 @@ fdtget_tests () {
|
||||
run_fdtget_test 8000 -tx $dtb /cpus/PowerPC,970@1 d-cache-size
|
||||
run_fdtget_test "61 62 63 0" -tbx $dtb /randomnode tricky1
|
||||
run_fdtget_test "a b c d de ea ad be ef" -tbx $dtb /randomnode blob
|
||||
+ run_fdtget_test "MyBoardName\0MyBoardFamilyName\0" -tr $dtb / compatible
|
||||
+ run_fdtget_test "\x0a\x0b\x0c\x0d\xde\xea\xad\xbe\xef" -tr $dtb /randomnode blob
|
||||
|
||||
# Here the property size is not a multiple of 4 bytes, so it should fail
|
||||
run_wrap_error_test $DTGET -tlx $dtb /randomnode mixed
|
||||
--- a/tests/utilfdt_test.c
|
||||
+++ b/tests/utilfdt_test.c
|
||||
@@ -73,6 +73,9 @@ static void check_sizes(char *modifier,
|
||||
|
||||
*ptr = 's';
|
||||
check(fmt, 's', -1);
|
||||
+
|
||||
+ *ptr = 'r';
|
||||
+ check(fmt, 'r', -1);
|
||||
}
|
||||
|
||||
static void test_utilfdt_decode_type(void)
|
||||
@@ -90,7 +93,7 @@ static void test_utilfdt_decode_type(voi
|
||||
/* try every other character */
|
||||
checkfail("");
|
||||
for (ch = ' '; ch < 127; ch++) {
|
||||
- if (!strchr("iuxs", ch)) {
|
||||
+ if (!strchr("iuxsr", ch)) {
|
||||
*fmt = ch;
|
||||
fmt[1] = '\0';
|
||||
checkfail(fmt);
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -353,11 +353,11 @@ int utilfdt_decode_type(const char *fmt,
|
||||
}
|
||||
|
||||
/* we should now have a type */
|
||||
- if ((*fmt == '\0') || !strchr("iuxs", *fmt))
|
||||
+ if ((*fmt == '\0') || !strchr("iuxsr", *fmt))
|
||||
return -1;
|
||||
|
||||
/* convert qualifier (bhL) to byte size */
|
||||
- if (*fmt != 's')
|
||||
+ if (*fmt != 's' && *fmt != 'r')
|
||||
*size = qualifier == 'b' ? 1 :
|
||||
qualifier == 'h' ? 2 :
|
||||
qualifier == 'l' ? 4 : -1;
|
||||
--- a/util.h
|
||||
+++ b/util.h
|
||||
@@ -143,6 +143,7 @@ int utilfdt_write_err(const char *filena
|
||||
* i signed integer
|
||||
* u unsigned integer
|
||||
* x hex
|
||||
+ * r raw
|
||||
*
|
||||
* TODO: Implement ll modifier (8 bytes)
|
||||
* TODO: Implement o type (octal)
|
||||
@@ -160,7 +161,7 @@ int utilfdt_decode_type(const char *fmt,
|
||||
*/
|
||||
|
||||
#define USAGE_TYPE_MSG \
|
||||
- "<type>\ts=string, i=int, u=unsigned, x=hex\n" \
|
||||
+ "<type>\ts=string, i=int, u=unsigned, x=hex, r=raw\n" \
|
||||
"\tOptional modifier prefix:\n" \
|
||||
"\t\thh or b=byte, h=2 byte, l=4 byte (default)";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fritz-tools
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
|
|
@ -210,7 +210,7 @@ int main(int argc, char **argv)
|
|||
if (argc > 1 && optind <= argc) {
|
||||
in = fopen(argv[optind], "r");
|
||||
if (!in) {
|
||||
perror("Failed to create output file");
|
||||
perror("Failed to open input file");
|
||||
goto out_bad;
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,9 @@ out_bad:
|
|||
ret = EXIT_FAILURE;
|
||||
|
||||
out:
|
||||
fclose(in);
|
||||
fclose(out);
|
||||
if (in)
|
||||
fclose(in);
|
||||
if (out)
|
||||
fclose(out);
|
||||
return ret;
|
||||
}
|
||||
|
|
4
rules.mk
4
rules.mk
|
@ -283,8 +283,8 @@ export HOSTCC_NOCACHE
|
|||
export HOSTCXX_NOCACHE
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
TARGET_CC:= ccache_cc
|
||||
TARGET_CXX:= ccache_cxx
|
||||
TARGET_CC:= ccache $(TARGET_CC)
|
||||
TARGET_CXX:= ccache $(TARGET_CXX)
|
||||
HOSTCC:= ccache $(HOSTCC)
|
||||
HOSTCXX:= ccache $(HOSTCXX)
|
||||
export CCACHE_BASEDIR:=$(TOPDIR)
|
||||
|
|
|
@ -51,6 +51,7 @@ image:
|
|||
make image EXTRA_IMAGE_NAME="<string>" # Add this to the output image filename (sanitized)
|
||||
make image DISABLED_SERVICES="<svc1> [<svc2> [<svc3> ..]]" # Which services in /etc/init.d/ should be disabled
|
||||
make image ADD_LOCAL_KEY=1 # store locally generated signing key in built images
|
||||
make image ROOTFS_PARTSIZE="<size>" # override the default rootfs partition size in MegaBytes
|
||||
|
||||
manifest:
|
||||
List "all" packages which get installed into the image.
|
||||
|
@ -261,7 +262,8 @@ image:
|
|||
$(if $(FILES),USER_FILES="$(FILES)") \
|
||||
$(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \
|
||||
$(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)") \
|
||||
$(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)"))
|
||||
$(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)") \
|
||||
$(if $(ROOTFS_PARTSIZE),CONFIG_TARGET_ROOTFS_PARTSIZE="$(ROOTFS_PARTSIZE)"))
|
||||
|
||||
manifest: FORCE
|
||||
$(MAKE) -s _check_profile
|
||||
|
|
|
@ -10,8 +10,7 @@ BOARDNAME:=Microchip (Atmel AT91)
|
|||
FEATURES:=ext4 squashfs targz usbgadget ubifs
|
||||
SUBTARGETS:=sama7 sama5 sam9x
|
||||
|
||||
KERNEL_PATCHVER:=5.10
|
||||
KERNEL_TESTING_PATCHVER:=5.15
|
||||
KERNEL_PATCHVER:=5.15
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
led_user: user {
|
||||
label = "green:user";
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
gpios = <&gpio 3 (GPIO_ACTIVE_LOW|GPIO_OPEN_DRAIN)>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -814,48 +814,41 @@ define Device/devolo_dlan-pro-1200plus-ac
|
|||
endef
|
||||
TARGET_DEVICES += devolo_dlan-pro-1200plus-ac
|
||||
|
||||
define Device/devolo_dvl1200e
|
||||
define Device/devolo_wifi-pro
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := devolo
|
||||
DEVICE_MODEL := WiFi pro 1200e
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 15936k
|
||||
endef
|
||||
|
||||
define Device/devolo_dvl1200e
|
||||
$(Device/devolo_wifi-pro)
|
||||
DEVICE_MODEL := WiFi pro 1200e
|
||||
endef
|
||||
TARGET_DEVICES += devolo_dvl1200e
|
||||
|
||||
define Device/devolo_dvl1200i
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := devolo
|
||||
$(Device/devolo_wifi-pro)
|
||||
DEVICE_MODEL := WiFi pro 1200i
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 15936k
|
||||
endef
|
||||
TARGET_DEVICES += devolo_dvl1200i
|
||||
|
||||
define Device/devolo_dvl1750c
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := devolo
|
||||
$(Device/devolo_wifi-pro)
|
||||
DEVICE_MODEL := WiFi pro 1750c
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 15936k
|
||||
endef
|
||||
TARGET_DEVICES += devolo_dvl1750c
|
||||
|
||||
define Device/devolo_dvl1750e
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := devolo
|
||||
$(Device/devolo_wifi-pro)
|
||||
DEVICE_MODEL := WiFi pro 1750e
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 15936k
|
||||
DEVICE_PACKAGES += kmod-usb2
|
||||
endef
|
||||
TARGET_DEVICES += devolo_dvl1750e
|
||||
|
||||
define Device/devolo_dvl1750i
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := devolo
|
||||
$(Device/devolo_wifi-pro)
|
||||
DEVICE_MODEL := WiFi pro 1750i
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 15936k
|
||||
endef
|
||||
TARGET_DEVICES += devolo_dvl1750i
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ SVN-Revision: 35130
|
|||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
@@ -926,10 +927,10 @@ static void tcp_v6_send_response(const s
|
||||
@@ -927,10 +928,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue