summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx.h
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-04-02 05:06:31 +0300
committerDavid S. Miller <davem@davemloft.net>2015-04-02 05:55:40 +0300
commitd198893e73c66ceb36cc1b1c3f261e82b7cc5700 (patch)
tree41827697e0595cdf0b42f8d30d89f36e7099038e /drivers/net/dsa/mv88e6xxx.h
parentb2eb06627718836f7d133141693ec9685b4c4ef5 (diff)
downloadlinux-d198893e73c66ceb36cc1b1c3f261e82b7cc5700.tar.xz
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 'drivers/net/dsa/mv88e6xxx.h')
-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 */