]> git.baikalelectronics.ru Git - kernel.git/commit
net: hsr: introduce protocol specific function pointers
authorMurali Karicheri <m-karicheri2@ti.com>
Wed, 22 Jul 2020 14:40:18 +0000 (10:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2020 19:20:40 +0000 (12:20 -0700)
commitd49f791d4dd5f2525d85ea379a19362a1f594394
tree77e4b61fcb34a537551c17b09a9af5deb79b5d18
parente228872803b54beacd5c58d0fb68ca5d7a5607a9
net: hsr: introduce protocol specific function pointers

As a preparatory patch to introduce support for PRP protocol, add a
protocol ops ptr in the private hsr structure to hold function
pointers as some of the functions at protocol level packet
handling is different for HSR vs PRP. It is expected that PRP will
add its of set of functions for protocol handling. Modify existing
hsr_announce() function to call proto_ops->send_sv_frame() to send
supervision frame for HSR. This is expected to be different for PRP.
So introduce a ops function ptr, send_sv_frame() for the same and
initialize it to send_hsr_supervsion_frame(). Modify hsr_announce()
to call proto_ops->send_sv_frame().

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/hsr/hsr_device.c
net/hsr/hsr_main.h