aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/tag_edsa.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2017-01-27 15:29:39 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-29 18:42:46 -0500
commitafdcf151c1f7346207dcee3f8d6d82991dbbb7e5 (patch)
tree1afa077b113e04b364c88e90cabade71e3675f80 /net/dsa/tag_edsa.c
parentnet: dsa: add ds and index to dsa_port (diff)
downloadlinux-dev-afdcf151c1f7346207dcee3f8d6d82991dbbb7e5.tar.xz
linux-dev-afdcf151c1f7346207dcee3f8d6d82991dbbb7e5.zip
net: dsa: store a dsa_port in dsa_slave_priv
Store a pointer to the dsa_port structure in the dsa_slave_priv structure, instead of the switch/port index. This will allow to store more information such as the bridge device, needed in DSA drivers for multi-chip configuration. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/tag_edsa.c')
-rw-r--r--net/dsa/tag_edsa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c
index 929de581a846..648c051817a1 100644
--- a/net/dsa/tag_edsa.c
+++ b/net/dsa/tag_edsa.c
@@ -42,8 +42,8 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
edsa_header[1] = ETH_P_EDSA & 0xff;
edsa_header[2] = 0x00;
edsa_header[3] = 0x00;
- edsa_header[4] = 0x60 | p->parent->index;
- edsa_header[5] = p->port << 3;
+ edsa_header[4] = 0x60 | p->dp->ds->index;
+ edsa_header[5] = p->dp->index << 3;
/*
* Move CFI field from byte 6 to byte 5.
@@ -67,8 +67,8 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
edsa_header[1] = ETH_P_EDSA & 0xff;
edsa_header[2] = 0x00;
edsa_header[3] = 0x00;
- edsa_header[4] = 0x40 | p->parent->index;
- edsa_header[5] = p->port << 3;
+ edsa_header[4] = 0x40 | p->dp->ds->index;
+ edsa_header[5] = p->dp->index << 3;
edsa_header[6] = 0x00;
edsa_header[7] = 0x00;
}