Re: [OpenWrt-Devel] [PATCH v2 5/7] ath79: set checksum when patching MAC address on ath10k

2019-09-23 Thread mail
> From: Karl Palsson [mailto:ka...@tweak.net.au] 
> Sent: Montag, 23. September 2019 16:50
> To: Adrian Schmutzler 
> Cc: openwrt-devel 
> Subject: Re: [OpenWrt-Devel] [PATCH v2 5/7] ath79: set checksum when patching 
> MAC address on ath10k
>
>
> Adrian Schmutzler  wrote: 
> > Several devices use ath10kcal_patch_mac, although all ath10k 
> > eeproms have a checksum field and should use 
> > ath10kcal_patch_mac_crc. This might be because the field is not 
> > evaluated by the firmware at the moment. 
> Are you sure it's not because some of them have broken CRC? Have 
> you tested it on any of the devices in question? 
> Sincerely, 
> Karl Palsson 

It does work on my TP-Link Archer C7 v5.

Best

Adrian Schmutzler


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] [Suggestions] Streamline localization by using Weblate for the project, use LiberaPay or OpenCollective to enable people to donate

2019-09-23 Thread Scott 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 ---
First and foremost, as a user of OpenWrt and LuCI by way of TurrisOS thanks for 
everyone who has contributed to OpenWrt. As someone who's seeking to give back 
to the project via localization I noticed that while OpenWrt has relatively 
straightforward documentation on contributing localization 
(https://github.com/openwrt/luci/wiki/i18n), the process could be streamlined a 
great deal more. In particular by using Weblate thus making easier it for those 
who don't know Git and providing significant quality of life improvements even 
for those who do know Git. Those who want to do offline localization could 
continue to do so w/o issue.

For those who aren't familiar with localization, Weblate is basically a web 
based tool that allows to contribute by simply entering in a localized string 
and hitting 'suggest' rather than having to Git clone, download an offline 
client like Lokalize, and then make a PR. There's also a good number of nice 
things to improve localization. It's easy to visually see what languages need 
localization work, you can be notified when there's new strings or a few other 
trigger events, and you can utilize not only the 'translation memory' of 
OpenWrt itself, but other FOSS such as related routing projects like Foris. The 
great thing is that while you can self host your own Weblate server, because 
OpenWrt is FOSS, the folk behind Weblate would likely offer free hosting given 
their Gratis for libre projects pricing. To better see what I'm talking about 
in action please check out: https://hosted.weblate.org/projects/

As a secondary note in what sounds like was written in late 2016, there were 
private discussions about public crowdfunding to help pay for servers 
(https://openwrt.org/infrastructure). Talking with tmomas on the forums it 
sounds like the current bottleneck is people power. Any surplus donations 
beyond infrastructure could be used to pay for part or full time development or 
for bounties. Between the LiberaPay and OpenCollective, OpenCollective may be 
preferable because it is designed to allow both reoccurring and one off 
donations.

Thanks for your time and efforts,
Scott


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


Re: [OpenWrt-Devel] [PATCHv2] apm821xx: remove unnecessary kernel padding

2019-09-23 Thread Russell Senior
Chris,

Could you test v2 on a Meraki MX60?  I only have MR24's.

Thanks!

-- 
Russell Senior
russ...@personaltelco.net

On Sat, Sep 21, 2019 at 1:58 AM Russell Senior 
wrote:

>
> The allocation of LEBs to ubi volumes is handled by the sysupgrade script:
>
>   package/base-files/files/lib/upgrade/nand.sh
>
> and the ubimkvol and or ubirsvol command. Therefore, padding of the
> kernel blob is not needed at all, so use cat instead of dd. The
> BLOCKSIZE variable was only used in the dd command.  In any case, 63k
> made no sense for the way BLOCKSIZE was being used.
>
> 63k (64512) does make sense for DTB_SIZE because of the offsets expected
> by u-boot given extant u-boot-env variables.
>
> Tested on Meraki MR24.
>
> Signed-off-by: Russell Senior 
> ---
>
> v2: got rid of blocking the kernel blob altogether
>
>  target/linux/apm821xx/image/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target/linux/apm821xx/image/Makefile
> b/target/linux/apm821xx/image/Makefile
> index 8203de39c5..108f63cb7a 100644
> --- a/target/linux/apm821xx/image/Makefile
> +++ b/target/linux/apm821xx/image/Makefile
> @@ -58,7 +58,7 @@ define Build/MerakiAdd-dtb
> $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb)
> ( \
> dd if=$@.dtb bs=$(DTB_SIZE) conv=sync; \
> -   dd if=$@ bs=$(BLOCKSIZE) conv=sync; \
> +   cat $@ ; \
> ) > $@.new
> @mv $@.new $@
>  endef
> @@ -127,7 +127,6 @@ define Device/meraki_mr24
>DEVICE_PACKAGES := kmod-spi-gpio -swconfig
>BOARD_NAME := mr24
>DEVICE_DTS := meraki-mr24
> -  BLOCKSIZE := 63k
>IMAGES := sysupgrade.bin
>DTB_SIZE := 64512
>IMAGE_SIZE := 8191k
> --
> 2.23.0
>
>
>
> --
> Russell Senior, President
> russ...@personaltelco.net
>
> ___
> 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] [PATCH] kernel: fix hw-crypto detection of qce driver

