Re: [OpenWrt-Devel] [PATCH v2] build: download code from github using archive API

2018-06-28 Thread Jo-Philipp Wich
Hi,

> It seems to be like that script does things even if the tarballs are
> already existing locally.

the main problem I see is that you moved the download method detection
from inline make code into the external Python script ... this will
cause a lot of overhead as during the metadata scanning, your script is
getting executed once for every Makefile which can easily be several
thousand times with feeds installed.

~ Jo



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


Re: [OpenWrt-Devel] [PATCH v2] build: download code from github using archive API

2018-06-28 Thread Jo-Philipp Wich
Hi Yousong,

this change seems to introduce serious runtime regressions, see
https://bugs.openwrt.org/index.php?do=details_id=1621

It seems to be like that script does things even if the tarballs are
already existing locally.

On a slightly related note, I find the name to be too generic. It
implies that it handles all kinds of download tasks but in the end it is
only a Github archive wrapper. Maybe you should rename it to github.py
or similar.

~ Jo



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 v2] ath79: add support for TP-Link RE450 v2

2018-06-28 Thread Peter Lundkvist
TP-Link RE450 v2 is a dual band router/range-extender
based on Qualcomm/Atheros QCA9563 + QCA9880.

Specification:

- 775 MHz CPU
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 1x 10/100/1000 Mbps Ethernet (AR8033 PHY)
- 7x LED, 4x button
- UART header on PCB (needs unmounted R64 & R69 0201 resistors/jumpers)

Flash instruction:
Apply factory image in OEM firmware web-gui.

U-Boot does not seem to have any recovery functions, so
debricking requires connection via UART.

