Commit b9f00dbb authored by Thomas Haller's avatar Thomas Haller

manager: remove WiMAX rfkill flag from NMManger

WiMAX support was dropped in commit 721e917c.
Also, remove support for the WiMAX rfkill flag and only preserve the
D-Bus property for backward compatibility.
parent bccc1af5
......@@ -79,17 +79,15 @@ parse_state_file (const char *filename,
gboolean *net_enabled,
gboolean *wifi_enabled,
gboolean *wwan_enabled,
gboolean *wimax_enabled,
GError **error)
{
GKeyFile *state_file;
GError *tmp_error = NULL;
gboolean wifi, net, wwan, wimax;
gboolean wifi, net, wwan;
g_return_val_if_fail (net_enabled != NULL, FALSE);
g_return_val_if_fail (wifi_enabled != NULL, FALSE);
g_return_val_if_fail (wwan_enabled != NULL, FALSE);
g_return_val_if_fail (wimax_enabled != NULL, FALSE);
state_file = g_key_file_new ();
g_key_file_set_list_separator (state_file, ',');
......@@ -111,7 +109,6 @@ parse_state_file (const char *filename,
g_key_file_set_boolean (state_file, "main", "NetworkingEnabled", *net_enabled);
g_key_file_set_boolean (state_file, "main", "WirelessEnabled", *wifi_enabled);
g_key_file_set_boolean (state_file, "main", "WWANEnabled", *wwan_enabled);
g_key_file_set_boolean (state_file, "main", "WimaxEnabled", *wimax_enabled);
data = g_key_file_to_data (state_file, &len, NULL);
if (data)
......@@ -143,11 +140,6 @@ parse_state_file (const char *filename,
*wwan_enabled = wwan;
g_clear_error (&tmp_error);
wimax = g_key_file_get_boolean (state_file, "main", "WimaxEnabled", &tmp_error);
if (tmp_error == NULL)
*wimax_enabled = wimax;
g_clear_error (&tmp_error);
g_key_file_free (state_file);
return TRUE;
}
......@@ -255,7 +247,7 @@ do_early_setup (int *argc, char **argv[], NMConfigCmdLineOptions *config_cli)
int
main (int argc, char *argv[])
{
gboolean wifi_enabled = TRUE, net_enabled = TRUE, wwan_enabled = TRUE, wimax_enabled = TRUE;
gboolean wifi_enabled = TRUE, net_enabled = TRUE, wwan_enabled = TRUE;
gboolean success = FALSE;
NMManager *manager = NULL;
NMConfig *config;
......@@ -389,7 +381,7 @@ main (int argc, char *argv[])
nm_log_info (LOGD_CORE, "NetworkManager (version " NM_DIST_VERSION ") is starting...");
/* Parse the state file */
if (!parse_state_file (global_opt.state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &wimax_enabled, &error)) {
if (!parse_state_file (global_opt.state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &error)) {
nm_log_err (LOGD_CORE, "State file %s parsing failed: (%d) %s",
global_opt.state_file,
error ? error->code : -1,
......@@ -413,8 +405,7 @@ main (int argc, char *argv[])
manager = nm_manager_setup (global_opt.state_file,
net_enabled,
wifi_enabled,
wwan_enabled,
wimax_enabled);
wwan_enabled);
if (!nm_bus_manager_get_connection (nm_bus_manager_get ())) {
nm_log_warn (LOGD_CORE, "Failed to connect to D-Bus; only private bus is available");
......
......@@ -4726,8 +4726,7 @@ NMManager *
nm_manager_setup (const char *state_file,
gboolean initial_net_enabled,
gboolean initial_wifi_enabled,
gboolean initial_wwan_enabled,
gboolean initial_wimax_enabled)
gboolean initial_wwan_enabled)
{
NMManager *self;
NMManagerPrivate *priv;
......@@ -4790,7 +4789,6 @@ nm_manager_setup (const char *state_file,
priv->radio_states[RFKILL_TYPE_WLAN].user_enabled = initial_wifi_enabled;
priv->radio_states[RFKILL_TYPE_WWAN].user_enabled = initial_wwan_enabled;
priv->radio_states[RFKILL_TYPE_WIMAX].user_enabled = initial_wimax_enabled;
nm_exported_object_export (NM_EXPORTED_OBJECT (self));
......@@ -4835,13 +4833,6 @@ nm_manager_init (NMManager *manager)
priv->radio_states[RFKILL_TYPE_WWAN].desc = "WWAN";
priv->radio_states[RFKILL_TYPE_WWAN].rtype = RFKILL_TYPE_WWAN;
priv->radio_states[RFKILL_TYPE_WIMAX].user_enabled = TRUE;
priv->radio_states[RFKILL_TYPE_WIMAX].key = "WimaxEnabled";
priv->radio_states[RFKILL_TYPE_WIMAX].prop = NM_MANAGER_WIMAX_ENABLED;
priv->radio_states[RFKILL_TYPE_WIMAX].hw_prop = NM_MANAGER_WIMAX_HARDWARE_ENABLED;
priv->radio_states[RFKILL_TYPE_WIMAX].desc = "WiMAX";
priv->radio_states[RFKILL_TYPE_WIMAX].rtype = RFKILL_TYPE_WIMAX;
for (i = 0; i < RFKILL_TYPE_MAX; i++)
priv->radio_states[i].hw_enabled = TRUE;
......@@ -4928,10 +4919,10 @@ get_property (GObject *object, guint prop_id,
g_value_set_boolean (value, priv->radio_states[RFKILL_TYPE_WWAN].hw_enabled);
break;
case PROP_WIMAX_ENABLED:
g_value_set_boolean (value, radio_enabled_for_type (self, RFKILL_TYPE_WIMAX, TRUE));
g_value_set_boolean (value, FALSE);
break;
case PROP_WIMAX_HARDWARE_ENABLED:
g_value_set_boolean (value, priv->radio_states[RFKILL_TYPE_WIMAX].hw_enabled);
g_value_set_boolean (value, FALSE);
break;
case PROP_ACTIVE_CONNECTIONS:
nm_utils_g_value_set_object_path_array (value, priv->active_connections);
......@@ -4990,9 +4981,7 @@ set_property (GObject *object, guint prop_id,
g_value_get_boolean (value));
break;
case PROP_WIMAX_ENABLED:
manager_radio_user_toggled (NM_MANAGER (object),
&priv->radio_states[RFKILL_TYPE_WIMAX],
g_value_get_boolean (value));
/* WIMAX is depreacted. This does nothing. */
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......
......@@ -79,8 +79,7 @@ GType nm_manager_get_type (void);
NMManager * nm_manager_setup (const char *state_file,
gboolean initial_net_enabled,
gboolean initial_wifi_enabled,
gboolean initial_wwan_enabled,
gboolean initial_wimax_enabled);
gboolean initial_wwan_enabled);
NMManager * nm_manager_get (void);
......
......@@ -268,8 +268,6 @@ rfkill_type_to_enum (const char *str)
return RFKILL_TYPE_WLAN;
else if (!strcmp (str, "wwan"))
return RFKILL_TYPE_WWAN;
else if (!strcmp (str, "wimax"))
return RFKILL_TYPE_WIMAX;
return RFKILL_TYPE_UNKNOWN;
}
......
......@@ -34,7 +34,6 @@ typedef enum {
typedef enum {
RFKILL_TYPE_WLAN = 0,
RFKILL_TYPE_WWAN = 1,
RFKILL_TYPE_WIMAX = 2,
/* UNKNOWN and MAX should always be 1 more than
* the last rfkill type since RFKILL_TYPE_MAX is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment