linux/net/ethtool/linkmodes.c

// SPDX-License-Identifier: GPL-2.0-only

#include "netlink.h"
#include "common.h"
#include "bitset.h"

/* LINKMODES_GET */

struct linkmodes_req_info {};

struct linkmodes_reply_data {};

#define LINKMODES_REPDATA(__reply_base)

const struct nla_policy ethnl_linkmodes_get_policy[] =;

static int linkmodes_prepare_data(const struct ethnl_req_info *req_base,
				  struct ethnl_reply_data *reply_base,
				  const struct genl_info *info)
{}

static int linkmodes_reply_size(const struct ethnl_req_info *req_base,
				const struct ethnl_reply_data *reply_base)
{}

static int linkmodes_fill_reply(struct sk_buff *skb,
				const struct ethnl_req_info *req_base,
				const struct ethnl_reply_data *reply_base)
{}

/* LINKMODES_SET */

const struct nla_policy ethnl_linkmodes_set_policy[] =;

/* Set advertised link modes to all supported modes matching requested speed,
 * lanes and duplex values. Called when autonegotiation is on, speed, lanes or
 * duplex is requested but no link mode change. This is done in userspace with
 * ioctl() interface, move it into kernel for netlink.
 * Returns true if advertised modes bitmap was modified.
 */
static bool ethnl_auto_linkmodes(struct ethtool_link_ksettings *ksettings,
				 bool req_speed, bool req_lanes, bool req_duplex)
{}

static bool ethnl_validate_master_slave_cfg(u8 cfg)
{}

static int ethnl_check_linkmodes(struct genl_info *info, struct nlattr **tb)
{}

static int ethnl_update_linkmodes(struct genl_info *info, struct nlattr **tb,
				  struct ethtool_link_ksettings *ksettings,
				  bool *mod, const struct net_device *dev)
{}

static int
ethnl_set_linkmodes_validate(struct ethnl_req_info *req_info,
			     struct genl_info *info)
{}

static int
ethnl_set_linkmodes(struct ethnl_req_info *req_info, struct genl_info *info)
{}

const struct ethnl_request_ops ethnl_linkmodes_request_ops =;