diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index ef56c035d44e..8763c99fcb84 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2174,12 +2174,20 @@ unsigned dev_get_flags(const struct net_device *dev) | |||
2174 | 2174 | ||
2175 | flags = (dev->flags & ~(IFF_PROMISC | | 2175 | flags = (dev->flags & ~(IFF_PROMISC | |
2176 | IFF_ALLMULTI | | 2176 | IFF_ALLMULTI | |
2177 | IFF_RUNNING)) | | 2177 | IFF_RUNNING | |
2178 | IFF_LOWER_UP | | ||
2179 | IFF_DORMANT)) | | ||
2178 | (dev->gflags & (IFF_PROMISC | | 2180 | (dev->gflags & (IFF_PROMISC | |
2179 | IFF_ALLMULTI)); | 2181 | IFF_ALLMULTI)); |
2180 | 2182 | ||
2181 | if (netif_running(dev) && netif_carrier_ok(dev)) | 2183 | if (netif_running(dev)) { |
2182 | flags |= IFF_RUNNING; | 2184 | if (netif_oper_up(dev)) |
2185 | flags |= IFF_RUNNING; | ||
2186 | if (netif_carrier_ok(dev)) | ||
2187 | flags |= IFF_LOWER_UP; | ||
2188 | if (netif_dormant(dev)) | ||
2189 | flags |= IFF_DORMANT; | ||
2190 | } | ||
2183 | 2191 | ||
2184 | return flags; | 2192 | return flags; |
2185 | } | 2193 | } |