X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev-linux.c;h=cc86ec6b4ca799665cd26b567180a9837b0ceef9;hb=15aee11695811c70efd8b7d3dab11625b4dd59f2;hp=55f676a5fbda1083922c3c0a4a880b7aafeff056;hpb=2e5ae318d522ce2cf2c6424958f27fce4f8b7ae7;p=sliver-openvswitch.git diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 55f676a5f..cc86ec6b4 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -557,9 +557,10 @@ netdev_linux_cache_cb(const struct rtnetlink_link_change *change, shash_init(&device_shash); netdev_get_devices(&netdev_linux_class, &device_shash); SHASH_FOR_EACH (node, &device_shash) { + struct netdev *netdev = node->data; unsigned int flags; - dev = node->data; + dev = netdev_linux_cast(netdev); get_flags(&dev->up, &flags); netdev_linux_changed(dev, flags, 0); @@ -1194,7 +1195,8 @@ netdev_linux_miimon_run(void) shash_init(&device_shash); netdev_get_devices(&netdev_linux_class, &device_shash); SHASH_FOR_EACH (node, &device_shash) { - struct netdev_linux *dev = node->data; + struct netdev *netdev = node->data; + struct netdev_linux *dev = netdev_linux_cast(netdev); bool miimon; if (dev->miimon_interval <= 0 || !timer_expired(&dev->miimon_timer)) { @@ -1222,7 +1224,8 @@ netdev_linux_miimon_wait(void) shash_init(&device_shash); netdev_get_devices(&netdev_linux_class, &device_shash); SHASH_FOR_EACH (node, &device_shash) { - struct netdev_linux *dev = node->data; + struct netdev *netdev = node->data; + struct netdev_linux *dev = netdev_linux_cast(netdev); if (dev->miimon_interval > 0) { timer_wait(&dev->miimon_timer); @@ -1421,8 +1424,7 @@ netdev_linux_get_stats(const struct netdev *netdev_, /* Retrieves current device stats for 'netdev-tap' netdev or * netdev-internal. */ static int -netdev_tap_get_stats(const struct netdev *netdev_, - struct netdev_stats *stats) +netdev_tap_get_stats(const struct netdev *netdev_, struct netdev_stats *stats) { struct netdev_linux *netdev = netdev_linux_cast(netdev_); struct netdev_stats dev_stats;