diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-02-14 13:40:45 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-17 15:27:38 -0800 |
commit | 4eceba17200c03a2678edbdcff5d800aded607be (patch) | |
tree | 0cd0a1b32c2e5ee05076378de22418abb3d0c9de /include/net | |
parent | 76726ccb7f461c83040e7082cf95fe1dea2afd1f (diff) | |
download | linux-stable-4eceba17200c03a2678edbdcff5d800aded607be.tar.gz linux-stable-4eceba17200c03a2678edbdcff5d800aded607be.tar.bz2 linux-stable-4eceba17200c03a2678edbdcff5d800aded607be.zip |
ethtool: add compat for flash update
If driver does not support ethtool flash update operation
call into devlink.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/devlink.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 18d7a051f412..a2da49dd9147 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1195,11 +1195,18 @@ devlink_health_report(struct devlink_health_reporter *reporter, #if IS_REACHABLE(CONFIG_NET_DEVLINK) void devlink_compat_running_version(struct net_device *dev, char *buf, size_t len); +int devlink_compat_flash_update(struct net_device *dev, const char *file_name); #else static inline void devlink_compat_running_version(struct net_device *dev, char *buf, size_t len) { } + +static inline int +devlink_compat_flash_update(struct net_device *dev, const char *file_name) +{ + return -EOPNOTSUPP; +} #endif #endif /* _NET_DEVLINK_H_ */ |