aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-01-20 09:52:50 +0200
committerDavid S. Miller <davem@davemloft.net>2020-01-20 13:25:45 +0100
commitac9cc4e25044b699eb8f0f4822ad58a2f5130abb (patch)
tree8c630ee6cb68de6c0cd7fca37a5ef544de5ba373 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parentMerge branch 'net-phy-add-generic-ndo_do_ioctl-handler-phy_do_ioctl' (diff)
downloadlinux-dev-ac9cc4e25044b699eb8f0f4822ad58a2f5130abb.tar.xz
linux-dev-ac9cc4e25044b699eb8f0f4822ad58a2f5130abb.zip
mlxsw: spectrum: Push code getting port speed into a helper
Currently PTP code queries directly PTYS register for port speed from work scheduled upon PUDE event. Since the speed needs to be used for SPAN buffer size computation as well, push the code into a separate helper. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 948ef4720d40..6477b473cad7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -471,6 +471,7 @@ extern struct notifier_block mlxsw_sp_switchdev_notifier;
/* spectrum.c */
void mlxsw_sp_rx_listener_no_mark_func(struct sk_buff *skb,
u8 local_port, void *priv);
+int mlxsw_sp_port_speed_get(struct mlxsw_sp_port *mlxsw_sp_port, u32 *speed);
int mlxsw_sp_port_ets_set(struct mlxsw_sp_port *mlxsw_sp_port,
enum mlxsw_reg_qeec_hr hr, u8 index, u8 next_index,
bool dwrr, u8 dwrr_weight);