]>
Commit | Line | Data |
---|---|---|
e190d6b1 | 1 | /* |
2fb9d6f5 | 2 | * Blackfin On-Chip MAC Driver |
e190d6b1 | 3 | * |
2fb9d6f5 | 4 | * Copyright 2004-2007 Analog Devices Inc. |
e190d6b1 | 5 | * |
2fb9d6f5 | 6 | * Enter bugs at http://blackfin.uclinux.org/ |
e190d6b1 | 7 | * |
2fb9d6f5 | 8 | * Licensed under the GPL-2 or later. |
e190d6b1 BW |
9 | */ |
10 | ||
e190d6b1 BW |
11 | #define BFIN_MAC_CSUM_OFFLOAD |
12 | ||
13 | struct dma_descriptor { | |
14 | struct dma_descriptor *next_dma_desc; | |
15 | unsigned long start_addr; | |
16 | unsigned short config; | |
17 | unsigned short x_count; | |
18 | }; | |
19 | ||
20 | struct status_area_rx { | |
21 | #if defined(BFIN_MAC_CSUM_OFFLOAD) | |
22 | unsigned short ip_hdr_csum; /* ip header checksum */ | |
23 | /* ip payload(udp or tcp or others) checksum */ | |
24 | unsigned short ip_payload_csum; | |
25 | #endif | |
26 | unsigned long status_word; /* the frame status word */ | |
27 | }; | |
28 | ||
29 | struct status_area_tx { | |
30 | unsigned long status_word; /* the frame status word */ | |
31 | }; | |
32 | ||
33 | /* use two descriptors for a packet */ | |
34 | struct net_dma_desc_rx { | |
35 | struct net_dma_desc_rx *next; | |
36 | struct sk_buff *skb; | |
37 | struct dma_descriptor desc_a; | |
38 | struct dma_descriptor desc_b; | |
39 | struct status_area_rx status; | |
40 | }; | |
41 | ||
42 | /* use two descriptors for a packet */ | |
43 | struct net_dma_desc_tx { | |
44 | struct net_dma_desc_tx *next; | |
45 | struct sk_buff *skb; | |
46 | struct dma_descriptor desc_a; | |
47 | struct dma_descriptor desc_b; | |
48 | unsigned char packet[1560]; | |
49 | struct status_area_tx status; | |
50 | }; | |
51 | ||
7ef0a7ee | 52 | struct bfin_mac_local { |
e190d6b1 BW |
53 | /* |
54 | * these are things that the kernel wants me to keep, so users | |
55 | * can find out semi-useless statistics of how well the card is | |
56 | * performing | |
57 | */ | |
4ae5a3ad | 58 | struct net_device_stats stats; |
e190d6b1 | 59 | |
e190d6b1 BW |
60 | unsigned char Mac[6]; /* MAC address of the board */ |
61 | spinlock_t lock; | |
4ae5a3ad BW |
62 | |
63 | /* MII and PHY stuffs */ | |
64 | int old_link; /* used by bf537_adjust_link */ | |
65 | int old_speed; | |
66 | int old_duplex; | |
67 | ||
68 | struct phy_device *phydev; | |
298cf9be | 69 | struct mii_bus *mii_bus; |
e190d6b1 BW |
70 | }; |
71 | ||
9862cc52 | 72 | extern void bfin_get_ether_addr(char *addr); |