ucentral-event: fix ubus notification and band detect

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2023-02-24 15:06:56 +01:00
parent b4a2291dce
commit a7ea6ef398

View File

@@ -137,14 +137,14 @@ function hapd_subscriber_notify_cb(notify) {
});
}
if (notify.type == 'probe')
return true;
return 0;
let handler = handlers[notify.type];
if (!handler)
return true;
return 0;
let hapd = hostapd[notify.data.ifname];
handler(notify, hapd);
return true;
return 0;
}
function hostapd_event(ifname, type) {
@@ -167,7 +167,7 @@ function hostapd_add(path, obj) {
hostapd[ifname].band = '2G';
else if (hostapd[ifname].op_class >= 115 &&
hostapd[ifname].op_class <= 127)
hostapd[ifname].op_class <= 130)
hostapd[ifname].band = '5G';
else if (hostapd[ifname].op_class >= 133 &&