# Re: \[PATCH net-next v9 02/13\] net: Make dev\_get\_hwtstamp\_phylib accessible

- From: Jakub Kicinski \<kuba@kernel.org\>
- Date: 2024-03-05 02:40:50 
- List: netdev
- Page: https://ratatoskr.run/netdev/2024/03/2520927
- Thread: https://ratatoskr.run/netdev/2024/02/2511310/t.md

```text
On Mon, 26 Feb 2024 14:39:53 +0100 Kory Maincent wrote:
> Make the dev_get_hwtstamp_phylib function accessible in prevision to use
> it from ethtool to read the hwtstamp current configuration.

ethtool can't be a module, exports are only needed for code which ends
up being called from modules. 

> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index f07c8374f29c..7f78aef73fe1 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -4005,6 +4005,8 @@ int generic_hwtstamp_set_lower(struct net_device *dev,
>  int dev_set_hwtstamp_phylib(struct net_device *dev,
>  			    struct kernel_hwtstamp_config *cfg,
>  			    struct netlink_ext_ack *extack);
> +int dev_get_hwtstamp_phylib(struct net_device *dev,
> +			    struct kernel_hwtstamp_config *cfg);

since we don't expect modules to call this, how about we move dev_set*
and the new declaration to net/core/dev.h ?
```
