Skip to content

lime.wireless validate that the radios are working #878

Description

@spiccinini

wireless.scandevices() and wireless.mesh_ifaces() are not validating that the radios are working, it is just returning the content of /etc/config/wireless. This crash when for example one radio is removed (or is broken) from the device, leading to lime-config to crash (and posibly other problems).

A possible fix implementantion is:

 function wireless.scandevices()
     local devices = {}
     local uci = config.get_uci_cursor()
-    uci:foreach("wireless", "wifi-device", function(dev) devices[dev[".name"]] = dev end)
+    uci:foreach("wireless", "wifi-device", function(dev)
+        if iwinfo.nl80211.hwmodelist(dev[".name"]) then
+            devices[dev[".name"]] = dev
+        end
+    end)

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions