Re: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik RB952Ui-5ac2nD?

2019-12-07 Thread Lech Perczak

W dniu 2019-12-06 o 18:44, Joe Ayers pisze:



Possibly the same symptoms don't exist on 128MB RAM devices.

Like there is some if condition, which is doing some nasty things on 64M
devices? I admit, that I don't have ath10k-ct source code under my pillow, but
it doesn't make much sense to me.


Comparable results between above and my 64MB device.   However, if the
sleep time is extended the consumption is more

Ok, I'll let it run overnight with 120s sleep in between.


I suspect this is not the intended behavior.

No its not and it's even strange, that I'm not seeing it here if it should
happen in the "default setup". Maybe its because:

1. You're using custom image (I'm using official prebuilt images)
2. You're not providing all the steps needed to reproduce the issue
3. I've way different hardware

Every detail could make huge difference.

-- ynezz

On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
   These look to be related patches to this issue:

960-0010-ath10k-limit-htt-rx-ring-size.patch
960-0011-ath10k-limit-pci-buffer-size.patch

In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
these patches are applied to backports-4.19.85-1, but don't seem to be
applied to ath10k-ct-2019-09-09-5e8cd86f.Should ath10k-ct have
these and other patches?The device's installed packages do include
ath10k-ct (from downloads.openwrt.org installed image).

Joe AE6XE

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
.


I can only add that I got the same behaviour with my TL-WR902AC just 
ported to ath79 on master (based on 
f19e471f3206d0b5885490e52972085d2da2a10b). In about 20 minutes system 
was unusable - I couldn't fully copy a 4MB sysupgrade image to /tmp.
Branch used to build the image is here: 
https://github.com/Leo-PL/openwrt/commits/tl-wr902ac-v1_ath79


I can offer my help with testing the fixes, as it seems to me that it's 
not the first time I observe this issue, only now I got a device 
affected by it.


With kind regards,
Lech


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ath79: fix typos in DTS

2019-12-07 Thread mail
Hi,

please rephrase the "commit message" to be a sentence (or two ...).

Just send the text as reply to this e-mail, I will add it when merging the 
patch. (So I do not need to add my SOB)

Best

