Commit graph

141 commits

Author SHA1 Message Date
Leon M. Busch-George
66e5e9671f wifi-scripts: ucode: fix check for empty crypto object while scanning
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
it can be empty

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/20526
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-27 14:22:58 +01:00
Felix Fietkau
a1f42ab3c7 wifi-scripts: ucode: add missing bssid for adhoc interfaces
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-20 10:50:01 +02:00
Felix Fietkau
6797cabb79 wifi-scripts: ucode: prefer basic rates from iface over device
Sync with the behavior from the legacy scripts

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-20 10:50:01 +02:00
Felix Fietkau
94fb40941b wifi-scripts: ucode: fix issues in mesh setup without supplicant
- Add missing frequency
- Call the correct function for htmode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-20 10:50:01 +02:00
Aleksander Jan Bajkowski
1035615731 wifi-scripts: ucode: export HE and EHT operation in scan results
Export WiFi 6E (HE) and WiFi 7 (EHT) operation data in scan results.
These additional data can be useful to check wifi channel utilization
by nearby stations.

Example:
Cell 32 - Address: xx:xx:xx:xx:xx:xx
          Mode: Master  Frequency: 6.115 GHz  Band: 6 GHz  Channel: 33
          Signal: -14 dBm  Quality: 70/70
          Encryption: SAE (CCMP)
          HE Operation:
                Center Frequency 1: 39
                Center Frequency 2: 47
                Channel Width: 160 MHz
          EHT Operation:
                Center Frequency 1: 47
                Center Frequency 2: 63
                Channel Width: 320 MHz

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/19208
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-20 00:38:50 +02:00
Felix Fietkau
0fe9484fed wifi-scripts: ucode: add support for WPS client
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Fixes unwanted fallback to unencrypted network.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-15 09:56:33 +02:00
Zhi-Jun You
6a68c2fef0 wifi-scripts: ucode: fix airtime_mode with hostapd-mini
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Currently wifi-scripts ucode appends airtime_mode to hostapd config file
unconditionally.
However this breaks bringing up interface with hostapd-mini
because the mini variant doesn't support airtime policy.

Fix this by changing the script to append airtime_mode only when
airtime_mode is set to greater than zero value in /etc/config/wireless.

Fixes: #20136
Fixes: #20314

Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
2025-10-13 10:56:39 +02:00
Felix Fietkau
727d8b27ab wifi-scripts: retry setup of wireless devices that show up late
When a phy appears after setup has already been attempted, tell netifd
to retry setup for all failed wireless devices.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 13:30:31 +02:00
Felix Fietkau
915a57ccd9 netifd: send event after running wireless handler
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
This can be used by other services to trigger reconfiguration, or detect when
PHY renaming has been performed.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 11:04:38 +02:00
Felix Fietkau
8c399b4905 wifi-scripts: ucode: only set a hostapd config if it has interfaces
Do not pass invalid configs to hostapd.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 10:47:34 +02:00
Felix Fietkau
4b7323e3bf netifd: always call setup for disabled radios
Ensures that renaming is handled properly. For disabled radios, setup is
performed with an empty list of interfaces.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 10:47:34 +02:00
Felix Fietkau
3d8d525b21 wifi-scripts: ucode: add support for setting Multi-AP profile/vlanid
Required for Profile-2 support.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-01 10:08:54 +02:00
Felix Fietkau
d761f6a5a5 wifi-scripts: ucode: add start_disabled for AP mode
Enable it, whenever the AP needs to wait for a supplicant instance.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-29 12:37:02 +02:00
Felix Fietkau
37770c503b wifi-scripts: force wmm_enabled to 1 in AP mode, remove option
There are no supported drivers where it even makes sense to disable WMM
anymore, since so much depends on it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-28 18:17:35 +02:00
Felix Fietkau
0da0a6c449 wifi-scripts: ucode: fix r0kh/r1kh parsing
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
The option is an array, and for each entry there should be one generated
line in hostapd.conf. Commas also need to be replaced with whitespace

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-25 13:03:41 +02:00
Felix Fietkau
ce3ab2646b wifi-scripts: ucode: add support for the legacy hwmode option
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some configs that are many years old still have it set instead of band

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-25 09:41:25 +02:00
Felix Fietkau
9aca8a97d7 wpa_supplicant: add MLO client support
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Can also be used for a client mode interface that is able to connect on
multiple bands individually, while handling hostapd state for the correct
band.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-24 13:45:59 +02:00
Felix Fietkau
b11a6a1c5a wifi-scripts: ucode: fix client mode scan list support
- fix the variable name in the configuration file
- provide a default scan list in case the user did not configure it (MLO preparation)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-24 13:45:40 +02:00
Felix Fietkau
009a9e0478 wifi-scripts: simplify MLO handling
Move mlo specific hostapd ubus call from wireless handler to netifd core
ucode script. This avoids unnecessary queueing and the fake MLO wireless
device.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-24 13:45:40 +02:00
Felix Fietkau
04e9929c47 wifi-scripts: enable ucode scripts by default
They are required for MLO support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-24 13:45:40 +02:00
Felix Fietkau
bd80c05c11 netifd/wifi-scripts: use shared global connection for ubus
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-24 13:45:40 +02:00
Oldřich Jedlička
41aceb2de8 wifi-scripts: ucode: print unknown ssid as unknown
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Currently it is printed as "null" (including quotes). Display it the same
as old iwinfo as unknown (no quotes).

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2025-09-02 09:48:35 +02:00
Oldřich Jedlička
1756dddb9f wifi-scripts: ucode: fix dynamic_vlan value handling
The dynamic_vlan has values 0 (disabled), 1 (optional) and 2 (required).

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2025-09-02 09:33:19 +02:00
Oldřich Jedlička
2146f5c31f wifi-scripts: ucode: set default wildcard mac for wifi-station
When creating the PSK file, the old script sets `mac` to
`00:00:00:00:00:00` when `mac` is not specified (see [here][1]),
creating hostapd configuration lines like:

  vlanid=10 00:00:00:00:00:00 MyStrongPassword

That matches any MAC address (a wildcard). The `ucode` script alternative
misses the default, so set it.

[1]: 9c26d14489/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh (L428)

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-02 09:31:56 +02:00
Felix Fietkau
16ba3fc379 wifi-scripts: ucode: fix starting without wpa_supplicant or hostapd
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Fixes: 79f8a83eb9 ("wifi-scripts: ucode: unconditionally call hostapd/supplicant setup")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-30 18:45:01 +02:00
Felix Fietkau
dcf6e9b0ed wifi-scripts: ucode: add missing fields to spec
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Silence warnings

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-29 19:26:19 +02:00
Felix Fietkau
79f8a83eb9 wifi-scripts: ucode: unconditionally call hostapd/supplicant setup
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Ensure that interfaces can be deleted properly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-29 16:54:37 +02:00
Felix Fietkau
e116b423b8 wifi-scripts: default to sae_pwe=2 in client mode
Improves compatibility

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-29 15:10:37 +02:00
Felix Fietkau
f43bf55b41 wifi-scripts: allow configuring per-radio macaddr in shared/mlo wifi-iface
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
When a wifi-iface section is used either for multiple vifs or MLD links,
make it possible to configure the per-radio/link macaddr.
When MLO is enabled, the main macaddr is used for the MLD interface.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-28 10:42:44 +02:00
Felix Fietkau
5bdb7a5990 wifi-scripts: fix reload handling with random macaddr
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Allow initially generated MAC address to be preserved across reload

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-26 11:53:50 +02:00
Felix Fietkau
5781922f33 wifi-scripts: ucode: fix random mac address
Fix exception by using fs.open instead of open

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-26 11:53:50 +02:00
Felix Fietkau
9736d42141 wifi-scripts: ucode: add support for scan_list
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Speed up connecting in client mode by allowing to limit the channels that
need to be scanned.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-15 19:41:48 +02:00
Felix Fietkau
4b6d81d7c1 wifi-scripts: ucode: remove reference to legacy drivers
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-15 19:31:28 +02:00
Felix Fietkau
45360a5aea wifi-scripts: ucode: add extra RSN override for MLO
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Use SAE-EXT-KEY instead of SAE for MLO clients

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-15 11:12:38 +02:00
Tobias Waldvogel
2282377841 wifi-scripts: Avoid syslog message variable data does not exist
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Initialize data to {} if null before calling mac80211.sh
to avoid a confusing error message in the syslog.

