diff options
author | Jonathan McDowell <noodles@earth.li> | 2020-07-18 18:32:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-21 03:34:16 +0200 |
commit | f58d2598cf70d41f73e761b62a114d2e8f94a676 (patch) | |
tree | c49024937defd11aca193872ac3b8df017cabd8e /drivers/net/dsa/qca8k.h | |
parent | net: hsr: remove redundant null check (diff) | |
download | linux-f58d2598cf70d41f73e761b62a114d2e8f94a676.tar.xz linux-f58d2598cf70d41f73e761b62a114d2e8f94a676.zip |
net: dsa: qca8k: implement the port MTU callbacks
This switch has a single max frame size configuration register, so we
track the requested MTU for each port and apply the largest.
v2:
- Address review feedback from Vladimir Oltean
Signed-off-by: Jonathan McDowell <noodles@earth.li>
Acked-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/qca8k.h')
-rw-r--r-- | drivers/net/dsa/qca8k.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h index 10ef2bca2cde..31439396401c 100644 --- a/drivers/net/dsa/qca8k.h +++ b/drivers/net/dsa/qca8k.h @@ -13,6 +13,7 @@ #include <linux/gpio.h> #define QCA8K_NUM_PORTS 7 +#define QCA8K_MAX_MTU 9000 #define PHY_ID_QCA8337 0x004dd036 #define QCA8K_ID_QCA8337 0x13 @@ -58,6 +59,7 @@ #define QCA8K_MDIO_MASTER_MAX_REG 32 #define QCA8K_GOL_MAC_ADDR0 0x60 #define QCA8K_GOL_MAC_ADDR1 0x64 +#define QCA8K_MAX_FRAME_SIZE 0x78 #define QCA8K_REG_PORT_STATUS(_i) (0x07c + (_i) * 4) #define QCA8K_PORT_STATUS_SPEED GENMASK(1, 0) #define QCA8K_PORT_STATUS_SPEED_10 0 @@ -189,6 +191,7 @@ struct qca8k_priv { struct device *dev; struct dsa_switch_ops ops; struct gpio_desc *reset_gpio; + unsigned int port_mtu[QCA8K_NUM_PORTS]; }; struct qca8k_mib_desc { |