aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pppoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pppoe.c')
-rw-r--r--drivers/net/pppoe.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index cdd11ba100ea..b1b93ff2351f 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -89,7 +89,6 @@
89#define PPPOE_HASH_SIZE (1 << PPPOE_HASH_BITS) 89#define PPPOE_HASH_SIZE (1 << PPPOE_HASH_BITS)
90#define PPPOE_HASH_MASK (PPPOE_HASH_SIZE - 1) 90#define PPPOE_HASH_MASK (PPPOE_HASH_SIZE - 1)
91 91
92static int pppoe_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
93static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb); 92static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb);
94static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb); 93static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb);
95 94
@@ -258,7 +257,7 @@ static inline struct pppox_sock *get_item_by_addr(struct net *net,
258 dev = dev_get_by_name_rcu(net, sp->sa_addr.pppoe.dev); 257 dev = dev_get_by_name_rcu(net, sp->sa_addr.pppoe.dev);
259 if (dev) { 258 if (dev) {
260 ifindex = dev->ifindex; 259 ifindex = dev->ifindex;
261 pn = net_generic(net, pppoe_net_id); 260 pn = pppoe_pernet(net);
262 pppox_sock = get_item(pn, sp->sa_addr.pppoe.sid, 261 pppox_sock = get_item(pn, sp->sa_addr.pppoe.sid,
263 sp->sa_addr.pppoe.remote, ifindex); 262 sp->sa_addr.pppoe.remote, ifindex);
264 } 263 }
@@ -290,12 +289,6 @@ static void pppoe_flush_dev(struct net_device *dev)
290 struct pppoe_net *pn; 289 struct pppoe_net *pn;
291 int i; 290 int i;
292 291
293 BUG_ON(dev == NULL);
294
295 pn = pppoe_pernet(dev_net(dev));
296 if (!pn) /* already freed */
297 return;
298
299 write_lock_bh(&pn->hash_lock); 292 write_lock_bh(&pn->hash_lock);
300 for (i = 0; i < PPPOE_HASH_SIZE; i++) { 293 for (i = 0; i < PPPOE_HASH_SIZE; i++) {
301 struct pppox_sock *po = pn->hash_table[i]; 294 struct pppox_sock *po = pn->hash_table[i];
@@ -368,7 +361,7 @@ static int pppoe_device_event(struct notifier_block *this,
368 361
369 default: 362 default:
370 break; 363 break;
371 }; 364 }
372 365
373 return NOTIFY_DONE; 366 return NOTIFY_DONE;
374} 367}