net: Add struct kernel_ethtool_ts_info
authorKory Maincent <kory.maincent@bootlin.com>
Tue, 9 Jul 2024 13:53:38 +0000 (15:53 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 15:02:26 +0000 (08:02 -0700)
In prevision to add new UAPI for hwtstamp we will be limited to the struct
ethtool_ts_info that is currently passed in fixed binary format through the
ETHTOOL_GET_TS_INFO ethtool ioctl. It would be good if new kernel code
already started operating on an extensible kernel variant of that
structure, similar in concept to struct kernel_hwtstamp_config vs struct
hwtstamp_config.

Since struct ethtool_ts_info is in include/uapi/linux/ethtool.h, here
we introduce the kernel-only structure in include/linux/ethtool.h.
The manual copy is then made in the function called by ETHTOOL_GET_TS_INFO.

Acked-by: Shannon Nelson <shannon.nelson@amd.com>
Acked-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-6-b5317f50df2a@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
101 files changed:
drivers/net/bonding/bond_main.c
drivers/net/can/dev/dev.c
drivers/net/can/peak_canfd/peak_canfd.c
drivers/net/can/usb/gs_usb.c
drivers/net/can/usb/peak_usb/pcan_usb_core.c
drivers/net/can/usb/peak_usb/pcan_usb_core.h
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
drivers/net/dsa/microchip/ksz_ptp.c
drivers/net/dsa/microchip/ksz_ptp.h
drivers/net/dsa/mv88e6xxx/hwtstamp.c
drivers/net/dsa/mv88e6xxx/hwtstamp.h
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/sja1105/sja1105_ptp.c
drivers/net/dsa/sja1105/sja1105_ptp.h
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/cadence/macb_main.c
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
drivers/net/ethernet/cisco/enic/enic_ethtool.c
drivers/net/ethernet/engleder/tsnep_ethtool.c
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
drivers/net/ethernet/freescale/fec_main.c
drivers/net/ethernet/freescale/gianfar_ethtool.c
drivers/net/ethernet/fungible/funeth/funeth_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h
drivers/net/ethernet/intel/e1000e/ethtool.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igc/igc_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h
drivers/net/ethernet/microchip/lan743x_ethtool.c
drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
drivers/net/ethernet/mscc/ocelot_net.c
drivers/net/ethernet/mscc/ocelot_ptp.c
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
drivers/net/ethernet/qlogic/qede/qede_ethtool.c
drivers/net/ethernet/qlogic/qede/qede_ptp.c
drivers/net/ethernet/qlogic/qede/qede_ptp.h
drivers/net/ethernet/renesas/ravb_main.c
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rtsn.c
drivers/net/ethernet/sfc/ethtool.c
drivers/net/ethernet/sfc/falcon/nic.h
drivers/net/ethernet/sfc/ptp.c
drivers/net/ethernet/sfc/ptp.h
drivers/net/ethernet/sfc/siena/ethtool.c
drivers/net/ethernet/sfc/siena/ptp.c
drivers/net/ethernet/sfc/siena/ptp.h
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/ti/am65-cpsw-ethtool.c
drivers/net/ethernet/ti/cpsw_ethtool.c
drivers/net/ethernet/ti/cpsw_priv.h
drivers/net/ethernet/ti/icssg/icssg_ethtool.c
drivers/net/ethernet/ti/netcp_ethss.c
drivers/net/ethernet/xscale/ixp4xx_eth.c
drivers/net/macvlan.c
drivers/net/netdevsim/ethtool.c
drivers/net/phy/bcm-phy-ptp.c
drivers/net/phy/dp83640.c
drivers/net/phy/micrel.c
drivers/net/phy/mscc/mscc_ptp.c
drivers/net/phy/nxp-c45-tja11xx.c
drivers/ptp/ptp_ines.c
drivers/s390/net/qeth_ethtool.c
include/linux/can/dev.h
include/linux/ethtool.h
include/linux/mii_timestamper.h
include/linux/phy.h
include/net/dsa.h
include/soc/mscc/ocelot.h
net/8021q/vlan_dev.c
net/dsa/user.c
net/ethtool/common.c
net/ethtool/common.h
net/ethtool/ioctl.c
net/ethtool/tsinfo.c
net/sched/sch_taprio.c

index d19aabf5d4fba723bbf268a17ea08b5d5dc9549d..af9ddd3902cc960bd1562b7b5d1b4df08079e790 100644 (file)
@@ -5755,10 +5755,10 @@ static void bond_ethtool_get_drvinfo(struct net_device *bond_dev,
 }
 
 static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
-                                   struct ethtool_ts_info *info)
+                                   struct kernel_ethtool_ts_info *info)
 {
        struct bonding *bond = netdev_priv(bond_dev);
-       struct ethtool_ts_info ts_info;
+       struct kernel_ethtool_ts_info ts_info;
        struct net_device *real_dev;
        bool sw_tx_support = false;
        struct list_head *iter;
index 83e724e0ab871c91e3460bfcab55595ea2f62f4a..87828f9530739c9622960b312fea48a817b44761 100644 (file)
@@ -376,7 +376,7 @@ EXPORT_SYMBOL(can_eth_ioctl_hwts);
  * supporting hardware timestamps
  */
 int can_ethtool_op_get_ts_info_hwts(struct net_device *dev,
-                                   struct ethtool_ts_info *info)
+                                   struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping =
                SOF_TIMESTAMPING_TX_SOFTWARE |
index 31c9c127e24bbac05da8b5ec6552c2a05ba77ace..b50005397463b6414cf99a0654bc2d92a34b6b99 100644 (file)
@@ -777,7 +777,7 @@ static const struct net_device_ops peak_canfd_netdev_ops = {
 };
 
 static int peak_get_ts_info(struct net_device *dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping =
                SOF_TIMESTAMPING_TX_SOFTWARE |
index 340297e3bec73a6773bdc719d6676b31ba78065e..bc86e9b329fd1079d71f43435e0469b32fbe02c2 100644 (file)
@@ -1148,7 +1148,7 @@ static int gs_usb_set_phys_id(struct net_device *netdev,
 }
 
 static int gs_usb_get_ts_info(struct net_device *netdev,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        struct gs_can *dev = netdev_priv(netdev);
 
index 1efa39e134f4ccefd6d3ab7717171fda86611d22..3d68fef46ded3ad9507b29cdc1581e182bdad992 100644 (file)
@@ -897,7 +897,7 @@ int peak_usb_set_eeprom(struct net_device *netdev,
        return 0;
 }
 
-int pcan_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
+int pcan_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping =
                SOF_TIMESTAMPING_TX_SOFTWARE |
index f6cf84bb718f00870996aaa71548c219db6fc7ba..abab00930b9dbcc3f316b349e75a70ec8ced113f 100644 (file)
@@ -145,7 +145,7 @@ void peak_usb_get_ts_time(struct peak_time_ref *time_ref, u32 ts, ktime_t *tv);
 int peak_usb_netif_rx_64(struct sk_buff *skb, u32 ts_low, u32 ts_high);
 void peak_usb_async_complete(struct urb *urb);
 void peak_usb_restart_complete(struct peak_usb_device *dev);
-int pcan_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info);
+int pcan_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info);
 
 /* common 32-bit CAN channel ID ethtool management */
 int peak_usb_get_eeprom_len(struct net_device *netdev);
index bd7aacc71a63f4924a66230f024d753d4ce4bdfe..ca2500aba96fa2f0d930fce9c67229d97b44e712 100644 (file)
@@ -16,7 +16,7 @@
 #include "hellcreek_ptp.h"
 
 int hellcreek_get_ts_info(struct dsa_switch *ds, int port,
-                         struct ethtool_ts_info *info)
+                         struct kernel_ethtool_ts_info *info)
 {
        struct hellcreek *hellcreek = ds->priv;
 
index 71af77efb28b206443f7e654f30f9901c1714787..7d88da2134f2ddc355332f498d2a0684c38123b1 100644 (file)
@@ -48,7 +48,7 @@ void hellcreek_port_txtstamp(struct dsa_switch *ds, int port,
                             struct sk_buff *skb);
 
 int hellcreek_get_ts_info(struct dsa_switch *ds, int port,
-                         struct ethtool_ts_info *info);
+                         struct kernel_ethtool_ts_info *info);
 
 long hellcreek_hwtstamp_work(struct ptp_clock_info *ptp);
 