Signed-off-by: Peter Lundkvist 
---
 target/linux/ath79/base-files/etc/board.d/01_leds  |   4 +
 .../linux/ath79/base-files/etc/board.d/02_network  |   1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   4 +
 target/linux/ath79/dts/qca9563_tl-re450-v2.dts | 195 +
 target/linux/ath79/image/common-tp-link.mk |   2 +-
 target/linux/ath79/image/generic-tp-link.mk|  18 ++
 tools/firmware-utils/src/tplink-safeloader.c   |  40 +
 7 files changed, 263 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ath79/dts/qca9563_tl-re450-v2.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 29416ad83e..f580b65783 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -28,6 +28,10 @@ case "$board" in
ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" 
"0x02" "0x0f"
ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" 
"0x04" "0x0f"
;;
+"tplink,re450-v2")
+   ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" 
"eth0" "tx rx"
+   ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" 
"eth0" "link"
+   ;;
 "tplink,tl-mr3020-v1")
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x02"
;;
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index 579ccc5bd3..20545cb859 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
ucidef_set_interface_lan "eth0" "dhcp"
;;
"avm,fritz300e"|\
+   "tplink,re450-v2"|\
"tplink,tl-mr10u"|\
"tplink,tl-wr703n"|\
"ubnt,unifiac-lite"|\
diff --git 
a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index c27b4111de..28cfa25f4d 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -91,6 +91,10 @@ case "$FIRMWARE" in
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +16)
;;
+   "tplink,re450-v2")
+   ath10kcal_extract "art" 20480 2116
+   ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
+   ;;
"tplink,tl-archer-c7-v2")
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -2)
diff --git a/target/linux/ath79/dts/qca9563_tl-re450-v2.dts 
b/target/linux/ath79/dts/qca9563_tl-re450-v2.dts
new file mode 100644
index 00..646cdf2975
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_tl-re450-v2.dts
@@ -0,0 +1,195 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include 
+#include 
+
+#include "qca956x.dtsi"
+
+/ {
+   compatible = "tplink,re450-v2", "qca,qca9563";
+   model = "TP-Link RE450 v2";
+
+   chosen {
+   bootargs = "console=ttyS0,115200n8";
+   };
+
+   aliases {
+   led-status = 
+   mdio-gpio0 = 
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   system: power {
+   label = "tp-link:blue:power";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   };
+
+   wlan2g {
+   label = "tp-link:blue:wlan2g";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   default-state = "off";
+   linux,default-trigger = "phy1tpt";
+   };
+
+   wlan5g {
+   label = "tp-link:blue:wlan5g";
+   gpios = < 5 GPIO_ACTIVE_LOW>;
+   default-state = "off";
+   linux,default-trigger = "phy0tpt";
+   };
+
+   lan_link {
+   label = "tp-link:green:lan_link";
+   gpios = < 8 GPIO_ACTIVE_LOW>;
+   default-state = "off";
+   };
+
+   lan_data {
+  

Re: [OpenWrt-Devel] [PATCH 1/2] Introduce new interface event "create" (IFEV_CREATE)

2018-06-28 Thread Alexander Couzens
Hi Hans,

pls don't commit them. 
I've forgot the SOB line, but also would like to add a GPG signature to
it, after you've reviewed them.

Best,
lynxis


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


[OpenWrt-Devel] [PATCH 2/2] iprule: rework interface based rules to handle dynamic interfaces

2018-06-28 Thread Alexander Couzens
Previous netifd would only apply `ip rule`s while config phase.
If the iprule is depending on an interface (iif or oif), the rule
will fail if the interface is not up.

Allow iprules to track interfaces and their devices by using
the interface events.

Fixes: FS#1571
---
 iprule.c | 179 ---
 iprule.h |   9 +++
 2 files changed, 167 insertions(+), 21 deletions(-)

diff --git a/iprule.c b/iprule.c
index 7cf7422f4168..740965431b4c 100644
--- a/iprule.c
+++ b/iprule.c
@@ -2,6 +2,7 @@
  * netifd - network interface daemon
  * Copyright (C) 2012 Felix Fietkau 
  * Copyright (C) 2013 Jo-Philipp Wich 
+ * Copyright (C) 2018 Alexander Couzens 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2
@@ -12,6 +13,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#include 
 #include 
 #include 
 #include 
@@ -66,6 +68,16 @@ const struct uci_blob_param_list rule_attr_list = {
.params = rule_attr,
 };
 
+/* interface based rules are dynamic. */
+static bool rule_ready(struct iprule *rule) {
+   if (rule->flags & IPRULE_OUT && rule->out_dev == NULL)
+   return false;
+
+   if (rule->flags & IPRULE_IN && rule->in_dev == NULL)
+   return false;
+
+   return true;
+}
 
 static bool
 iprule_parse_mark(const char *mark, struct iprule *rule)
@@ -97,13 +109,105 @@ iprule_parse_mark(const char *mark, struct iprule *rule)
return true;
 }
 
+/* called on interface changes of the incoming interface */
+static void rule_in_cb(
+   struct interface_user *dep,
+   struct interface *iface,
+   enum interface_event ev)
+{
+   struct iprule *rule = container_of(dep, struct iprule, in_iface_user);
+
+   switch (ev) {
+   case IFEV_UP:
+   if (!iface->l3_dev.dev)
+   break;
+   memcpy(rule->in_dev, iface->l3_dev.dev->ifname, 
sizeof(rule->in_dev));
+   if (rule_ready(rule))
+   system_add_iprule(rule);
+   break;
+   case IFEV_DOWN:
+   case IFEV_UP_FAILED:
+   case IFEV_FREE:
+   if (rule_ready(rule))
+   system_del_iprule(rule);
+   rule->in_dev[0] = 0;
+   break;
+   default:
+   break;
+   }
+}
+
+/* called on interface changes of the outgoing interface */
+static void rule_out_cb(
+   struct interface_user *dep,
+   struct interface *iface,
+   enum interface_event ev)
+{
+   struct iprule *rule = container_of(dep, struct iprule, out_iface_user);
+
+   switch (ev) {
+   case IFEV_UP:
+   if (!iface->l3_dev.dev)
+   break;
+   memcpy(rule->out_dev, iface->l3_dev.dev->ifname, 
sizeof(rule->out_dev));
+   if (rule_ready(rule))
+   system_add_iprule(rule);
+   break;
+   case IFEV_DOWN:
+   case IFEV_UP_FAILED:
+   case IFEV_FREE:
+   if (rule_ready(rule))
+   system_del_iprule(rule);
+   rule->out_dev[0] = 0;
+   break;
+   default:
+   break;
+   }
+}
+
+/* called on all interface events */
+static void generic_interface_cb(
+   struct interface_user *dep,
+   struct interface *iface,
+   enum interface_event ev)
+{
+   struct iprule *rule;
+
+   if (ev != IFEV_CREATE)
+   return;
+
+   /* add new interfaces to rules */
+   vlist_for_each_element(, rule, node) {
+   if (rule_ready(rule))
+   continue;
+
+   if (!strcmp(rule->out_iface, iface->name)) {
+   assert(!rule->out_dev);
+   memcpy(rule->out_dev, iface->l3_dev.dev->ifname, 
sizeof(rule->out_dev));
+   interface_add_user(>out_iface_user, iface);
+   }
+
+   if (!strcmp(rule->in_iface, iface->name)) {
+   assert(!rule->in_dev);
+   memcpy(rule->in_dev, iface->l3_dev.dev->ifname, 
sizeof(rule->in_dev));
+   interface_add_user(>in_iface_user, iface);
+   }
+
+   if (rule_ready(rule))
+   system_add_iprule(rule);
+   }
+}
+
+struct interface_user generic_listener = {
+   .cb = generic_interface_cb
+};
+
 void
 iprule_add(struct blob_attr *attr, bool v6)
 {
-   struct interface *iif = NULL, *oif = NULL;
struct blob_attr *tb[__RULE_MAX], *cur;
-   struct interface *iface;
struct iprule *rule;
+   char *iface_name;
int af = v6 ? AF_INET6 : AF_INET;
 
blobmsg_parse(rule_attr, __RULE_MAX, tb, blobmsg_data(attr), 
blobmsg_data_len(attr));
@@ 

[OpenWrt-Devel] [PATCH 1/2] Introduce new interface event "create" (IFEV_CREATE)

2018-06-28 Thread Alexander Couzens
"create" will be called before the proto handlers initialised.
---
 interface-event.c | 1 +
 interface.c   | 1 +
 interface.h   | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/interface-event.c b/interface-event.c
index 86e8f5488da8..a40f6dc883d3 100644
--- a/interface-event.c
+++ b/interface-event.c
@@ -38,6 +38,7 @@ static const char * const eventnames[] = {
[IFEV_FREE] = "free",
[IFEV_RELOAD] = "reload",
[IFEV_LINK_UP] = "iflink",
+   [IFEV_CREATE] = "create",
 };
 
 static void
diff --git a/interface.c b/interface.c
index 2a23984922a1..400c605efc0c 100644
--- a/interface.c
+++ b/interface.c
@@ -1275,6 +1275,7 @@ interface_update(struct vlist_tree *tree, struct 
vlist_node *node_new,
set_config_state(if_old, IFC_REMOVE);
} else if (node_new) {
D(INTERFACE, "Create interface '%s'\n", if_new->name);
+   interface_event(if_new, IFEV_CREATE);
proto_init_interface(if_new, if_new->config);
interface_claim_device(if_new);
netifd_ubus_add_interface(if_new);
diff --git a/interface.h b/interface.h
index 0e58f69c26e0..e5639eb326cd 100644
--- a/interface.h
+++ b/interface.h
@@ -28,6 +28,8 @@ enum interface_event {
IFEV_FREE,
IFEV_RELOAD,
IFEV_LINK_UP,
+   /* send when a new interface created. This is before proto handlers has 
been attached. */
+   IFEV_CREATE,
 };
 
 enum interface_state {
-- 
2.18.0


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


[OpenWrt-Devel] [PATCH] hostapd: announce utf8 encoding of ssid

2018-06-28 Thread Jouke Witteveen
The SSID will be UTF-8 encoded when set through LuCI. If otherwise set to a
non UTF-8 encoded value, use utf8_ssid=0 to tell hostapd so.

Signed-off-by: Jouke Witteveen 
---
 package/network/services/hostapd/files/hostapd.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 74e7e1..b5472ace1b 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -227,7 +227,7 @@ hostapd_set_bss_options() {
maxassoc max_inactivity disassoc_low_ack isolate auth_cache \
wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 
wps_ap_setup_locked \
wps_independent wps_device_type wps_device_name 
wps_manufacturer wps_pin \
-   macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
+   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 \
bss_load_update_period chan_util_avg_period
@@ -237,6 +237,7 @@ hostapd_set_bss_options() {
set_default max_inactivity 0
set_default short_preamble 1
set_default disassoc_low_ack 1
+   set_default utf8_ssid 1
set_default hidden 0
set_default wmm 1
set_default uapsd 1
@@ -395,6 +396,7 @@ hostapd_set_bss_options() {
}
 
append bss_conf "ssid=$ssid" "$N"
+   append bss_conf "utf8_ssid=$utf8_ssid" "$N"
[ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge" 
"$N"
[ -n "$iapp_interface" ] && {
local ifname
-- 
2.18.0


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


Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link RE450 v2

2018-06-28 Thread Mathias Kresin

Thanks a lot for the patch.

Due to today's changes you most likely need to rebase your patch. Find 
more comments inline.


Mathias

2018-06-28 19:30 GMT+02:00 Peter Lundkvist :

TP-Link RE450 v2 is a dual band router/range-extender
based on Qualcomm/Atheros QCA9563 + QCA9880.

Specification:

- 775 MHz CPU
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 1x 10/100/1000 Mbps Ethernet (AR8033 PHY)
- 7x LED, 4x button
- UART header on PCB (needs unmounted R64 & R69 0201 resistors/jumpers)

Flash instruction:
Apply factory image in OEM firmware web-gui.

U-Boot does not seem to have any recovery functions, so
debricking requires connection via UART.

Signed-off-by: Peter Lundkvist 
---
 target/linux/ath79/base-files/etc/board.d/01_leds  |   4 +
 .../linux/ath79/base-files/etc/board.d/02_network  |   1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   4 +
 target/linux/ath79/dts/qca9563_tl-re450-v2.dts | 201 +
 target/linux/ath79/image/common-tp-link.mk |   2 +-
 target/linux/ath79/image/generic-tp-link.mk|  18 ++
 tools/firmware-utils/src/tplink-safeloader.c   |  40 
 7 files changed, 269 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ath79/dts/qca9563_tl-re450-v2.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 29416ad83e..f580b65783 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -28,6 +28,10 @@ case "$board" in
ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" 
"0x0f"
ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" 
"0x0f"
;;
+"tplink,re450-v2")
+   ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" 
"tx rx"
+   ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" 
"link"
+   ;;
 "tplink,tl-mr3020-v1")
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x02"
;;
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index e2a45b0526..bad3e735d6 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
ucidef_set_interface_lan "eth0" "dhcp"
;;
"avm,fritz300e"|\
+   "tplink,re450-v2"|\
"tplink,tl-mr10u"|\
"tplink,tl-wr703n"|\
"ubnt,ubnt-unifiac-lite"|\
diff --git 
a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 20df5a220f..8912ea124b 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -91,6 +91,10 @@ case "$FIRMWARE" in
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +16)
;;
+   "tplink,re450-v2")
+   ath10kcal_extract "art" 20480 2116
+   ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
+   ;;
"tplink,tl-archer-c7-v2")
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -2)
diff --git a/target/linux/ath79/dts/qca9563_tl-re450-v2.dts 
b/target/linux/ath79/dts/qca9563_tl-re450-v2.dts
new file mode 100644
index 00..0b1c3f50aa
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_tl-re450-v2.dts
@@ -0,0 +1,201 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include 
+#include 
+
+#include "qca956x.dtsi"
+
+/ {
+   compatible = "tplink,re450-v2", "qca,qca9563";
+   model = "TP-Link RE450 v2";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x400>;
+   };


Please drop the memory node. It has been shown that it isn't required.


+
+   chosen {
+   bootargs = "console=ttyS0,115200n8";
+   };
+
+   aliases {
+   led-status = 
+   mdio-gpio0 = 
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   system: power {
+   label = "tp-link:blue:power";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "heartbeat";


Please drop the heartbeat trigger and only let our diag script handle 
the led.



+   };
+
+   wlan2g {
+   label = "tp-link:blue:wlan2g";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   default-state = "off";
+   linux,default-trigger = "phy1tpt";
+ 

Re: [OpenWrt-Devel] [PATCH 2/3] net: phy: vitesse: Add support for VSC73xx

2018-06-28 Thread Linus Walleij
On Fri, Jun 15, 2018 at 9:25 PM  wrote:
> > On 06/14/2018 05:35 AM, Linus Walleij wrote:

> > Probably as good as it can get given the information you have access to.
> > Maybe the guys at Mircochip could help, adding them.
>
> Microchip have completed the acquisition of Microsemi last months. It will 
> take some time to get access to the right data.
> Hope we can help soon.

I was in contact with ex-Microsemi product support, and they kindly gave
me access to all documentation for all the Vitesse switch chips.

If you can pry out more details like some about the magic switch
internals I'd be happy to update the patch later. I can even read
the VHDL or Verilog files if there is no proper documentation,
it has happened before :D

Yours,
Linus Walleij

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


[OpenWrt-Devel] New QCA 9984 ath10k-ct beta Firmware available.

2018-06-28 Thread Ben Greear
A company recently sponsored the work to rebase my 1000 or so ath10k-ct wave-2 firmware on a more recent upstream QCA firmware release.  I now believe it is 
stable enough for wider testing, so I invite any of you using ath10k-ct wave-2 firmware on the 9984 chipset to grab the latest beta from our web site.  The 
version should have '10.4b' in its name, like:  10.4b-ct-9984-xtH-011-4f5617a  The older stable wave-2 ath10k-ct firmware is just '10.4'.


http://www.candelatech.com/ath10k-10.4.php

Thanks,
Ben

--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com


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


[OpenWrt-Devel] [PATCH] ath79: add support for TP-Link RE450 v2

2018-06-28 Thread Peter Lundkvist
TP-Link RE450 v2 is a dual band router/range-extender
based on Qualcomm/Atheros QCA9563 + QCA9880.

Specification:

- 775 MHz CPU
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 1x 10/100/1000 Mbps Ethernet (AR8033 PHY)
- 7x LED, 4x button
- UART header on PCB (needs unmounted R64 & R69 0201 resistors/jumpers)

Flash instruction:
Apply factory image in OEM firmware web-gui.

U-Boot does not seem to have any recovery functions, so
debricking requires connection via UART.

Signed-off-by: Peter Lundkvist 
---
 target/linux/ath79/base-files/etc/board.d/01_leds  |   4 +
 .../linux/ath79/base-files/etc/board.d/02_network  |   1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   4 +
 target/linux/ath79/dts/qca9563_tl-re450-v2.dts | 201 +
 target/linux/ath79/image/common-tp-link.mk |   2 +-
 target/linux/ath79/image/generic-tp-link.mk|  18 ++
 tools/firmware-utils/src/tplink-safeloader.c   |  40 
 7 files changed, 269 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ath79/dts/qca9563_tl-re450-v2.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 29416ad83e..f580b65783 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -28,6 +28,10 @@ case "$board" in
ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" 
"0x02" "0x0f"
ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" 
"0x04" "0x0f"
;;
+"tplink,re450-v2")
+   ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" 
"eth0" "tx rx"
+   ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" 
"eth0" "link"
+   ;;
 "tplink,tl-mr3020-v1")
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x02"
;;
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index e2a45b0526..bad3e735d6 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
ucidef_set_interface_lan "eth0" "dhcp"
;;
"avm,fritz300e"|\
+   "tplink,re450-v2"|\
"tplink,tl-mr10u"|\
"tplink,tl-wr703n"|\
"ubnt,ubnt-unifiac-lite"|\
diff --git 
a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 20df5a220f..8912ea124b 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -91,6 +91,10 @@ case "$FIRMWARE" in
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +16)
;;
+   "tplink,re450-v2")
+   ath10kcal_extract "art" 20480 2116
+   ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
+   ;;
"tplink,tl-archer-c7-v2")
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -2)
diff --git a/target/linux/ath79/dts/qca9563_tl-re450-v2.dts 
b/target/linux/ath79/dts/qca9563_tl-re450-v2.dts
new file mode 100644
index 00..0b1c3f50aa
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_tl-re450-v2.dts
@@ -0,0 +1,201 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include 
+#include 
+
+#include "qca956x.dtsi"
+
+/ {
+   compatible = "tplink,re450-v2", "qca,qca9563";
+   model = "TP-Link RE450 v2";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x400>;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,115200n8";
+   };
+
+   aliases {
+   led-status = 
+   mdio-gpio0 = 
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   system: power {
+   label = "tp-link:blue:power";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "heartbeat";
+   };
+
+   wlan2g {
+   label = "tp-link:blue:wlan2g";
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   default-state = "off";
+   linux,default-trigger = "phy1tpt";
+   };
+
+   wlan5g {
+   label = "tp-link:blue:wlan5g";
+   gpios = < 5 GPIO_ACTIVE_LOW>;
+   default-state = "off";
+   linux,default-trigger = "phy0tpt";
+   };
+
+   lan_link {
+   label = 

[OpenWrt-Devel] Q: delayed jffs2 overlay mount

2018-06-28 Thread Zefir Kurtisi
Hi John & all,

after increasing the rootfs_data size from 2 to 16MB in our device, I realized 
the
'delayed jffs2 overlay mount' feature which I was not aware before and which in
our setup is causing trouble.

Before, jffs2 was always ready after the wait for failsafe key-press and the
mount_root call in S10boot, while the larger rootfs_data partition regularly is
not fully scanned at that time. According to mount_root.c:start() this is the
intended behaviour to not block preinit, pointing out that jffs2 overlay will be
re-mounted on done(), which happens late in the init process.

What I fail to understand is this: most services are started between S10boot and
S95done, but without jffs2 overlay being mounted, they have no access to the
current configuration but operate with factory config. Does this make sense, or 
am
I missing something?

Does this further mean that services that must access the current configuration
need to be started after S95done is done?


Thanks for any insights,
Zefir

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


Re: [OpenWrt-Devel] [PATCH v2 2/2 netifd] system-linux: add autoneg and link-partner output

2018-06-28 Thread Hans Dedecker
On Wed, Jun 27, 2018 at 11:15 PM  wrote:
>
> From: Joe Holden 
>
> This adds an array that contains the link modes advertised by the other 
> device and also
> indicates whether auto negotiation is true or false.
>
> link-partner may or may not be populated depending on hardware, driver and/or 
> settings.
>
> Signed-off-by: Joe Holden 
Patch applied with a minor tweak

Thx
Hans
> ---
>  system-linux.c | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/system-linux.c b/system-linux.c
> index 1330ea1..362e06d 100644
> --- a/system-linux.c
> +++ b/system-linux.c
> @@ -1730,6 +1730,10 @@ system_if_dump_info(struct device *dev, struct 
> blob_buf *b)
> system_add_link_modes(b, ecmd.advertising);
> blobmsg_close_array(b, c);
>
> +   c = blobmsg_open_array(b, "link-partner");
> +   system_add_link_modes(b, ecmd.lp_advertising);
> +   blobmsg_close_array(b, c);
> +
> c = blobmsg_open_array(b, "link-supported");
> system_add_link_modes(b, ecmd.supported);
> blobmsg_close_array(b, c);
> @@ -1738,6 +1742,8 @@ system_if_dump_info(struct device *dev, struct blob_buf 
> *b)
> snprintf(s, 8, "%d%c", ethtool_cmd_speed(),
> ecmd.duplex == DUPLEX_HALF ? 'H' : 'F');
> blobmsg_add_string_buffer(b);
> +
> +   blobmsg_add_u8(b, "autoneg", !!ecmd.autoneg);
> }
>
> return 0;
> --
> 2.18.0
>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] Archer C7 v2 with Target System "Atheros ATH79 (DTS)" or "Atheros AR7xxx/AR9xxx"

