diff mbox series

[net-next,v5,05/16] net: Make dev_set_hwtstamp_phylib accessible

Message ID 20231009155138.86458-6-kory.maincent@bootlin.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: Make timestamping selectable | expand

Checks

Context Check Description
netdev/series_format fail Series longer than 15 patches (and no cover letter)
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 4013 this patch: 4018
netdev/cc_maintainers warning 2 maintainers not CCed: f.fainelli@gmail.com glipus@gmail.com
netdev/build_clang fail Errors and warnings before: 303 this patch: 303
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 4353 this patch: 4358
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Kory Maincent Oct. 9, 2023, 3:51 p.m. UTC
From: Kory Maincent <kory.maincent@bootlin.com>

Make the dev_set_hwtstamp_phylib function accessible in prevision to use
it from ethtool to reset the tstamp current configuration.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
 include/linux/netdevice.h | 3 +++
 net/core/dev_ioctl.c      | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

Comments

Florian Fainelli Oct. 9, 2023, 9:09 p.m. UTC | #1
On 10/9/23 08:51, Köry Maincent wrote:
> From: Kory Maincent <kory.maincent@bootlin.com>
> 
> Make the dev_set_hwtstamp_phylib function accessible in prevision to use
> it from ethtool to reset the tstamp current configuration.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
>   include/linux/netdevice.h | 3 +++
>   net/core/dev_ioctl.c      | 6 +++---
>   2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index e070a4540fba..b9d0411836db 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -3922,6 +3922,9 @@ int generic_hwtstamp_get_lower(struct net_device *dev,
>   int generic_hwtstamp_set_lower(struct net_device *dev,
>   			       struct kernel_hwtstamp_config *kernel_cfg,
>   			       struct netlink_ext_ack *extack);
> +int dev_set_hwtstamp_phylib(struct net_device *dev,
> +			    struct kernel_hwtstamp_config *cfg,
> +			    struct netlink_ext_ack *extack);
>   int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *userdata);
>   unsigned int dev_get_flags(const struct net_device *);
>   int __dev_change_flags(struct net_device *dev, unsigned int flags,
> diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
> index b46aedc36939..342a667858ac 100644
> --- a/net/core/dev_ioctl.c
> +++ b/net/core/dev_ioctl.c
> @@ -322,9 +322,9 @@ static int dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr)
>    * frames and not forward them), it must set IFF_SEE_ALL_HWTSTAMP_REQUESTS in
>    * dev->priv_flags.
>    */
> -static int dev_set_hwtstamp_phylib(struct net_device *dev,
> -				   struct kernel_hwtstamp_config *cfg,
> -				   struct netlink_ext_ack *extack)
> +int dev_set_hwtstamp_phylib(struct net_device *dev,
> +			    struct kernel_hwtstamp_config *cfg,
> +			    struct netlink_ext_ack *extack)
>   {
>   	const struct net_device_ops *ops = dev->netdev_ops;
>   	bool phy_ts = phy_has_hwtstamp(dev->phydev);

Missing EXPORT_SYMBOL_GPL() here?
Kory Maincent Oct. 10, 2023, 7:40 a.m. UTC | #2
On Mon, 9 Oct 2023 14:09:29 -0700
Florian Fainelli <f.fainelli@gmail.com> wrote:

> > -static int dev_set_hwtstamp_phylib(struct net_device *dev,
> > -				   struct kernel_hwtstamp_config *cfg,
> > -				   struct netlink_ext_ack *extack)
> > +int dev_set_hwtstamp_phylib(struct net_device *dev,
> > +			    struct kernel_hwtstamp_config *cfg,
> > +			    struct netlink_ext_ack *extack)
> >   {
> >   	const struct net_device_ops *ops = dev->netdev_ops;
> >   	bool phy_ts = phy_has_hwtstamp(dev->phydev);  
> 
> Missing EXPORT_SYMBOL_GPL() here?

True. Will be fixed in next version.
diff mbox series

Patch

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index e070a4540fba..b9d0411836db 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3922,6 +3922,9 @@  int generic_hwtstamp_get_lower(struct net_device *dev,
 int generic_hwtstamp_set_lower(struct net_device *dev,
 			       struct kernel_hwtstamp_config *kernel_cfg,
 			       struct netlink_ext_ack *extack);
+int dev_set_hwtstamp_phylib(struct net_device *dev,
+			    struct kernel_hwtstamp_config *cfg,
+			    struct netlink_ext_ack *extack);
 int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *userdata);
 unsigned int dev_get_flags(const struct net_device *);
 int __dev_change_flags(struct net_device *dev, unsigned int flags,
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index b46aedc36939..342a667858ac 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -322,9 +322,9 @@  static int dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr)
  * frames and not forward them), it must set IFF_SEE_ALL_HWTSTAMP_REQUESTS in
  * dev->priv_flags.
  */
-static int dev_set_hwtstamp_phylib(struct net_device *dev,
-				   struct kernel_hwtstamp_config *cfg,
-				   struct netlink_ext_ack *extack)
+int dev_set_hwtstamp_phylib(struct net_device *dev,
+			    struct kernel_hwtstamp_config *cfg,
+			    struct netlink_ext_ack *extack)
 {
 	const struct net_device_ops *ops = dev->netdev_ops;
 	bool phy_ts = phy_has_hwtstamp(dev->phydev);