2019-09-23 Thread Eneas Queiroz
On Mon, Sep 23, 2019 at 2:12 PM Rosen Penev  wrote:
>
> On Mon, Sep 23, 2019 at 5:28 AM Eneas Queiroz  wrote:
> >
> > On Fri, Sep 20, 2019 at 5:48 PM Eneas U de Queiroz
> >  wrote:
> > >
> > > This adds the CRYPTO_ALG_KERN_DRIVER_ONLY flag to Qualcomm crypto engine
> > > driver algorithms, so that openssl devcrypto can recognize them as
> > > hardware-accelerated.
> > >
> > > Signed-off-by: Eneas U de Queiroz 
> >
> > I noticed this was moved to ipq40xx, but ipq806x is also enabling the
> > qce driver:
> > https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ipq806x/config-4.14#l119
> >
> > So I imagine we need to either copy the patch to ipq806x, or disable
> > the qce driver in ipq806x/config-4.14.  I don't have enough knowledge
> > to decide what to do, so can someone more knowledgeable, please,
> > either do it or point me to the right direction.
> Probably a mistake from the splitting of ipq targets (used to be just one).
>
> Also see:
>
> https://github.com/openwrt/openwrt/commit/fff65dbe2436351ea1feee6c79110971ec4d5881

I thought about that, but then I saw the specs here:
https://www.qualcomm.com/products/ipq8064
It does list the crypto engine for ipq8064, but not for the rest of
the ipq806x family.

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


Re: [OpenWrt-Devel] [PATCH] kernel: fix hw-crypto detection of qce driver

2019-09-23 Thread Christian Lamparter
On Mon, Sep 23, 2019 at 2:28 PM Eneas Queiroz  wrote:
>
> On Fri, Sep 20, 2019 at 5:48 PM Eneas U de Queiroz
>  wrote:
> >
> > This adds the CRYPTO_ALG_KERN_DRIVER_ONLY flag to Qualcomm crypto engine
> > driver algorithms, so that openssl devcrypto can recognize them as
> > hardware-accelerated.
> >
> > Signed-off-by: Eneas U de Queiroz 
>
> I noticed this was moved to ipq40xx, but ipq806x is also enabling the
> qce driver:
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ipq806x/config-4.14#l119
>
> So I imagine we need to either copy the patch to ipq806x, or disable
> the qce driver in ipq806x/config-4.14.  I don't have enough knowledge
> to decide what to do, so can someone more knowledgeable, please,
> either do it or point me to the right direction.

The upstream qce crypto driver does not support the IPQ806x series.
The ipq806x target used to host ipq40xx, so this driver was enabled as
builtin back then.
But since ipq40xx moved out, it's has become a symbol of "hope"
That maybe some day
the NSS support of the IPQ806x can make use of it

So yeah, if you want to crush the hopes and dreams of the IPQ806X users,
you can disable/remove the driver for the ipq806x target.

Regards,
Christian

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


Re: [OpenWrt-Devel] QMI data mode cannot set raw-ip due to active device

2019-09-23 Thread Andre Valentin
Hi Shannon,

I use a hotplug script to change the driver to raw-ip. This works fine for me.

Kind regars,

André

