1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-20 23:58:27 +02:00

wifi-scripts: create the wlan object in board_data if not present

Fixes an error in wifi detection

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2024-02-13 19:24:53 +01:00
parent 95cd3c7005
commit 2a2abed0be

View File

@ -39,8 +39,9 @@ function cleanup() {
}
function wiphy_get_entry(phy, path) {
let wlan = board_data.wlan;
board_data.wlan ??= {};
let wlan = board_data.wlan;
for (let name in wlan)
if (wlan[name].path == path)
return wlan[name];