Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135368
b: refs/heads/master
c: c084080
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and David S. Miller committed Mar 22, 2009
1 parent 041bf8f commit ce82284
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aec464bbee32e1d67cba0072c50774c5298ef762
refs/heads/master: c084080151e1de92159f8437fde34b6e5bebe35e
13 changes: 13 additions & 0 deletions trunk/net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ void dsa_slave_mii_bus_init(struct dsa_switch *ds)


/* slave device handling ****************************************************/
static int dsa_slave_init(struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
struct net_device *master = p->parent->master_netdev;

dev->iflink = master->ifindex;

return 0;
}

static int dsa_slave_open(struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
Expand Down Expand Up @@ -288,6 +298,7 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {

#ifdef CONFIG_NET_DSA_TAG_DSA
static const struct net_device_ops dsa_netdev_ops = {
.ndo_init = dsa_slave_init,
.ndo_open = dsa_slave_open,
.ndo_stop = dsa_slave_close,
.ndo_start_xmit = dsa_xmit,
Expand All @@ -300,6 +311,7 @@ static const struct net_device_ops dsa_netdev_ops = {
#endif
#ifdef CONFIG_NET_DSA_TAG_EDSA
static const struct net_device_ops edsa_netdev_ops = {
.ndo_init = dsa_slave_init,
.ndo_open = dsa_slave_open,
.ndo_stop = dsa_slave_close,
.ndo_start_xmit = edsa_xmit,
Expand All @@ -312,6 +324,7 @@ static const struct net_device_ops edsa_netdev_ops = {
#endif
#ifdef CONFIG_NET_DSA_TAG_TRAILER
static const struct net_device_ops trailer_netdev_ops = {
.ndo_init = dsa_slave_init,
.ndo_open = dsa_slave_open,
.ndo_stop = dsa_slave_close,
.ndo_start_xmit = trailer_xmit,
Expand Down

0 comments on commit ce82284

Please sign in to comment.