On 23.09.19 19:16, Shannon Barber wrote:
> I'm doing several builds and testing different devices and this issue is 
> persistent on the x86_64 build for the PC Engine APU hardware.
> (I did not encounter it on the Espressobin v7 hardware.)
> 
> I have several modems but I am testing with a Sierra Wireless MC7455 which 
> seems to be a popular one that is also raw-ip only.
> As a quick-fix bringing the interface down and back up where the 
> /lib/netifd/proto/qmi.sh script attempts to change-over to raw-ip seems to 
> work but I'm not certain if its "the right way" to fix this
> issue. It seems to take a while so I think it's retrying later and working 
> the second time.
> 
> 
>                 echo "Device does not support 802.3 mode. Informing driver of 
> raw-ip only for $ifname .."
>                 ifconfig $ifname down
>                 echo "Y" > /sys/class/net/$ifname/qmi/raw_ip
>                 ifconfig $ifname up
> 
> 
> Some snippets from the kernel log:
> 
> [    8.744638] qmi_wwan 1-1.3:1.8: cdc-wdm0: USB WDM device
> [    8.751778] qmi_wwan 1-1.3:1.8 wwan0: register 'qmi_wwan' at 
> usb-:00:13.0-1.3, WWAN/QMI device, fa:8c:eb:d2:d5:df
> [    8.765196] qmi_wwan 1-1.3:1.10: cdc-wdm1: USB WDM device
> [    8.772501] qmi_wwan 1-1.3:1.10 wwan1: register 'qmi_wwan' at 
> usb-:00:13.0-1.3, WWAN/QMI device, fa:8c:eb:d2:d5:df
> [    8.784460] usbcore: registered new interface driver qmi_wwan
> [    8.793076] usbcore: registered new interface driver rndis_host
> [    8.800987] usbcore: registered new interface driver sierra
> [    8.806989] usbserial: USB Serial support registered for Sierra USB modem
> ...
> [   13.569617] qmi_wwan 1-1.3:1.8 wwan0: Cannot change a running device
> 
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 



smime.p7s
Description: S/MIME Cryptographic Signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] QMI data mode cannot set raw-ip due to active device

2019-09-23 Thread Shannon Barber
I'm doing several builds and testing different devices and this issue is 
persistent on the x86_64 build for the PC Engine APU hardware.
(I did not encounter it on the Espressobin v7 hardware.)

I have several modems but I am testing with a Sierra Wireless MC7455 which 
seems to be a popular one that is also raw-ip only.
As a quick-fix bringing the interface down and back up where the 
/lib/netifd/proto/qmi.sh script attempts to change-over to raw-ip seems to work 
but I'm not certain if its "the right way" to fix this issue. It seems to take 
a while so I think it's retrying later and working the second time.


echo "Device does not support 802.3 mode. Informing driver of 
raw-ip only for $ifname .."
ifconfig $ifname down
echo "Y" > /sys/class/net/$ifname/qmi/raw_ip
ifconfig $ifname up


Some snippets from the kernel log:

[8.744638] qmi_wwan 1-1.3:1.8: cdc-wdm0: USB WDM device
[8.751778] qmi_wwan 1-1.3:1.8 wwan0: register 'qmi_wwan' at 
usb-:00:13.0-1.3, WWAN/QMI device, fa:8c:eb:d2:d5:df
[8.765196] qmi_wwan 1-1.3:1.10: cdc-wdm1: USB WDM device
[8.772501] qmi_wwan 1-1.3:1.10 wwan1: register 'qmi_wwan' at 
usb-:00:13.0-1.3, WWAN/QMI device, fa:8c:eb:d2:d5:df
[8.784460] usbcore: registered new interface driver qmi_wwan
[8.793076] usbcore: registered new interface driver rndis_host
[8.800987] usbcore: registered new interface driver sierra
[8.806989] usbserial: USB Serial support registered for Sierra USB modem
...
[   13.569617] qmi_wwan 1-1.3:1.8 wwan0: Cannot change a running device


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


Re: [OpenWrt-Devel] [PATCH] kernel: fix hw-crypto detection of qce driver

2019-09-23 Thread Rosen Penev
On Mon, Sep 23, 2019 at 5:28 AM Eneas Queiroz  wrote:
>
> On Fri, Sep 20, 2019 at 5:48 PM Eneas U de Queiroz
>  wrote:
> >
> > This adds the CRYPTO_ALG_KERN_DRIVER_ONLY flag to Qualcomm crypto engine
> > driver algorithms, so that openssl devcrypto can recognize them as
> > hardware-accelerated.
> >
> > Signed-off-by: Eneas U de Queiroz 
>
> I noticed this was moved to ipq40xx, but ipq806x is also enabling the
> qce driver:
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ipq806x/config-4.14#l119
>
> So I imagine we need to either copy the patch to ipq806x, or disable
> the qce driver in ipq806x/config-4.14.  I don't have enough knowledge
> to decide what to do, so can someone more knowledgeable, please,
> either do it or point me to the right direction.
Probably a mistake from the splitting of ipq targets (used to be just one).

Also see:

https://github.com/openwrt/openwrt/commit/fff65dbe2436351ea1feee6c79110971ec4d5881
>
> Cheers,
>
> Eneas
>
> ___
> 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] the change 'base-files, procd: add generic service status' breaks several packages

