1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 2 /* Copyright (c) 2018 Mellanox Technologies. All rights reserved */ 3 4 #ifndef _MLXSW_CORE_ENV_H 5 #define _MLXSW_CORE_ENV_H 6 7 #include <linux/ethtool.h> 8 9 struct ethtool_modinfo; 10 struct ethtool_eeprom; 11 12 int mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core, int module, 13 int off, int *temp); 14 15 int mlxsw_env_get_module_info(struct mlxsw_core *mlxsw_core, int module, 16 struct ethtool_modinfo *modinfo); 17 18 int mlxsw_env_get_module_eeprom(struct net_device *netdev, 19 struct mlxsw_core *mlxsw_core, int module, 20 struct ethtool_eeprom *ee, u8 *data); 21 22 int 23 mlxsw_env_get_module_eeprom_by_page(struct mlxsw_core *mlxsw_core, u8 module, 24 const struct ethtool_module_eeprom *page, 25 struct netlink_ext_ack *extack); 26 27 int 28 mlxsw_env_module_overheat_counter_get(struct mlxsw_core *mlxsw_core, u8 module, 29 u64 *p_counter); 30 int mlxsw_env_init(struct mlxsw_core *core, struct mlxsw_env **p_env); 31 void mlxsw_env_fini(struct mlxsw_env *env); 32 33 #endif 34