index 1fe105913c758a2b4737235103799b8f8c5cea25..f0bd46e5d4ec0f64031caf544cca0931ebcf9ae5 100644 (file)
@@ -293,7 +293,7 @@ static int ksz_ptp_enable_mode(struct ksz_device *dev)
 /* The function is return back the capability of timestamping feature when
  * requested through ethtool -T <interface> utility
  */
-int ksz_get_ts_info(struct dsa_switch *ds, int port, struct ethtool_ts_info *ts)
+int ksz_get_ts_info(struct dsa_switch *ds, int port, struct kernel_ethtool_ts_info *ts)
 {
        struct ksz_device *dev = ds->priv;
        struct ksz_ptp_data *ptp_data;
index 0ca8ca4f804e9fa2b18ead351576f5491a2a531e..2f1783c0d723177ee90c4155bc83c84b1b84518d 100644 (file)
@@ -38,7 +38,7 @@ int ksz_ptp_clock_register(struct dsa_switch *ds);
 void ksz_ptp_clock_unregister(struct dsa_switch *ds);
 
 int ksz_get_ts_info(struct dsa_switch *ds, int port,
-                   struct ethtool_ts_info *ts);
+                   struct kernel_ethtool_ts_info *ts);
 int ksz_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr);
 int ksz_hwtstamp_set(struct dsa_switch *ds, int port, struct ifreq *ifr);
 void ksz_port_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb);
index 331b4ca089ffa63805c2cbe434a5ad28777fd9be..49e6e1355142dc95ab620e46db603fe17012f174 100644 (file)
@@ -64,7 +64,7 @@ static int mv88e6xxx_ptp_read(struct mv88e6xxx_chip *chip, int addr,
 #define TX_TSTAMP_TIMEOUT      msecs_to_jiffies(40)
 
 int mv88e6xxx_get_ts_info(struct dsa_switch *ds, int port,
-                         struct ethtool_ts_info *info)
+                         struct kernel_ethtool_ts_info *info)
 {
        const struct mv88e6xxx_ptp_ops *ptp_ops;
        struct mv88e6xxx_chip *chip;
index cf7fb6d660b175b741d1743e1a204b11c465db88..85acc758e3eb1c3f1d1abfab23200dd664727c9b 100644 (file)
@@ -121,7 +121,7 @@ void mv88e6xxx_port_txtstamp(struct dsa_switch *ds, int port,
                             struct sk_buff *skb);
 
 int mv88e6xxx_get_ts_info(struct dsa_switch *ds, int port,
-                         struct ethtool_ts_info *info);
+                         struct kernel_ethtool_ts_info *info);
 
 int mv88e6xxx_hwtstamp_setup(struct mv88e6xxx_chip *chip);
 void mv88e6xxx_hwtstamp_free(struct mv88e6xxx_chip *chip);
@@ -157,7 +157,7 @@ static inline void mv88e6xxx_port_txtstamp(struct dsa_switch *ds, int port,
 }
 
 static inline int mv88e6xxx_get_ts_info(struct dsa_switch *ds, int port,
-                                       struct ethtool_ts_info *info)
+                                       struct kernel_ethtool_ts_info *info)
 {
        return -EOPNOTSUPP;
 }
index d12c4e85baa77cfe6c5edd961bde16ef1d2366c8..e554699f06d4191208c498fac335f2dce98f4872 100644 (file)
@@ -1234,7 +1234,7 @@ static int felix_get_sset_count(struct dsa_switch *ds, int port, int sset)
 }
 
 static int felix_get_ts_info(struct dsa_switch *ds, int port,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        struct ocelot *ocelot = ds->priv;
 
index a7d41e7813982e35ed23c79df5e560eb3b660d80..a1f4ca6ad888f1b643a201e6925e835a9be9f132 100644 (file)
@@ -111,7 +111,7 @@ int sja1105_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr)
 }
 
 int sja1105_get_ts_info(struct dsa_switch *ds, int port,
-                       struct ethtool_ts_info *info)
+                       struct kernel_ethtool_ts_info *info)
 {
        struct sja1105_private *priv = ds->priv;
        struct sja1105_ptp_data *ptp_data = &priv->ptp_data;
index 416461ee95d2a11153f1f30e2f511f294498a9ae..8add2bd5f72842d1e08fca466ad0c72d1de8c17b 100644 (file)
@@ -101,7 +101,7 @@ void sja1105pqrs_ptp_cmd_packing(u8 *buf, struct sja1105_ptp_cmd *cmd,
                                 enum packing_op op);
 
 int sja1105_get_ts_info(struct dsa_switch *ds, int port,
-                       struct ethtool_ts_info *ts);
+                       struct kernel_ethtool_ts_info *ts);
 
 void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int slot,
                              struct sk_buff *clone);