Fixes: https://github.com/openwrt/openwrt/issues/14010
Signed-off-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cosmetic change]
2025-08-14 20:40:31 +02:00
Felix Fietkau
6ae4115746 wifi-scripts: ucode: fix setting supported/basic rates in config
Only set the default based on cell density, do not override.

Fixes: https://github.com/openwrt/openwrt/issues/19673
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-14 18:24:32 +02:00
Tobias Waldvogel
98435a37a7 wifi-scripts: iface should be optional in wifi-vlan definition
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
The option iface should be optional according to the description
of /etc/config/wireless in order to avoid repeating the definition
for each virtual interface.

Signed-off-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
2025-08-14 17:28:33 +02:00
Felix Fietkau
d223d29feb wifi-scripts: ucode: get the phy capabilities for the correct band
On multi-band phys, capabilities can differ between bands.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-13 10:54:32 +02:00
Felix Fietkau
813002176f procd: update to Git HEAD (2025-08-12)
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
dafdf98b03bf service: fix object nesting in the ubus get_data call

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-12 18:14:44 +02:00
Felix Fietkau
aa0b5eb429 wifi-scripts: ucode: fix unencrypted sta connection
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
add missing key_mgmt option

Fixes: https://github.com/openwrt/openwrt/issues/17578
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-10 10:17:41 +02:00
Felix Fietkau
3aee42001f wifi-scripts: add modular wps button handler scripts
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Execute scripts in /etc/rc.wps until one of them returns a exit code of 0.
Split up sta and ap handling of wps into separate scripts.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-08 18:53:30 +02:00
Felix Fietkau
adb1fce19b wifi-scripts: set rsn_overriding for client mode interfaces
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Unless HE/EHT is enabled, the client should not process the RSN override IE.
This prevents picking up unsupported ciphers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-04 12:40:08 +02:00
Felix Fietkau
640c3984e3 wifi-scripts: add support for passing wifi-device settings via procd
Allows either overriding individual device settings, or passing complete devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-04 12:08:29 +02:00
Felix Fietkau
de447b93e0 wifi-scripts: fix handling changes to the wifi device disabled flag
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Allow toggling autostart even for disabled devices
When switching from enabled to disabled, call teardown instead of setup

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-04 11:46:42 +02:00
Felix Fietkau
f3dd291b62 wifi-scripts: make wifi/utils.uc available in the legacy scripts variant
It can be used to look up the phy name from uci data in ucode scripts

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-04 11:46:42 +02:00
Felix Fietkau
7d570a489b wifi-scripts: fix handling hotplug-added wireless vifs
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Pass the correct ifname and state

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-03 21:55:12 +02:00
Felix Fietkau
8444891064 wifi-scripts: fix setup of vifs on multi-radio devices
Ensure that the vlan name check is bypassed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-03 21:55:12 +02:00
Felix Fietkau
cbc23f1eb0 wifi-scripts: ucode: remove leftover debug comment
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-03 21:55:12 +02:00
Felix Fietkau
f26d134436 wifi-scripts: ucode: enforce MFP for SAE connections
Avoids connection failures

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-03 21:55:12 +02:00
Felix Fietkau
287f1ea3dd wifi-scripts: ucode: fix ssid handling
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Add proper escaping for ssid values.
Use it to fix multi-ap backhaul ssid.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-02 17:43:28 +02:00