aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lp486e.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/lp486e.c')
-rw-r--r--drivers/net/lp486e.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c
index 83fa9d82a004..4d1a059921c6 100644
--- a/drivers/net/lp486e.c
+++ b/drivers/net/lp486e.c
@@ -390,7 +390,7 @@ i596_timeout(struct net_device *dev, char *msg, int ct) {
390 struct i596_private *lp; 390 struct i596_private *lp;
391 int boguscnt = ct; 391 int boguscnt = ct;
392 392
393 lp = (struct i596_private *) dev->priv; 393 lp = netdev_priv(dev);
394 while (lp->scb.command) { 394 while (lp->scb.command) {
395 if (--boguscnt == 0) { 395 if (--boguscnt == 0) {
396 printk("%s: %s timed out - stat %4.4x, cmd %4.4x\n", 396 printk("%s: %s timed out - stat %4.4x, cmd %4.4x\n",
@@ -411,7 +411,7 @@ init_rx_bufs(struct net_device *dev, int num) {
411 int i; 411 int i;
412 // struct i596_rbd *rbd; 412 // struct i596_rbd *rbd;
413 413
414 lp = (struct i596_private *) dev->priv; 414 lp = netdev_priv(dev);
415 lp->scb.pa_rfd = I596_NULL; 415 lp->scb.pa_rfd = I596_NULL;
416 416
417 for (i = 0; i < num; i++) { 417 for (i = 0; i < num; i++) {
@@ -468,7 +468,7 @@ remove_rx_bufs(struct net_device *dev) {
468 struct i596_private *lp; 468 struct i596_private *lp;
469 struct i596_rfd *rfd; 469 struct i596_rfd *rfd;
470 470
471 lp = (struct i596_private *) dev->priv; 471 lp = netdev_priv(dev);
472 lp->rx_tail->pa_next = I596_NULL; 472 lp->rx_tail->pa_next = I596_NULL;
473 473
474 do { 474 do {
@@ -517,7 +517,7 @@ CLEAR_INT(void) {
517/* selftest or dump */ 517/* selftest or dump */
518static void 518static void
519i596_port_do(struct net_device *dev, int portcmd, char *cmdname) { 519i596_port_do(struct net_device *dev, int portcmd, char *cmdname) {
520 struct i596_private *lp = dev->priv; 520 struct i596_private *lp = netdev_priv(dev);
521 u16 *outp; 521 u16 *outp;
522 int i, m; 522 int i, m;
523 523
@@ -541,7 +541,7 @@ i596_port_do(struct net_device *dev, int portcmd, char *cmdname) {
541 541
542static int 542static int
543i596_scp_setup(struct net_device *dev) { 543i596_scp_setup(struct net_device *dev) {
544 struct i596_private *lp = dev->priv; 544 struct i596_private *lp = netdev_priv(dev);
545 int boguscnt; 545 int boguscnt;
546 546
547 /* Setup SCP, ISCP, SCB */ 547 /* Setup SCP, ISCP, SCB */
@@ -622,7 +622,7 @@ init_i596(struct net_device *dev) {
622 if (i596_scp_setup(dev)) 622 if (i596_scp_setup(dev))
623 return 1; 623 return 1;
624 624
625 lp = (struct i596_private *) dev->priv; 625 lp = netdev_priv(dev);
626 lp->scb.command = 0; 626 lp->scb.command = 0;
627 627
628 memcpy ((void *)lp->i596_config, init_setup, 14); 628 memcpy ((void *)lp->i596_config, init_setup, 14);
@@ -676,7 +676,6 @@ i596_rx_one(struct net_device *dev, struct i596_private *lp,
676 676
677 skb->protocol = eth_type_trans(skb,dev); 677 skb->protocol = eth_type_trans(skb,dev);
678 netif_rx(skb); 678 netif_rx(skb);
679 dev->last_rx = jiffies;
680 dev->stats.rx_packets++; 679 dev->stats.rx_packets++;
681 } else { 680 } else {
682#if 0 681#if 0
@@ -705,7 +704,7 @@ i596_rx_one(struct net_device *dev, struct i596_private *lp,
705 704
706static int 705static int
707i596_rx(struct net_device *dev) { 706i596_rx(struct net_device *dev) {
708 struct i596_private *lp = (struct i596_private *) dev->priv; 707 struct i596_private *lp = netdev_priv(dev);
709 struct i596_rfd *rfd; 708 struct i596_rfd *rfd;
710 int frames = 0; 709 int frames = 0;
711 710
@@ -738,7 +737,7 @@ i596_cleanup_cmd(struct net_device *dev) {
738 struct i596_private *lp; 737 struct i596_private *lp;
739 struct i596_cmd *cmd; 738 struct i596_cmd *cmd;
740 739
741 lp = (struct i596_private *) dev->priv; 740 lp = netdev_priv(dev);
742 while (lp->cmd_head) { 741 while (lp->cmd_head) {
743 cmd = (struct i596_cmd *)lp->cmd_head; 742 cmd = (struct i596_cmd *)lp->cmd_head;
744 743
@@ -806,7 +805,7 @@ static void i596_reset(struct net_device *dev, struct i596_private *lp, int ioad
806} 805}
807 806
808static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd) { 807static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd) {
809 struct i596_private *lp = dev->priv; 808 struct i596_private *lp = netdev_priv(dev);
810 int ioaddr = dev->base_addr; 809 int ioaddr = dev->base_addr;
811 unsigned long flags; 810 unsigned long flags;
812 811
@@ -912,7 +911,7 @@ static int i596_start_xmit (struct sk_buff *skb, struct net_device *dev) {
912 911
913static void 912static void
914i596_tx_timeout (struct net_device *dev) { 913i596_tx_timeout (struct net_device *dev) {
915 struct i596_private *lp = dev->priv; 914 struct i596_private *lp = netdev_priv(dev);
916 int ioaddr = dev->base_addr; 915 int ioaddr = dev->base_addr;
917 916
918 /* Transmitter timeout, serious problems. */ 917 /* Transmitter timeout, serious problems. */
@@ -970,7 +969,7 @@ static int __init lp486e_probe(struct net_device *dev) {
970 return -EBUSY; 969 return -EBUSY;
971 } 970 }
972 971
973 lp = (struct i596_private *) dev->priv; 972 lp = netdev_priv(dev);
974 spin_lock_init(&lp->cmd_lock); 973 spin_lock_init(&lp->cmd_lock);
975 974
976 /* 975 /*
@@ -1147,7 +1146,7 @@ static irqreturn_t
1147i596_interrupt(int irq, void *dev_instance) 1146i596_interrupt(int irq, void *dev_instance)
1148{ 1147{
1149 struct net_device *dev = dev_instance; 1148 struct net_device *dev = dev_instance;
1150 struct i596_private *lp = dev->priv; 1149 struct i596_private *lp = netdev_priv(dev);
1151 unsigned short status, ack_cmd = 0; 1150 unsigned short status, ack_cmd = 0;
1152 int frames_in = 0; 1151 int frames_in = 0;
1153 1152
@@ -1215,7 +1214,7 @@ i596_interrupt(int irq, void *dev_instance)
1215} 1214}
1216 1215
1217static int i596_close(struct net_device *dev) { 1216static int i596_close(struct net_device *dev) {
1218 struct i596_private *lp = dev->priv; 1217 struct i596_private *lp = netdev_priv(dev);
1219 1218
1220 netif_stop_queue(dev); 1219 netif_stop_queue(dev);
1221 1220
@@ -1242,7 +1241,7 @@ static int i596_close(struct net_device *dev) {
1242*/ 1241*/
1243 1242
1244static void set_multicast_list(struct net_device *dev) { 1243static void set_multicast_list(struct net_device *dev) {
1245 struct i596_private *lp = dev->priv; 1244 struct i596_private *lp = netdev_priv(dev);
1246 struct i596_cmd *cmd; 1245 struct i596_cmd *cmd;
1247 1246
1248 if (i596_debug > 1) 1247 if (i596_debug > 1)