2019-09-23 Thread Petr Štetiar
On September 23, 2019 3:17:00 PM UTC, Karl Palsson  wrote:
>
>While this might _fix_ things, it surely goes against the expectation
>that the user provided script takes precedence?  

I fail to see the issue, the callback was just renamed from `status` to 
`status_service`, otherwise it's expected to work as before.

-- ynezz

Hi,

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


Re: [OpenWrt-Devel] [PATCH] ipq40xx: remove redundant ucidef_set_interfaces_* in 02_network

2019-09-23 Thread Adrian Schmutzler
Hi Dmitry,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
> Behalf Of Dmitry Tunin
> Sent: Montag, 23. September 2019 17:12
> To: Adrian Schmutzler 
> Cc: OpenWrt Development List 
> Subject: Re: [OpenWrt-Devel] [PATCH] ipq40xx: remove redundant 
> ucidef_set_interfaces_* in 02_network
> 
> пн, 23 сент. 2019 г. в 16:34, Adrian Schmutzler 
> :
> >
> > If already included in ucidef_add_switch, you do not have to
> > additionally set the interface mode in ucidef_set_interfaces_*
> > functions.
> >
> > This patch removes/adjusts such redundant cases.
> >
> > Signed-off-by: Adrian Schmutzler 
> >
> > ---
> >
> > This is not tested on the affected devices.
> >
> > However, the same approach is taken for other targets, and
> > network setup is essentially device-independent concerning the
> > changes done here.
> > ---
> >  target/linux/ipq40xx/base-files/etc/board.d/02_network | 7 +++
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network 
> > b/target/linux/ipq40xx/base-files/etc/board.d/02_network
> > index e5ba7260f3..b7631a301c 100755
> > --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
> > +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
> > @@ -24,14 +24,14 @@ ipq40xx_setup_interfaces()
> > ;;
> > asus,rt-ac58u|\
> > zyxel,nbg6617)
> > -   ucidef_set_interfaces_lan_wan "eth0" "eth1"
> > +   ucidef_set_interface_wan "eth1"
> > ucidef_add_switch "switch0" \
> > "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
> > ;;
> 
> I planned to investigate this, but didn't find time yet. The config
> initially is wrong.
> For  asus,rt-ac58u|\
> > zyxel,nbg6617)
> 
> There should be port 5 on vid 2 for eth 1 to enable vlan working.
> Currently saving any config in luci breaks vlans, because port 5 isn't
> defined here. The port 5 is removed.
> I suggest lo leave this alone for a while. I am going to find some
> kind of a solultion and suggest it.

Fine with me, as my patch is purely cosmetical and low prio anyway.

Are you just talking about asus/zyxel case or should I remove the entire patch 
(-> mark as deferred)?

Best

Adrian


> 
> ___
> 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] QCA9994 outdoor 13km link

2019-09-23 Thread support

Hi Ben,

When do you think you might be able to make those changes to your 
driver?


Thanks,
Klevis.



On 2019-09-20 13:00, Ben Greear wrote:

On 9/20/19 12:55 PM, Vincent Wiemann wrote:

Hi Klevis,

have you tried it with a short distance?
If you did you should better ask Ben Greear directly.


I asked him to post publicly so that others can help answer and that
my own answers might
help someone else.

I have some patches that should enable coverage class settings for
wave-2, but I am too busy
with other things right now to port them to my ath10k-ct 
driver/firmware.


Thanks,
Ben



By the way ath10k gen 2 chipsets don't work very well with long 
distance links without a
special feature which implementation is only available to companies 
like Ubiquiti and very few

people who have an own reverse-engineered implementation.
It works on IPQ401X, QCA9886 and QCA9888 based chips only.

And it is not possible to set a coverage class for gen 2 devices, yet 
as far as I know due to missing
documentation and implementation (correct me if that information is 
outdated).

Furthermore a high channel width often results in problems
due to lower receiver sensibility.
We have better experiences with lower channel widths and sometimes get 
more throughput with that.


Actually I think this does not explain your connection issues as 13 km 
is not that much.


Regards,

Vincent Wiemann

On 20.09.19 18:30, supp...@maxnet.al wrote:

Hello everyone,

I am trying to setup a custom made outdoor link with Apu2d2 board 
devices and QCA9994 cards from compex. After i installed openwrt and 
ath10k ct driver, kmod ath10k and board-2.bin the device can run a 
80MHz channel in WDS AP. The problem is that it won't run as station 
or station wds. It can scan

the SSIDs but won't connect them.

Any suggestion?

Thank you!
Klevis



___
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] [PATCH] ipq40xx: remove redundant ucidef_set_interfaces_* in 02_network

2019-09-23 Thread Dmitry Tunin
пн, 23 сент. 2019 г. в 16:34, Adrian Schmutzler :
>
> If already included in ucidef_add_switch, you do not have to
> additionally set the interface mode in ucidef_set_interfaces_*
> functions.
>
> This patch removes/adjusts such redundant cases.
>
> Signed-off-by: Adrian Schmutzler 
>
> ---
>
> This is not tested on the affected devices.
>
> However, the same approach is taken for other targets, and
> network setup is essentially device-independent concerning the
> changes done here.
> ---
>  target/linux/ipq40xx/base-files/etc/board.d/02_network | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network 
> b/target/linux/ipq40xx/base-files/etc/board.d/02_network
> index e5ba7260f3..b7631a301c 100755
> --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
> @@ -24,14 +24,14 @@ ipq40xx_setup_interfaces()
> ;;
> asus,rt-ac58u|\
> zyxel,nbg6617)
> -   ucidef_set_interfaces_lan_wan "eth0" "eth1"
> +   ucidef_set_interface_wan "eth1"
> ucidef_add_switch "switch0" \
> "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
> ;;

I planned to investigate this, but didn't find time yet. The config
initially is wrong.
For  asus,rt-ac58u|\
> zyxel,nbg6617)

There should be port 5 on vid 2 for eth 1 to enable vlan working.
Currently saving any config in luci breaks vlans, because port 5 isn't
defined here. The port 5 is removed.
I suggest lo leave this alone for a while. I am going to find some
kind of a solultion and suggest it.

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


[OpenWrt-Devel] [PATCH] ipq40xx: add label MAC address for FritzBox 4040

2019-09-23 Thread Adrian Schmutzler
This adds label MAC address for the AVM FritzBox 4040, the first
device in ipq40xx target.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/ipq40xx/base-files/etc/board.d/02_network | 4 
 1 file changed, 4 insertions(+)

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network 
b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index e5ba7260f3..082724ebfc 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -77,6 +77,9 @@ ipq40xx_setup_macs()
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
;;
+   avm,fritzbox-4040)
+   label_mac=$(cat /sys/class/net/eth0/address)
+   ;;
engenius,ens620ext)
wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
lan_mac=$(macaddr_add "$wan_mac" 1)
@@ -89,6 +92,7 @@ ipq40xx_setup_macs()
 
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
+   [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
 }
 
 board_config_update
-- 
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: enable audio for sun4i

2019-09-23 Thread Andre Heider
Enable SND_SUN4I_CODEC and SND_SUN4I_SPDIF.

Tested on cubieboard2.

Signed-off-by: Andre Heider 
---
 target/linux/sunxi/config-4.19 | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/sunxi/config-4.19 b/target/linux/sunxi/config-4.19
index b1a9d7342c..a95bcc9e3f 100644
--- a/target/linux/sunxi/config-4.19
+++ b/target/linux/sunxi/config-4.19
@@ -501,13 +501,16 @@ CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SND=y
 CONFIG_SND_COMPRESS_OFFLOAD=y
+CONFIG_SND_DMAENGINE_PCM=y
 CONFIG_SND_JACK=y
 CONFIG_SND_JACK_INPUT_DEV=y
 CONFIG_SND_PCM=y
 CONFIG_SND_SOC=y
+CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
 CONFIG_SND_SOC_I2C_AND_SPI=y
+CONFIG_SND_SUN4I_CODEC=y
 # CONFIG_SND_SUN4I_I2S is not set
-# CONFIG_SND_SUN4I_SPDIF is not set
+CONFIG_SND_SUN4I_SPDIF=y
 # CONFIG_SND_SUN8I_CODEC is not set
 # CONFIG_SND_SUN8I_CODEC_ANALOG is not set
 CONFIG_SOUND=y
-- 
2.23.0


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


[OpenWrt-Devel] [PATCH 1/2] sunxi: update kernel config

2019-09-23 Thread Andre Heider
This is just a `make kernel_oldconfig` run without further changes.

Signed-off-by: Andre Heider 
---
 target/linux/sunxi/config-4.19 | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/sunxi/config-4.19 b/target/linux/sunxi/config-4.19
index ef5e1b28d3..b1a9d7342c 100644
--- a/target/linux/sunxi/config-4.19
+++ b/target/linux/sunxi/config-4.19
@@ -79,6 +79,7 @@ CONFIG_BLK_SCSI_REQUEST=y
 CONFIG_BOUNCE=y
 CONFIG_CACHE_L2X0=y
 CONFIG_CAN=y
