summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2015-04-06 13:04:54 -0500
committerDan Williams <dcbw@redhat.com>2015-04-10 10:17:45 -0500
commit227de48a910f1708ba6275fa5a256824b3bb07ab (patch)
treeab3cea79b6b2748059d1f28edc45aef23d927273
parent85aac315c042914a333a99b841095318c1a81e7f (diff)
downloadNetworkManager-227de48a910f1708ba6275fa5a256824b3bb07ab.tar.gz
wifi: remove unused AP 'broadcast' property
Nothing ever read the value.
-rw-r--r--src/devices/wifi/nm-device-wifi.c5
-rw-r--r--src/devices/wifi/nm-wifi-ap.c25
-rw-r--r--src/devices/wifi/nm-wifi-ap.h3
3 files changed, 1 insertions, 32 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index ae3c91bbd7..1361bd89dd 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -1506,7 +1506,6 @@ merge_scanned_ap (NMDeviceWifi *self,
/* Yay, matched it, no longer treat as hidden */
_LOGD (LOGD_WIFI_SCAN, "matched hidden AP %s => '%s'",
str_if_set (bssid, "(none)"), nm_utils_escape_ssid (ssid->data, ssid->len));
- nm_ap_set_broadcast (merge_ap, FALSE);
} else {
/* Didn't have an entry for this AP in the database */
_LOGD (LOGD_WIFI_SCAN, "failed to match hidden AP %s",
@@ -2481,9 +2480,7 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *reason)
ap = nm_ap_new_fake_from_connection (connection);
g_return_val_if_fail (ap != NULL, NM_ACT_STAGE_RETURN_FAILURE);
- if (nm_ap_get_mode (ap) == NM_802_11_MODE_INFRA)
- nm_ap_set_broadcast (ap, FALSE);
- else if (nm_ap_is_hotspot (ap))
+ if (nm_ap_is_hotspot (ap))
nm_ap_set_address (ap, nm_device_get_hw_address (device));
nm_ap_export_to_dbus (ap);
diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
index 107cac77ed..91b3bcb355 100644
--- a/src/devices/wifi/nm-wifi-ap.c
+++ b/src/devices/wifi/nm-wifi-ap.c
@@ -62,7 +62,6 @@ typedef struct
/* Non-scanned attributes */
gboolean fake; /* Whether or not the AP is from a scan */
gboolean hotspot; /* Whether the AP is a local device's hotspot network */
- gboolean broadcast; /* Whether or not the AP is broadcasting (hidden) */
gint32 last_seen; /* Timestamp when the AP was seen lastly (obtained via nm_utils_get_monotonic_timestamp_s()) */
} NMAccessPointPrivate;
@@ -94,7 +93,6 @@ nm_ap_init (NMAccessPoint *ap)
priv->flags = NM_802_11_AP_FLAGS_NONE;
priv->wpa_flags = NM_802_11_AP_SEC_NONE;
priv->rsn_flags = NM_802_11_AP_SEC_NONE;
- priv->broadcast = TRUE;
}
static void
@@ -420,9 +418,6 @@ nm_ap_update_from_properties (NMAccessPoint *ap,
g_variant_unref (v);
}
- if (!nm_ap_get_ssid (ap))
- nm_ap_set_broadcast (ap, FALSE);
-
v = g_variant_lookup_value (properties, "BSSID", G_VARIANT_TYPE_BYTESTRING);
if (v) {
bytes = g_variant_get_fixed_array (v, &len, 1);
@@ -1051,26 +1046,6 @@ void nm_ap_set_fake (NMAccessPoint *ap, gboolean fake)
NM_AP_GET_PRIVATE (ap)->fake = fake;
}
-
-/*
- * Get/Set functions to indicate whether an AP broadcasts its SSID.
- */
-gboolean nm_ap_get_broadcast (NMAccessPoint *ap)
-{
- g_return_val_if_fail (NM_IS_AP (ap), TRUE);
-
- return NM_AP_GET_PRIVATE (ap)->broadcast;
-}
-
-
-void nm_ap_set_broadcast (NMAccessPoint *ap, gboolean broadcast)
-{
- g_return_if_fail (NM_IS_AP (ap));
-
- NM_AP_GET_PRIVATE (ap)->broadcast = broadcast;
-}
-
-
/*
* Get/Set functions for how long ago the AP was last seen in a scan.
* APs older than a certain date are dropped from the list.
diff --git a/src/devices/wifi/nm-wifi-ap.h b/src/devices/wifi/nm-wifi-ap.h
index 84e5fa34e3..bcbf7eea0e 100644
--- a/src/devices/wifi/nm-wifi-ap.h
+++ b/src/devices/wifi/nm-wifi-ap.h
@@ -104,9 +104,6 @@ void nm_ap_set_max_bitrate (NMAccessPoint *ap, guint32 bitrate);
gboolean nm_ap_get_fake (const NMAccessPoint *ap);
void nm_ap_set_fake (NMAccessPoint *ap, gboolean fake);
-gboolean nm_ap_get_broadcast (NMAccessPoint *ap);
-void nm_ap_set_broadcast (NMAccessPoint *ap, gboolean broadcast);
-
gint32 nm_ap_get_last_seen (const NMAccessPoint *ap);
void nm_ap_set_last_seen (NMAccessPoint *ap, gint32 last_seen);