aboutsummaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-10-14 15:17:19 -0700
committerEthan Jackson <ethan@nicira.com>2011-10-17 15:03:03 -0700
commita5d6fc245ed1e3e0796a82e947f5ce638becd4ef (patch)
tree43f976042896d64849dcedfc3dfbfdad76026e87 /vswitchd
parent1a37fdc4444d57dd20b5d7a180e68f9e7195d164 (diff)
vswitchd: Remove iface_get_carrier().
It has only one caller, and doesn't improve the code's readability.
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/bridge.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 4e2833e0..aa9969bb 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -201,7 +201,6 @@ static void iface_configure_cfm(struct iface *);
static void iface_refresh_cfm_stats(struct iface *);
static void iface_refresh_stats(struct iface *);
static void iface_refresh_status(struct iface *);
-static bool iface_get_carrier(const struct iface *);
static bool iface_is_synthetic(const struct iface *);
static void shash_from_ovs_idl_map(char **keys, char **values, size_t n,
@@ -1276,7 +1275,9 @@ iface_refresh_status(struct iface *iface)
}
ovsrec_interface_set_link_state(iface->cfg,
- iface_get_carrier(iface) ? "up" : "down");
+ (netdev_get_carrier(iface->netdev)
+ ? "up"
+ : "down"));
error = netdev_get_mtu(iface->netdev, &mtu);
if (!error) {
@@ -2700,17 +2701,6 @@ iface_configure_cfm(struct iface *iface)
ofproto_port_set_cfm(iface->port->bridge->ofproto, iface->ofp_port, &s);
}
-/* Read carrier or miimon status directly from 'iface''s netdev, according to
- * how 'iface''s port is configured.
- *
- * Returns true if 'iface' is up, false otherwise. */
-static bool
-iface_get_carrier(const struct iface *iface)
-{
- /* XXX */
- return netdev_get_carrier(iface->netdev);
-}
-
/* Returns true if 'iface' is synthetic, that is, if we constructed it locally
* instead of obtaining it from the database. */
static bool