This change implements the ability to get and set the WiFi back-end,
by leveraging a new script created for that purpose.
The idea is to be able to use 'wpa_supplicant' (which is the default
back-end in NetworkManager upstream) when 'iwd' (the default in
SteamOS) does not work for some reason.
This change interacts with another feature of steamos-manager, which
is to set debug mode for WiFi. Handling debug mode complicates things
substantially because those methods write config for 'iwd' and restart
the daemons/systemd units, with many interdependencies.
Instead of trying to implement all at once and attempt feature-parity
between back-ends on this aspect from the start, as a first step the
operations are just declared incompatible. As a result, if
WifiDebugMode=on the back-end cannot be changed, and conversely the
WifiDebugMode cannot be turned on when the back-end is
'wpa_supplicant'.
Co-authored-by: Manuel A. Fernandez Montecelo <mafm@igalia.com>
Change most of our get/set methods for properties, as these
encompass both operations and additionally provide a change signal.
Additionally expose whether each of the features is supported. This
allows steam to detect when certain options should be hidden in the UI
if the feature is unsupported.
Also surface supported ranges for operations that take int params,
e.g. TDPLimit min/max values.
While the steam client will drive wifi debug mode for now
add some scripts that directly talk to it over dbus to enable
disable, and check the current debug modes.
Signed-off-by: Jeremy Whiting <jeremy.whiting@collabora.com>
This may be useful in cases where SetWifiDebugMode has failed to
check what the current state/setting is.
Though if SetWifiDebugMode has failed we may be in weird state
so logs of steamos-manager should be checked to see what failed.
Signed-off-by: Jeremy Whiting <jpwhiting@kde.org>
Differentiate Galileo devices from others by checking the
contents of /sys/class/drm/id/board_name.
Signed-off-by: Jeremy Whiting <jeremy.whiting@collabora.com>
Changed mode parameter from i32 to u32 as well.
Change from Result<bool, Box<dyn std::error::Error>> to
std::io::Result<bool>
Adjust the xml to add the new method.
Make all private api use Result<()> types so we can do error checking.
Signed-off-by: Jeremy Whiting <jeremy.whiting@collabora.com>