USB: ftdi_sio: Support for more JTAG adaptors
[linux-2.6/mini2440.git] / drivers / net / bfin_mac.h
blob5970ea7142cd53c3e5f1d4234110a484f8af0191
1 /*
2 * File: drivers/net/bfin_mac.c
3 * Based on:
4 * Maintainer:
5 * Bryan Wu <bryan.wu@analog.com>
7 * Original author:
8 * Luke Yang <luke.yang@analog.com>
10 * Created:
11 * Description:
13 * Modified:
14 * Copyright 2004-2006 Analog Devices Inc.
16 * Bugs: Enter bugs at http://blackfin.uclinux.org/
18 * This program is free software ; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation ; either version 2, or (at your option)
21 * any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY ; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program ; see the file COPYING.
30 * If not, write to the Free Software Foundation,
31 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #define BFIN_MAC_CSUM_OFFLOAD
36 struct dma_descriptor {
37 struct dma_descriptor *next_dma_desc;
38 unsigned long start_addr;
39 unsigned short config;
40 unsigned short x_count;
43 struct status_area_rx {
44 #if defined(BFIN_MAC_CSUM_OFFLOAD)
45 unsigned short ip_hdr_csum; /* ip header checksum */
46 /* ip payload(udp or tcp or others) checksum */
47 unsigned short ip_payload_csum;
48 #endif
49 unsigned long status_word; /* the frame status word */
52 struct status_area_tx {
53 unsigned long status_word; /* the frame status word */
56 /* use two descriptors for a packet */
57 struct net_dma_desc_rx {
58 struct net_dma_desc_rx *next;
59 struct sk_buff *skb;
60 struct dma_descriptor desc_a;
61 struct dma_descriptor desc_b;
62 struct status_area_rx status;
65 /* use two descriptors for a packet */
66 struct net_dma_desc_tx {
67 struct net_dma_desc_tx *next;
68 struct sk_buff *skb;
69 struct dma_descriptor desc_a;
70 struct dma_descriptor desc_b;
71 unsigned char packet[1560];
72 struct status_area_tx status;
75 struct bf537mac_local {
77 * these are things that the kernel wants me to keep, so users
78 * can find out semi-useless statistics of how well the card is
79 * performing
81 struct net_device_stats stats;
83 unsigned char Mac[6]; /* MAC address of the board */
84 spinlock_t lock;
86 /* MII and PHY stuffs */
87 int old_link; /* used by bf537_adjust_link */
88 int old_speed;
89 int old_duplex;
91 struct phy_device *phydev;
92 struct mii_bus mii_bus;
95 extern void bfin_get_ether_addr(char *addr);