mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 02:35:25 +00:00
supplicant: expose nm_supplicant_driver_to_string() helper function
Will be useful later.
This commit is contained in:
parent
d36df06c24
commit
984e94f01d
|
@ -1805,19 +1805,9 @@ on_wpas_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_d
|
|||
*/
|
||||
|
||||
if (priv->dev != NULL) {
|
||||
const char *driver_name = NULL;
|
||||
const char *driver_name;
|
||||
|
||||
switch (priv->driver) {
|
||||
case NM_SUPPLICANT_DRIVER_WIRELESS:
|
||||
driver_name = NM_WPAS_DEFAULT_WIFI_DRIVER;
|
||||
break;
|
||||
case NM_SUPPLICANT_DRIVER_WIRED:
|
||||
driver_name = "wired";
|
||||
break;
|
||||
case NM_SUPPLICANT_DRIVER_MACSEC:
|
||||
driver_name = "macsec_linux";
|
||||
break;
|
||||
}
|
||||
driver_name = nm_supplicant_driver_to_string (priv->driver);
|
||||
|
||||
g_return_if_fail (driver_name);
|
||||
|
||||
|
|
|
@ -48,6 +48,16 @@ NM_CACHED_QUARK_FCN ("nm-supplicant-error-quark", nm_supplicant_error_quark)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NM_UTILS_LOOKUP_STR_DEFINE (nm_supplicant_driver_to_string, NMSupplicantDriver,
|
||||
NM_UTILS_LOOKUP_DEFAULT_WARN (NULL),
|
||||
NM_UTILS_LOOKUP_ITEM (NM_SUPPLICANT_DRIVER_UNKNOWN, "???"),
|
||||
NM_UTILS_LOOKUP_ITEM (NM_SUPPLICANT_DRIVER_WIRELESS, NM_WPAS_DEFAULT_WIFI_DRIVER),
|
||||
NM_UTILS_LOOKUP_ITEM (NM_SUPPLICANT_DRIVER_WIRED, "wired"),
|
||||
NM_UTILS_LOOKUP_ITEM (NM_SUPPLICANT_DRIVER_MACSEC, "macsec_linux"),
|
||||
);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
_caps_set (NMSupplicantManagerPrivate *priv,
|
||||
NMSupplCapType type,
|
||||
|
|
|
@ -127,11 +127,14 @@ typedef enum {
|
|||
} NMSupplicantError;
|
||||
|
||||
typedef enum {
|
||||
NM_SUPPLICANT_DRIVER_UNKNOWN,
|
||||
NM_SUPPLICANT_DRIVER_WIRELESS,
|
||||
NM_SUPPLICANT_DRIVER_WIRED,
|
||||
NM_SUPPLICANT_DRIVER_MACSEC,
|
||||
} NMSupplicantDriver;
|
||||
|
||||
const char *nm_supplicant_driver_to_string (NMSupplicantDriver driver);
|
||||
|
||||
#define NM_SUPPLICANT_ERROR (nm_supplicant_error_quark ())
|
||||
GQuark nm_supplicant_error_quark (void);
|
||||
|
||||
|
|
Loading…
Reference in a new issue