+CONFIG_CC_HAS_ASM_GOTO=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
@@ -210,6 +211,7 @@ CONFIG_GENERIC_EARLY_IOREMAP=y
 CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
 CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
@@ -370,14 +372,11 @@ CONFIG_MMC_SUNXI=y
 CONFIG_MMU_NOTIFIER=y
 CONFIG_MODULES_TREE_LOOKUP=y
 CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MTD=y
-CONFIG_MTD_SPLIT_SUPPORT=y
-CONFIG_MTD_SPLIT_FIT_FW=y
-CONFIG_MTD_OF_PARTS=y
-CONFIG_MTD_JEDECPROBE=y
 # CONFIG_MTD_IMPA7 is not set
+CONFIG_MTD_JEDECPROBE=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIT_FW=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEON=y
@@ -517,6 +516,7 @@ CONFIG_SOUND_OSS_CORE=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_SPI=y
 CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
 CONFIG_SPI_SUN4I=y
 CONFIG_SPI_SUN6I=y
 CONFIG_SRCU=y
-- 
2.23.0


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


[OpenWrt-Devel] [PATCH] ipq40xx: remove redundant ucidef_set_interfaces_* in 02_network

2019-09-23 Thread Adrian Schmutzler
If already included in ucidef_add_switch, you do not have to
additionally set the interface mode in ucidef_set_interfaces_*
functions.

This patch removes/adjusts such redundant cases.

Signed-off-by: Adrian Schmutzler 

---

This is not tested on the affected devices.

However, the same approach is taken for other targets, and
network setup is essentially device-independent concerning the
changes done here.
---
 target/linux/ipq40xx/base-files/etc/board.d/02_network | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network 
b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index e5ba7260f3..b7631a301c 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -24,14 +24,14 @@ ipq40xx_setup_interfaces()
;;
asus,rt-ac58u|\
zyxel,nbg6617)
-   ucidef_set_interfaces_lan_wan "eth0" "eth1"
+   ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
avm,fritzbox-4040|\
linksys,ea6350v3|\
linksys,ea8300)
-   ucidef_set_interfaces_lan_wan "eth0" "eth1"
+   ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
;;
@@ -51,13 +51,12 @@ ipq40xx_setup_interfaces()
ucidef_set_interface_lan "eth0"
;;
glinet,gl-b1300)
-   ucidef_set_interfaces_lan_wan "eth0" "eth1"
+   ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0u@eth0" "3:lan" "4:lan"
;;
qxwlan,e2600ac-c1 |\
qxwlan,e2600ac-c2)
-   ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan"
;;
-- 
2.20.1


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


Re: [OpenWrt-Devel] [PATCH] kernel: fix hw-crypto detection of qce driver

2019-09-23 Thread Eneas Queiroz
On Fri, Sep 20, 2019 at 5:48 PM Eneas U de Queiroz
 wrote:
>
> This adds the CRYPTO_ALG_KERN_DRIVER_ONLY flag to Qualcomm crypto engine
> driver algorithms, so that openssl devcrypto can recognize them as
> hardware-accelerated.
>
> Signed-off-by: Eneas U de Queiroz 

I noticed this was moved to ipq40xx, but ipq806x is also enabling the
qce driver:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ipq806x/config-4.14#l119

So I imagine we need to either copy the patch to ipq806x, or disable
the qce driver in ipq806x/config-4.14.  I don't have enough knowledge
to decide what to do, so can someone more knowledgeable, please,
either do it or point me to the right direction.

Cheers,

Eneas

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


Re: [OpenWrt-Devel] [PATCH v2] build: fix make kernel_menuconfig

2019-09-23 Thread Stijn Tintel

On 23/09/2019 10:39, Petr Štetiar wrote:

On a recent Gentoo Linux installation, invoking `make kernel_menuconfig`
in the build system fails, whereas `make menuconfig` in the kernel tree
alone works as expected.

This is happening because STAGING_PREFIX is not defined when kernel's
menuconfig target calls pkg-config from the toolchain/host and thus
pkg-config returns an empty value, and the fallback values in the kernel
config script are applied but those are off and the linking fails.

Solution is to use system's pkg-config for kernel_menuconfig target in
order to provide proper compiler/linker flags.

Tested-by: Stijn Tintel 

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


Re: [OpenWrt-Devel] rpcd: file: add path based read/write/exec ACL checks

2019-09-23 Thread André Valentin
Hi !

Thanks a lot, this works perfect.

Kind regards,

André

