[PATCH] netifd: add vif in ascending order instead of lexicographic

2022-10-19 Thread Prasun Maiti
We are using vif_idx for listing vif. But wlan vif ordering is done in lexicographical manner by avl_strcmp() which is casuing in bringing up vap with higher index added first. Instead of using avl_strcmp(), we can use avl_vif_idx_cmp() for interfaces. Signed-off-by: Prasun Maiti ---

Re: gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Peter Naulls
On 10/19/22 05:51, Lukas Zeller wrote: Hi, Lukas, thanks for this. I've read through everything and I agree with your concerns. I'll note also that Linus W's commentary is from 2018. On 19 Oct 2022, at 08:55, Petr Štetiar wrote: IMO there should be `ugpiod` daemon available over ubus,

[PATCH] firewall: config: drop input traffic by default

2022-10-19 Thread Baptiste Jonglez
From: Baptiste Jonglez This is necessary with firewall4 to avoid a hard-to-diagnose race condition during boot, causing DNAT rules not to be taken into account correctly. The root cause is that, during boot, the ruleset is mostly empty, and interface-related rules (including DNAT rules) are

[PATCH] netifd: add vif in ascending order instead of lexicographic

2022-10-19 Thread Prasun Maiti
We are using vif_idx for listing vif. But wlan vif ordering is done in lexicographical manner by avl_strcmp() which is casuing in bringing up vap with higher index added first. Instead of using avl_strcmp(), we can use avl_vif_idx_cmp() for interfaces. Signed-off-by: Prasun Maiti ---

[PATCH] ramips: do not use GPIO function on switch pins on certain devices

2022-10-19 Thread Arınç ÜNAL
The pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has got a function, by default, which does the same thing as the netdev trigger. Because of bridge offloading on DSA, the netdev trigger won't see the frames between the switch ports whilst the default function will. Do not

Re: gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Lukas Zeller
Hi, > On 19 Oct 2022, at 08:55, Petr Štetiar wrote: > > IMO there should be `ugpiod` daemon available over ubus, probably written in > ucode using libgpiod bindings. It should provide ubus events for GPIO inputs > and should be able to control GPIO outputs using ubus calls. What would that

Re: gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Bjørn Mork
Petr Štetiar writes: >> Interesting. This property doesn't seem to be used much in OpenWrt if >> my grep foo is good. It should probably be added at least to every >> system where we want to access GPIOs from userspace? > > Yes, that is my[1] understanding as well. > > 1.

gpio fiddling from userspace [Was: Re: gpio-mt7621 offset fix for 5.10 kernel series]

2022-10-19 Thread Petr Štetiar
Lukas Zeller [2022-10-18 23:10:48]: Hi, > I did investigate this in June on this list [1] and in the openwrt forum [2] > and tried to ask some questions about the right way to handle this, but > apparently it did not echo for some reason back then. IMO there should be `ugpiod` daemon available

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-19 Thread Bjørn Mork
Sergio Paracuellos via openwrt-devel writes: > This is the reason we have 'gpio-line-names' property so you can set > up names for your pins and use it together with actual user space > tools libgpiod and gpiod. Any other gpio user space library is > considered deprecated in these days.

Re: gpio-mt7621 offset fix for 5.10 kernel series

2022-10-19 Thread Sergio Paracuellos
On Wed, Oct 19, 2022 at 6:02 AM Sergio Paracuellos wrote: > > On Wed, Oct 19, 2022 at 1:10 AM Rosen Penev wrote: > > > > On Tue, Oct 18, 2022 at 3:50 PM Peter Naulls wrote: > > > > > > On 10/18/22 17:10, Lukas Zeller wrote: > > > . > > > > > > > > Just not any more - the mt7621 had this too. I