wifi: remove unused AP 'broadcast' property

Nothing ever read the value.
This commit is contained in:
Dan Williams 2015-04-06 13:04:54 -05:00
parent 85aac315c0
commit 227de48a91
3 changed files with 1 additions and 32 deletions

View file

@ -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);

View file

@ -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.

View file

@ -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);