Skip to content

Commit

Permalink
Merge branch 'openwrt:openwrt-23.05' into openwrt-23.05
Browse files Browse the repository at this point in the history
  • Loading branch information
openwrtdiy authored Apr 26, 2024
2 parents eb1cc62 + a48786e commit b38b224
Show file tree
Hide file tree
Showing 19 changed files with 543 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/feeds
/feeds.conf
/files
/target/linux/feeds
/overlay
/package/feeds
/package/openwrt-packages
Expand Down
14 changes: 14 additions & 0 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -1340,3 +1340,17 @@ config KERNEL_UBIFS_FS_SECURITY

config KERNEL_JFFS2_FS_SECURITY
bool "JFFS2 Security Labels"

config KERNEL_WERROR
bool "Compile the kernel with warnings as errors"
help
A kernel build should not cause any compiler warnings, and this
enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
to enforce that rule by default. Certain warnings from other tools
such as the linker may be upgraded to errors with this option as
well.

However, if you have a new (or very old) compiler or linker with odd
and unusual warnings, or you have some architecture with problems,
you may need to disable this config option in order to
successfully build the kernel.
34 changes: 34 additions & 0 deletions package/kernel/linux/modules/leds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,37 @@ define KernelPackage/input-leds/description
endef

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


define KernelPackage/leds-lp55xx-common
SUBMENU:=$(LEDS_MENU)
TITLE:=LED common driver for LP5521/LP5523/LP55231/LP5562 controllers
DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_LEDS_LP55XX_COMMON
FILES:=$(LINUX_DIR)/drivers/leds/leds-lp55xx-common.ko
AUTOLOAD:=$(call AutoLoad,60,leds-lp55xx-common,1)
endef

define KernelPackage/leds-lp55xx-common/description
This option enables support for Texas Instruments
LP5521/LP5523/LP55231/LP5562 common driver.
endef

$(eval $(call KernelPackage,leds-lp55xx-common))


define KernelPackage/leds-lp5562
SUBMENU:=$(LEDS_MENU)
TITLE:=LED driver for LP5562 controllers
DEPENDS:=+kmod-i2c-core +kmod-leds-lp55xx-common
KCONFIG:=CONFIG_LEDS_LP5562
FILES:=$(LINUX_DIR)/drivers/leds/leds-lp5562.ko
AUTOLOAD:=$(call AutoLoad,60,leds-lp5562,1)
endef

define KernelPackage/leds-lp5562/description
This option enables support for Texas Instruments LP5562
LED controllers.
endef

$(eval $(call KernelPackage,leds-lp5562))
2 changes: 1 addition & 1 deletion package/network/config/netifd/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=netifd
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set_hex_val() {
local val="$2"
val="$(printf %x "$val")"
[ -n "$DEBUG" ] && echo "$file = $val"
echo "$val" > "$file"
echo "$val" > "$file" 2>/dev/null
}

packet_steering="$(uci get "network.@globals[0].packet_steering")"
Expand Down
2 changes: 2 additions & 0 deletions scripts/package-metadata.pl
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ ()
license => "GPL-2.0",
cpe_id => "cpe:/o:linux:linux_kernel",
name => "kernel",
category => "operating-system",
};

my %abimap;
Expand Down Expand Up @@ -703,6 +704,7 @@ ()
if ($pkg->{category}) {
my $category = $pkg->{category};
my %cat_type = (
"operating-system" => "operating-system",
"Firmware" => "firmware",
"Libraries" => "library"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
.phy_id = PHY_ID_BCM5461,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM5461",
@@ -975,7 +983,8 @@ module_phy_driver(broadcom_drivers);
@@ -977,7 +985,8 @@ module_phy_driver(broadcom_drivers);
static struct mdio_device_id __maybe_unused broadcom_tbl[] = {
{ PHY_ID_BCM5411, 0xfffffff0 },
{ PHY_ID_BCM5421, 0xfffffff0 },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 2203718c2f59ffdd6c78d54e5add594aebb4461e Mon Sep 17 00:00:00 2001
From: Georgi Valkov <gvalkov@gmail.com>
Date: Wed, 7 Jun 2023 15:56:59 +0200
Subject: [PATCH 1/4] usbnet: ipheth: fix risk of NULL pointer deallocation

The cleanup precedure in ipheth_probe will attempt to free a
NULL pointer in dev->ctrl_buf if the memory allocation for
this buffer is not successful. While kfree ignores NULL pointers,
and the existing code is safe, it is a better design to rearrange
the goto labels and avoid this.

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: Foster Snowhill <forst@pen.gy>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/usb/ipheth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -510,8 +510,8 @@ err_register_netdev:
ipheth_free_urbs(dev);
err_alloc_urbs:
err_get_macaddr:
-err_alloc_ctrl_buf:
kfree(dev->ctrl_buf);
+err_alloc_ctrl_buf:
err_endpoints:
free_netdev(netdev);
return retval;
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 3e65efcca87a9bb5f3b864e0a43d167bc0a8688c Mon Sep 17 00:00:00 2001
From: Foster Snowhill <forst@pen.gy>
Date: Wed, 7 Jun 2023 15:57:00 +0200
Subject: [PATCH 2/4] usbnet: ipheth: transmit URBs without trailing padding

The behaviour of the official iOS tethering driver on macOS is to not
transmit any trailing padding at the end of URBs. This is applicable
to both NCM and legacy modes, including older devices.

Adapt the driver to not include trailing padding in TX URBs, matching
the behaviour of the official macOS driver.

Signed-off-by: Foster Snowhill <forst@pen.gy>
Tested-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/usb/ipheth.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
}

memcpy(dev->tx_buf, skb->data, skb->len);
- if (skb->len < IPHETH_BUF_SIZE)
- memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len);

usb_fill_bulk_urb(dev->tx_urb, udev,
usb_sndbulkpipe(udev, dev->bulk_out),
- dev->tx_buf, IPHETH_BUF_SIZE,
+ dev->tx_buf, skb->len,
ipheth_sndbulk_callback,
dev);
dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
Loading

0 comments on commit b38b224

Please sign in to comment.