wifi-scripts: wifi-detect.uc: skip null entries on nl80211 phy dump
authorFelix Fietkau <nbd@nbd.name>
Tue, 1 Oct 2024 12:44:31 +0000 (14:44 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 1 Oct 2024 12:45:58 +0000 (14:45 +0200)
This can happen on incomplete device probe

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/wifi-scripts/files/usr/share/hostap/wifi-detect.uc

index 109b6a33cfce02385f43914fb037e46b0cb71cbc..6eb6b84c91453381ee8ec4903fddf6f4ff85d12d 100644 (file)
@@ -79,6 +79,9 @@ function wiphy_detect() {
                return;
 
        for (let phy in phys) {
+               if (!phy)
+                       continue;
+
                let name = phy.wiphy_name;
                let path = phy_path(name);
                let info = {