2018-06-28 Thread mail
> -Original Message-
> From: Kevin Darbyshire-Bryant [mailto:ke...@darbyshire-bryant.me.uk]
> Sent: Donnerstag, 28. Juni 2018 10:07
> To: m...@adrianschmutzler.de
> Cc: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] Archer C7 v2 with Target System "Atheros
> ATH79 (DTS)" or "Atheros AR7xxx/AR9xxx"
> 
> 
> 
> > On 28 Jun 2018, at 08:26, m...@adrianschmutzler.de wrote:
> >
> >>>
> >>>
> >>
> >> It may be that board name has changed, what's your cat
> >> /tmp/sysinfo/board_name ?
> >>
> >> Now on ath79 should be tplink,tl-archer-c7-v2 so if doesn't match
> >> this is
> > the
> >> problem
> >>
> >> You can safely try with -F, but you'll be needed to recreate the
> >> /etc/config/wifreless file
> >>
> >> Regards
> >>
> >>
> >> ___
> >> openwrt-devel mailing list
> >> openwrt-devel@lists.openwrt.org
> >> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> >
> > The old boardname was indeed just "archer-c7" (for the v2).
> >
> > Maybe the SUPPORTED DEVICES for the tl-archer-c7-v2 in ath79 should be
> > updated to enable upgrades?
> 
> It sounds an attractive idea, unfortunately the reality is that both the 
> wireless
> config and led config  change, so this ‘side-grade’ isn’t directly compatible.
> Personally I think the fact you have to force the install (sysupgrade -F) 
> acts as
> a reminder that certain things need a gentle tweak afterwards.  If a
> sysupgrade just went through, no warning, then I can see a lot of queries ‘I
> upgraded and now I can’t get wireless to work’.
> 
> Often we advise people to beware upgrades from prior releases to consider
> starting configs afresh, this is changing build architecture as well.  The 
> fact
> that a forced upgrade works as well as it does is an unexpected bonus.
> 
> Kevin

