ethtool: add a new command for getting PHC virtual clocks
[platform/kernel/linux-starfive.git] / include / linux / ethtool.h
index e030f75..232daae 100644 (file)
@@ -401,12 +401,12 @@ struct ethtool_rmon_stats {
  * required information to the driver.
  */
 struct ethtool_module_eeprom {
-       __u32   offset;
-       __u32   length;
-       __u8    page;
-       __u8    bank;
-       __u8    i2c_address;
-       __u8    *data;
+       u32     offset;
+       u32     length;
+       u8      page;
+       u8      bank;
+       u8      i2c_address;
+       u8      *data;
 };
 
 /**
@@ -758,6 +758,16 @@ ethtool_params_from_link_mode(struct ethtool_link_ksettings *link_ksettings,
                              enum ethtool_link_mode_bit_indices link_mode);
 
 /**
+ * ethtool_get_phc_vclocks - Derive phc vclocks information, and caller
+ *                           is responsible to free memory of vclock_index
+ * @dev: pointer to net_device structure
+ * @vclock_index: pointer to pointer of vclock index
+ *
+ * Return number of phc vclocks
+ */
+int ethtool_get_phc_vclocks(struct net_device *dev, int **vclock_index);
+
+/**
  * ethtool_sprintf - Write formatted string to ethtool string data
  * @data: Pointer to start of string to update
  * @fmt: Format of string to write