mlxsw: spectrum_router: Access rif->dev through a helper
authorPetr Machata <petrm@nvidia.com>
Mon, 12 Jun 2023 15:31:02 +0000 (17:31 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 14 Jun 2023 11:12:20 +0000 (13:12 +0200)
commitfb6ac45e86668456e5750d2a1c874ca2f5526171
tree667b0b97e9d715f14bcb1d643d9dca937ee719b1
parent76962b802efe27a32425d2abe818e53167c71dbe
mlxsw: spectrum_router: Access rif->dev through a helper

In order to abstract away deduction of netdevice from the corresponding
RIF, introduce a helper, mlxsw_sp_rif_dev(), and use it throughout. This
will make it possible to change the deduction path easily later on.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c