Blame view
include/net/dsa.h
1.58 KB
91da11f87 net: Distributed ... |
1 2 |
/* * include/net/dsa.h - Driver for Distributed Switch Architecture switch chips |
e84665c9c dsa: add switch c... |
3 |
* Copyright (c) 2008-2009 Marvell Semiconductor |
91da11f87 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 __LINUX_NET_DSA_H #define __LINUX_NET_DSA_H |
e84665c9c dsa: add switch c... |
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
#define DSA_MAX_SWITCHES 4 #define DSA_MAX_PORTS 12 struct dsa_chip_data { /* * How to access the switch configuration registers. */ struct device *mii_bus; int sw_addr; /* * The names of the switch's ports. Use "cpu" to * designate the switch port that the cpu is connected to, * "dsa" to indicate that this port is a DSA link to * another switch, NULL to indicate the port is unused, * or any other string to indicate this is a physical port. */ char *port_names[DSA_MAX_PORTS]; /* * An array (with nr_chips elements) of which element [a] * indicates which port on this switch should be used to * send packets to that are destined for switch a. Can be * NULL if there is only one switch chip. */ s8 *rtable; }; |
91da11f87 net: Distributed ... |
40 41 42 43 |
struct dsa_platform_data { /* * Reference to a Linux network interface that connects |
e84665c9c dsa: add switch c... |
44 |
* to the root switch chip of the tree. |
91da11f87 net: Distributed ... |
45 46 47 48 |
*/ struct device *netdev; /* |
e84665c9c dsa: add switch c... |
49 50 |
* Info structs describing each of the switch chips * connected via this network interface. |
91da11f87 net: Distributed ... |
51 |
*/ |
e84665c9c dsa: add switch c... |
52 53 |
int nr_chips; struct dsa_chip_data *chip; |
91da11f87 net: Distributed ... |
54 |
}; |
cf85d08fd dsa: add support ... |
55 |
extern bool dsa_uses_dsa_tags(void *dsa_ptr); |
396138f03 dsa: add support ... |
56 |
extern bool dsa_uses_trailer_tags(void *dsa_ptr); |
cf85d08fd dsa: add support ... |
57 |
|
91da11f87 net: Distributed ... |
58 59 |
#endif |