Skip to content

Commit

Permalink
Merge branch 'rmandrad:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Storm authored Oct 10, 2024
2 parents 78e7e58 + 9b66c7d commit 3396163
Show file tree
Hide file tree
Showing 52 changed files with 1,406 additions and 665 deletions.
2 changes: 1 addition & 1 deletion include/toplevel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ help:
cat README.md

distclean:
rm -rf bin build_dir .ccache .config* dl feeds key-build* logs package/feeds staging_dir tmp
rm -rf bin build_dir .ccache .config* dl feeds key-build* logs package/feeds target/linux/feeds staging_dir tmp
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean

ifeq ($(findstring v,$(DEBUG)),)
Expand Down
11 changes: 4 additions & 7 deletions package/devel/valgrind/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,14 @@ else
BITS := 32bit
endif

ifeq ($(CONFIG_arm_v7),y)
CONFIGURE_ARGS += --host=armv7-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))
endif

CONFIGURE_ARGS += \
--enable-lto \
--enable-tls \
--without-x \
--without-mpicc \
--without-uiout \
--disable-valgrindmi \
--disable-tui \
--disable-valgrindtk \
--without-included-gettext \
--with-pagesize=4 \

define Package/valgrind/install
$(INSTALL_DIR) $(1)/usr/bin
Expand Down
8 changes: 5 additions & 3 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
PKG_SOURCE_DATE:=2024-09-14
PKG_SOURCE_VERSION:=2ca41d755d93dce53748ee6906318cc7d3829a8c
PKG_MIRROR_HASH:=e7447649e044a2759f6768eaec6de330238e6166bc01703979844be94fe2f817
PKG_SOURCE_DATE:=2024-10-08
PKG_SOURCE_VERSION:=dcbab62272bf5cab2ed857bc655d240970e14f2a
PKG_MIRROR_HASH:=e53a3872abf5e35db6baaceb56e6ffa289f8dd9b6226cf8a4d5b87b541179175
PKG_FLAGS:=nonshared

