mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 10:18:03 +02:00
supplicant: drop is_wireless argument from NMSupplicantInterface's interface_add()
This commit is contained in:
parent
a8165611a8
commit
5d64da1da2
1 changed files with 10 additions and 8 deletions
|
|
@ -380,7 +380,7 @@ parse_capabilities (NMSupplicantInterface *self, GVariant *capabilities)
|
||||||
*/
|
*/
|
||||||
priv->max_scan_ssids = CLAMP (max_scan_ssids, 0, 5);
|
priv->max_scan_ssids = CLAMP (max_scan_ssids, 0, 5);
|
||||||
nm_log_info (LOGD_SUPPLICANT, "(%s) supports %d scan SSIDs",
|
nm_log_info (LOGD_SUPPLICANT, "(%s) supports %d scan SSIDs",
|
||||||
priv->dev, priv->max_scan_ssids);
|
priv->dev, priv->max_scan_ssids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -935,7 +935,7 @@ on_wpas_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_d
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
interface_add (NMSupplicantInterface *self, gboolean is_wireless)
|
interface_add (NMSupplicantInterface *self)
|
||||||
{
|
{
|
||||||
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
|
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
|
@ -944,8 +944,6 @@ interface_add (NMSupplicantInterface *self, gboolean is_wireless)
|
||||||
|
|
||||||
nm_log_dbg (LOGD_SUPPLICANT, "(%s): adding interface to supplicant", priv->dev);
|
nm_log_dbg (LOGD_SUPPLICANT, "(%s): adding interface to supplicant", priv->dev);
|
||||||
|
|
||||||
priv->is_wireless = is_wireless;
|
|
||||||
|
|
||||||
/* Move to starting to prevent double-calls of interface_add() */
|
/* Move to starting to prevent double-calls of interface_add() */
|
||||||
set_state (self, NM_SUPPLICANT_INTERFACE_STATE_STARTING);
|
set_state (self, NM_SUPPLICANT_INTERFACE_STATE_STARTING);
|
||||||
|
|
||||||
|
|
@ -969,14 +967,18 @@ void
|
||||||
nm_supplicant_interface_set_supplicant_available (NMSupplicantInterface *self,
|
nm_supplicant_interface_set_supplicant_available (NMSupplicantInterface *self,
|
||||||
gboolean available)
|
gboolean available)
|
||||||
{
|
{
|
||||||
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
|
NMSupplicantInterfacePrivate *priv;
|
||||||
|
|
||||||
|
g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self));
|
||||||
|
|
||||||
|
priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
|
||||||
|
|
||||||
if (available) {
|
if (available) {
|
||||||
/* This can happen if the supplicant couldn't be activated but
|
/* This can happen if the supplicant couldn't be activated but
|
||||||
* for some reason was started after the activation failure.
|
* for some reason was started after the activation failure.
|
||||||
*/
|
*/
|
||||||
if (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT)
|
if (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT)
|
||||||
interface_add (self, priv->is_wireless);
|
interface_add (self);
|
||||||
} else {
|
} else {
|
||||||
/* The supplicant stopped; so we must tear down the interface */
|
/* The supplicant stopped; so we must tear down the interface */
|
||||||
set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN);
|
set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN);
|
||||||
|
|
@ -1435,12 +1437,12 @@ nm_supplicant_interface_new (const char *ifname,
|
||||||
priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
|
priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
|
||||||
|
|
||||||
priv->dev = g_strdup (ifname);
|
priv->dev = g_strdup (ifname);
|
||||||
priv->is_wireless = is_wireless;
|
priv->is_wireless = !!is_wireless;
|
||||||
priv->fast_supported = fast_supported;
|
priv->fast_supported = fast_supported;
|
||||||
priv->ap_support = ap_support;
|
priv->ap_support = ap_support;
|
||||||
|
|
||||||
if (start_now)
|
if (start_now)
|
||||||
interface_add (self, priv->is_wireless);
|
interface_add (self);
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue