WiFi interface broken after update to 26.1

Started by sandy, January 29, 2026, 01:33:45 PM

Previous topic - Next topic
Quote from: apraile on January 31, 2026, 04:03:43 PMSame here on PC Engines APU2C4 and wle200nx card (Atheros AR9280).
The upgrade log is available at the following link, in case it is helpful:
https://paste.debian.net/hidden/22cde1ad

Thanks.



I just checked your upgrade log. It appears you have the same issue I encountered. On line 2285, "ath0: only 1 sta vap supported".

However, looks like you have two Atheros adapter installed. The other one (ath1) is not reporting that message, but neither is working.

Can you check if you have a "wlan0" (and "wlan1" in your case for your second adapter) interface with OPNsense 26.1? You can use "ifconfig" from console but Interfaces -> Overview will also work. From my experience, those interfaces would be in a red "no carrier" state.

Quote from: franco on January 31, 2026, 02:34:48 PMWould somebody check the logs for command errors? I have the feeling most reports around the last weeks omit obvious log entries in their installations.


Cheers,
Franco

I'm not seeing anything out of ordinary from that upgrade log, other than the line regarding "only 1 sta vap supported" which happened after finishing update from 25.7 to 26.1.

From my experience, that error message seems to be what was preventing OPNsense Web UI from adding new devices in Interface -> Wireless -> Devices. As soon as I tried adding a new device there and failed with error, I get that message printed on the console.

Still, I wonder what might be responsible for the creation of interfaces "wlan0" (without the ath0 prefix) that I saw with "ifconfig" or Interfaces -> Overview.

