aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/devlink.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index cec6b4f109fa..7794e1601772 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -550,6 +550,20 @@ enum devlink_param_generic_id {
/* Firmware bundle identifier */
#define DEVLINK_INFO_VERSION_GENERIC_FW_BUNDLE_ID "fw.bundle_id"
+/**
+ * struct devlink_flash_update_params - Flash Update parameters
+ * @file_name: the name of the flash firmware file to update from
+ * @component: the flash component to update
+ *
+ * With the exception of file_name, drivers must opt-in to parameters by
+ * setting the appropriate bit in the supported_flash_update_params field in
+ * their devlink_ops structure.
+ */
+struct devlink_flash_update_params {
+ const char *file_name;
+ const char *component;
+};
+
#define DEVLINK_SUPPORT_FLASH_UPDATE_COMPONENT BIT(0)
struct devlink_region;
@@ -1112,8 +1126,8 @@ struct devlink_ops {
* parameters supported by the driver should be set in
* supported_flash_update_params.
*/
- int (*flash_update)(struct devlink *devlink, const char *file_name,
- const char *component,
+ int (*flash_update)(struct devlink *devlink,
+ struct devlink_flash_update_params *params,
struct netlink_ext_ack *extack);
/**
* @trap_init: Trap initialization function.