diff options
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r-- | drivers/net/xen-netfront.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 226faab23603..0a59c57864f5 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -201,7 +201,7 @@ static void xennet_sysfs_delif(struct net_device *netdev); #define xennet_sysfs_delif(dev) do { } while (0) #endif -static int xennet_can_sg(struct net_device *dev) +static bool xennet_can_sg(struct net_device *dev) { return dev->features & NETIF_F_SG; } @@ -1190,7 +1190,8 @@ static void xennet_uninit(struct net_device *dev) gnttab_free_grant_references(np->gref_rx_head); } -static u32 xennet_fix_features(struct net_device *dev, u32 features) +static netdev_features_t xennet_fix_features(struct net_device *dev, + netdev_features_t features) { struct netfront_info *np = netdev_priv(dev); int val; @@ -1216,7 +1217,8 @@ static u32 xennet_fix_features(struct net_device *dev, u32 features) return features; } -static int xennet_set_features(struct net_device *dev, u32 features) +static int xennet_set_features(struct net_device *dev, + netdev_features_t features) { if (!(features & NETIF_F_SG) && dev->mtu > ETH_DATA_LEN) { netdev_info(dev, "Reducing MTU because no SG offload"); @@ -1707,7 +1709,6 @@ static void netback_changed(struct xenbus_device *dev, case XenbusStateInitialised: case XenbusStateReconfiguring: case XenbusStateReconfigured: - case XenbusStateConnected: case XenbusStateUnknown: case XenbusStateClosed: break; @@ -1718,6 +1719,9 @@ static void netback_changed(struct xenbus_device *dev, if (xennet_connect(netdev) != 0) break; xenbus_switch_state(dev, XenbusStateConnected); + break; + + case XenbusStateConnected: netif_notify_peers(netdev); break; |