include/linux/mii_timestamper.h
Source file repositories/reference/linux-study-clean/include/linux/mii_timestamper.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mii_timestamper.h- Extension
.h- Size
- 3954 bytes
- Lines
- 129
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/ethtool.hlinux/skbuff.hlinux/net_tstamp.h
Detected Declarations
struct phy_devicestruct mii_timestamperstruct mii_timestamping_ctrlfunction register_mii_tstamp_controllerfunction unregister_mii_tstamp_controllerfunction unregister_mii_timestamper
Annotated Snippet
struct mii_timestamper {
bool (*rxtstamp)(struct mii_timestamper *mii_ts,
struct sk_buff *skb, int type);
void (*txtstamp)(struct mii_timestamper *mii_ts,
struct sk_buff *skb, int type);
int (*hwtstamp_set)(struct mii_timestamper *mii_ts,
struct kernel_hwtstamp_config *kernel_config,
struct netlink_ext_ack *extack);
int (*hwtstamp_get)(struct mii_timestamper *mii_ts,
struct kernel_hwtstamp_config *kernel_config);
void (*link_state)(struct mii_timestamper *mii_ts,
struct phy_device *phydev);
int (*ts_info)(struct mii_timestamper *mii_ts,
struct kernel_ethtool_ts_info *ts_info);
struct device *device;
};
/**
* struct mii_timestamping_ctrl - MII time stamping controller interface.
*
* @probe_channel: Callback into the controller driver announcing the
* presence of the 'port' channel. The 'device' field
* had been passed to register_mii_tstamp_controller().
* The driver must return either a pointer to a valid
* MII timestamper instance or PTR_ERR.
*
* @release_channel: Releases an instance obtained via .probe_channel.
*/
struct mii_timestamping_ctrl {
struct mii_timestamper *(*probe_channel)(struct device *device,
unsigned int port);
void (*release_channel)(struct device *device,
struct mii_timestamper *mii_ts);
};
#ifdef CONFIG_NETWORK_PHY_TIMESTAMPING
int register_mii_tstamp_controller(struct device *device,
struct mii_timestamping_ctrl *ctrl);
void unregister_mii_tstamp_controller(struct device *device);
struct mii_timestamper *register_mii_timestamper(struct device_node *node,
unsigned int port);
void unregister_mii_timestamper(struct mii_timestamper *mii_ts);
#else
static inline
int register_mii_tstamp_controller(struct device *device,
struct mii_timestamping_ctrl *ctrl)
{
return -EOPNOTSUPP;
}
static inline void unregister_mii_tstamp_controller(struct device *device)
{
}
static inline
struct mii_timestamper *register_mii_timestamper(struct device_node *node,
unsigned int port)
{
return NULL;
}
static inline void unregister_mii_timestamper(struct mii_timestamper *mii_ts)
{
}
#endif
#endif
Annotation
- Immediate include surface: `linux/device.h`, `linux/ethtool.h`, `linux/skbuff.h`, `linux/net_tstamp.h`.
- Detected declarations: `struct phy_device`, `struct mii_timestamper`, `struct mii_timestamping_ctrl`, `function register_mii_tstamp_controller`, `function unregister_mii_tstamp_controller`, `function unregister_mii_timestamper`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.