diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2020-07-22 17:40:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-27 22:20:40 +0300 |
commit | fa4dc89531360de760359bf94086b04dada98d4e (patch) | |
tree | 2e3f088de4fdc10beed19603216e6ceb2da2a272 /net/hsr/hsr_main.h | |
parent | c643ff0383c858b9af09f582ed2947810e4cf407 (diff) | |
download | linux-fa4dc89531360de760359bf94086b04dada98d4e.tar.xz |
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.h | 8 |
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 { |