Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
bfin_mac.h
Go to the documentation of this file.
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 /*
21  * Disable hardware checksum for bug #5600 if writeback cache is
22  * enabled. Otherwize, corrupted RX packet will be sent up stack
23  * without error mark.
24  */
25 #ifndef CONFIG_BFIN_EXTMEM_WRITEBACK
26 #define BFIN_MAC_CSUM_OFFLOAD
27 #endif
28 
29 #define TX_RECLAIM_JIFFIES (HZ / 5)
30 
33  unsigned long start_addr;
34  unsigned short config;
35  unsigned short x_count;
36 };
37 
39 #if defined(BFIN_MAC_CSUM_OFFLOAD)
40  unsigned short ip_hdr_csum; /* ip header checksum */
41  /* ip payload(udp or tcp or others) checksum */
42  unsigned short ip_payload_csum;
43 #endif
44  unsigned long status_word; /* the frame status word */
45 };
46 
48  unsigned long status_word; /* the frame status word */
49 };
50 
51 /* use two descriptors for a packet */
54  struct sk_buff *skb;
58 };
59 
60 /* use two descriptors for a packet */
63  struct sk_buff *skb;
66  unsigned char packet[1560];
68 };
69 
71  /*
72  * these are things that the kernel wants me to keep, so users
73  * can find out semi-useless statistics of how well the card is
74  * performing
75  */
77 
79 
80  int wol; /* Wake On Lan */
83  struct net_device *ndev;
84 
85  /* Data for EMAC_VLAN1 regs */
87 
88  /* MII and PHY stuffs */
89  int old_link; /* used by bf537_adjust_link */
90  int old_speed;
92 
93  struct phy_device *phydev;
94  struct mii_bus *mii_bus;
95 
96 #if defined(CONFIG_BFIN_MAC_USE_HWSTAMP)
97  struct cyclecounter cycles;
98  struct timecounter clock;
99  struct timecompare compare;
100  struct hwtstamp_config stamp_cfg;
101 #endif
102 };
103 
104 extern int bfin_get_ether_addr(char *addr);
105 
106 #endif