summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@redhat.com>2015-04-13 17:07:00 -0400
committerDan Winship <danw@redhat.com>2015-04-17 12:42:23 -0400
commit721e917cb6c3f6bea7e856aaed0cd49626887db1 (patch)
treea82b3d538b0dba1ad5a6b40731980802dbfd48a9
parenta858b383c348c2a43e63be325156b68e3789441a (diff)
wimax: drop WiMAX support (bgo #747846)
Even Fedora is no longer shipping the WiMAX SDK, so it's likely we'll eventually accidentally break some of the code in src/devices/wimax/ (if we haven't already). Discussion on the list showed a consensus for dropping support for WiMAX. So, remove the SDK checks from configure.ac, remove the WiMAX device plugin and associated manager support, and deprecate all the APIs. For compatibility reasons, it is still possible to create and save WiMAX connections, to toggle the software WiMAX rfkill state, and to change the "WIMAX" log level, although none of these have any effect, since no NMDeviceWimax will ever be created. nmcli was only compiling in support for most WiMAX operations when NM as a whole was built with WiMAX support, so that code has been removed now as well. (It is still possible to use nmcli to create and edit WiMAX connections, but those connections will never be activatable.)
-rw-r--r--TODO6
-rw-r--r--clients/cli/connections.c40
-rw-r--r--clients/cli/devices.c382
-rw-r--r--clients/cli/general.c56
-rw-r--r--clients/cli/nmcli-completion19
-rw-r--r--configure.ac27
-rw-r--r--contrib/fedora/REQUIRED_PACKAGES1
-rw-r--r--docs/api/network-manager-docs.xml2
-rw-r--r--docs/libnm-glib/libnm-glib.svg6
-rw-r--r--docs/libnm/libnm.svg6
-rw-r--r--libnm-core/nm-setting-wimax.c14
-rw-r--r--libnm-core/nm-setting-wimax.h4
-rw-r--r--libnm-glib/nm-device-wimax.c41
-rw-r--r--libnm-glib/nm-device-wimax.h12
-rw-r--r--libnm-util/nm-setting-wimax.c16
-rw-r--r--libnm-util/nm-setting-wimax.h5
-rw-r--r--libnm/nm-device-wimax.c36
-rw-r--r--libnm/nm-device-wimax.h10
-rw-r--r--man/nmcli.1.in28
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/Makefile.am9
-rw-r--r--src/devices/nm-device.h2
-rw-r--r--src/devices/wimax/Makefile.am59
-rw-r--r--src/devices/wimax/exports.ver6
-rw-r--r--src/devices/wimax/iwmxsdk.c1515
-rw-r--r--src/devices/wimax/iwmxsdk.h112
-rw-r--r--src/devices/wimax/nm-device-wimax.c1416
-rw-r--r--src/devices/wimax/nm-device-wimax.h64
-rw-r--r--src/devices/wimax/nm-wimax-factory.c91
-rw-r--r--src/devices/wimax/nm-wimax-nsp.c241
-rw-r--r--src/devices/wimax/nm-wimax-nsp.h63
-rw-r--r--src/devices/wimax/nm-wimax-types.h31
-rw-r--r--src/devices/wimax/nm-wimax-util.c83
-rw-r--r--src/devices/wimax/nm-wimax-util.h43
-rw-r--r--src/nm-logging.c3
-rw-r--r--src/nm-logging.h23
-rw-r--r--src/nm-manager.c1
37 files changed, 171 insertions, 4303 deletions
diff --git a/TODO b/TODO
index 113310309a..96dc81b797 100644
--- a/TODO
+++ b/TODO
@@ -347,9 +347,9 @@ connection process.
the best route to go for desktop use-cases as well. Instead of bringing all
available connections up, only bring up the "best" connection at any given
time based on the current priority list (which is rougly Ethernet > WiFi >
-3G/Bluetooth/WiMAX). However, to ensure seamless connectivity, when one
-connection begins to degrade, the next-best connection should be started before
-the current one is terminated, such that there is a small amount of overlap.
+3G/Bluetooth). However, to ensure seamless connectivity, when one connection
+begins to degrade, the next-best connection should be started before the
+current one is terminated, such that there is a small amount of overlap.
Consequently the same behavior should be used when a better connection becomes
available. This behavior should be suspended when special connections like
Internet Connection Sharing ones are started, where clearly the priorities
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 9223866216..f074f24b18 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -161,12 +161,7 @@ static NmcOutputField nmc_fields_settings_names[] = {
NM_SETTING_TEAM_SETTING_NAME","\
NM_SETTING_TEAM_PORT_SETTING_NAME"," \
NM_SETTING_DCB_SETTING_NAME
-#if WITH_WIMAX
-#define NMC_FIELDS_SETTINGS_NAMES_ALL NMC_FIELDS_SETTINGS_NAMES_ALL_X","\
- NM_SETTING_WIMAX_SETTING_NAME
-#else
#define NMC_FIELDS_SETTINGS_NAMES_ALL NMC_FIELDS_SETTINGS_NAMES_ALL_X
-#endif
/* Active connection data */
/* Available fields for GENERAL group */
@@ -254,11 +249,7 @@ usage (void)
"COMMAND := { show | up | down | add | modify | edit | delete | reload | load }\n\n"
" show [--active] [--order <order spec>]\n"
" show [--active] [--show-secrets] [id | uuid | path | apath] <ID> ...\n\n"
-#if WITH_WIMAX
- " up [[id | uuid | path] <ID>] [ifname <ifname>] [ap <BSSID>] [nsp <name>] [passwd-file <file with passwords>]\n\n"
-#else
" up [[id | uuid | path] <ID>] [ifname <ifname>] [ap <BSSID>] [passwd-file <file with passwords>]\n\n"
-#endif
" down [id | uuid | path | apath] <ID> ...\n\n"
" add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS\n\n"
" modify [--temporary] [id | uuid | path] <ID> ([+|-]<setting>.<property> <value>)+\n\n"
@@ -1793,26 +1784,6 @@ find_device_for_connection (NmCli *nmc,
g_free (bssid_up);
}
-#if WITH_WIMAX
- if ( found_device
- && nsp
- && !strcmp (con_type, NM_SETTING_WIMAX_SETTING_NAME)
- && NM_IS_DEVICE_WIMAX (dev)) {
- const GPtrArray *nsps = nm_device_wimax_get_nsps (NM_DEVICE_WIMAX (dev));
- found_device = NULL; /* Mark as not found; set to the device again later, only if NSP matches */
-
- for (j = 0; j < nsps->len; j++) {
- NMWimaxNsp *candidate_nsp = g_ptr_array_index (nsps, j);
- const char *candidate_name = nm_wimax_nsp_get_name (candidate_nsp);
-
- if (!strcmp (nsp, candidate_name)) {
- found_device = dev;
- *spec_object = nm_object_get_path (NM_OBJECT (candidate_nsp));
- break;
- }
- }
- }
-#endif
}
if (found_device) {
@@ -2337,17 +2308,6 @@ do_connection_up (NmCli *nmc, int argc, char **argv)
ap = *argv;
}
-#if WITH_WIMAX
- else if (strcmp (*argv, "nsp") == 0) {
- if (next_arg (&argc, &argv) != 0) {
- g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *(argv-1));
- nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
- goto error;
- }
-
- nsp = *argv;
- }
-#endif
else if (strcmp (*argv, "passwd-file") == 0) {
if (next_arg (&argc, &argv) != 0) {
g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *(argv-1));
diff --git a/clients/cli/devices.c b/clients/cli/devices.c
index eacc51bb69..c50a8539ca 100644
--- a/clients/cli/devices.c
+++ b/clients/cli/devices.c
@@ -240,17 +240,10 @@ static NmcOutputField nmc_fields_dev_show_sections[] = {
{"CONNECTIONS", N_("CONNECTIONS"), 0, nmc_fields_dev_show_connections + 1 }, /* 16 */
{NULL, NULL, 0, NULL }
};
-#if WITH_WIMAX
-#define NMC_FIELDS_DEV_SHOW_SECTIONS_ALL "GENERAL,CAPABILITIES,BOND,TEAM,BRIDGE,VLAN,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,"\
- "WIMAX-PROPERTIES,NSP,BLUETOOTH,CONNECTIONS,IP4,DHCP4,IP6,DHCP6"
-#define NMC_FIELDS_DEV_SHOW_SECTIONS_COMMON "GENERAL.DEVICE,GENERAL.TYPE,GENERAL.HWADDR,GENERAL.MTU,GENERAL.STATE,"\
- "GENERAL.CONNECTION,GENERAL.CON-PATH,WIRED-PROPERTIES,IP4,IP6"
-#else
#define NMC_FIELDS_DEV_SHOW_SECTIONS_ALL "GENERAL,CAPABILITIES,BOND,TEAM,BRIDGE,VLAN,WIFI-PROPERTIES,AP,WIRED-PROPERTIES,"\
"BLUETOOTH,CONNECTIONS,IP4,DHCP4,IP6,DHCP6"
#define NMC_FIELDS_DEV_SHOW_SECTIONS_COMMON "GENERAL.DEVICE,GENERAL.TYPE,GENERAL.HWADDR,GENERAL.MTU,GENERAL.STATE,"\
"GENERAL.CONNECTION,GENERAL.CON-PATH,WIRED-PROPERTIES,IP4,IP6"
-#endif
/* glib main loop variable - defined in nmcli.c */
@@ -262,11 +255,7 @@ static void
usage (void)
{
g_printerr (_("Usage: nmcli device { COMMAND | help }\n\n"
-#if WITH_WIMAX
- "COMMAND := { status | show | connect | disconnect | delete | wifi | wimax }\n\n"
-#else
"COMMAND := { status | show | connect | disconnect | delete | wifi }\n\n"
-#endif
" status\n\n"
" show [<ifname>]\n\n"
" connect <ifname>\n\n"
@@ -276,9 +265,6 @@ usage (void)
" wifi connect <(B)SSID> [password <password>] [wep-key-type key|phrase] [ifname <ifname>]\n"
" [bssid <BSSID>] [name <name>] [private yes|no]\n\n"
" wifi rescan [[ifname] <ifname>]\n\n"
-#if WITH_WIMAX
- " wimax [list [ifname <ifname>] [nsp <name>]]\n\n"
-#endif
));
}
@@ -377,21 +363,6 @@ usage_device_wifi (void)
"the APs, use 'nmcli device wifi list' for that.\n\n"));
}
-#if WITH_WIMAX
-static void
-usage_device_wimax (void)
-{
- g_printerr (_("Usage: nmcli device wimax { ARGUMENTS | help }\n"
- "\n"
- "Perform operation on WiMAX devices.\n"
- "\n"
- "ARGUMENTS := [list [ifname <ifname>] [nsp <name>]]\n"
- "\n"
- "List available WiMAX NSPs. The 'ifname' and 'nsp' options can be used to\n"
- "list networks for a particular interface, or with a specific NSP.\n\n"));
-}
-#endif
-
/* quit main loop */
static void
quit (void)
@@ -662,54 +633,6 @@ fill_output_access_point (gpointer data, gpointer user_data)
g_string_free (security_str, FALSE);
}
-#if WITH_WIMAX
-static void
-fill_output_wimax_nsp (NMWimaxNsp *nsp, NmCli *nmc, NMDevice *dev, int idx, guint32 o_flags)
-{
- NMDeviceWimax *wimax = NM_DEVICE_WIMAX (dev);
- char *nsp_name, *quality_str;
- const char *ntype;
- gboolean active = FALSE;
- NmcOutputField *arr;
-
- switch (nm_wimax_nsp_get_network_type (nsp)) {
- case NM_WIMAX_NSP_NETWORK_TYPE_HOME:
- ntype = _("Home");
- break;
- case NM_WIMAX_NSP_NETWORK_TYPE_PARTNER:
- ntype = _("Partner");
- break;
- case NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER:
- ntype = _("Roaming");
- break;
- default:
- ntype = _("Unknown");
- break;
- }
-
- if (nm_device_get_state (dev) == NM_DEVICE_STATE_ACTIVATED) {
- if (nsp == nm_device_wimax_get_active_nsp (wimax))
- active = TRUE;
- }
-
- quality_str = g_strdup_printf ("%u", nm_wimax_nsp_get_signal_quality (nsp));
- nsp_name = g_strdup_printf ("NSP[%d]", idx); /* NSP */
-
- arr = nmc_dup_fields_array (nmc_fields_dev_wimax_list,
- sizeof (nmc_fields_dev_wimax_list),
- o_flags);
- set_val_str (arr, 0, nsp_name);
- set_val_strc (arr, 1, nm_wimax_nsp_get_name (nsp));
- set_val_str (arr, 2, quality_str);
- set_val_strc (arr, 3, ntype);
- set_val_strc (arr, 4, nm_device_get_iface (dev));
- set_val_strc (arr, 5, active ? _("yes") : _("no"));
- set_val_strc (arr, 6, nm_object_get_path (NM_OBJECT (nsp)));
-
- g_ptr_array_add (nmc->output_data, arr);
-}
-#endif
-
static char *
bluetooth_caps_to_string (NMBluetoothCapabilities caps)
{
@@ -1041,78 +964,6 @@ show_device_info (NMDevice *device, NmCli *nmc)
was_output = TRUE;
}
}
-#if WITH_WIMAX
- else if (NM_IS_DEVICE_WIMAX (device)) {
- /* WIMAX-PROPERTIES */
- if (!strcasecmp (nmc_fields_dev_show_sections[section_idx].name, nmc_fields_dev_show_sections[5].name)) {
- char *cfreq = NULL, *rssi = NULL, *cinr = NULL, *txpow = NULL;
- guint tmp_uint;
- gint tmp_int;
-
- /* Field names */
- tmpl = nmc_fields_dev_show_wimax_prop;
- tmpl_len = sizeof (nmc_fields_dev_show_wimax_prop);
- nmc->print_fields.indices = parse_output_fields (section_fld ? section_fld : NMC_FIELDS_DEV_SHOW_WIMAX_PROP_ALL,
- tmpl, FALSE, NULL, NULL);
- arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_FIELD_NAMES);
- g_ptr_array_add (nmc->output_data, arr);
-
- /* Center frequency */
- tmp_uint = nm_device_wimax_get_center_frequency (NM_DEVICE_WIMAX (device));
- if (tmp_uint)
- cfreq = g_strdup_printf ("%'.1f MHz", (double) tmp_uint / 1000.0);
-
- /* RSSI */
- tmp_int = nm_device_wimax_get_rssi (NM_DEVICE_WIMAX (device));
- if (tmp_int)
- rssi = g_strdup_printf ("%d dBm", tmp_int);
-
- /* CINR */
- tmp_int = nm_device_wimax_get_cinr (NM_DEVICE_WIMAX (device));
- if (tmp_int)
- cinr = g_strdup_printf ("%d dB", tmp_int);
-
- /* TX Power */
- tmp_int = nm_device_wimax_get_tx_power (NM_DEVICE_WIMAX (device));
- if (tmp_int)
- txpow = g_strdup_printf ("%'.2f dBm", (float) tmp_int / 2.0);
-
- arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_SECTION_PREFIX);
- set_val_strc (arr, 0, nmc_fields_dev_show_sections[5].name); /* "WIMAX-PROPERTIES" */
- set_val_str (arr, 1, cfreq);
- set_val_str (arr, 2, rssi);
- set_val_str (arr, 3, cinr);
- set_val_str (arr, 4, txpow);
- set_val_strc (arr, 5, nm_device_wimax_get_bsid (NM_DEVICE_WIMAX (device)));
- g_ptr_array_add (nmc->output_data, arr);
-
- print_data (nmc); /* Print all data */
- was_output = TRUE;
- }
-
- /* section NSP */
- if (!strcasecmp (nmc_fields_dev_show_sections[section_idx].name, nmc_fields_dev_show_sections[6].name)) {
- const GPtrArray *nsps;
- int g, idx = 1;
-
- tmpl = nmc_fields_dev_wimax_list;
- tmpl_len = sizeof (nmc_fields_dev_wimax_list);
- nmc->print_fields.indices = parse_output_fields (section_fld ? section_fld : NMC_FIELDS_DEV_WIMAX_LIST_FOR_DEV_LIST,
- tmpl, FALSE, NULL, NULL);
- arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_FIELD_NAMES);
- g_ptr_array_add (nmc->output_data, arr);
-
- nsps = nm_device_wimax_get_nsps (NM_DEVICE_WIMAX (device));
- for (g = 0; g < nsps->len; g++) {
- NMWimaxNsp *nsp = g_ptr_array_index (nsps, g);
-
- fill_output_wimax_nsp (nsp, nmc, device, idx++, NMC_OF_FLAG_SECTION_PREFIX);
- }
- print_data (nmc); /* Print all data */
- was_output = TRUE;
- }
- }
-#endif
/* IP configuration info */
cfg4 = nm_device_get_ip4_config (device);
@@ -2710,228 +2561,6 @@ do_device_wifi (NmCli *nmc, int argc, char **argv)
return nmc->return_value;
}
-#if WITH_WIMAX
-static void
-show_nsp_info (NMDevice *device, NmCli *nmc)
-{
- const GPtrArray *nsps;
- int i, idx = 1;
- NmcOutputField *arr;
-
- /* Add headers (field names) */
- arr = nmc_dup_fields_array (nmc_fields_dev_wimax_list, sizeof (nmc_fields_dev_wimax_list),
- NMC_OF_FLAG_MAIN_HEADER_ADD | NMC_OF_FLAG_FIELD_NAMES);
- g_ptr_array_add (nmc->output_data, arr);
-
- nsps = nm_device_wimax_get_nsps (NM_DEVICE_WIMAX (device));
- for (i = 0; i < nsps->len; i++) {
- NMWimaxNsp *nsp = g_ptr_array_index (nsps, i);
-
- fill_output_wimax_nsp (nsp, nmc, device, idx++, 0);
- }
- print_data (nmc); /* Print all data */
- nmc_empty_output_fields (nmc);
-}
-
-static NMCResultCode
-do_device_wimax_list (NmCli *nmc, int argc, char **argv)
-{
- GError *error = NULL;
- NMDevice *device = NULL;
- NMWimaxNsp *nsp = NULL;
- const char *ifname = NULL;
- const char *nsp_user = NULL;
- const GPtrArray *devices;
- const GPtrArray *nsps;
- int i, j;
- char *fields_str;
- char *fields_all = NMC_FIELDS_DEV_WIMAX_LIST_ALL;
- char *fields_common = NMC_FIELDS_DEV_WIMAX_LIST_COMMON;
- NmcOutputField *tmpl, *arr;
- size_t tmpl_len;
- const char *base_hdr = _("WiMAX NSP list");
-
- while (argc > 0) {
- if (strcmp (*argv, "ifname") == 0) {
- if (next_arg (&argc, &argv) != 0) {
- g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *(argv-1));
- nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
- goto error;
- }
- ifname = *argv;
- } else if (strcmp (*argv, "nsp") == 0) {
- if (next_arg (&argc, &argv) != 0) {
- g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *(argv-1));
- nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
- goto error;
- }
- nsp_user = *argv;
- } else {
- g_printerr (_("Unknown parameter: %s\n"), *argv);
- }
-
- argc--;
- argv++;
- }
-
- if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0)
- fields_str = fields_common;
- else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0)
- fields_str = fields_all;
- else
- fields_str = nmc->required_fields;
-
- tmpl = nmc_fields_dev_wimax_list;
- tmpl_len = sizeof (nmc_fields_dev_wimax_list);
- nmc->print_fields.indices = parse_output_fields (fields_str, tmpl, FALSE, NULL, &error);
-
- if (error) {
- g_string_printf (nmc->return_text, _("Error: 'device wimax': %s"), error->message);
- g_error_free (error);
- nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
- goto error;
- }
-
- devices = nm_client_get_devices (nmc->client);
- if (ifname) {
- /* Device specified - list only NSPs of this interface */
- for (i = 0; i < devices->len; i++) {
- NMDevice *candidate = g_ptr_array_index (devices, i);
- const char *dev_iface = nm_device_get_iface (candidate);
-
- if (!g_strcmp0 (dev_iface, ifname)) {
- device = candidate;
- break;
- }
- }
-
- if (!device) {
- g_string_printf (nmc->return_text, _("Error: Device '%s' not found."), ifname);
- nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND;
- goto error;
- }
-
- /* Main header name */
- nmc->print_fields.header_name = (char *) construct_header_name (base_hdr, ifname);
-
- if (NM_IS_DEVICE_WIMAX (device)) {
- if (nsp_user) {
- /* Specific NSP requested - list only that */
- nsps = nm_device_wimax_get_nsps (NM_DEVICE_WIMAX (device));
- for (j = 0, nsp = NULL; j < nsps->len; j++) {
- NMWimaxNsp *candidate_nsp = g_ptr_array_index (nsps, j);
- const char *candidate_name = nm_wimax_nsp_get_name (candidate_nsp);
- char *nsp_up;
-
- nsp_up = g_ascii_strup (nsp_user, -1);
- if (!strcmp (nsp_up, candidate_name))
- nsp = candidate_nsp;
- g_free (nsp_up);
- }
- if (!nsp) {
- g_string_printf (nmc->return_text, _("Error: NSP with name '%s' not found."), nsp_user);
- nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND;
- goto error;
- }
- /* Add headers (field names) */
- arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_MAIN_HEADER_ADD | NMC_OF_FLAG_FIELD_NAMES);
- g_ptr_array_add (nmc->output_data, arr);
- fill_output_wimax_nsp (nsp, nmc, device, 1, 0);
- print_data (nmc); /* Print all data */
- } else {
- show_nsp_info (device, nmc);
- }
- } else {
- g_string_printf (nmc->return_text, _("Error: Device '%s' is not a WiMAX device."), ifname);
- nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
- goto error;
- }
- } else {
- gboolean empty_line = FALSE;
-
- /* List NSPs for all devices */
- if (nsp_user) {
- /* Specific NSP requested - list only that */
- for (i = 0; i < devices->len; i++) {
- NMDevice *dev = g_ptr_array_index (devices, i);
- int idx = 1;
-
- if (!NM_IS_DEVICE_WIMAX (dev))
- continue;
-
- /* Main header name */
- nmc->print_fields.header_name = (char *) construct_header_name (base_hdr, nm_device_get_iface (dev));
- nmc->print_fields.indices = parse_output_fields (fields_str, tmpl, FALSE, NULL, NULL);
-
- arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_MAIN_HEADER_ADD | NMC_OF_FLAG_FIELD_NAMES);
- g_ptr_array_add (nmc->output_data, arr);
-
- nsps = nm_device_wimax_get_nsps (NM_DEVICE_WIMAX (dev));
- for (j = 0, nsp = NULL; j < nsps->len; j++) {
- NMWimaxNsp *candidate_nsp = g_ptr_array_index (nsps, j);
- const char *candidate_name = nm_wimax_nsp_get_name (candidate_nsp);
- char *nsp_up;
-
- nsp_up = g_ascii_strup (nsp_user, -1);
- if (!strcmp (nsp_up, candidate_name)) {
- nsp = candidate_nsp;
- fill_output_wimax_nsp (nsp, nmc, dev, idx, 0);
- }
- g_free (nsp_up);
- }
- if (empty_line)
- g_print ("\n"); /* Empty line between devices' NSPs */
- print_data (nmc); /* Print all data */
- nmc_empty_output_fields (nmc);
- empty_line = TRUE;
- }
- if (!nsp) {
- g_string_printf (nmc->return_text, _("Error: Access point with nsp '%s' not found."), nsp_user);
- nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND;
- goto error;
- }
- } else {
- for (i = 0; i < devices->len; i++) {
- NMDevice *dev = g_ptr_array_index (devices, i);
-
- /* Main header name */
- nmc->print_fields.header_name = (char *) construct_header_name (base_hdr,
- nm_device_get_iface (dev));
- nmc->print_fields.indices = parse_output_fields (fields_str, tmpl, FALSE, NULL, NULL);
-
- if (NM_IS_DEVICE_WIMAX (dev)) {
- if (empty_line)
- g_print ("\n"); /* Empty line between devices' NSPs */
- show_nsp_info (dev, nmc);
- empty_line = TRUE;
- }
- }
- }
- }
-
-error:
- return nmc->return_value;
-}
-
-static NMCResultCode
-do_device_wimax (NmCli *nmc, int argc, char **argv)
-{
- if (argc == 0)
- nmc->return_value = do_device_wimax_list (nmc, argc-1, argv+1);
- else if (argc > 0) {
- if (matches (*argv, "list") == 0) {
- nmc->return_value = do_device_wimax_list (nmc, argc-1, argv+1);
- }
- else {
- g_string_printf (nmc->return_text, _("Error: 'device wimax' command '%s' is not valid."), *argv);
- nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
- }
- }
-
- return nmc->return_value;
-}
-#endif
-
static gboolean
is_single_word (const char* line)
{
@@ -3086,17 +2715,6 @@ do_devices (NmCli *nmc, int argc, char **argv)
goto opt_error;
nmc->return_value = do_device_wifi (nmc, argc-1, argv+1);
}
-#if WITH_WIMAX
- else if (matches (*argv, "wimax") == 0) {
- if (nmc_arg_is_help (*(argv+1))) {
- usage_device_wimax ();
- goto usage_exit;
- }
- if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error))
- goto opt_error;
- nmc->return_value = do_device_wimax (nmc, argc-1, argv+1);
- }
-#endif
else {
usage ();
g_string_printf (nmc->return_text, _("Error: 'dev' command '%s' is not valid."), *argv);
diff --git a/clients/cli/general.c b/clients/cli/general.c
index c252427c44..fdf22c71f3 100644
--- a/clients/cli/general.c
+++ b/clients/cli/general.c
@@ -46,15 +46,9 @@ static NmcOutputField nmc_fields_nm_status[] = {
{"WIMAX", N_("WIMAX"), 10}, /* 11 */
{NULL, NULL, 0}
};
-#if WITH_WIMAX
-#define NMC_FIELDS_NM_STATUS_ALL "RUNNING,VERSION,STATE,STARTUP,CONNECTIVITY,NETWORKING,WIFI-HW,WIFI,WWAN-HW,WWAN,WIMAX-HW,WIMAX"
-#define NMC_FIELDS_NM_STATUS_SWITCH "NETWORKING,WIFI-HW,WIFI,WWAN-HW,WWAN,WIMAX-HW,WIMAX"
-#define NMC_FIELDS_NM_STATUS_RADIO "WIFI-HW,WIFI,WWAN-HW,WWAN,WIMAX-HW,WIMAX"
-#else
#define NMC_FIELDS_NM_STATUS_ALL "RUNNING,VERSION,STATE,STARTUP,CONNECTIVITY,NETWORKING,WIFI-HW,WIFI,WWAN-HW,WWAN"
#define NMC_FIELDS_NM_STATUS_SWITCH "NETWORKING,WIFI-HW,WIFI,WWAN-HW,WWAN"
#define NMC_FIELDS_NM_STATUS_RADIO "WIFI-HW,WIFI,WWAN-HW,WWAN"
-#endif
#define NMC_FIELDS_NM_STATUS_COMMON "STATE,CONNECTIVITY,WIFI-HW,WIFI,WWAN-HW,WWAN"
#define NMC_FIELDS_NM_NETWORKING "NETWORKING"
#define NMC_FIELDS_NM_WIFI "WIFI"
@@ -181,13 +175,8 @@ static void
usage_radio (void)
{
g_printerr (_("Usage: nmcli radio { COMMAND | help }\n\n"
-#if WITH_WIMAX
- "COMMAND := { all | wifi | wwan | wimax }\n\n"
- " all | wifi | wwan | wimax [ on | off ]\n\n"
-#else
"COMMAND := { all | wifi | wwan }\n\n"
" all | wifi | wwan [ on | off ]\n\n"
-#endif
));
}
@@ -221,18 +210,6 @@ usage_radio_wwan (void)
"Get status of mobile broadband radio switch, or turn it on/off.\n\n"));
}
-#if WITH_WIMAX
-static void
-usage_radio_wimax (void)
-{
- g_printerr (_("Usage: nmcli radio wimax { ARGUMENTS | help }\n"
- "\n"
- "ARGUMENTS := [on | off]\n"
- "\n"
- "Get status of WiMAX radio switch, or turn it on/off.\n\n"));
-}
-#endif
-
/* quit main loop */
static void
quit (void)
@@ -327,9 +304,6 @@ show_nm_status (NmCli *nmc, const char *pretty_header_name, const char *print_fl
gboolean net_enabled;
gboolean wireless_hw_enabled, wireless_enabled;
gboolean wwan_hw_enabled, wwan_enabled;
-#if WITH_WIMAX
- gboolean wimax_hw_enabled, wimax_enabled;
-#endif
GError *error = NULL;
const char *fields_str;
const char *fields_all = print_flds ? print_flds : NMC_FIELDS_NM_STATUS_ALL;
@@ -374,10 +348,6 @@ show_nm_status (NmCli *nmc, const char *pretty_header_name, const char *print_fl
wireless_enabled = nm_client_wireless_get_enabled (nmc->client);
wwan_hw_enabled = nm_client_wwan_hardware_get_enabled (nmc->client);
wwan_enabled = nm_client_wwan_get_enabled (nmc->client);
-#if WITH_WIMAX
- wimax_hw_enabled = nm_client_wimax_hardware_get_enabled (nmc->client);
- wimax_enabled = nm_client_wimax_get_enabled (nmc->client);
-#endif
nmc->print_fields.header_name = pretty_header_name ? (char *) pretty_header_name : _("NetworkManager status");
arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_MAIN_HEADER_ADD | NMC_OF_FLAG_FIELD_NAMES);
@@ -394,10 +364,6 @@ show_nm_status (NmCli *nmc, const char *pretty_header_name, const char *print_fl
set_val_strc (arr, 7, wireless_enabled ? _("enabled") : _("disabled"));
set_val_strc (arr, 8, wwan_hw_enabled ? _("enabled") : _("disabled"));
set_val_strc (arr, 9, wwan_enabled ? _("enabled") : _("disabled"));
-#if WITH_WIMAX
- set_val_strc (arr, 10, wimax_hw_enabled ? _("enabled") : _("disabled"));
- set_val_strc (arr, 11, wimax_enabled ? _("enabled") : _("disabled"));
-#endif
/* Set colors */
arr[2].color = state_to_color (state);
@@ -408,10 +374,6 @@ show_nm_status (NmCli *nmc, const char *pretty_header_name, const char *print_fl
arr[7].color = wireless_enabled ? NMC_TERM_COLOR_GREEN : NMC_TERM_COLOR_RED;
arr[8].color = wwan_hw_enabled ? NMC_TERM_COLOR_GREEN : NMC_TERM_COLOR_RED;
arr[9].color = wwan_enabled ? NMC_TERM_COLOR_GREEN : NMC_TERM_COLOR_RED;
-#if WITH_WIMAX
- arr[10].color = wimax_hw_enabled ? NMC_TERM_COLOR_GREEN : NMC_TERM_COLOR_RED;
- arr[11].color = wimax_enabled ? NMC_TERM_COLOR_GREEN : NMC_TERM_COLOR_RED;
-#endif
g_ptr_array_add (nmc->output_data, arr);
@@ -918,24 +880,6 @@ do_radio (NmCli *nmc, int argc, char **argv)
nm_client_wwan_set_enabled (nmc->client, enable_flag);
}
}
-#if WITH_WIMAX
- else if (matches (*argv, "wimax") == 0) {
- if (nmc_arg_is_help (*(argv+1))) {
- usage_radio_wimax ();
- goto finish;
- }
- if (next_arg (&argc, &argv) != 0) {
- /* no argument, show current WiMAX state */
- nmc_switch_show (nmc, NMC_FIELDS_NM_WIMAX, _("WiMAX radio switch"));
- } else {
- if (!nmc_switch_parse_on_off (nmc, *(argv-1), *argv, &enable_flag))
- goto finish;
-
- nmc->get_client (nmc); /* create NMClient */
- nm_client_wimax_set_enabled (nmc->client, enable_flag);
- }
- }
-#endif
else {
usage_radio ();
g_string_printf (nmc->return_text, _("Error: 'radio' command '%s' is not valid."), *argv);
diff --git a/clients/cli/nmcli-completion b/clients/cli/nmcli-completion
index 51c817affe..54433ef742 100644
--- a/clients/cli/nmcli-completion
+++ b/clients/cli/nmcli-completion
@@ -796,10 +796,10 @@ _nmcli()
;;
r|ra|rad|radi|radio)
if [[ ${#words[@]} -eq 2 ]]; then
- _nmcli_compl_COMMAND "$command" all wifi wwan wimax
+ _nmcli_compl_COMMAND "$command" all wifi wwan
elif [[ ${#words[@]} -eq 3 ]]; then
case "$command" in
- a|al|all | w|wi|wif|wifi | ww|wwa|wwan | wim|wima|wimax)
+ a|al|all | w|wi|wif|wifi | ww|wwa|wwan)
_nmcli_compl_COMMAND "${words[2]}" "on off"
;;
esac
@@ -1243,7 +1243,7 @@ _nmcli()
;;
d|de|dev|devi|devic|device)
if [[ ${#words[@]} -eq 2 ]]; then
- _nmcli_compl_COMMAND "$command" status show connect disconnect delete wifi wimax
+ _nmcli_compl_COMMAND "$command" status show connect disconnect delete wifi
elif [[ ${#words[@]} -gt 2 ]]; then
case "$command" in
s|st|sta|stat|statu|status)
@@ -1294,19 +1294,6 @@ _nmcli()
esac
fi
;;
- wim|wima|wimax)
- if [[ ${#words[@]} -eq 3 ]]; then
- _nmcli_compl_COMMAND "${words[2]}" list
- else
- case "${words[2]}" in
- l|li|lis|list)
- _nmcli_array_delete_at words 0 2
- OPTIONS=(ifname nsp)
- _nmcli_compl_ARGS
- ;;
- esac
- fi
- ;;
esac
fi
diff --git a/configure.ac b/configure.ac
index e2a452bf83..436db10cc7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -472,31 +472,6 @@ AC_SUBST(UUID_LIBS)
dnl Checks for readline library - used by nmcli
AX_LIB_READLINE
-# Intel WiMAX SDK checks
-PKG_CHECK_MODULES(IWMX_SDK, [libiWmxSdk-0 >= 1.5.1], [have_wimax=yes],[have_wimax=no])
-AC_ARG_ENABLE(wimax, AS_HELP_STRING([--enable-wimax], [enable WiMAX support]),
- [enable_wimax=${enableval}], [enable_wimax=${have_wimax}])
-if (test "${enable_wimax}" = "yes"); then
- if test x"$have_wimax" = x"no"; then
- AC_MSG_ERROR(Intel WiMAX SDK is required)
- fi
-
- # Ensure the WiMAX stack is built with libnl3; otherwise crashes happen
- # due to symbol conflicts
- WMX_LIB_PATH=`$PKG_CONFIG --variable=libdir libiWmxSdk-0`
- FOO=`ldd $WMX_LIB_PATH/libiWmxSdk.so.0.0.0 | grep libnl-3 2>&1`
- if test "$?" != "0"; then
- AC_MSG_ERROR([Intel WiMAX stack built with incompatible libnl version!])
- fi
-
- AC_SUBST(IWMX_SDK_CFLAGS)
- AC_SUBST(IWMX_SDK_LIBS)
- AC_DEFINE(WITH_WIMAX, 1, [Define if you have WiMAX support])
-else
- AC_DEFINE(WITH_WIMAX, 0, [Define if you have WiMAX support])
-fi
-AM_CONDITIONAL(WITH_WIMAX, test "${enable_wimax}" = "yes")
-
# Teamd control checks
PKG_CHECK_MODULES(LIBTEAMDCTL, [libteamdctl >= 1.9], [have_teamdctl=yes],[have_teamdctl=no])
AC_ARG_ENABLE(teamdctl, AS_HELP_STRING([--enable-teamdctl], [enable Teamd control support]),
@@ -995,7 +970,6 @@ src/platform/tests/Makefile
src/rdisc/Makefile
src/rdisc/tests/Makefile
src/devices/adsl/Makefile
-src/devices/wimax/Makefile
src/devices/bluetooth/Makefile
src/devices/team/Makefile
src/devices/wifi/Makefile
@@ -1100,7 +1074,6 @@ echo
echo "Features:"
echo " wext: $ac_with_wext"
echo " wifi: $enable_wifi"
-echo " wimax: $enable_wimax"
echo " ppp: $enable_ppp"
echo " modemmanager-1: $with_modem_manager_1"
echo " concheck: $enable_concheck"
diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES
index 764b695325..559ac848f6 100644
--- a/contrib/fedora/REQUIRED_PACKAGES
+++ b/contrib/fedora/REQUIRED_PACKAGES
@@ -36,7 +36,6 @@ yum install \
dbus-x11 \
wireless-tools-devel \
polkit-devel \
- wimax-devel \
libsoup-devel \
readline-devel \
teamd-devel \
diff --git a/docs/api/network-manager-docs.xml b/docs/api/network-manager-docs.xml
index 0f9c7dbb43..e8c99460d8 100644
--- a/docs/api/network-manager-docs.xml
+++ b/docs/api/network-manager-docs.xml
@@ -51,7 +51,7 @@
This part documents the properties and value types of each "Setting"
object that composes the basic unit of NetworkManager configuration,
the "Connection". Each Connection object is simply a dictionary mapping
- setting names (like "wimax" or "bluetooth") to a dictionary of
+ setting names (like "802-3-ethernet" or "bluetooth") to a dictionary of
key/value pairs that represents each itself.
</para>
<xi:include href="settings-spec.xml">
diff --git a/docs/libnm-glib/libnm-glib.svg b/docs/libnm-glib/libnm-glib.svg
index a0d240fae6..6bbfa29517 100644
--- a/docs/libnm-glib/libnm-glib.svg
+++ b/docs/libnm-glib/libnm-glib.svg
@@ -532,15 +532,15 @@
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- x="338.79584"
+ x="330"
y="680.04895"
id="text3755-3-5-1-7"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3757-8-00-3-1"
- x="338.79584"
+ x="330"
y="680.04895"
- style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">NMDeviceWimax</tspan></text>
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">NMDeviceInfiniband</tspan></text>
</g>
<g
transform="translate(278.7818,-37.820326)"
diff --git a/docs/libnm/libnm.svg b/docs/libnm/libnm.svg
index a0d240fae6..6bbfa29517 100644
--- a/docs/libnm/libnm.svg
+++ b/docs/libnm/libnm.svg
@@ -532,15 +532,15 @@
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- x="338.79584"
+ x="330"
y="680.04895"
id="text3755-3-5-1-7"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3757-8-00-3-1"
- x="338.79584"
+ x="330"
y="680.04895"
- style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">NMDeviceWimax</tspan></text>
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans">NMDeviceInfiniband</tspan></text>
</g>
<g
transform="translate(278.7818,-37.820326)"
diff --git a/libnm-core/nm-setting-wimax.c b/libnm-core/nm-setting-wimax.c
index 541c0bbfe7..0287cdc19a 100644
--- a/libnm-core/nm-setting-wimax.c
+++ b/libnm-core/nm-setting-wimax.c
@@ -37,6 +37,10 @@
*
* The #NMSettingWimax object is a #NMSetting subclass that describes properties
* necessary for connection to 802.16e Mobile WiMAX networks.
+ *
+ * NetworkManager no longer supports WiMAX; while this API remains available for
+ * backward-compatibility reasons, it serves no real purpose, since WiMAX
+ * connections cannot be activated.
**/
G_DEFINE_TYPE_WITH_CODE (NMSettingWimax, nm_setting_wimax, NM_TYPE_SETTING,
@@ -64,6 +68,8 @@ enum {
* Creates a new #NMSettingWimax object with default values.
*
* Returns: the new empty #NMSettingWimax object
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
NMSetting *
nm_setting_wimax_new (void)
@@ -79,6 +85,8 @@ nm_setting_wimax_new (void)
* specific WiMAX network this setting describes a connection to.
*
* Returns: the WiMAX NSP name
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const char *
nm_setting_wimax_get_network_name (NMSettingWimax *setting)
@@ -96,6 +104,8 @@ nm_setting_wimax_get_network_name (NMSettingWimax *setting)
* to.
*
* Returns: the MAC address
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const char *
nm_setting_wimax_get_mac_address (NMSettingWimax *setting)
@@ -217,6 +227,8 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *setting_class)
*
* Network Service Provider (NSP) name of the WiMAX network this connection
* should use.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_NETWORK_NAME,
@@ -231,6 +243,8 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *setting_class)
* If specified, this connection will only apply to the WiMAX device whose
* MAC address matches. This property does not change the MAC address of the
* device (known as MAC spoofing).
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_MAC_ADDRESS,
diff --git a/libnm-core/nm-setting-wimax.h b/libnm-core/nm-setting-wimax.h
index 0a58504669..0a98fbb5c5 100644
--- a/libnm-core/nm-setting-wimax.h
+++ b/libnm-core/nm-setting-wimax.h
@@ -53,10 +53,14 @@ typedef struct {
gpointer padding[4];
} NMSettingWimaxClass;
+NM_DEPRECATED_IN_1_2
GType nm_setting_wimax_get_type (void);
+NM_DEPRECATED_IN_1_2
NMSetting *nm_setting_wimax_new (void);
+NM_DEPRECATED_IN_1_2
const char *nm_setting_wimax_get_network_name (NMSettingWimax *setting);
+NM_DEPRECATED_IN_1_2
const char *nm_setting_wimax_get_mac_address (NMSettingWimax *setting);
G_END_DECLS
diff --git a/libnm-glib/nm-device-wimax.c b/libnm-glib/nm-device-wimax.c
index f0187fdc17..5211e04087 100644
--- a/libnm-glib/nm-device-wimax.c
+++ b/libnm-glib/nm-device-wimax.c
@@ -84,6 +84,8 @@ static guint signals[LAST_SIGNAL] = { 0 };
* Registers an error quark for #NMDeviceWimax if necessary.
*
* Returns: the error quark used for #NMDeviceWimax errors.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
GQuark
nm_device_wimax_error_quark (void)
@@ -103,6 +105,8 @@ nm_device_wimax_error_quark (void)
* Creates a new #NMDeviceWimax.
*
* Returns: (transfer full): a new WiMAX device
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
GObject *
nm_device_wimax_new (DBusGConnection *connection, const char *path)
@@ -128,6 +132,8 @@ nm_device_wimax_new (DBusGConnection *connection, const char *path)
*
* Returns: the hardware address. This is the internal string used by the
* device, and must not be modified.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const char *
nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
@@ -145,6 +151,8 @@ nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
* Gets the active #NMWimaxNsp.
*
* Returns: (transfer full): the access point or %NULL if none is active
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
NMWimaxNsp *
nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
@@ -182,6 +190,8 @@ nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
* Returns: (element-type NMWimaxNsp): a #GPtrArray containing
* all the scanned #NMWimaxNsps.
* The returned array is owned by the client and should not be modified.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const GPtrArray *
nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
@@ -200,6 +210,8 @@ nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
* Gets a #NMWimaxNsp by path.
*
* Returns: (transfer none): the access point or %NULL if none is found.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
NMWimaxNsp *
nm_device_wimax_get_nsp_by_path (NMDeviceWimax *wimax,
@@ -264,6 +276,8 @@ clean_up_nsps (NMDeviceWimax *self, gboolean notify)
* device is not connected.
*
* Returns: the center frequency in KHz, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
guint
nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
@@ -284,6 +298,8 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
* device is not connected.
*
* Returns: the RSSI in dBm, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
gint
nm_device_wimax_get_rssi (NMDeviceWimax *self)
@@ -303,6 +319,8 @@ nm_device_wimax_get_rssi (NMDeviceWimax *self)
* meaning when the device is not connected.
*
* Returns: the CINR in dB, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
gint
nm_device_wimax_get_cinr (NMDeviceWimax *self)
@@ -322,6 +340,8 @@ nm_device_wimax_get_cinr (NMDeviceWimax *self)
* -5.5 dBm. Has no meaning when the device is not connected.
*
* Returns: the TX power in dBm, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
gint
nm_device_wimax_get_tx_power (NMDeviceWimax *self)
@@ -339,6 +359,8 @@ nm_device_wimax_get_tx_power (NMDeviceWimax *self)
* Gets the ID of the serving Base Station when the device is connected.
*
* Returns: the ID of the serving Base Station, or %NULL
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const char *
nm_device_wimax_get_bsid (NMDeviceWimax *self)
@@ -614,6 +636,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* NMDeviceWimax:hw-address:
*
* The hardware (MAC) address of the device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
@@ -626,6 +650,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* NMDeviceWimax:active-nsp:
*
* The active #NMWimaxNsp of the device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_ACTIVE_NSP,
@@ -640,6 +666,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* The center frequency (in KHz) of the radio channel the device is using to
* communicate with the network when connected. Has no meaning when the
* device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_CENTER_FREQ,
@@ -655,6 +683,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* the raw received RF signal from the base station is, but does not
* indicate the overall quality of the radio link. Has no meaning when the
* device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_RSSI,
@@ -669,6 +699,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* CINR (Carrier to Interference + Noise Ratio) of the current radio link
* in dB. CINR is a more accurate measure of radio link quality. Has no
* meaning when the device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_CINR,
@@ -683,6 +715,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* Average power of the last burst transmitted by the device, in units of
* 0.5 dBm. i.e. a TxPower of -11 represents an actual device TX power of
* -5.5 dBm. Has no meaning when the device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_TX_POWER,
@@ -696,6 +730,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
*
* The ID of the serving base station as received from the network. Has
* no meaning when the device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_BSID,
@@ -710,6 +746,7 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* List of all WiMAX Network Service Providers the device can see.
*
* Since: 0.9.10
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_NSPS,
@@ -726,6 +763,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* @nsp: the new NSP
*
* Notifies that a #NMWimaxNsp is added to the wimax device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
signals[NSP_ADDED] =
g_signal_new ("nsp-added",
@@ -743,6 +782,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* @nsp: the removed NSP
*
* Notifies that a #NMWimaxNsp is removed from the wimax device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
signals[NSP_REMOVED] =
g_signal_new ("nsp-removed",
diff --git a/libnm-glib/nm-device-wimax.h b/libnm-glib/nm-device-wimax.h
index 1b889d95fe..24e46348e1 100644
--- a/libnm-glib/nm-device-wimax.h
+++ b/libnm-glib/nm-device-wimax.h
@@ -51,6 +51,7 @@ typedef enum {
} NMDeviceWimaxError;
#define NM_DEVICE_WIMAX_ERROR nm_device_wimax_error_quark ()
+NM_DEPRECATED_IN_1_2
GQuark nm_device_wimax_error_quark (void);
#define NM_DEVICE_WIMAX_HW_ADDRESS "hw-address"
@@ -74,22 +75,33 @@ typedef struct {
void (*nsp_removed) (NMDeviceWimax *self, NMWimaxNsp *nsp);
} NMDeviceWimaxClass;
+NM_DEPRECATED_IN_1_2
GType nm_device_wimax_get_type (void);
+NM_DEPRECATED_IN_1_2
GObject *nm_device_wimax_new (DBusGConnection *connection,
const char *path);
+NM_DEPRECATED_IN_1_2
const char *nm_device_wimax_get_hw_address (NMDeviceWimax *wimax);
+NM_DEPRECATED_IN_1_2
NMWimaxNsp *nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax);
+NM_DEPRECATED_IN_1_2
NMWimaxNsp *nm_device_wimax_get_nsp_by_path (NMDeviceWimax *wimax,
const char *path);
+NM_DEPRECATED_IN_1_2
const GPtrArray *nm_device_wimax_get_nsps (NMDeviceWimax *wimax);
+NM_DEPRECATED_IN_1_2
guint nm_device_wimax_get_center_frequency (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
gint nm_device_wimax_get_rssi (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
gint nm_device_wimax_get_cinr (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
gint nm_device_wimax_get_tx_power (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
const char * nm_device_wimax_get_bsid (NMDeviceWimax *self);
G_END_DECLS
diff --git a/libnm-util/nm-setting-wimax.c b/libnm-util/nm-setting-wimax.c
index acb00f5e9d..37f402f69f 100644
--- a/libnm-util/nm-setting-wimax.c
+++ b/libnm-util/nm-setting-wimax.c
@@ -38,6 +38,10 @@
*
* The #NMSettingWimax object is a #NMSetting subclass that describes properties
* necessary for connection to 802.16e Mobile WiMAX networks.
+ *
+ * NetworkManager no longer supports WiMAX; while this API remains available for
+ * backward-compatibility reasons, it serves no real purpose, since WiMAX
+ * connections cannot be activated.
**/
/**
@@ -46,6 +50,8 @@
* Registers an error quark for #NMSettingWimax if necessary.
*
* Returns: the error quark used for #NMSettingWimax errors.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
GQuark
nm_setting_wimax_error_quark (void)
@@ -86,6 +92,8 @@ enum {
* Creates a new #NMSettingWimax object with default values.
*
* Returns: the new empty #NMSettingWimax object
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
NMSetting *
nm_setting_wimax_new (void)
@@ -101,6 +109,8 @@ nm_setting_wimax_new (void)
* specific WiMAX network this setting describes a connection to.
*
* Returns: the WiMAX NSP name
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const char *
nm_setting_wimax_get_network_name (NMSettingWimax *setting)
@@ -118,6 +128,8 @@ nm_setting_wimax_get_network_name (NMSettingWimax *setting)
* to.
*
* Returns: the MAC address
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const GByteArray *
nm_setting_wimax_get_mac_address (NMSettingWimax *setting)
@@ -240,6 +252,8 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *setting_class)
*
* Network Service Provider (NSP) name of the WiMAX network this connection
* should use.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_NETWORK_NAME,
@@ -254,6 +268,8 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *setting_class)
* If specified, this connection will only apply to the WiMAX device whose
* MAC address matches. This property does not change the MAC address of the
* device (known as MAC spoofing).
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_MAC_ADDRESS,
diff --git a/libnm-util/nm-setting-wimax.h b/libnm-util/nm-setting-wimax.h
index 781d717c2d..9d7a07af75 100644
--- a/libnm-util/nm-setting-wimax.h
+++ b/libnm-util/nm-setting-wimax.h
@@ -49,6 +49,7 @@ typedef enum {
} NMSettingWimaxError;
#define NM_SETTING_WIMAX_ERROR nm_setting_wimax_error_quark ()
+NM_DEPRECATED_IN_1_2
GQuark nm_setting_wimax_error_quark (void);
#define NM_SETTING_WIMAX_NETWORK_NAME "network-name"
@@ -62,10 +63,14 @@ typedef struct {
NMSettingClass parent;
} NMSettingWimaxClass;
+NM_DEPRECATED_IN_1_2
GType nm_setting_wimax_get_type (void);
+NM_DEPRECATED_IN_1_2
NMSetting *nm_setting_wimax_new (void);
+NM_DEPRECATED_IN_1_2
const char *nm_setting_wimax_get_network_name (NMSettingWimax *setting);
+NM_DEPRECATED_IN_1_2
const GByteArray *nm_setting_wimax_get_mac_address (NMSettingWimax *setting);
G_END_DECLS
diff --git a/libnm/nm-device-wimax.c b/libnm/nm-device-wimax.c
index f199b669fa..67c66827bb 100644
--- a/libnm/nm-device-wimax.c
+++ b/libnm/nm-device-wimax.c
@@ -86,6 +86,8 @@ static guint signals[LAST_SIGNAL] = { 0 };
*
* Returns: the hardware address. This is the internal string used by the
* device, and must not be modified.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const char *
nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
@@ -102,6 +104,8 @@ nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
* Gets the active #NMWimaxNsp.
*
* Returns: (transfer full): the access point or %NULL if none is active
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
NMWimaxNsp *
nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
@@ -138,6 +142,8 @@ nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
* Returns: (element-type NMWimaxNsp): a #GPtrArray containing
* all the scanned #NMWimaxNsps.
* The returned array is owned by the client and should not be modified.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const GPtrArray *
nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
@@ -155,6 +161,8 @@ nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
* Gets a #NMWimaxNsp by path.
*
* Returns: (transfer none): the access point or %NULL if none is found.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
NMWimaxNsp *
nm_device_wimax_get_nsp_by_path (NMDeviceWimax *wimax,
@@ -208,6 +216,8 @@ clean_up_nsps (NMDeviceWimax *self)
* device is not connected.
*
* Returns: the center frequency in KHz, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
guint
nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
@@ -227,6 +237,8 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
* device is not connected.
*
* Returns: the RSSI in dBm, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
gint
nm_device_wimax_get_rssi (NMDeviceWimax *self)
@@ -245,6 +257,8 @@ nm_device_wimax_get_rssi (NMDeviceWimax *self)
* meaning when the device is not connected.
*
* Returns: the CINR in dB, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
gint
nm_device_wimax_get_cinr (NMDeviceWimax *self)
@@ -263,6 +277,8 @@ nm_device_wimax_get_cinr (NMDeviceWimax *self)
* -5.5 dBm. Has no meaning when the device is not connected.
*
* Returns: the TX power in dBm, or 0
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
gint
nm_device_wimax_get_tx_power (NMDeviceWimax *self)
@@ -279,6 +295,8 @@ nm_device_wimax_get_tx_power (NMDeviceWimax *self)
* Gets the ID of the serving Base Station when the device is connected.
*
* Returns: the ID of the serving Base Station, or %NULL
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
const char *
nm_device_wimax_get_bsid (NMDeviceWimax *self)
@@ -536,6 +554,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* NMDeviceWimax:hw-address:
*
* The hardware (MAC) address of the device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
@@ -548,6 +568,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* NMDeviceWimax:active-nsp:
*
* The active #NMWimaxNsp of the device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_ACTIVE_NSP,
@@ -562,6 +584,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* The center frequency (in KHz) of the radio channel the device is using to
* communicate with the network when connected. Has no meaning when the
* device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_CENTER_FREQ,
@@ -577,6 +601,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* the raw received RF signal from the base station is, but does not
* indicate the overall quality of the radio link. Has no meaning when the
* device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_RSSI,
@@ -591,6 +617,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* CINR (Carrier to Interference + Noise Ratio) of the current radio link
* in dB. CINR is a more accurate measure of radio link quality. Has no
* meaning when the device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_CINR,
@@ -605,6 +633,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* Average power of the last burst transmitted by the device, in units of
* 0.5 dBm. i.e. a TxPower of -11 represents an actual device TX power of
* -5.5 dBm. Has no meaning when the device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_TX_POWER,
@@ -618,6 +648,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
*
* The ID of the serving base station as received from the network. Has
* no meaning when the device is not connected.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
g_object_class_install_property
(object_class, PROP_BSID,
@@ -648,6 +680,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* @nsp: the new NSP
*
* Notifies that a #NMWimaxNsp is added to the wimax device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
signals[NSP_ADDED] =
g_signal_new ("nsp-added",
@@ -665,6 +699,8 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *wimax_class)
* @nsp: the removed NSP
*
* Notifies that a #NMWimaxNsp is removed from the wimax device.
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
**/
signals[NSP_REMOVED] =
g_signal_new ("nsp-removed",
diff --git a/libnm/nm-device-wimax.h b/libnm/nm-device-wimax.h
index 60910984c1..cdd6ba561c 100644
--- a/libnm/nm-device-wimax.h
+++ b/libnm/nm-device-wimax.h
@@ -61,19 +61,29 @@ typedef struct {
gpointer padding[4];
} NMDeviceWimaxClass;
+NM_DEPRECATED_IN_1_2
GType nm_device_wimax_get_type (void);
+NM_DEPRECATED_IN_1_2
const char *nm_device_wimax_get_hw_address (NMDeviceWimax *wimax);
+NM_DEPRECATED_IN_1_2
NMWimaxNsp *nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax);
+NM_DEPRECATED_IN_1_2
NMWimaxNsp *nm_device_wimax_get_nsp_by_path (NMDeviceWimax *wimax,
const char *path);
+NM_DEPRECATED_IN_1_2
const GPtrArray *nm_device_wimax_get_nsps (NMDeviceWimax *wimax);
+NM_DEPRECATED_IN_1_2
guint nm_device_wimax_get_center_frequency (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
gint nm_device_wimax_get_rssi (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
gint nm_device_wimax_get_cinr (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
gint nm_device_wimax_get_tx_power (NMDeviceWimax *self);
+NM_DEPRECATED_IN_1_2
const char * nm_device_wimax_get_bsid (NMDeviceWimax *self);
G_END_DECLS
diff --git a/man/nmcli.1.in b/man/nmcli.1.in
index e16a380604..87311f30d8 100644
--- a/man/nmcli.1.in
+++ b/man/nmcli.1.in
@@ -183,8 +183,8 @@ file in most distributions. For example, systemd-hostnamed service uses the term
.B permissions
.br
Show the permissions a caller has for various authenticated operations that
-NetworkManager provides, like enable and disable networking, changing Wi\(hyFi,
-WWAN, and WiMAX state, modifying connections, etc.
+NetworkManager provides, like enable and disable networking, changing Wi\(hyFi
+and WWAN state, modifying connections, etc.
.TP
.B logging [level <log level>] [domains <log domains>]
.br
@@ -239,7 +239,7 @@ Possible states are:
Use this object to show radio switches status, or enable and disable
the switches.
.TP
-.SS \fICOMMAND\fP := { all | wifi | wwan | wimax }
+.SS \fICOMMAND\fP := { all | wifi | wwan }
.sp
.RS
.TP
@@ -254,13 +254,6 @@ Show or set status of WWAN (mobile broadband) in NetworkManager. If no arguments
are supplied, mobile broadband status is printed; \fIon\fP enables mobile broadband,
\fIoff\fP disables it.
.TP
-.B wimax [ on | off ]
-.br
-Show or set status of WiMAX in NetworkManager. If no arguments are supplied,
-WiMAX status is printed; \fIon\fP enables WiMAX; \fIoff\fP disables WiMAX. Note:
-WiMAX support is a compile\(hytime decision, so it may be unavailable on some
-installations.
-.TP
.B all [ on | off ]
.br
Show or set all previously mentioned radio switches at the same time.
@@ -355,10 +348,10 @@ When no command is given to the \fIconnection\fP object, the default action
is 'nmcli connection show'.
.RE
.TP
-.B up [ id | uuid | path ] <ID> [ifname <ifname>] [ap <BSSID>] [nsp <name>] [passwd <file with passwords>]
+.B up [ id | uuid | path ] <ID> [ifname <ifname>] [ap <BSSID>] [passwd <file with passwords>]
.RE
.RS
-.B up ifname <ifname> [ap <BSSID>] [nsp <name>] [passwd <file with passwords>]
+.B up ifname <ifname> [ap <BSSID>] [passwd <file with passwords>]
.RS
.br
Activate a connection. The connection is identified by its name, UUID or D-Bus
@@ -381,8 +374,6 @@ Available options are:
\(en interface that will be used for activation
.IP \fIap\fP 13
\(en BSSID of the AP which the command should connect to (for Wi\(hyFi connections)
-.IP \fInsp\fP 13
-\(en NSP (Network Service Provider) which the command should connect to (for WiMAX connections)
.IP \fIpasswd-file\fP 13
\(en some networks may require credentials during activation. You can give these
credentials using this option.
@@ -739,7 +730,7 @@ of its latest state.
.B device - show and manage network interfaces
.br
.TP
-.SS \fICOMMAND\fP := { status | show | connect | disconnect | delete | wifi | wimax }
+.SS \fICOMMAND\fP := { status | show | connect | disconnect | delete | wifi }
.sp
.RS
.TP
@@ -820,13 +811,6 @@ Request that \fINetworkManager\fP immediately re-scan for available access point
NetworkManager scans Wi\(hyFi networks periodically, but in some cases it can be
useful to start scanning manually (e.g. after resuming the computer).
This command does not show the APs, use 'nmcli device wifi list' for that.
-.TP
-.B wimax [list [ifname <ifname>] [nsp <name>]]
-.br
-List available WiMAX NSP. The \fIifname\fP and \fInsp\fP options
-can be used to list networks for a particular interface or with a specific
-NSP, respectively.
-.RE
.TP
.B agent \- run nmcli as a NetworkManager secret agent, or polkit agent
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3a7c13cc2a..6ca4a33ff6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -148,7 +148,6 @@ src/devices/team/nm-device-team.c
src/devices/wifi/nm-device-olpc-mesh.c
src/devices/wifi/nm-device-wifi.c
src/devices/wifi/nm-wifi-ap-utils.c
-src/devices/wimax/nm-device-wimax.c
src/devices/wwan/nm-modem-broadband.c
src/nm-config.c
src/nm-iface-helper.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 64aa9dd485..8cafb4886e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,10 +17,6 @@ if WITH_WIFI
SUBDIRS += devices/wifi
endif
-if WITH_WIMAX
-SUBDIRS += devices/wimax
-endif
-
if WITH_TEAMDCTL
SUBDIRS += devices/team
endif
@@ -360,11 +356,6 @@ GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM --fhead '\#include <nm-core-enum-t
GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
nm_enum_types_sources = $(nm_sources)
-if WITH_WIMAX
-nm_enum_types_sources += devices/wimax/nm-device-wimax.h
-AM_CPPFLAGS += -I$(top_srcdir)/src/devices/wimax
-endif
-
BUILT_SOURCES = $(GLIB_GENERATED)
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
index 6de11ba9d7..5178d05fcc 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -157,7 +157,7 @@ typedef struct {
/* Checks whether the connection is compatible with the device using
* only the devices type and characteristics. Does not use any live
- * network information like WiFi/WiMAX scan lists etc.
+ * network information like WiFi scan lists etc.
*/
gboolean (* check_connection_compatible) (NMDevice *self, NMConnection *connection);
diff --git a/src/devices/wimax/Makefile.am b/src/devices/wimax/Makefile.am
deleted file mode 100644
index 555b5ff2e3..0000000000
--- a/src/devices/wimax/Makefile.am
+++ /dev/null
@@ -1,59 +0,0 @@
-AM_CPPFLAGS = \
- -I${top_srcdir}/src \
- -I${top_builddir}/src \
- -I${top_srcdir}/src/devices \
- -I${top_srcdir}/src/platform \
- -I${top_srcdir}/include \
- -I${top_builddir}/libnm-core \
- -I${top_srcdir}/libnm-core \
- -DG_LOG_DOMAIN=\""NetworkManager-wimax"\" \
- -DNETWORKMANAGER_COMPILATION \
- -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
- $(DBUS_CFLAGS) \
- $(IWMX_SDK_CFLAGS)
-
-pkglib_LTLIBRARIES = libnm-device-plugin-wimax.la
-
-SYMBOL_VIS_FILE=$(srcdir)/exports.ver
-
-libnm_device_plugin_wimax_la_SOURCES = \
- nm-wimax-factory.c \
- nm-device-wimax.c \
- nm-device-wimax.h \
- nm-wimax-nsp.c \
- nm-wimax-nsp.h \
- nm-wimax-types.h \
- nm-wimax-util.c \
- nm-wimax-util.h \
- iwmxsdk.c \
- iwmxsdk.h
-
-libnm_device_plugin_wimax_la_LDFLAGS = \
- -module -avoid-version \
- -Wl,--version-script=$(SYMBOL_VIS_FILE)
-
-libnm_device_plugin_wimax_la_LIBADD = \
- $(DBUS_LIBS) \
- $(IWMX_SDK_LIBS) \
- $(GUDEV_LIBS)
-
-nm-wimax-nsp-glue.h: $(top_srcdir)/introspection/nm-wimax-nsp.xml
- dbus-binding-tool --prefix=nm_wimax_nsp --mode=glib-server --output=$@ $<
-
-nm-device-wimax-glue.h: $(top_srcdir)/introspection/nm-device-wimax.xml
- dbus-binding-tool --prefix=nm_device_wimax --mode=glib-server --output=$@ $<
-
-BUILT_SOURCES = \
- nm-wimax-nsp-glue.h \
- nm-device-wimax-glue.h
-
-CLEANFILES = $(BUILT_SOURCES)
-EXTRA_DIST = $(SYMBOL_VIS_FILE)
-
-if ENABLE_TESTS
-
-check-local:
- $(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-wimax.so $(SYMBOL_VIS_FILE)
-
-endif
-
diff --git a/src/devices/wimax/exports.ver b/src/devices/wimax/exports.ver
deleted file mode 100644
index 24cd848ce1..0000000000
--- a/src/devices/wimax/exports.ver
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-global:
- nm_device_factory_create;
-local:
- *;
-};
diff --git a/src/devices/wimax/iwmxsdk.c b/src/devices/wimax/iwmxsdk.c
deleted file mode 100644
index 1c2c682145..0000000000
--- a/src/devices/wimax/iwmxsdk.c
+++ /dev/null
@@ -1,1515 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- *
- * Copyright (C) 2011 Red Hat, Inc. All rights reserved.
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/socket.h>
-
-#include <glib.h>
-
-#include "nm-wimax-util.h"
-
-#include <WiMaxAPI.h>
-#include <WiMaxAPIEx.h>
-
-#include "nm-logging.h"
-#include "iwmxsdk.h"
-
-static WIMAX_API_DEVICE_ID g_api;
-static GMutex add_remove_mutex;
-
-/* Misc utilities */
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
-
-/* Misc values */
-enum {
- /*
- * WARNING!!!!!
- *
- * ONLY ONE DEVICE SUPPORTED
- *
- * - on removal, there is no way to know which device was
- * removed (the removed device is removed from the list and
- * the callback doesn't have any more information than the
- * index in the list that getlistdevice would return -- racy
- * as hell).
- *
- * - on insertion, there is not enough information provided.
- */
- IWMX_SDK_DEV_MAX = 1,
-};
-
-/* Yes, this is dirty; see above on IWMX_SDK_DEV_MAX */
-static struct wmxsdk *g_iwmx_sdk_devs[IWMX_SDK_DEV_MAX];
-
-static struct wmxsdk *deviceid_to_wmxsdk(WIMAX_API_DEVICE_ID *device_id)
-{
- unsigned cnt;
- for (cnt = 0; cnt < IWMX_SDK_DEV_MAX; cnt++) {
- struct wmxsdk *wmxsdk = g_iwmx_sdk_devs[cnt];
- if (wmxsdk &&
- wmxsdk->device_id.deviceIndex == device_id->deviceIndex)
- return wmxsdk;
- }
- return NULL;
-}
-
-static int deviceid_to_index(WIMAX_API_DEVICE_ID *device_id)
-{
- unsigned cnt;
-
- for (cnt = 0; cnt < IWMX_SDK_DEV_MAX; cnt++) {
- struct wmxsdk *wmxsdk = g_iwmx_sdk_devs[cnt];
- if (wmxsdk && wmxsdk->device_id.deviceIndex == device_id->deviceIndex)
- return cnt;
- }
- return -1;
-}
-
-struct wmxsdk *iwmx_sdk_get_wmxsdk_for_iface(const char *iface)
-{
- unsigned cnt;
-
- for (cnt = 0; cnt < IWMX_SDK_DEV_MAX; cnt++) {
- struct wmxsdk *wmxsdk = g_iwmx_sdk_devs[cnt];
- if (wmxsdk && !strcmp(wmxsdk->ifname, iface))
- return wmxsdk;
- }
- return NULL;
-}
-
-/*
- * FIXME: pulled it it out of some hole
- *
- * the cinr to percentage computation comes from the L3/L4 doc
- *
- * But some other places (L4 code) have a more complex, seemingly
- * logarithmical computation.
- *
- * Oh well...
- *
- */
-static int cinr_to_percentage(int cinr)
-{
- int strength;
- if (cinr <= -5)
- strength = 0;
- else if (cinr >= 25)
- strength = 100;
- else /* Calc percentage on the value from -5 to 25 */
- strength = ((100UL * (cinr - -5)) / (25 - -5));
- return strength;
-}
-
-/**************************************************************/
-
-typedef struct {
- WimaxNewWmxsdkFunc callback;
- void *user_data;
-} NewSdkCallback;
-
-static GMutex new_callbacks_mutex;
-static GSList *new_callbacks = NULL;
-
-void iwmx_sdk_new_callback_register(WimaxNewWmxsdkFunc callback, void *user_data)
-{
- NewSdkCallback *cb;
-
- cb = g_malloc0 (sizeof (NewSdkCallback));
- g_assert (cb);
- cb->callback = callback;
- cb->user_data = user_data;
-
- g_mutex_lock (&new_callbacks_mutex);
- new_callbacks = g_slist_append (new_callbacks, cb);
- g_mutex_unlock (&new_callbacks_mutex);
-}
-
-void iwmx_sdk_new_callback_unregister(WimaxNewWmxsdkFunc callback, void *user_data)
-{
- GSList *iter;
- NewSdkCallback *found = NULL;
-
- g_mutex_lock (&new_callbacks_mutex);
- for (iter = new_callbacks; iter; iter = g_slist_next (iter)) {
- NewSdkCallback *cb = iter->data;
-
- if (cb->callback == callback && cb->user_data == user_data) {
- found = cb;
- break;
- }
- }
-
- if (found) {
- new_callbacks = g_slist_remove (new_callbacks, found);
- g_free (found);
- }
- g_mutex_unlock (&new_callbacks_mutex);
-}
-
-static void iwmx_sdk_call_new_callbacks(struct wmxsdk *wmxsdk)
-{
- GSList *iter;
-
- g_mutex_lock (&new_callbacks_mutex);
- for (iter = new_callbacks; iter; iter = g_slist_next (iter)) {
- NewSdkCallback *cb = iter->data;
-
- cb->callback (wmxsdk, cb->user_data);
- }
- g_mutex_unlock (&new_callbacks_mutex);
-}
-
-/****************************************************************/
-
-typedef struct {
- struct wmxsdk *wmxsdk;
- WIMAX_API_DEVICE_STATUS new_status;
- WIMAX_API_DEVICE_STATUS old_status;
- WIMAX_API_STATUS_REASON reason;
- WIMAX_API_CONNECTION_PROGRESS_INFO progress;
-} StateChangeInfo;
-
-static gboolean
-state_change_handler(gpointer user_data)
-{
- StateChangeInfo *info = user_data;
-
- if (info->wmxsdk->state_change_cb) {
- info->wmxsdk->state_change_cb(info->wmxsdk,
- info->new_status,
- info->old_status,
- info->reason,
- info->progress,
- info->wmxsdk->callback_data);
- }
- wmxsdk_unref(info->wmxsdk);
- memset(info, 0, sizeof(*info));
- free(info);
- return FALSE;
-}
-
-static void
-_schedule_state_change(struct wmxsdk *wmxsdk,
- WIMAX_API_DEVICE_STATUS new_status,
- WIMAX_API_DEVICE_STATUS old_status,
- WIMAX_API_STATUS_REASON reason,
- WIMAX_API_CONNECTION_PROGRESS_INFO progress)
-{
- StateChangeInfo *info;
-
- info = malloc(sizeof (*info));
- if (!info)
- return;
-
- memset(info, 0, sizeof(*info));
- info->wmxsdk = wmxsdk;
- info->new_status = new_status;
- info->old_status = old_status;
- info->reason = reason;
- info->progress = progress;
-
- wmxsdk_ref(wmxsdk);
- g_idle_add(state_change_handler, info);
-}
-
-typedef struct {
- struct wmxsdk *wmxsdk;
- WIMAX_API_MEDIA_STATUS media_status;
-} MediaStatusInfo;
-
-static gboolean
-media_status_change_handler(gpointer user_data)
-{
- MediaStatusInfo *info = user_data;
-
- if (info->wmxsdk->media_status_cb) {
- info->wmxsdk->media_status_cb(info->wmxsdk,
- info->media_status,
- info->wmxsdk->callback_data);
- }
- wmxsdk_unref(info->wmxsdk);
- memset(info, 0, sizeof(*info));
- free(info);
- return FALSE;
-}
-
-static void
-_schedule_media_status_change(struct wmxsdk *wmxsdk,
- WIMAX_API_MEDIA_STATUS media_status)
-{
- MediaStatusInfo *info;
-
- info = malloc(sizeof (*info));
- if (!info)
- return;
-
- memset(info, 0, sizeof(*info));
- info->wmxsdk = wmxsdk;
- info->media_status = media_status;
-
- wmxsdk_ref(wmxsdk);
- g_idle_add(media_status_change_handler, info);
-}
-
-typedef struct {
- struct wmxsdk *wmxsdk;
- WIMAX_API_NETWORK_CONNECTION_RESP result;
-} ConnectResultInfo;
-
-static gboolean
-connect_result_handler(gpointer user_data)
-{
- ConnectResultInfo *info = user_data;
-
- if (info->wmxsdk->connect_result_cb) {
- info->wmxsdk->connect_result_cb(info->wmxsdk,
- info->result,
- info->wmxsdk->callback_data);
- }
- wmxsdk_unref(info->wmxsdk);
- memset(info, 0, sizeof(*info));
- free(info);
- return FALSE;
-}
-
-static void
-_schedule_connect_result(struct wmxsdk *wmxsdk,
- WIMAX_API_NETWORK_CONNECTION_RESP resp)
-{
- ConnectResultInfo *info;
-
- info = malloc(sizeof (*info));
- if (!info)
- return;
-
- memset(info, 0, sizeof(*info));
- info->wmxsdk = wmxsdk;
- info->result = resp;
-
- wmxsdk_ref(wmxsdk);
- g_idle_add(connect_result_handler, info);
-}
-
-typedef struct {
- struct wmxsdk *wmxsdk;
- WIMAX_API_NSP_INFO_EX *nsps;
- guint num_nsps;
-} ScanResultInfo;
-
-static gboolean
-scan_result_handler(gpointer user_data)
-{
- ScanResultInfo *info = user_data;
-
- if (info->wmxsdk->scan_result_cb) {
- info->wmxsdk->scan_result_cb(info->wmxsdk,
- info->nsps,
- info->num_nsps,
- info->wmxsdk->callback_data);
- }
- wmxsdk_unref(info->wmxsdk);
- free(info->nsps);
- memset(info, 0, sizeof(*info));
- free(info);
- return FALSE;
-}
-
-static void
-_schedule_scan_result(struct wmxsdk *wmxsdk,
- WIMAX_API_NSP_INFO_EX *nsps,
- guint num_nsps)
-{
- ScanResultInfo *info;
- size_t nsps_size;
- int i, tmp;
-
- info = malloc(sizeof (*info));
- if (!info)
- return;
-
- memset(info, 0, sizeof(*info));
- info->wmxsdk = wmxsdk;
-
- nsps_size = num_nsps * sizeof (WIMAX_API_NSP_INFO_EX);
- info->nsps = malloc(nsps_size);
- memcpy(info->nsps, nsps, nsps_size);
- info->num_nsps = num_nsps;
-
- /* CAPI may report link quality as zero -- if it does check if it is a bug
- * by computing it based on CINR. If it is different, use the computed one.
- */
- for (i = 0; i < num_nsps; i++) {
- WIMAX_API_NSP_INFO_EX *nsp = &info->nsps[i];
-
- if (nsp->linkQuality == 0) {
- tmp = cinr_to_percentage(nsp->CINR - 10);
- if (tmp != nsp->linkQuality)
- nsp->linkQuality = tmp;
- }
- }
-
- wmxsdk_ref(wmxsdk);
- g_idle_add(scan_result_handler, info);
-}
-
-static gboolean
-removed_handler(gpointer user_data)
-{
- struct wmxsdk *wmxsdk = user_data;
-
- if (wmxsdk->removed_cb)
- wmxsdk->removed_cb(wmxsdk, wmxsdk->callback_data);
- wmxsdk_unref(wmxsdk);
- return FALSE;
-}
-
-static void
-_schedule_removed(struct wmxsdk *wmxsdk)
-{
- wmxsdk_ref(wmxsdk);
- g_idle_add(removed_handler, wmxsdk);
-}
-
-/****************************************************************/
-
-/*
- * Convert a WiMAX API status to an string.
- */
-const char *iwmx_sdk_dev_status_to_str(WIMAX_API_DEVICE_STATUS status)
-{
- switch (status) {
- case WIMAX_API_DEVICE_STATUS_UnInitialized:
- return "uninitialized";
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW_SW:
- return "rf off";
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW:
- return "rf off (hard-block)";
- case WIMAX_API_DEVICE_STATUS_RF_OFF_SW:
- return "rf off (soft-block)";
- case WIMAX_API_DEVICE_STATUS_Ready:
- return "ready";
- case WIMAX_API_DEVICE_STATUS_Scanning:
- return "scanning";
- case WIMAX_API_DEVICE_STATUS_Connecting:
- return "connecting";
- case WIMAX_API_DEVICE_STATUS_Data_Connected:
- return "connected";
- default:
- return "unknown";
- }
-}
-
-const char *iwmx_sdk_reason_to_str(WIMAX_API_STATUS_REASON reason)
-{
- switch (reason) {
- case WIMAX_API_STATUS_REASON_Normal:
- return "normal";
-
- /**< Failed to complete NW entry with the selected operator (unspecified reason). */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_to_NW:
- return "unspecified failure";
-
- /**< Failed to complete ranging */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_Ranging:
- return "ranging failed";
-
- /**< SBC phase failed */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_SBC:
- return "sbc failed";
-
- /**< Security error. EAP authentication failed device level */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_EAP_AUTH_Device:
- return "EAP device auth failed";
-
- /**< Security error. EAP authentication failed user level */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_EAP_AUTH_user:
- return "EAP user auth failed";
-
- /**< Security error. Handshake failed */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_3_Way_Handshake:
- return "3 way handshake failed";
-
- /**< Registration failed */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_REG:
- return "registration failed";
-
- /**< Failed to initialize the data path (failed to perform DSA to one UL and one DL SFs). */
- case WIMAX_API_STATUS_REASON_Fail_to_connect_datapath:
- return "datapath failed";
-
- default:
- return "unknown";
- }
-}
-
-const char *iwmx_sdk_media_status_to_str(WIMAX_API_MEDIA_STATUS status)
-{
- switch (status) {
- case WIMAX_API_MEDIA_STATUS_LINK_UP:
- return "link-up";
- case WIMAX_API_MEDIA_STATUS_LINK_DOWN:
- return "link-down";
- case WIMAX_API_MEDIA_STATUS_LINK_RENEW:
- return "link-renew";
- default:
- return "unknown";
- }
-}
-
-const char *
-iwmx_sdk_con_progress_to_str(WIMAX_API_CONNECTION_PROGRESS_INFO progress)
-{
- switch (progress) {
-
- /**< Device is in Ranging */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_Ranging:
- return "ranging";
-
- /**< Device is in SBC */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_SBC:
- return "sbc";
-
- /**< Device is in EAP authentication Device */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_EAP_authentication_Device:
- return "eap-auth-device";
-
- /**< Device is in EAP authentication User */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_EAP_authentication_User:
- return "eap-auth-user";
-
- /**< Device is in 3-way-handshake */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_3_way_handshake:
- return "3way-handshake";
-
- /**< Device is in Registration */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_Registration:
- return "registration";
-
- /**< Device is in De-registration */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_De_registration:
- return "deregistration";
-
- /**< Device is registered (operational) */
- case WIMAX_API_DEVICE_CONNECTION_PROGRESS_Registered:
- return "registered";
-
- default:
- return "unknown";
- }
-}
-
-/*
- * Get the device's status from the device
- *
- * Does NOT cache the result
- * Does NOT trigger a state change in NetworkManager
- *
- * Returns < 0 errno code on error, status code if ok.
- */
-static WIMAX_API_DEVICE_STATUS iwmx_sdk_get_device_status(struct wmxsdk *wmxsdk)
-{
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- WIMAX_API_DEVICE_STATUS dev_status;
- WIMAX_API_CONNECTION_PROGRESS_INFO pi;
-
- r = GetDeviceStatus(&wmxsdk->device_id, &dev_status, &pi);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot read device state: %d (%s)", r, errstr);
- dev_status = -EIO;
- }
- return dev_status;
-}
-
-/*
- * Get the device's status from the device but return a string describing it
- *
- * Same conditions as iwmx_sdk_get_device_status().
- */
-static const char *iwmx_sdk_get_device_status_str(struct wmxsdk *wmxsdk)
-{
- const char *result;
- WIMAX_API_DEVICE_STATUS dev_status;
-
- dev_status = iwmx_sdk_get_device_status(wmxsdk);
- if ((int) dev_status < 0)
- result = "cannot read device state";
- else
- result = iwmx_sdk_dev_status_to_str(dev_status);
- return result;
-}
-
-/*
- * If the device is connected but we don't know about the network,
- * create the knowledge of it.
- *
- * Asks the WiMAX API to report which NSP we are connected to and we
- * create/update a network_el in the device's network list. Then
- * return it.
- *
- * Returns NULL on error.
- *
- */
-WIMAX_API_CONNECTED_NSP_INFO_EX *iwmx_sdk_get_connected_network(struct wmxsdk *wmxsdk)
-{
- WIMAX_API_CONNECTED_NSP_INFO_EX *nsp_info = NULL;
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- nsp_info = malloc(sizeof (*nsp_info));
- if (!nsp_info) {
- nm_log_err(LOGD_WIMAX, "wmxsdk: cannot allocate NSP info");
- return NULL;
- }
-
- r = GetConnectedNSPEx(&wmxsdk->device_id, nsp_info);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot get connected NSP info: %d (%s)", r, errstr);
- free (nsp_info);
- nsp_info = NULL;
- } else {
- /* Migth be 0 sometimes; fix that up */
- if (nsp_info->linkQuality == 0) {
- int linkq_expected = cinr_to_percentage(nsp_info->CINR - 10);
- if (linkq_expected != nsp_info->linkQuality)
- nsp_info->linkQuality = linkq_expected;
- }
- }
-
- return nsp_info;
-}
-
-/*
- * Asks the WiMAX API to report current link statistics.
- *
- * Returns NULL on error.
- *
- */
-WIMAX_API_LINK_STATUS_INFO_EX *iwmx_sdk_get_link_status_info(struct wmxsdk *wmxsdk)
-{
- WIMAX_API_LINK_STATUS_INFO_EX *stats = NULL;
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- /* Only report if connected */
- if (iwmxsdk_status_get(wmxsdk) < WIMAX_API_DEVICE_STATUS_Connecting) {
- nm_log_err(LOGD_WIMAX, "wmxsdk: cannot get link status info unless connected");
- return NULL;
- }
-
- stats = malloc(sizeof (*stats));
- if (!stats) {
- nm_log_err(LOGD_WIMAX, "wmxsdk: cannot allocate links status info");
- return NULL;
- }
-
- r = GetLinkStatusEx(&wmxsdk->device_id, stats);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot get link status info: %d (%s)", r, errstr);
- free (stats);
- stats = NULL;
- }
-
- return stats;
-}
-
-/*
- * Callback for a RF State command
- *
- * Called by the WiMAX API when a command sent to change the RF state
- * is completed. This is just a confirmation of what happened with the
- * command.
- *
- * We don't do anything, as when the device changes state, the state
- * change callback is called and that will fiddle with the NetworkManager
- * internals.
- */
-static void __iwmx_sdk_rf_state_cb(WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_RF_STATE rf_state)
-{
- nm_log_dbg(LOGD_WIMAX, "rf_state changed to %d", rf_state);
-}
-
-/*
- * Turn the radio on or off
- *
- * First it checks that we are in the right state before doing
- * anything; there might be no need to do anything.
- *
- * Issue a command to the WiMAX API, wait for a callback confirming it
- * is done. Sometimes the callback is missed -- in that case, do force
- * a state change evaluation.
- *
- * Frustration note:
- *
- * Geezoos efing Xist, they make difficult even the most simple
- * of the operations
- *
- * This thing is definitely a pain. If the radio is ON already
- * and you switch it on again...well, there is no way to tell
- * because you don't get a callback saying it basically
- * suceeded. But on the other hand, if the thing was in a
- * different state and action needs to be taken, you have to wait
- * for a callback to confirm it's done. However, there is also an
- * state change callback, which is almost the same, so now you
- * have to handle things in two "unrelated" threads of execution.
- *
- * How the shpx are you expected to tell the difference? Check
- * status first? On timeout? Nice gap (eighteen wheeler size) for
- * race conditions.
- */
-int iwmx_sdk_rf_state_set(struct wmxsdk *wmxsdk, WIMAX_API_RF_STATE rf_state)
-{
- int result;
-
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
- WIMAX_API_DEVICE_STATUS dev_status;
-
- g_assert(rf_state == WIMAX_API_RF_ON || rf_state == WIMAX_API_RF_OFF);
-
- /* Guess what the current radio state is; if it is ON
- * already, don't redo it. */
- dev_status = iwmx_sdk_get_device_status(wmxsdk);
- if ((int) dev_status < 0) {
- result = dev_status;
- goto error_get_status;
- }
- switch (dev_status) {
- case WIMAX_API_DEVICE_STATUS_UnInitialized:
- result = -EINVAL;
- goto error_cant_do;
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW_SW:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW:
- nm_log_err(LOGD_WIMAX, "wmxsdk: cannot turn on radio: hw switch is off");
- result = -EPERM;
- goto error_cant_do;
- break;
- case WIMAX_API_DEVICE_STATUS_RF_OFF_SW:
- if (rf_state == WIMAX_API_RF_OFF) {
- result = 0;
- nm_log_dbg(LOGD_WIMAX, "radio is already off");
- goto out_done;
- }
- break;
- case WIMAX_API_DEVICE_STATUS_Ready:
- case WIMAX_API_DEVICE_STATUS_Scanning:
- case WIMAX_API_DEVICE_STATUS_Connecting:
- case WIMAX_API_DEVICE_STATUS_Data_Connected:
- if (rf_state == WIMAX_API_RF_ON) {
- result = 0;
- nm_log_dbg(LOGD_WIMAX, "radio is already on");
- goto out_done;
- }
- break;
- default:
- g_assert(1);
- }
- /* Ok, flip the radio */
- r = CmdControlPowerManagement(&wmxsdk->device_id, rf_state);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot flip radio to %d: %d (%s) [device is in state %s]",
- rf_state, r, errstr, iwmx_sdk_get_device_status_str(wmxsdk));
- result = -EIO;
- } else
- result = -EINPROGRESS;
-out_done:
-error_cant_do:
-error_get_status:
- return result;
-}
-
-/*
- * Read the cached device status
- */
-WIMAX_API_DEVICE_STATUS iwmxsdk_status_get(struct wmxsdk *wmxsdk)
-{
- WIMAX_API_DEVICE_STATUS status;
-
- g_mutex_lock(&wmxsdk->status_mutex);
- status = wmxsdk->status;
- g_mutex_unlock(&wmxsdk->status_mutex);
- return status;
-}
-
-/*
- * Callback for a Connect command
- *
- * Called by the WiMAX API when a command sent to connect is
- * completed. This is just a confirmation of what happened with the
- * command.
- *
- * WE DON'T DO MUCH HERE -- the real meat happens when a state change
- * callback is sent, where we detect we move to connected state (or
- * from disconnecting to something else); the state change callback is
- * called and that will fiddle with the NetworkManager internals.
- */
-static void __iwmx_sdk_connect_cb(WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_NETWORK_CONNECTION_RESP resp)
-{
- WIMAX_API_DEVICE_STATUS status;
- struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
-
- status = iwmxsdk_status_get(wmxsdk);
- if (resp == WIMAX_API_CONNECTION_SUCCESS) {
- if (status != WIMAX_API_DEVICE_STATUS_Data_Connected) {
- nm_log_err(LOGD_WIMAX, "wmxsdk: error: connect worked, but state"
- " didn't change (now it is %d [%s])",
- status,
- iwmx_sdk_dev_status_to_str(status));
- }
- } else {
- nm_log_err(LOGD_WIMAX, "wmxsdk: failed to connect (status %d: %s)",
- status, iwmx_sdk_dev_status_to_str(status));
- }
-
- _schedule_connect_result(wmxsdk, resp);
-}
-
-/*
- * Connect to a network
- *
- * This function starts the connection process to a given network;
- * when the device changes status, the status change callback will
- * tell NetworkManager if the network is finally connected or not.
- *
- * One of the reasons it is done like that is to allow external tools
- * to control the device and the plugin just passing the status so
- * NetworkManager displays the right info.
- */
-int iwmx_sdk_connect(struct wmxsdk *wmxsdk, const char *nsp_name)
-{
- int result = 0;
-
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
- WIMAX_API_DEVICE_STATUS dev_status;
- char sdk_name[MAX_SIZE_OF_NSP_NAME];
-
- g_mutex_lock(&wmxsdk->connect_mutex);
- /* Guess what the current radio state is; if it is ON
- * already, don't redo it. */
- dev_status = iwmxsdk_status_get(wmxsdk);
- if ((int) dev_status < 0) {
- result = dev_status;
- goto error_get_status;
- }
- switch (dev_status) {
- case WIMAX_API_DEVICE_STATUS_UnInitialized:
- nm_log_err(LOGD_WIMAX, "wmxsdk: SW BUG? HW is uninitialized");
- result = -EINVAL;
- goto error_cant_do;
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW_SW:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_SW:
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot connect: radio is off");
- result = -EPERM;
- goto error_cant_do;
- case WIMAX_API_DEVICE_STATUS_Ready:
- case WIMAX_API_DEVICE_STATUS_Scanning:
- break;
- case WIMAX_API_DEVICE_STATUS_Connecting:
- nm_log_dbg(LOGD_WIMAX, "Connect already pending, waiting for it");
- result = -EINPROGRESS;
- goto error_cant_do;
- case WIMAX_API_DEVICE_STATUS_Data_Connected:
- nm_log_err(LOGD_WIMAX, "wmxsdk: BUG? need to disconnect?");
- result = -EINVAL;
- goto error_cant_do;
- default:
- g_assert(1);
- }
-
- /* The SDK treats the network name as wchar_t* while the contents are
- * actually just UTF-8... WTF? Hand it a full buffer to work around
- * boundary cases where the NSP name contains an odd # of characters.
- */
- memset(sdk_name, 0, sizeof (sdk_name));
- memcpy(sdk_name, nsp_name, strlen (nsp_name));
-
- /* Ok, do the connection, wait for a callback */
- r = CmdConnectToNetwork(&wmxsdk->device_id, &sdk_name[0], 0, 0);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot connect to network %s: %d (%s) - device is in state '%s'",
- nsp_name, r, errstr,
- iwmx_sdk_get_device_status_str(wmxsdk));
- result = -EIO;
- }
-
-error_cant_do:
-error_get_status:
- g_mutex_unlock(&wmxsdk->connect_mutex);
- return result;
-}
-
-/*
- * Callback for a Disconnect command
- *
- * Called by the WiMAX API when a command sent to connect is
- * completed. This is just a confirmation of what happened with the
- * command.
- *
- * When the device changes state, the state change callback is called
- * and that will fiddle with the NetworkManager internals.
- *
- * We just update the result of the command and wake up anybody who is
- * waiting for this conditional variable.
- */
-static void __iwmx_sdk_disconnect_cb(WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_NETWORK_CONNECTION_RESP resp)
-{
- struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
- WIMAX_API_DEVICE_STATUS status;
-
- status = iwmxsdk_status_get(wmxsdk);
- if (resp == WIMAX_API_CONNECTION_SUCCESS) {
- if (status == WIMAX_API_DEVICE_STATUS_Data_Connected) {
- nm_log_err(LOGD_WIMAX, "wmxsdk: error: disconnect worked, "
- "but state didn't change (now it is %d [%s])", status,
- iwmx_sdk_dev_status_to_str(status));
- }
- } else
- nm_log_err(LOGD_WIMAX, "wmxsdk: failed to disconnect (status %d: %s)",
- status, iwmx_sdk_dev_status_to_str(status));
-}
-
-/*
- * Disconnect from a network
- *
- * This function tells the device to disconnect; the state change
- * callback will take care of inform NetworkManager's internals.
- */
-int iwmx_sdk_disconnect(struct wmxsdk *wmxsdk)
-{
- int result;
-
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
- WIMAX_API_DEVICE_STATUS dev_status;
-
- g_mutex_lock(&wmxsdk->connect_mutex);
- /* Guess what the current radio state is; if it is ON
- * already, don't redo it. */
- dev_status = iwmx_sdk_get_device_status(wmxsdk);
- if ((int) dev_status < 0) {
- result = dev_status;
- goto error_get_status;
- }
- switch (dev_status) {
- case WIMAX_API_DEVICE_STATUS_UnInitialized:
- nm_log_err(LOGD_WIMAX, "wmxsdk: SW BUG? HW is uninitialized");
- result = -EINVAL;
- goto error_cant_do;
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW_SW:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_SW:
- nm_log_dbg(LOGD_WIMAX, "Cannot disconnect, radio is off; ignoring");
- result = 0;
- goto error_cant_do;
- case WIMAX_API_DEVICE_STATUS_Ready:
- case WIMAX_API_DEVICE_STATUS_Scanning:
- nm_log_dbg(LOGD_WIMAX, "Cannot disconnect, already disconnected; ignoring");
- result = 0;
- goto error_cant_do;
- case WIMAX_API_DEVICE_STATUS_Connecting:
- case WIMAX_API_DEVICE_STATUS_Data_Connected:
- break;
- default:
- g_assert(1);
- }
- /* Ok, flip the radio */
- r = CmdDisconnectFromNetwork(&wmxsdk->device_id);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot disconnect from network: %d (%s)", r, errstr);
- result = -EIO;
- } else
- result = -EINPROGRESS;
-error_cant_do:
-error_get_status:
- g_mutex_unlock(&wmxsdk->connect_mutex);
- return result;
-}
-
-/*
- * Turn fast reconnect capability on/off
- *
- * This function tells wimaxd to turn fast reconnect on or off.
- */
-int iwmx_sdk_set_fast_reconnect_enabled(struct wmxsdk *wmxsdk, int enabled)
-{
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- r = SetFastReconnectCapabilityStatus(&wmxsdk->device_id, !!enabled);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot set fast reconnect to %d: %d (%s)",
- enabled, r, errstr);
- return -EIO;
- }
- return 0;
-}
-
-static void __iwmx_sdk_media_status_update_cb (WIMAX_API_DEVICE_ID_P device_id,
- WIMAX_API_MEDIA_STATUS mediaStatus)
-{
- struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
-
- /* Ignore redundant LINK_UP events */
- if ( mediaStatus == WIMAX_API_MEDIA_STATUS_LINK_UP
- && wmxsdk->media_status == WIMAX_API_MEDIA_STATUS_LINK_UP)
- return;
-
- wmxsdk->media_status = mediaStatus;
-
- nm_log_dbg(LOGD_WIMAX, "wmxsdk: media status change to (%d) %s",
- mediaStatus, iwmx_sdk_media_status_to_str (mediaStatus));
-
- _schedule_media_status_change(wmxsdk, mediaStatus);
-}
-
-/*
- * Callback for state change messages
- *
- * Just pass them to the state transition handler
- */
-static void __iwmx_sdk_state_change_cb(WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_DEVICE_STATUS status,
- WIMAX_API_STATUS_REASON reason,
- WIMAX_API_CONNECTION_PROGRESS_INFO pi)
-{
- struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
- WIMAX_API_DEVICE_STATUS old_status;
-
- nm_log_dbg(LOGD_WIMAX, "wmxsdk: state change to (%d) %s reason (%d) %s",
- status, iwmx_sdk_dev_status_to_str (status),
- reason, iwmx_sdk_reason_to_str (reason));
-
- g_mutex_lock(&wmxsdk->status_mutex);
- old_status = wmxsdk->status;
- wmxsdk->status = status;
- g_mutex_unlock(&wmxsdk->status_mutex);
-
- _schedule_state_change(wmxsdk, status, old_status, reason, pi);
-}
-
-/*
- * Called by _iwmx_sdk_*scan_cb() when [wide or preferred] scan results
- * are available.
- *
- * From here we update NetworkManager's idea of which networks are available.
- */
-static void __iwmx_sdk_scan_common_cb(WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_NSP_INFO_EX *nsp_list,
- UINT32 nsp_list_size)
-{
- struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
-
- g_mutex_lock(&wmxsdk->network_mutex);
- _schedule_scan_result(wmxsdk, nsp_list, nsp_list_size);
- g_mutex_unlock(&wmxsdk->network_mutex);
-}
-
-/*
- * Called by the WiMAX API when we get a wide scan result
- *
- * We treat them same as wide, so we just call that.
- */
-static void __iwmx_sdk_wide_scan_cb(WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_NSP_INFO_EX *nsp_list,
- UINT32 nsp_list_size)
-{
- __iwmx_sdk_scan_common_cb(device_id, nsp_list, nsp_list_size);
-}
-
-/*
- * Called by the WiMAX API when we get a normal (non wide) scan result
- *
- * We treat them same as wide, so we just call that.
- */
-static void __iwmx_sdk_scan_cb(WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_NSP_INFO_EX *nsp_list,
- UINT32 nsp_list_size, UINT32 searchProgress)
-{
- __iwmx_sdk_scan_common_cb(device_id, nsp_list, nsp_list_size);
-}
-
-/*
- * Called to ask the device to scan for networks
- *
- * We don't really scan as the WiMAX SDK daemon scans in the
- * background for us. We just get the results and hand them back via
- * the scan_result_cb callback.
- */
-int iwmx_sdk_get_networks(struct wmxsdk *wmxsdk)
-{
- int result;
-
- UINT32 nsp_list_length = 10;
- WIMAX_API_NSP_INFO_EX nsp_list[10]; /* FIXME: up to 32? */
-
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- r = GetNetworkListEx(&wmxsdk->device_id, nsp_list, &nsp_list_length);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot get network list: %d (%s)", r, errstr);
- result = -EIO;
- goto error_scan;
- }
-
- if (nsp_list_length == 0) {
- nm_log_dbg(LOGD_WIMAX, "no networks");
- } else
- __iwmx_sdk_scan_common_cb(&wmxsdk->device_id, nsp_list,
- nsp_list_length);
- result = 0;
-error_scan:
- return result;
-}
-
-/*
- * Initialize the WiMAX API, register with it, setup callbacks
- *
- */
-static int iwmx_sdk_setup(struct wmxsdk *wmxsdk)
-{
- int result, status;
-
- WIMAX_API_RET r;
-
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- result = -ENFILE;
-
- /* device_id initialized by iwmx_sdk_dev_add */
-
- r = WiMaxDeviceOpen(&wmxsdk->device_id);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot open device: %d (%s)", r, errstr);
- goto error_wimaxdeviceopen;
- }
-
- /*
- * We scan in auto mode (in the background)
- *
- * Otherwise is messy -- if we have NetworkManager triggering a scan
- * when we call iwmx_nm_scan() -> iwmx_sdk_scan(), most of the
- * times that causes a race condition when the UI asks for a
- * scan right before displaying the network menu. As there is
- * no way to cancel an ongoing scan before connecting, we are
- * stuck. So we do auto bg and have iwmx_sdk_scan() just return
- * the current network list.
- */
- r = SetConnectionMode(&wmxsdk->device_id,
- WIMAX_API_CONNECTION_AUTO_SCAN_MANUAL_CONNECT);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot set connectin mode to manual: %d (%s)", r, errstr);
- goto error_connection_mode;
- }
-
- r = SubscribeControlPowerManagement(&wmxsdk->device_id,
- __iwmx_sdk_rf_state_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot subscribe to radio change events: %u (%s)", r, errstr);
- result = -EIO;
- goto error_subscribe_rf_state;
- }
-
- r = SubscribeDeviceStatusChange(&wmxsdk->device_id,
- __iwmx_sdk_state_change_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot subscribe to state chaneg events: %d (%s)", r, errstr);
- goto error_subscribe_state_change;
- }
-
- r = SubscribeNetworkSearchWideScanEx(&wmxsdk->device_id,
- __iwmx_sdk_wide_scan_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot subscribe to wide scan events: %d (%s)", r, errstr);
- goto error_subscribe_wide_scan;
- }
- r = SubscribeNetworkSearchEx(&wmxsdk->device_id, __iwmx_sdk_scan_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot subscribe to scan events: %d (%s)", r, errstr);
- goto error_subscribe_scan;
- }
-
- r = SubscribeConnectToNetwork(&wmxsdk->device_id,
- __iwmx_sdk_connect_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot subscribe to connect events: %d (%s)", r, errstr);
- goto error_subscribe_connect;
- }
-
- r = SubscribeDisconnectToNetwork(&wmxsdk->device_id,
- __iwmx_sdk_disconnect_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot subscribe to disconnect events: %d (%s)", r, errstr);
- goto error_subscribe_disconnect;
- }
-
- r = SubscribeMediaStatusUpdate(&wmxsdk->device_id, __iwmx_sdk_media_status_update_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&wmxsdk->device_id, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot subscribe to media status events: %d (%s)", r, errstr);
- goto error_subscribe_media_status;
- }
-
- status = iwmx_sdk_get_device_status(wmxsdk);
- if ((int) status < 0)
- status = WIMAX_API_DEVICE_STATUS_UnInitialized;
-
- g_mutex_lock(&wmxsdk->status_mutex);
- wmxsdk->status = status;
- g_mutex_unlock(&wmxsdk->status_mutex);
-
- _schedule_state_change(wmxsdk,
- status,
- WIMAX_API_DEVICE_STATUS_UnInitialized,
- WIMAX_API_STATUS_REASON_Normal,
- WIMAX_API_DEVICE_CONNECTION_PROGRESS_Ranging);
-
- return 0;
-
- UnsubscribeMediaStatusUpdate(&wmxsdk->device_id);
-error_subscribe_media_status:
- UnsubscribeDisconnectToNetwork(&wmxsdk->device_id);
-error_subscribe_disconnect:
- UnsubscribeConnectToNetwork(&wmxsdk->device_id);
-error_subscribe_connect:
- UnsubscribeNetworkSearchEx(&wmxsdk->device_id);
-error_subscribe_scan:
- UnsubscribeNetworkSearchWideScanEx(&wmxsdk->device_id);
-error_subscribe_wide_scan:
- UnsubscribeDeviceStatusChange(&wmxsdk->device_id);
-error_subscribe_state_change:
- UnsubscribeControlPowerManagement(&wmxsdk->device_id);
-error_subscribe_rf_state:
-error_connection_mode:
- WiMaxDeviceClose(&wmxsdk->device_id);
-error_wimaxdeviceopen:
- return result;
-}
-
-/*
- * Called when a device is torn down
- *
- * Cleanup all that is done in iwmx_sdk_setup(). Remove callbacks,
- * unregister from the WiMAX API.
- */
-static void iwmx_sdk_remove(struct wmxsdk *wmxsdk)
-{
- UnsubscribeMediaStatusUpdate(&wmxsdk->device_id);
- UnsubscribeDisconnectToNetwork(&wmxsdk->device_id);
- UnsubscribeConnectToNetwork(&wmxsdk->device_id);
- UnsubscribeNetworkSearchEx(&wmxsdk->device_id);
- UnsubscribeNetworkSearchWideScanEx(&wmxsdk->device_id);
- UnsubscribeDeviceStatusChange(&wmxsdk->device_id);
- UnsubscribeControlPowerManagement(&wmxsdk->device_id);
- WiMaxDeviceClose(&wmxsdk->device_id);
-}
-
-void iwmx_sdk_set_callbacks(struct wmxsdk *wmxsdk,
- WimaxStateChangeFunc state_change_cb,
- WimaxMediaStatusFunc media_status_cb,
- WimaxConnectResultFunc connect_result_cb,
- WimaxScanResultFunc scan_result_cb,
- WimaxRemovedFunc removed_cb,
- void *user_data)
-{
- wmxsdk->state_change_cb = state_change_cb;
- wmxsdk->media_status_cb = media_status_cb;
- wmxsdk->connect_result_cb = connect_result_cb;
- wmxsdk->scan_result_cb = scan_result_cb;
- wmxsdk->removed_cb = removed_cb;
- wmxsdk->callback_data = user_data;
-}
-
-/* Initialize a [zeroed] struct wmxsdk */
-static struct wmxsdk *wmxsdk_new(void)
-{
- struct wmxsdk *wmxsdk;
-
- wmxsdk = malloc(sizeof(*wmxsdk));
- if (wmxsdk) {
- memset(wmxsdk, 0, sizeof(*wmxsdk));
-
- wmxsdk->refcount = 1;
- g_mutex_init(&wmxsdk->network_mutex);
-
- wmxsdk->status = WIMAX_API_DEVICE_STATUS_UnInitialized;
- g_mutex_init(&wmxsdk->status_mutex);
-
- g_mutex_init(&wmxsdk->connect_mutex);
- }
- return wmxsdk;
-}
-
-struct wmxsdk *wmxsdk_ref(struct wmxsdk *wmxsdk)
-{
- g_atomic_int_add(&wmxsdk->refcount, 1);
- return wmxsdk;
-}
-
-void wmxsdk_unref(struct wmxsdk *wmxsdk)
-{
- if (g_atomic_int_dec_and_test(&wmxsdk->refcount)) {
- g_mutex_clear(&wmxsdk->status_mutex);
- g_mutex_clear(&wmxsdk->connect_mutex);
- memset(wmxsdk, 0, sizeof(*wmxsdk));
- free(wmxsdk);
- }
-}
-
-static void iwmx_sdk_dev_add(unsigned idx, unsigned api_idx, const char *name)
-{
- struct wmxsdk *wmxsdk;
- const char *s;
-
- if (idx >= IWMX_SDK_DEV_MAX) {
- nm_log_err(LOGD_WIMAX, "BUG! idx (%u) >= IWMX_SDK_DEV_MAX (%u)", idx, IWMX_SDK_DEV_MAX);
- return;
- }
- if (g_iwmx_sdk_devs[idx] != NULL) {
- nm_log_err(LOGD_WIMAX, "BUG! device index %u already enumerated?", idx);
- return;
- }
-
- wmxsdk = wmxsdk_new();
- if (wmxsdk == NULL) {
- nm_log_err(LOGD_WIMAX, "Can't allocate %zu bytes", sizeof(*wmxsdk));
- return;
- }
-
- /*
- * This depends on a hack in the WiMAX Network Service; it has
- * to return, as part of the device name, a string "if:IFNAME"
- * where the OS's device name is stored.
- */
- s = strstr(name, "if:");
- if (s == NULL
- || sscanf(s, "if:%15[^ \f\n\r\t\v]", wmxsdk->ifname) != 1) {
- nm_log_err(LOGD_WIMAX, "Cannot extract network interface name off '%s'",
- name);
- goto error;
- }
- nm_log_dbg(LOGD_WIMAX, "network interface name: '%s'", wmxsdk->ifname);
-
- strncpy(wmxsdk->name, name, sizeof(wmxsdk->name));
- wmxsdk->device_id.privilege = WIMAX_API_PRIVILEGE_READ_WRITE;
- wmxsdk->device_id.deviceIndex = api_idx;
-
- if (iwmx_sdk_setup(wmxsdk) != 0) {
- nm_log_err(LOGD_WIMAX, "wxmsdk: %s: cannot set up interface", wmxsdk->ifname);
- goto error;
- }
-
- g_iwmx_sdk_devs[idx] = wmxsdk;
-
- /* Notify listeners of new devices */
- iwmx_sdk_call_new_callbacks (wmxsdk);
- return;
-
-error:
- wmxsdk_unref(wmxsdk);
- return;
-}
-
-static void iwmx_sdk_dev_rm(unsigned idx)
-{
- struct wmxsdk *wmxsdk;
-
- if (idx >= IWMX_SDK_DEV_MAX) {
- nm_log_err(LOGD_WIMAX, "BUG! idx (%u) >= IWMX_SDK_DEV_MAX (%u)", idx, IWMX_SDK_DEV_MAX);
- return;
- }
-
- wmxsdk = g_iwmx_sdk_devs[idx];
- _schedule_removed(wmxsdk);
- iwmx_sdk_remove(wmxsdk);
- wmxsdk_unref(wmxsdk);
- g_iwmx_sdk_devs[idx] = NULL;
-}
-
-static void iwmx_sdk_addremove_cb(WIMAX_API_DEVICE_ID *devid,
- BOOL presence)
-{
- unsigned int cnt;
- WIMAX_API_RET r;
- WIMAX_API_HW_DEVICE_ID device_id_list[5];
- UINT32 device_id_list_size = ARRAY_SIZE(device_id_list);
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- g_mutex_lock(&add_remove_mutex);
-
- nm_log_dbg(LOGD_WIMAX, "cb: handle %u index #%u is %d", devid->sdkHandle,
- devid->deviceIndex, presence);
-
- r = GetListDevice(devid, device_id_list, &device_id_list_size);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(devid, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot obtain list of devices: %d (%s)", r, errstr);
- goto out;
- }
-
- if (device_id_list_size == 0) {
- nm_log_dbg(LOGD_WIMAX, "No WiMAX devices reported");
- } else {
- for (cnt = 0; cnt < device_id_list_size; cnt++) {
- WIMAX_API_HW_DEVICE_ID *dev =
- device_id_list + cnt;
- nm_log_dbg(LOGD_WIMAX, "#%u index #%u device %s", cnt,
- dev->deviceIndex, dev->deviceName);
- }
- }
-
- if (presence) {
- WIMAX_API_HW_DEVICE_ID *dev;
-
- /* Make sure the wimax NS isn't lying to us */
- if (device_id_list_size < devid->deviceIndex) {
- nm_log_err(LOGD_WIMAX, "wmxsdk: changed device (%u) not in the list? (%u items)",
- devid->deviceIndex, device_id_list_size);
- goto out;
- }
-
- /* Add the device to our internal list */
- dev = device_id_list + devid->deviceIndex;
- iwmx_sdk_dev_add(devid->deviceIndex, dev->deviceIndex, dev->deviceName);
- } else {
- /* Remove the device from our internal list */
- int idx = deviceid_to_index(devid);
-
- if (idx >= 0)
- iwmx_sdk_dev_rm(idx);
- }
-
-out:
- g_mutex_unlock(&add_remove_mutex);
-}
-
-/*
- * Initialize the WiMAX API, register with it, setup callbacks for
- * device coming up / dissapearing
- */
-int iwmx_sdk_api_init(void)
-{
- int result;
- unsigned int cnt;
- WIMAX_API_RET r;
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- WIMAX_API_HW_DEVICE_ID device_id_list[5];
- UINT32 device_id_list_size = ARRAY_SIZE(device_id_list);
-
- memset(&g_api, 0, sizeof(g_api));
- g_api.privilege = WIMAX_API_PRIVILEGE_READ_WRITE;
-
- result = -EIO;
- r = WiMaxAPIOpen(&g_api);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&g_api, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: WiMaxAPIOpen failed with %d (%s)", r, errstr);
- goto error_wimaxapiopen;
- }
-
- r = SubscribeDeviceInsertRemove(&g_api, iwmx_sdk_addremove_cb);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&g_api, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: insert/remove subscribe failed with %d (%s)", r, errstr);
- goto error_close;
- }
-
- r = GetListDevice(&g_api, device_id_list, &device_id_list_size);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&g_api, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: Cannot obtain list of devices: %d (%s)", r, errstr);
- goto error_close;
- }
- if (device_id_list_size < g_api.deviceIndex) {
- nm_log_err(LOGD_WIMAX, "wmxsdk: changed device (%u) not in the list? (%u items)",
- g_api.deviceIndex, device_id_list_size);
- }
-
- if (device_id_list_size == 0) {
- nm_log_dbg(LOGD_WIMAX, "No WiMAX devices reported");
- } else {
- for (cnt = 0; cnt < device_id_list_size; cnt++) {
- WIMAX_API_HW_DEVICE_ID *dev = device_id_list + cnt;
- nm_log_dbg(LOGD_WIMAX, "#%u index #%u device %s", cnt, dev->deviceIndex, dev->deviceName);
- iwmx_sdk_dev_add(cnt, dev->deviceIndex, dev->deviceName);
- }
- }
- return 0;
-
-error_close:
- WiMaxAPIClose(&g_api);
-error_wimaxapiopen:
- return result;
-}
-
-void iwmx_sdk_api_exit(void)
-{
- WIMAX_API_RET r;
-
- char errstr[512];
- UINT32 errstr_size = sizeof(errstr);
-
- r = WiMaxAPIClose(&g_api);
- if (r != WIMAX_API_RET_SUCCESS) {
- GetErrorString(&g_api, r, errstr, &errstr_size);
- nm_log_err(LOGD_WIMAX, "wmxsdk: WiMaxAPIClose failed with %d (%s)", r, errstr);
- }
- return;
-}
diff --git a/src/devices/wimax/iwmxsdk.h b/src/devices/wimax/iwmxsdk.h
deleted file mode 100644
index c8e766964f..0000000000
--- a/src/devices/wimax/iwmxsdk.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- *
- * Copyright (C) 2011 Red Hat, Inc. All rights reserved.
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef __IWMXSDK_H__
-#define __IWMXSDK_H__
-
-#include "nm-wimax-util.h"
-
-#include <wimax/WiMaxTypesEx.h>
-#include <wimax/WiMaxAPIEx.h>
-
-struct wmxsdk;
-
-typedef void (*WimaxNewWmxsdkFunc) (struct wmxsdk *wmxsdk, void *user_data);
-
-typedef void (*WimaxStateChangeFunc) (struct wmxsdk *wmxsdk,
- WIMAX_API_DEVICE_STATUS new_status,
- WIMAX_API_DEVICE_STATUS old_status,
- WIMAX_API_STATUS_REASON reason,
- WIMAX_API_CONNECTION_PROGRESS_INFO info,
- void *user_data);
-
-typedef void (*WimaxMediaStatusFunc) (struct wmxsdk *wmxsdk,
- WIMAX_API_MEDIA_STATUS media_status,
- void *user_data);
-
-typedef void (*WimaxConnectResultFunc) (struct wmxsdk *wmxsdk,
- WIMAX_API_NETWORK_CONNECTION_RESP resp,
- void *user_data);
-
-typedef void (*WimaxScanResultFunc) (struct wmxsdk *wmxsdk,
- WIMAX_API_NSP_INFO_EX *nsps,
- guint num_nsps,
- void *user_data);
-
-typedef void (*WimaxRemovedFunc) (struct wmxsdk *wmxsdk, void *user_data);
-
-struct wmxsdk {
- gint refcount;
-
- WIMAX_API_DEVICE_ID device_id;
-
- WimaxStateChangeFunc state_change_cb;
- WimaxMediaStatusFunc media_status_cb;
- WimaxConnectResultFunc connect_result_cb;
- WimaxScanResultFunc scan_result_cb;
- WimaxRemovedFunc removed_cb;
- void *callback_data;
-
- GMutex network_mutex;
-
- WIMAX_API_DEVICE_STATUS status;
- WIMAX_API_MEDIA_STATUS media_status;
- GMutex status_mutex;
-
- GMutex connect_mutex;
-
- char name[100];
- char ifname[16];
-};
-
-struct wmxsdk *iwmx_sdk_get_wmxsdk_for_iface(const char *iface);
-
-struct wmxsdk *wmxsdk_ref(struct wmxsdk *wmxsdk);
-void wmxsdk_unref(struct wmxsdk *wmxsdk);
-
-/* Register/unregister callbacks when a new wmxsdk is set up */
-void iwmx_sdk_new_callback_register(WimaxNewWmxsdkFunc callback, void *user_data);
-void iwmx_sdk_new_callback_unregister(WimaxNewWmxsdkFunc callback, void *user_data);
-
-void iwmx_sdk_set_callbacks(struct wmxsdk *wmxsdk,
- WimaxStateChangeFunc state_change_cb,
- WimaxMediaStatusFunc media_status_func,
- WimaxConnectResultFunc connect_result_cb,
- WimaxScanResultFunc scan_result_cb,
- WimaxRemovedFunc removed_cb,
- void *user_data);
-
-WIMAX_API_DEVICE_STATUS iwmxsdk_status_get(struct wmxsdk *wmxsdk);
-int iwmx_sdk_connect(struct wmxsdk *wmxsdk, const char *nsp_name);
-int iwmx_sdk_disconnect(struct wmxsdk *wmxsdk);
-int iwmx_sdk_set_fast_reconnect_enabled(struct wmxsdk *wmxsdk, int enabled);
-WIMAX_API_CONNECTED_NSP_INFO_EX *iwmx_sdk_get_connected_network(struct wmxsdk *wmxsdk);
-WIMAX_API_LINK_STATUS_INFO_EX *iwmx_sdk_get_link_status_info(struct wmxsdk *wmxsdk);
-const char *iwmx_sdk_dev_status_to_str(WIMAX_API_DEVICE_STATUS status);
-const char *iwmx_sdk_reason_to_str(WIMAX_API_STATUS_REASON reason);
-const char *iwmx_sdk_media_status_to_str(WIMAX_API_MEDIA_STATUS status);
-const char *iwmx_sdk_con_progress_to_str(WIMAX_API_CONNECTION_PROGRESS_INFO progress);
-int iwmx_sdk_rf_state_set(struct wmxsdk *wmxsdk, WIMAX_API_RF_STATE rf_state);
-int iwmx_sdk_get_networks(struct wmxsdk *wmxsdk);
-int iwmx_sdk_api_init(void);
-void iwmx_sdk_api_exit(void);
-
-#endif /* __IWMXSDK_H__ */
diff --git a/src/devices/wimax/nm-device-wimax.c b/src/devices/wimax/nm-device-wimax.c
deleted file mode 100644
index 0c8f1cbbe3..0000000000
--- a/src/devices/wimax/nm-device-wimax.c
+++ /dev/null
@@ -1,1416 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2010 - 2011 Red Hat, Inc.
- * Copyright (C) 2009 Novell, Inc.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-
-#include <glib/gi18n.h>
-
-#include "nm-wimax-util.h"
-
-#include <WiMaxAPI.h>
-#include <WiMaxAPIEx.h>
-
-#include "nm-device-wimax.h"
-#include "nm-wimax-util.h"
-#include "nm-logging.h"
-#include "nm-device-private.h"
-#include "NetworkManagerUtils.h"
-#include "nm-active-connection.h"
-#include "nm-dbus-manager.h"
-#include "nm-connection.h"
-#include "nm-platform.h"
-#include "nm-setting-connection.h"
-#include "nm-setting-wimax.h"
-#include "nm-utils.h"
-#include "nm-rfkill-manager.h"
-#include "iwmxsdk.h"
-#include "nm-enum-types.h"
-#include "nm-dbus-glib-types.h"
-
-static gboolean impl_device_get_nsp_list (NMDeviceWimax *device, GPtrArray **list, GError **error);
-
-#include "nm-device-wimax-glue.h"
-
-G_DEFINE_TYPE (NMDeviceWimax, nm_device_wimax, NM_TYPE_DEVICE)
-
-enum {
- PROP_0,
- PROP_NSPS,
- PROP_ACTIVE_NSP,
- PROP_CENTER_FREQ,
- PROP_RSSI,
- PROP_CINR,
- PROP_TX_POWER,
- PROP_BSID,
-
- LAST_PROP
-};
-
-enum {
- NSP_ADDED,
- NSP_REMOVED,
-
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-#define NM_DEVICE_WIMAX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- NM_TYPE_DEVICE_WIMAX, \
- NMDeviceWimaxPrivate))
-
-typedef struct {
- gboolean disposed;
-
- struct wmxsdk *sdk;
- WIMAX_API_DEVICE_STATUS status;
- gboolean connect_failed;
-
- gboolean enabled;
- gboolean wimaxd_enabled;
- guint activation_timeout_id;
-
- /* Track whether stage1 (Prepare) is completed yet or not */
- gboolean prepare_done;
-
- guint sdk_action_defer_id;
-
- guint link_timeout_id;
- guint poll_id;
-
- GSList *nsp_list;
- NMWimaxNsp *current_nsp;
-
- /* interesting stuff when connected */
- guint center_freq;
- gint rssi;
- gint cinr;
- gint tx_power;
- char *bsid;
-} NMDeviceWimaxPrivate;
-
-/***********************************************************/
-
-static gboolean
-impl_device_get_nsp_list (NMDeviceWimax *self, GPtrArray **nsps, GError **error)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- GSList *iter;
-
- *nsps = g_ptr_array_sized_new (4);
- for (iter = priv->nsp_list; iter; iter = iter->next)
- g_ptr_array_add (*nsps, g_strdup (nm_wimax_nsp_get_dbus_path (NM_WIMAX_NSP (iter->data))));
-
- return TRUE;
-}
-
-static void
-set_current_nsp (NMDeviceWimax *self, NMWimaxNsp *new_nsp)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- NMWimaxNsp *old_nsp;
- gboolean path_changed = FALSE;
-
- old_nsp = priv->current_nsp;
- priv->current_nsp = NULL;
-
- if (new_nsp)
- priv->current_nsp = g_object_ref (new_nsp);
-
- if (old_nsp && new_nsp) {
- path_changed = (g_strcmp0 (nm_wimax_nsp_get_dbus_path (old_nsp),
- nm_wimax_nsp_get_dbus_path (new_nsp)) != 0);
- }
-
- /* Only notify if it's really changed */
- if (old_nsp != new_nsp || path_changed)
- g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_ACTIVE_NSP);
-
- if (old_nsp)
- g_object_unref (old_nsp);
-}
-
-static gboolean
-activation_timed_out (gpointer data)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (data);
-
- priv->activation_timeout_id = 0;
- nm_device_state_changed (NM_DEVICE (data), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_CONFIG_FAILED);
-
- return FALSE;
-}
-
-static void
-emit_nsp_added_removed (NMDeviceWimax *self,
- guint signum,
- NMWimaxNsp *nsp,
- gboolean recheck_available_connections)
-{
- g_signal_emit (self, signals[signum], 0, nsp);
- g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_NSPS);
- nm_device_emit_recheck_auto_activate (NM_DEVICE (self));
- if (recheck_available_connections)
- nm_device_recheck_available_connections (NM_DEVICE (self));
-}
-
-static void
-remove_all_nsps (NMDeviceWimax *self)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- set_current_nsp (self, NULL);
-
- while (priv->nsp_list) {
- NMWimaxNsp *nsp = NM_WIMAX_NSP (priv->nsp_list->data);
-
- priv->nsp_list = g_slist_remove (priv->nsp_list, nsp);
- emit_nsp_added_removed (self, NSP_REMOVED, nsp, FALSE);
- g_object_unref (nsp);
- }
-
- nm_device_recheck_available_connections (NM_DEVICE (self));
-}
-
-static NMWimaxNsp *
-get_nsp_by_name (NMDeviceWimax *self, const char *name)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- GSList *iter;
-
- g_return_val_if_fail (name, NULL);
-
- for (iter = priv->nsp_list; iter; iter = iter->next) {
- NMWimaxNsp *nsp = NM_WIMAX_NSP (iter->data);
-
- if (!g_strcmp0 (nm_wimax_nsp_get_name (nsp), name))
- return nsp;
- }
-
- return NULL;
-}
-
-static NMWimaxNsp *
-get_nsp_by_path (NMDeviceWimax *self, const char *path)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- GSList *iter;
-
- g_return_val_if_fail (path, NULL);
-
- for (iter = priv->nsp_list; iter; iter = iter->next) {
- NMWimaxNsp *nsp = NM_WIMAX_NSP (iter->data);
-
- if (!strcmp (nm_wimax_nsp_get_dbus_path (nsp), path))
- return nsp;
- }
-
- return NULL;
-}
-
-static gboolean
-update_availability (NMDeviceWimax *self, gboolean old_available)
-{
- NMDevice *device = NM_DEVICE (self);
- NMDeviceState state;
- gboolean new_available, changed = FALSE;
-
- new_available = nm_device_is_available (device, NM_DEVICE_CHECK_DEV_AVAILABLE_NONE);
- if (new_available == old_available)
- return FALSE;
-
- state = nm_device_get_state (device);
- if (state == NM_DEVICE_STATE_UNAVAILABLE) {
- if (new_available == TRUE) {
- nm_device_state_changed (device,
- NM_DEVICE_STATE_DISCONNECTED,
- NM_DEVICE_STATE_REASON_NONE);
- changed = TRUE;
- }
- } else if (state >= NM_DEVICE_STATE_DISCONNECTED) {
- if (new_available == FALSE) {
- nm_device_state_changed (device,
- NM_DEVICE_STATE_UNAVAILABLE,
- NM_DEVICE_STATE_REASON_NONE);
- changed = TRUE;
- }
- }
-
- return changed;
-}
-
-/* NMDeviceInterface interface */
-
-static void
-set_enabled (NMDevice *device, gboolean enabled)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (device);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- gboolean old_available;
- int ret;
- const char *iface;
-
- iface = nm_device_get_iface (NM_DEVICE (self));
-
- nm_log_dbg (LOGD_WIMAX, "(%s): setting radio enabled %d -> %d",
- iface, priv->enabled, enabled);
- if (priv->enabled == enabled)
- return;
-
- old_available = nm_device_is_available (NM_DEVICE (device), NM_DEVICE_CHECK_DEV_AVAILABLE_NONE);
- priv->enabled = enabled;
-
- nm_log_dbg (LOGD_WIMAX, "(%s): radio now %s",
- iface, priv->enabled ? "enabled" : "disabled");
-
- /* Set the WiMAX device RF state to the current user-specified enabled state */
- if (priv->sdk) {
- ret = iwmx_sdk_rf_state_set (priv->sdk,
- enabled ? WIMAX_API_RF_ON : WIMAX_API_RF_OFF);
- if (ret < 0 && ret != -EINPROGRESS) {
- nm_log_warn (LOGD_WIMAX, "(%s): failed to %s radio",
- iface, priv->enabled ? "enable" : "disable");
- }
- }
-
- update_availability (self, old_available);
-}
-
-/* NMDevice methods */
-
-static gboolean
-check_connection_compatible (NMDevice *device, NMConnection *connection)
-{
- NMSettingConnection *s_con;
- NMSettingWimax *s_wimax;
- const char *connection_type;
- const char *mac;
-
- if (!NM_DEVICE_CLASS (nm_device_wimax_parent_class)->check_connection_compatible (device, connection))
- return FALSE;
-
- s_con = nm_connection_get_setting_connection (connection);
- g_assert (s_con);
-
- connection_type = nm_setting_connection_get_connection_type (s_con);
- if (strcmp (connection_type, NM_SETTING_WIMAX_SETTING_NAME))
- return FALSE;
-
- s_wimax = nm_connection_get_setting_wimax (connection);
- if (!s_wimax)
- return FALSE;
-
- mac = nm_setting_wimax_get_mac_address (s_wimax);
- if (mac && !nm_utils_hwaddr_matches (mac, -1, nm_device_get_hw_address (device), -1))
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
-check_connection_available (NMDevice *device,
- NMConnection *connection,
- NMDeviceCheckConAvailableFlags flags,
- const char *specific_object)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (device);
- const GSList *ns_iter = NULL;
- NMWimaxNsp *nsp;
-
- /* a connection that is available for a certain @specific_object, MUST
- * also be available in general (without @specific_object). */
-
- if (specific_object) {
- nsp = get_nsp_by_path (NM_DEVICE_WIMAX (device), specific_object);
- return nsp ? nm_wimax_nsp_check_compatible (nsp, connection) : FALSE;
- }
-
- /* Ensure the connection applies to an NSP in the scan list */
- for (ns_iter = priv->nsp_list; ns_iter; ns_iter = ns_iter->next) {
- if (nm_wimax_nsp_check_compatible (NM_WIMAX_NSP (ns_iter->data), connection))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-complete_connection (NMDevice *device,
- NMConnection *connection,
- const char *specific_object,
- const GSList *existing_connections,
- GError **error)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (device);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- NMSettingWimax *s_wimax;
- const char *setting_mac;
- const char *hw_address;
- const char *nsp_name = NULL;
- NMWimaxNsp *nsp = NULL;
- GSList *iter;
-
- s_wimax = nm_connection_get_setting_wimax (connection);
-
- if (!specific_object) {
- /* If not given a specific object, we need at minimum an NSP name */
- if (!s_wimax) {
- g_set_error_literal (error,
- NM_DEVICE_ERROR,
- NM_DEVICE_ERROR_INVALID_CONNECTION,
- "A 'wimax' setting is required if no NSP path was given.");
- return FALSE;
- }
-
- nsp_name = nm_setting_wimax_get_network_name (s_wimax);
- if (!nsp_name || !strlen (nsp_name)) {
- g_set_error_literal (error,
- NM_DEVICE_ERROR,
- NM_DEVICE_ERROR_INVALID_CONNECTION,
- "A 'wimax' setting with a valid network name is required if no NSP path was given.");
- return FALSE;
- }
-
- /* Find a compatible NSP in the list */
- nsp = get_nsp_by_name (self, nsp_name);
-
- /* If we still don't have an NSP, then the WiMAX settings needs to be
- * fully specified by the client. Might not be able to find the NSP
- * if the scan didn't find the NSP yet.
- */
- if (!nsp) {
- if (!nm_setting_verify (NM_SETTING (s_wimax), NULL, error))
- return FALSE;
- }
- } else {
- /* Find a compatible NSP in the list */
- for (iter = priv->nsp_list; iter; iter = g_slist_next (iter)) {
- if (!strcmp (specific_object, nm_wimax_nsp_get_dbus_path (NM_WIMAX_NSP (iter->data)))) {
- nsp = NM_WIMAX_NSP (iter->data);
- break;
- }
- }
-
- if (!nsp) {
- g_set_error (error,
- NM_DEVICE_ERROR,
- NM_DEVICE_ERROR_SPECIFIC_OBJECT_NOT_FOUND,
- "The NSP %s was not in the scan list.",
- specific_object);
- return FALSE;
- }
-
- nsp_name = nm_wimax_nsp_get_name (nsp);
- }
-
- /* Add a WiMAX setting if one doesn't exist */
- if (!s_wimax) {
- s_wimax = (NMSettingWimax *) nm_setting_wimax_new ();
- nm_connection_add_setting (connection, NM_SETTING (s_wimax));
- }
-
- g_assert (nsp_name);
- nm_utils_complete_generic (connection,
- NM_SETTING_WIMAX_SETTING_NAME,
- existing_connections,
- nsp_name,
- nsp_name,
- NULL,
- TRUE);
- g_object_set (G_OBJECT (s_wimax), NM_SETTING_WIMAX_NETWORK_NAME, nsp_name, NULL);
-
- setting_mac = nm_setting_wimax_get_mac_address (s_wimax);
- hw_address = nm_device_get_hw_address (device);
- if (setting_mac) {
- /* Make sure the setting MAC (if any) matches the device's permanent MAC */
- if (!nm_utils_hwaddr_matches (setting_mac, -1, hw_address, -1)) {
- g_set_error_literal (error,
- NM_CONNECTION_ERROR,
- NM_CONNECTION_ERROR_INVALID_PROPERTY,
- _("connection does not match device"));
- g_prefix_error (error, "%s.%s: ", NM_SETTING_WIMAX_SETTING_NAME, NM_SETTING_WIMAX_MAC_ADDRESS);
- return FALSE;
- }
- } else {
- /* Lock the connection to this device by default */
- if (!nm_utils_hwaddr_matches (hw_address, -1, NULL, ETH_ALEN))
- g_object_set (G_OBJECT (s_wimax), NM_SETTING_WIMAX_MAC_ADDRESS, hw_address, NULL);
- }
-
- return TRUE;
-}
-
-static gboolean
-can_auto_connect (NMDevice *device,
- NMConnection *connection,
- char **specific_object)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (device);
- GSList *iter;
-
- if (!NM_DEVICE_CLASS (nm_device_wimax_parent_class)->can_auto_connect (device, connection, specific_object))
- return FALSE;
-
- for (iter = priv->nsp_list; iter; iter = iter->next) {
- NMWimaxNsp *nsp = NM_WIMAX_NSP (iter->data);
-
- if (nm_wimax_nsp_check_compatible (nsp, connection)) {
- *specific_object = (char *) nm_wimax_nsp_get_dbus_path (nsp);
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static gboolean
-is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (device);
-
- if (!priv->enabled)
- return FALSE;
-
- if (!priv->wimaxd_enabled)
- return FALSE;
-
- if (!nm_wimax_util_sdk_is_initialized ())
- return FALSE;
-
- if (!priv->sdk)
- return FALSE;
-
- return iwmxsdk_status_get (priv->sdk) >= WIMAX_API_DEVICE_STATUS_Ready;
-}
-
-static void
-clear_activation_timeout (NMDeviceWimax *self)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- if (priv->activation_timeout_id) {
- g_source_remove (priv->activation_timeout_id);
- priv->activation_timeout_id = 0;
- }
-
- priv->connect_failed = FALSE;
-}
-
-static void
-clear_link_timeout (NMDeviceWimax *self)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- if (priv->link_timeout_id) {
- g_source_remove (priv->link_timeout_id);
- priv->link_timeout_id = 0;
- }
-}
-
-static void
-clear_connected_poll (NMDeviceWimax *self)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- if (priv->poll_id) {
- g_source_remove (priv->poll_id);
- priv->poll_id = 0;
- }
-}
-
-static NMActStageReturn
-act_stage1_prepare (NMDevice *device, NMDeviceStateReason *reason)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (device);
- NMActRequest *req;
- GSList *iter;
- const char *path;
- NMWimaxNsp *nsp = NULL;
-
- clear_link_timeout (NM_DEVICE_WIMAX (device));
-
- *reason = NM_DEVICE_STATE_REASON_NONE;
-
- req = nm_device_get_act_request (device);
- if (!req)
- return NM_ACT_STAGE_RETURN_FAILURE;
-
- path = nm_active_connection_get_specific_object (NM_ACTIVE_CONNECTION (req));
- if (!path)
- return NM_ACT_STAGE_RETURN_FAILURE;
-
- /* Find the NSP in the scan list */
- for (iter = priv->nsp_list; iter; iter = iter->next) {
- NMWimaxNsp *candidate = NM_WIMAX_NSP (iter->data);
-
- if (!strcmp (path, nm_wimax_nsp_get_dbus_path (candidate))) {
- nsp = candidate;
- break;
- }
- }
-
- /* Couldn't find the NSP for some reason */
- if (nsp == NULL)
- return NM_ACT_STAGE_RETURN_FAILURE;
-
- set_current_nsp (NM_DEVICE_WIMAX (device), nsp);
-
- priv->prepare_done = TRUE;
-
- /* If the device is scanning, it won't connect, so we have to wait until
- * it's not scanning to proceed to stage 2.
- */
- if (priv->status == WIMAX_API_DEVICE_STATUS_Scanning)
- return NM_ACT_STAGE_RETURN_POSTPONE;
-
- return NM_ACT_STAGE_RETURN_SUCCESS;
-}
-
-static NMActStageReturn
-act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (device);
- NMConnection *connection;
- NMSettingWimax *s_wimax;
- const char *nsp_name, *iface;
- int ret;
-
- iface = nm_device_get_iface (device);
- g_assert (iface);
-
- connection = nm_device_get_connection (device);
- g_assert (connection);
-
- s_wimax = nm_connection_get_setting_wimax (connection);
- g_assert (s_wimax);
-
- nsp_name = nm_setting_wimax_get_network_name (s_wimax);
- g_assert (nsp_name);
-
- nm_log_info (LOGD_WIMAX, "(%s): connecting to NSP '%s'",
- iface, nsp_name);
-
- priv->connect_failed = FALSE;
- ret = iwmx_sdk_connect (priv->sdk, nsp_name);
- if (ret < 0 && ret != -EINPROGRESS) {
- nm_log_err (LOGD_WIMAX, "(%s): failed to connect to NSP '%s'",
- iface, nsp_name);
- *reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED;
- return NM_ACT_STAGE_RETURN_FAILURE;
- }
-
- /* FIXME: Is 40 seconds good estimation? I have no idea */
- priv->activation_timeout_id = g_timeout_add_seconds (40, activation_timed_out, device);
-
- return NM_ACT_STAGE_RETURN_POSTPONE;
-}
-
-static void
-force_disconnect (NMDeviceWimax *self, struct wmxsdk *sdk)
-{
- WIMAX_API_DEVICE_STATUS status;
- int ret;
- const char *iface;
-
- g_return_if_fail (sdk != NULL);
-
- iface = nm_device_get_iface (NM_DEVICE (self));
-
- status = iwmxsdk_status_get (sdk);
- if ((int) status < 0) {
- nm_log_err (LOGD_WIMAX, "(%s): failed to read WiMAX device status: %d",
- iface, status);
- return;
- }
-
- if ( status == WIMAX_API_DEVICE_STATUS_Connecting
- || status == WIMAX_API_DEVICE_STATUS_Data_Connected) {
- nm_log_dbg (LOGD_WIMAX, "(%s): requesting disconnect", iface);
- ret = iwmx_sdk_disconnect (sdk);
- if (ret < 0 && ret != -EINPROGRESS) {
- nm_log_err (LOGD_WIMAX, "(%s): failed to disconnect WiMAX device: %d",
- iface, ret);
- }
- }
-}
-
-static void
-deactivate (NMDevice *device)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (device);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- clear_activation_timeout (self);
- clear_link_timeout (self);
- clear_connected_poll (self);
-
- set_current_nsp (self, NULL);
-
- if (priv->sdk) {
- /* Read explicit status here just to make sure we have the most
- * up-to-date status and to ensure we disconnect if needed.
- */
- force_disconnect (self, priv->sdk);
- }
-}
-
-/*************************************************************************/
-
-static void
-wmx_state_change_cb (struct wmxsdk *wmxsdk,
- WIMAX_API_DEVICE_STATUS new_status,
- WIMAX_API_DEVICE_STATUS old_status,
- WIMAX_API_STATUS_REASON reason,
- WIMAX_API_CONNECTION_PROGRESS_INFO progress,
- void *user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- NMDeviceState state;
- const char *iface;
- gboolean old_available = FALSE;
- const char *nsp_name = NULL;
-
- iface = nm_device_get_iface (NM_DEVICE (self));
- nm_log_info (LOGD_WIMAX, "(%s): wimax state change %s -> %s (%s (%d))",
- iface,
- iwmx_sdk_dev_status_to_str (old_status),
- iwmx_sdk_dev_status_to_str (new_status),
- iwmx_sdk_con_progress_to_str (progress),
- progress);
-
- if (new_status == old_status)
- return;
-
- state = nm_device_get_state (NM_DEVICE (self));
- old_available = nm_device_is_available (NM_DEVICE (self), NM_DEVICE_CHECK_DEV_AVAILABLE_NONE);
-
- priv->status = new_status;
- if (priv->current_nsp)
- nsp_name = nm_wimax_nsp_get_name (priv->current_nsp);
-
- switch (new_status) {
- case WIMAX_API_DEVICE_STATUS_UnInitialized:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW_SW:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_HW:
- case WIMAX_API_DEVICE_STATUS_RF_OFF_SW:
- if (priv->wimaxd_enabled) {
- priv->wimaxd_enabled = FALSE;
- if (update_availability (self, old_available))
- return;
- }
- break;
- case WIMAX_API_DEVICE_STATUS_Connecting:
- case WIMAX_API_DEVICE_STATUS_Data_Connected:
- /* If for some reason we're initially connected, force a disconnect here */
- if (state < NM_DEVICE_STATE_DISCONNECTED)
- force_disconnect (self, wmxsdk);
- /* Fall through */
- case WIMAX_API_DEVICE_STATUS_Ready:
- case WIMAX_API_DEVICE_STATUS_Scanning:
- if (priv->wimaxd_enabled == FALSE) {
- priv->wimaxd_enabled = TRUE;
- if (update_availability (self, old_available))
- return;
- }
- break;
- default:
- nm_log_warn (LOGD_WIMAX, "(%s): unhandled WiMAX device state %d",
- iface, new_status);
- break;
- }
-
- /* Handle activation success and failure */
- if (nm_device_is_activating (NM_DEVICE (self))) {
- if (new_status == WIMAX_API_DEVICE_STATUS_Data_Connected) {
- /* Success */
- clear_activation_timeout (self);
-
- nm_log_info (LOGD_WIMAX, "(%s): connected to '%s'",
- iface, nsp_name);
- nm_device_activate_schedule_stage3_ip_config_start (NM_DEVICE (self));
- return;
- }
-
- if (priv->connect_failed) {
- /* Connection attempt failed */
- nm_log_info (LOGD_WIMAX, "(%s): connection to '%s' failed: (%d) %s",
- iface, nsp_name, reason, iwmx_sdk_reason_to_str (reason));
- nm_device_state_changed (NM_DEVICE (self),
- NM_DEVICE_STATE_FAILED,
- NM_DEVICE_STATE_REASON_CONFIG_FAILED);
- return;
- }
-
- /* If stage2 was postponed because the device was scanning or something,
- * then check if we need to move to stage2 now that the device might be
- * ready.
- */
- if (state == NM_DEVICE_STATE_PREPARE && priv->prepare_done) {
- if ( new_status == WIMAX_API_DEVICE_STATUS_Ready
- || new_status == WIMAX_API_DEVICE_STATUS_Connecting) {
- nm_device_activate_schedule_stage2_device_config (NM_DEVICE (self));
- return;
- }
- }
- }
-
- /* Handle disconnection */
- if (state == NM_DEVICE_STATE_ACTIVATED) {
- if ( old_status == WIMAX_API_DEVICE_STATUS_Data_Connected
- && new_status < WIMAX_API_DEVICE_STATUS_Connecting) {
-
- nm_log_info (LOGD_WIMAX, "(%s): disconnected from '%s': (%d) %s",
- iface, nsp_name, reason, iwmx_sdk_reason_to_str (reason));
-
- nm_device_state_changed (NM_DEVICE (self),
- NM_DEVICE_STATE_FAILED,
- NM_DEVICE_STATE_REASON_CONFIG_FAILED);
- }
- }
-}
-
-static gboolean
-link_timeout_cb (gpointer user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- priv->link_timeout_id = 0;
-
- nm_log_dbg (LOGD_WIMAX, "(%s): link timed out", nm_device_get_iface (NM_DEVICE (self)));
- nm_device_state_changed (NM_DEVICE (self),
- NM_DEVICE_STATE_FAILED,
- NM_DEVICE_STATE_REASON_CARRIER);
-
- return FALSE;
-}
-
-static void
-wmx_media_status_cb (struct wmxsdk *wmxsdk,
- WIMAX_API_MEDIA_STATUS new_status,
- void *user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- NMDeviceState state;
- const char *iface;
-
- iface = nm_device_get_iface (NM_DEVICE (self));
- state = nm_device_get_state (NM_DEVICE (self));
-
- nm_log_dbg (LOGD_WIMAX, "(%s): media status change to %s",
- iface, iwmx_sdk_media_status_to_str (new_status));
-
- /* We only care about media events while activated */
- if (state != NM_DEVICE_STATE_ACTIVATED)
- return;
-
- clear_link_timeout (self);
-
- switch (new_status) {
- case WIMAX_API_MEDIA_STATUS_LINK_UP:
- break;
- case WIMAX_API_MEDIA_STATUS_LINK_DOWN:
- nm_log_dbg (LOGD_WIMAX, "(%s): starting link timeout", iface);
- priv->link_timeout_id = g_timeout_add_seconds (15, link_timeout_cb, self);
- break;
- case WIMAX_API_MEDIA_STATUS_LINK_RENEW:
- nm_log_dbg (LOGD_WIMAX, "(%s): renewing DHCP lease", iface);
- if (!nm_device_dhcp4_renew (NM_DEVICE (self), TRUE)) {
- nm_device_state_changed (NM_DEVICE (self),
- NM_DEVICE_STATE_FAILED,
- NM_DEVICE_STATE_REASON_DHCP_FAILED);
- }
- break;
- default:
- nm_log_err (LOGD_WIMAX, "(%s): unhandled media status %d", iface, new_status);
- break;
- }
-}
-
-static void
-wmx_connect_result_cb (struct wmxsdk *wmxsdk,
- WIMAX_API_NETWORK_CONNECTION_RESP result,
- void *user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- if (nm_device_is_activating (NM_DEVICE (self))) {
- priv->connect_failed = (result == WIMAX_API_CONNECTION_SUCCESS);
- /* Wait for the state change so we can get the reason code; we
- * cache the connect failure so we don't have to wait for the
- * activation timeout.
- */
- }
-}
-
-static void
-remove_outdated_nsps (NMDeviceWimax *self,
- WIMAX_API_NSP_INFO_EX *nsp_list,
- guint32 list_size)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- GSList *iter;
- GSList *to_remove = NULL;
-
- for (iter = priv->nsp_list; iter; iter = iter->next) {
- NMWimaxNsp *nsp = NM_WIMAX_NSP (iter->data);
- gboolean found = FALSE;
- int i;
-
- for (i = 0; i < list_size; i++) {
- WIMAX_API_NSP_INFO_EX *info = &nsp_list[i];
-
- if (!g_strcmp0 (nm_wimax_nsp_get_name (nsp), (char *) info->NSPName)) {
- found = TRUE;
- break;
- }
- }
-
- if (!found)
- to_remove = g_slist_prepend (to_remove, nsp);
- }
-
- for (iter = to_remove; iter; iter = iter->next) {
- NMWimaxNsp *nsp = NM_WIMAX_NSP (iter->data);
-
- emit_nsp_added_removed (self, NSP_REMOVED, nsp, FALSE);
- priv->nsp_list = g_slist_remove (priv->nsp_list, nsp);
- g_object_unref (nsp);
- }
-
- if (g_slist_length(to_remove) > 0)
- nm_device_recheck_available_connections (NM_DEVICE (self));
-
- g_slist_free (to_remove);
-}
-
-static void
-wmx_scan_result_cb (struct wmxsdk *wmxsdk,
- WIMAX_API_NSP_INFO_EX *nsps,
- guint num_nsps,
- void *user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- const char *iface = nm_device_get_iface (NM_DEVICE (self));
- int i;
-
- remove_outdated_nsps (self, nsps, num_nsps);
-
- /* Add new NSPs and update existing ones */
- for (i = 0; i < num_nsps; i++) {
- WIMAX_API_NSP_INFO_EX *sdk_nsp = &nsps[i];
- const char *nsp_name = (const char *) sdk_nsp->NSPName;
- NMWimaxNspNetworkType net_type;
- guint signalq;
- NMWimaxNsp *nsp;
- gboolean new_nsp;
-
- nsp = get_nsp_by_name (self, nsp_name);
- new_nsp = (nsp == NULL);
- if (new_nsp) {
- nsp = nm_wimax_nsp_new (nsp_name);
- nm_log_dbg (LOGD_WIMAX, "(%s): new WiMAX NSP '%s'", iface, nsp_name);
- }
-
- net_type = nm_wimax_util_convert_network_type (sdk_nsp->networkType);
- if (net_type != nm_wimax_nsp_get_network_type (nsp))
- g_object_set (nsp, NM_WIMAX_NSP_NETWORK_TYPE, net_type, NULL);
-
- signalq = CLAMP (sdk_nsp->linkQuality, 0, 100);
- if (signalq != nm_wimax_nsp_get_signal_quality (nsp))
- g_object_set (nsp, NM_WIMAX_NSP_SIGNAL_QUALITY, signalq, NULL);
-
- nm_log_dbg (LOGD_WIMAX, "(%s): WiMAX NSP '%s' quality %d%% type %d",
- iface, nsp_name, sdk_nsp->linkQuality, net_type);
-
- if (new_nsp) {
- priv->nsp_list = g_slist_append (priv->nsp_list, nsp);
- nm_wimax_nsp_export_to_dbus (nsp);
- emit_nsp_added_removed (self, NSP_ADDED, nsp, TRUE);
- }
- }
-}
-
-static void
-wmx_removed_cb (struct wmxsdk *wmxsdk, void *user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- if (!priv->sdk) {
- nm_log_dbg (LOGD_WIMAX, "(%s): removed unhandled WiMAX interface", wmxsdk->ifname);
- return;
- }
-
- nm_log_dbg (LOGD_WIMAX, "(%s): removed WiMAX interface", wmxsdk->ifname);
-
- /* Clear callbacks just in case we don't hold the last reference */
- iwmx_sdk_set_callbacks (priv->sdk, NULL, NULL, NULL, NULL, NULL, NULL);
- wmxsdk_unref (priv->sdk);
- priv->sdk = NULL;
-
- priv->status = WIMAX_API_DEVICE_STATUS_UnInitialized;
- nm_device_state_changed (NM_DEVICE (self),
- NM_DEVICE_STATE_UNAVAILABLE,
- NM_DEVICE_STATE_REASON_NONE);
-}
-
-/*************************************************************************/
-
-static inline gint
-sdk_rssi_to_dbm (guint raw_rssi)
-{
- /* Values range from 0x00 to 0x53, where -123dBm is encoded as 0x00 and
- * -40dBm encoded as 0x53 in 1dB increments.
- */
- return raw_rssi - 123;
-}
-
-static inline gint
-sdk_cinr_to_db (guint raw_cinr)
-{
- /* Values range from 0x00 to 0x3F, where -10dB is encoded as 0x00 and
- * 53dB encoded as 0x3F in 1dB increments.
- */
- return raw_cinr - 10;
-}
-
-static inline gint
-sdk_tx_pow_to_dbm (guint raw_tx_pow)
-{
- /* Values range from 0x00 to 0xFF, where -84dBm is encoded as 0x00 and
- * 43.5dBm is encoded as 0xFF in 0.5dB increments. Normalize so that
- * 0 dBm == 0.
- */
- return (int) (((double) raw_tx_pow / 2.0) - 84) * 2;
-}
-
-static void
-set_link_status (NMDeviceWimax *self, WIMAX_API_LINK_STATUS_INFO_EX *link_status)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- guint center_freq = 0;
- gint conv_rssi = 0, conv_cinr = 0, conv_tx_pow = 0;
- char *new_bsid = NULL;
-
- if (link_status) {
- center_freq = link_status->centerFrequency;
- conv_rssi = sdk_rssi_to_dbm (link_status->RSSI);
- conv_cinr = sdk_cinr_to_db (link_status->CINR);
- conv_tx_pow = sdk_tx_pow_to_dbm (link_status->txPWR);
- new_bsid = nm_utils_hwaddr_ntoa (link_status->bsId, 6);
- }
-
- if (priv->center_freq != center_freq) {
- priv->center_freq = center_freq;
- g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_CENTER_FREQUENCY);
- }
-
- if (priv->rssi != conv_rssi) {
- priv->rssi = conv_rssi;
- g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_RSSI);
- }
-
- if (priv->cinr != conv_cinr) {
- priv->cinr = conv_cinr;
- g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_CINR);
- }
-
- if (priv->tx_power != conv_tx_pow) {
- priv->tx_power = conv_tx_pow;
- g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_TX_POWER);
- }
-
- if (g_strcmp0 (priv->bsid, new_bsid) != 0) {
- g_free (priv->bsid);
- priv->bsid = new_bsid;
- g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_BSID);
- } else
- g_free (new_bsid);
-}
-
-static gboolean
-connected_poll_cb (gpointer user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- WIMAX_API_CONNECTED_NSP_INFO_EX *sdk_nsp;
- WIMAX_API_LINK_STATUS_INFO_EX *link_status;
-
- g_return_val_if_fail (priv->sdk != NULL, FALSE);
-
- /* Get details of the connected NSP */
- sdk_nsp = iwmx_sdk_get_connected_network (priv->sdk);
- if (sdk_nsp) {
- const char *nsp_name = (const char *) sdk_nsp->NSPName;
- NMWimaxNsp *nsp;
-
- nsp = get_nsp_by_name (self, nsp_name);
- if (nsp) {
- NMWimaxNspNetworkType net_type;
- guint signalq;
-
- net_type = nm_wimax_util_convert_network_type (sdk_nsp->networkType);
- if (net_type != nm_wimax_nsp_get_network_type (nsp))
- g_object_set (nsp, NM_WIMAX_NSP_NETWORK_TYPE, net_type, NULL);
-
- signalq = sdk_nsp->linkQuality;
- if (signalq != nm_wimax_nsp_get_signal_quality (nsp))
- g_object_set (nsp, NM_WIMAX_NSP_SIGNAL_QUALITY, signalq, NULL);
-
- nm_log_dbg (LOGD_WIMAX, "(%s): WiMAX NSP '%s' quality %d%% type %d",
- nm_device_get_iface (NM_DEVICE (self)),
- nsp_name, sdk_nsp->linkQuality, net_type);
- }
- free (sdk_nsp);
- }
-
- /* Get details of the current radio link */
- link_status = iwmx_sdk_get_link_status_info (priv->sdk);
- if (link_status) {
- set_link_status (self, link_status);
- free (link_status);
- }
-
- return TRUE; /* reschedule */
-}
-
-static void
-device_state_changed (NMDevice *device,
- NMDeviceState new_state,
- NMDeviceState old_state,
- NMDeviceStateReason reason)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (device);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- /* Reset our stage1 (Prepare) done marker since it's only valid while in stage1 */
- priv->prepare_done = FALSE;
-
- if (new_state < NM_DEVICE_STATE_DISCONNECTED)
- remove_all_nsps (self);
-
- /* Request initial NSP list when device is first started */
- if ( new_state == NM_DEVICE_STATE_DISCONNECTED
- && old_state < NM_DEVICE_STATE_DISCONNECTED) {
- if (priv->sdk)
- iwmx_sdk_get_networks (priv->sdk);
- }
-
- if (new_state == NM_DEVICE_STATE_FAILED || new_state <= NM_DEVICE_STATE_DISCONNECTED) {
- set_current_nsp (self, NULL);
- clear_activation_timeout (self);
- }
-
- if (new_state == NM_DEVICE_STATE_ACTIVATED) {
- /* poll link quality and BSID */
- clear_connected_poll (self);
- priv->poll_id = g_timeout_add_seconds (10, connected_poll_cb, self);
- connected_poll_cb (self);
- } else {
- clear_link_timeout (self);
- clear_connected_poll (self);
- set_link_status (self, NULL);
- }
-}
-
-/*************************************************************************/
-
-static gboolean
-sdk_action_defer_cb (gpointer user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- gboolean old_available = nm_device_is_available (NM_DEVICE (self), NM_DEVICE_CHECK_DEV_AVAILABLE_NONE);
-
- NM_DEVICE_WIMAX_GET_PRIVATE (self)->sdk_action_defer_id = 0;
- update_availability (self, old_available);
- return FALSE;
-}
-
-static void
-wmx_new_sdk_cb (struct wmxsdk *sdk, void *user_data)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (user_data);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- /* We only track one wmxsdk at a time because the WiMAX SDK is pretty stupid */
- if (priv->sdk) {
- nm_log_dbg (LOGD_WIMAX, "(%s): WiMAX interface already known", sdk->ifname);
- return;
- }
-
- nm_log_dbg (LOGD_WIMAX, "(%s): new WiMAX interface (%s)", sdk->ifname, sdk->name);
-
- /* Now that we have an SDK, schedule an idle handler to start the device up */
- priv->sdk = wmxsdk_ref (sdk);
- iwmx_sdk_set_callbacks(priv->sdk,
- wmx_state_change_cb,
- wmx_media_status_cb,
- wmx_connect_result_cb,
- wmx_scan_result_cb,
- wmx_removed_cb,
- self);
- iwmx_sdk_set_fast_reconnect_enabled (priv->sdk, 0);
-
- if (!priv->sdk_action_defer_id)
- priv->sdk_action_defer_id = g_idle_add (sdk_action_defer_cb, self);
-}
-
-/*************************************************************************/
-
-NMDevice *
-nm_device_wimax_new (NMPlatformLink *platform_device)
-{
- NMDevice *device;
-
- g_return_val_if_fail (platform_device != NULL, NULL);
-
- device = (NMDevice *) g_object_new (NM_TYPE_DEVICE_WIMAX,
- NM_DEVICE_PLATFORM_DEVICE, platform_device,
- NM_DEVICE_TYPE_DESC, "WiMAX",
- NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_WIMAX,
- NM_DEVICE_RFKILL_TYPE, RFKILL_TYPE_WIMAX,
- NULL);
- if (device) {
- struct wmxsdk *sdk;
-
- nm_wimax_util_sdk_ref ();
-
- /* See if the SDK already knows about this interface */
- sdk = iwmx_sdk_get_wmxsdk_for_iface (platform_device->name);
- if (sdk)
- wmx_new_sdk_cb (sdk, device);
-
- /* If it doesn't, we want to be notified when it does */
- iwmx_sdk_new_callback_register (wmx_new_sdk_cb, device);
- }
-
- return device;
-}
-
-static void
-nm_device_wimax_init (NMDeviceWimax *self)
-{
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- priv->status = WIMAX_API_DEVICE_STATUS_UnInitialized;
-}
-
-static void
-set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- switch (prop_id) {
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (object);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
- GPtrArray *array;
- GSList *iter;
-
- switch (prop_id) {
- case PROP_NSPS:
- array = g_ptr_array_sized_new (4);
- for (iter = priv->nsp_list; iter; iter = g_slist_next (iter))
- g_ptr_array_add (array, g_strdup (nm_wimax_nsp_get_dbus_path (NM_WIMAX_NSP (iter->data))));
- g_value_take_boxed (value, array);
- break;
- case PROP_ACTIVE_NSP:
- if (priv->current_nsp)
- g_value_set_boxed (value, nm_wimax_nsp_get_dbus_path (priv->current_nsp));
- else
- g_value_set_boxed (value, "/");
- break;
- case PROP_CENTER_FREQ:
- g_value_set_uint (value, priv->center_freq);
- break;
- case PROP_RSSI:
- g_value_set_int (value, priv->rssi);
- break;
- case PROP_CINR:
- g_value_set_int (value, priv->cinr);
- break;
- case PROP_TX_POWER:
- g_value_set_int (value, priv->tx_power);
- break;
- case PROP_BSID:
- g_value_set_string (value, priv->bsid);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-dispose (GObject *object)
-{
- NMDeviceWimax *self = NM_DEVICE_WIMAX (object);
- NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
-
- if (priv->disposed)
- goto done;
-
- priv->disposed = TRUE;
-
- clear_activation_timeout (self);
- clear_link_timeout (self);
- clear_connected_poll (self);
-
- if (priv->sdk_action_defer_id)
- g_source_remove (priv->sdk_action_defer_id);
-
- if (priv->sdk) {
- iwmx_sdk_set_callbacks (priv->sdk, NULL, NULL, NULL, NULL, NULL, NULL);
- wmxsdk_unref (priv->sdk);
- }
-
- g_free (priv->bsid);
-
- set_current_nsp (self, NULL);
-
- g_slist_free_full (priv->nsp_list, g_object_unref);
-
- iwmx_sdk_new_callback_unregister (wmx_new_sdk_cb, self);
- nm_wimax_util_sdk_unref ();
-
-done:
- G_OBJECT_CLASS (nm_device_wimax_parent_class)->dispose (object);
-}
-
-static void
-nm_device_wimax_class_init (NMDeviceWimaxClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- NMDeviceClass *device_class = NM_DEVICE_CLASS (klass);
-
- g_type_class_add_private (object_class, sizeof (NMDeviceWimaxPrivate));
-
- /* Virtual methods */
- object_class->set_property = set_property;
- object_class->get_property = get_property;
- object_class->dispose = dispose;
-
- device_class->check_connection_compatible = check_connection_compatible;
- device_class->check_connection_available = check_connection_available;
- device_class->complete_connection = complete_connection;
- device_class->can_auto_connect = can_auto_connect;
- device_class->is_available = is_available;
- device_class->act_stage1_prepare = act_stage1_prepare;
- device_class->act_stage2_config = act_stage2_config;
- device_class->deactivate = deactivate;
- device_class->set_enabled = set_enabled;
-
- device_class->state_changed = device_state_changed;
-
- /* Properties */
- g_object_class_install_property
- (object_class, PROP_NSPS,
- g_param_spec_boxed (NM_DEVICE_WIMAX_NSPS, "", "",
- DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_ACTIVE_NSP,
- g_param_spec_boxed (NM_DEVICE_WIMAX_ACTIVE_NSP, "", "",
- DBUS_TYPE_G_OBJECT_PATH,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_CENTER_FREQ,
- g_param_spec_uint (NM_DEVICE_WIMAX_CENTER_FREQUENCY, "", "",
- 0, G_MAXUINT, 0,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_RSSI,
- g_param_spec_int (NM_DEVICE_WIMAX_RSSI, "", "",
- G_MININT, G_MAXINT, 0,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_CINR,
- g_param_spec_int (NM_DEVICE_WIMAX_CINR, "", "",
- G_MININT, G_MAXINT, 0,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_TX_POWER,
- g_param_spec_int (NM_DEVICE_WIMAX_TX_POWER, "", "",
- G_MININT, G_MAXINT, 0,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_BSID,
- g_param_spec_string (NM_DEVICE_WIMAX_BSID, "", "",
- NULL,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
-
- /* Signals */
- signals[NSP_ADDED] =
- g_signal_new ("nsp-added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDeviceWimaxClass, nsp_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1,
- G_TYPE_OBJECT);
-
- signals[NSP_REMOVED] =
- g_signal_new ("nsp-removed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (NMDeviceWimaxClass, nsp_removed),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1,
- G_TYPE_OBJECT);
-
- nm_dbus_manager_register_exported_type (nm_dbus_manager_get (),
- G_TYPE_FROM_CLASS (klass),
- &dbus_glib_nm_device_wimax_object_info);
-}
diff --git a/src/devices/wimax/nm-device-wimax.h b/src/devices/wimax/nm-device-wimax.h
deleted file mode 100644
index 30b2481ffc..0000000000
--- a/src/devices/wimax/nm-device-wimax.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2010 - 2011 Red Hat, Inc.
- * Copyright (C) 2009 Novell, Inc.
- */
-
-#ifndef __NETWORKMANAGER_DEVICE_WIMAX_H__
-#define __NETWORKMANAGER_DEVICE_WIMAX_H__
-
-#include "nm-device.h"
-#include "nm-wimax-nsp.h"
-
-G_BEGIN_DECLS
-
-#define NM_TYPE_DEVICE_WIMAX (nm_device_wimax_get_type ())
-#define NM_DEVICE_WIMAX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_WIMAX, NMDeviceWimax))
-#define NM_DEVICE_WIMAX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxClass))
-#define NM_IS_DEVICE_WIMAX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_WIMAX))
-#define NM_IS_DEVICE_WIMAX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_WIMAX))
-#define NM_DEVICE_WIMAX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxClass))
-
-#define NM_DEVICE_WIMAX_NSPS "nsps"
-#define NM_DEVICE_WIMAX_ACTIVE_NSP "active-nsp"
-#define NM_DEVICE_WIMAX_CENTER_FREQUENCY "center-frequency"
-#define NM_DEVICE_WIMAX_RSSI "rssi"
-#define NM_DEVICE_WIMAX_CINR "cinr"
-#define NM_DEVICE_WIMAX_TX_POWER "tx-power"
-#define NM_DEVICE_WIMAX_BSID "bsid"
-
-typedef struct {
- NMDevice parent;
-} NMDeviceWimax;
-
-typedef struct {
- NMDeviceClass parent;
-
- /* Signals */
- void (*nsp_added) (NMDeviceWimax *wimax, NMWimaxNsp *nsp);
- void (*nsp_removed) (NMDeviceWimax *wimax, NMWimaxNsp *nsp);
- void (*properties_changed) (NMDeviceWimax *wimax, GHashTable *properties);
-} NMDeviceWimaxClass;
-
-GType nm_device_wimax_get_type (void);
-
-NMDevice *nm_device_wimax_new (NMPlatformLink *platform_device);
-
-G_END_DECLS
-
-#endif /* NM_DEVICE_WIMAX_H */
diff --git a/src/devices/wimax/nm-wimax-factory.c b/src/devices/wimax/nm-wimax-factory.c
deleted file mode 100644
index 39e9a28738..0000000000
--- a/src/devices/wimax/nm-wimax-factory.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2011 - 2014 Red Hat, Inc.
- */
-
-#include "config.h"
-
-#include <gmodule.h>
-
-#include "nm-device-factory.h"
-#include "nm-device-wimax.h"
-#include "nm-platform.h"
-
-#define NM_TYPE_WIMAX_FACTORY (nm_wimax_factory_get_type ())
-#define NM_WIMAX_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_WIMAX_FACTORY, NMWimaxFactory))
-
-typedef struct {
- GObject parent;
-} NMWimaxFactory;
-
-typedef struct {
- GObjectClass parent;
-} NMWimaxFactoryClass;
-
-static GType nm_wimax_factory_get_type (void);
-
-static void device_factory_interface_init (NMDeviceFactory *factory_iface);
-
-G_DEFINE_TYPE_EXTENDED (NMWimaxFactory, nm_wimax_factory, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_FACTORY, device_factory_interface_init))
-
-/**************************************************************************/
-
-G_MODULE_EXPORT NMDeviceFactory *
-nm_device_factory_create (GError **error)
-{
- return (NMDeviceFactory *) g_object_new (NM_TYPE_WIMAX_FACTORY, NULL);
-}
-
-/**************************************************************************/
-
-static NMDevice *
-new_link (NMDeviceFactory *factory, NMPlatformLink *plink, GError **error)
-{
- /* FIXME: check udev 'DEVTYPE' instead; but since we only support Intel
- * WiMAX devices for now this is appropriate.
- */
- if (g_strcmp0 (plink->driver, "i2400m_usb") != 0)
- return NULL; /* unsupported */
-
- return (NMDevice *) nm_device_wimax_new (plink);
-}
-
-static NMDeviceType
-get_device_type (NMDeviceFactory *factory)
-{
- return NM_DEVICE_TYPE_WIMAX;
-}
-
-static void
-device_factory_interface_init (NMDeviceFactory *factory_iface)
-{
- factory_iface->new_link = new_link;
- factory_iface->get_device_type = get_device_type;
-}
-
-static void
-nm_wimax_factory_init (NMWimaxFactory *factory)
-{
-}
-
-static void
-nm_wimax_factory_class_init (NMWimaxFactoryClass *wf_class)
-{
-}
-
diff --git a/src/devices/wimax/nm-wimax-nsp.c b/src/devices/wimax/nm-wimax-nsp.c
deleted file mode 100644
index f4db63f028..0000000000
--- a/src/devices/wimax/nm-wimax-nsp.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2010 - 2012 Red Hat, Inc.
- * Copyright (C) 2009 Novell, Inc.
- */
-
-#include "config.h"
-
-#include "nm-wimax-nsp.h"
-#include "nm-dbus-interface.h"
-#include "nm-dbus-manager.h"
-#include "nm-setting-wimax.h"
-#include "nm-wimax-nsp-glue.h"
-#include "nm-utils.h"
-
-G_DEFINE_TYPE (NMWimaxNsp, nm_wimax_nsp, G_TYPE_OBJECT)
-
-enum {
- PROP_0,
-
- PROP_NAME,
- PROP_SIGNAL_QUALITY,
- PROP_NETWORK_TYPE,
-
- LAST_PROP
-};
-
-#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_WIMAX_NSP, NMWimaxNspPrivate))
-
-typedef struct {
- char *dbus_path;
-
- char *name;
- guint32 signal_quality;
- NMWimaxNspNetworkType network_type;
-} NMWimaxNspPrivate;
-
-NMWimaxNsp *
-nm_wimax_nsp_new (const char *name)
-{
- g_return_val_if_fail (name != NULL, NULL);
-
- return NM_WIMAX_NSP (g_object_new (NM_TYPE_WIMAX_NSP,
- NM_WIMAX_NSP_NAME, name,
- NULL));
-}
-
-const char *
-nm_wimax_nsp_get_name (NMWimaxNsp *self)
-{
- g_return_val_if_fail (NM_IS_WIMAX_NSP (self), NULL);
-
- return GET_PRIVATE (self)->name;
-}
-
-guint32
-nm_wimax_nsp_get_signal_quality (NMWimaxNsp *self)
-{
- g_return_val_if_fail (NM_IS_WIMAX_NSP (self), 0);
-
- return GET_PRIVATE (self)->signal_quality;
-}
-
-NMWimaxNspNetworkType
-nm_wimax_nsp_get_network_type (NMWimaxNsp *self)
-{
- g_return_val_if_fail (NM_IS_WIMAX_NSP (self), 0);
-
- return GET_PRIVATE (self)->network_type;
-}
-
-void
-nm_wimax_nsp_export_to_dbus (NMWimaxNsp *self)
-{
- NMWimaxNspPrivate *priv;
- static guint32 counter = 0;
-
- g_return_if_fail (NM_IS_WIMAX_NSP (self));
-
- priv = GET_PRIVATE (self);
-
- g_return_if_fail (priv->dbus_path == NULL);
-
- priv->dbus_path = g_strdup_printf (NM_DBUS_PATH_WIMAX_NSP "/%d", counter++);
- nm_dbus_manager_register_object (nm_dbus_manager_get (), priv->dbus_path, self);
-}
-
-const char *
-nm_wimax_nsp_get_dbus_path (NMWimaxNsp *self)
-{
- g_return_val_if_fail (NM_IS_WIMAX_NSP (self), NULL);
-
- return GET_PRIVATE (self)->dbus_path;
-}
-
-gboolean
-nm_wimax_nsp_check_compatible (NMWimaxNsp *self,
- NMConnection *connection)
-{
- NMWimaxNspPrivate *priv;
- NMSettingWimax *s_wimax;
-
- g_return_val_if_fail (NM_IS_WIMAX_NSP (self), FALSE);
- g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
-
- priv = GET_PRIVATE (self);
-
- s_wimax = nm_connection_get_setting_wimax (connection);
- if (!s_wimax)
- return FALSE;
-
- return g_strcmp0 (nm_wimax_nsp_get_name (self), nm_setting_wimax_get_network_name (s_wimax)) == 0;
-}
-
-static void
-nm_wimax_nsp_init (NMWimaxNsp *self)
-{
-}
-
-static void
-set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- NMWimaxNspPrivate *priv = GET_PRIVATE (object);
- guint32 quality;
- guint network_type;
-
- switch (prop_id) {
- case PROP_NAME:
- /* Construct only */
- priv->name = g_value_dup_string (value);
- break;
- case PROP_SIGNAL_QUALITY:
- quality = g_value_get_uint (value);
- if (quality != priv->signal_quality) {
- priv->signal_quality = CLAMP (quality, 0, 100);
- g_object_notify (object, NM_WIMAX_NSP_SIGNAL_QUALITY);
- }
- break;
- case PROP_NETWORK_TYPE:
- network_type = g_value_get_uint (value);
- if (network_type != priv->network_type) {
- priv->network_type = network_type;
- g_object_notify (object, NM_WIMAX_NSP_NETWORK_TYPE);
- }
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
-{
- NMWimaxNsp *self = NM_WIMAX_NSP (object);
-
- switch (prop_id) {
- case PROP_NAME:
- g_value_set_string (value, nm_wimax_nsp_get_name (self));
- break;
- case PROP_SIGNAL_QUALITY:
- g_value_set_uint (value, nm_wimax_nsp_get_signal_quality (self));
- break;
- case PROP_NETWORK_TYPE:
- g_value_set_uint (value, nm_wimax_nsp_get_network_type (self));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-finalize (GObject *object)
-{
- NMWimaxNspPrivate *priv = GET_PRIVATE (object);
-
- g_free (priv->name);
- g_free (priv->dbus_path);
-
- G_OBJECT_CLASS (nm_wimax_nsp_parent_class)->finalize (object);
-}
-
-static void
-nm_wimax_nsp_class_init (NMWimaxNspClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- g_type_class_add_private (object_class, sizeof (NMWimaxNspPrivate));
-
- /* Virtual methods */
- object_class->set_property = set_property;
- object_class->get_property = get_property;
- object_class->finalize = finalize;
-
- g_object_class_install_property
- (object_class, PROP_NAME,
- g_param_spec_string (NM_WIMAX_NSP_NAME, "", "",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_SIGNAL_QUALITY,
- g_param_spec_uint (NM_WIMAX_NSP_SIGNAL_QUALITY, "", "",
- 0,
- 100,
- 0,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property
- (object_class, PROP_NETWORK_TYPE,
- g_param_spec_uint (NM_WIMAX_NSP_NETWORK_TYPE, "", "",
- NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN,
- NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER,
- NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
-
- nm_dbus_manager_register_exported_type (nm_dbus_manager_get (),
- G_TYPE_FROM_CLASS (klass),
- &dbus_glib_nm_wimax_nsp_object_info);
-}
diff --git a/src/devices/wimax/nm-wimax-nsp.h b/src/devices/wimax/nm-wimax-nsp.h
deleted file mode 100644
index 8d0a6a14b3..0000000000
--- a/src/devices/wimax/nm-wimax-nsp.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2009 Novell, Inc.
- */
-
-#ifndef __NETWORKMANAGER_WIMAX_NSP_H__
-#define __NETWORKMANAGER_WIMAX_NSP_H__
-
-#include <glib-object.h>
-#include "nm-wimax-types.h"
-#include "nm-connection.h"
-
-#define NM_TYPE_WIMAX_NSP (nm_wimax_nsp_get_type ())
-#define NM_WIMAX_NSP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_WIMAX_NSP, NMWimaxNsp))
-#define NM_WIMAX_NSP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_WIMAX_NSP, NMWimaxNspClass))
-#define NM_IS_WIMAX_NSP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_WIMAX_NSP))
-#define NM_IS_WIMAX_NSP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_WIMAX_NSP))
-#define NM_WIMAX_NSP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_WIMAX_NSP, NMWimaxNspClass))
-
-#define NM_WIMAX_NSP_NAME "name"
-#define NM_WIMAX_NSP_SIGNAL_QUALITY "signal-quality"
-#define NM_WIMAX_NSP_NETWORK_TYPE "network-type"
-
-typedef struct {
- GObject parent;
-} NMWimaxNsp;
-
-typedef struct {
- GObjectClass parent;
-
- /* Signals */
- void (*properties_changed) (NMWimaxNsp *nsp, GHashTable *properties);
-} NMWimaxNspClass;
-
-GType nm_wimax_nsp_get_type (void);
-
-NMWimaxNsp *nm_wimax_nsp_new (const char *name);
-const char *nm_wimax_nsp_get_name (NMWimaxNsp *self);
-guint32 nm_wimax_nsp_get_signal_quality (NMWimaxNsp *self);
-NMWimaxNspNetworkType nm_wimax_nsp_get_network_type (NMWimaxNsp *self);
-
-void nm_wimax_nsp_export_to_dbus (NMWimaxNsp *self);
-const char *nm_wimax_nsp_get_dbus_path (NMWimaxNsp *self);
-
-gboolean nm_wimax_nsp_check_compatible (NMWimaxNsp *self,
- NMConnection *connection);
-
-#endif /* NM_WIMAX_NSP_H */
diff --git a/src/devices/wimax/nm-wimax-types.h b/src/devices/wimax/nm-wimax-types.h
deleted file mode 100644
index 207d2477ae..0000000000
--- a/src/devices/wimax/nm-wimax-types.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2009 Novell, Inc.
- */
-
-#ifndef __NETWORKMANAGER_WIMAX_TYPES_H__
-#define __NETWORKMANAGER_WIMAX_TYPES_H__
-
-typedef enum {
- NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN,
- NM_WIMAX_NSP_NETWORK_TYPE_HOME,
- NM_WIMAX_NSP_NETWORK_TYPE_PARTNER,
- NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER
-} NMWimaxNspNetworkType;
-
-#endif /* NM_WIMAX_TYPES_H */
diff --git a/src/devices/wimax/nm-wimax-util.c b/src/devices/wimax/nm-wimax-util.c
deleted file mode 100644
index 0ae285aed1..0000000000
--- a/src/devices/wimax/nm-wimax-util.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2009 Novell, Inc.
- */
-
-#include "config.h"
-
-#include "nm-wimax-util.h"
-#include "nm-utils.h"
-#include "iwmxsdk.h"
-#include "nm-logging.h"
-
-static guint sdk_refcount = 0;
-
-void
-nm_wimax_util_sdk_ref (void)
-{
- int ret = 0;
-
- if (sdk_refcount == 0) {
- ret = iwmx_sdk_api_init ();
- if (ret != 0) {
- nm_log_warn (LOGD_WIMAX, "Failed to initialize WiMAX: %d", ret);
- return;
- }
- }
- sdk_refcount++;
-}
-
-gboolean
-nm_wimax_util_sdk_is_initialized (void)
-{
- return sdk_refcount > 0;
-}
-
-void
-nm_wimax_util_sdk_unref (void)
-{
- g_return_if_fail (sdk_refcount > 0);
-
- sdk_refcount--;
- if (sdk_refcount == 0)
- iwmx_sdk_api_exit ();
-}
-
-NMWimaxNspNetworkType
-nm_wimax_util_convert_network_type (WIMAX_API_NETWORK_TYPE wimax_network_type)
-{
- NMWimaxNspNetworkType type;
-
- switch (wimax_network_type) {
- case WIMAX_API_HOME:
- type = NM_WIMAX_NSP_NETWORK_TYPE_HOME;
- break;
- case WIMAX_API_PARTNER:
- type = NM_WIMAX_NSP_NETWORK_TYPE_PARTNER;
- break;
- case WIMAX_API_ROAMING_PARTNER:
- type = NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER;
- break;
- default:
- type = NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN;
- break;
- }
-
- return type;
-}
-
diff --git a/src/devices/wimax/nm-wimax-util.h b/src/devices/wimax/nm-wimax-util.h
deleted file mode 100644
index a1852d553f..0000000000
--- a/src/devices/wimax/nm-wimax-util.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright (C) 2009 Novell, Inc.
- */
-
-#ifndef __NETWORKMANAGER_WIMAX_UTIL_H__
-#define __NETWORKMANAGER_WIMAX_UTIL_H__
-
-#include <glib.h>
-
-#include "nm-utils-internal.h"
-
-NM_PRAGMA_WARNING_DISABLE("-Wstrict-prototypes")
-#include <WiMaxType.h>
-NM_PRAGMA_WARNING_REENABLE
-
-#include <WiMaxError.h>
-#include "nm-wimax-types.h"
-
-void nm_wimax_util_sdk_ref (void);
-
-gboolean nm_wimax_util_sdk_is_initialized (void);
-
-void nm_wimax_util_sdk_unref (void);
-
-NMWimaxNspNetworkType nm_wimax_util_convert_network_type (WIMAX_API_NETWORK_TYPE wimax_network_type);
-
-#endif /* NM_WIMAX_UTIL_H */
diff --git a/src/nm-logging.c b/src/nm-logging.c
index 1e9d422f2a..d4bbbe3b2c 100644
--- a/src/nm-logging.c
+++ b/src/nm-logging.c
@@ -89,7 +89,6 @@ static const LogDesc domain_descs[] = {
{ LOGD_CORE, "CORE" },
{ LOGD_DEVICE, "DEVICE" },
{ LOGD_OLPC, "OLPC" },
- { LOGD_WIMAX, "WIMAX" },
{ LOGD_INFINIBAND,"INFINIBAND" },
{ LOGD_FIREWALL, "FIREWALL" },
{ LOGD_ADSL, "ADSL" },
@@ -206,6 +205,8 @@ nm_logging_setup (const char *level,
/* Check for compatibility domains */
else if (!g_ascii_strcasecmp (*iter, "HW"))
bits = LOGD_PLATFORM;
+ else if (!g_ascii_strcasecmp (*iter, "WIMAX"))
+ continue;
else {
for (diter = &domain_descs[0]; diter->name; diter++) {
diff --git a/src/nm-logging.h b/src/nm-logging.h
index 4ae9c02687..4bdac3fe15 100644
--- a/src/nm-logging.h
+++ b/src/nm-logging.h
@@ -57,18 +57,17 @@ typedef enum { /*< skip >*/
LOGD_CORE = (1LL << 20), /* Core daemon and policy stuff */
LOGD_DEVICE = (1LL << 21), /* Device state and activation */
LOGD_OLPC = (1LL << 22),
- LOGD_WIMAX = (1LL << 23),
- LOGD_INFINIBAND = (1LL << 24),
- LOGD_FIREWALL = (1LL << 25),
- LOGD_ADSL = (1LL << 26),
- LOGD_BOND = (1LL << 27),
- LOGD_VLAN = (1LL << 28),
- LOGD_BRIDGE = (1LL << 29),
- LOGD_DBUS_PROPS = (1LL << 30),
- LOGD_TEAM = (1LL << 31),
- LOGD_CONCHECK = (1LL << 32),
- LOGD_DCB = (1LL << 33), /* Data Center Bridging */
- LOGD_DISPATCH = (1LL << 34),
+ LOGD_INFINIBAND = (1LL << 23),
+ LOGD_FIREWALL = (1LL << 24),
+ LOGD_ADSL = (1LL << 25),
+ LOGD_BOND = (1LL << 26),
+ LOGD_VLAN = (1LL << 27),
+ LOGD_BRIDGE = (1LL << 28),
+ LOGD_DBUS_PROPS = (1LL << 29),
+ LOGD_TEAM = (1LL << 30),
+ LOGD_CONCHECK = (1LL << 31),
+ LOGD_DCB = (1LL << 32), /* Data Center Bridging */
+ LOGD_DISPATCH = (1LL << 33),
__LOGD_MAX,
LOGD_ALL = ((__LOGD_MAX - 1LL) << 1) - 1LL,
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 704296d3cb..185d8e35be 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -2199,7 +2199,6 @@ platform_link_added (NMManager *self,
case NM_LINK_TYPE_OLPC_MESH:
case NM_LINK_TYPE_TEAM:
case NM_LINK_TYPE_WIFI:
- case NM_LINK_TYPE_WIMAX:
nm_log_info (LOGD_HW, "(%s): '%s' plugin not available; creating generic device",
plink->name, plink->type_name);
/* fall through */