34 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright (c) 2024, Intel Corporation. */3 4#ifndef _ICE_SF_ETH_H_5#define _ICE_SF_ETH_H_6 7#include <linux/auxiliary_bus.h>8#include "ice.h"9 10struct ice_sf_dev {11 struct auxiliary_device adev;12 struct ice_dynamic_port *dyn_port;13 struct ice_sf_priv *priv;14};15 16struct ice_sf_priv {17 struct ice_sf_dev *dev;18 struct devlink_port devlink_port;19};20 21static inline struct22ice_sf_dev *ice_adev_to_sf_dev(struct auxiliary_device *adev)23{24 return container_of(adev, struct ice_sf_dev, adev);25}26 27int ice_sf_driver_register(void);28void ice_sf_driver_unregister(void);29 30int ice_sf_eth_activate(struct ice_dynamic_port *dyn_port,31 struct netlink_ext_ack *extack);32void ice_sf_eth_deactivate(struct ice_dynamic_port *dyn_port);33#endif /* _ICE_SF_ETH_H_ */34