Calculate physical device by hand (#1676)

This commit is contained in:
Tim Wilkinson 2024-11-05 16:42:01 -08:00 committed by GitHub
parent ff31b89e1d
commit e9c503e8d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -264,8 +264,9 @@ f:close()
local radiomode = "none" local radiomode = "none"
local wlan = aredn.hardware.get_iface_name("wifi") local wlan = aredn.hardware.get_iface_name("wifi")
local phy = "none" local phy = "none"
if wlan:match("^wlan(%d+)$") then local wlanid = wlan:match("^wlan(%d+)$")
phy = iwinfo.nl80211.phyname(wlan) if wlanid then
phy = "phy" .. wlanid
radiomode = "adhoc" radiomode = "adhoc"
end end