netdev: bfin_mac: clear RXCKS if hardware generated checksum is not enabled
[deliverable/linux.git] / drivers / net / bfin_mac.h
CommitLineData
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 9 */
fe92afed
BS
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>
e190d6b1 16
e190d6b1
BW
17#define BFIN_MAC_CSUM_OFFLOAD
18
19struct dma_descriptor {
20 struct dma_descriptor *next_dma_desc;
21 unsigned long start_addr;
22 unsigned short config;
23 unsigned short x_count;
24};
25
26struct status_area_rx {
27#if defined(BFIN_MAC_CSUM_OFFLOAD)
28 unsigned short ip_hdr_csum; /* ip header checksum */
29 /* ip payload(udp or tcp or others) checksum */
30 unsigned short ip_payload_csum;
31#endif
32 unsigned long status_word; /* the frame status word */
33};
34
35struct status_area_tx {
36 unsigned long status_word; /* the frame status word */
37};
38
39/* use two descriptors for a packet */
40struct net_dma_desc_rx {
41 struct net_dma_desc_rx *next;
42 struct sk_buff *skb;
43 struct dma_descriptor desc_a;
44 struct dma_descriptor desc_b;
45 struct status_area_rx status;
46};
47
48/* use two descriptors for a packet */
49struct net_dma_desc_tx {
50 struct net_dma_desc_tx *next;
51 struct sk_buff *skb;
52 struct dma_descriptor desc_a;
53 struct dma_descriptor desc_b;
54 unsigned char packet[1560];
55 struct status_area_tx status;
56};
57
7ef0a7ee 58struct bfin_mac_local {
e190d6b1
BW
59 /*
60 * these are things that the kernel wants me to keep, so users
61 * can find out semi-useless statistics of how well the card is
62 * performing
63 */
4ae5a3ad 64 struct net_device_stats stats;
e190d6b1 65
e190d6b1
BW
66 unsigned char Mac[6]; /* MAC address of the board */
67 spinlock_t lock;
4ae5a3ad
BW
68
69 /* MII and PHY stuffs */
70 int old_link; /* used by bf537_adjust_link */
71 int old_speed;
72 int old_duplex;
73
74 struct phy_device *phydev;
298cf9be 75 struct mii_bus *mii_bus;
fe92afed
BS
76
77#if defined(CONFIG_BFIN_MAC_USE_HWSTAMP)
78 struct cyclecounter cycles;
79 struct timecounter clock;
80 struct timecompare compare;
81 struct hwtstamp_config stamp_cfg;
82#endif
e190d6b1
BW
83};
84
9862cc52 85extern void bfin_get_ether_addr(char *addr);
fe92afed
BS
86
87#endif
This page took 0.307307 seconds and 5 git commands to generate.