]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: dsa: use cpu_switch instead of ds[0]
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Wed, 18 Jan 2017 01:41:39 +0000 (20:41 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jan 2017 21:49:47 +0000 (16:49 -0500)
commit9520ed8fb8410dcb6babf751561a08f73ca03812
treeee7e664f866902ca3befac6dc0294c755dfa3b2d
parentb22de490869da354116ea4cbbaa09dcbc260b2b4
net: dsa: use cpu_switch instead of ds[0]

Now that the DSA Ethernet switches are true Linux devices, the CPU
switch is not necessarily the first one. If its address is higher than
the second switch on the same MDIO bus, its index will be 1, not 0.

Avoid any confusion by using dst->cpu_switch instead of dst->ds[0].

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c
net/dsa/dsa2.c
net/dsa/slave.c
net/dsa/tag_brcm.c
net/dsa/tag_qca.c
net/dsa/tag_trailer.c