include $(INCLUDE_DIR)/package.mk
Expand Down Expand Up @@ -51,6 +51,7 @@ ALLWIFIBOARDS:= \
prpl_haze \
qnap_301w \
redmi_ax6 \
skspruce_wia3300-20 \
spectrum_sax1v1k \
tplink_eap660hd-v1 \
wallys_dr40x9 \
Expand Down Expand Up @@ -177,6 +178,7 @@ $(eval $(call generate-ipq-wifi-package,netgear_wax630,Netgear WAX630))
$(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w))
$(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze))
$(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
$(eval $(call generate-ipq-wifi-package,skspruce_wia3300-20,SKSpruce WIA3300-20))
$(eval $(call generate-ipq-wifi-package,spectrum_sax1v1k,Spectrum SAX1V1K))
$(eval $(call generate-ipq-wifi-package,tplink_eap660hd-v1,TP-Link EAP660 HD v1))
$(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/gpio-button-hotplug/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=gpio-button-hotplug
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_LICENSE:=GPL-2.0

include $(INCLUDE_DIR)/package.mk
Expand Down
4 changes: 2 additions & 2 deletions package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
if (!node)
return NULL;

nbuttons = of_get_child_count(node);
nbuttons = of_get_available_child_count(node);
if (nbuttons == 0)
return ERR_PTR(-EINVAL);

Expand All @@ -388,7 +388,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
pdata->rep = !!of_get_property(node, "autorepeat", NULL);
of_property_read_u32(node, "poll-interval", &pdata->poll_interval);

for_each_child_of_node(node, pp) {
for_each_available_child_of_node(node, pp) {
button = (struct gpio_keys_button *)(&pdata->buttons[i++]);

if (of_property_read_u32(pp, "linux,code", &button->code)) {
Expand Down
17 changes: 17 additions & 0 deletions package/kernel/linux/modules/netdevices.mk
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,23 @@ endef
$(eval $(call KernelPackage,r6040))


define KernelPackage/rmnet
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=RmNet MAP support
KCONFIG:=CONFIG_RMNET
FILES:=$(LINUX_DIR)/drivers/net/ethernet/qualcomm/rmnet/rmnet.ko
AUTOLOAD:=$(call AutoLoad,30,rmnet)
endef

define KernelPackage/rmnet/description
Kernel support for RMNET module which is used for handling data in the
multiplexing and aggregation protocol (MAP) format in the embedded data
path. RMNET devices can be attached to any IP mode physical device.
endef

$(eval $(call KernelPackage,rmnet))


define KernelPackage/niu
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Sun Neptune 10Gbit Ethernet support
Expand Down
6 changes: 3 additions & 3 deletions package/kernel/mt76/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=

PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-09-29
PKG_SOURCE_VERSION:=680bc70f161fde0f167e2ae50c771be4775eb50a
PKG_MIRROR_HASH:=bcdb95e40cfceba56a565ad6b6d9f92a122e7230d0f7f950b3d39e4280723cca
PKG_SOURCE_DATE:=2024-10-10
PKG_SOURCE_VERSION:=6a1199463fc8f7758c32122613288ed95c09e3bd
PKG_MIRROR_HASH:=4b42a586e098c1dc5970fbd3190ac2faf67992c7357161a3ef3040817a8ed8d6

PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0
Expand Down
64 changes: 0 additions & 64 deletions package/kernel/mt76/patches/100-api_update.patch

This file was deleted.

13 changes: 4 additions & 9 deletions package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ static int ubnt_ledbar_probe(struct i2c_client *client)
{
struct device_node *np = client->dev.of_node;
struct ubnt_ledbar *ledbar;
int err;

ledbar = devm_kzalloc(&client->dev, sizeof(*ledbar), GFP_KERNEL);
if (!ledbar)
Expand All @@ -184,7 +185,9 @@ static int ubnt_ledbar_probe(struct i2c_client *client)

ledbar->client = client;

mutex_init(&ledbar->lock);
err = devm_mutex_init(&client->dev, &ledbar->lock);
if (err)
return err;

i2c_set_clientdata(client, ledbar);

Expand All @@ -203,13 +206,6 @@ static int ubnt_ledbar_probe(struct i2c_client *client)
return ubnt_ledbar_apply_state(ledbar);
}

static void ubnt_ledbar_remove(struct i2c_client *client)
{
struct ubnt_ledbar *ledbar = i2c_get_clientdata(client);

mutex_destroy(&ledbar->lock);
}

static const struct i2c_device_id ubnt_ledbar_id[] = {
{ "ubnt-ledbar", 0 },
{ }
Expand All @@ -228,7 +224,6 @@ static struct i2c_driver ubnt_ledbar_driver = {
.of_match_table = of_ubnt_ledbar_match,
},
.probe = ubnt_ledbar_probe,
.remove = ubnt_ledbar_remove,
.id_table = ubnt_ledbar_id,
};
module_i2c_driver(ubnt_ledbar_driver);
Expand Down
19 changes: 6 additions & 13 deletions target/linux/ath79/files/drivers/gpio/gpio-rb4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static int rb4xx_gpio_probe(struct platform_device *pdev)
struct device *parent = dev->parent;
struct rb4xx_gpio *gpio;
u32 val;
int err;

if (!parent)
return -ENODEV;
Expand All @@ -117,7 +118,10 @@ static int rb4xx_gpio_probe(struct platform_device *pdev)
gpio->cpld = dev_get_drvdata(parent);
gpio->dev = dev;
gpio->values = 0;
mutex_init(&gpio->lock);

err = devm_mutex_init(&pdev->dev, &gpio->lock);
if (err)
return err;

gpio->chip.label = "rb4xx-gpio";
gpio->chip.parent = dev;
Expand All @@ -134,17 +138,7 @@ static int rb4xx_gpio_probe(struct platform_device *pdev)
if (!of_property_read_u32(dev->of_node, "base", &val))
gpio->chip.base = val;

return gpiochip_add_data(&gpio->chip, gpio);
}

static int rb4xx_gpio_remove(struct platform_device *pdev)
{
struct rb4xx_gpio *gpio = platform_get_drvdata(pdev);

gpiochip_remove(&gpio->chip);
mutex_destroy(&gpio->lock);

return 0;
return devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio);
}

static const struct platform_device_id rb4xx_gpio_id_table[] = {
Expand All @@ -155,7 +149,6 @@ MODULE_DEVICE_TABLE(platform, rb4xx_gpio_id_table);

static struct platform_driver rb4xx_gpio_driver = {
.probe = rb4xx_gpio_probe,
.remove = rb4xx_gpio_remove,
.id_table = rb4xx_gpio_id_table,
.driver = {
.name = "rb4xx-gpio",
Expand Down
12 changes: 8 additions & 4 deletions target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,19 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
struct gpio_rb91x_key *drvdata;
struct gpio_chip *gc;
struct device *dev = &pdev->dev;
int err;

drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;

mutex_init(&drvdata->mutex);
mutex_init(&drvdata->poll_mutex);
err = devm_mutex_init(dev, &drvdata->mutex);
if (err)
return err;

err = devm_mutex_init(dev, &drvdata->poll_mutex);
if (err)
return err;

drvdata->gpio = devm_gpiod_get(dev, NULL, GPIOD_OUT_LOW);
if (IS_ERR(drvdata->gpio))
Expand All @@ -167,8 +173,6 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
gc->direction_output = gpio_rb91x_key_direction_output;
gc->direction_input = gpio_rb91x_key_direction_input;

platform_set_drvdata(pdev, drvdata);

return devm_gpiochip_add_data(dev, gc, drvdata);
}

Expand Down
1 change: 1 addition & 0 deletions target/linux/ath79/mikrotik/config-default
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ CONFIG_MFD_CORE=y
CONFIG_MFD_RB4XX_CPLD=y
CONFIG_MIKROTIK=y
CONFIG_MIKROTIK_RB_SYSFS=y
CONFIG_MIKROTIK_WLAN_DECOMPRESS_LZ77=y
CONFIG_MTD_NAND_AR934X=y
CONFIG_MTD_NAND_CORE=y
CONFIG_MTD_NAND_ECC=y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From: Breno Leitao <leitao@debian.org>
Date: Wed, 28 Feb 2024 03:31:21 -0800
Subject: [PATCH] net: get stats64 if device if driver is configured

If the network driver is relying in the net core to do stats allocation,
then we want to dev_get_tstats64() instead of netdev_stats_to_stats64(),
since there are per-cpu stats that needs to be taken in consideration.

This will also simplify the drivers in regard to statistics. Once the
driver sets NETDEV_PCPU_STAT_TSTATS, it doesn't not need to allocate the
stacks, neither it needs to set `.ndo_get_stats64 = dev_get_tstats64`
for the generic stats collection function anymore.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -10658,6 +10658,8 @@ struct rtnl_link_stats64 *dev_get_stats(
ops->ndo_get_stats64(dev, storage);
} else if (ops->ndo_get_stats) {
netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev));
+ } else if (dev->pcpu_stat_type == NETDEV_PCPU_STAT_TSTATS) {
+ dev_get_tstats64(dev, storage);
} else {
netdev_stats_to_stats64(storage, &dev->stats);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -10966,7 +10966,8 @@ void free_netdev(struct net_device *dev)
@@ -10968,7 +10968,8 @@ void free_netdev(struct net_device *dev)
dev->xdp_bulkq = NULL;

/* Compatibility with error handling in drivers */
Expand Down
7 changes: 7 additions & 0 deletions target/linux/generic/files/drivers/platform/mikrotik/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ config NVMEM_LAYOUT_MIKROTIK
help
This driver exposes MikroTik hard_config via NVMEM layout.

config MIKROTIK_WLAN_DECOMPRESS_LZ77
tristate "Mikrotik factory Wi-Fi caldata LZ77 decompression support"
depends on MIKROTIK_RB_SYSFS
help
Allow Mikrotik LZ77 factory flashed Wi-Fi calibration data to be
decompressed

endif # MIKROTIK
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
#
obj-$(CONFIG_MIKROTIK_RB_SYSFS) += routerboot.o rb_hardconfig.o rb_softconfig.o
obj-$(CONFIG_NVMEM_LAYOUT_MIKROTIK) += rb_nvmem.o
obj-$(CONFIG_MIKROTIK_WLAN_DECOMPRESS_LZ77) += rb_lz77.o
Loading

0 comments on commit 3396163

Please sign in to comment.