• Ansuel Smith's avatar
    net: dsa: qca8k: add support for mib autocast in Ethernet packet · 5c957c7c
    Ansuel Smith authored
    The switch can autocast MIB counter using Ethernet packet.
    Add support for this and provide a handler for the tagger.
    The switch will send packet with MIB counter for each port, the switch
    will use completion API to wait for the correct packet to be received
    and will complete the task only when each packet is received.
    Although the handler will drop all the other packet, we still have to
    consume each MIB packet to complete the request. This is done to prevent
    mixed data with concurrent ethtool request.
    
    connect_tag_protocol() is used to add the handler to the tag_qca tagger,
    master_state_change() use the MIB lock to make sure no MIB Ethernet is
    in progress.
    Signed-off-by: default avatarAnsuel Smith <ansuelsmth@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5c957c7c
qca8k.h 16.3 KB