diff options
author | Florian Fainelli <florian@openwrt.org> | 2010-09-08 07:11:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-10 00:36:36 -0400 |
commit | 3441592b34121a38047ed6680f0ed9b9017de9cf (patch) | |
tree | 62a590be79af628b4c70681585d99b36c28c6699 /drivers | |
parent | b2abd4c033c3965ce670841dfb401f5f166222d5 (diff) |
au1000-eth: typedefs removal
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/au1000_eth.c | 26 | ||||
-rw-r--r-- | drivers/net/au1000_eth.h | 30 |
2 files changed, 28 insertions, 28 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 15ae6df2ff00..b8ae85c6da03 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -452,9 +452,9 @@ static int au1000_mii_probe (struct net_device *dev) | |||
452 | * has the virtual and dma address of a buffer suitable for | 452 | * has the virtual and dma address of a buffer suitable for |
453 | * both, receive and transmit operations. | 453 | * both, receive and transmit operations. |
454 | */ | 454 | */ |
455 | static db_dest_t *au1000_GetFreeDB(struct au1000_private *aup) | 455 | static struct db_dest *au1000_GetFreeDB(struct au1000_private *aup) |
456 | { | 456 | { |
457 | db_dest_t *pDB; | 457 | struct db_dest *pDB; |
458 | pDB = aup->pDBfree; | 458 | pDB = aup->pDBfree; |
459 | 459 | ||
460 | if (pDB) { | 460 | if (pDB) { |
@@ -463,9 +463,9 @@ static db_dest_t *au1000_GetFreeDB(struct au1000_private *aup) | |||
463 | return pDB; | 463 | return pDB; |
464 | } | 464 | } |
465 | 465 | ||
466 | void au1000_ReleaseDB(struct au1000_private *aup, db_dest_t *pDB) | 466 | void au1000_ReleaseDB(struct au1000_private *aup, struct db_dest *pDB) |
467 | { | 467 | { |
468 | db_dest_t *pDBfree = aup->pDBfree; | 468 | struct db_dest *pDBfree = aup->pDBfree; |
469 | if (pDBfree) | 469 | if (pDBfree) |
470 | pDBfree->pnext = pDB; | 470 | pDBfree->pnext = pDB; |
471 | aup->pDBfree = pDB; | 471 | aup->pDBfree = pDB; |
@@ -524,11 +524,11 @@ au1000_setup_hw_rings(struct au1000_private *aup, u32 rx_base, u32 tx_base) | |||
524 | 524 | ||
525 | for (i = 0; i < NUM_RX_DMA; i++) { | 525 | for (i = 0; i < NUM_RX_DMA; i++) { |
526 | aup->rx_dma_ring[i] = | 526 | aup->rx_dma_ring[i] = |
527 | (volatile rx_dma_t *) (rx_base + sizeof(rx_dma_t)*i); | 527 | (volatile struct rx_dma *) (rx_base + sizeof(struct rx_dma)*i); |
528 | } | 528 | } |
529 | for (i = 0; i < NUM_TX_DMA; i++) { | 529 | for (i = 0; i < NUM_TX_DMA; i++) { |
530 | aup->tx_dma_ring[i] = | 530 | aup->tx_dma_ring[i] = |
531 | (volatile tx_dma_t *) (tx_base + sizeof(tx_dma_t)*i); | 531 | (volatile struct tx_dma *) (tx_base + sizeof(struct tx_dma)*i); |
532 | } | 532 | } |
533 | } | 533 | } |
534 | 534 | ||
@@ -681,9 +681,9 @@ static int au1000_rx(struct net_device *dev) | |||
681 | { | 681 | { |
682 | struct au1000_private *aup = netdev_priv(dev); | 682 | struct au1000_private *aup = netdev_priv(dev); |
683 | struct sk_buff *skb; | 683 | struct sk_buff *skb; |
684 | volatile rx_dma_t *prxd; | 684 | volatile struct rx_dma *prxd; |
685 | u32 buff_stat, status; | 685 | u32 buff_stat, status; |
686 | db_dest_t *pDB; | 686 | struct db_dest *pDB; |
687 | u32 frmlen; | 687 | u32 frmlen; |
688 | 688 | ||
689 | netif_dbg(aup, rx_status, dev, "au1000_rx head %d\n", aup->rx_head); | 689 | netif_dbg(aup, rx_status, dev, "au1000_rx head %d\n", aup->rx_head); |
@@ -774,7 +774,7 @@ static void au1000_update_tx_stats(struct net_device *dev, u32 status) | |||
774 | static void au1000_tx_ack(struct net_device *dev) | 774 | static void au1000_tx_ack(struct net_device *dev) |
775 | { | 775 | { |
776 | struct au1000_private *aup = netdev_priv(dev); | 776 | struct au1000_private *aup = netdev_priv(dev); |
777 | volatile tx_dma_t *ptxd; | 777 | volatile struct tx_dma *ptxd; |
778 | 778 | ||
779 | ptxd = aup->tx_dma_ring[aup->tx_tail]; | 779 | ptxd = aup->tx_dma_ring[aup->tx_tail]; |
780 | 780 | ||
@@ -873,9 +873,9 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev) | |||
873 | { | 873 | { |
874 | struct au1000_private *aup = netdev_priv(dev); | 874 | struct au1000_private *aup = netdev_priv(dev); |
875 | struct net_device_stats *ps = &dev->stats; | 875 | struct net_device_stats *ps = &dev->stats; |
876 | volatile tx_dma_t *ptxd; | 876 | volatile struct tx_dma *ptxd; |
877 | u32 buff_stat; | 877 | u32 buff_stat; |
878 | db_dest_t *pDB; | 878 | struct db_dest *pDB; |
879 | int i; | 879 | int i; |
880 | 880 | ||
881 | netif_dbg(aup, tx_queued, dev, "tx: aup %x len=%d, data=%p, head %d\n", | 881 | netif_dbg(aup, tx_queued, dev, "tx: aup %x len=%d, data=%p, head %d\n", |
@@ -991,7 +991,7 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
991 | struct au1000_private *aup = NULL; | 991 | struct au1000_private *aup = NULL; |
992 | struct au1000_eth_platform_data *pd; | 992 | struct au1000_eth_platform_data *pd; |
993 | struct net_device *dev = NULL; | 993 | struct net_device *dev = NULL; |
994 | db_dest_t *pDB, *pDBfree; | 994 | struct db_dest *pDB, *pDBfree; |
995 | int irq, i, err = 0; | 995 | int irq, i, err = 0; |
996 | struct resource *base, *macen; | 996 | struct resource *base, *macen; |
997 | 997 | ||
@@ -1054,7 +1054,7 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | /* aup->mac is the base address of the MAC's registers */ | 1056 | /* aup->mac is the base address of the MAC's registers */ |
1057 | aup->mac = (volatile mac_reg_t *)ioremap_nocache(base->start, resource_size(base)); | 1057 | aup->mac = (volatile struct mac_reg *)ioremap_nocache(base->start, resource_size(base)); |
1058 | if (!aup->mac) { | 1058 | if (!aup->mac) { |
1059 | dev_err(&pdev->dev, "failed to ioremap MAC registers\n"); | 1059 | dev_err(&pdev->dev, "failed to ioremap MAC registers\n"); |
1060 | err = -ENXIO; | 1060 | err = -ENXIO; |
diff --git a/drivers/net/au1000_eth.h b/drivers/net/au1000_eth.h index d06ec008fbf1..44003e4843b8 100644 --- a/drivers/net/au1000_eth.h +++ b/drivers/net/au1000_eth.h | |||
@@ -44,34 +44,34 @@ | |||
44 | * Data Buffer Descriptor. Data buffers must be aligned on 32 byte | 44 | * Data Buffer Descriptor. Data buffers must be aligned on 32 byte |
45 | * boundary for both, receive and transmit. | 45 | * boundary for both, receive and transmit. |
46 | */ | 46 | */ |
47 | typedef struct db_dest { | 47 | struct db_dest { |
48 | struct db_dest *pnext; | 48 | struct db_dest *pnext; |
49 | volatile u32 *vaddr; | 49 | volatile u32 *vaddr; |
50 | dma_addr_t dma_addr; | 50 | dma_addr_t dma_addr; |
51 | } db_dest_t; | 51 | }; |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * The transmit and receive descriptors are memory | 54 | * The transmit and receive descriptors are memory |
55 | * mapped registers. | 55 | * mapped registers. |
56 | */ | 56 | */ |
57 | typedef struct tx_dma { | 57 | struct tx_dma { |
58 | u32 status; | 58 | u32 status; |
59 | u32 buff_stat; | 59 | u32 buff_stat; |
60 | u32 len; | 60 | u32 len; |
61 | u32 pad; | 61 | u32 pad; |
62 | } tx_dma_t; | 62 | }; |
63 | 63 | ||
64 | typedef struct rx_dma { | 64 | struct rx_dma { |
65 | u32 status; | 65 | u32 status; |
66 | u32 buff_stat; | 66 | u32 buff_stat; |
67 | u32 pad[2]; | 67 | u32 pad[2]; |
68 | } rx_dma_t; | 68 | }; |
69 | 69 | ||
70 | 70 | ||
71 | /* | 71 | /* |
72 | * MAC control registers, memory mapped. | 72 | * MAC control registers, memory mapped. |
73 | */ | 73 | */ |
74 | typedef struct mac_reg { | 74 | struct mac_reg { |
75 | u32 control; | 75 | u32 control; |
76 | u32 mac_addr_high; | 76 | u32 mac_addr_high; |
77 | u32 mac_addr_low; | 77 | u32 mac_addr_low; |
@@ -82,16 +82,16 @@ typedef struct mac_reg { | |||
82 | u32 flow_control; | 82 | u32 flow_control; |
83 | u32 vlan1_tag; | 83 | u32 vlan1_tag; |
84 | u32 vlan2_tag; | 84 | u32 vlan2_tag; |
85 | } mac_reg_t; | 85 | }; |
86 | 86 | ||
87 | 87 | ||
88 | struct au1000_private { | 88 | struct au1000_private { |
89 | db_dest_t *pDBfree; | 89 | struct db_dest *pDBfree; |
90 | db_dest_t db[NUM_RX_BUFFS+NUM_TX_BUFFS]; | 90 | struct db_dest db[NUM_RX_BUFFS+NUM_TX_BUFFS]; |
91 | volatile rx_dma_t *rx_dma_ring[NUM_RX_DMA]; | 91 | volatile struct rx_dma *rx_dma_ring[NUM_RX_DMA]; |
92 | volatile tx_dma_t *tx_dma_ring[NUM_TX_DMA]; | 92 | volatile struct tx_dma *tx_dma_ring[NUM_TX_DMA]; |
93 | db_dest_t *rx_db_inuse[NUM_RX_DMA]; | 93 | struct db_dest *rx_db_inuse[NUM_RX_DMA]; |
94 | db_dest_t *tx_db_inuse[NUM_TX_DMA]; | 94 | struct db_dest *tx_db_inuse[NUM_TX_DMA]; |
95 | u32 rx_head; | 95 | u32 rx_head; |
96 | u32 tx_head; | 96 | u32 tx_head; |
97 | u32 tx_tail; | 97 | u32 tx_tail; |
@@ -118,7 +118,7 @@ struct au1000_private { | |||
118 | int phy_irq; | 118 | int phy_irq; |
119 | 119 | ||
120 | /* These variables are just for quick access to certain regs addresses. */ | 120 | /* These variables are just for quick access to certain regs addresses. */ |
121 | volatile mac_reg_t *mac; /* mac registers */ | 121 | volatile struct mac_reg *mac; /* mac registers */ |
122 | volatile u32 *enable; /* address of MAC Enable Register */ | 122 | volatile u32 *enable; /* address of MAC Enable Register */ |
123 | 123 | ||
124 | u32 vaddr; /* virtual address of rx/tx buffers */ | 124 | u32 vaddr; /* virtual address of rx/tx buffers */ |