Lines Matching +full:need +full:- +full:phy +full:- +full:for +full:- +full:wake
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * ethtool.h: Defines for Linux ethtool.
45 * enum ethtool_phys_id_state - indicator state for physical identification
61 ETH_RSS_HASH_TOP_BIT, /* Configurable RSS hash function - Toeplitz */
62 ETH_RSS_HASH_XOR_BIT, /* Configurable RSS hash function - Xor */
63 ETH_RSS_HASH_CRC32_BIT, /* Configurable RSS hash function - Crc32 */
73 * struct kernel_ethtool_ringparam - RX/TX ring configuration
81 * @hds_thresh: Packet size threshold for header data split (HDS)
82 * @hds_thresh_max: Maximum supported setting for @hds_threshold
98 * enum ethtool_supported_ring_param - indicator caps for setting ring params
99 * @ETHTOOL_RING_USE_RX_BUF_LEN: capture for setting rx_buf_len
100 * @ETHTOOL_RING_USE_CQE_SIZE: capture for setting cqe_size
101 * @ETHTOOL_RING_USE_TX_PUSH: capture for setting tx_push
102 * @ETHTOOL_RING_USE_RX_PUSH: capture for setting rx_push
103 * @ETHTOOL_RING_USE_TX_PUSH_BUF_LEN: capture for setting tx_push_buf_len
104 * @ETHTOOL_RING_USE_TCP_DATA_SPLIT: capture for setting tcp_data_split
105 * @ETHTOOL_RING_USE_HDS_THRS: capture for setting header-data-split-thresh
145 /* Custom Linux statistic for PHY level link down events.
146 * In a simpler world it should be equal to netdev->carrier_down_count
148 * actually take the physical link down, not to mention NC-SI which,
150 * This statistic counts when PHY _actually_ went down, or lost link.
152 * Note that we need u64 for ethtool_stats_init() and comparisons
159 * ethtool_rxfh_indir_default - get default value for RX flow hash indirection
163 * This function provides the default policy for RX flow hash indirection.
171 * struct ethtool_rxfh_context - a custom RSS context configuration
198 return ctx->data; in ethtool_rxfh_context_priv()
203 return (u32 *)(ctx->data + ALIGN(ctx->priv_size, sizeof(u32))); in ethtool_rxfh_context_indir()
208 return &ctx->data[ctx->key_off]; in ethtool_rxfh_context_key()
231 * ethtool_link_ksettings_zero_link_mode - clear link_ksettings link mode mask
236 bitmap_zero((ptr)->link_modes.name, __ETHTOOL_LINK_MODE_MASK_NBITS)
239 * ethtool_link_ksettings_add_link_mode - set bit in link_ksettings
247 __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
250 * ethtool_link_ksettings_del_link_mode - clear bit in link_ksettings
258 __clear_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
261 * ethtool_link_ksettings_test_link_mode - test bit in ksettings link mode mask
270 test_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
295 * ethtool_intersect_link_masks - Given two link masks, AND them together
377 while (n--) in ethtool_stats_init()
412 /* Basic IEEE 802.3 PHY statistics (30.3.2.1.*), not otherwise exposed
423 * struct ethtool_phy_stats - PHY-level statistics counters
431 * This structure provides a standardized interface for reporting
432 * PHY-level statistics counters. It is designed to expose statistics
458 * struct ethtool_pause_stats - statistics for IEEE 802.3x pause frames
484 * struct ethtool_fec_stats - statistics for IEEE 802.3 FEC
497 * not entire FEC data blocks. This is a non-standard statistic.
500 * For each of the above fields, the two substructure members are:
502 * - @lanes: per-lane/PCS-instance counts as defined by the standard
503 * - @total: error counts for the entire port, for drivers incapable of reporting
504 * per-lane stats
506 * Drivers should fill in either only total or per-lane statistics, core
517 * struct ethtool_rmon_hist_range - byte range for histogram statistics
529 * struct ethtool_rmon_stats - selected RMON (RFC 2819) statistics
536 * @hist: Packet counter for packet length buckets (e.g.
541 * APIs, primarily the packet-length-based counters.
560 * struct ethtool_ts_stats - HW timestamping statistics
562 * @onestep_pkts_unconfirmed: Number of PTP packets with one-step TX
563 * timestamping that were sent, but for which the
569 * information from the hardware never arrived for submission with
590 * struct ethtool_module_eeprom - plug-in module EEPROM read / write parameters
591 * @offset: When @offset is 0-127, it is used as an address to the Lower Memory
611 * struct ethtool_module_power_mode_params - module power mode parameters
612 * @policy: The power mode policy enforced by the host for the plug-in module.
613 * @mode: The operational power mode of the plug-in module. Should be filled by
622 * struct ethtool_mm_state - 802.3 MAC merge layer state
627 * maximum accepted value for the @verify_time variable in set requests
643 * set if the Verify function of the MM layer (which sends SMD-V
648 * respond to received SMD-V requests as long as @pmac_enabled is set.
650 * the minimum size of non-final mPacket fragments that the link partner
654 * to the formula 64 * (1 + addFragSize) - 4), a value in a continuous and
657 * the minimum size of non-final mPacket fragments that this device
673 * struct ethtool_mm_cfg - 802.3 MAC merge layer configuration
689 * struct ethtool_mm_stats - 802.3 MAC merge layer statistics
697 * number of additional correct SMD-C mPackets received due to preemption
714 * struct ethtool_rxfh_param - RXFH (RSS) parameters
717 * @indir_size: On SET, the array size of the user buffer for the
722 * @key_size: On SET, the array size of the user buffer for the hash key,
726 * @rss_context: RSS context identifier. Context 0 is the default for normal
727 * traffic; other contexts can be referenced as the destination for RX flow
731 * @rss_delete: Set to non-ZERO to remove the @rss_context context.
747 * struct kernel_ethtool_ts_info - kernel copy of struct ethtool_ts_info
750 * @phc_index: device index of the associated PHC, or -1 if there is none
765 * struct ethtool_ops - optional netdev operations
771 * @cap_rss_sym_xor_supported: indicates if the driver supports symmetric-xor
773 * @rxfh_per_ctx_key: device supports setting different RSS key for each
775 * for every context, not just context 0.
782 * @rxfh_key_space: same as @rxfh_indir_space, but for the key.
784 * allocate for an RSS context (in &struct ethtool_rxfh_context).
796 * @get_regs_len: Get buffer length required for @get_regs
798 * @get_wol: Report whether Wake-on-Lan is enabled
799 * @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code
812 * and link_ext_substate are unknown, return -ENODATA. If not implemented,
814 * @get_link_ext_stats: Read extra link-related counters.
815 * @get_eeprom_len: Read range of EEPROM addresses for validation of
819 * Should fill in the magic field. Don't need to check len for zero
824 * Should validate the magic field. Don't need to check len for zero
840 * @self_test: Run specified self-tests
847 * a negative error or return a positive frequency for synchronous
848 * indication (e.g. 1 for one on/off cycle per second). If it returns
861 * @get_priv_flags: Report driver-specific feature flags.
862 * @set_priv_flags: Set driver-specific feature flags. Returns a negative
875 * Returns zero if not supported for this specific device.
877 * Returns zero if not supported for this specific device.
888 * The &struct ethtool_rxfh_context for this context is passed in @ctx;
890 * of this call. The driver does not need to update these; the core
904 * The &struct ethtool_rxfh_context for this context is passed in @ctx;
906 * not need to update these; the core will do so if this op succeeds.
910 * The &struct ethtool_rxfh_context for this context is passed in @ctx.
927 * a plug-in module.
928 * @get_module_eeprom: Get the eeprom information from the plug-in module
929 * @get_eee: Get Energy-Efficient (EEE) supported and status.
935 * a TX queue has this number, return -EINVAL. If only a RX queue or a TX
940 * a TX queue has this number, return -EINVAL. If only a RX queue or a TX
955 * Core will sum up per-lane stats to get the total.
961 * @get_ethtool_phy_stats: Return extended statistics about the PHY device.
962 * This is only useful if the device maintains PHY statistics and
963 * cannot use the standard PHY library helpers.
964 * @get_phy_tunable: Read the value of a PHY tunable.
965 * @set_phy_tunable: Set the value of a PHY tunable.
966 * @get_module_eeprom_by_page: Get a region of plug-in module EEPROM data from
969 * @set_module_eeprom_by_page: Write to a region of plug-in module EEPROM,
971 * @get_eth_phy_stats: Query some of the IEEE 802.3 PHY statistics.
975 * Set %ranges to a pointer to zero-terminated array of byte ranges.
976 * @get_module_power_mode: Get the power mode policy for the plug-in module
978 * plugged-in.
979 * @set_module_power_mode: Set the power mode policy for the plug-in module
989 * See the structures used by these operations for further documentation.
990 * Note that for all operations using a structure ending with a zero-
994 * See &struct net_device and &struct net_device_ops for documentation
1170 * struct ethtool_netdev_state - per-netdevice state for ethtool features
1174 * @wol_enabled: Wake-on-LAN is enabled
1190 * struct ethtool_phy_ops - Optional PHY device options
1193 * @get_stats: Return extended statistics about the PHY device.
1223 * ethtool_set_ethtool_phy_ops - Set the ethtool_phy_ops singleton
1224 * @ops: Ethtool PHY operations to set
1229 * ethtool_params_from_link_mode - Derive link parameters from a given link mode
1238 * ethtool_get_phc_vclocks - Derive phc vclocks information, and caller
1253 * ethtool_mm_frag_size_add_to_min - Translate (standard) additional fragment
1260 return (ETH_ZLEN + ETH_FCS_LEN) * (1 + val_add) - ETH_FCS_LEN; in ethtool_mm_frag_size_add_to_min()
1264 * ethtool_mm_frag_size_min_to_add - Translate (absolute) minimum fragment size
1272 * application of the 802.3 formula 64 * (1 + addFragSize) - 4. To be called
1281 for (add_frag_size = 0; add_frag_size < 4; add_frag_size++) { in ethtool_mm_frag_size_min_to_add()
1290 return -EINVAL; in ethtool_mm_frag_size_min_to_add()
1294 * ethtool_get_ts_info_by_layer - Obtains time stamping capabilities from the MAC or PHY layer.
1297 * Returns: zero on success, non-zero otherwise.
1303 * ethtool_sprintf - Write formatted string to ethtool string data
1313 * ethtool_puts - Write string to ethtool string data