/* SPDX-License-Identifier: GPL-2.0-only */12#include <uapi/linux/ethtool.h>3#include "netlink.h"45/**6* struct ethnl_module_fw_flash_ntf_params - module firmware flashing7* notifications parameters8* @portid: Netlink portid of sender.9* @seq: Sequence number of sender.10* @closed_sock: Indicates whether the socket was closed from user space.11*/12struct ethnl_module_fw_flash_ntf_params {13u32 portid;14u32 seq;15bool closed_sock;16};1718/**19* struct ethtool_module_fw_flash_params - module firmware flashing parameters20* @password: Module password. Only valid when @pass_valid is set.21* @password_valid: Whether the module password is valid or not.22*/23struct ethtool_module_fw_flash_params {24__be32 password;25u8 password_valid:1;26};2728/**29* struct ethtool_cmis_fw_update_params - CMIS firmware update specific30* parameters31* @dev: Pointer to the net_device to be flashed.32* @params: Module firmware flashing parameters.33* @ntf_params: Module firmware flashing notification parameters.34* @fw: Firmware to flash.35*/36struct ethtool_cmis_fw_update_params {37struct net_device *dev;38struct ethtool_module_fw_flash_params params;39struct ethnl_module_fw_flash_ntf_params ntf_params;40const struct firmware *fw;41};4243/**44* struct ethtool_module_fw_flash - module firmware flashing45* @list: List node for &module_fw_flash_work_list.46* @dev_tracker: Refcount tracker for @dev.47* @work: The flashing firmware work.48* @fw_update: CMIS firmware update specific parameters.49*/50struct ethtool_module_fw_flash {51struct list_head list;52netdevice_tracker dev_tracker;53struct work_struct work;54struct ethtool_cmis_fw_update_params fw_update;55};5657void ethnl_module_fw_flash_sock_destroy(struct ethnl_sock_priv *sk_priv);5859void60ethnl_module_fw_flash_ntf_err(struct net_device *dev,61struct ethnl_module_fw_flash_ntf_params *params,62char *err_msg, char *sub_err_msg);63void64ethnl_module_fw_flash_ntf_start(struct net_device *dev,65struct ethnl_module_fw_flash_ntf_params *params);66void67ethnl_module_fw_flash_ntf_complete(struct net_device *dev,68struct ethnl_module_fw_flash_ntf_params *params);69void70ethnl_module_fw_flash_ntf_in_progress(struct net_device *dev,71struct ethnl_module_fw_flash_ntf_params *params,72u64 done, u64 total);7374void ethtool_cmis_fw_update(struct ethtool_cmis_fw_update_params *params);757677