• Michal Kubecek's avatar
    ethtool: add LINKMODES_NTF notification · 1b1b1847
    Michal Kubecek authored
    Send ETHTOOL_MSG_LINKMODES_NTF notification message whenever device link
    settings or advertised modes are modified using ETHTOOL_MSG_LINKMODES_SET
    netlink message or ETHTOOL_SLINKSETTINGS or ETHTOOL_SSET ioctl commands.
    
    The notification message has the same format as reply to LINKMODES_GET
    request. ETHTOOL_MSG_LINKMODES_SET netlink request only triggers the
    notification if there is a change but the ioctl command handlers do not
    check if there is an actual change and trigger the notification whenever
    the commands are executed.
    
    As all work is done by ethnl_default_notify() handler and callback
    functions introduced to handle LINKMODES_GET requests, all that remains is
    adding entries for ETHTOOL_MSG_LINKMODES_NTF into ethnl_notify_handlers and
    ethnl_default_notify_ops lookup tables and calls to ethtool_notify() where
    needed.
    Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1b1b1847
linkmodes.c 12.1 KB