aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx.h
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.h
parentMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge (diff)
downloadlinux-dev-d715fa6431a794e6a8cdb53d87acd3d03ed8a941.tar.xz
linux-dev-d715fa6431a794e6a8cdb53d87acd3d03ed8a941.zip
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.h')
-rw-r--r--drivers/net/dsa/mv88e6xxx.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h
index ca08f913d302..63a6f587e9e8 100644
--- a/drivers/net/dsa/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx.h
@@ -379,6 +379,10 @@ struct mv88e6xxx_vtu_stu_entry {
u8 data[DSA_MAX_PORTS];
};
+struct mv88e6xxx_priv_port {
+ u8 state;
+};
+
struct mv88e6xxx_priv_state {
/* When using multi-chip addressing, this mutex protects
* access to the indirect access registers. (In single-chip
@@ -415,8 +419,9 @@ struct mv88e6xxx_priv_state {
int id; /* switch product id */
int num_ports; /* number of switch ports */
+ struct mv88e6xxx_priv_port ports[DSA_MAX_PORTS];
+
unsigned long port_state_update_mask;
- u8 port_state[DSA_MAX_PORTS];
struct work_struct bridge_work;
};