• Murali Karicheri's avatar
    net: hsr: introduce protocol specific function pointers · 28e458e0
    Murali Karicheri authored
    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: default avatarMurali Karicheri <m-karicheri2@ti.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    28e458e0
hsr_main.h 5.58 KB