index 58e7e88aae5bca40570e8cd4e0ee6cc67aaab2fc..21407a26f806146b991cbebb6535f97e23d88001 100644 (file)
@@ -577,7 +577,7 @@ static int xgbe_set_rxfh(struct net_device *netdev,
 }
 
 static int xgbe_get_ts_info(struct net_device *netdev,
-                           struct ethtool_ts_info *ts_info)
+                           struct kernel_ethtool_ts_info *ts_info)
 {
        struct xgbe_prv_data *pdata = netdev_priv(netdev);
 
index a2606ee3b0a56986ebd2f1715bc6bd4a2b764484..d0aecd1d735738ad77925d57f6bd9485ae7e2c37 100644 (file)
@@ -652,7 +652,7 @@ static int aq_ethtool_set_wol(struct net_device *ndev,
 }
 
 static int aq_ethtool_get_ts_info(struct net_device *ndev,
-                                 struct ethtool_ts_info *info)
+                                 struct kernel_ethtool_ts_info *info)
 {
        struct aq_nic_s *aq_nic = netdev_priv(ndev);
 
index 58956ed8f531fd94ff03c51b11e2ce629de5d9c8..c7b56a5e54254082743f671bf3cfd6ed8e1aab21 100644 (file)
@@ -3634,7 +3634,7 @@ static int bnx2x_set_channels(struct net_device *dev,
 }
 
 static int bnx2x_get_ts_info(struct net_device *dev,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        struct bnx2x *bp = netdev_priv(dev);
 
index bf157f6cc0427eaca65f00e65398672450c8a0a1..fcbf38f79c23f706b5e1d01741ec0303226b9e0d 100644 (file)
@@ -5013,7 +5013,7 @@ static int bnxt_get_dump_data(struct net_device *dev, struct ethtool_dump *dump,
 }
 
 static int bnxt_get_ts_info(struct net_device *dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct bnxt *bp = netdev_priv(dev);
        struct bnxt_ptp_cfg *ptp;
index 1589a49b876c96132f57704b2aed3980c6fbac21..0ec5f01551f9805b0fb765cb52a8986a93802169 100644 (file)
@@ -6141,7 +6141,7 @@ static void tg3_refclk_write(struct tg3 *tp, u64 newval)
 
 static inline void tg3_full_lock(struct tg3 *tp, int irq_sync);
 static inline void tg3_full_unlock(struct tg3 *tp);
-static int tg3_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
+static int tg3_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info)
 {
        struct tg3 *tp = netdev_priv(dev);
 
index 122663ff783402a9487e6a249576722e06d911f8..ea71612f6b36fb1969075c5e3a06515e1354a450 100644 (file)
@@ -1168,7 +1168,7 @@ struct macb_ptp_info {
        s32 (*get_ptp_max_adj)(void);
        unsigned int (*get_tsu_rate)(struct macb *bp);
        int (*get_ts_info)(struct net_device *dev,
-                          struct ethtool_ts_info *info);
+                          struct kernel_ethtool_ts_info *info);
        int (*get_hwtst)(struct net_device *netdev,
                         struct kernel_hwtstamp_config *tstamp_config);
        int (*set_hwtst)(struct net_device *netdev,
index cecc3d6e630f8bf570db3694f76e5500291258b5..11665be3a22c7a352578d608ee093a3f2aea7b95 100644 (file)
@@ -3399,7 +3399,7 @@ static s32 gem_get_ptp_max_adj(void)
 }
 
 static int gem_get_ts_info(struct net_device *dev,
-                          struct ethtool_ts_info *info)
+                          struct kernel_ethtool_ts_info *info)
 {
        struct macb *bp = netdev_priv(dev);
 
@@ -3440,7 +3440,7 @@ static struct macb_ptp_info gem_ptp_info = {
 #endif
 
 static int macb_get_ts_info(struct net_device *netdev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct macb *bp = netdev_priv(netdev);
 
index d3e07b6ed5e1239f26939f8832fb6f2d3f6976c8..5835965dbc32e663a702d5a9056dec245cb53b92 100644 (file)
@@ -2497,7 +2497,7 @@ ret_intrmod:
 }
 
 static int lio_get_ts_info(struct net_device *netdev,
-                          struct ethtool_ts_info *info)
+                          struct kernel_ethtool_ts_info *info)
 {
        struct lio *lio = GET_LIO(netdev);
 
index 34125b8cd935b6e5ea08266dc74874cbd762c75c..6a04d25301769230ef18259905f1d0f0b4c34949 100644 (file)
@@ -836,7 +836,7 @@ static int nicvf_set_pauseparam(struct net_device *dev,
 }
 
 static int nicvf_get_ts_info(struct net_device *netdev,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        struct nicvf *nic = netdev_priv(netdev);
 
index 47eecde36285007ccdb30d54d2c8cf2f5f71d651..3d091947ae00f0838ed8b76e7088d08ea64d9d3e 100644 (file)
@@ -1550,7 +1550,7 @@ out_free_fw:
        return ret;
 }
 
-static int get_ts_info(struct net_device *dev, struct ethtool_ts_info *ts_info)
+static int get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *ts_info)
 {
        struct port_info *pi = netdev_priv(dev);
        struct  adapter *adapter = pi->adapter;
index a42f3f280f3e330bedfc446103e050020a11af54..f2f1055880b29d6a8d9202d67270b84a81ac7926 100644 (file)
@@ -599,7 +599,7 @@ static int enic_set_rxfh(struct net_device *netdev,
 }
 
 static int enic_get_ts_info(struct net_device *netdev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
                                SOF_TIMESTAMPING_RX_SOFTWARE |
index 65ec1abc944211471f5eef3d564718c2c6b566fd..9aa286ba1f00bb00e4c2eda75ab1ca0cfaa72a6a 100644 (file)
@@ -305,7 +305,7 @@ static void tsnep_ethtool_get_channels(struct net_device *netdev,
 }
 
 static int tsnep_ethtool_get_ts_info(struct net_device *netdev,
-                                    struct ethtool_ts_info *info)
+                                    struct kernel_ethtool_ts_info *info)
 {
        struct tsnep_adapter *adapter = netdev_priv(netdev);
 
index 5bd0b36d1feb58f8045008e3000c4b1ed38e1f51..0e923d805732af881cc1fa08b98d7eac44b324f3 100644 (file)
@@ -394,7 +394,7 @@ static int dpaa_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
 }
 
 static int dpaa_get_ts_info(struct net_device *net_dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct device *dev = net_dev->dev.parent;
        struct device_node *mac_node = dev->of_node;
index e80e9388c71f39224890713021dd1a606e51b282..7f476519b7adf8039d4ec7c0b4dadfdb435ff7cf 100644 (file)
@@ -794,7 +794,7 @@ int dpaa2_phc_index = -1;
 EXPORT_SYMBOL(dpaa2_phc_index);
 
 static int dpaa2_eth_get_ts_info(struct net_device *dev,
-                                struct ethtool_ts_info *info)
+                                struct kernel_ethtool_ts_info *info)
 {
        if (!dpaa2_ptp)
                return ethtool_op_get_ts_info(dev, info);
index f7753ea5b57e64c4e9bcdf812b99fbc8fc4a8135..5e684b23c5f512b300ac62aba6440ae4c07d7662 100644 (file)
@@ -841,7 +841,7 @@ static int enetc_set_coalesce(struct net_device *ndev,
 }
 
 static int enetc_get_ts_info(struct net_device *ndev,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        int *phc_idx;
 
index fb19295529a218343d857656fb50d4516d5f8a1a..a923cb95cdc62c0cee6a91aca7f5ba582de99260 100644 (file)
@@ -2768,7 +2768,7 @@ static void fec_enet_get_regs(struct net_device *ndev,
 }
 
 static int fec_enet_get_ts_info(struct net_device *ndev,
-                               struct ethtool_ts_info *info)
+                               struct kernel_ethtool_ts_info *info)
 {
        struct fec_enet_private *fep = netdev_priv(ndev);
 
index 7a15b9245698bb910d9a22f5398e49ea8b13f9cd..f581402ad740b5ac74d307bf6a35a624a52887b7 100644 (file)
@@ -1448,7 +1448,7 @@ static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
 }
 
 static int gfar_get_ts_info(struct net_device *dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct gfar_private *priv = netdev_priv(dev);
        struct platform_device *ptp_dev;
index 4edd0adfc6c7ba947d36d01d008c9ee63f578b92..7f081e6e8c877cb64c8b6eff04be23856acd603f 100644 (file)
@@ -1040,7 +1040,7 @@ static int fun_set_rxfh(struct net_device *netdev,
 }
 
 static int fun_get_ts_info(struct net_device *netdev,
-                          struct ethtool_ts_info *info)
+                          struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
                                SOF_TIMESTAMPING_RX_HARDWARE |
index 7cebb08bd32032a4901ec63502ec96032d6561d8..27dbe367f3d355307a5b237a26c89f9d1986de8e 100644 (file)
@@ -786,7 +786,7 @@ struct hnae3_ae_ops {
        void (*get_rx_hwts)(struct hnae3_handle *handle, struct sk_buff *skb,
                            u32 nsec, u32 sec);
        int (*get_ts_info)(struct hnae3_handle *handle,
-                          struct ethtool_ts_info *info);
+                          struct kernel_ethtool_ts_info *info);
        int (*get_link_diagnosis_info)(struct hnae3_handle *handle,
                                       u32 *status_code);
        void (*clean_vf_config)(struct hnae3_ae_dev *ae_dev, int num_vfs);
index 941cb529d671fb2bf2fc12ceb5890fec093dc137..b1e9883473476956d793f198c1c45f01fc16b343 100644 (file)
@@ -2009,7 +2009,7 @@ static int hns3_set_tunable(struct net_device *netdev,
                                 ETHTOOL_RING_USE_TX_PUSH)
 
 static int hns3_get_ts_info(struct net_device *netdev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct hnae3_handle *handle = hns3_get_handle(netdev);
 
index 507d7ce26d831765a542f21a2c41d1f0bf79e732..5fff8ed388f8b69ee73d8e2f84ac53ef617edd0c 100644 (file)
@@ -378,7 +378,7 @@ int hclge_ptp_set_cfg(struct hclge_dev *hdev, struct ifreq *ifr)
 }
 
 int hclge_ptp_get_ts_info(struct hnae3_handle *handle,
-                         struct ethtool_ts_info *info)
+                         struct kernel_ethtool_ts_info *info)
 {
        struct hclge_vport *vport = hclge_get_vport(handle);
        struct hclge_dev *hdev = vport->back;
index bbee74cd8404b9ddda3773f4b1140f265ecb311f..63483636c074c8acf0355071d0e06b3da4a06c38 100644 (file)
@@ -138,6 +138,6 @@ int hclge_ptp_set_cfg(struct hclge_dev *hdev, struct ifreq *ifr);
 int hclge_ptp_init(struct hclge_dev *hdev);
 void hclge_ptp_uninit(struct hclge_dev *hdev);
 int hclge_ptp_get_ts_info(struct hnae3_handle *handle,
-                         struct ethtool_ts_info *info);
+                         struct kernel_ethtool_ts_info *info);
 int hclge_ptp_cfg_qry(struct hclge_dev *hdev, u32 *cfg);
 #endif
index 85da20778e0f8c268b20b81b6b1f2dbf0fc7f084..9364bc2b4eb155337631906a9346db77357eba4b 100644 (file)
@@ -2263,7 +2263,7 @@ static int e1000e_set_eee(struct net_device *netdev, struct ethtool_keee *edata)
 }
 
 static int e1000e_get_ts_info(struct net_device *netdev,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
 
index 4e28785c9fb2f42a0d25ae51c7c91aabb7a60ccf..1d0d2e526adb4503d6ef1c28687c200f3cba53be 100644 (file)
@@ -2546,7 +2546,7 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
 }
 
 static int i40e_get_ts_info(struct net_device *dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct i40e_pf *pf = i40e_netdev_to_pf(dev);
 
index 62c8205fcebaecf0b5cf766fae6ac7833c38f4a7..b8f142f043302c13776a72a6de4b7184585ea234 100644 (file)
@@ -3434,7 +3434,7 @@ ice_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh,
 }
 
 static int
-ice_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
+ice_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info)
 {
        struct ice_pf *pf = ice_netdev_to_pf(dev);
 
index 61d72250c0ed070e83170ddd6f076fcf4bf2a8be..06b9970dffad0cb501133eb7ee9190b13dc7b36d 100644 (file)
@@ -2381,7 +2381,7 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
 }
 
 static int igb_get_ts_info(struct net_device *dev,
-                          struct ethtool_ts_info *info)
+                          struct kernel_ethtool_ts_info *info)
 {
        struct igb_adapter *adapter = netdev_priv(dev);
 
index 0cd2bd695db1dfddd64d2c82027f4206b6609268..9c3adb18f922e7af986c5cd577133dd0e5d2d71f 100644 (file)
@@ -1559,7 +1559,7 @@ static int igc_ethtool_set_channels(struct net_device *netdev,
 }
 
 static int igc_ethtool_get_ts_info(struct net_device *dev,
-                                  struct ethtool_ts_info *info)
+                                  struct kernel_ethtool_ts_info *info)
 {
        struct igc_adapter *adapter = netdev_priv(dev);
 
index 6e6e6f1847b61f5cd3a5e43d701c736a04a652a9..4cac76254966da0bb5d33cfd1e4566aaddb27bd8 100644 (file)
@@ -3170,7 +3170,7 @@ static int ixgbe_set_rxfh(struct net_device *netdev,
 }
 
 static int ixgbe_get_ts_info(struct net_device *dev,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        struct ixgbe_adapter *adapter = netdev_priv(dev);
 
index 9adf4301c9b1d7ab3b2ffe8cc6cd36ce7d414afb..8c45ad983abc0c4b94a731a948dd6f56f48941ef 100644 (file)
@@ -5259,7 +5259,7 @@ static int mvpp2_get_ts_config(struct mvpp2_port *port, struct ifreq *ifr)
 }
 
 static int mvpp2_ethtool_get_ts_info(struct net_device *dev,
-                                    struct ethtool_ts_info *info)
+                                    struct kernel_ethtool_ts_info *info)
 {
        struct mvpp2_port *port = netdev_priv(dev);
 
index 7f786de6101483a775c8aa4f12789631040fdd95..0db62eb0dab3f06866c316521bcaf65ddb5037dc 100644 (file)
@@ -954,7 +954,7 @@ static u32 otx2_get_link(struct net_device *netdev)
 }
 
 static int otx2_get_ts_info(struct net_device *netdev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct otx2_nic *pfvf = netdev_priv(netdev);
 
index 0606f18e5bbedd2216cbbc045b938d61f617aafc..943d6918c2ec995f91491d4e76b1e5d71d0e102c 100644 (file)
@@ -1884,7 +1884,7 @@ out:
 }
 
 static int mlx4_en_get_ts_info(struct net_device *dev,
-                              struct ethtool_ts_info *info)
+                              struct kernel_ethtool_ts_info *info)
 {
        struct mlx4_en_priv *priv = netdev_priv(dev);
        struct mlx4_en_dev *mdev = priv->mdev;
index 6a343a8f162f3b1c9e6346d92d40e7eff98e7a32..5fd82c67b6ab7f9e827c936408d66cc93c5db51e 100644 (file)
@@ -1191,7 +1191,7 @@ int mlx5e_set_per_queue_coalesce(struct net_device *dev, u32 queue,
 u32 mlx5e_ethtool_get_rxfh_key_size(struct mlx5e_priv *priv);
 u32 mlx5e_ethtool_get_rxfh_indir_size(struct mlx5e_priv *priv);
 int mlx5e_ethtool_get_ts_info(struct mlx5e_priv *priv,
-                             struct ethtool_ts_info *info);
+                             struct kernel_ethtool_ts_info *info);
 int mlx5e_ethtool_flash_device(struct mlx5e_priv *priv,
                               struct ethtool_flash *flash);
 
index 3320f12ba2dbd3b9709f90568d91c35a7a26dad3..cbb3945529d7c3e30134011c7137931cfc0c0ca6 100644 (file)
@@ -1658,7 +1658,7 @@ static int mlx5e_set_pauseparam(struct net_device *netdev,
 }
 
 int mlx5e_ethtool_get_ts_info(struct mlx5e_priv *priv,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        struct mlx5_core_dev *mdev = priv->mdev;
 
@@ -1682,7 +1682,7 @@ int mlx5e_ethtool_get_ts_info(struct mlx5e_priv *priv,
 }
 
 static int mlx5e_get_ts_info(struct net_device *dev,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        struct mlx5e_priv *priv = netdev_priv(dev);
 
index 779d92b762d36c8a08085fc46181cfad2ccbed1b..905bdbaffb9a29a3026653b20477addb3a325d66 100644 (file)
@@ -136,7 +136,7 @@ static int mlx5i_get_coalesce(struct net_device *netdev,
 }
 
 static int mlx5i_get_ts_info(struct net_device *netdev,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        struct mlx5e_priv *priv = mlx5i_epriv(netdev);
 
index bb0586b45c8d781d736f72693c32300eb40093d1..8d3c61287696ecfb0530a940c6471becbef1ec01 100644 (file)
@@ -238,7 +238,7 @@ struct mlxsw_sp_ptp_ops {
                            struct hwtstamp_config *config);
        void (*shaper_work)(struct work_struct *work);
        int (*get_ts_info)(struct mlxsw_sp *mlxsw_sp,
-                          struct ethtool_ts_info *info);
+                          struct kernel_ethtool_ts_info *info);
        int (*get_stats_count)(void);
        void (*get_stats_strings)(u8 **p);
        void (*get_stats)(struct mlxsw_sp_port *mlxsw_sp_port,
index c79da1411d33a23bd2279314cd41719f6e6db60d..2bed8c86b7cfc578bb56ec6855e69fa28c70b75e 100644 (file)
@@ -1082,7 +1082,7 @@ mlxsw_sp_set_module_eeprom_by_page(struct net_device *dev,
 }
 
 static int
-mlxsw_sp_get_ts_info(struct net_device *netdev, struct ethtool_ts_info *info)
+mlxsw_sp_get_ts_info(struct net_device *netdev, struct kernel_ethtool_ts_info *info)
 {
        struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev);
        struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
index cbb6c75a66206107bf40b06f2f78f2d3d6a62da2..5b174cb95eb8a360dd20ce70e19e94110860be68 100644 (file)
@@ -1276,7 +1276,7 @@ int mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port,
 }
 
 int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        info->phc_index = ptp_clock_index(mlxsw_sp->clock->ptp);
 
@@ -1661,7 +1661,7 @@ err_get_message_types:
 }
 
 int mlxsw_sp2_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        info->phc_index = ptp_clock_index(mlxsw_sp->clock->ptp);
 
index a8b88230959a23f524f6c437b51bec5374796a94..769095d4932d588210faebc3ece1a18153ef2553 100644 (file)
@@ -11,7 +11,7 @@ struct mlxsw_sp;
 struct mlxsw_sp_port;
 struct mlxsw_sp_ptp_clock;
 
-static inline int mlxsw_sp_ptp_get_ts_info_noptp(struct ethtool_ts_info *info)
+static inline int mlxsw_sp_ptp_get_ts_info_noptp(struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
                                SOF_TIMESTAMPING_SOFTWARE;
@@ -50,7 +50,7 @@ int mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port,
 void mlxsw_sp1_ptp_shaper_work(struct work_struct *work);
 
 int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                             struct ethtool_ts_info *info);
+                             struct kernel_ethtool_ts_info *info);
 
 int mlxsw_sp1_get_stats_count(void);
 void mlxsw_sp1_get_stats_strings(u8 **p);
@@ -84,7 +84,7 @@ int mlxsw_sp2_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port,
                               struct hwtstamp_config *config);
 
 int mlxsw_sp2_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                             struct ethtool_ts_info *info);
