diff options
author | MD Danish Anwar <danishanwar@ti.com> | 2025-01-10 13:58:51 +0530 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-01-14 12:17:27 +0100 |
commit | 9c10dd8eed74de9e8adeb820939f8745cd566d4a (patch) | |
tree | 34e681a6ba607a182929e7d674d9b9a5cbba2acc /net/hsr/hsr_main.h | |
parent | 04508d20b017326e116c6e8ef953839507c73b6d (diff) |
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>
Diffstat (limited to 'net/hsr/hsr_main.h')
-rw-r--r-- | net/hsr/hsr_main.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h index 7d7551e6f0b0..7561845b8bf6 100644 --- a/net/hsr/hsr_main.h +++ b/net/hsr/hsr_main.h @@ -121,15 +121,6 @@ struct hsrv1_ethhdr_sp { struct hsr_sup_tag hsr_sup; } __packed; -enum hsr_port_type { - HSR_PT_NONE = 0, /* Must be 0, used by framereg */ - HSR_PT_SLAVE_A, - HSR_PT_SLAVE_B, - HSR_PT_INTERLINK, - HSR_PT_MASTER, - HSR_PT_PORTS, /* This must be the last item in the enum */ -}; - /* PRP Redunancy Control Trailor (RCT). * As defined in IEC-62439-4:2012, the PRP RCT is really { sequence Nr, * Lan indentifier (LanId), LSDU_size and PRP_suffix = 0x88FB }. |