netdev: bfin_mac: drop unused Mac data
[pandora-kernel.git] / drivers / net / bfin_mac.h
1 /*
2  * Blackfin On-Chip MAC Driver
3  *
4  * Copyright 2004-2007 Analog Devices Inc.
5  *
6  * Enter bugs at http://blackfin.uclinux.org/
7  *
8  * Licensed under the GPL-2 or later.
9  */
10 #ifndef _BFIN_MAC_H_
11 #define _BFIN_MAC_H_
12
13 #include <linux/net_tstamp.h>
14 #include <linux/clocksource.h>
15 #include <linux/timecompare.h>
16 #include <linux/timer.h>
17 #include <linux/etherdevice.h>
18 #include <linux/bfin_mac.h>
19
20 #define BFIN_MAC_CSUM_OFFLOAD
21
22 #define TX_RECLAIM_JIFFIES (HZ / 5)
23
24 struct dma_descriptor {
25         struct dma_descriptor *next_dma_desc;
26         unsigned long start_addr;
27         unsigned short config;
28         unsigned short x_count;
29 };
30
31 struct status_area_rx {
32 #if defined(BFIN_MAC_CSUM_OFFLOAD)
33         unsigned short ip_hdr_csum;     /* ip header checksum */
34         /* ip payload(udp or tcp or others) checksum */
35         unsigned short ip_payload_csum;
36 #endif
37         unsigned long status_word;      /* the frame status word */
38 };
39
40 struct status_area_tx {
41         unsigned long status_word;      /* the frame status word */
42 };
43
44 /* use two descriptors for a packet */
45 struct net_dma_desc_rx {
46         struct net_dma_desc_rx *next;
47         struct sk_buff *skb;
48         struct dma_descriptor desc_a;
49         struct dma_descriptor desc_b;
50         struct status_area_rx status;
51 };
52
53 /* use two descriptors for a packet */
54 struct net_dma_desc_tx {
55         struct net_dma_desc_tx *next;
56         struct sk_buff *skb;
57         struct dma_descriptor desc_a;
58         struct dma_descriptor desc_b;
59         unsigned char packet[1560];
60         struct status_area_tx status;
61 };
62
63 struct bfin_mac_local {
64         /*
65          * these are things that the kernel wants me to keep, so users
66          * can find out semi-useless statistics of how well the card is
67          * performing
68          */
69         struct net_device_stats stats;
70
71         spinlock_t lock;
72
73         int wol;                /* Wake On Lan */
74         int irq_wake_requested;
75         struct timer_list tx_reclaim_timer;
76         struct net_device *ndev;
77
78         /* MII and PHY stuffs */
79         int old_link;          /* used by bf537_adjust_link */
80         int old_speed;
81         int old_duplex;
82
83         struct phy_device *phydev;
84         struct mii_bus *mii_bus;
85
86 #if defined(CONFIG_BFIN_MAC_USE_HWSTAMP)
87         struct cyclecounter cycles;
88         struct timecounter clock;
89         struct timecompare compare;
90         struct hwtstamp_config stamp_cfg;
91 #endif
92 };
93
94 extern void bfin_get_ether_addr(char *addr);
95
96 #endif