+                             struct kernel_ethtool_ts_info *info);
 
 int mlxsw_sp2_ptp_txhdr_construct(struct mlxsw_core *mlxsw_core,
                                  struct mlxsw_sp_port *mlxsw_sp_port,
@@ -152,7 +152,7 @@ static inline void mlxsw_sp1_ptp_shaper_work(struct work_struct *work)
 }
 
 static inline int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                                           struct ethtool_ts_info *info)
+                                           struct kernel_ethtool_ts_info *info)
 {
        return mlxsw_sp_ptp_get_ts_info_noptp(info);
 }
@@ -227,7 +227,7 @@ mlxsw_sp2_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port,
 }
 
 static inline int mlxsw_sp2_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
-                                           struct ethtool_ts_info *info)
+                                           struct kernel_ethtool_ts_info *info)
 {
        return mlxsw_sp_ptp_get_ts_info_noptp(info);
 }
index 0d1740d64676939680ede59fbaa1ce6402e39e3a..3a63ec091413857cb888e21517dd3f12f2ee0cae 100644 (file)
@@ -1029,7 +1029,7 @@ static int lan743x_ethtool_set_rxfh(struct net_device *netdev,
 }
 
 static int lan743x_ethtool_get_ts_info(struct net_device *netdev,
-                                      struct ethtool_ts_info *ts_info)
+                                      struct kernel_ethtool_ts_info *ts_info)
 {
        struct lan743x_adapter *adapter = netdev_priv(netdev);
 
index c0fc85ac5db3389a536970e577dc294903dd81b3..aec7066d83b3cc7557bd5f9890d13f07519e31ed 100644 (file)
@@ -538,7 +538,7 @@ static int lan966x_set_pauseparam(struct net_device *dev,
 }
 
 static int lan966x_get_ts_info(struct net_device *dev,
-                              struct ethtool_ts_info *info)
+                              struct kernel_ethtool_ts_info *info)
 {
        struct lan966x_port *port = netdev_priv(dev);
        struct lan966x *lan966x = port->lan966x;
index a06dc5a9b3551858cb9a74b3f7aefa2e075d7d94..4f800c1a435d9840b850ea7c713cc462392379c5 100644 (file)
@@ -1183,7 +1183,7 @@ static void sparx5_config_port_stats(struct sparx5 *sparx5, int portno)
 }
 
 static int sparx5_get_ts_info(struct net_device *dev,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        struct sparx5_port *port = netdev_priv(dev);
        struct sparx5 *sparx5 = port->sparx5;
index 21a87a3fc5562d39cc1539a1c3ab84fb2d8c78dc..7c9540a7172514c816e29a23f40c0cd50b4ab30a 100644 (file)
@@ -980,7 +980,7 @@ static int ocelot_port_get_sset_count(struct net_device *dev, int sset)
 }
 
 static int ocelot_port_get_ts_info(struct net_device *dev,
-                                  struct ethtool_ts_info *info)
+                                  struct kernel_ethtool_ts_info *info)
 {
        struct ocelot_port_private *priv = netdev_priv(dev);
        struct ocelot *ocelot = priv->port.ocelot;
index cb32234a5bf1bcc01a827bf0a6450d7d2c37dfe3..b3c28260adf8804e7708726d7dc9dc4a699d9ab4 100644 (file)
@@ -580,7 +580,7 @@ int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr)
 EXPORT_SYMBOL(ocelot_hwstamp_set);
 
 int ocelot_get_ts_info(struct ocelot *ocelot, int port,
-                      struct ethtool_ts_info *info)
+                      struct kernel_ethtool_ts_info *info)
 {
        info->phc_index = ocelot->ptp_clock ?
                          ptp_clock_index(ocelot->ptp_clock) : -1;
index 185a03514ae3441798928e90efec38c485953dfc..4619fd74f3e3d2a9dbab80b0caca2a707a901684 100644 (file)
@@ -977,7 +977,7 @@ static int ionic_get_module_eeprom(struct net_device *netdev,
 }
 
 static int ionic_get_ts_info(struct net_device *netdev,
-                            struct ethtool_ts_info *info)
+                            struct kernel_ethtool_ts_info *info)
 {
        struct ionic_lif *lif = netdev_priv(netdev);
        struct ionic *ionic = lif->ionic;
index f497f6ca101887aff04681669b2af20e03b0bb33..97b059be1041e70289e8002000dda851dff53af3 100644 (file)
@@ -1137,7 +1137,7 @@ static int qede_set_channels(struct net_device *dev,
 }
 
 static int qede_get_ts_info(struct net_device *dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct qede_dev *edev = netdev_priv(dev);
 
index 747cc5e2bb7887fb40c942d2f80dbbf7c1418445..63e3dac4d5f75bb97a040f230a677173f43c81b2 100644 (file)
@@ -321,7 +321,7 @@ int qede_ptp_hw_ts(struct qede_dev *edev, struct ifreq *ifr)
                            sizeof(config)) ? -EFAULT : 0;
 }
 
