diff options
Diffstat (limited to 'drivers/net/wan/dlci.c')
-rw-r--r-- | drivers/net/wan/dlci.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 5d13832978eb..a297e3efa05d 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c | |||
@@ -74,7 +74,7 @@ static int dlci_header(struct sk_buff *skb, struct net_device *dev, | |||
74 | unsigned int hlen; | 74 | unsigned int hlen; |
75 | char *dest; | 75 | char *dest; |
76 | 76 | ||
77 | dlp = dev->priv; | 77 | dlp = netdev_priv(dev); |
78 | 78 | ||
79 | hdr.control = FRAD_I_UI; | 79 | hdr.control = FRAD_I_UI; |
80 | switch(type) | 80 | switch(type) |
@@ -110,7 +110,7 @@ static void dlci_receive(struct sk_buff *skb, struct net_device *dev) | |||
110 | struct frhdr *hdr; | 110 | struct frhdr *hdr; |
111 | int process, header; | 111 | int process, header; |
112 | 112 | ||
113 | dlp = dev->priv; | 113 | dlp = netdev_priv(dev); |
114 | if (!pskb_may_pull(skb, sizeof(*hdr))) { | 114 | if (!pskb_may_pull(skb, sizeof(*hdr))) { |
115 | printk(KERN_NOTICE "%s: invalid data no header\n", | 115 | printk(KERN_NOTICE "%s: invalid data no header\n", |
116 | dev->name); | 116 | dev->name); |
@@ -196,7 +196,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev) | |||
196 | if (!skb || !dev) | 196 | if (!skb || !dev) |
197 | return(0); | 197 | return(0); |
198 | 198 | ||
199 | dlp = dev->priv; | 199 | dlp = netdev_priv(dev); |
200 | 200 | ||
201 | netif_stop_queue(dev); | 201 | netif_stop_queue(dev); |
202 | 202 | ||
@@ -234,9 +234,9 @@ static int dlci_config(struct net_device *dev, struct dlci_conf __user *conf, in | |||
234 | struct frad_local *flp; | 234 | struct frad_local *flp; |
235 | int err; | 235 | int err; |
236 | 236 | ||
237 | dlp = dev->priv; | 237 | dlp = netdev_priv(dev); |
238 | 238 | ||
239 | flp = dlp->slave->priv; | 239 | flp = netdev_priv(dlp->slave); |
240 | 240 | ||
241 | if (!get) | 241 | if (!get) |
242 | { | 242 | { |
@@ -268,7 +268,7 @@ static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
268 | if (!capable(CAP_NET_ADMIN)) | 268 | if (!capable(CAP_NET_ADMIN)) |
269 | return(-EPERM); | 269 | return(-EPERM); |
270 | 270 | ||
271 | dlp = dev->priv; | 271 | dlp = netdev_priv(dev); |
272 | 272 | ||
273 | switch(cmd) | 273 | switch(cmd) |
274 | { | 274 | { |
@@ -297,7 +297,7 @@ static int dlci_change_mtu(struct net_device *dev, int new_mtu) | |||
297 | { | 297 | { |
298 | struct dlci_local *dlp; | 298 | struct dlci_local *dlp; |
299 | 299 | ||
300 | dlp = dev->priv; | 300 | dlp = netdev_priv(dev); |
301 | 301 | ||
302 | return((*dlp->slave->change_mtu)(dlp->slave, new_mtu)); | 302 | return((*dlp->slave->change_mtu)(dlp->slave, new_mtu)); |
303 | } | 303 | } |
@@ -308,7 +308,7 @@ static int dlci_open(struct net_device *dev) | |||
308 | struct frad_local *flp; | 308 | struct frad_local *flp; |
309 | int err; | 309 | int err; |
310 | 310 | ||
311 | dlp = dev->priv; | 311 | dlp = netdev_priv(dev); |
312 | 312 | ||
313 | if (!*(short *)(dev->dev_addr)) | 313 | if (!*(short *)(dev->dev_addr)) |
314 | return(-EINVAL); | 314 | return(-EINVAL); |
@@ -316,7 +316,7 @@ static int dlci_open(struct net_device *dev) | |||
316 | if (!netif_running(dlp->slave)) | 316 | if (!netif_running(dlp->slave)) |
317 | return(-ENOTCONN); | 317 | return(-ENOTCONN); |
318 | 318 | ||
319 | flp = dlp->slave->priv; | 319 | flp = netdev_priv(dlp->slave); |
320 | err = (*flp->activate)(dlp->slave, dev); | 320 | err = (*flp->activate)(dlp->slave, dev); |
321 | if (err) | 321 | if (err) |
322 | return(err); | 322 | return(err); |
@@ -334,9 +334,9 @@ static int dlci_close(struct net_device *dev) | |||
334 | 334 | ||
335 | netif_stop_queue(dev); | 335 | netif_stop_queue(dev); |
336 | 336 | ||
337 | dlp = dev->priv; | 337 | dlp = netdev_priv(dev); |
338 | 338 | ||
339 | flp = dlp->slave->priv; | 339 | flp = netdev_priv(dlp->slave); |
340 | err = (*flp->deactivate)(dlp->slave, dev); | 340 | err = (*flp->deactivate)(dlp->slave, dev); |
341 | 341 | ||
342 | return 0; | 342 | return 0; |
@@ -346,7 +346,7 @@ static struct net_device_stats *dlci_get_stats(struct net_device *dev) | |||
346 | { | 346 | { |
347 | struct dlci_local *dlp; | 347 | struct dlci_local *dlp; |
348 | 348 | ||
349 | dlp = dev->priv; | 349 | dlp = netdev_priv(dev); |
350 | 350 | ||
351 | return(&dlp->stats); | 351 | return(&dlp->stats); |
352 | } | 352 | } |
@@ -364,7 +364,7 @@ static int dlci_add(struct dlci_add *dlci) | |||
364 | if (!slave) | 364 | if (!slave) |
365 | return -ENODEV; | 365 | return -ENODEV; |
366 | 366 | ||
367 | if (slave->type != ARPHRD_FRAD || slave->priv == NULL) | 367 | if (slave->type != ARPHRD_FRAD || netdev_priv(slave) == NULL) |
368 | goto err1; | 368 | goto err1; |
369 | 369 | ||
370 | /* create device name */ | 370 | /* create device name */ |
@@ -390,11 +390,11 @@ static int dlci_add(struct dlci_add *dlci) | |||
390 | 390 | ||
391 | *(short *)(master->dev_addr) = dlci->dlci; | 391 | *(short *)(master->dev_addr) = dlci->dlci; |
392 | 392 | ||
393 | dlp = (struct dlci_local *) master->priv; | 393 | dlp = netdev_priv(master); |
394 | dlp->slave = slave; | 394 | dlp->slave = slave; |
395 | dlp->master = master; | 395 | dlp->master = master; |
396 | 396 | ||
397 | flp = slave->priv; | 397 | flp = netdev_priv(slave); |
398 | err = (*flp->assoc)(slave, master); | 398 | err = (*flp->assoc)(slave, master); |
399 | if (err < 0) | 399 | if (err < 0) |
400 | goto err2; | 400 | goto err2; |
@@ -434,9 +434,9 @@ static int dlci_del(struct dlci_add *dlci) | |||
434 | return(-EBUSY); | 434 | return(-EBUSY); |
435 | } | 435 | } |
436 | 436 | ||
437 | dlp = master->priv; | 437 | dlp = netdev_priv(master); |
438 | slave = dlp->slave; | 438 | slave = dlp->slave; |
439 | flp = slave->priv; | 439 | flp = netdev_priv(slave); |
440 | 440 | ||
441 | rtnl_lock(); | 441 | rtnl_lock(); |
442 | err = (*flp->deassoc)(slave, master); | 442 | err = (*flp->deassoc)(slave, master); |
@@ -490,7 +490,7 @@ static const struct header_ops dlci_header_ops = { | |||
490 | 490 | ||
491 | static void dlci_setup(struct net_device *dev) | 491 | static void dlci_setup(struct net_device *dev) |
492 | { | 492 | { |
493 | struct dlci_local *dlp = dev->priv; | 493 | struct dlci_local *dlp = netdev_priv(dev); |
494 | 494 | ||
495 | dev->flags = 0; | 495 | dev->flags = 0; |
496 | dev->open = dlci_open; | 496 | dev->open = dlci_open; |