Blame view

net/dsa/dsa_priv.h 1.42 KB
91da11f87   Lennert Buytenhek   net: Distributed ...
1
2
  /*
   * net/dsa/dsa_priv.h - Hardware switch handling
e84665c9c   Lennert Buytenhek   dsa: add switch c...
3
   * Copyright (c) 2008-2009 Marvell Semiconductor
91da11f87   Lennert Buytenhek   net: Distributed ...
4
5
6
7
8
9
10
11
12
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published by
   * the Free Software Foundation; either version 2 of the License, or
   * (at your option) any later version.
   */
  
  #ifndef __DSA_PRIV_H
  #define __DSA_PRIV_H
91da11f87   Lennert Buytenhek   net: Distributed ...
13
  #include <linux/phy.h>
91da11f87   Lennert Buytenhek   net: Distributed ...
14
  #include <net/dsa.h>
91da11f87   Lennert Buytenhek   net: Distributed ...
15
  struct dsa_slave_priv {
e84665c9c   Lennert Buytenhek   dsa: add switch c...
16
17
18
19
  	/*
  	 * The linux network interface corresponding to this
  	 * switch port.
  	 */
91da11f87   Lennert Buytenhek   net: Distributed ...
20
  	struct net_device	*dev;
e84665c9c   Lennert Buytenhek   dsa: add switch c...
21
22
23
24
25
  
  	/*
  	 * Which switch this port is a part of, and the port index
  	 * for this port.
  	 */
91da11f87   Lennert Buytenhek   net: Distributed ...
26
  	struct dsa_switch	*parent;
e84665c9c   Lennert Buytenhek   dsa: add switch c...
27
28
29
30
31
32
  	u8			port;
  
  	/*
  	 * The phylib phy_device pointer for the PHY connected
  	 * to this port.
  	 */
91da11f87   Lennert Buytenhek   net: Distributed ...
33
34
  	struct phy_device	*phy;
  };
91da11f87   Lennert Buytenhek   net: Distributed ...
35
36
  /* dsa.c */
  extern char dsa_driver_version[];
91da11f87   Lennert Buytenhek   net: Distributed ...
37
38
39
40
41
42
  
  /* slave.c */
  void dsa_slave_mii_bus_init(struct dsa_switch *ds);
  struct net_device *dsa_slave_create(struct dsa_switch *ds,
  				    struct device *parent,
  				    int port, char *name);
cf85d08fd   Lennert Buytenhek   dsa: add support ...
43
  /* tag_dsa.c */
6fef4c0c8   Stephen Hemminger   netdev: convert p...
44
  netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev);
7df899c36   Ben Hutchings   dsa: Combine core...
45
  extern struct packet_type dsa_packet_type;
cf85d08fd   Lennert Buytenhek   dsa: add support ...
46

91da11f87   Lennert Buytenhek   net: Distributed ...
47
  /* tag_edsa.c */
6fef4c0c8   Stephen Hemminger   netdev: convert p...
48
  netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev);
7df899c36   Ben Hutchings   dsa: Combine core...
49
  extern struct packet_type edsa_packet_type;
91da11f87   Lennert Buytenhek   net: Distributed ...
50

396138f03   Lennert Buytenhek   dsa: add support ...
51
  /* tag_trailer.c */
6fef4c0c8   Stephen Hemminger   netdev: convert p...
52
  netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev);
7df899c36   Ben Hutchings   dsa: Combine core...
53
  extern struct packet_type trailer_packet_type;
396138f03   Lennert Buytenhek   dsa: add support ...
54

91da11f87   Lennert Buytenhek   net: Distributed ...
55
56
  
  #endif