2  * Blackfin On-Chip MAC Driver
 
   4  * Copyright 2004-2007 Analog Devices Inc.
 
   6  * Enter bugs at http://blackfin.uclinux.org/
 
   8  * Licensed under the GPL-2 or later.
 
  11 #define BFIN_MAC_CSUM_OFFLOAD
 
  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;
 
  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;
 
  26         unsigned long status_word;      /* the frame status word */
 
  29 struct status_area_tx {
 
  30         unsigned long status_word;      /* the frame status word */
 
  33 /* use two descriptors for a packet */
 
  34 struct net_dma_desc_rx {
 
  35         struct net_dma_desc_rx *next;
 
  37         struct dma_descriptor desc_a;
 
  38         struct dma_descriptor desc_b;
 
  39         struct status_area_rx status;
 
  42 /* use two descriptors for a packet */
 
  43 struct net_dma_desc_tx {
 
  44         struct net_dma_desc_tx *next;
 
  46         struct dma_descriptor desc_a;
 
  47         struct dma_descriptor desc_b;
 
  48         unsigned char packet[1560];
 
  49         struct status_area_tx status;
 
  52 struct bfin_mac_local {
 
  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
 
  58         struct net_device_stats stats;
 
  60         unsigned char Mac[6];   /* MAC address of the board */
 
  63         /* MII and PHY stuffs */
 
  64         int old_link;          /* used by bf537_adjust_link */
 
  68         struct phy_device *phydev;
 
  69         struct mii_bus *mii_bus;
 
  72 extern void bfin_get_ether_addr(char *addr);