Lines Matching +full:ethernet +full:- +full:pse

1 // SPDX-License-Identifier: GPL-2.0-only
3 // ethtool interface for for Ethernet PSE (Power Sourcing Equipment)
10 #include "linux/pse-pd/pse.h"
38 struct phy_device *phydev = dev->phydev; in pse_get_pse_attributes()
42 return -EOPNOTSUPP; in pse_get_pse_attributes()
45 if (!phydev->psec) { in pse_get_pse_attributes()
46 NL_SET_ERR_MSG(extack, "No PSE is attached"); in pse_get_pse_attributes()
47 return -EOPNOTSUPP; in pse_get_pse_attributes()
50 memset(&data->status, 0, sizeof(data->status)); in pse_get_pse_attributes()
52 return pse_ethtool_get_status(phydev->psec, extack, &data->status); in pse_get_pse_attributes()
60 struct net_device *dev = reply_base->dev; in pse_prepare_data()
67 ret = pse_get_pse_attributes(dev, info ? info->extack : NULL, data); in pse_prepare_data()
78 const struct pse_control_status *st = &data->status; in pse_reply_size()
81 if (st->podl_admin_state > 0) in pse_reply_size()
83 if (st->podl_pw_status > 0) in pse_reply_size()
94 const struct pse_control_status *st = &data->status; in pse_fill_reply()
96 if (st->podl_admin_state > 0 && in pse_fill_reply()
98 st->podl_admin_state)) in pse_fill_reply()
99 return -EMSGSIZE; in pse_fill_reply()
101 if (st->podl_pw_status > 0 && in pse_fill_reply()
103 st->podl_pw_status)) in pse_fill_reply()
104 return -EMSGSIZE; in pse_fill_reply()
134 struct phy_device *phydev = dev->phydev; in pse_set_pse_config()
146 return -EOPNOTSUPP; in pse_set_pse_config()
149 if (!phydev->psec) { in pse_set_pse_config()
150 NL_SET_ERR_MSG(extack, "No PSE is attached"); in pse_set_pse_config()
151 return -EOPNOTSUPP; in pse_set_pse_config()
154 return pse_ethtool_set_config(phydev->psec, extack, &config); in pse_set_pse_config()
160 struct nlattr **tb = info->attrs; in ethnl_set_pse()
165 genl_info_net(info), info->extack, in ethnl_set_pse()
177 ret = pse_set_pse_config(dev, info->extack, tb); in ethnl_set_pse()