diff options
Diffstat (limited to 'drivers/net/wan/sdla.c')
-rw-r--r-- | drivers/net/wan/sdla.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index 73e2f2780932..6a07ba9371db 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c | |||
@@ -185,7 +185,7 @@ static void sdla_stop(struct net_device *dev) | |||
185 | { | 185 | { |
186 | struct frad_local *flp; | 186 | struct frad_local *flp; |
187 | 187 | ||
188 | flp = dev->priv; | 188 | flp = netdev_priv(dev); |
189 | switch(flp->type) | 189 | switch(flp->type) |
190 | { | 190 | { |
191 | case SDLA_S502A: | 191 | case SDLA_S502A: |
@@ -212,7 +212,7 @@ static void sdla_start(struct net_device *dev) | |||
212 | { | 212 | { |
213 | struct frad_local *flp; | 213 | struct frad_local *flp; |
214 | 214 | ||
215 | flp = dev->priv; | 215 | flp = netdev_priv(dev); |
216 | switch(flp->type) | 216 | switch(flp->type) |
217 | { | 217 | { |
218 | case SDLA_S502A: | 218 | case SDLA_S502A: |
@@ -432,7 +432,7 @@ static int sdla_cmd(struct net_device *dev, int cmd, short dlci, short flags, | |||
432 | int ret, waiting, len; | 432 | int ret, waiting, len; |
433 | long window; | 433 | long window; |
434 | 434 | ||
435 | flp = dev->priv; | 435 | flp = netdev_priv(dev); |
436 | window = flp->type == SDLA_S508 ? SDLA_508_CMD_BUF : SDLA_502_CMD_BUF; | 436 | window = flp->type == SDLA_S508 ? SDLA_508_CMD_BUF : SDLA_502_CMD_BUF; |
437 | cmd_buf = (struct sdla_cmd *)(dev->mem_start + (window & SDLA_ADDR_MASK)); | 437 | cmd_buf = (struct sdla_cmd *)(dev->mem_start + (window & SDLA_ADDR_MASK)); |
438 | ret = 0; | 438 | ret = 0; |
@@ -509,7 +509,7 @@ static int sdla_activate(struct net_device *slave, struct net_device *master) | |||
509 | struct frad_local *flp; | 509 | struct frad_local *flp; |
510 | int i; | 510 | int i; |
511 | 511 | ||
512 | flp = slave->priv; | 512 | flp = netdev_priv(slave); |
513 | 513 | ||
514 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 514 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
515 | if (flp->master[i] == master) | 515 | if (flp->master[i] == master) |
@@ -531,7 +531,7 @@ static int sdla_deactivate(struct net_device *slave, struct net_device *master) | |||
531 | struct frad_local *flp; | 531 | struct frad_local *flp; |
532 | int i; | 532 | int i; |
533 | 533 | ||
534 | flp = slave->priv; | 534 | flp = netdev_priv(slave); |
535 | 535 | ||
536 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 536 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
537 | if (flp->master[i] == master) | 537 | if (flp->master[i] == master) |
@@ -556,7 +556,7 @@ static int sdla_assoc(struct net_device *slave, struct net_device *master) | |||
556 | if (master->type != ARPHRD_DLCI) | 556 | if (master->type != ARPHRD_DLCI) |
557 | return(-EINVAL); | 557 | return(-EINVAL); |
558 | 558 | ||
559 | flp = slave->priv; | 559 | flp = netdev_priv(slave); |
560 | 560 | ||
561 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 561 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
562 | { | 562 | { |
@@ -589,7 +589,7 @@ static int sdla_deassoc(struct net_device *slave, struct net_device *master) | |||
589 | struct frad_local *flp; | 589 | struct frad_local *flp; |
590 | int i; | 590 | int i; |
591 | 591 | ||
592 | flp = slave->priv; | 592 | flp = netdev_priv(slave); |
593 | 593 | ||
594 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 594 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
595 | if (flp->master[i] == master) | 595 | if (flp->master[i] == master) |
@@ -619,7 +619,7 @@ static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, i | |||
619 | int i; | 619 | int i; |
620 | short len, ret; | 620 | short len, ret; |
621 | 621 | ||
622 | flp = slave->priv; | 622 | flp = netdev_priv(slave); |
623 | 623 | ||
624 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 624 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
625 | if (flp->master[i] == master) | 625 | if (flp->master[i] == master) |
@@ -628,7 +628,7 @@ static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, i | |||
628 | if (i == CONFIG_DLCI_MAX) | 628 | if (i == CONFIG_DLCI_MAX) |
629 | return(-ENODEV); | 629 | return(-ENODEV); |
630 | 630 | ||
631 | dlp = master->priv; | 631 | dlp = netdev_priv(master); |
632 | 632 | ||
633 | ret = SDLA_RET_OK; | 633 | ret = SDLA_RET_OK; |
634 | len = sizeof(struct dlci_conf); | 634 | len = sizeof(struct dlci_conf); |
@@ -659,7 +659,7 @@ static int sdla_transmit(struct sk_buff *skb, struct net_device *dev) | |||
659 | unsigned long flags; | 659 | unsigned long flags; |
660 | struct buf_entry *pbuf; | 660 | struct buf_entry *pbuf; |
661 | 661 | ||
662 | flp = dev->priv; | 662 | flp = netdev_priv(dev); |
663 | ret = 0; | 663 | ret = 0; |
664 | accept = 1; | 664 | accept = 1; |
665 | 665 | ||
@@ -755,7 +755,7 @@ static void sdla_receive(struct net_device *dev) | |||
755 | int i=0, received, success, addr, buf_base, buf_top; | 755 | int i=0, received, success, addr, buf_base, buf_top; |
756 | short dlci, len, len2, split; | 756 | short dlci, len, len2, split; |
757 | 757 | ||
758 | flp = dev->priv; | 758 | flp = netdev_priv(dev); |
759 | success = 1; | 759 | success = 1; |
760 | received = addr = buf_top = buf_base = 0; | 760 | received = addr = buf_top = buf_base = 0; |
761 | len = dlci = 0; | 761 | len = dlci = 0; |
@@ -860,7 +860,7 @@ static void sdla_receive(struct net_device *dev) | |||
860 | if (success) | 860 | if (success) |
861 | { | 861 | { |
862 | flp->stats.rx_packets++; | 862 | flp->stats.rx_packets++; |
863 | dlp = master->priv; | 863 | dlp = netdev_priv(master); |
864 | (*dlp->receive)(skb, master); | 864 | (*dlp->receive)(skb, master); |
865 | } | 865 | } |
866 | 866 | ||
@@ -925,7 +925,7 @@ static void sdla_poll(unsigned long device) | |||
925 | struct frad_local *flp; | 925 | struct frad_local *flp; |
926 | 926 | ||
927 | dev = (struct net_device *) device; | 927 | dev = (struct net_device *) device; |
928 | flp = dev->priv; | 928 | flp = netdev_priv(dev); |
929 | 929 | ||
930 | if (sdla_byte(dev, SDLA_502_RCV_BUF)) | 930 | if (sdla_byte(dev, SDLA_502_RCV_BUF)) |
931 | sdla_receive(dev); | 931 | sdla_receive(dev); |
@@ -941,7 +941,7 @@ static int sdla_close(struct net_device *dev) | |||
941 | int len, i; | 941 | int len, i; |
942 | short dlcis[CONFIG_DLCI_MAX]; | 942 | short dlcis[CONFIG_DLCI_MAX]; |
943 | 943 | ||
944 | flp = dev->priv; | 944 | flp = netdev_priv(dev); |
945 | 945 | ||
946 | len = 0; | 946 | len = 0; |
947 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 947 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
@@ -1002,7 +1002,7 @@ static int sdla_open(struct net_device *dev) | |||
1002 | int len, i; | 1002 | int len, i; |
1003 | char byte; | 1003 | char byte; |
1004 | 1004 | ||
1005 | flp = dev->priv; | 1005 | flp = netdev_priv(dev); |
1006 | 1006 | ||
1007 | if (!flp->initialized) | 1007 | if (!flp->initialized) |
1008 | return(-EPERM); | 1008 | return(-EPERM); |
@@ -1079,7 +1079,7 @@ static int sdla_open(struct net_device *dev) | |||
1079 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 1079 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
1080 | if (flp->dlci[i]) | 1080 | if (flp->dlci[i]) |
1081 | { | 1081 | { |
1082 | dlp = flp->master[i]->priv; | 1082 | dlp = netdev_priv(flp->master[i]); |
1083 | if (dlp->configured) | 1083 | if (dlp->configured) |
1084 | sdla_cmd(dev, SDLA_SET_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, &dlp->config, sizeof(struct dlci_conf), NULL, NULL); | 1084 | sdla_cmd(dev, SDLA_SET_DLCI_CONFIGURATION, abs(flp->dlci[i]), 0, &dlp->config, sizeof(struct dlci_conf), NULL, NULL); |
1085 | } | 1085 | } |
@@ -1099,7 +1099,7 @@ static int sdla_config(struct net_device *dev, struct frad_conf __user *conf, in | |||
1099 | if (dev->type == 0xFFFF) | 1099 | if (dev->type == 0xFFFF) |
1100 | return(-EUNATCH); | 1100 | return(-EUNATCH); |
1101 | 1101 | ||
1102 | flp = dev->priv; | 1102 | flp = netdev_priv(dev); |
1103 | 1103 | ||
1104 | if (!get) | 1104 | if (!get) |
1105 | { | 1105 | { |
@@ -1230,7 +1230,7 @@ static int sdla_reconfig(struct net_device *dev) | |||
1230 | struct conf_data data; | 1230 | struct conf_data data; |
1231 | int i, len; | 1231 | int i, len; |
1232 | 1232 | ||
1233 | flp = dev->priv; | 1233 | flp = netdev_priv(dev); |
1234 | 1234 | ||
1235 | len = 0; | 1235 | len = 0; |
1236 | for(i=0;i<CONFIG_DLCI_MAX;i++) | 1236 | for(i=0;i<CONFIG_DLCI_MAX;i++) |
@@ -1255,7 +1255,7 @@ static int sdla_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1255 | if(!capable(CAP_NET_ADMIN)) | 1255 | if(!capable(CAP_NET_ADMIN)) |
1256 | return -EPERM; | 1256 | return -EPERM; |
1257 | 1257 | ||
1258 | flp = dev->priv; | 1258 | flp = netdev_priv(dev); |
1259 | 1259 | ||
1260 | if (!flp->initialized) | 1260 | if (!flp->initialized) |
1261 | return(-EINVAL); | 1261 | return(-EINVAL); |
@@ -1321,7 +1321,7 @@ static int sdla_change_mtu(struct net_device *dev, int new_mtu) | |||
1321 | { | 1321 | { |
1322 | struct frad_local *flp; | 1322 | struct frad_local *flp; |
1323 | 1323 | ||
1324 | flp = dev->priv; | 1324 | flp = netdev_priv(dev); |
1325 | 1325 | ||
1326 | if (netif_running(dev)) | 1326 | if (netif_running(dev)) |
1327 | return(-EBUSY); | 1327 | return(-EBUSY); |
@@ -1338,7 +1338,7 @@ static int sdla_set_config(struct net_device *dev, struct ifmap *map) | |||
1338 | unsigned base; | 1338 | unsigned base; |
1339 | int err = -EINVAL; | 1339 | int err = -EINVAL; |
1340 | 1340 | ||
1341 | flp = dev->priv; | 1341 | flp = netdev_priv(dev); |
1342 | 1342 | ||
1343 | if (flp->initialized) | 1343 | if (flp->initialized) |
1344 | return(-EINVAL); | 1344 | return(-EINVAL); |
@@ -1593,14 +1593,14 @@ fail: | |||
1593 | static struct net_device_stats *sdla_stats(struct net_device *dev) | 1593 | static struct net_device_stats *sdla_stats(struct net_device *dev) |
1594 | { | 1594 | { |
1595 | struct frad_local *flp; | 1595 | struct frad_local *flp; |
1596 | flp = dev->priv; | 1596 | flp = netdev_priv(dev); |
1597 | 1597 | ||
1598 | return(&flp->stats); | 1598 | return(&flp->stats); |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | static void setup_sdla(struct net_device *dev) | 1601 | static void setup_sdla(struct net_device *dev) |
1602 | { | 1602 | { |
1603 | struct frad_local *flp = dev->priv; | 1603 | struct frad_local *flp = netdev_priv(dev); |
1604 | 1604 | ||
1605 | netdev_boot_setup_check(dev); | 1605 | netdev_boot_setup_check(dev); |
1606 | 1606 | ||
@@ -1651,7 +1651,7 @@ static int __init init_sdla(void) | |||
1651 | 1651 | ||
1652 | static void __exit exit_sdla(void) | 1652 | static void __exit exit_sdla(void) |
1653 | { | 1653 | { |
1654 | struct frad_local *flp = sdla->priv; | 1654 | struct frad_local *flp = netdev_priv(sdla); |
1655 | 1655 | ||
1656 | unregister_netdev(sdla); | 1656 | unregister_netdev(sdla); |
1657 | if (flp->initialized) { | 1657 | if (flp->initialized) { |