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:
parent
95cd3c7005
commit
2a2abed0be
1 changed files with 2 additions and 1 deletions
|
@ -39,8 +39,9 @@ function cleanup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function wiphy_get_entry(phy, path) {
|
function wiphy_get_entry(phy, path) {
|
||||||
let wlan = board_data.wlan;
|
board_data.wlan ??= {};
|
||||||
|
|
||||||
|
let wlan = board_data.wlan;
|
||||||
for (let name in wlan)
|
for (let name in wlan)
|
||||||
if (wlan[name].path == path)
|
if (wlan[name].path == path)
|
||||||
return wlan[name];
|
return wlan[name];
|
||||||
|
|
Loading…
Reference in a new issue