Hi

I accept that.

However, can you (or someone else) enlighten me with a little more detail about 
what changed concerning wireless config and led config (from a user's 
perspective)?

Best

Adrian


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


Re: [OpenWrt-Devel] Archer C7 v2 with Target System "Atheros ATH79 (DTS)" or "Atheros AR7xxx/AR9xxx"

2018-06-28 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 28 Jun 2018, at 08:26, m...@adrianschmutzler.de wrote:
> 
>>> 
>>> 
>> 
>> It may be that board name has changed, what's your cat
>> /tmp/sysinfo/board_name ?
>> 
>> Now on ath79 should be tplink,tl-archer-c7-v2 so if doesn't match this is
> the
>> problem
>> 
>> You can safely try with -F, but you'll be needed to recreate the
>> /etc/config/wifreless file
>> 
>> Regards
>> 
>> 
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> The old boardname was indeed just "archer-c7" (for the v2).
> 
> Maybe the SUPPORTED DEVICES for the tl-archer-c7-v2 in ath79 should be
> updated to enable upgrades?

It sounds an attractive idea, unfortunately the reality is that both the 
wireless config and led config  change, so this ‘side-grade’ isn’t directly 
compatible.  Personally I think the fact you have to force the install 
(sysupgrade -F) acts as a reminder that certain things need a gentle tweak 
afterwards.  If a sysupgrade just went through, no warning, then I can see a 
lot of queries ‘I upgraded and now I can’t get wireless to work’.

