Skip to content

Commit

Permalink
modules: sync openwrt upstream kernel modules
Browse files Browse the repository at this point in the history
Signed-off-by: sbwml <[email protected]>
  • Loading branch information
sbwml committed Jan 13, 2025
1 parent 715afb1 commit 5c19b37
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 14 deletions.
3 changes: 2 additions & 1 deletion openwrt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export gitea=git.cooluc.com

# github mirror
if [ "$isCN" = "CN" ]; then
export github="ghgo.xyz/github.com"
# There is currently no stable gh proxy
export github="github.com"
else
export github="github.com"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Signed-off-by: Alexandre Frade <[email protected]>
struct rate_sample *rs);
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2765,6 +2765,7 @@ static bool tcp_write_xmit(struct sock *
@@ -2767,6 +2767,7 @@ static bool tcp_write_xmit(struct sock *
skb_set_delivery_time(skb, tp->tcp_wstamp_ns, SKB_CLOCK_MONOTONIC);
list_move_tail(&skb->tcp_tsorted_anchor, &tp->tsorted_sent_queue);
tcp_init_tso_segs(skb, mss_now);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Signed-off-by: Alexandre Frade <[email protected]>
* between different flows.
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1601,7 +1601,7 @@ int tcp_fragment(struct sock *sk, enum t
@@ -1603,7 +1603,7 @@ int tcp_fragment(struct sock *sk, enum t
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff;
Expand All @@ -64,7 +64,7 @@ Signed-off-by: Alexandre Frade <[email protected]>
long limit;
int nlen;
u8 flags;
@@ -1676,6 +1676,30 @@ int tcp_fragment(struct sock *sk, enum t
@@ -1678,6 +1678,30 @@ int tcp_fragment(struct sock *sk, enum t

if (diff)
tcp_adjust_pcount(sk, skb, diff);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Signed-off-by: Alexandre Frade <[email protected]>
};
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2057,13 +2057,12 @@ static u32 tcp_tso_autosize(const struct
@@ -2059,13 +2059,12 @@ static u32 tcp_tso_autosize(const struct
static u32 tcp_tso_segs(struct sock *sk, unsigned int mss_now)
{
const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Signed-off-by: Alexandre Frade <[email protected]>
fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -3003,6 +3003,7 @@ void tcp_send_loss_probe(struct sock *sk
@@ -3005,6 +3005,7 @@ void tcp_send_loss_probe(struct sock *sk
if (WARN_ON(!skb || !tcp_skb_pcount(skb)))
goto rearm_timer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Signed-off-by: sbwml <[email protected]>

--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -7884,8 +7884,6 @@ static int btf_module_notify(struct noti
@@ -8028,8 +8028,6 @@ static int btf_module_notify(struct noti
pr_warn("failed to validate module [%s] BTF: %ld\n",
mod->name, PTR_ERR(btf));
err = PTR_ERR(btf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Signed-off-by: Xiaoping Fan <[email protected]>

len = skb->len;
trace_net_dev_start_xmit(skb, dev);
@@ -5417,6 +5426,11 @@ void netdev_rx_handler_unregister(struct
@@ -5419,6 +5428,11 @@ void netdev_rx_handler_unregister(struct
}
EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);

Expand All @@ -123,7 +123,7 @@ Signed-off-by: Xiaoping Fan <[email protected]>
/*
* Limit the use of PFMEMALLOC reserves to those protocols that implement
* the special handling of PFMEMALLOC skbs.
@@ -5465,6 +5479,10 @@ static int __netif_receive_skb_core(stru
@@ -5467,6 +5481,10 @@ static int __netif_receive_skb_core(stru
int ret = NET_RX_DROP;
__be16 type;

Expand All @@ -134,7 +134,7 @@ Signed-off-by: Xiaoping Fan <[email protected]>
net_timestamp_check(!READ_ONCE(net_hotdata.tstamp_prequeue), skb);

trace_netif_receive_skb(skb);
@@ -5503,6 +5521,16 @@ another_round:
@@ -5505,6 +5523,16 @@ another_round:
goto out;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -11083,6 +11083,24 @@ static int nft_validate_register_load(en
@@ -11101,6 +11101,24 @@ static int nft_validate_register_load(en
return 0;
}

Expand Down
20 changes: 20 additions & 0 deletions openwrt/patch/openwrt-6.x/modules/crypto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,26 @@ endef
$(eval $(call KernelPackage,crypto-hmac))


define KernelPackage/crypto-hw-atmel
TITLE:=Microchip / Atmel ECC/SHA/RNG hw accelerator
DEPENDS:=+kmod-i2c-core +kmod-crypto-ecdh +kmod-crypto-sha1 \
+kmod-crypto-sha256 +kmod-lib-crc16 +kmod-random-core
KCONFIG:= \
CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_ATMEL_I2C \
CONFIG_CRYPTO_DEV_ATMEL_ECC \
CONFIG_CRYPTO_DEV_ATMEL_SHA204A
FILES:= \
$(LINUX_DIR)/drivers/crypto/atmel-i2c.ko \
$(LINUX_DIR)/drivers/crypto/atmel-ecc.ko \
$(LINUX_DIR)/drivers/crypto/atmel-sha204a.ko
AUTOLOAD:=$(call AutoLoad,09,atmel-i2c atmel-ecc atmel-sha204a)
$(call AddDepends/crypto)
endef

$(eval $(call KernelPackage,crypto-hw-atmel))


define KernelPackage/crypto-hw-ccp
TITLE:=AMD Cryptographic Coprocessor
DEPENDS:= \
Expand Down
35 changes: 35 additions & 0 deletions openwrt/patch/openwrt-6.x/modules/leds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,24 @@ endef
$(eval $(call KernelPackage,leds-apu))


define KernelPackage/leds-ktd202x
SUBMENU:=LED modules
TITLE:=LED support for KTD202x Chips
DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c
KCONFIG:=CONFIG_LEDS_KTD202X
FILES:= $(LINUX_DIR)/drivers/leds/rgb/leds-ktd202x.ko
AUTOLOAD:=$(call AutoProbe,leds-ktd202x,1)
endef

define KernelPackage/leds-ktd202x/description
This option enables support for the Kinetic KTD2026/KTD2027
RGB/White LED driver found in different BQ mobile phones.
It is a 3 or 4 channel LED driver programmed via an I2C interface.
endef

$(eval $(call KernelPackage,leds-ktd202x))


define KernelPackage/leds-mlxcpld
SUBMENU:=$(LEDS_MENU)
TITLE:=LED support for the Mellanox boards
Expand Down Expand Up @@ -215,6 +233,23 @@ endef
$(eval $(call KernelPackage,leds-pwm))


define KernelPackage/leds-st1202
SUBMENU:=LED modules
TITLE:=LED support for ST LED1202 I2C chips
DEPENDS:=+kmod-i2c-core +kmod-ledtrig-pattern
KCONFIG:=CONFIG_LEDS_ST1202
FILES:= $(LINUX_DIR)/drivers/leds/leds-st1202.ko
AUTOLOAD:=$(call AutoProbe,leds-st1202)
endef

define KernelPackage/leds-st1202/description
This option enables support for LEDs connected to LED1202
LED driver chips accessed via the I2C bus.
endef

$(eval $(call KernelPackage,leds-st1202))


define KernelPackage/leds-tlc591xx
SUBMENU:=$(LEDS_MENU)
TITLE:=LED driver for TLC59108 and TLC59116 controllers
Expand Down
24 changes: 23 additions & 1 deletion openwrt/patch/openwrt-6.x/modules/netdevices.mk
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ $(eval $(call KernelPackage,8139cp))
define KernelPackage/r8169
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=RealTek RTL-8169 PCI Gigabit Ethernet Adapter kernel support
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +kmod-mdio-devres
DEPENDS:=@PCI_SUPPORT +kmod-mii +r8169-firmware +kmod-phy-realtek +kmod-mdio-devres +kmod-hwmon-core
KCONFIG:= \
CONFIG_R8169 \
CONFIG_R8169_LEDS=y
Expand Down Expand Up @@ -1525,6 +1525,28 @@ endef

$(eval $(call KernelPackage,bnx2x))

define KernelPackage/bnxt-en
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Broadcom NetXtreme-C/E network driver
DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core +kmod-lib-crc32c +kmod-mdio +kmod-ptp
FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnxt/bnxt_en.ko
KCONFIG:= \
CONFIG_BNXT \
CONFIG_BNXT_SRIOV=y \
CONFIG_BNXT_FLOWER_OFFLOAD=y \
CONFIG_BNXT_DCB=n \
CONFIG_BNXT_HWMON=y
AUTOLOAD:=$(call AutoProbe,bnxt_en)
endef

define KernelPackage/bnxt-en/description
Supports Broadcom NetXtreme-C/E based Ethernet NICs including:
* BCM573xx
* BCM574xx
endef

$(eval $(call KernelPackage,bnxt-en))

define KernelPackage/be2net
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Broadcom Emulex OneConnect 10Gbps NIC
Expand Down
34 changes: 34 additions & 0 deletions openwrt/patch/openwrt-6.x/modules/netfilter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,40 @@ endef
$(eval $(call KernelPackage,nfnetlink-queue))


define KernelPackage/nfnetlink-cthelper
TITLE:=Netfilter User space conntrack helpers
FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_cthelper.ko
KCONFIG:=CONFIG_NF_CT_NETLINK_HELPER
AUTOLOAD:=$(call AutoProbe,nfnetlink_cthelper)
$(call AddDepends/nfnetlink,+kmod-nfnetlink-queue +kmod-nf-conntrack-netlink)
endef

define KernelPackage/nfnetlink-cthelper/description
Kernel modules support for a netlink-based connection tracking
userspace helpers interface
endef

$(eval $(call KernelPackage,nfnetlink-cthelper))


define KernelPackage/nfnetlink-cttimeout
TITLE:=Netfilter conntrack expectation timeout
FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_cttimeout.ko
KCONFIG:=CONFIG_NF_CT_NETLINK_TIMEOUT
AUTOLOAD:=$(call AutoProbe,nfnetlink_cttimeout)
$(call AddDepends/nfnetlink,+kmod-nf-conntrack @KERNEL_NF_CONNTRACK_TIMEOUT)
endef

define KernelPackage/nfnetlink-cttimeout/description
Kernel modules support for a netlink-based connection tracking
userspace timeout interface

Requires CONFIG_NF_CONNTRACK_TIMEOUT (only enabled for non-small flash devices)
endef

$(eval $(call KernelPackage,nfnetlink-cttimeout))


define KernelPackage/nf-conntrack-netlink
TITLE:=Connection tracking netlink interface
FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
Expand Down
3 changes: 2 additions & 1 deletion openwrt/patch/openwrt-6.x/modules/netsupport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ endef
$(eval $(call KernelPackage,bpf-test))


SCHED_MODULES_EXTRA = sch_codel sch_gred sch_multiq sch_sfq sch_teql sch_fq act_pedit act_simple act_skbmod act_csum em_cmp em_nbyte em_meta em_text
SCHED_MODULES_EXTRA = sch_codel sch_gred sch_multiq sch_sfq sch_teql sch_fq sch_ets act_pedit act_simple act_skbmod act_csum em_cmp em_nbyte em_meta em_text
SCHED_FILES_EXTRA = $(foreach mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)

define KernelPackage/sched
Expand All @@ -1040,6 +1040,7 @@ define KernelPackage/sched
CONFIG_NET_SCH_SFQ \
CONFIG_NET_SCH_TEQL \
CONFIG_NET_SCH_FQ \
CONFIG_NET_SCH_ETS \
CONFIG_NET_ACT_PEDIT \
CONFIG_NET_ACT_SIMP \
CONFIG_NET_ACT_SKBMOD \
Expand Down
17 changes: 17 additions & 0 deletions openwrt/patch/openwrt-6.x/modules/usb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,23 @@ endef
$(eval $(call KernelPackage,usb-dwc3))


define KernelPackage/usb-dwc3-octeon
TITLE:=DWC3 Cavium Octeon USB driver
DEPENDS:=@TARGET_octeon +kmod-usb-dwc3
KCONFIG:= CONFIG_USB_DWC3_OCTEON
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-octeon.ko
AUTOLOAD:=$(call AutoProbe,dwc3-octeon,1)
$(call AddDepends/usb)
endef

define KernelPackage/usb-dwc3-octeon/description
This driver adds support for Cavium Octeon platforms with DesignWare
Core USB3 IP.
endef

$(eval $(call KernelPackage,usb-dwc3-octeon))


define KernelPackage/usb-dwc3-qcom
TITLE:=DWC3 Qualcomm USB driver
DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_qualcommax) +kmod-usb-dwc3
Expand Down
2 changes: 1 addition & 1 deletion openwrt/scripts/01-prepare_base-mainline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ curl -s $mirror/openwrt/patch/iproute2/902-ss-display-ecn_low-if-tcp_info-tcpi_o
rm -rf package/firmware/linux-firmware
git clone https://$github/sbwml/package_firmware_linux-firmware package/firmware/linux-firmware

# mt76 - 2024-10-11
# mt76
mkdir -p package/kernel/mt76/patches
curl -s $mirror/openwrt/patch/mt76/patches/100-fix-build-with-mac80211-6.11-backport.patch > package/kernel/mt76/patches/100-fix-build-with-mac80211-6.11-backport.patch
curl -s $mirror/openwrt/patch/mt76/patches/101-fix-build-with-linux-6.12rc2.patch > package/kernel/mt76/patches/101-fix-build-with-linux-6.12rc2.patch
Expand Down

0 comments on commit 5c19b37

Please sign in to comment.