Am 22.09.19 um 20:07 schrieb Jo-Philipp Wich:
> Hi,
> 
>> What do I have to do to enable access again, without calling ubus
>> session grant like in the commit? Thank you!
> 
> you need to add the following sections:
> 
> "superuser": {
> ...
> "read": {
> "file": {
> "/": [ "stat", "read" ],
> "/*": [ "stat", "read" ]
> }
> },
> "write": {
> "file": {
> "/": [ "write" ],
> "/*": [ "write", "exec" ]
> }
> }
> }
> 
> Depending on your use case, you might not need the "write" and "exec"
> permissions at all.
> 
> The "exec" entry will allow invoking commands matching the path "/*"
> (so, everything) and the "write" permission will allow (over)writing and
> removing files matching the wildcard path.
> 
> Regards,
> Jo
> 



smime.p7s
Description: S/MIME Cryptographic Signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: initialize youhua, wr1200js WAN MAC addresses from flash

2019-09-23 Thread Chuanhong Guo
Hi!

On Sun, Sep 22, 2019 at 6:01 PM Adrian Schmutzler
 wrote:
>
> This patch changes wan MAC address setup for youhua,wr1200js
> from retrieving it by calculation to reading it from flash.
>
> This has been checked on-device.
>
> Signed-off-by: Adrian Schmutzler 

Applied on my staging tree at:
https://git.openwrt.org/?p=openwrt/staging/981213.git
Thanks!

Regards,
Chuanhong Guo

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


Re: [OpenWrt-Devel] [PATCH v2 2/3] kernel: rtl8367b: add configuration for extended interface 2

2019-09-23 Thread Chuanhong Guo
Hi!

On Tue, Aug 27, 2019 at 5:50 PM Serge Vailugin  wrote:
>
> Both rtl8367b and rtl8367s have two extended interface
> rtl8367rb: 5 port + 2*RGMII/MII
> rtl8367s:  5 port + SGMII/HSGMI + RGMII/MII
> (?)rtl8367sb:  5 port + 2*RGMII/MII
> These interfaces correspond to EXT1 and EXT2 (ports 6 and 7 respectivly).
> Current driver don't support EXT2 configuration but notexisting EXT0
> (port 5).
> This patch allow to configure EXT2 in dts-file:
>
> rtl8367rb {
> compatible = "realtek,rtl8367b";
> cpu_port = <7>;
> realtek,extif2 = <1 0 1 1 1 1 1 1 2>; /* configuration for 
> EXT2 */
> mii-bus = <>;
> phy_id = <29>;
> };
>
> This patch is independent of the rtl8366_smi patch (set switch phy address)
> and may be helpful for device with rtl8367rb connected through EXT2.
>
> Signed-off-by: Serge Vasilugin 

This patch seems to be broken in patchwork:
https://patchwork.ozlabs.org/patch/1153690/
Would you mind to create patches using git format-patch and resend
them with git send-email?

Regards,
Chuanhong Guo

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


Re: [OpenWrt-Devel] [PATCH v2 1/3] kernel: rtl8366_smi: explicitly set phy addr for switch

2019-09-23 Thread Chuanhong Guo
Hi!

On Tue, Aug 27, 2019 at 5:49 PM Serge Vailugin  wrote:
> [...]
> @@ -1558,6 +1558,14 @@ int rtl8366_smi_probe_of(struct platform_device
> *pdev, struct rtl8366_smi *smi)
> goto try_gpio;
> }
>
> +   of_property_read_u32(np, "phy_id", >phy_id);
> +   if(smi->phy_id < 0) {
> +   smi->phy_id = MDC_REALTEK_PHY_ADDR;
> +   }

When of_property_read_u32 fails, it returns a negative value and leave
destination variable unchanged. You should check return value here
instead.

> +
> +   dev_info(>dev,
> +   "switch phy addr=%d\n", smi->phy_id);
> +
> return 0;
>
>   try_gpio:

Regards,
Chuanhong Guo

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


[OpenWrt-Devel] [PATCH v2] build: fix make kernel_menuconfig

2019-09-23 Thread Petr Štetiar
On a recent Gentoo Linux installation, invoking `make kernel_menuconfig`
in the build system fails, whereas `make menuconfig` in the kernel tree
alone works as expected.

This is happening because STAGING_PREFIX is not defined when kernel's
menuconfig target calls pkg-config from the toolchain/host and thus
pkg-config returns an empty value, and the fallback values in the kernel
config script are applied but those are off and the linking fails.

Solution is to use system's pkg-config for kernel_menuconfig target in
order to provide proper compiler/linker flags.

Ref: FS#2423
Cc: Thomas Albers 
Signed-off-by: Petr Štetiar 
---

