mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
net: Add struct kernel_ethtool_ts_info
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>
This commit is contained in:
1 parent
bc5a07ed15
commit
2111375b85
101 files changed
+151
-123
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Loaded 20 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user