summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-02-12 12:09:38 -0500
committerDavid S. Miller <davem@davemloft.net>2016-02-23 14:52:46 -0500
commitd715fa6431a794e6a8cdb53d87acd3d03ed8a941 (patch)
tree382c9f61d8c17a8d9903e0626f547fd4ac76ff55 /drivers/net/dsa/mv88e6xxx.c
parent9b69d206302b05b49d8b2ef12f78722952672c22 (diff)
net: dsa: mv88e6xxx: add port private structure
Add a per-port mv88e6xxx_priv_port structure to store per-port related data, instead of adding several arrays of DSA_MAX_PORTS elements in the mv88e6xxx_priv_state structure. It currently only contains the port STP state. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx.c')
-rw-r--r--drivers/net/dsa/mv88e6xxx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index 512c8c0be1b4..b0e00edb302e 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -1131,7 +1131,7 @@ int mv88e6xxx_port_stp_update(struct dsa_switch *ds, int port, u8 state)
/* mv88e6xxx_port_stp_update may be called with softirqs disabled,
* so we can not update the port state directly but need to schedule it.
*/
- ps->port_state[port] = stp_state;
+ ps->ports[port].state = stp_state;
set_bit(port, &ps->port_state_update_mask);
schedule_work(&ps->bridge_work);
@@ -1925,7 +1925,7 @@ static void mv88e6xxx_bridge_work(struct work_struct *work)
while (ps->port_state_update_mask) {
port = __ffs(ps->port_state_update_mask);
clear_bit(port, &ps->port_state_update_mask);
- mv88e6xxx_set_port_state(ds, port, ps->port_state[port]);
+ mv88e6xxx_set_port_state(ds, port, ps->ports[port].state);
}
}