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]
This commit is contained in:
Tobias Waldvogel 2025-08-14 19:33:02 +02:00 committed by Felix Fietkau
parent 3ce8442576
commit 2282377841

View File

@ -221,7 +221,7 @@ function __run_next_handler()
wdev.dbg("run " + op);
if (name != mlo_name)
wdev_mlo_fixup(wdev.handler_config);
wdev.handler_config.data = wdev.handler_data[wdev.name];
wdev.handler_config.data = wdev.handler_data[wdev.name] ?? {};
wdev_script_task = netifd.process({
cb: () => run_handler_cb(wdev, cb),
dir: netifd.wireless.path,