]> www.infradead.org Git - users/hch/misc.git/commit
net: hsr: Create and export hsr_get_port_ndev()
authorMD Danish Anwar <danishanwar@ti.com>
Fri, 10 Jan 2025 08:28:51 +0000 (13:58 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 14 Jan 2025 11:17:27 +0000 (12:17 +0100)
commit9c10dd8eed74de9e8adeb820939f8745cd566d4a
tree34e681a6ba607a182929e7d674d9b9a5cbba2acc
parent04508d20b017326e116c6e8ef953839507c73b6d
net: hsr: Create and export hsr_get_port_ndev()

Create an API to get the net_device to the slave port of HSR device. The
API will take hsr net_device and enum hsr_port_type for which we want the
net_device as arguments.

This API can be used by client drivers who support HSR and want to get
the net_devcie of slave ports from the hsr device. Export this API for
the same.

This API needs the enum hsr_port_type to be accessible by the drivers using
hsr. Move the enum hsr_port_type from net/hsr/hsr_main.h to
include/linux/if_hsr.h for the same.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/linux/if_hsr.h
net/hsr/hsr_device.c
net/hsr/hsr_main.h