Adrian

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of DENG Qingfang
> Sent: Samstag, 7. Dezember 2019 17:38
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] ath79: fix typos in DTS
> 
> echi->ehci
> ochi->ohci
> 
> Signed-off-by: DENG Qingfang 
> ---
>  target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts | 6 +++---
>  target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts  | 6 +++---
>  target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi | 6 +++---
>  target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi   | 4 ++--
>  4 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> index 2e00de8887..e87f422051 100644
> --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> @@ -47,7 +47,7 @@
>   usb {
>   label = "buffalo:green:usb";
>   gpios = < 3 GPIO_ACTIVE_LOW>;
> - trigger-sources = <_ochi_port>,
> <_echi_port>;
> + trigger-sources = <_ohci_port>,
> <_ehci_port>;
>   linux,default-trigger = "usbport";
>   };
> 
> @@ -180,7 +180,7 @@
>   #size-cells = <0>;
>   status = "okay";
> 
> - usb_ochi_port: port@1 {
> + usb_ohci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> @@ -191,7 +191,7 @@
>   #size-cells = <0>;
>   status = "okay";
> 
> - usb_echi_port: port@1 {
> + usb_ehci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> index 92de193aba..5e354b 100644
> --- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> +++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> @@ -34,7 +34,7 @@
>   usb {
>   label = "d-link:blue:usb";
>   gpios = < 0 GPIO_ACTIVE_LOW>;
> - trigger-sources = <_ochi_port>,
> <_echi_port>;
> + trigger-sources = <_ohci_port>,
> <_ehci_port>;
>   linux,default-trigger = "usbport";
>   };
> 
> @@ -123,7 +123,7 @@
>   #size-cells = <0>;
>   status = "okay";
> 
> - usb_ochi_port: port@1 {
> + usb_ohci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> @@ -134,7 +134,7 @@
>   #size-cells = <0>;
>   status = "okay";
> 
> - usb_echi_port: port@1 {
> + usb_ehci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> index 08b3c77b39..b6ae167024 100644
> --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> @@ -32,7 +32,7 @@
>   usb_led {
>   label = "netgear:green:usb";
>   resets = < 12>;
> - trigger-sources = <_ochi_port>,
> <_echi_port>;
> + trigger-sources = <_ohci_port>,
> <_ehci_port>;
>   linux,default-trigger = "usbport";
>   };
>   };
> @@ -134,7 +134,7 @@
>   #size-cells = <0>;
>   status = "okay";
> 
> - usb_ochi_port: port@1 {
> + usb_ohci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> @@ -145,7 +145,7 @@
>   #size-cells = <0>;
>   status = "okay";
> 
> - usb_echi_port: port@1 {
> + usb_ehci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> index 4f52e3cc40..0ed9970813 100644
> --- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> +++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> @@ -86,7 +86,7 @@
>   #address-cells = <1>;
>   #size-cells = <0>;
> 
> - usb_ochi_port: port@1 {
> + usb_ohci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> @@ -97,7 +97,7 @@
>   #address-cells = <1>;
>   #size-cells = <0>;
> 
> - usb_echi_port: port@1 {
> + usb_ehci_port: port@1 {
>   reg = <1>;
>   #trigger-source-cells = <0>;
>   };
> --
> 2.24.0
> 
> 
> 
> 
> 

[OpenWrt-Devel] [PATCH uci 4/5] libuci: refactor uci_get_errorstr

2019-12-07 Thread Petr Štetiar
* replace strange error_info[0]=0 with complete zeroing of the buffer
* make the function body shorter and more clear, decrease indentation
  levels
* fix format string warnings:

   libuci.c:172:24: error: format string is not a string literal 
[-Werror,-Wformat-nonliteral]
   libuci.c:181:19: error: format string is not a string literal 
[-Werror,-Wformat-nonliteral]

Reported-by: Rosen Penev 
Signed-off-by: Petr Štetiar 
---
 libuci.c | 51 +++
 1 file changed, 19 insertions(+), 32 deletions(-)

diff --git a/libuci.c b/libuci.c
index a9e70e883ee3..140edf2adbb0 100644
--- a/libuci.c
+++ b/libuci.c
@@ -140,50 +140,37 @@ uci_perror(struct uci_context *ctx, const char *str)
 void
 uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 {
-   static char error_info[128];
+   static char error_info[128] = { 0 };
int err;
-   const char *format =
-   "%s%s" /* prefix */
-   "%s%s" /* function */
-   "%s" /* error */
-   "%s"; /* details */
-
-   error_info[0] = 0;
-
-   if (!ctx)
-   err = UCI_ERR_INVAL;
-   else
-   err = ctx->err;
 
+   err = ctx ? ctx->err : UCI_ERR_INVAL;
if ((err < 0) || (err >= UCI_ERR_LAST))
err = UCI_ERR_UNKNOWN;
 
-   switch (err) {
-   case UCI_ERR_PARSE:
-   if (ctx->pctx) {
-   snprintf(error_info, sizeof(error_info) - 1, " (%s) at 
line %d, byte %d", (ctx->pctx->reason ? ctx->pctx->reason : "unknown"), 
ctx->pctx->line, ctx->pctx->byte);
-   break;
-   }
-   break;
-   default:
-   break;
+   if (ctx && ctx->pctx && (err == UCI_ERR_PARSE)) {
+   snprintf(error_info, sizeof(error_info) - 1, " (%s) at line %d, 
byte %d",
+(ctx->pctx->reason ? ctx->pctx->reason : "unknown"),
+ctx->pctx->line, ctx->pctx->byte);
}
-   if (dest) {
-   err = asprintf(dest, format,
-   (prefix ? prefix : ""), (prefix ? ": " : ""),
-   (ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func 
? ": " : ""),
-   uci_errstr[err],
-   error_info);
-   if (err < 0)
-   *dest = NULL;
-   } else {
+
+   if (!dest) {
strcat(error_info, "\n");
-   fprintf(stderr, format,
+   fprintf(stderr, "%s%s%s%s%s%s",
(prefix ? prefix : ""), (prefix ? ": " : ""),
(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func 
? ": " : ""),
uci_errstr[err],
error_info);
+   return;
}
+
+   err = asprintf(dest, "%s%s%s%s%s%s",
+   (prefix ? prefix : ""), (prefix ? ": " : ""),
+   (ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : 
""),
+   uci_errstr[err],
+   error_info);
+
+   if (err < 0)
+   *dest = NULL;
 }
 
 int uci_list_configs(struct uci_context *ctx, char ***list)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH uci 3/5] tests: cram: Lua: add test case for uci_get_errorstr

2019-12-07 Thread Petr Štetiar
In order to extend test coverage and help testing refactoring.

Signed-off-by: Petr Štetiar 
---
 tests/cram/config/broken | 1 +
 tests/cram/lua/basic.lua | 2 ++
 tests/cram/test_ucilua.t | 1 +
 3 files changed, 4 insertions(+)
 create mode 100644 tests/cram/config/broken

diff --git a/tests/cram/config/broken b/tests/cram/config/broken
new file mode 100644
index ..d2ecc0158e68
--- /dev/null
+++ b/tests/cram/config/broken
@@ -0,0 +1 @@
+config alias' 'a'
diff --git a/tests/cram/lua/basic.lua b/tests/cram/lua/basic.lua
index ceb706f6973e..f0052644c00e 100644
--- a/tests/cram/lua/basic.lua
+++ b/tests/cram/lua/basic.lua
@@ -42,3 +42,5 @@ local t = c:get("network", "lan", "dns")
 A(#t == 2)
 A(t[1] == "ns1.king.banik.cz")
 A(t[2] == "ns2.openwrt.org")
+
+print(c:get_all("broken"))
diff --git a/tests/cram/test_ucilua.t b/tests/cram/test_ucilua.t
index 1544e23c1bf4..cfe1f2e0e360 100644
--- a/tests/cram/test_ucilua.t
+++ b/tests/cram/test_ucilua.t
@@ -56,3 +56,4 @@ run basic Lua tests:
   proto: dhcp
   .anonymous: false
   aliases: c d
+  nil\tuci: Parse error (EOF with unterminated ') at line 1, byte 18 (esc)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH uci 1/5] cli: fix format string clang-10 warning

2019-12-07 Thread Petr Štetiar
From: Rosen Penev 

Fixes:

 cli.c:196:19: error: format string is not a string literal 
[-Werror=format-nonliteral]

Signed-off-by: Rosen Penev 
[split into separate commit]
Signed-off-by: Petr Štetiar 
---
 cli.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cli.c b/cli.c
index 8970f4f0b8ce..6ba97ea07424 100644
--- a/cli.c
+++ b/cli.c
@@ -185,6 +185,7 @@ static void cli_perror(void)
uci_perror(ctx, appname);
 }
 
+__attribute__((format(printf, 1, 2)))
 static void cli_error(const char *fmt, ...)
 {
va_list ap;

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH uci 5/5] cmake: add more hardening compiler flags

2019-12-07 Thread Petr Štetiar
In order to spot possible issues with direct impact on security during
QA on CI (GCC version 6 and higher).

Ref: 
https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
Signed-off-by: Petr Štetiar 
---
 CMakeLists.txt | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92adf4a47121..da4ac68c0139 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,8 +3,15 @@ cmake_minimum_required(VERSION 2.6)
 PROJECT(uci C)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
-ADD_DEFINITIONS(-Os -Wall -Werror -Wextra --std=gnu99 -g3 -I. 
-DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}")
-ADD_DEFINITIONS(-Wno-unused-parameter)
+
+ADD_DEFINITIONS(-Wall -Werror)
+IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
+   ADD_DEFINITIONS(-Wextra -Werror=implicit-function-declaration)
+   ADD_DEFINITIONS(-Wformat -Werror=format-security 
-Werror=format-nonliteral)
+ENDIF()
+ADD_DEFINITIONS(-Os -std=gnu99 -g3 -Wmissing-declarations 
-Wno-unused-parameter)
+ADD_DEFINITIONS(-DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}")
+
 
 OPTION(UCI_DEBUG "debugging support" OFF)
 OPTION(UCI_DEBUG_TYPECAST "typecast debugging support" OFF)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH uci 2/5] lua: add missing forward declaration

2019-12-07 Thread Petr Štetiar
Fixes following warning reported by clang-10:

  lua/uci.c:1050:1: error: no previous declaration for ‘luaopen_uci’ 
[-Werror=missing-declarations]

Signed-off-by: Petr Štetiar 
---
 lua/uci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lua/uci.c b/lua/uci.c
index ecfb2998d749..196a25bcf08a 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -36,6 +36,8 @@
 
 #if !defined LUA_VERSION_NUM || LUA_VERSION_NUM==501
 
+int luaopen_uci(lua_State *L);
+
 /*
  * ** Adapted from Lua 5.2.0
  * */

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: remove unused DTS from DEVICE_VARS

2019-12-07 Thread Adrian Schmutzler
The DTS variable has been removed in 402138d12dca ("ramips: Derive
DTS name from device name in Makefile"), but the DEVICE_VARS entry
has been overlooked.

Remove it now since we are not using this variable.

This must _not_ be backported to 19.07, where the variable is still
in use.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/ramips/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index 16748b8260..d700e69440 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-DEVICE_VARS += DTS IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID
+DEVICE_VARS += IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID
 DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
 DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
 DEVICE_VARS += SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from device node name and SOC

2019-12-07 Thread mail
> -  SUNXI_DTS:=sun7i-a20-olinuxino-micro
> +  SUNXI_SOC := =sun7i

The extra "=" has already been removed during my build tests (just forgot to 
commit it). If someone tests on this device, please remove it manually.

Adrian 


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] sunxi: use vendor_device scheme for device definitions

2019-12-07 Thread Adrian Schmutzler
This changes device definition to resemble the vendor_device scheme
already present for the majority of device compatible strings.

By doing this, we achieve several advantages at once:
- Image names and node names are more consistent with other targets.
- SUPPORTED_DEVICES can be set automatically for all but two cases.
- Image names and node names are in line with DEVICE_TITLEs.

Signed-off-by: Adrian Schmutzler 
---
 package/boot/uboot-sunxi/Makefile  |  68 +++
 target/linux/sunxi/image/Makefile  |   1 +
 target/linux/sunxi/image/cortex-a53.mk |  28 +++
 target/linux/sunxi/image/cortex-a7.mk  | 110 ++---
 target/linux/sunxi/image/cortex-a8.mk  |  29 +++
 5 files changed, 103 insertions(+), 133 deletions(-)

diff --git a/package/boot/uboot-sunxi/Makefile 
b/package/boot/uboot-sunxi/Makefile
index 2c414f8c9e..ce39fe792d 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -28,67 +28,67 @@ endef
 define U-Boot/A10-OLinuXino-Lime
   BUILD_SUBTARGET:=cortexa8
   NAME:=A10 OLinuXino LIME
-  BUILD_DEVICES:=sun4i-a10-olinuxino-lime
+  BUILD_DEVICES:=olimex_a10-olinuxino-lime
 endef
 
 define U-Boot/A13-OLinuXino
   BUILD_SUBTARGET:=cortexa8
   NAME:=A13 OlinuXino
-  BUILD_DEVICES:=sun5i-a13-olinuxino
+  BUILD_DEVICES:=olimex_a13-olinuxino
 endef
 
 define U-Boot/A20-OLinuXino-Lime
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino LIME
-  BUILD_DEVICES:=sun7i-a20-olinuxino-lime
+  BUILD_DEVICES:=olimex_a20-olinuxino-lime
 endef
 
 define U-Boot/A20-OLinuXino-Lime2
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino LIME2
-  BUILD_DEVICES:=sun7i-a20-olinuxino-lime2
+  BUILD_DEVICES:=olimex_a20-olinuxino-lime2
 endef
 
 define U-Boot/A20-OLinuXino-Lime2-eMMC
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino LIME2 eMMC
-  BUILD_DEVICES:=sun7i-a20-olinuxino-lime2-emmc
+  BUILD_DEVICES:=olimex_a20-olinuxino-lime2-emmc
 endef
 
 define U-Boot/A20-OLinuXino_MICRO
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino MICRO
-  BUILD_DEVICES:=sun7i-a20-olinuxino-micro
+  BUILD_DEVICES:=olimex_a20-olinuxino-micro
 endef
 
 define U-Boot/Bananapi
   BUILD_SUBTARGET:=cortexa7
   NAME:=Bananapi
-  BUILD_DEVICES:=sun7i-a20-bananapi
+  BUILD_DEVICES:=lemaker_bananapi
 endef
 
 define U-Boot/Bananapro
   BUILD_SUBTARGET:=cortexa7
   NAME:=Bananapro
-  BUILD_DEVICES:=sun7i-a20-bananapro
+  BUILD_DEVICES:=lemaker_bananapro
 endef
 
 define U-Boot/Cubieboard
   BUILD_SUBTARGET:=cortexa8
   NAME:=Cubieboard
-  BUILD_DEVICES:=sun4i-a10-cubieboard
+  BUILD_DEVICES:=cubietech_a10-cubieboard
 endef
 
 define U-Boot/Cubieboard2
   BUILD_SUBTARGET:=cortexa7
   NAME:=Cubieboard2
-  BUILD_DEVICES:=sun7i-a20-cubieboard2
+  BUILD_DEVICES:=cubietech_cubieboard2
 endef
 
 define U-Boot/Cubietruck
   BUILD_SUBTARGET:=cortexa7
   NAME:=Cubietruck
-  BUILD_DEVICES:=sun7i-a20-cubietruck
+  BUILD_DEVICES:=cubietech_cubietruck
 endef
 
 define U-Boot/Hummingbird_A31
@@ -99,91 +99,91 @@ endef
 define U-Boot/Marsboard_A10
   BUILD_SUBTARGET:=cortexa8
   NAME:=Marsboard
-  BUILD_DEVICES:=sun4i-a10-marsboard
+  BUILD_DEVICES:=marsboard_a10-marsboard
 endef
 
 define U-Boot/Mele_M9
   BUILD_SUBTARGET:=cortexa7
   NAME:=Mele M9 (A31)
-  BUILD_DEVICES:=sun6i-a31-m9
+  BUILD_DEVICES:=mele_m9
 endef
 
 define U-Boot/OLIMEX_A13_SOM
   BUILD_SUBTARGET:=cortexa8
   NAME:=Olimex A13 SOM
-  BUILD_DEVICES:=sun5i-a13-olimex-som
+  BUILD_DEVICES:=olimex_a13-olimex-som
 endef
 
 define U-Boot/Linksprite_pcDuino
   BUILD_SUBTARGET:=cortexa8
   NAME:=Linksprite pcDuino
-  BUILD_DEVICES:=sun4i-a10-pcduino
+  BUILD_DEVICES:=linksprite_a10-pcduino
 endef
 
 define U-Boot/Linksprite_pcDuino3
   BUILD_SUBTARGET:=cortexa7
   NAME:=Linksprite pcDuino3
-  BUILD_DEVICES:=sun7i-a20-pcduino3
+  BUILD_DEVICES:=linksprite_pcduino3
 endef
 
 define U-Boot/Lamobo_R1
   BUILD_SUBTARGET:=cortexa7
   NAME:=Lamobo R1
-  BUILD_DEVICES:=sun7i-a20-lamobo-r1
+  BUILD_DEVICES:=lamobo_lamobo-r1
 endef
 
 define U-Boot/nanopi_m1_plus
   BUILD_SUBTARGET:=cortexa7
   NAME:=NanoPi M1 Plus (H3)
-  BUILD_DEVICES:=sun8i-h3-nanopi-m1-plus
+  BUILD_DEVICES:=friendlyarm_nanopi-m1-plus
 endef
 
 define U-Boot/nanopi_neo
   BUILD_SUBTARGET:=cortexa7
   NAME:=U-Boot for NanoPi NEO (H3)
-  BUILD_DEVICES:=sun8i-h3-nanopi-neo
+  BUILD_DEVICES:=friendlyarm_nanopi-neo
 endef
 
 define U-Boot/orangepi_r1
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi R1 (H2+)
-  BUILD_DEVICES:=sun8i-h2-plus-orangepi-r1
+  BUILD_DEVICES:=xunlong_orangepi-r1
 endef
 
 define U-Boot/orangepi_zero
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi Zero (H2+)
-  BUILD_DEVICES:=sun8i-h2-plus-orangepi-zero
+  BUILD_DEVICES:=xunlong_orangepi-zero
 endef
 
 define U-Boot/orangepi_one
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi One (H3)
-  BUILD_DEVICES:=sun8i-h3-orangepi-one
+  BUILD_DEVICES:=xunlong_orangepi-one
 endef
 
 define U-Boot/orangepi_pc
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi PC (H3)
-  BUILD_DEVICES:=sun8i-h3-orangepi-pc
+  

[OpenWrt-Devel] [PATCH 0/2] Reduce redundant names in sunxi target

2019-12-07 Thread Adrian Schmutzler
This consolidates the various repetitions of device names
in sunxi image Makefiles, and makes naming more consistent
in general.

This is achieved by calculating SUPPORTED_DEVICES from the
node name (as in ath79/ramips) and build the DTS name based
on that.

With this change, future device support should be easier,
as there are less cases where you just have to write the same
name again.

I've build-tested this for all subtargets, but I would be glad
about one or two device-testers.

Adrian Schmutzler (2):
  sunxi: use vendor_device scheme for device definitions
  sunxi: construct DTS name from device node name and SOC

 package/boot/uboot-sunxi/Makefile  |  68 +--
 target/linux/sunxi/image/Makefile  |   6 +-
 target/linux/sunxi/image/cortex-a53.mk |  46 
 target/linux/sunxi/image/cortex-a7.mk  | 154 +++--
 target/linux/sunxi/image/cortex-a8.mk  |  42 +++
 5 files changed, 148 insertions(+), 168 deletions(-)

-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from device node name and SOC

2019-12-07 Thread Adrian Schmutzler
The device part in the SUNXI_DTS variable always corresponds to
device node name. This is another redundancy that can be removed
by calculating the DTS name from a newly introduced SUNXI_SOC
variable and the node name.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/sunxi/image/Makefile  |  5 ++-
 target/linux/sunxi/image/cortex-a53.mk | 18 +++
 target/linux/sunxi/image/cortex-a7.mk  | 44 +-
 target/linux/sunxi/image/cortex-a8.mk  | 13 
 4 files changed, 45 insertions(+), 35 deletions(-)

diff --git a/target/linux/sunxi/image/Makefile 
b/target/linux/sunxi/image/Makefile
index 04e0abee49..929f4c70f9 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -32,12 +32,15 @@ endef
 # why \x00\x00\x00\x00 for zImage-initramfs
 define Device/Default
   PROFILES := Default
-  DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
+  DEVICE_VARS := SUNXI_SOC SUNXI_DTS SUNXI_DTS_DIR SUNXI_UBOOT
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
   SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
+  SUNXI_SOC :=
+  SUNXI_DTS_DIR :=
+  SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SUNXI_SOC)-$(lastword $(subst _, ,$(1)))
 endef
 
 include cortex-a7.mk
diff --git a/target/linux/sunxi/image/cortex-a53.mk 
b/target/linux/sunxi/image/cortex-a53.mk
index d6c17d95ff..b0d087b9b1 100644
--- a/target/linux/sunxi/image/cortex-a53.mk
+++ b/target/linux/sunxi/image/cortex-a53.mk
@@ -11,7 +11,8 @@ define Device/friendlyarm_nanopi-neo-plus2
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO Plus2
   SUPPORTED_DEVICES:=nanopi-neo-plus2
-  SUNXI_DTS:=allwinner/sun50i-h5-nanopi-neo-plus2
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -22,7 +23,8 @@ define Device/friendlyarm_nanopi-neo2
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO2
   SUPPORTED_DEVICES:=nanopi-neo2
-  SUNXI_DTS:=allwinner/sun50i-h5-nanopi-neo2
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -32,7 +34,8 @@ TARGET_DEVICES += friendlyarm_nanopi-neo2
 define Device/pine64_pine64-plus
   DEVICE_VENDOR := Pine64
   DEVICE_MODEL := Pine64+
-  SUNXI_DTS:=allwinner/sun50i-a64-pine64-plus
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-a64
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -42,7 +45,8 @@ TARGET_DEVICES += pine64_pine64-plus
 define Device/pine64_sopine-baseboard
   DEVICE_VENDOR := Pine64
   DEVICE_MODEL := SoPine
-  SUNXI_DTS:=allwinner/sun50i-a64-sopine-baseboard
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-a64
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -53,7 +57,8 @@ TARGET_DEVICES += pine64_sopine-baseboard
 define Device/xunlong_orangepi-zero-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Zero Plus
-  SUNXI_DTS:=allwinner/sun50i-h5-orangepi-zero-plus
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -63,7 +68,8 @@ TARGET_DEVICES += xunlong_orangepi-zero-plus
 define Device/xunlong_orangepi-pc2
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC 2
-  SUNXI_DTS:=allwinner/sun50i-h5-orangepi-pc2
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
diff --git a/target/linux/sunxi/image/cortex-a7.mk 
b/target/linux/sunxi/image/cortex-a7.mk
index 32e094efb8..0465c2ba9a 100644
--- a/target/linux/sunxi/image/cortex-a7.mk
+++ b/target/linux/sunxi/image/cortex-a7.mk
@@ -12,7 +12,7 @@ define Device/olimex_a20-olinuxino-lime
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
-  SUNXI_DTS:=sun7i-a20-olinuxino-lime
+  SUNXI_SOC := sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-lime
@@ -22,7 +22,7 @@ define Device/olimex_a20-olinuxino-lime2
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
-  SUNXI_DTS:=sun7i-a20-olinuxino-lime2
+  SUNXI_SOC := sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-lime2
@@ -33,7 +33,7 @@ define Device/olimex_a20-olinuxino-lime2-emmc
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_VARIANT := eMMC
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
-  SUNXI_DTS:=sun7i-a20-olinuxino-lime2-emmc
+  SUNXI_SOC := sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-lime2-emmc
@@ -43,7 +43,7 @@ define Device/olimex_a20-olinuxino-micro
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-MICRO
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUNXI_DTS:=sun7i-a20-olinuxino-micro
+  SUNXI_SOC := =sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-micro
@@ -53,7 +53,7 @@ define Device/lemaker_bananapi
   

Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4

2019-12-07 Thread Paul Fertser
On Sat, Dec 07, 2019 at 11:11:27PM +0100, m...@adrianschmutzler.de wrote:
> Well, address the issues we have agreed on in a v3.

Sure, will do tomorrow, thanks!

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4

2019-12-07 Thread mail
Well, address the issues we have agreed on in a v3.

From my scanning of the open discussion points, the following was unresolved in 
some way:
1. Name prefix for LED labels
In ar71xx, all devices use "d-link". In ath79, so far two devices use "d-link" 
and four devices use the device name.
Since d-link looks like a vendor where heavy use of DTSI files is possible, I 
would use "d-link" as prefix for those.

2. Comments for ethX nodes in DTS files: I would remove the comments. It 
wouldn't be a big problem if you keep them for v3, though.

3. Partitioning: Remove the commented partitions and provide an extensive 
explanation in the commit message.

Further discussion may be led based on a v3 patch then.

Best

Adrian

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Paul Fertser
> Sent: Samstag, 7. Dezember 2019 22:11
> To: Petr Štetiar 
> Cc: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
> 
> On Sat, Dec 07, 2019 at 09:58:26PM +0100, Petr Štetiar wrote:
> > > I'll be happy to change the patch in any way that will get it accepted.
> >
> > Then just do the requested changes in v3, solved.
> 
> I got an impression Adrian is not sure anymore he's requesting all the
> changes we talked about, as I provided some reasonable counter-arguments
> and that he is waiting for someone else to chime in. If you tell me I should
> just do whatever Adrian says, ok, np. Do I get it right?
> 
> --
> Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
> mailto:fercer...@gmail.com
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4

2019-12-07 Thread Paul Fertser
On Sat, Dec 07, 2019 at 09:58:26PM +0100, Petr Štetiar wrote:
> > I'll be happy to change the patch in any way that will get it accepted.
> 
> Then just do the requested changes in v3, solved.

I got an impression Adrian is not sure anymore he's requesting all the
changes we talked about, as I provided some reasonable
counter-arguments and that he is waiting for someone else to chime
in. If you tell me I should just do whatever Adrian says, ok, np. Do I
get it right?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4

2019-12-07 Thread Petr Štetiar
Paul Fertser  [2019-12-07 23:10:11]:

> Regarding this specific patch, I'd really like to hear the opinion of
> a maintainer (it seems like ath79 doesn't have an official maintainer

To me it seems like its maintained by a community, by developers like you,
with the little help of team members like Adrian having necessary commit
rights.

> I'll be happy to change the patch in any way that will get it accepted.

Then just do the requested changes in v3, solved.

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] UBus wire protocol documentation

2019-12-07 Thread Michael Jones
I'm planning to implement a Ubus client using Boost.Asio / C++'s Networking
TS, in C++, complete with a new implementation of the ubus wire protocol
(in C++).

Is there any documentation available about the Ubus wire protocol?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4

2019-12-07 Thread Paul Fertser
Hi Petr,

On Sat, Dec 07, 2019 at 04:04:13PM +0100, Petr Štetiar wrote:
> > You changed the status of the patch to "Changes requested" but you
> 
> I've marked it as such, because of that discussion[1], but I admit, that I
> didn't read it thoroughly.

One thing I find a bit annoying about Patchwork is that state changes
are anonymous and so a committer might get an odd feeling when
something like that happens.

Regarding this specific patch, I'd really like to hear the opinion of
a maintainer (it seems like ath79 doesn't have an official maintainer
yet) as there're some issues raised in the discussion for which
there's still no clear answer. I'll be happy to change the patch in
any way that will get it accepted.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCHv4] uci: Fix Wformat-nonliteral warning

2019-12-07 Thread Rosen Penev
A const char * variable is being passed as a format string. Unfortunately,
this is not correct.

A constant expression needs to be passed so that GCC can determine the
types of the format properly.

Also fixed a different warning that needs a printf attribute.

Fixes:

error: format not a string literal, argument types not checked
[-Werror=format-nonliteral]
  176 |error_info);
  |^~
error: format not a string literal, argument types not checked
[-Werror=format-nonliteral]
  185 |error_info);

cli.c:196:19: error: format string is not a string literal
[-Werror=format-nonliteral]
   vfprintf(stderr, fmt, ap);

Signed-off-by: Rosen Penev 
---
 v4: Use a proper named define
 v3: Moved define to top of file.
 v2: Fixed extra warning from clang 10.
 cli.c|  1 +
 libuci.c | 15 ---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/cli.c b/cli.c
index 8970f4f..6ba97ea 100644
--- a/cli.c
+++ b/cli.c
@@ -185,6 +185,7 @@ static void cli_perror(void)
uci_perror(ctx, appname);
 }
 
+__attribute__((format(printf, 1, 2)))
 static void cli_error(const char *fmt, ...)
 {
va_list ap;
diff --git a/libuci.c b/libuci.c
index a9e70e8..2e46456 100644
--- a/libuci.c
+++ b/libuci.c
@@ -40,6 +40,12 @@ static const char *uci_errstr[] = {
 #include "uci_internal.h"
 #include "list.c"
 
+#define UCI_ERR_FORMAT \
+   "%s%s" /* prefix */ \
+   "%s%s" /* function */ \
+   "%s" /* error */ \
+   "%s" /* details */
+
 __private const char *uci_confdir = UCI_CONFDIR;
 __private const char *uci_savedir = UCI_SAVEDIR;
 
@@ -142,11 +148,6 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, 
const char *prefix)
 {
static char error_info[128];
int err;
-   const char *format =
-   "%s%s" /* prefix */
-   "%s%s" /* function */
-   "%s" /* error */
-   "%s"; /* details */
 
error_info[0] = 0;
 
@@ -169,7 +170,7 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, 
const char *prefix)
break;
}
if (dest) {
-   err = asprintf(dest, format,
+   err = asprintf(dest, UCI_ERR_FORMAT,
(prefix ? prefix : ""), (prefix ? ": " : ""),
(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func 
? ": " : ""),
uci_errstr[err],
@@ -178,7 +179,7 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, 
const char *prefix)
*dest = NULL;
} else {
strcat(error_info, "\n");
-   fprintf(stderr, format,
+   fprintf(stderr, UCI_ERR_FORMAT,
(prefix ? prefix : ""), (prefix ? ": " : ""),
(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func 
? ": " : ""),
uci_errstr[err],
-- 
2.23.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ath79: fix typos in DTS

2019-12-07 Thread DENG Qingfang
echi->ehci
ochi->ohci

Signed-off-by: DENG Qingfang 
---
 target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts | 6 +++---
 target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts  | 6 +++---
 target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi | 6 +++---
 target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi   | 4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts 
b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
index 2e00de8887..e87f422051 100644
--- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
+++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
@@ -47,7 +47,7 @@
usb {
label = "buffalo:green:usb";
gpios = < 3 GPIO_ACTIVE_LOW>;
-   trigger-sources = <_ochi_port>, <_echi_port>;
+   trigger-sources = <_ohci_port>, <_ehci_port>;
linux,default-trigger = "usbport";
};
 
@@ -180,7 +180,7 @@
#size-cells = <0>;
status = "okay";
 
-   usb_ochi_port: port@1 {
+   usb_ohci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
@@ -191,7 +191,7 @@
#size-cells = <0>;
status = "okay";
 
-   usb_echi_port: port@1 {
+   usb_ehci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts 
b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
index 92de193aba..5e354b 100644
--- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
+++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
@@ -34,7 +34,7 @@
usb {
label = "d-link:blue:usb";
gpios = < 0 GPIO_ACTIVE_LOW>;
-   trigger-sources = <_ochi_port>, <_echi_port>;
+   trigger-sources = <_ohci_port>, <_ehci_port>;
linux,default-trigger = "usbport";
};
 
@@ -123,7 +123,7 @@
#size-cells = <0>;
status = "okay";
 
-   usb_ochi_port: port@1 {
+   usb_ohci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
@@ -134,7 +134,7 @@
#size-cells = <0>;
status = "okay";
 
-   usb_echi_port: port@1 {
+   usb_ehci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi 
b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
index 08b3c77b39..b6ae167024 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
+++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
@@ -32,7 +32,7 @@
usb_led {
label = "netgear:green:usb";
resets = < 12>;
-   trigger-sources = <_ochi_port>, <_echi_port>;
+   trigger-sources = <_ohci_port>, <_ehci_port>;
linux,default-trigger = "usbport";
};
};
@@ -134,7 +134,7 @@
#size-cells = <0>;
status = "okay";
 
-   usb_ochi_port: port@1 {
+   usb_ohci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
@@ -145,7 +145,7 @@
#size-cells = <0>;
status = "okay";
 
-   usb_echi_port: port@1 {
+   usb_ehci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi 
b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
index 4f52e3cc40..0ed9970813 100644
--- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
+++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
@@ -86,7 +86,7 @@
#address-cells = <1>;
#size-cells = <0>;
 
-   usb_ochi_port: port@1 {
+   usb_ohci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
@@ -97,7 +97,7 @@
#address-cells = <1>;
#size-cells = <0>;
 
-   usb_echi_port: port@1 {
+   usb_ehci_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
-- 
2.24.0




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik RB952Ui-5ac2nD?

2019-12-07 Thread Joe Ayers
On Sat, Dec 7, 2019 at 5:19 AM Hauke Mehrtens  wrote:
>
> On 12/6/19 7:02 PM, Ben Greear wrote:
> > On 12/6/19 9:44 AM, Joe Ayers wrote:
> >>>
> >>>
>  Possibly the same symptoms don't exist on 128MB RAM devices.
> >>>
> >>> Like there is some if condition, which is doing some nasty things on 64M
> >>> devices? I admit, that I don't have ath10k-ct source code under my
> >>> pillow, but
> >>> it doesn't make much sense to me.
> >>>
>  Comparable results between above and my 64MB device.   However, if the
>  sleep time is extended the consumption is more
> >>>
> >>> Ok, I'll let it run overnight with 120s sleep in between.
> >>>
>  I suspect this is not the intended behavior.
> >>>
> >>> No its not and it's even strange, that I'm not seeing it here if it
> >>> should
> >>> happen in the "default setup". Maybe its because:
> >>>
> >>> 1. You're using custom image (I'm using official prebuilt images)
> >>> 2. You're not providing all the steps needed to reproduce the issue
> >>> 3. I've way different hardware
> >>>
> >>> Every detail could make huge difference.
> >>>
> >>> -- ynezz
> >>
> >> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
> >>These look to be related patches to this issue:
> >>
> >> 960-0010-ath10k-limit-htt-rx-ring-size.patch
> >> 960-0011-ath10k-limit-pci-buffer-size.patch
> >>
> >> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
> >> these patches are applied to backports-4.19.85-1, but don't seem to be
> >> applied to ath10k-ct-2019-09-09-5e8cd86f.Should ath10k-ct have
> >> these and other patches?The device's installed packages do include
> >> ath10k-ct (from downloads.openwrt.org installed image).
> >
> > I think that if you need the patches for upstream ath10k, then you
> > should also apply
> > the patches to ath10k-ct.
> >
> > Platforms with more memory probably do not need or benefit from those
> > patches.
> >
> > Thanks,
> > Ben
> >
> Hi,
>
> I am fine with adding these patches to ath10k-ct if they solve problems.
>
> It would be nice if a description could be added to the patches so I
> know what kind of buffers are reduced there.
>
> Will someone send a patch?
>
> Hauke
>

Are there other patches that should be applied?

package/kernel/mac80211/patches/ath:
080-ath10k_thermal_config.patch
921-ath10k_init_devices_synchronously.patch
930-ath10k_add_tpt_led_trigger.patch
960-0010-ath10k-limit-htt-rx-ring-size.patch
960-0011-ath10k-limit-pci-buffer-size.patch
972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch
974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
975-ath10k-use-tpt-trigger-by-default.patch
977-ath10k-add-support-for-configuring-management-packet.patch
978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch
979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
980-ath10k-fix-max-antenna-gain-unit.patch
981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch

package/kernel/ath10k-ct/patches:
161-ath10k-add-support-for-configuring-management-packet.patch
162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch
163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
164-ath10k-commit-rates-from-mac80211.patch
201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
202-ath10k-4.16-use-tpt-trigger-by-default.patch
203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4

2019-12-07 Thread Petr Štetiar
Paul Fertser  [2019-12-07 17:04:06]:

Hi,

> You changed the status of the patch to "Changes requested" but you

I've marked it as such, because of that discussion[1], but I admit, that I
didn't read it thoroughly.

1. https://patchwork.ozlabs.org/patch/1192429/

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4

2019-12-07 Thread Paul Fertser
Hello dear maintainer,

You changed the status of the patch to "Changes requested" but you
haven't expressed your opinion on the topics raised during the
discussion. Please do so that I can make the changes to your liking.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik RB952Ui-5ac2nD?

2019-12-07 Thread Hauke Mehrtens
On 12/6/19 7:02 PM, Ben Greear wrote:
> On 12/6/19 9:44 AM, Joe Ayers wrote:
>>>
>>>
 Possibly the same symptoms don't exist on 128MB RAM devices.
>>>
>>> Like there is some if condition, which is doing some nasty things on 64M
>>> devices? I admit, that I don't have ath10k-ct source code under my
>>> pillow, but
>>> it doesn't make much sense to me.
>>>
 Comparable results between above and my 64MB device.   However, if the
 sleep time is extended the consumption is more
>>>
>>> Ok, I'll let it run overnight with 120s sleep in between.
>>>
 I suspect this is not the intended behavior.
>>>
>>> No its not and it's even strange, that I'm not seeing it here if it
>>> should
>>> happen in the "default setup". Maybe its because:
>>>
>>> 1. You're using custom image (I'm using official prebuilt images)
>>> 2. You're not providing all the steps needed to reproduce the issue
>>> 3. I've way different hardware
>>>
>>> Every detail could make huge difference.
>>>
>>> -- ynezz
>>
>> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
>>    These look to be related patches to this issue:
>>
>> 960-0010-ath10k-limit-htt-rx-ring-size.patch
>> 960-0011-ath10k-limit-pci-buffer-size.patch
>>
>> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
>> these patches are applied to backports-4.19.85-1, but don't seem to be
>> applied to ath10k-ct-2019-09-09-5e8cd86f.    Should ath10k-ct have
>> these and other patches?    The device's installed packages do include
>> ath10k-ct (from downloads.openwrt.org installed image).
> 
> I think that if you need the patches for upstream ath10k, then you
> should also apply
> the patches to ath10k-ct.
> 
> Platforms with more memory probably do not need or benefit from those
> patches.
> 
> Thanks,
> Ben
> 
Hi,

I am fine with adding these patches to ath10k-ct if they solve problems.

It would be nice if a description could be added to the patches so I
know what kind of buffers are reduced there.

Will someone send a patch?

Hauke



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ubus: make libubus ready for linking into C++

2019-12-07 Thread Peter Stadler
Use extern "C" { ... } if using libubus.h in a C++ project.

Signed-off-by: Peter Stadler 
---
 libubus.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/libubus.h b/libubus.h
index dc42ea7..6925514 100644
--- a/libubus.h
+++ b/libubus.h
@@ -14,6 +14,10 @@
 #ifndef __LIBUBUS_H
 #define __LIBUBUS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include 
 #include 
 #include 
@@ -414,4 +418,8 @@ static inline int ubus_unregister_event_handler(struct 
ubus_context *ctx,
 return ubus_remove_object(ctx, >obj);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
-- 
2.23.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel