Commit Graph

18 Commits

Author SHA1 Message Date
Andy Chiang
00e881451a wifi-scripts: ucode: fix start failed
When using wpad-openssl/wpad-basic-openssl, wpa_supplicant/hostapd may not be ready because of openssl.
This cause supplicant.setup and hostapd.setup to be failed.
Therefore, wait for wpa_supplicant/hostapd to be ready before supplicant.setup and hostapd.setup.

Run-tested: mediatek/filogic GL-MT3000
fixes: #20361

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-12 13:45:50 +01:00
Felix Fietkau
a1f42ab3c7 wifi-scripts: ucode: add missing bssid for adhoc interfaces
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
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
ce3ab2646b wifi-scripts: ucode: add support for the legacy hwmode option
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
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
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
79f8a83eb9 wifi-scripts: ucode: unconditionally call hostapd/supplicant setup
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
217c315423 wifi-scripts: ucode: add MLO interface support
MLO can be enabled by configuring a wifi-iface section with multiple
radios, like this:

  config wifi-iface
    list radio 'radio0'
    list radio 'radio1'
    option mlo '1'
    option ssid 'OpenWrt'
    option mode 'ap'
    option network 'lan'
    ...

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-02 16:46:59 +02:00
Felix Fietkau
119aa00a78 wifi-scripts: ucode: add support for iwinfo nl80211 phyname
It is needed for compatibility with scripts that rely on this
existing iwinfo behavior

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-07-18 12:33:14 +02:00
Felix Fietkau
945d168dbe wifi-scripts: fix missing variables for setting frag/rts
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-26 19:16:42 +02:00
Benjamin Berg
168de5cafe wifi-scripts: add missing entries for mesh_nolearn
The plumbing is there in the ucode files to set the parameter using
nl80211. However, the option is never forwarded because it was missing
in mac80211.sh. Add it there and in the schema file.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Link: https://github.com/openwrt/openwrt/pull/19030
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-07 12:54:50 +02:00
Felix Fietkau
b795e5cbcf wifi-scripts: fix setting tx power on some drivers
On some drivers, setting the tx power on the interface is not enough.
Set it for the phy as well.

Fixes: 04fb05914e ("wifi-scripts: add multi-radio config support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-01-04 11:55:04 +01:00
Felix Fietkau
00860e485b wifi-scripts: add macaddr_base wifi-device option
This can be used to configure the base mac address from which all
interface mac addresses are derived

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-12-12 19:19:05 +01:00
Felix Fietkau
ed34e337a9 wifi-scripts: fix ucode support for referencing wifi devices by phy name
Rename phys according to board.json

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-12-08 14:11:14 +01:00
Felix Fietkau
a9ff3ba24b wifi-scripts: add option to set per-device ifname prefix
Simplifies setting ifname to a different pattern for all affected
interfaces.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-12-04 14:59:30 +01:00
John Crispin
218f3884d2 wifi-scripts: add ucode based scripts
Add an ucode based re-implementation of the shell script based wifi code.

The new code is jsonschema driven. The code has been refactored into several
files making it easier to follow.

The new scripts are also way faster than the previous sh implementation.

The new code is currently opt-in via WIFI_SCRIPTS_UCODE and defaults to
EXPERIMENTAL.

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-02 13:55:36 +01:00