Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /usr/src/kernels/5.14.0-503.21.1.el9_5.x86_64/include/linux/
Dosya Yükle :
Şuanki Dosya : //usr/src/kernels/5.14.0-503.21.1.el9_5.x86_64/include/linux/phylib_stubs.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Stubs for the Network PHY library
 */

#include <linux/rtnetlink.h>

struct kernel_hwtstamp_config;
struct netlink_ext_ack;
struct phy_device;

#if IS_ENABLED(CONFIG_PHYLIB)

extern const struct phylib_stubs *phylib_stubs;

struct phylib_stubs {
	int (*hwtstamp_get)(struct phy_device *phydev,
			    struct kernel_hwtstamp_config *config);
	int (*hwtstamp_set)(struct phy_device *phydev,
			    struct kernel_hwtstamp_config *config,
			    struct netlink_ext_ack *extack);
};

static inline int phy_hwtstamp_get(struct phy_device *phydev,
				   struct kernel_hwtstamp_config *config)
{
	/* phylib_register_stubs() and phylib_unregister_stubs()
	 * also run under rtnl_lock().
	 */
	ASSERT_RTNL();

	if (!phylib_stubs)
		return -EOPNOTSUPP;

	return phylib_stubs->hwtstamp_get(phydev, config);
}

static inline int phy_hwtstamp_set(struct phy_device *phydev,
				   struct kernel_hwtstamp_config *config,
				   struct netlink_ext_ack *extack)
{
	/* phylib_register_stubs() and phylib_unregister_stubs()
	 * also run under rtnl_lock().
	 */
	ASSERT_RTNL();

	if (!phylib_stubs)
		return -EOPNOTSUPP;

	return phylib_stubs->hwtstamp_set(phydev, config, extack);
}

#else

static inline int phy_hwtstamp_get(struct phy_device *phydev,
				   struct kernel_hwtstamp_config *config)
{
	return -EOPNOTSUPP;
}

static inline int phy_hwtstamp_set(struct phy_device *phydev,
				   struct kernel_hwtstamp_config *config,
				   struct netlink_ext_ack *extack)
{
	return -EOPNOTSUPP;
}

#endif

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4