[PATCH iwinfo] nl80211: restore iterating over all devices in nl80211_phy2ifname()

Andre Heider a.heider at gmail.com
Mon Jan 30 14:53:36 PST 2023

On 30/01/2023 23:18, Christian Marangi wrote:
> On Mon, Jan 30, 2023 at 07:57:57PM +0100, Andre Heider wrote:
>> This reverts to the earlier behaviour, because:
>> * phys can be renamed, which breaks hardcoding "phy%d"
>> * /sys/class/ieee80211/*/device can return networks of other phys,
>>    since "device" is a symlink which can have multiple phys
>> The earlier behaviour fixes both points.
>> Fixes: 6194aaf0 "nl80211: simplify iterating over phy's devices"
>> Fixes: #11902
>> Signed-off-by: Andre Heider <a.heider at gmail.com>
>> Tested-by: Olcay Korkmaz <nuke_mania at hotmail.com>
> I remember we had some good stats of the timing improvement of
> 6194aaf05244241d2f51c471a43584f8d80b64ce. Does this reintroduce the
> additional slowdown? Should we add this as a fallback if the interface
> is not found using the expected way?

With a HEAD of 6194aaf, yes, quite some slowdowns were fixed. While 
6194aaf itself does iterate over less, this patch isn't a performance 
hit, maybe just above measurable.

We can't use this as a fallback, as it does the wrong thing. It assumes 
things that I though were safe to assume, but alas... :)


More information about the openwrt-devel mailing list