root@~~~~~~~:/usr/local/www # diff /usr/local/etc/inc/interfaces.inc*
1693,1696c1693
<         $doExec = sprintf('/sbin/ifconfig wlan create wlandev %s %s bssid name %s', $baseif, $mode, $device);
<
<         #if (mwexecf('/sbin/ifconfig wlan create wlandev %s %s bssid name %s', [$baseif, $mode, $device])) {
<         if (mwexecf($doExec)) {
---
>         if (mwexecf('/sbin/ifconfig wlan create wlandev %s %s bssid name %s', [$baseif, $mode, $device])) {
root@~~~~~~~:/usr/local/www #

Are you referring to this commit? https://github.com/opnsense/core/commit/7e93cdb63f030

I'm not catching the error in either, which doesn't mean it's not there.

Might be worth checking the system log file as well for "ifconfig" failures.


Cheers,
Franco

Today at 09:20:02 AM #18 Last Edit: Today at 09:22:32 AM by hakuna
Quote from: sandy on January 29, 2026, 01:33:45 PMAfter getting it to work with a lot of effort only to have it break again after not even a day when updating I consider the wlan support so broken that I am ready to give up and look for a more stable solution and use an external access point.

This is a common bad decision, using one device for everything ( many with me included have been there ), if it dies or issues, there goes the entire network.

Like Seimus recommended, I have an Asus RT-AX53U running openwrt for years now.
You set it and forget, the latest release is 24.10.5 but if you few up to some adventure, you can get snapshot or RC images.

Quote from: lss4 on February 01, 2026, 06:07:56 AMCan you check if you have a "wlan0" (and "wlan1" in your case for your second adapter) interface with OPNsense 26.1? You can use "ifconfig" from console but Interfaces -> Overview will also work. From my experience, those interfaces would be in a red "no carrier" state.

Yes, you are correct, this is the output of ifconfig:

[...]
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=0
        ether xx:xx:xx:xx:xx:xx
        groups: wlan
        ssid "" channel 1 (2412 MHz 11b)
        regdomain FCC country US ecm authmode OPEN privacy OFF txpower 30
        bmiss 7 scanvalid 60 wme burst bintval 0
        parent interface: ath1
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
wlan1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=0
        ether xx:xx:xx:xx:xx:xx
        grstatus: no carrieroups: wlan
        ssid "" channel 1 (2412 MHz 11b)
        regdomain FCC country US ecm authmode OPEN privacy OFF txpower 30
        bmiss 7 scanvalid 60 wme burst bintval 0
        parent interface: ath0
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


Today at 07:51:09 PM #20 Last Edit: Today at 08:05:52 PM by binaryx
Quote from: franco on Today at 08:53:23 AMAre you referring to this commit? https://github.com/opnsense/core/commit/7e93cdb63f030

I'm not catching the error in either, which doesn't mean it's not there.

Might be worth checking the system log file as well for "ifconfig" failures.


Cheers,
Franco

Is the commit, in my case the issue start with "$mode" as is empty (have PC Engines APU2 HW, HW isn't important from my pov) but new function mwexecf() translates the 2nd %s (for $mode) to regular '' instead of none/null, so ifconfig will return non-zero exit code as '' is not valid parameter for it; so the escape handling need to be fine tuned (did not look into git code so not sure if simple or with more effort).

had to revert to get a log as rotated ;)

latest.log:<11>1 2026-02-02T20:00:36+01:00 ~~~~~~~ opnsense 92351 - [meta sequenceId="1"] /interfaces_wireless_edit.php: The command </sbin/ifconfig wlan create wlandev 'ath0' '' bssid name 'ath0_wlan2'> returned exit code 1 and the output was "ifconfig: : bad value wlan1"
system_20260202.log:<11>1 2026-02-02T20:00:36+01:00 ~~~~~~~ opnsense 92351 - [meta sequenceId="1"] /interfaces_wireless_edit.php: The command </sbin/ifconfig wlan create wlandev 'ath0' '' bssid name 'ath0_wlan2'> returned exit code 1 and the output was "ifconfig: : bad value wlan1"

and "wlan1" is created (as i have ath0_wlan1 already configured so is bit misleading but you get the point)


Thank you, that was the missing puzzle piece here.

How about https://github.com/opnsense/core/commit/45597a976c4 ?


Cheers,
Franco

Quote from: franco on Today at 09:18:31 PMThank you, that was the missing puzzle piece here.

How about https://github.com/opnsense/core/commit/45597a976c4 ?


Cheers,
Franco


the commit works on my end.

maybe if i may suggest:
 - is shorter (as you dont want to use sprintf())
 - easier to follow in the future

##
$wlan_frmt = '/sbin/ifconfig wlan create wlandev %s '.($mode !== '' ? '%s' : '').' bssid name %s';
$wlan_args = [$baseif, ...($mode !== '' ? [$mode] : []), $device];
##

Quote from: hakuna on Today at 09:20:02 AM
Quote from: sandy on January 29, 2026, 01:33:45 PMAfter getting it to work with a lot of effort only to have it break again after not even a day when updating I consider the wlan support so broken that I am ready to give up and look for a more stable solution and use an external access point.

This is a common bad decision, using one device for everything ( many with me included have been there ), if it dies or issues, there goes the entire network.

Like Seimus recommended, I have an Asus RT-AX53U running openwrt for years now.
You set it and forget, the latest release is 24.10.5 but if you few up to some adventure, you can get snapshot or RC images.

Sorry, you must really differentiate the situation.
There is a working function now broken and need to be fixed.
This is not a question of separate functions by spreading it to different devices.
There are lots of use cases an all-in-one appliance is the right answer f.e. in small remote branches.

Today at 10:38:31 PM #24 Last Edit: Today at 10:40:20 PM by franco
Thanks for confirming.

Quotemaybe if i may suggest:
 - is shorter (as you dont want to use sprintf())
 - easier to follow in the future

Fair points. We're aiming for correctness and ease of following the code and not concerned with compressing input at the moment.

Making empty escapes serves a very specific and necessary purpose of not misplacing arguments on the command like when one or more arguments end up empty by accident.

We're already discussing avoiding the use of vsprintf() internally as there are limits to its ability escape number types and that likely means we'll write a short replacement function for "%%" and "%s" only which could also allow to add an empty argument escaper formatter. It would collapse the code back to what it was, e.g. with "%o":

mwexecf('/sbin/ifconfig wlan create wlandev %s %o bssid name %s', [$baseif, $mode, $device];

Though the pattern for variadic format strings is used only in 10% of cases and this is the sole use of an optional argument that I've seen in the projects history and is likely inherent to ifconfig more than anything.


Cheers,
Franco