net: dsa: Add a ports structure and use it in the switch structure
There are going to be more per-port members added to the switch structure. So add a port structure and move the netdev into it. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
149cafd790
commit
c8b098086b
@@ -804,7 +804,7 @@ static int bcm_sf2_sw_fdb_dump(struct dsa_switch *ds, int port,
|
||||
int (*cb)(struct switchdev_obj *obj))
|
||||
{
|
||||
struct bcm_sf2_priv *priv = ds_to_priv(ds);
|
||||
struct net_device *dev = ds->ports[port];
|
||||
struct net_device *dev = ds->ports[port].netdev;
|
||||
struct bcm_sf2_arl_entry results[2];
|
||||
unsigned int count = 0;
|
||||
int ret;
|
||||
@@ -1248,7 +1248,7 @@ static void bcm_sf2_sw_fixed_link_update(struct dsa_switch *ds, int port,
|
||||
* state machine and make it go in PHY_FORCING state instead.
|
||||
*/
|
||||
if (!status->link)
|
||||
netif_carrier_off(ds->ports[port]);
|
||||
netif_carrier_off(ds->ports[port].netdev);
|
||||
status->duplex = 1;
|
||||
} else {
|
||||
status->link = 1;
|
||||
|
Reference in New Issue
Block a user