Blame view
net/dsa/dsa_priv.h
1.84 KB
91da11f87
|
1 2 |
/* * net/dsa/dsa_priv.h - Hardware switch handling |
e84665c9c
|
3 |
* Copyright (c) 2008-2009 Marvell Semiconductor |
91da11f87
|
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
|
13 |
#include <linux/phy.h> |
5075314e4
|
14 15 16 17 18 19 20 |
#include <linux/netdevice.h> struct dsa_device_ops { netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev); int (*rcv)(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev); }; |
91da11f87
|
21 |
|
91da11f87
|
22 |
struct dsa_slave_priv { |
e84665c9c
|
23 24 25 26 |
/* * The linux network interface corresponding to this * switch port. */ |
91da11f87
|
27 |
struct net_device *dev; |
5075314e4
|
28 29 |
netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev); |
e84665c9c
|
30 31 32 33 34 |
/* * Which switch this port is a part of, and the port index * for this port. */ |
91da11f87
|
35 |
struct dsa_switch *parent; |
e84665c9c
|
36 37 38 39 40 41 |
u8 port; /* * The phylib phy_device pointer for the PHY connected * to this port. */ |
91da11f87
|
42 |
struct phy_device *phy; |
0d8bcdd38
|
43 44 45 46 |
phy_interface_t phy_interface; int old_link; int old_pause; int old_duplex; |
91da11f87
|
47 |
}; |
91da11f87
|
48 49 |
/* dsa.c */ extern char dsa_driver_version[]; |
91da11f87
|
50 51 |
/* slave.c */ |
5075314e4
|
52 |
extern const struct dsa_device_ops notag_netdev_ops; |
91da11f87
|
53 54 55 56 |
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); |
244625491
|
57 58 |
int dsa_slave_suspend(struct net_device *slave_dev); int dsa_slave_resume(struct net_device *slave_dev); |
91da11f87
|
59 |
|
cf85d08fd
|
60 |
/* tag_dsa.c */ |
3e8a72d1d
|
61 |
extern const struct dsa_device_ops dsa_netdev_ops; |
cf85d08fd
|
62 |
|
91da11f87
|
63 |
/* tag_edsa.c */ |
3e8a72d1d
|
64 |
extern const struct dsa_device_ops edsa_netdev_ops; |
91da11f87
|
65 |
|
396138f03
|
66 |
/* tag_trailer.c */ |
3e8a72d1d
|
67 |
extern const struct dsa_device_ops trailer_netdev_ops; |
396138f03
|
68 |
|
5037d532b
|
69 70 |
/* tag_brcm.c */ extern const struct dsa_device_ops brcm_netdev_ops; |
91da11f87
|
71 72 |
#endif |