Often we advise people to beware upgrades from prior releases to consider 
starting configs afresh, this is changing build architecture as well.  The fact 
that a forced upgrade works as well as it does is an unexpected bonus.

Kevin


signature.asc
Description: Message signed with OpenPGP
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Archer C7 v2 with Target System "Atheros ATH79 (DTS)" or "Atheros AR7xxx/AR9xxx"

2018-06-28 Thread mail
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Lucian Cristian
> Sent: Donnerstag, 28. Juni 2018 00:03
> To: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] Archer C7 v2 with Target System "Atheros
> ATH79 (DTS)" or "Atheros AR7xxx/AR9xxx"
> 
> On 28.06.2018 00:56, e9hack wrote:
> > Hi,
> >
> > I'm using an Archer C7 v2 from TP-Link. Usually I build the image for
> > Target System "Atheros AR7xxx/AR9xxx". If I switch over to "Atheros
> ATH79 (DTS)" and try to update my router, I got the following error
message:
> >
> > root@:~# sysupgrade
> > /tmp/openwrt-ath79-generic-tl-archer-c7-v2-squashfs-sysupgrade-
> d180627
> > .bin & root@:~# Device archer-c7 not supported by this image Supported
> > devices: tplink,tl-archer-c7-v2 Image check 'fwtool_check_image' failed.
> >
> > Is Target System "Atheros ATH79 (DTS)" for Target Profile "TP-LINK
> > Archer C7 v2" not compatible with Target System "Atheros
> AR7xxx/AR9xxx" for the same Target Profile?
> >
> > Regards,
> > Hartmut
> >
> >
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> It may be that board name has changed, what's your cat
> /tmp/sysinfo/board_name ?
> 
> Now on ath79 should be tplink,tl-archer-c7-v2 so if doesn't match this is
the
> problem
> 
> You can safely try with -F, but you'll be needed to recreate the
> /etc/config/wifreless file
> 
> Regards
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

The old boardname was indeed just "archer-c7" (for the v2).

Maybe the SUPPORTED DEVICES for the tl-archer-c7-v2 in ath79 should be
updated to enable upgrades?

Best

Adrian


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