aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx.h
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-04-02 04:06:31 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-01 22:55:40 -0400
commitd198893e73c66ceb36cc1b1c3f261e82b7cc5700 (patch)
tree41827697e0595cdf0b42f8d30d89f36e7099038e /drivers/net/dsa/mv88e6xxx.h
parentnet: dsa: mv88e6xxx: Move switch product IDs into common include file (diff)
downloadlinux-dev-d198893e73c66ceb36cc1b1c3f261e82b7cc5700.tar.xz
linux-dev-d198893e73c66ceb36cc1b1c3f261e82b7cc5700.zip
net: dsa: mv88e6131: Determine and use number of switch ports
Determine and use number of switch ports from chip ID instead of always using the maximum, and return error when an attempt is made to access a non-existing port. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/dsa/mv88e6xxx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h
index aca48792db4b..ef058444bdb7 100644
--- a/drivers/net/dsa/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx.h
@@ -109,6 +109,7 @@ struct mv88e6xxx_priv_state {
struct mutex eeprom_mutex;
int id; /* switch product id */
+ int num_ports; /* number of switch ports */
/* hw bridging */