-int qede_ptp_get_ts_info(struct qede_dev *edev, struct ethtool_ts_info *info)
+int qede_ptp_get_ts_info(struct qede_dev *edev, struct kernel_ethtool_ts_info *info)
 {
        struct qede_ptp *ptp = edev->ptp;
 
index 1db0f021c6457121ef9bbd0075a1505b6e8f9d89..adafc894797ec2a73dc9d72dd7b6e04c659ea13a 100644 (file)
@@ -17,7 +17,7 @@ void qede_ptp_tx_ts(struct qede_dev *edev, struct sk_buff *skb);
 int qede_ptp_hw_ts(struct qede_dev *edev, struct ifreq *req);
 void qede_ptp_disable(struct qede_dev *edev);
 int qede_ptp_enable(struct qede_dev *edev);
-int qede_ptp_get_ts_info(struct qede_dev *edev, struct ethtool_ts_info *ts);
+int qede_ptp_get_ts_info(struct qede_dev *edev, struct kernel_ethtool_ts_info *ts);
 
 static inline void qede_ptp_record_rx_ts(struct qede_dev *edev,
                                         union eth_rx_cqe *cqe,
index 6605e4f4af538106f7d2bb1854d39e3b3d7693e2..c02fb296bf7d7aa55b317139da32f47ceda1c6d5 100644 (file)
@@ -1737,7 +1737,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
 }
 
 static int ravb_get_ts_info(struct net_device *ndev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct ravb_private *priv = netdev_priv(ndev);
        const struct ravb_hw_info *hw_info = priv->info;
index 24c90d8f5a442eec61f2923c8a13e641b63b811d..ff50e20856ec15c9fb5fc0f5b39fe2fc3c5c7b2a 100644 (file)
@@ -1809,7 +1809,7 @@ static const struct net_device_ops rswitch_netdev_ops = {
        .ndo_set_mac_address = eth_mac_addr,
 };
 
-static int rswitch_get_ts_info(struct net_device *ndev, struct ethtool_ts_info *info)
+static int rswitch_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *info)
 {
        struct rswitch_device *rdev = netdev_priv(ndev);
 
index ad69d47463cbd3c0cf29dce596d729803d243019..577227c007ab428645a63447371805c63f8c6705 100644 (file)
@@ -1213,7 +1213,7 @@ static const struct net_device_ops rtsn_netdev_ops = {
 };
 
 static int rtsn_get_ts_info(struct net_device *ndev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct rtsn_private *priv = netdev_priv(ndev);
 
index 0f5c68b8bab7411400bea05a73a53db85e142480..7c887160e2ef8c168e266e0a3000cf140182074d 100644 (file)
@@ -226,7 +226,7 @@ static void efx_ethtool_get_fec_stats(struct net_device *net_dev,
 }
 
 static int efx_ethtool_get_ts_info(struct net_device *net_dev,
-                                  struct ethtool_ts_info *ts_info)
+                                  struct kernel_ethtool_ts_info *ts_info)
 {
        struct efx_nic *efx = efx_netdev_priv(net_dev);
 
index 9f413474bd9fc42d3bf07b6441e8eabe8ae274c2..ada6e036fd9728dab43204beb8f43ba2fa7f806f 100644 (file)
@@ -297,7 +297,7 @@ static inline struct falcon_board *falcon_board(struct ef4_nic *efx)
        return &data->board;
 }
 
-struct ethtool_ts_info;
+struct kernel_ethtool_ts_info;
 
 extern const struct ef4_nic_type falcon_a1_nic_type;
 extern const struct ef4_nic_type falcon_b0_nic_type;
index c3bffbf0ba2b76b65af6d5fcca67ed19e6e9737e..6fd2fdbaa4181915ff1262636887b92c25bf1d46 100644 (file)
@@ -1864,7 +1864,7 @@ static int efx_ptp_ts_init(struct efx_nic *efx, struct kernel_hwtstamp_config *i
        return 0;
 }
 
-void efx_ptp_get_ts_info(struct efx_nic *efx, struct ethtool_ts_info *ts_info)
+void efx_ptp_get_ts_info(struct efx_nic *efx, struct kernel_ethtool_ts_info *ts_info)
 {
        struct efx_ptp_data *ptp = efx->ptp_data;
        struct efx_nic *primary = efx->primary;
index 2f30dbb490d28b038ef5da3f1738c1c815ee9b5b..6946203499ef1ecc5bfd374366efc70a6a1a9453 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/net_tstamp.h>
 #include "net_driver.h"
 
-struct ethtool_ts_info;
+struct kernel_ethtool_ts_info;
 int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel);
 void efx_ptp_defer_probe_with_channel(struct efx_nic *efx);
 struct efx_channel *efx_ptp_channel(struct efx_nic *efx);
@@ -23,7 +23,8 @@ int efx_ptp_set_ts_config(struct efx_nic *efx,
                          struct netlink_ext_ack *extack);
 int efx_ptp_get_ts_config(struct efx_nic *efx,
                          struct kernel_hwtstamp_config *config);
-void efx_ptp_get_ts_info(struct efx_nic *efx, struct ethtool_ts_info *ts_info);
+void efx_ptp_get_ts_info(struct efx_nic *efx,
+                        struct kernel_ethtool_ts_info *ts_info);
 bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
 int efx_ptp_get_mode(struct efx_nic *efx);
 int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
index 14dd3893bdefad0f38edb62899130d4211fc6577..4c182d4edfc29d5d8637e81241657536cdb45081 100644 (file)
@@ -226,7 +226,7 @@ static void efx_ethtool_get_fec_stats(struct net_device *net_dev,
 }
 
 static int efx_ethtool_get_ts_info(struct net_device *net_dev,
-                                  struct ethtool_ts_info *ts_info)
+                                  struct kernel_ethtool_ts_info *ts_info)
 {
        struct efx_nic *efx = netdev_priv(net_dev);
 
index 4b5e2f0ba350b3fce063dd29258a2a1c7e1321c7..c473a4b6dd44d6bda2003ca8757a1a34c2e27d2d 100644 (file)
@@ -1780,7 +1780,7 @@ static int efx_ptp_ts_init(struct efx_nic *efx,
 }
 
 void efx_siena_ptp_get_ts_info(struct efx_nic *efx,
-                              struct ethtool_ts_info *ts_info)
+                              struct kernel_ethtool_ts_info *ts_info)
 {
        struct efx_ptp_data *ptp = efx->ptp_data;
        struct efx_nic *primary = efx->primary;
index 6352f84424f63aec25b2b04018a0fbbb40442a20..b6133e7c56088be9d456b849a86400b00a35937b 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/net_tstamp.h>
 #include "net_driver.h"
 
-struct ethtool_ts_info;
+struct kernel_ethtool_ts_info;
 void efx_siena_ptp_defer_probe_with_channel(struct efx_nic *efx);
 struct efx_channel *efx_siena_ptp_channel(struct efx_nic *efx);
 int efx_siena_ptp_set_ts_config(struct efx_nic *efx,
@@ -21,7 +21,7 @@ int efx_siena_ptp_set_ts_config(struct efx_nic *efx,
 int efx_siena_ptp_get_ts_config(struct efx_nic *efx,
                                struct kernel_hwtstamp_config *config);
 void efx_siena_ptp_get_ts_info(struct efx_nic *efx,
-                              struct ethtool_ts_info *ts_info);
+                              struct kernel_ethtool_ts_info *ts_info);
 bool efx_siena_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
 int efx_siena_ptp_get_mode(struct efx_nic *efx);
 int efx_siena_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
index 18468c0228f0b2730ed33dec08e39f0319fddca1..7008219fd88db07031518a044e959b39fb3a7d7d 100644 (file)
@@ -1199,7 +1199,7 @@ static int stmmac_set_channels(struct net_device *dev,
 }
 
 static int stmmac_get_ts_info(struct net_device *dev,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        struct stmmac_priv *priv = netdev_priv(dev);
 
index a1d0935d1ebe41d225dc07c917414d486a4c1eaa..b60976947da5007cd5032644c9cb9cd1e3d97cc1 100644 (file)
@@ -692,7 +692,7 @@ static void am65_cpsw_get_eth_mac_stats(struct net_device *ndev,
 };
 
 static int am65_cpsw_get_ethtool_ts_info(struct net_device *ndev,
-                                        struct ethtool_ts_info *info)
+                                        struct kernel_ethtool_ts_info *info)
 {
        struct am65_cpsw_common *common = am65_ndev_to_common(ndev);
        unsigned int ptp_v2_filter;
index f7b283353ba26658455b727a6b3b46d73ff28342..53ed23d68722097904af032e75b3bd01828ce5d8 100644 (file)
@@ -717,7 +717,7 @@ err:
 }
 
 #if IS_ENABLED(CONFIG_TI_CPTS)
-int cpsw_get_ts_info(struct net_device *ndev, struct ethtool_ts_info *info)
+int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *info)
 {
        struct cpsw_common *cpsw = ndev_to_cpsw(ndev);
 
@@ -738,7 +738,7 @@ int cpsw_get_ts_info(struct net_device *ndev, struct ethtool_ts_info *info)
        return 0;
 }
 #else
-int cpsw_get_ts_info(struct net_device *ndev, struct ethtool_ts_info *info)
+int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping =
                SOF_TIMESTAMPING_TX_SOFTWARE |
index 7efa72502c86c22c0d398fae4d587e3255f806eb..1f448290b9f4b319284ee8dba3920b7173258f2f 100644 (file)
@@ -510,6 +510,6 @@ int cpsw_set_ringparam(struct net_device *ndev,
 int cpsw_set_channels_common(struct net_device *ndev,
                             struct ethtool_channels *chs,
                             cpdma_handler_fn rx_handler);
-int cpsw_get_ts_info(struct net_device *ndev, struct ethtool_ts_info *info);
+int cpsw_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts_info *info);
 
 #endif /* DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_ */
index c8d0f45cc5b1d75258248f1ba90cc93ab07c65f6..524723ced9ed733825ad1ba93019a90f7b1a0cfc 100644 (file)
@@ -110,7 +110,7 @@ static void emac_get_ethtool_stats(struct net_device *ndev,
 }
 
 static int emac_get_ts_info(struct net_device *ndev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct prueth_emac *emac = netdev_priv(ndev);
 
index 02cb6474f6dcdd9c5a35385b0fd364e5e7f98b30..d286709ca3b93af2821703800c3051f9e7ba1181 100644 (file)
@@ -1999,7 +1999,7 @@ static int keystone_set_link_ksettings(struct net_device *ndev,
 
 #if IS_ENABLED(CONFIG_TI_CPTS)
 static int keystone_get_ts_info(struct net_device *ndev,
-                               struct ethtool_ts_info *info)
+                               struct kernel_ethtool_ts_info *info)
 {
        struct netcp_intf *netcp = netdev_priv(ndev);
        struct gbe_intf *gbe_intf;
@@ -2027,7 +2027,7 @@ static int keystone_get_ts_info(struct net_device *ndev,
 }
 #else
 static int keystone_get_ts_info(struct net_device *ndev,
-                               struct ethtool_ts_info *info)
+                               struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping =
                SOF_TIMESTAMPING_TX_SOFTWARE |
index 8aff6a73ca0a24da96a8715fb7445c7e473d30a9..56df37f8d50a4d48842ccffc25f3daf929e20201 100644 (file)
@@ -1015,7 +1015,7 @@ static void ixp4xx_get_drvinfo(struct net_device *dev,
 }
 
 static int ixp4xx_get_ts_info(struct net_device *dev,
-                             struct ethtool_ts_info *info)
+                             struct kernel_ethtool_ts_info *info)
 {
        struct port *port = netdev_priv(dev);
 
index 67b7ef2d463faae1f13c48b7917d9b5269293b2b..24298a33e0e94851ebf9c704c723f25ac7bf5eec 100644 (file)
@@ -1084,7 +1084,7 @@ static int macvlan_ethtool_get_link_ksettings(struct net_device *dev,
 }
 
 static int macvlan_ethtool_get_ts_info(struct net_device *dev,
-                                      struct ethtool_ts_info *info)
+                                      struct kernel_ethtool_ts_info *info)
 {
        struct net_device *real_dev = macvlan_dev_real_dev(dev);
 
index 3f9c9327f1498570d5e8579b7ca2910b5cd7ed2c..1436905bc106144a2adfcce0bfdc8f95b5f00e89 100644 (file)
@@ -148,7 +148,7 @@ nsim_get_fec_stats(struct net_device *dev, struct ethtool_fec_stats *fec_stats)
 }
 
 static int nsim_get_ts_info(struct net_device *dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct netdevsim *ns = netdev_priv(dev);
 
index d3e825c951eef1b74068cb90c9970d379698b559..874a1b64b115f5f3124e9a097c06852d7cf06b44 100644 (file)
@@ -841,7 +841,7 @@ static int bcm_ptp_hwtstamp(struct mii_timestamper *mii_ts,
 }
 
 static int bcm_ptp_ts_info(struct mii_timestamper *mii_ts,
-                          struct ethtool_ts_info *ts_info)
+                          struct kernel_ethtool_ts_info *ts_info)
 {
        struct bcm_ptp_private *priv = mii2priv(mii_ts);
 
index d3e72d5c1472fda60358b575efd7c7be27cb5816..075d2beea716b230afbadbec34e3798d8de2860c 100644 (file)
@@ -1395,7 +1395,7 @@ static void dp83640_txtstamp(struct mii_timestamper *mii_ts,
 }
 
 static int dp83640_ts_info(struct mii_timestamper *mii_ts,
-                          struct ethtool_ts_info *info)
+                          struct kernel_ethtool_ts_info *info)
 {
        struct dp83640_private *dp83640 =
                container_of(mii_ts, struct dp83640_private, mii_ts);
index 8d57225d85757d59534740a5bc8e12b7bd528a15..dd519805deee318270758c5955859d570d355977 100644 (file)
@@ -2552,7 +2552,7 @@ static void lan8814_ptp_tx_ts_get(struct phy_device *phydev,
        *seq_id = lanphy_read_page_reg(phydev, 5, PTP_TX_MSG_HEADER2);
 }
 
-static int lan8814_ts_info(struct mii_timestamper *mii_ts, struct ethtool_ts_info *info)
+static int lan8814_ts_info(struct mii_timestamper *mii_ts, struct kernel_ethtool_ts_info *info)
 {
        struct kszphy_ptp_priv *ptp_priv = container_of(mii_ts, struct kszphy_ptp_priv, mii_ts);
        struct phy_device *phydev = ptp_priv->phydev;
@@ -4317,7 +4317,7 @@ static irqreturn_t lan8841_handle_interrupt(struct phy_device *phydev)
 }
 
 static int lan8841_ts_info(struct mii_timestamper *mii_ts,
-                          struct ethtool_ts_info *info)
+                          struct kernel_ethtool_ts_info *info)
 {
        struct kszphy_ptp_priv *ptp_priv;
 
index e66d20eff7c458f36cee95b35184ef84fa7067e1..c1ddae36a2ae6161ff3b1536a103bcfabfcaf51f 100644 (file)
@@ -1134,7 +1134,7 @@ static int vsc85xx_hwtstamp(struct mii_timestamper *mii_ts,
 }
 
 static int vsc85xx_ts_info(struct mii_timestamper *mii_ts,
-                          struct ethtool_ts_info *info)
+                          struct kernel_ethtool_ts_info *info)
 {
        struct vsc8531_private *vsc8531 =
                container_of(mii_ts, struct vsc8531_private, mii_ts);
index d18c133e6013db7fd19f62a62697c174d946b46a..5af5ade4fc64182be54b65cfbe2d0082a0de45ca 100644 (file)
@@ -1058,7 +1058,7 @@ nxp_c45_no_ptp_irq:
 }
 
 static int nxp_c45_ts_info(struct mii_timestamper *mii_ts,
-                          struct ethtool_ts_info *ts_info)
+                          struct kernel_ethtool_ts_info *ts_info)
 {
        struct nxp_c45_phy *priv = container_of(mii_ts, struct nxp_c45_phy,
                                                mii_ts);
index 385643f3f8fe9084ddffdea1ca63a2e7a3af6f79..e6f7d2bf8ddee4edfb354d0b76ae6dbf237caae6 100644 (file)
@@ -556,7 +556,7 @@ static bool ines_timestamp_expired(struct ines_timestamp *ts)
 }
 
 static int ines_ts_info(struct mii_timestamper *mii_ts,
-                       struct ethtool_ts_info *info)
+                       struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping =
                SOF_TIMESTAMPING_TX_HARDWARE |
index c1caf7734c3e9edf34a6a59b319d6ae0d366286f..f184c58ecf24cc30a04b0f38b703d8608c047d9e 100644 (file)
@@ -247,7 +247,7 @@ static int qeth_set_channels(struct net_device *dev,
 }
 
 static int qeth_get_ts_info(struct net_device *dev,
-                           struct ethtool_ts_info *info)
+                           struct kernel_ethtool_ts_info *info)
 {
        struct qeth_card *card = dev->ml_priv;
 
index 1b92aed4936325121d6c1ee2836572d9cfc06685..23492213ea35973faee2da12e761bb9dfc363aa3 100644 (file)
@@ -186,7 +186,7 @@ void close_candev(struct net_device *dev);
 int can_change_mtu(struct net_device *dev, int new_mtu);
 int can_eth_ioctl_hwts(struct net_device *netdev, struct ifreq *ifr, int cmd);
 int can_ethtool_op_get_ts_info_hwts(struct net_device *dev,
-                                   struct ethtool_ts_info *info);
+                                   struct kernel_ethtool_ts_info *info);
 
 int register_candev(struct net_device *dev);
 void unregister_candev(struct net_device *dev);
index e213b5508da64f68718fa1a3a6f38faa24289205..6b38bbda5790a3c26c0a2ffae23f7e0d424fd1a1 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/if_ether.h>
 #include <linux/netlink.h>
 #include <uapi/linux/ethtool.h>
+#include <uapi/linux/net_tstamp.h>
 
 struct compat_ethtool_rx_flow_spec {
        u32             flow_type;
@@ -713,6 +714,22 @@ struct ethtool_rxfh_param {
        u8      input_xfrm;
 };
 
+/**
+ * struct kernel_ethtool_ts_info - kernel copy of struct ethtool_ts_info
+ * @cmd: command number = %ETHTOOL_GET_TS_INFO
+ * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING flags
+ * @phc_index: device index of the associated PHC, or -1 if there is none
+ * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration values
+ * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration values
+ */
+struct kernel_ethtool_ts_info {
+       u32 cmd;
+       u32 so_timestamping;
+       int phc_index;
+       enum hwtstamp_tx_types tx_types;
+       enum hwtstamp_rx_filters rx_filters;
+};
+
 /**
  * struct ethtool_ops - optional netdev operations
  * @cap_link_lanes_supported: indicates if the driver supports lanes
@@ -1020,7 +1037,7 @@ struct ethtool_ops {
        int     (*get_dump_data)(struct net_device *,
                                 struct ethtool_dump *, void *);
        int     (*set_dump)(struct net_device *, struct ethtool_dump *);
-       int     (*get_ts_info)(struct net_device *, struct ethtool_ts_info *);
+       int     (*get_ts_info)(struct net_device *, struct kernel_ethtool_ts_info *);
        void    (*get_ts_stats)(struct net_device *dev,
                                struct ethtool_ts_stats *ts_stats);
        int     (*get_module_info)(struct net_device *,
@@ -1181,7 +1198,8 @@ int ethtool_get_phc_vclocks(struct net_device *dev, int **vclock_index);
 
 /* Some generic methods drivers may use in their ethtool_ops */
 u32 ethtool_op_get_link(struct net_device *dev);
-int ethtool_op_get_ts_info(struct net_device *dev, struct ethtool_ts_info *eti);
+int ethtool_op_get_ts_info(struct net_device *dev,
+                          struct kernel_ethtool_ts_info *eti);
 
 /**
  * ethtool_mm_frag_size_add_to_min - Translate (standard) additional fragment
@@ -1230,7 +1248,8 @@ static inline int ethtool_mm_frag_size_min_to_add(u32 val_min, u32 *val_add,
  * @info: buffer to hold the result
  * Returns zero on success, non-zero otherwise.
  */
-int ethtool_get_ts_info_by_layer(struct net_device *dev, struct ethtool_ts_info *info);
+int ethtool_get_ts_info_by_layer(struct net_device *dev,
+                                struct kernel_ethtool_ts_info *info);
 
 /**
  * ethtool_sprintf - Write formatted string to ethtool string data
index 26b04f73f214b9f7a8e89dd10434c4d01689113c..995db62570f9227bd2eb53e50c8b08047bc5fbcd 100644 (file)
@@ -59,7 +59,7 @@ struct mii_timestamper {
                           struct phy_device *phydev);
 
        int  (*ts_info)(struct mii_timestamper *mii_ts,
-                       struct ethtool_ts_info *ts_info);
+                       struct kernel_ethtool_ts_info *ts_info);
 
        struct device *device;
 };
index e7a38137211cdd99a334786422555150623217a8..04ae5c811cfb1e795f10a2cba1c9eae93749bc42 100644 (file)
@@ -1618,7 +1618,7 @@ static inline bool phy_rxtstamp(struct phy_device *phydev, struct sk_buff *skb,
 }
 
 static inline int phy_ts_info(struct phy_device *phydev,
-                             struct ethtool_ts_info *tsinfo)
+                             struct kernel_ethtool_ts_info *tsinfo)
 {
        return phydev->mii_ts->ts_info(phydev->mii_ts, tsinfo);
 }
index f9ae3ca66b6f19792749367599103244b063c8da..96efdd9f90c9d6e580a25aa925d6b9ad715449a8 100644 (file)
@@ -934,7 +934,7 @@ struct dsa_switch_ops {
         * ethtool timestamp info
         */
        int     (*get_ts_info)(struct dsa_switch *ds, int port,
-                              struct ethtool_ts_info *ts);
+                              struct kernel_ethtool_ts_info *ts);
 
        /*
         * ethtool MAC merge layer
index 1e1b40f4e664e38f4d6b19bef4b699b8572889a5..6a37b29f4b4c7af3c8a0fe9fe4ed332b8a3c3cbb 100644 (file)
@@ -1016,7 +1016,7 @@ void ocelot_port_get_eth_mac_stats(struct ocelot *ocelot, int port,
 void ocelot_port_get_eth_phy_stats(struct ocelot *ocelot, int port,
                                   struct ethtool_eth_phy_stats *phy_stats);
 int ocelot_get_ts_info(struct ocelot *ocelot, int port,
-                      struct ethtool_ts_info *info);
+                      struct kernel_ethtool_ts_info *info);
 void ocelot_set_ageing_time(struct ocelot *ocelot, unsigned int msecs);
 int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, bool enabled,
                               struct netlink_ext_ack *extack);
index 3efba4f857ac67ad4a13d612a06c33c706354332..217be32426b58a654bb66f889b82bc19a8c3c8e9 100644 (file)
@@ -677,7 +677,7 @@ static void vlan_ethtool_get_drvinfo(struct net_device *dev,
 }
 
 static int vlan_ethtool_get_ts_info(struct net_device *dev,
-                                   struct ethtool_ts_info *info)
+                                   struct kernel_ethtool_ts_info *info)
 {
        const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
        return ethtool_get_ts_info_by_layer(vlan->real_dev, info);
index e8f56a40b6141500dd0e3b26716579c6618e7e66..f5adfa1d978a2839a574275330783c3eb19544c9 100644 (file)
@@ -1729,7 +1729,7 @@ static int dsa_user_set_rxnfc(struct net_device *dev,
 }
 
 static int dsa_user_get_ts_info(struct net_device *dev,
-                               struct ethtool_ts_info *ts)
+                               struct kernel_ethtool_ts_info *ts)
 {
        struct dsa_user_priv *p = netdev_priv(dev);
        struct dsa_switch *ds = p->dp->ds;
index 01b7550f12c60683b0d4453457ddccfe0c9d131f..461017a37955a9920f1ec38fa1aea0efa626be27 100644 (file)
@@ -629,7 +629,7 @@ int ethtool_check_ops(const struct ethtool_ops *ops)
        return 0;
 }
 
-int __ethtool_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
+int __ethtool_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info)
 {
        const struct ethtool_ops *ops = dev->ethtool_ops;
        struct phy_device *phydev = dev->phydev;
@@ -651,7 +651,7 @@ int __ethtool_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
 
 int ethtool_get_phc_vclocks(struct net_device *dev, int **vclock_index)
 {
-       struct ethtool_ts_info info = { };
+       struct kernel_ethtool_ts_info info = { };
        int num = 0;
 
        if (!__ethtool_get_ts_info(dev, &info))
@@ -661,7 +661,7 @@ int ethtool_get_phc_vclocks(struct net_device *dev, int **vclock_index)
 }
 EXPORT_SYMBOL(ethtool_get_phc_vclocks);
 
-int ethtool_get_ts_info_by_layer(struct net_device *dev, struct ethtool_ts_info *info)
+int ethtool_get_ts_info_by_layer(struct net_device *dev, struct kernel_ethtool_ts_info *info)
 {
        return __ethtool_get_ts_info(dev, info);
 }
index 28b8aaaf9bcb3c5dcfc10be9d0d9cab1b6e5c4e1..b9daeecbd84dfe5ec630b2e3a6479628ff6c0283 100644 (file)
@@ -44,7 +44,7 @@ bool convert_legacy_settings_to_link_ksettings(
        const struct ethtool_cmd *legacy_settings);
 int ethtool_get_max_rxfh_channel(struct net_device *dev, u32 *max);
 int ethtool_get_max_rxnfc_channel(struct net_device *dev, u64 *max);
-int __ethtool_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info);
+int __ethtool_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info);
 
 extern const struct ethtool_phy_ops *ethtool_phy_ops;
 extern const struct ethtool_pse_ops *ethtool_pse_ops;
index d72b0fec89af6d08dcd4dfbebb4da2a99b665f32..bc8988ddf51c54ba646186a979cd94e719f3dee3 100644 (file)
@@ -65,7 +65,8 @@ u32 ethtool_op_get_link(struct net_device *dev)
 }
 EXPORT_SYMBOL(ethtool_op_get_link);
 
-int ethtool_op_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
+int ethtool_op_get_ts_info(struct net_device *dev,
+                          struct kernel_ethtool_ts_info *info)
 {
        info->so_timestamping =
                SOF_TIMESTAMPING_TX_SOFTWARE |
@@ -2569,13 +2570,20 @@ out:
 
 static int ethtool_get_ts_info(struct net_device *dev, void __user *useraddr)
 {
-       struct ethtool_ts_info info;
+       struct kernel_ethtool_ts_info kernel_info;
+       struct ethtool_ts_info info = {};
        int err;
 
-       err = __ethtool_get_ts_info(dev, &info);
+       err = __ethtool_get_ts_info(dev, &kernel_info);
        if (err)
                return err;
 
+       info.cmd = kernel_info.cmd;
+       info.so_timestamping = kernel_info.so_timestamping;
+       info.phc_index = kernel_info.phc_index;
+       info.tx_types = kernel_info.tx_types;
+       info.rx_filters = kernel_info.rx_filters;
+
        if (copy_to_user(useraddr, &info, sizeof(info)))
                return -EFAULT;
 
index 57d496287e523797b05f85fc26dca111dd701c6a..03d12d6f79ca012f37e1a81b0be2afc93672bba1 100644 (file)
@@ -12,7 +12,7 @@ struct tsinfo_req_info {
 
 struct tsinfo_reply_data {
        struct ethnl_reply_data         base;
-       struct ethtool_ts_info          ts_info;
+       struct kernel_ethtool_ts_info   ts_info;
        struct ethtool_ts_stats         stats;
 };
 
@@ -55,7 +55,7 @@ static int tsinfo_reply_size(const struct ethnl_req_info *req_base,
 {
        const struct tsinfo_reply_data *data = TSINFO_REPDATA(reply_base);
        bool compact = req_base->flags & ETHTOOL_FLAG_COMPACT_BITSETS;
-       const struct ethtool_ts_info *ts_info = &data->ts_info;
+       const struct kernel_ethtool_ts_info *ts_info = &data->ts_info;
        int len = 0;
        int ret;
 
@@ -136,7 +136,7 @@ static int tsinfo_fill_reply(struct sk_buff *skb,
 {
        const struct tsinfo_reply_data *data = TSINFO_REPDATA(reply_base);
        bool compact = req_base->flags & ETHTOOL_FLAG_COMPACT_BITSETS;
-       const struct ethtool_ts_info *ts_info = &data->ts_info;
+       const struct kernel_ethtool_ts_info *ts_info = &data->ts_info;
        int ret;
 
        if (ts_info->so_timestamping) {
index b284a06b5a75fa3408c4a6515b71ed1a6ec63e78..cc2df9f8c14a6839fed9f1dab33831bff2de105a 100644 (file)
@@ -1610,7 +1610,7 @@ static int taprio_parse_clockid(struct Qdisc *sch, struct nlattr **tb,
 
        if (FULL_OFFLOAD_IS_ENABLED(q->flags)) {
                const struct ethtool_ops *ops = dev->ethtool_ops;
-               struct ethtool_ts_info info = {
+               struct kernel_ethtool_ts_info info = {
                        .cmd = ETHTOOL_GET_TS_INFO,
                        .phc_index = -1,
                };