aboutsummaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_main.h
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2020-07-22 10:40:20 -0400
committerDavid S. Miller <davem@davemloft.net>2020-07-27 12:20:40 -0700
commitfa4dc89531360de760359bf94086b04dada98d4e (patch)
tree2e3f088de4fdc10beed19603216e6ceb2da2a272 /net/hsr/hsr_main.h
parentnet: prp: add supervision frame generation utility function (diff)
downloadlinux-dev-fa4dc89531360de760359bf94086b04dada98d4e.tar.xz
linux-dev-fa4dc89531360de760359bf94086b04dada98d4e.zip
net: hsr: define and use proto_ops ptrs to handle hsr specific frames
As a preparatory patch to introduce PRP, refactor the code specific to handling HSR frames into separate functions and call them through proto_ops function pointers. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_main.h')
-rw-r--r--net/hsr/hsr_main.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
index 58e1ad21b66f..14f442c57a84 100644
--- a/net/hsr/hsr_main.h
+++ b/net/hsr/hsr_main.h
@@ -162,9 +162,17 @@ enum hsr_version {
PRP_V1,
};
+struct hsr_frame_info;
+
struct hsr_proto_ops {
/* format and send supervision frame */
void (*send_sv_frame)(struct hsr_port *port, unsigned long *interval);
+ struct sk_buff * (*get_untagged_frame)(struct hsr_frame_info *frame,
+ struct hsr_port *port);
+ struct sk_buff * (*create_tagged_frame)(struct hsr_frame_info *frame,
+ struct hsr_port *port);
+ void (*fill_frame_info)(__be16 proto, struct sk_buff *skb,
+ struct hsr_frame_info *frame);
};
struct hsr_priv {