changes in v2:

 * fixed kernel_nconfig path

 Makefile| 1 +
 include/toplevel.mk | 8 +++-
 scripts/config/Makefile | 2 --
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index ab97eacc9d2b..65ee10a84b8d 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path 
to the OpenWrt dir
 
 world:
 
+DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(OPENWRT_BUILD),1)
diff --git a/include/toplevel.mk b/include/toplevel.mk
index 133da9d830b5..12586e87c09a 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -105,7 +105,9 @@ scripts/config/mconf:
 $(eval $(call rdep,scripts/config,scripts/config/mconf))
 
 scripts/config/qconf:
-   @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf CC="$(HOSTCC_WRAPPER)"
+   @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf \
+   CC="$(HOSTCC_WRAPPER)" \
+   DISTRO-PKG-CONFIG="$(DISTRO_PKG_CONFIG)"
 
 scripts/config/conf:
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
@@ -157,6 +159,10 @@ endif
 kernel_oldconfig: prepare_kernel_conf
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux oldconfig
 
+ifneq ($(DISTRO_PKG_CONFIG),)
+kernel_menuconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+kernel_nconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+endif
 kernel_menuconfig: prepare_kernel_conf
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux menuconfig
 
diff --git a/scripts/config/Makefile b/scripts/config/Makefile
index 8bb62d233c86..8b78d5a68247 100644
--- a/scripts/config/Makefile
+++ b/scripts/config/Makefile
@@ -20,8 +20,6 @@ check_lxdialog = $(shell $(SHELL) 
$(CURDIR)/lxdialog/check-lxdialog.sh -$(1))
 export CFLAGS += -DKBUILD_NO_NLS -I. $(call check_lxdialog,ccflags)
 export CXXFLAGS += -DKBUILD_NO_NLS
 
-DISTRO-PKG-CONFIG := $(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
-
 conf-objs  := conf.o zconf.tab.o
 mconf-objs := mconf.o zconf.tab.o
 qconf-cxxobjs  := qconf.o

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


[OpenWrt-Devel] [PATCH] build: fix make kernel_menuconfig

2019-09-23 Thread Petr Štetiar
On a recent Gentoo Linux installation, invoking `make kernel_menuconfig`
in the build system fails, whereas `make menuconfig` in the kernel tree
alone works as expected.

This is happening because STAGING_PREFIX is not defined when kernel's
menuconfig target calls pkg-config from the toolchain/host and thus
pkg-config returns an empty value, and the fallback values in the kernel
config script are applied but those are off and the linking fails.

Solution is to use system's pkg-config for kernel_menuconfig target in
order to provide proper compiler/linker flags.

Ref: FS#2423
Cc: Thomas Albers 
Signed-off-by: Petr Štetiar 
---
 Makefile| 1 +
 include/toplevel.mk | 8 +++-
 scripts/config/Makefile | 2 --
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index ab97eacc9d2b..65ee10a84b8d 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path 
to the OpenWrt dir
 
 world:
 
+DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(OPENWRT_BUILD),1)
diff --git a/include/toplevel.mk b/include/toplevel.mk
index 133da9d830b5..86e8a268e02a 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -105,7 +105,9 @@ scripts/config/mconf:
 $(eval $(call rdep,scripts/config,scripts/config/mconf))
 
 scripts/config/qconf:
-   @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf CC="$(HOSTCC_WRAPPER)"
+   @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf \
+   CC="$(HOSTCC_WRAPPER)" \
+   DISTRO-PKG-CONFIG="$(DISTRO_PKG_CONFIG)"
 
 scripts/config/conf:
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
@@ -157,6 +159,10 @@ endif
 kernel_oldconfig: prepare_kernel_conf
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux oldconfig
 
+ifneq ($(DISTRO_PKG_CONFIG),)
+kernel_menuconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+kernel_nconfig: prepare_kernel_conf
+endif
 kernel_menuconfig: prepare_kernel_conf
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux menuconfig
 
diff --git a/scripts/config/Makefile b/scripts/config/Makefile
index 8bb62d233c86..8b78d5a68247 100644
--- a/scripts/config/Makefile
+++ b/scripts/config/Makefile
@@ -20,8 +20,6 @@ check_lxdialog = $(shell $(SHELL) 
$(CURDIR)/lxdialog/check-lxdialog.sh -$(1))
 export CFLAGS += -DKBUILD_NO_NLS -I. $(call check_lxdialog,ccflags)
 export CXXFLAGS += -DKBUILD_NO_NLS
 
-DISTRO-PKG-CONFIG := $(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
-
 conf-objs  := conf.o zconf.tab.o
 mconf-objs := mconf.o zconf.tab.o
 qconf-cxxobjs  := qconf.o

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