@@ -44,6 +44,17 @@ extern int __ethtool_get_settings(struct net_device *dev,
struct ethtool_cmd *cmd);
/**
+ * enum ethtool_compat_flags - bit indices used for %get_compat_flags() bitmaps
+ * @__ETHTOOL_COMPAT_PLACEHOLDER_BIT: to avoid a compiler error,
+ * superseded by next patches
+ */
+enum ethtool_compat_flags {
+ __ETHTOOL_COMPAT_PLACEHOLDER_BIT,
+};
+
+#define __ETH_COMPAT_MASK(name) (1UL << (ETHTOOL_COMPAT_ ## name ## _BIT))
+
+/**
* enum ethtool_phys_id_state - indicator state for physical identification
* @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated
* @ETHTOOL_ID_ACTIVE: Physical ID indicator should be activated
@@ -99,6 +110,11 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
/**
* struct ethtool_ops - optional netdev operations
+ * @get_compat_flags: Internal function. Returns the internal ethtool
+ * compatibility flags: in the absence of this method, or of
+ * specific compatilibilty flags, the generic layer enforces
+ * additional constraints on the user space values before
+ * calling the callbacks below.
* @get_settings: Get various device settings including Ethernet link
* settings. The @cmd parameter is expected to have been cleared
* before get_settings is called. Returns a negative error code or
@@ -279,7 +295,6 @@ struct ethtool_ops {
const struct ethtool_tunable *, void *);
int (*set_tunable)(struct net_device *,
const struct ethtool_tunable *, const void *);
-
-
+ u32 (*get_compat_flags)(struct net_device *);
};
#endif /* _LINUX_ETHTOOL_H */
@@ -88,7 +88,8 @@
* other than @cmd that are not described as read-only or deprecated,
* and must ignore all fields described as read-only.
*
- * Deprecated fields should be ignored by both users and drivers.
+ * Deprecated and reserved fields should be ignored by both users and
+ * drivers. If reserved fields must be set, store the value 0 in them.
*/
struct ethtool_cmd {
__u32 cmd;
@@ -300,6 +301,9 @@ struct ethtool_eeprom {
* @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
* its tx lpi (after reaching 'idle' state). Effective only when eee
* was negotiated and tx_lpi_enabled was set.
+ *
+ * Deprecated and reserved fields should be ignored by both users and
+ * drivers. If reserved fields must be set, store the value 0 in them.
*/
struct ethtool_eee {
__u32 cmd;