
Changes in 5.10.67 rtc: tps65910: Correct driver module alias io_uring: limit fixed table size by RLIMIT_NOFILE io_uring: place fixed tables under memcg limits io_uring: add ->splice_fd_in checks io_uring: fail links of cancelled timeouts io-wq: fix wakeup race when adding new work btrfs: wake up async_delalloc_pages waiters after submit btrfs: reset replace target device to allocation state on close blk-zoned: allow zone management send operations without CAP_SYS_ADMIN blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN PCI/MSI: Skip masking MSI-X on Xen PV powerpc/perf/hv-gpci: Fix counter value parsing xen: fix setting of max_pfn in shared_info 9p/xen: Fix end of loop tests for list_for_each_entry ceph: fix dereference of null pointer cf selftests/ftrace: Fix requirement check of README file tools/thermal/tmon: Add cross compiling support clk: socfpga: agilex: fix the parents of the psi_ref_clk clk: socfpga: agilex: fix up s2f_user0_clk representation clk: socfpga: agilex: add the bypass register for s2f_usr0 clock pinctrl: stmfx: Fix hazardous u8[] to unsigned long cast pinctrl: ingenic: Fix incorrect pull up/down info soc: qcom: aoss: Fix the out of bound usage of cooling_devs soc: aspeed: lpc-ctrl: Fix boundary check for mmap soc: aspeed: p2a-ctrl: Fix boundary check for mmap arm64: mm: Fix TLBI vs ASID rollover arm64: head: avoid over-mapping in map_memory iio: ltc2983: fix device probe wcn36xx: Ensure finish scan is not requested before start scan crypto: public_key: fix overflow during implicit conversion block: bfq: fix bfq_set_next_ioprio_data() power: supply: max17042: handle fails of reading status register dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc() crypto: ccp - shutdown SEV firmware on kexec VMCI: fix NULL pointer dereference when unmapping queue pair media: uvc: don't do DMA on stack media: rc-loopback: return number of emitters rather than error s390/qdio: fix roll-back after timeout on ESTABLISH ccw s390/qdio: cancel the ESTABLISH ccw after timeout Revert "dmaengine: imx-sdma: refine to load context only once" dmaengine: imx-sdma: remove duplicated sdma_load_context libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs ARM: 9105/1: atags_to_fdt: don't warn about stack size f2fs: fix to do sanity check for sb/cp fields correctly PCI/portdrv: Enable Bandwidth Notification only if port supports it PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure PCI: xilinx-nwl: Enable the clock through CCF PCI: aardvark: Configure PCIe resources from 'ranges' DT property PCI: Export pci_pio_to_address() for module use PCI: aardvark: Fix checking for PIO status PCI: aardvark: Fix masking and unmasking legacy INTx interrupts HID: input: do not report stylus battery state as "full" f2fs: quota: fix potential deadlock pinctrl: remove empty lines in pinctrl subsystem pinctrl: armada-37xx: Correct PWM pins definitions scsi: bsg: Remove support for SCSI_IOCTL_SEND_COMMAND clk: rockchip: drop GRF dependency for rk3328/rk3036 pll types IB/hfi1: Adjust pkey entry in index 0 RDMA/iwcm: Release resources if iw_cm module initialization fails docs: Fix infiniband uverbs minor number scsi: BusLogic: Use %X for u32 sized integer rather than %lX pinctrl: samsung: Fix pinctrl bank pin count vfio: Use config not menuconfig for VFIO_NOIOMMU scsi: ufs: Fix memory corruption by ufshcd_read_desc_param() cpuidle: pseries: Fixup CEDE0 latency only for POWER10 onwards powerpc/stacktrace: Include linux/delay.h RDMA/efa: Remove double QP type assignment RDMA/mlx5: Delete not-available udata check cpuidle: pseries: Mark pseries_idle_proble() as __init f2fs: reduce the scope of setting fsck tag when de->name_len is zero openrisc: don't printk() unconditionally dma-debug: fix debugfs initialization order NFSv4/pNFS: Fix a layoutget livelock loop NFSv4/pNFS: Always allow update of a zero valued layout barrier NFSv4/pnfs: The layout barrier indicate a minimal value for the seqid SUNRPC: Fix potential memory corruption SUNRPC/xprtrdma: Fix reconnection locking SUNRPC query transport's source port sunrpc: Fix return value of get_srcport() scsi: fdomain: Fix error return code in fdomain_probe() pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry() powerpc/numa: Consider the max NUMA node for migratable LPAR scsi: smartpqi: Fix an error code in pqi_get_raid_map() scsi: qedi: Fix error codes in qedi_alloc_global_queues() scsi: qedf: Fix error codes in qedf_alloc_global_queues() powerpc/config: Renable MTD_PHYSMAP_OF iommu/vt-d: Update the virtual command related registers HID: i2c-hid: Fix Elan touchpad regression clk: imx8m: fix clock tree update of TF-A managed clocks KVM: PPC: Book3S HV: Fix copy_tofrom_guest routines scsi: ufs: ufs-exynos: Fix static checker warning KVM: PPC: Book3S HV Nested: Reflect guest PMU in-use to L0 when guest SPRs are live platform/x86: dell-smbios-wmi: Add missing kfree in error-exit from run_smbios_call powerpc/smp: Update cpu_core_map on all PowerPc systems RDMA/hns: Fix QP's resp incomplete assignment fscache: Fix cookie key hashing clk: at91: clk-generated: Limit the requested rate to our range KVM: PPC: Fix clearing never mapped TCEs in realmode soc: mediatek: cmdq: add address shift in jump f2fs: fix to account missing .skipped_gc_rwsem f2fs: fix unexpected ENOENT comes from f2fs_map_blocks() f2fs: fix to unmap pages from userspace process in punch_hole() f2fs: deallocate compressed pages when error happens f2fs: should put a page beyond EOF when preparing a write MIPS: Malta: fix alignment of the devicetree buffer kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y userfaultfd: prevent concurrent API initialization drm/vc4: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET drm/amdgpu: Fix amdgpu_ras_eeprom_init() ASoC: atmel: ATMEL drivers don't need HAS_DMA media: dib8000: rewrite the init prbs logic libbpf: Fix reuse of pinned map on older kernel x86/hyperv: fix for unwanted manipulation of sched_clock when TSC marked unstable crypto: mxs-dcp - Use sg_mapping_iter to copy data PCI: Use pci_update_current_state() in pci_enable_device_flags() tipc: keep the skb in rcv queue until the whole data is read net: phy: Fix data type in DP83822 dp8382x_disable_wol() iio: dac: ad5624r: Fix incorrect handling of an optional regulator. iavf: do not override the adapter state in the watchdog task iavf: fix locking of critical sections ARM: dts: qcom: apq8064: correct clock names video: fbdev: kyro: fix a DoS bug by restricting user input netlink: Deal with ESRCH error in nlmsg_notify() Smack: Fix wrong semantics in smk_access_entry() drm: avoid blocking in drm_clients_info's rcu section drm: serialize drm_file.master with a new spinlock drm: protect drm_master pointers in drm_lease.c rcu: Fix macro name CONFIG_TASKS_RCU_TRACE igc: Check if num of q_vectors is smaller than max before array access usb: host: fotg210: fix the endpoint's transactional opportunities calculation usb: host: fotg210: fix the actual_length of an iso packet usb: gadget: u_ether: fix a potential null pointer dereference USB: EHCI: ehci-mv: improve error handling in mv_ehci_enable() usb: gadget: composite: Allow bMaxPower=0 if self-powered staging: board: Fix uninitialized spinlock when attaching genpd tty: serial: jsm: hold port lock when reporting modem line changes bus: fsl-mc: fix mmio base address for child DPRCs selftests: firmware: Fix ignored return val of asprintf() warn drm/amd/display: Fix timer_per_pixel unit error media: hantro: vp8: Move noisy WARN_ON to vpu_debug media: platform: stm32: unprepare clocks at handling errors in probe media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe media: atomisp: pci: fix error return code in atomisp_pci_probe() nfp: fix return statement in nfp_net_parse_meta() ethtool: improve compat ioctl handling drm/amdgpu: Fix a printing message drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex bpf/tests: Fix copy-and-paste error in double word test bpf/tests: Do not PASS tests without actually testing the result drm/bridge: nwl-dsi: Avoid potential multiplication overflow on 32-bit arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names video: fbdev: asiliantfb: Error out if 'pixclock' equals zero video: fbdev: kyro: Error out if 'pixclock' equals zero video: fbdev: riva: Error out if 'pixclock' equals zero ipv4: ip_output.c: Fix out-of-bounds warning in ip_copy_addrs() flow_dissector: Fix out-of-bounds warnings s390/jump_label: print real address in a case of a jump label bug s390: make PCI mio support a machine flag serial: 8250: Define RX trigger levels for OxSemi 950 devices xtensa: ISS: don't panic in rs_init hvsi: don't panic on tty_register_driver failure serial: 8250_pci: make setup_port() parameters explicitly unsigned staging: ks7010: Fix the initialization of the 'sleep_status' structure samples: bpf: Fix tracex7 error raised on the missing argument libbpf: Fix race when pinning maps in parallel ata: sata_dwc_460ex: No need to call phy_exit() befre phy_init() Bluetooth: skip invalid hci_sync_conn_complete_evt workqueue: Fix possible memory leaks in wq_numa_init() ARM: dts: stm32: Set {bitclock,frame}-master phandles on DHCOM SoM ARM: dts: stm32: Set {bitclock,frame}-master phandles on ST DKx ARM: dts: stm32: Update AV96 adv7513 node per dtbs_check bonding: 3ad: fix the concurrency between __bond_release_one() and bond_3ad_state_machine_handler() ARM: dts: at91: use the right property for shutdown controller arm64: tegra: Fix Tegra194 PCIe EP compatible string ASoC: Intel: bytcr_rt5640: Move "Platform Clock" routes to the maps for the matching in-/output ASoC: Intel: update sof_pcm512x quirks media: imx258: Rectify mismatch of VTS value media: imx258: Limit the max analogue gain to 480 media: v4l2-dv-timings.c: fix wrong condition in two for-loops media: TDA1997x: fix tda1997x_query_dv_timings() return value media: tegra-cec: Handle errors of clk_prepare_enable() gfs2: Fix glock recursion in freeze_go_xmote_bh arm64: dts: qcom: sdm630: Rewrite memory map arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration serial: 8250_omap: Handle optional overrun-throttle-ms property ARM: dts: imx53-ppd: Fix ACHC entry arm64: dts: qcom: ipq8074: fix pci node reg property arm64: dts: qcom: sdm660: use reg value for memory node arm64: dts: qcom: ipq6018: drop '0x' from unit address arm64: dts: qcom: sdm630: don't use underscore in node name arm64: dts: qcom: msm8994: don't use underscore in node name arm64: dts: qcom: msm8996: don't use underscore in node name arm64: dts: qcom: sm8250: Fix epss_l3 unit address nvmem: qfprom: Fix up qfprom_disable_fuse_blowing() ordering net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe() drm/msm: mdp4: drop vblank get/put from prepare/complete_commit drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660 drm: xlnx: zynqmp_dpsub: Call pm_runtime_get_sync before setting pixel clock drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers thunderbolt: Fix port linking by checking all adapters drm/amd/display: fix missing writeback disablement if plane is removed drm/amd/display: fix incorrect CM/TF programming sequence in dwb selftests/bpf: Fix xdp_tx.c prog section name drm/vmwgfx: fix potential UAF in vmwgfx_surface.c Bluetooth: schedule SCO timeouts with delayed_work Bluetooth: avoid circular locks in sco_sock_connect drm/msm/dp: return correct edid checksum after corrupted edid checksum read net/mlx5: Fix variable type to match 64bit gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port() drm/display: fix possible null-pointer dereference in dcn10_set_clock() mac80211: Fix monitor MTU limit so that A-MSDUs get through ARM: tegra: acer-a500: Remove bogus USB VBUS regulators ARM: tegra: tamonten: Fix UART pad setting arm64: tegra: Fix compatible string for Tegra132 CPUs arm64: dts: ls1046a: fix eeprom entries nvme-tcp: don't check blk_mq_tag_to_rq when receiving pdu data nvme: code command_id with a genctr for use-after-free validation Bluetooth: Fix handling of LE Enhanced Connection Complete opp: Don't print an error if required-opps is missing serial: sh-sci: fix break handling for sysrq iomap: pass writeback errors to the mapping tcp: enable data-less, empty-cookie SYN with TFO_SERVER_COOKIE_NOT_REQD rpc: fix gss_svc_init cleanup on failure selftests/bpf: Fix flaky send_signal test hwmon: (pmbus/ibm-cffps) Fix write bits for LED control staging: rts5208: Fix get_ms_information() heap buffer size net: Fix offloading indirect devices dependency on qdisc order creation kselftest/arm64: mte: Fix misleading output when skipping tests kselftest/arm64: pac: Fix skipping of tests on systems without PAC gfs2: Don't call dlm after protocol is unmounted usb: chipidea: host: fix port index underflow and UBSAN complains lockd: lockd server-side shouldn't set fl_ops drm/exynos: Always initialize mapping in exynos_drm_register_dma() rtl8xxxu: Fix the handling of TX A-MPDU aggregation rtw88: use read_poll_timeout instead of fixed sleep rtw88: wow: build wow function only if CONFIG_PM is on rtw88: wow: fix size access error of probe request octeontx2-pf: Fix NIX1_RX interface backpressure m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch btrfs: tree-log: check btrfs_lookup_data_extent return value soundwire: intel: fix potential race condition during power down ASoC: Intel: Skylake: Fix module configuration for KPB and MIXER ASoC: Intel: Skylake: Fix passing loadable flag for module of: Don't allow __of_attached_node_sysfs() without CONFIG_SYSFS mmc: sdhci-of-arasan: Modified SD default speed to 19MHz for ZynqMP mmc: sdhci-of-arasan: Check return value of non-void funtions mmc: rtsx_pci: Fix long reads when clock is prescaled selftests/bpf: Enlarge select() timeout for test_maps mmc: core: Return correct emmc response in case of ioctl error cifs: fix wrong release in sess_alloc_buffer() failed path Revert "USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set" usb: musb: musb_dsps: request_irq() after initializing musb usbip: give back URBs for unsent unlink requests during cleanup usbip:vhci_hcd USB port can get stuck in the disabled state ASoC: rockchip: i2s: Fix regmap_ops hang ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B drm/amdkfd: Account for SH/SE count when setting up cu masks. nfsd: fix crash on LOCKT on reexported NFSv3 iwlwifi: pcie: free RBs during configure iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed iwlwifi: mvm: avoid static queue number aliasing iwlwifi: mvm: fix access to BSS elements iwlwifi: fw: correctly limit to monitor dump iwlwifi: mvm: Fix scan channel flags settings net/mlx5: DR, fix a potential use-after-free bug net/mlx5: DR, Enable QP retransmission parport: remove non-zero check on count selftests/bpf: Fix potential unreleased lock wcn36xx: Fix missing frame timestamp for beacon/probe-resp ath9k: fix OOB read ar9300_eeprom_restore_internal ath9k: fix sleeping in atomic context net: fix NULL pointer reference in cipso_v4_doi_free fix array-index-out-of-bounds in taprio_change net: w5100: check return value after calling platform_get_resource() net: hns3: clean up a type mismatch warning fs/io_uring Don't use the return value from import_iovec(). io_uring: remove duplicated io_size from rw parisc: fix crash with signals and alloca ovl: fix BUG_ON() in may_delete() when called from ovl_cleanup() scsi: BusLogic: Fix missing pr_cont() use scsi: qla2xxx: Changes to support kdump kernel scsi: qla2xxx: Sync queue idx with queue_pair_map idx cpufreq: powernv: Fix init_chip_info initialization in numa=off s390/pv: fix the forcing of the swiotlb hugetlb: fix hugetlb cgroup refcounting during vma split mm/hmm: bypass devmap pte when all pfn requested flags are fulfilled mm/hugetlb: initialize hugetlb_usage in mm_init mm,vmscan: fix divide by zero in get_scan_count memcg: enable accounting for pids in nested pid namespaces libnvdimm/pmem: Fix crash triggered when I/O in-flight during unbind platform/chrome: cros_ec_proto: Send command again when timeout occurs lib/test_stackinit: Fix static initializer test net: dsa: lantiq_gswip: fix maximum frame length drm/mgag200: Select clock in PLL update functions drm/msi/mdp4: populate priv->kms in mdp4_kms_init drm/dp_mst: Fix return code on sideband message failure drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv drm/amdgpu: Fix BUG_ON assert drm/amd/display: Update number of DCN3 clock states drm/amd/display: Update bounding box states (v2) drm/panfrost: Simplify lock_region calculation drm/panfrost: Use u64 for size in lock_region drm/panfrost: Clamp lock region to Bifrost minimum fanotify: limit number of event merge attempts Linux 5.10.67 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ic8df59518265d0cdf724e93e8922cde48fc85ce9
571 lines
24 KiB
C
571 lines
24 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* ethtool.h: Defines for Linux ethtool.
|
|
*
|
|
* Copyright (C) 1998 David S. Miller (davem@redhat.com)
|
|
* Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
|
|
* Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
|
|
* Portions Copyright 2002 Intel (eli.kupermann@intel.com,
|
|
* christopher.leech@intel.com,
|
|
* scott.feldman@intel.com)
|
|
* Portions Copyright (C) Sun Microsystems 2008
|
|
*/
|
|
#ifndef _LINUX_ETHTOOL_H
|
|
#define _LINUX_ETHTOOL_H
|
|
|
|
#include <linux/bitmap.h>
|
|
#include <linux/compat.h>
|
|
#include <linux/android_kabi.h>
|
|
#include <uapi/linux/ethtool.h>
|
|
|
|
struct compat_ethtool_rx_flow_spec {
|
|
u32 flow_type;
|
|
union ethtool_flow_union h_u;
|
|
struct ethtool_flow_ext h_ext;
|
|
union ethtool_flow_union m_u;
|
|
struct ethtool_flow_ext m_ext;
|
|
compat_u64 ring_cookie;
|
|
u32 location;
|
|
};
|
|
|
|
struct compat_ethtool_rxnfc {
|
|
u32 cmd;
|
|
u32 flow_type;
|
|
compat_u64 data;
|
|
struct compat_ethtool_rx_flow_spec fs;
|
|
u32 rule_cnt;
|
|
u32 rule_locs[];
|
|
};
|
|
|
|
#include <linux/rculist.h>
|
|
|
|
/**
|
|
* 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
|
|
* @ETHTOOL_ID_ON: LED should be turned on (used iff %ETHTOOL_ID_ACTIVE
|
|
* is not supported)
|
|
* @ETHTOOL_ID_OFF: LED should be turned off (used iff %ETHTOOL_ID_ACTIVE
|
|
* is not supported)
|
|
*/
|
|
enum ethtool_phys_id_state {
|
|
ETHTOOL_ID_INACTIVE,
|
|
ETHTOOL_ID_ACTIVE,
|
|
ETHTOOL_ID_ON,
|
|
ETHTOOL_ID_OFF
|
|
};
|
|
|
|
enum {
|
|
ETH_RSS_HASH_TOP_BIT, /* Configurable RSS hash function - Toeplitz */
|
|
ETH_RSS_HASH_XOR_BIT, /* Configurable RSS hash function - Xor */
|
|
ETH_RSS_HASH_CRC32_BIT, /* Configurable RSS hash function - Crc32 */
|
|
|
|
/*
|
|
* Add your fresh new hash function bits above and remember to update
|
|
* rss_hash_func_strings[] in ethtool.c
|
|
*/
|
|
ETH_RSS_HASH_FUNCS_COUNT
|
|
};
|
|
|
|
#define __ETH_RSS_HASH_BIT(bit) ((u32)1 << (bit))
|
|
#define __ETH_RSS_HASH(name) __ETH_RSS_HASH_BIT(ETH_RSS_HASH_##name##_BIT)
|
|
|
|
#define ETH_RSS_HASH_TOP __ETH_RSS_HASH(TOP)
|
|
#define ETH_RSS_HASH_XOR __ETH_RSS_HASH(XOR)
|
|
#define ETH_RSS_HASH_CRC32 __ETH_RSS_HASH(CRC32)
|
|
|
|
#define ETH_RSS_HASH_UNKNOWN 0
|
|
#define ETH_RSS_HASH_NO_CHANGE 0
|
|
|
|
struct net_device;
|
|
|
|
/* Some generic methods drivers may use in their ethtool_ops */
|
|
u32 ethtool_op_get_link(struct net_device *dev);
|
|
int ethtool_op_get_ts_info(struct net_device *dev, struct ethtool_ts_info *eti);
|
|
|
|
|
|
/**
|
|
* struct ethtool_link_ext_state_info - link extended state and substate.
|
|
*/
|
|
struct ethtool_link_ext_state_info {
|
|
enum ethtool_link_ext_state link_ext_state;
|
|
union {
|
|
enum ethtool_link_ext_substate_autoneg autoneg;
|
|
enum ethtool_link_ext_substate_link_training link_training;
|
|
enum ethtool_link_ext_substate_link_logical_mismatch link_logical_mismatch;
|
|
enum ethtool_link_ext_substate_bad_signal_integrity bad_signal_integrity;
|
|
enum ethtool_link_ext_substate_cable_issue cable_issue;
|
|
u8 __link_ext_substate;
|
|
};
|
|
};
|
|
|
|
/**
|
|
* ethtool_rxfh_indir_default - get default value for RX flow hash indirection
|
|
* @index: Index in RX flow hash indirection table
|
|
* @n_rx_rings: Number of RX rings to use
|
|
*
|
|
* This function provides the default policy for RX flow hash indirection.
|
|
*/
|
|
static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
|
|
{
|
|
return index % n_rx_rings;
|
|
}
|
|
|
|
/* declare a link mode bitmap */
|
|
#define __ETHTOOL_DECLARE_LINK_MODE_MASK(name) \
|
|
DECLARE_BITMAP(name, __ETHTOOL_LINK_MODE_MASK_NBITS)
|
|
|
|
/* drivers must ignore base.cmd and base.link_mode_masks_nwords
|
|
* fields, but they are allowed to overwrite them (will be ignored).
|
|
*/
|
|
struct ethtool_link_ksettings {
|
|
struct ethtool_link_settings base;
|
|
struct {
|
|
__ETHTOOL_DECLARE_LINK_MODE_MASK(supported);
|
|
__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising);
|
|
__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising);
|
|
} link_modes;
|
|
};
|
|
|
|
/**
|
|
* ethtool_link_ksettings_zero_link_mode - clear link_ksettings link mode mask
|
|
* @ptr : pointer to struct ethtool_link_ksettings
|
|
* @name : one of supported/advertising/lp_advertising
|
|
*/
|
|
#define ethtool_link_ksettings_zero_link_mode(ptr, name) \
|
|
bitmap_zero((ptr)->link_modes.name, __ETHTOOL_LINK_MODE_MASK_NBITS)
|
|
|
|
/**
|
|
* ethtool_link_ksettings_add_link_mode - set bit in link_ksettings
|
|
* link mode mask
|
|
* @ptr : pointer to struct ethtool_link_ksettings
|
|
* @name : one of supported/advertising/lp_advertising
|
|
* @mode : one of the ETHTOOL_LINK_MODE_*_BIT
|
|
* (not atomic, no bound checking)
|
|
*/
|
|
#define ethtool_link_ksettings_add_link_mode(ptr, name, mode) \
|
|
__set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
|
|
|
|
/**
|
|
* ethtool_link_ksettings_del_link_mode - clear bit in link_ksettings
|
|
* link mode mask
|
|
* @ptr : pointer to struct ethtool_link_ksettings
|
|
* @name : one of supported/advertising/lp_advertising
|
|
* @mode : one of the ETHTOOL_LINK_MODE_*_BIT
|
|
* (not atomic, no bound checking)
|
|
*/
|
|
#define ethtool_link_ksettings_del_link_mode(ptr, name, mode) \
|
|
__clear_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
|
|
|
|
/**
|
|
* ethtool_link_ksettings_test_link_mode - test bit in ksettings link mode mask
|
|
* @ptr : pointer to struct ethtool_link_ksettings
|
|
* @name : one of supported/advertising/lp_advertising
|
|
* @mode : one of the ETHTOOL_LINK_MODE_*_BIT
|
|
* (not atomic, no bound checking)
|
|
*
|
|
* Returns true/false.
|
|
*/
|
|
#define ethtool_link_ksettings_test_link_mode(ptr, name, mode) \
|
|
test_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
|
|
|
|
extern int
|
|
__ethtool_get_link_ksettings(struct net_device *dev,
|
|
struct ethtool_link_ksettings *link_ksettings);
|
|
|
|
/**
|
|
* ethtool_intersect_link_masks - Given two link masks, AND them together
|
|
* @dst: first mask and where result is stored
|
|
* @src: second mask to intersect with
|
|
*
|
|
* Given two link mode masks, AND them together and save the result in dst.
|
|
*/
|
|
void ethtool_intersect_link_masks(struct ethtool_link_ksettings *dst,
|
|
struct ethtool_link_ksettings *src);
|
|
|
|
void ethtool_convert_legacy_u32_to_link_mode(unsigned long *dst,
|
|
u32 legacy_u32);
|
|
|
|
/* return false if src had higher bits set. lower bits always updated. */
|
|
bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
|
|
const unsigned long *src);
|
|
|
|
#define ETHTOOL_COALESCE_RX_USECS BIT(0)
|
|
#define ETHTOOL_COALESCE_RX_MAX_FRAMES BIT(1)
|
|
#define ETHTOOL_COALESCE_RX_USECS_IRQ BIT(2)
|
|
#define ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ BIT(3)
|
|
#define ETHTOOL_COALESCE_TX_USECS BIT(4)
|
|
#define ETHTOOL_COALESCE_TX_MAX_FRAMES BIT(5)
|
|
#define ETHTOOL_COALESCE_TX_USECS_IRQ BIT(6)
|
|
#define ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ BIT(7)
|
|
#define ETHTOOL_COALESCE_STATS_BLOCK_USECS BIT(8)
|
|
#define ETHTOOL_COALESCE_USE_ADAPTIVE_RX BIT(9)
|
|
#define ETHTOOL_COALESCE_USE_ADAPTIVE_TX BIT(10)
|
|
#define ETHTOOL_COALESCE_PKT_RATE_LOW BIT(11)
|
|
#define ETHTOOL_COALESCE_RX_USECS_LOW BIT(12)
|
|
#define ETHTOOL_COALESCE_RX_MAX_FRAMES_LOW BIT(13)
|
|
#define ETHTOOL_COALESCE_TX_USECS_LOW BIT(14)
|
|
#define ETHTOOL_COALESCE_TX_MAX_FRAMES_LOW BIT(15)
|
|
#define ETHTOOL_COALESCE_PKT_RATE_HIGH BIT(16)
|
|
#define ETHTOOL_COALESCE_RX_USECS_HIGH BIT(17)
|
|
#define ETHTOOL_COALESCE_RX_MAX_FRAMES_HIGH BIT(18)
|
|
#define ETHTOOL_COALESCE_TX_USECS_HIGH BIT(19)
|
|
#define ETHTOOL_COALESCE_TX_MAX_FRAMES_HIGH BIT(20)
|
|
#define ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL BIT(21)
|
|
|
|
#define ETHTOOL_COALESCE_USECS \
|
|
(ETHTOOL_COALESCE_RX_USECS | ETHTOOL_COALESCE_TX_USECS)
|
|
#define ETHTOOL_COALESCE_MAX_FRAMES \
|
|
(ETHTOOL_COALESCE_RX_MAX_FRAMES | ETHTOOL_COALESCE_TX_MAX_FRAMES)
|
|
#define ETHTOOL_COALESCE_USECS_IRQ \
|
|
(ETHTOOL_COALESCE_RX_USECS_IRQ | ETHTOOL_COALESCE_TX_USECS_IRQ)
|
|
#define ETHTOOL_COALESCE_MAX_FRAMES_IRQ \
|
|
(ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ | \
|
|
ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ)
|
|
#define ETHTOOL_COALESCE_USE_ADAPTIVE \
|
|
(ETHTOOL_COALESCE_USE_ADAPTIVE_RX | ETHTOOL_COALESCE_USE_ADAPTIVE_TX)
|
|
#define ETHTOOL_COALESCE_USECS_LOW_HIGH \
|
|
(ETHTOOL_COALESCE_RX_USECS_LOW | ETHTOOL_COALESCE_TX_USECS_LOW | \
|
|
ETHTOOL_COALESCE_RX_USECS_HIGH | ETHTOOL_COALESCE_TX_USECS_HIGH)
|
|
#define ETHTOOL_COALESCE_MAX_FRAMES_LOW_HIGH \
|
|
(ETHTOOL_COALESCE_RX_MAX_FRAMES_LOW | \
|
|
ETHTOOL_COALESCE_TX_MAX_FRAMES_LOW | \
|
|
ETHTOOL_COALESCE_RX_MAX_FRAMES_HIGH | \
|
|
ETHTOOL_COALESCE_TX_MAX_FRAMES_HIGH)
|
|
#define ETHTOOL_COALESCE_PKT_RATE_RX_USECS \
|
|
(ETHTOOL_COALESCE_USE_ADAPTIVE_RX | \
|
|
ETHTOOL_COALESCE_RX_USECS_LOW | ETHTOOL_COALESCE_RX_USECS_HIGH | \
|
|
ETHTOOL_COALESCE_PKT_RATE_LOW | ETHTOOL_COALESCE_PKT_RATE_HIGH | \
|
|
ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL)
|
|
|
|
#define ETHTOOL_STAT_NOT_SET (~0ULL)
|
|
|
|
/**
|
|
* struct ethtool_pause_stats - statistics for IEEE 802.3x pause frames
|
|
* @tx_pause_frames: transmitted pause frame count. Reported to user space
|
|
* as %ETHTOOL_A_PAUSE_STAT_TX_FRAMES.
|
|
*
|
|
* Equivalent to `30.3.4.2 aPAUSEMACCtrlFramesTransmitted`
|
|
* from the standard.
|
|
*
|
|
* @rx_pause_frames: received pause frame count. Reported to user space
|
|
* as %ETHTOOL_A_PAUSE_STAT_RX_FRAMES. Equivalent to:
|
|
*
|
|
* Equivalent to `30.3.4.3 aPAUSEMACCtrlFramesReceived`
|
|
* from the standard.
|
|
*/
|
|
struct ethtool_pause_stats {
|
|
u64 tx_pause_frames;
|
|
u64 rx_pause_frames;
|
|
};
|
|
|
|
/**
|
|
* struct ethtool_ops - optional netdev operations
|
|
* @supported_coalesce_params: supported types of interrupt coalescing.
|
|
* @get_drvinfo: Report driver/device information. Should only set the
|
|
* @driver, @version, @fw_version and @bus_info fields. If not
|
|
* implemented, the @driver and @bus_info fields will be filled in
|
|
* according to the netdev's parent device.
|
|
* @get_regs_len: Get buffer length required for @get_regs
|
|
* @get_regs: Get device registers
|
|
* @get_wol: Report whether Wake-on-Lan is enabled
|
|
* @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code
|
|
* or zero.
|
|
* @get_msglevel: Report driver message level. This should be the value
|
|
* of the @msg_enable field used by netif logging functions.
|
|
* @set_msglevel: Set driver message level
|
|
* @nway_reset: Restart autonegotiation. Returns a negative error code
|
|
* or zero.
|
|
* @get_link: Report whether physical link is up. Will only be called if
|
|
* the netdev is up. Should usually be set to ethtool_op_get_link(),
|
|
* which uses netif_carrier_ok().
|
|
* @get_link_ext_state: Report link extended state. Should set link_ext_state and
|
|
* link_ext_substate (link_ext_substate of 0 means link_ext_substate is unknown,
|
|
* do not attach ext_substate attribute to netlink message). If link_ext_state
|
|
* and link_ext_substate are unknown, return -ENODATA. If not implemented,
|
|
* link_ext_state and link_ext_substate will not be sent to userspace.
|
|
* @get_eeprom: Read data from the device EEPROM.
|
|
* Should fill in the magic field. Don't need to check len for zero
|
|
* or wraparound. Fill in the data argument with the eeprom values
|
|
* from offset to offset + len. Update len to the amount read.
|
|
* Returns an error or zero.
|
|
* @set_eeprom: Write data to the device EEPROM.
|
|
* Should validate the magic field. Don't need to check len for zero
|
|
* or wraparound. Update len to the amount written. Returns an error
|
|
* or zero.
|
|
* @get_coalesce: Get interrupt coalescing parameters. Returns a negative
|
|
* error code or zero.
|
|
* @set_coalesce: Set interrupt coalescing parameters. Supported coalescing
|
|
* types should be set in @supported_coalesce_params.
|
|
* Returns a negative error code or zero.
|
|
* @get_ringparam: Report ring sizes
|
|
* @set_ringparam: Set ring sizes. Returns a negative error code or zero.
|
|
* @get_pause_stats: Report pause frame statistics. Drivers must not zero
|
|
* statistics which they don't report. The stats structure is initialized
|
|
* to ETHTOOL_STAT_NOT_SET indicating driver does not report statistics.
|
|
* @get_pauseparam: Report pause parameters
|
|
* @set_pauseparam: Set pause parameters. Returns a negative error code
|
|
* or zero.
|
|
* @self_test: Run specified self-tests
|
|
* @get_strings: Return a set of strings that describe the requested objects
|
|
* @set_phys_id: Identify the physical devices, e.g. by flashing an LED
|
|
* attached to it. The implementation may update the indicator
|
|
* asynchronously or synchronously, but in either case it must return
|
|
* quickly. It is initially called with the argument %ETHTOOL_ID_ACTIVE,
|
|
* and must either activate asynchronous updates and return zero, return
|
|
* a negative error or return a positive frequency for synchronous
|
|
* indication (e.g. 1 for one on/off cycle per second). If it returns
|
|
* a frequency then it will be called again at intervals with the
|
|
* argument %ETHTOOL_ID_ON or %ETHTOOL_ID_OFF and should set the state of
|
|
* the indicator accordingly. Finally, it is called with the argument
|
|
* %ETHTOOL_ID_INACTIVE and must deactivate the indicator. Returns a
|
|
* negative error code or zero.
|
|
* @get_ethtool_stats: Return extended statistics about the device.
|
|
* This is only useful if the device maintains statistics not
|
|
* included in &struct rtnl_link_stats64.
|
|
* @begin: Function to be called before any other operation. Returns a
|
|
* negative error code or zero.
|
|
* @complete: Function to be called after any other operation except
|
|
* @begin. Will be called even if the other operation failed.
|
|
* @get_priv_flags: Report driver-specific feature flags.
|
|
* @set_priv_flags: Set driver-specific feature flags. Returns a negative
|
|
* error code or zero.
|
|
* @get_sset_count: Get number of strings that @get_strings will write.
|
|
* @get_rxnfc: Get RX flow classification rules. Returns a negative
|
|
* error code or zero.
|
|
* @set_rxnfc: Set RX flow classification rules. Returns a negative
|
|
* error code or zero.
|
|
* @flash_device: Write a firmware image to device's flash memory.
|
|
* Returns a negative error code or zero.
|
|
* @reset: Reset (part of) the device, as specified by a bitmask of
|
|
* flags from &enum ethtool_reset_flags. Returns a negative
|
|
* error code or zero.
|
|
* @get_rxfh_key_size: Get the size of the RX flow hash key.
|
|
* Returns zero if not supported for this specific device.
|
|
* @get_rxfh_indir_size: Get the size of the RX flow hash indirection table.
|
|
* Returns zero if not supported for this specific device.
|
|
* @get_rxfh: Get the contents of the RX flow hash indirection table, hash key
|
|
* and/or hash function.
|
|
* Returns a negative error code or zero.
|
|
* @set_rxfh: Set the contents of the RX flow hash indirection table, hash
|
|
* key, and/or hash function. Arguments which are set to %NULL or zero
|
|
* will remain unchanged.
|
|
* Returns a negative error code or zero. An error code must be returned
|
|
* if at least one unsupported change was requested.
|
|
* @get_rxfh_context: Get the contents of the RX flow hash indirection table,
|
|
* hash key, and/or hash function assiciated to the given rss context.
|
|
* Returns a negative error code or zero.
|
|
* @set_rxfh_context: Create, remove and configure RSS contexts. Allows setting
|
|
* the contents of the RX flow hash indirection table, hash key, and/or
|
|
* hash function associated to the given context. Arguments which are set
|
|
* to %NULL or zero will remain unchanged.
|
|
* Returns a negative error code or zero. An error code must be returned
|
|
* if at least one unsupported change was requested.
|
|
* @get_channels: Get number of channels.
|
|
* @set_channels: Set number of channels. Returns a negative error code or
|
|
* zero.
|
|
* @get_dump_flag: Get dump flag indicating current dump length, version,
|
|
* and flag of the device.
|
|
* @get_dump_data: Get dump data.
|
|
* @set_dump: Set dump specific flags to the device.
|
|
* @get_ts_info: Get the time stamping and PTP hardware clock capabilities.
|
|
* Drivers supporting transmit time stamps in software should set this to
|
|
* ethtool_op_get_ts_info().
|
|
* @get_module_info: Get the size and type of the eeprom contained within
|
|
* a plug-in module.
|
|
* @get_module_eeprom: Get the eeprom information from the plug-in module
|
|
* @get_eee: Get Energy-Efficient (EEE) supported and status.
|
|
* @set_eee: Set EEE status (enable/disable) as well as LPI timers.
|
|
* @get_per_queue_coalesce: Get interrupt coalescing parameters per queue.
|
|
* It must check that the given queue number is valid. If neither a RX nor
|
|
* a TX queue has this number, return -EINVAL. If only a RX queue or a TX
|
|
* queue has this number, set the inapplicable fields to ~0 and return 0.
|
|
* Returns a negative error code or zero.
|
|
* @set_per_queue_coalesce: Set interrupt coalescing parameters per queue.
|
|
* It must check that the given queue number is valid. If neither a RX nor
|
|
* a TX queue has this number, return -EINVAL. If only a RX queue or a TX
|
|
* queue has this number, ignore the inapplicable fields. Supported
|
|
* coalescing types should be set in @supported_coalesce_params.
|
|
* Returns a negative error code or zero.
|
|
* @get_link_ksettings: Get various device settings including Ethernet link
|
|
* settings. The %cmd and %link_mode_masks_nwords fields should be
|
|
* ignored (use %__ETHTOOL_LINK_MODE_MASK_NBITS instead of the latter),
|
|
* any change to them will be overwritten by kernel. Returns a negative
|
|
* error code or zero.
|
|
* @set_link_ksettings: Set various device settings including Ethernet link
|
|
* settings. The %cmd and %link_mode_masks_nwords fields should be
|
|
* ignored (use %__ETHTOOL_LINK_MODE_MASK_NBITS instead of the latter),
|
|
* any change to them will be overwritten by kernel. Returns a negative
|
|
* error code or zero.
|
|
* @get_fecparam: Get the network device Forward Error Correction parameters.
|
|
* @set_fecparam: Set the network device Forward Error Correction parameters.
|
|
* @get_ethtool_phy_stats: Return extended statistics about the PHY device.
|
|
* This is only useful if the device maintains PHY statistics and
|
|
* cannot use the standard PHY library helpers.
|
|
*
|
|
* All operations are optional (i.e. the function pointer may be set
|
|
* to %NULL) and callers must take this into account. Callers must
|
|
* hold the RTNL lock.
|
|
*
|
|
* See the structures used by these operations for further documentation.
|
|
* Note that for all operations using a structure ending with a zero-
|
|
* length array, the array is allocated separately in the kernel and
|
|
* is passed to the driver as an additional parameter.
|
|
*
|
|
* See &struct net_device and &struct net_device_ops for documentation
|
|
* of the generic netdev features interface.
|
|
*/
|
|
struct ethtool_ops {
|
|
u32 supported_coalesce_params;
|
|
void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
|
|
int (*get_regs_len)(struct net_device *);
|
|
void (*get_regs)(struct net_device *, struct ethtool_regs *, void *);
|
|
void (*get_wol)(struct net_device *, struct ethtool_wolinfo *);
|
|
int (*set_wol)(struct net_device *, struct ethtool_wolinfo *);
|
|
u32 (*get_msglevel)(struct net_device *);
|
|
void (*set_msglevel)(struct net_device *, u32);
|
|
int (*nway_reset)(struct net_device *);
|
|
u32 (*get_link)(struct net_device *);
|
|
int (*get_link_ext_state)(struct net_device *,
|
|
struct ethtool_link_ext_state_info *);
|
|
int (*get_eeprom_len)(struct net_device *);
|
|
int (*get_eeprom)(struct net_device *,
|
|
struct ethtool_eeprom *, u8 *);
|
|
int (*set_eeprom)(struct net_device *,
|
|
struct ethtool_eeprom *, u8 *);
|
|
int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
|
|
int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
|
|
void (*get_ringparam)(struct net_device *,
|
|
struct ethtool_ringparam *);
|
|
int (*set_ringparam)(struct net_device *,
|
|
struct ethtool_ringparam *);
|
|
void (*get_pause_stats)(struct net_device *dev,
|
|
struct ethtool_pause_stats *pause_stats);
|
|
void (*get_pauseparam)(struct net_device *,
|
|
struct ethtool_pauseparam*);
|
|
int (*set_pauseparam)(struct net_device *,
|
|
struct ethtool_pauseparam*);
|
|
void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
|
|
void (*get_strings)(struct net_device *, u32 stringset, u8 *);
|
|
int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state);
|
|
void (*get_ethtool_stats)(struct net_device *,
|
|
struct ethtool_stats *, u64 *);
|
|
int (*begin)(struct net_device *);
|
|
void (*complete)(struct net_device *);
|
|
u32 (*get_priv_flags)(struct net_device *);
|
|
int (*set_priv_flags)(struct net_device *, u32);
|
|
int (*get_sset_count)(struct net_device *, int);
|
|
int (*get_rxnfc)(struct net_device *,
|
|
struct ethtool_rxnfc *, u32 *rule_locs);
|
|
int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
|
|
int (*flash_device)(struct net_device *, struct ethtool_flash *);
|
|
int (*reset)(struct net_device *, u32 *);
|
|
u32 (*get_rxfh_key_size)(struct net_device *);
|
|
u32 (*get_rxfh_indir_size)(struct net_device *);
|
|
int (*get_rxfh)(struct net_device *, u32 *indir, u8 *key,
|
|
u8 *hfunc);
|
|
int (*set_rxfh)(struct net_device *, const u32 *indir,
|
|
const u8 *key, const u8 hfunc);
|
|
int (*get_rxfh_context)(struct net_device *, u32 *indir, u8 *key,
|
|
u8 *hfunc, u32 rss_context);
|
|
int (*set_rxfh_context)(struct net_device *, const u32 *indir,
|
|
const u8 *key, const u8 hfunc,
|
|
u32 *rss_context, bool delete);
|
|
void (*get_channels)(struct net_device *, struct ethtool_channels *);
|
|
int (*set_channels)(struct net_device *, struct ethtool_channels *);
|
|
int (*get_dump_flag)(struct net_device *, struct ethtool_dump *);
|
|
int (*get_dump_data)(struct net_device *,
|
|
struct ethtool_dump *, void *);
|
|
int (*set_dump)(struct net_device *, struct ethtool_dump *);
|
|
int (*get_ts_info)(struct net_device *, struct ethtool_ts_info *);
|
|
int (*get_module_info)(struct net_device *,
|
|
struct ethtool_modinfo *);
|
|
int (*get_module_eeprom)(struct net_device *,
|
|
struct ethtool_eeprom *, u8 *);
|
|
int (*get_eee)(struct net_device *, struct ethtool_eee *);
|
|
int (*set_eee)(struct net_device *, struct ethtool_eee *);
|
|
int (*get_tunable)(struct net_device *,
|
|
const struct ethtool_tunable *, void *);
|
|
int (*set_tunable)(struct net_device *,
|
|
const struct ethtool_tunable *, const void *);
|
|
int (*get_per_queue_coalesce)(struct net_device *, u32,
|
|
struct ethtool_coalesce *);
|
|
int (*set_per_queue_coalesce)(struct net_device *, u32,
|
|
struct ethtool_coalesce *);
|
|
int (*get_link_ksettings)(struct net_device *,
|
|
struct ethtool_link_ksettings *);
|
|
int (*set_link_ksettings)(struct net_device *,
|
|
const struct ethtool_link_ksettings *);
|
|
int (*get_fecparam)(struct net_device *,
|
|
struct ethtool_fecparam *);
|
|
int (*set_fecparam)(struct net_device *,
|
|
struct ethtool_fecparam *);
|
|
void (*get_ethtool_phy_stats)(struct net_device *,
|
|
struct ethtool_stats *, u64 *);
|
|
int (*get_phy_tunable)(struct net_device *,
|
|
const struct ethtool_tunable *, void *);
|
|
int (*set_phy_tunable)(struct net_device *,
|
|
const struct ethtool_tunable *, const void *);
|
|
|
|
ANDROID_KABI_RESERVE(1);
|
|
ANDROID_KABI_RESERVE(2);
|
|
ANDROID_KABI_RESERVE(3);
|
|
ANDROID_KABI_RESERVE(4);
|
|
};
|
|
|
|
int ethtool_check_ops(const struct ethtool_ops *ops);
|
|
|
|
struct ethtool_rx_flow_rule {
|
|
struct flow_rule *rule;
|
|
unsigned long priv[];
|
|
};
|
|
|
|
struct ethtool_rx_flow_spec_input {
|
|
const struct ethtool_rx_flow_spec *fs;
|
|
u32 rss_ctx;
|
|
};
|
|
|
|
struct ethtool_rx_flow_rule *
|
|
ethtool_rx_flow_rule_create(const struct ethtool_rx_flow_spec_input *input);
|
|
void ethtool_rx_flow_rule_destroy(struct ethtool_rx_flow_rule *rule);
|
|
|
|
bool ethtool_virtdev_validate_cmd(const struct ethtool_link_ksettings *cmd);
|
|
int ethtool_virtdev_set_link_ksettings(struct net_device *dev,
|
|
const struct ethtool_link_ksettings *cmd,
|
|
u32 *dev_speed, u8 *dev_duplex);
|
|
|
|
struct netlink_ext_ack;
|
|
struct phy_device;
|
|
struct phy_tdr_config;
|
|
|
|
/**
|
|
* struct ethtool_phy_ops - Optional PHY device options
|
|
* @get_sset_count: Get number of strings that @get_strings will write.
|
|
* @get_strings: Return a set of strings that describe the requested objects
|
|
* @get_stats: Return extended statistics about the PHY device.
|
|
* @start_cable_test - Start a cable test
|
|
* @start_cable_test_tdr - Start a Time Domain Reflectometry cable test
|
|
*
|
|
* All operations are optional (i.e. the function pointer may be set to %NULL)
|
|
* and callers must take this into account. Callers must hold the RTNL lock.
|
|
*/
|
|
struct ethtool_phy_ops {
|
|
int (*get_sset_count)(struct phy_device *dev);
|
|
int (*get_strings)(struct phy_device *dev, u8 *data);
|
|
int (*get_stats)(struct phy_device *dev,
|
|
struct ethtool_stats *stats, u64 *data);
|
|
int (*start_cable_test)(struct phy_device *phydev,
|
|
struct netlink_ext_ack *extack);
|
|
int (*start_cable_test_tdr)(struct phy_device *phydev,
|
|
struct netlink_ext_ack *extack,
|
|
const struct phy_tdr_config *config);
|
|
};
|
|
|
|
/**
|
|
* ethtool_set_ethtool_phy_ops - Set the ethtool_phy_ops singleton
|
|
* @ops: Ethtool PHY operations to set
|
|
*/
|
|
void ethtool_set_ethtool_phy_ops(const struct ethtool_phy_ops *ops);
|
|
|
|
#endif /* _LINUX_ETHTOOL_H */
|