diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/net/hamradio/bpqether.c | |
parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'drivers/net/hamradio/bpqether.c')
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index fe893c91a01b..ae5f11c8fc13 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -167,10 +167,7 @@ static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev) | |||
167 | 167 | ||
168 | static inline int dev_is_ethdev(struct net_device *dev) | 168 | static inline int dev_is_ethdev(struct net_device *dev) |
169 | { | 169 | { |
170 | return ( | 170 | return (dev->type == ARPHRD_ETHER && strncmp(dev->name, "dummy", 5)); |
171 | dev->type == ARPHRD_ETHER | ||
172 | && strncmp(dev->name, "dummy", 5) | ||
173 | ); | ||
174 | } | 171 | } |
175 | 172 | ||
176 | /* ------------------------------------------------------------------------ */ | 173 | /* ------------------------------------------------------------------------ */ |
@@ -186,7 +183,7 @@ static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty | |||
186 | struct ethhdr *eth; | 183 | struct ethhdr *eth; |
187 | struct bpqdev *bpq; | 184 | struct bpqdev *bpq; |
188 | 185 | ||
189 | if (dev_net(dev) != &init_net) | 186 | if (!net_eq(dev_net(dev), &init_net)) |
190 | goto drop; | 187 | goto drop; |
191 | 188 | ||
192 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) | 189 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) |
@@ -552,7 +549,7 @@ static int bpq_device_event(struct notifier_block *this,unsigned long event, voi | |||
552 | { | 549 | { |
553 | struct net_device *dev = (struct net_device *)ptr; | 550 | struct net_device *dev = (struct net_device *)ptr; |
554 | 551 | ||
555 | if (dev_net(dev) != &init_net) | 552 | if (!net_eq(dev_net(dev), &init_net)) |
556 | return NOTIFY_DONE; | 553 | return NOTIFY_DONE; |
557 | 554 | ||
558 | if (!dev_is_ethdev(dev)) | 555 | if (!dev_is_ethdev(dev)) |