Commit Graph

1028 Commits

Author SHA1 Message Date
Leon M. Busch-George
66e5e9671f wifi-scripts: ucode: fix check for empty crypto object while scanning
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
4c50648f72 netifd: update to Git HEAD (2025-10-20)
df2f5c9a30f8 veth: delete device before creation to handle stale state
b6d371f30770 system-linux: handle RTM_DELLINK events for device state tracking
777f5942fa7d system-linux: only parse device status for AF_UNSPEC link messages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-21 07:24:46 +02: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
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
David Härdeman
9151c7015e netifd: use the global DHCP DUID for DHCPv4
This makes the DHCPv4 client use the global DHCP DUID to generate a
RFC4361-style client identifier.

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20359
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-19 19:46:22 +02:00
Felix Fietkau
0fe9484fed wifi-scripts: ucode: add support for WPS client
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
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
09ae2daa7c netifd: update to Git HEAD (2025-10-06)
649028013a3c config: fix overriding bridge-vlan sections via procd data

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-06 09:56:27 +02:00
Hauke Mehrtens
eadb0df58d firewall: update to Git HEAD (2025-10-03)
3a65fde5a3e6 build: require CMake >= 3.10 due to dropped legacy support

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-04 12:04:17 +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
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
a60bc69acd netifd: update to Git HEAD (2025-09-30)
c3bf8fd913a4 interface: fix reload for devices that point to vlan aliases
22216cac7c94 bridge: fix reload when ports refer to aliased vlans on another bridge
ecca21ca07dd system: add logging wrappers for basic system functions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-01 10:08:54 +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
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 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
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
Felix Fietkau
125c974bf7 netifd: update to Git HEAD (2025-09-12)
2a85440bcd82 netifd: fix misplaced ")"

Fixes: https://github.com/openwrt/netifd/issues/54
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-12 11:29:07 +02:00
Oldřich Jedlička
41aceb2de8 wifi-scripts: ucode: print unknown ssid as unknown
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
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
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
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
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
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
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
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
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
3ce8442576 netifd: update to Git HEAD (2025-08-14)
8c139e183e52 bridge: fix changing the vlan local flag at runtime

Fixes: https://github.com/openwrt/openwrt/issues/19672
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-14 19:12:37 +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
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
be1c301cdc netifd: update to Git HEAD (2025-08-12)
843a736a4e26 ubus: fix type check in procd ubus data callback
94c3869941b0 interface: avoid memleaks on invalid interfaces
6ead304877ad global: use blobmsg_parse_attr
813b9882dbab config: add support for defining devices via procd data
575b04326e32 config: add support for defining interfaces via procd data
a0be934399cf examples: sync wireless.uc

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-12 20:19:14 +02:00
Felix Fietkau
813002176f procd: update to Git HEAD (2025-08-12)
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
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
f650f2975c netifd: add missing dependencies
Fixes: https://github.com/openwrt/openwrt/issues/19704
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-09 09:25:47 +02:00
Felix Fietkau
3aee42001f wifi-scripts: add modular wps button handler scripts
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