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()
239 * ethtool_link_ksettings_zero_link_mode - clear link_ksettings link mode mask
244 bitmap_zero((ptr)->link_modes.name, __ETHTOOL_LINK_MODE_MASK_NBITS)
247 * ethtool_link_ksettings_add_link_mode - set bit in link_ksettings
255 __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
258 * ethtool_link_ksettings_del_link_mode - clear bit in link_ksettings
266 __clear_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
269 * ethtool_link_ksettings_test_link_mode - test bit in ksettings link mode mask
278 test_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
303 * ethtool_intersect_link_masks - Given two link masks, AND them together
385 while (n--) in ethtool_stats_init()
420 /* Basic IEEE 802.3 PHY statistics (30.3.2.1.*), not otherwise exposed
431 * struct ethtool_phy_stats - PHY-level statistics counters
439 * This structure provides a standardized interface for reporting
440 * PHY-level statistics counters. It is designed to expose statistics
466 * struct ethtool_pause_stats - statistics for IEEE 802.3x pause frames
492 * struct ethtool_fec_stats - statistics for IEEE 802.3 FEC
505 * not entire FEC data blocks. This is a non-standard statistic.
508 * For each of the above fields, the two substructure members are:
510 * - @lanes: per-lane/PCS-instance counts as defined by the standard
511 * - @total: error counts for the entire port, for drivers incapable of reporting
512 * per-lane stats
514 * Drivers should fill in either only total or per-lane statistics, core
525 * struct ethtool_rmon_hist_range - byte range for histogram statistics
537 * struct ethtool_rmon_stats - selected RMON (RFC 2819) statistics
544 * @hist: Packet counter for packet length buckets (e.g.
549 * APIs, primarily the packet-length-based counters.
568 * struct ethtool_ts_stats - HW timestamping statistics
570 * @onestep_pkts_unconfirmed: Number of PTP packets with one-step TX
571 * timestamping that were sent, but for which the
577 * information from the hardware never arrived for submission with
598 * struct ethtool_module_eeprom - plug-in module EEPROM read / write parameters
599 * @offset: When @offset is 0-127, it is used as an address to the Lower Memory
619 * struct ethtool_module_power_mode_params - module power mode parameters
620 * @policy: The power mode policy enforced by the host for the plug-in module.
621 * @mode: The operational power mode of the plug-in module. Should be filled by
630 * struct ethtool_mm_state - 802.3 MAC merge layer state
635 * maximum accepted value for the @verify_time variable in set requests
651 * set if the Verify function of the MM layer (which sends SMD-V
656 * respond to received SMD-V requests as long as @pmac_enabled is set.
658 * the minimum size of non-final mPacket fragments that the link partner
662 * to the formula 64 * (1 + addFragSize) - 4), a value in a continuous and
665 * the minimum size of non-final mPacket fragments that this device
681 * struct ethtool_mm_cfg - 802.3 MAC merge layer configuration
697 * struct ethtool_mm_stats - 802.3 MAC merge layer statistics
705 * number of additional correct SMD-C mPackets received due to preemption
722 * struct ethtool_rxfh_param - RXFH (RSS) parameters
725 * @indir_size: On SET, the array size of the user buffer for the
730 * @key_size: On SET, the array size of the user buffer for the hash key,
734 * @rss_context: RSS context identifier. Context 0 is the default for normal
735 * traffic; other contexts can be referenced as the destination for RX flow
739 * @rss_delete: Set to non-ZERO to remove the @rss_context context.
755 * struct kernel_ethtool_ts_info - kernel copy of struct ethtool_ts_info
758 * @phc_index: device index of the associated PHC, or -1 if there is none
773 * struct ethtool_ops - optional netdev operations
780 * @rxfh_per_ctx_key: device supports setting different RSS key for each
782 * for every context, not just context 0.
789 * @rxfh_key_space: same as @rxfh_indir_space, but for the key.
791 * allocate for an RSS context (in &struct ethtool_rxfh_context).
803 * @get_regs_len: Get buffer length required for @get_regs
805 * @get_wol: Report whether Wake-on-Lan is enabled
806 * @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code
819 * and link_ext_substate are unknown, return -ENODATA. If not implemented,
821 * @get_link_ext_stats: Read extra link-related counters.
822 * @get_eeprom_len: Read range of EEPROM addresses for validation of
826 * Should fill in the magic field. Don't need to check len for zero
831 * Should validate the magic field. Don't need to check len for zero
847 * @self_test: Run specified self-tests
854 * a negative error or return a positive frequency for synchronous
855 * indication (e.g. 1 for one on/off cycle per second). If it returns
868 * @get_priv_flags: Report driver-specific feature flags.
869 * @set_priv_flags: Set driver-specific feature flags. Returns a negative
882 * Returns zero if not supported for this specific device.
884 * Returns zero if not supported for this specific device.
895 * The &struct ethtool_rxfh_context for this context is passed in @ctx;
897 * of this call. The driver does not need to update these; the core
911 * The &struct ethtool_rxfh_context for this context is passed in @ctx;
913 * not need to update these; the core will do so if this op succeeds.
917 * The &struct ethtool_rxfh_context for this context is passed in @ctx.
934 * a plug-in module.
935 * @get_module_eeprom: Get the eeprom information from the plug-in module
936 * @get_eee: Get Energy-Efficient (EEE) supported and status.
942 * a TX queue has this number, return -EINVAL. If only a RX queue or a TX
947 * a TX queue has this number, return -EINVAL. If only a RX queue or a TX
962 * Core will sum up per-lane stats to get the total.
968 * @get_ethtool_phy_stats: Return extended statistics about the PHY device.
969 * This is only useful if the device maintains PHY statistics and
970 * cannot use the standard PHY library helpers.
971 * @get_phy_tunable: Read the value of a PHY tunable.
972 * @set_phy_tunable: Set the value of a PHY tunable.
973 * @get_module_eeprom_by_page: Get a region of plug-in module EEPROM data from
976 * @set_module_eeprom_by_page: Write to a region of plug-in module EEPROM,
978 * @get_eth_phy_stats: Query some of the IEEE 802.3 PHY statistics.
982 * Set %ranges to a pointer to zero-terminated array of byte ranges.
983 * @get_module_power_mode: Get the power mode policy for the plug-in module
985 * plugged-in.
986 * @set_module_power_mode: Set the power mode policy for the plug-in module
996 * See the structures used by these operations for further documentation.
997 * Note that for all operations using a structure ending with a zero-
1001 * See &struct net_device and &struct net_device_ops for documentation
1177 * struct ethtool_netdev_state - per-netdevice state for ethtool features
1181 * @wol_enabled: Wake-on-LAN is enabled
1197 * struct ethtool_phy_ops - Optional PHY device options
1200 * @get_stats: Return extended statistics about the PHY device.
1230 * ethtool_set_ethtool_phy_ops - Set the ethtool_phy_ops singleton
1231 * @ops: Ethtool PHY operations to set
1236 * ethtool_params_from_link_mode - Derive link parameters from a given link mode
1245 * ethtool_get_phc_vclocks - Derive phc vclocks information, and caller
1260 * ethtool_mm_frag_size_add_to_min - Translate (standard) additional fragment
1267 return (ETH_ZLEN + ETH_FCS_LEN) * (1 + val_add) - ETH_FCS_LEN; in ethtool_mm_frag_size_add_to_min()
1271 * ethtool_mm_frag_size_min_to_add - Translate (absolute) minimum fragment size
1279 * application of the 802.3 formula 64 * (1 + addFragSize) - 4. To be called
1288 for (add_frag_size = 0; add_frag_size < 4; add_frag_size++) { in ethtool_mm_frag_size_min_to_add()
1297 return -EINVAL; in ethtool_mm_frag_size_min_to_add()
1301 * ethtool_get_ts_info_by_layer - Obtains time stamping capabilities from the MAC or PHY layer.
1304 * Returns: zero on success, non-zero otherwise.
1310 * ethtool_sprintf - Write formatted string to ethtool string data
1320 * ethtool_puts - Write string to ethtool string data