Lines Matching +full:full +full:- +full:size
1 // SPDX-License-Identifier: GPL-2.0-only
13 [NETIF_F_SG_BIT] = "tx-scatter-gather",
14 [NETIF_F_IP_CSUM_BIT] = "tx-checksum-ipv4",
15 [NETIF_F_HW_CSUM_BIT] = "tx-checksum-ip-generic",
16 [NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6",
18 [NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist",
19 [NETIF_F_HW_VLAN_CTAG_TX_BIT] = "tx-vlan-hw-insert",
21 [NETIF_F_HW_VLAN_CTAG_RX_BIT] = "rx-vlan-hw-parse",
22 [NETIF_F_HW_VLAN_CTAG_FILTER_BIT] = "rx-vlan-filter",
23 [NETIF_F_HW_VLAN_STAG_TX_BIT] = "tx-vlan-stag-hw-insert",
24 [NETIF_F_HW_VLAN_STAG_RX_BIT] = "rx-vlan-stag-hw-parse",
25 [NETIF_F_HW_VLAN_STAG_FILTER_BIT] = "rx-vlan-stag-filter",
26 [NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged",
27 [NETIF_F_GSO_BIT] = "tx-generic-segmentation",
28 [NETIF_F_GRO_BIT] = "rx-gro",
29 [NETIF_F_GRO_HW_BIT] = "rx-gro-hw",
30 [NETIF_F_LRO_BIT] = "rx-lro",
32 [NETIF_F_TSO_BIT] = "tx-tcp-segmentation",
33 [NETIF_F_GSO_ROBUST_BIT] = "tx-gso-robust",
34 [NETIF_F_TSO_ECN_BIT] = "tx-tcp-ecn-segmentation",
35 [NETIF_F_TSO_MANGLEID_BIT] = "tx-tcp-mangleid-segmentation",
36 [NETIF_F_TSO6_BIT] = "tx-tcp6-segmentation",
37 [NETIF_F_FSO_BIT] = "tx-fcoe-segmentation",
38 [NETIF_F_GSO_GRE_BIT] = "tx-gre-segmentation",
39 [NETIF_F_GSO_GRE_CSUM_BIT] = "tx-gre-csum-segmentation",
40 [NETIF_F_GSO_IPXIP4_BIT] = "tx-ipxip4-segmentation",
41 [NETIF_F_GSO_IPXIP6_BIT] = "tx-ipxip6-segmentation",
42 [NETIF_F_GSO_UDP_TUNNEL_BIT] = "tx-udp_tnl-segmentation",
43 [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
44 [NETIF_F_GSO_PARTIAL_BIT] = "tx-gso-partial",
45 [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-tunnel-remcsum-segmentation",
46 [NETIF_F_GSO_SCTP_BIT] = "tx-sctp-segmentation",
47 [NETIF_F_GSO_ESP_BIT] = "tx-esp-segmentation",
48 [NETIF_F_GSO_UDP_L4_BIT] = "tx-udp-segmentation",
49 [NETIF_F_GSO_FRAGLIST_BIT] = "tx-gso-list",
51 [NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc",
52 [NETIF_F_SCTP_CRC_BIT] = "tx-checksum-sctp",
53 [NETIF_F_NTUPLE_BIT] = "rx-ntuple-filter",
54 [NETIF_F_RXHASH_BIT] = "rx-hashing",
55 [NETIF_F_RXCSUM_BIT] = "rx-checksum",
56 [NETIF_F_NOCACHE_COPY_BIT] = "tx-nocache-copy",
58 [NETIF_F_RXFCS_BIT] = "rx-fcs",
59 [NETIF_F_RXALL_BIT] = "rx-all",
60 [NETIF_F_HW_L2FW_DOFFLOAD_BIT] = "l2-fwd-offload",
61 [NETIF_F_HW_TC_BIT] = "hw-tc-offload",
62 [NETIF_F_HW_ESP_BIT] = "esp-hw-offload",
63 [NETIF_F_HW_ESP_TX_CSUM_BIT] = "esp-tx-csum-hw-offload",
64 [NETIF_F_RX_UDP_TUNNEL_PORT_BIT] = "rx-udp_tunnel-port-offload",
65 [NETIF_F_HW_TLS_RECORD_BIT] = "tls-hw-record",
66 [NETIF_F_HW_TLS_TX_BIT] = "tls-hw-tx-offload",
67 [NETIF_F_HW_TLS_RX_BIT] = "tls-hw-rx-offload",
68 [NETIF_F_GRO_FRAGLIST_BIT] = "rx-gro-list",
69 [NETIF_F_HW_MACSEC_BIT] = "macsec-hw-offload",
70 [NETIF_F_GRO_UDP_FWD_BIT] = "rx-udp-gro-forwarding",
71 [NETIF_F_HW_HSR_TAG_INS_BIT] = "hsr-tag-ins-offload",
72 [NETIF_F_HW_HSR_TAG_RM_BIT] = "hsr-tag-rm-offload",
73 [NETIF_F_HW_HSR_FWD_BIT] = "hsr-fwd-offload",
74 [NETIF_F_HW_HSR_DUP_BIT] = "hsr-dup-offload",
87 [ETHTOOL_RX_COPYBREAK] = "rx-copybreak",
88 [ETHTOOL_TX_COPYBREAK] = "tx-copybreak",
89 [ETHTOOL_PFC_PREVENTION_TOUT] = "pfc-prevention-tout",
90 [ETHTOOL_TX_COPYBREAK_BUF_SIZE] = "tx-copybreak-buf-size",
96 [ETHTOOL_PHY_DOWNSHIFT] = "phy-downshift",
97 [ETHTOOL_PHY_FAST_LINK_DOWN] = "phy-fast-link-down",
98 [ETHTOOL_PHY_EDPD] = "phy-energy-detect-power-down",
111 __DEFINE_LINK_MODE_NAME(10, T, Full),
113 __DEFINE_LINK_MODE_NAME(100, T, Full),
115 __DEFINE_LINK_MODE_NAME(1000, T, Full),
122 __DEFINE_LINK_MODE_NAME(10000, T, Full),
125 __DEFINE_LINK_MODE_NAME(2500, X, Full),
127 __DEFINE_LINK_MODE_NAME(1000, KX, Full),
128 __DEFINE_LINK_MODE_NAME(10000, KX4, Full),
129 __DEFINE_LINK_MODE_NAME(10000, KR, Full),
131 __DEFINE_LINK_MODE_NAME(20000, MLD2, Full),
132 __DEFINE_LINK_MODE_NAME(20000, KR2, Full),
133 __DEFINE_LINK_MODE_NAME(40000, KR4, Full),
134 __DEFINE_LINK_MODE_NAME(40000, CR4, Full),
135 __DEFINE_LINK_MODE_NAME(40000, SR4, Full),
136 __DEFINE_LINK_MODE_NAME(40000, LR4, Full),
137 __DEFINE_LINK_MODE_NAME(56000, KR4, Full),
138 __DEFINE_LINK_MODE_NAME(56000, CR4, Full),
139 __DEFINE_LINK_MODE_NAME(56000, SR4, Full),
140 __DEFINE_LINK_MODE_NAME(56000, LR4, Full),
141 __DEFINE_LINK_MODE_NAME(25000, CR, Full),
142 __DEFINE_LINK_MODE_NAME(25000, KR, Full),
143 __DEFINE_LINK_MODE_NAME(25000, SR, Full),
144 __DEFINE_LINK_MODE_NAME(50000, CR2, Full),
145 __DEFINE_LINK_MODE_NAME(50000, KR2, Full),
146 __DEFINE_LINK_MODE_NAME(100000, KR4, Full),
147 __DEFINE_LINK_MODE_NAME(100000, SR4, Full),
148 __DEFINE_LINK_MODE_NAME(100000, CR4, Full),
149 __DEFINE_LINK_MODE_NAME(100000, LR4_ER4, Full),
150 __DEFINE_LINK_MODE_NAME(50000, SR2, Full),
151 __DEFINE_LINK_MODE_NAME(1000, X, Full),
152 __DEFINE_LINK_MODE_NAME(10000, CR, Full),
153 __DEFINE_LINK_MODE_NAME(10000, SR, Full),
154 __DEFINE_LINK_MODE_NAME(10000, LR, Full),
155 __DEFINE_LINK_MODE_NAME(10000, LRM, Full),
156 __DEFINE_LINK_MODE_NAME(10000, ER, Full),
157 __DEFINE_LINK_MODE_NAME(2500, T, Full),
158 __DEFINE_LINK_MODE_NAME(5000, T, Full),
162 __DEFINE_LINK_MODE_NAME(50000, KR, Full),
163 __DEFINE_LINK_MODE_NAME(50000, SR, Full),
164 __DEFINE_LINK_MODE_NAME(50000, CR, Full),
165 __DEFINE_LINK_MODE_NAME(50000, LR_ER_FR, Full),
166 __DEFINE_LINK_MODE_NAME(50000, DR, Full),
167 __DEFINE_LINK_MODE_NAME(100000, KR2, Full),
168 __DEFINE_LINK_MODE_NAME(100000, SR2, Full),
169 __DEFINE_LINK_MODE_NAME(100000, CR2, Full),
170 __DEFINE_LINK_MODE_NAME(100000, LR2_ER2_FR2, Full),
171 __DEFINE_LINK_MODE_NAME(100000, DR2, Full),
172 __DEFINE_LINK_MODE_NAME(200000, KR4, Full),
173 __DEFINE_LINK_MODE_NAME(200000, SR4, Full),
174 __DEFINE_LINK_MODE_NAME(200000, LR4_ER4_FR4, Full),
175 __DEFINE_LINK_MODE_NAME(200000, DR4, Full),
176 __DEFINE_LINK_MODE_NAME(200000, CR4, Full),
177 __DEFINE_LINK_MODE_NAME(100, T1, Full),
178 __DEFINE_LINK_MODE_NAME(1000, T1, Full),
179 __DEFINE_LINK_MODE_NAME(400000, KR8, Full),
180 __DEFINE_LINK_MODE_NAME(400000, SR8, Full),
181 __DEFINE_LINK_MODE_NAME(400000, LR8_ER8_FR8, Full),
182 __DEFINE_LINK_MODE_NAME(400000, DR8, Full),
183 __DEFINE_LINK_MODE_NAME(400000, CR8, Full),
185 __DEFINE_LINK_MODE_NAME(100000, KR, Full),
186 __DEFINE_LINK_MODE_NAME(100000, SR, Full),
187 __DEFINE_LINK_MODE_NAME(100000, LR_ER_FR, Full),
188 __DEFINE_LINK_MODE_NAME(100000, DR, Full),
189 __DEFINE_LINK_MODE_NAME(100000, CR, Full),
190 __DEFINE_LINK_MODE_NAME(200000, KR2, Full),
191 __DEFINE_LINK_MODE_NAME(200000, SR2, Full),
192 __DEFINE_LINK_MODE_NAME(200000, LR2_ER2_FR2, Full),
193 __DEFINE_LINK_MODE_NAME(200000, DR2, Full),
194 __DEFINE_LINK_MODE_NAME(200000, CR2, Full),
195 __DEFINE_LINK_MODE_NAME(400000, KR4, Full),
196 __DEFINE_LINK_MODE_NAME(400000, SR4, Full),
197 __DEFINE_LINK_MODE_NAME(400000, LR4_ER4_FR4, Full),
198 __DEFINE_LINK_MODE_NAME(400000, DR4, Full),
199 __DEFINE_LINK_MODE_NAME(400000, CR4, Full),
201 __DEFINE_LINK_MODE_NAME(100, FX, Full),
202 __DEFINE_LINK_MODE_NAME(10, T1L, Full),
203 __DEFINE_LINK_MODE_NAME(800000, CR8, Full),
204 __DEFINE_LINK_MODE_NAME(800000, KR8, Full),
205 __DEFINE_LINK_MODE_NAME(800000, DR8, Full),
206 __DEFINE_LINK_MODE_NAME(800000, DR8_2, Full),
207 __DEFINE_LINK_MODE_NAME(800000, SR8, Full),
208 __DEFINE_LINK_MODE_NAME(800000, VR8, Full),
209 __DEFINE_LINK_MODE_NAME(10, T1S, Full),
212 __DEFINE_LINK_MODE_NAME(10, T1BRR, Full),
272 __DEFINE_LINK_MODE_PARAMS(10, T, Full),
274 __DEFINE_LINK_MODE_PARAMS(100, T, Full),
276 __DEFINE_LINK_MODE_PARAMS(1000, T, Full),
283 __DEFINE_LINK_MODE_PARAMS(10000, T, Full),
286 __DEFINE_LINK_MODE_PARAMS(2500, X, Full),
288 __DEFINE_LINK_MODE_PARAMS(1000, KX, Full),
289 __DEFINE_LINK_MODE_PARAMS(10000, KX4, Full),
290 __DEFINE_LINK_MODE_PARAMS(10000, KR, Full),
296 __DEFINE_LINK_MODE_PARAMS(20000, MLD2, Full),
297 __DEFINE_LINK_MODE_PARAMS(20000, KR2, Full),
298 __DEFINE_LINK_MODE_PARAMS(40000, KR4, Full),
299 __DEFINE_LINK_MODE_PARAMS(40000, CR4, Full),
300 __DEFINE_LINK_MODE_PARAMS(40000, SR4, Full),
301 __DEFINE_LINK_MODE_PARAMS(40000, LR4, Full),
302 __DEFINE_LINK_MODE_PARAMS(56000, KR4, Full),
303 __DEFINE_LINK_MODE_PARAMS(56000, CR4, Full),
304 __DEFINE_LINK_MODE_PARAMS(56000, SR4, Full),
305 __DEFINE_LINK_MODE_PARAMS(56000, LR4, Full),
306 __DEFINE_LINK_MODE_PARAMS(25000, CR, Full),
307 __DEFINE_LINK_MODE_PARAMS(25000, KR, Full),
308 __DEFINE_LINK_MODE_PARAMS(25000, SR, Full),
309 __DEFINE_LINK_MODE_PARAMS(50000, CR2, Full),
310 __DEFINE_LINK_MODE_PARAMS(50000, KR2, Full),
311 __DEFINE_LINK_MODE_PARAMS(100000, KR4, Full),
312 __DEFINE_LINK_MODE_PARAMS(100000, SR4, Full),
313 __DEFINE_LINK_MODE_PARAMS(100000, CR4, Full),
314 __DEFINE_LINK_MODE_PARAMS(100000, LR4_ER4, Full),
315 __DEFINE_LINK_MODE_PARAMS(50000, SR2, Full),
316 __DEFINE_LINK_MODE_PARAMS(1000, X, Full),
317 __DEFINE_LINK_MODE_PARAMS(10000, CR, Full),
318 __DEFINE_LINK_MODE_PARAMS(10000, SR, Full),
319 __DEFINE_LINK_MODE_PARAMS(10000, LR, Full),
320 __DEFINE_LINK_MODE_PARAMS(10000, LRM, Full),
321 __DEFINE_LINK_MODE_PARAMS(10000, ER, Full),
322 __DEFINE_LINK_MODE_PARAMS(2500, T, Full),
323 __DEFINE_LINK_MODE_PARAMS(5000, T, Full),
327 __DEFINE_LINK_MODE_PARAMS(50000, KR, Full),
328 __DEFINE_LINK_MODE_PARAMS(50000, SR, Full),
329 __DEFINE_LINK_MODE_PARAMS(50000, CR, Full),
330 __DEFINE_LINK_MODE_PARAMS(50000, LR_ER_FR, Full),
331 __DEFINE_LINK_MODE_PARAMS(50000, DR, Full),
332 __DEFINE_LINK_MODE_PARAMS(100000, KR2, Full),
333 __DEFINE_LINK_MODE_PARAMS(100000, SR2, Full),
334 __DEFINE_LINK_MODE_PARAMS(100000, CR2, Full),
335 __DEFINE_LINK_MODE_PARAMS(100000, LR2_ER2_FR2, Full),
336 __DEFINE_LINK_MODE_PARAMS(100000, DR2, Full),
337 __DEFINE_LINK_MODE_PARAMS(200000, KR4, Full),
338 __DEFINE_LINK_MODE_PARAMS(200000, SR4, Full),
339 __DEFINE_LINK_MODE_PARAMS(200000, LR4_ER4_FR4, Full),
340 __DEFINE_LINK_MODE_PARAMS(200000, DR4, Full),
341 __DEFINE_LINK_MODE_PARAMS(200000, CR4, Full),
342 __DEFINE_LINK_MODE_PARAMS(100, T1, Full),
343 __DEFINE_LINK_MODE_PARAMS(1000, T1, Full),
344 __DEFINE_LINK_MODE_PARAMS(400000, KR8, Full),
345 __DEFINE_LINK_MODE_PARAMS(400000, SR8, Full),
346 __DEFINE_LINK_MODE_PARAMS(400000, LR8_ER8_FR8, Full),
347 __DEFINE_LINK_MODE_PARAMS(400000, DR8, Full),
348 __DEFINE_LINK_MODE_PARAMS(400000, CR8, Full),
350 __DEFINE_LINK_MODE_PARAMS(100000, KR, Full),
351 __DEFINE_LINK_MODE_PARAMS(100000, SR, Full),
352 __DEFINE_LINK_MODE_PARAMS(100000, LR_ER_FR, Full),
353 __DEFINE_LINK_MODE_PARAMS(100000, DR, Full),
354 __DEFINE_LINK_MODE_PARAMS(100000, CR, Full),
355 __DEFINE_LINK_MODE_PARAMS(200000, KR2, Full),
356 __DEFINE_LINK_MODE_PARAMS(200000, SR2, Full),
357 __DEFINE_LINK_MODE_PARAMS(200000, LR2_ER2_FR2, Full),
358 __DEFINE_LINK_MODE_PARAMS(200000, DR2, Full),
359 __DEFINE_LINK_MODE_PARAMS(200000, CR2, Full),
360 __DEFINE_LINK_MODE_PARAMS(400000, KR4, Full),
361 __DEFINE_LINK_MODE_PARAMS(400000, SR4, Full),
362 __DEFINE_LINK_MODE_PARAMS(400000, LR4_ER4_FR4, Full),
363 __DEFINE_LINK_MODE_PARAMS(400000, DR4, Full),
364 __DEFINE_LINK_MODE_PARAMS(400000, CR4, Full),
366 __DEFINE_LINK_MODE_PARAMS(100, FX, Full),
367 __DEFINE_LINK_MODE_PARAMS(10, T1L, Full),
368 __DEFINE_LINK_MODE_PARAMS(800000, CR8, Full),
369 __DEFINE_LINK_MODE_PARAMS(800000, KR8, Full),
370 __DEFINE_LINK_MODE_PARAMS(800000, DR8, Full),
371 __DEFINE_LINK_MODE_PARAMS(800000, DR8_2, Full),
372 __DEFINE_LINK_MODE_PARAMS(800000, SR8, Full),
373 __DEFINE_LINK_MODE_PARAMS(800000, VR8, Full),
374 __DEFINE_LINK_MODE_PARAMS(10, T1S, Full),
377 __DEFINE_LINK_MODE_PARAMS(10, T1BRR, Full),
413 [const_ilog2(SOF_TIMESTAMPING_TX_HARDWARE)] = "hardware-transmit",
414 [const_ilog2(SOF_TIMESTAMPING_TX_SOFTWARE)] = "software-transmit",
415 [const_ilog2(SOF_TIMESTAMPING_RX_HARDWARE)] = "hardware-receive",
416 [const_ilog2(SOF_TIMESTAMPING_RX_SOFTWARE)] = "software-receive",
417 [const_ilog2(SOF_TIMESTAMPING_SOFTWARE)] = "software-system-clock",
418 [const_ilog2(SOF_TIMESTAMPING_SYS_HARDWARE)] = "hardware-legacy-clock",
419 [const_ilog2(SOF_TIMESTAMPING_RAW_HARDWARE)] = "hardware-raw-clock",
420 [const_ilog2(SOF_TIMESTAMPING_OPT_ID)] = "option-id",
421 [const_ilog2(SOF_TIMESTAMPING_TX_SCHED)] = "sched-transmit",
422 [const_ilog2(SOF_TIMESTAMPING_TX_ACK)] = "ack-transmit",
423 [const_ilog2(SOF_TIMESTAMPING_OPT_CMSG)] = "option-cmsg",
424 [const_ilog2(SOF_TIMESTAMPING_OPT_TSONLY)] = "option-tsonly",
425 [const_ilog2(SOF_TIMESTAMPING_OPT_STATS)] = "option-stats",
426 [const_ilog2(SOF_TIMESTAMPING_OPT_PKTINFO)] = "option-pktinfo",
427 [const_ilog2(SOF_TIMESTAMPING_OPT_TX_SWHW)] = "option-tx-swhw",
428 [const_ilog2(SOF_TIMESTAMPING_BIND_PHC)] = "bind-phc",
429 [const_ilog2(SOF_TIMESTAMPING_OPT_ID_TCP)] = "option-id-tcp",
430 [const_ilog2(SOF_TIMESTAMPING_OPT_RX_FILTER)] = "option-rx-filter",
437 [HWTSTAMP_TX_ONESTEP_SYNC] = "onestep-sync",
438 [HWTSTAMP_TX_ONESTEP_P2P] = "onestep-p2p",
446 [HWTSTAMP_FILTER_PTP_V1_L4_EVENT] = "ptpv1-l4-event",
447 [HWTSTAMP_FILTER_PTP_V1_L4_SYNC] = "ptpv1-l4-sync",
448 [HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ] = "ptpv1-l4-delay-req",
449 [HWTSTAMP_FILTER_PTP_V2_L4_EVENT] = "ptpv2-l4-event",
450 [HWTSTAMP_FILTER_PTP_V2_L4_SYNC] = "ptpv2-l4-sync",
451 [HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ] = "ptpv2-l4-delay-req",
452 [HWTSTAMP_FILTER_PTP_V2_L2_EVENT] = "ptpv2-l2-event",
453 [HWTSTAMP_FILTER_PTP_V2_L2_SYNC] = "ptpv2-l2-sync",
454 [HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ] = "ptpv2-l2-delay-req",
455 [HWTSTAMP_FILTER_PTP_V2_EVENT] = "ptpv2-event",
456 [HWTSTAMP_FILTER_PTP_V2_SYNC] = "ptpv2-sync",
457 [HWTSTAMP_FILTER_PTP_V2_DELAY_REQ] = "ptpv2-delay-req",
458 [HWTSTAMP_FILTER_NTP_ALL] = "ntp-all",
465 [ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE] = "vxlan-gpe",
470 /* return false if legacy contained non-0 deprecated fields
486 if (legacy_settings->maxtxpkt || in convert_legacy_settings_to_link_ksettings()
487 legacy_settings->maxrxpkt) in convert_legacy_settings_to_link_ksettings()
491 link_ksettings->link_modes.supported, in convert_legacy_settings_to_link_ksettings()
492 legacy_settings->supported); in convert_legacy_settings_to_link_ksettings()
494 link_ksettings->link_modes.advertising, in convert_legacy_settings_to_link_ksettings()
495 legacy_settings->advertising); in convert_legacy_settings_to_link_ksettings()
497 link_ksettings->link_modes.lp_advertising, in convert_legacy_settings_to_link_ksettings()
498 legacy_settings->lp_advertising); in convert_legacy_settings_to_link_ksettings()
499 link_ksettings->base.speed in convert_legacy_settings_to_link_ksettings()
501 link_ksettings->base.duplex in convert_legacy_settings_to_link_ksettings()
502 = legacy_settings->duplex; in convert_legacy_settings_to_link_ksettings()
503 link_ksettings->base.port in convert_legacy_settings_to_link_ksettings()
504 = legacy_settings->port; in convert_legacy_settings_to_link_ksettings()
505 link_ksettings->base.phy_address in convert_legacy_settings_to_link_ksettings()
506 = legacy_settings->phy_address; in convert_legacy_settings_to_link_ksettings()
507 link_ksettings->base.autoneg in convert_legacy_settings_to_link_ksettings()
508 = legacy_settings->autoneg; in convert_legacy_settings_to_link_ksettings()
509 link_ksettings->base.mdio_support in convert_legacy_settings_to_link_ksettings()
510 = legacy_settings->mdio_support; in convert_legacy_settings_to_link_ksettings()
511 link_ksettings->base.eth_tp_mdix in convert_legacy_settings_to_link_ksettings()
512 = legacy_settings->eth_tp_mdix; in convert_legacy_settings_to_link_ksettings()
513 link_ksettings->base.eth_tp_mdix_ctrl in convert_legacy_settings_to_link_ksettings()
514 = legacy_settings->eth_tp_mdix_ctrl; in convert_legacy_settings_to_link_ksettings()
520 if (!dev->ethtool_ops->get_link) in __ethtool_get_link()
521 return -EOPNOTSUPP; in __ethtool_get_link()
523 return netif_running(dev) && dev->ethtool_ops->get_link(dev); in __ethtool_get_link()
528 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_rxnfc_rule_count()
534 err = ops->get_rxnfc(dev, &info, NULL); in ethtool_get_rxnfc_rule_count()
550 for (i = 0; i < ctx->indir_size; i++) in ethtool_get_rss_ctx_max_channel()
557 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_max_rxnfc_channel()
562 if (!ops->get_rxnfc) in ethtool_get_max_rxnfc_channel()
563 return -EOPNOTSUPP; in ethtool_get_max_rxnfc_channel()
567 return -EINVAL; in ethtool_get_max_rxnfc_channel()
571 return -ENOMEM; in ethtool_get_max_rxnfc_channel()
573 info->cmd = ETHTOOL_GRXCLSRLALL; in ethtool_get_max_rxnfc_channel()
574 info->rule_cnt = rule_cnt; in ethtool_get_max_rxnfc_channel()
575 err = ops->get_rxnfc(dev, info, info->rule_locs); in ethtool_get_max_rxnfc_channel()
582 .fs.location = info->rule_locs[i], in ethtool_get_max_rxnfc_channel()
585 err = ops->get_rxnfc(dev, &rule_info, NULL); in ethtool_get_max_rxnfc_channel()
597 ctx = xa_load(&dev->ethtool->rss_ctx, in ethtool_get_max_rxnfc_channel()
621 mutex_lock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
622 xa_for_each(&dev->ethtool->rss_ctx, context, ctx) in ethtool_get_max_rss_ctx_channel()
624 mutex_unlock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
637 * Assume drivers won't auto-regenerate the additional tables, in ethtool_get_max_rxfh_channel()
645 if (!dev->ethtool_ops->get_rxfh_indir_size || in ethtool_get_max_rxfh_channel()
646 !dev->ethtool_ops->get_rxfh) in ethtool_get_max_rxfh_channel()
648 dev_size = dev->ethtool_ops->get_rxfh_indir_size(dev); in ethtool_get_max_rxfh_channel()
656 ret = dev->ethtool_ops->get_rxfh(dev, &rxfh); in ethtool_get_max_rxfh_channel()
662 while (dev_size--) in ethtool_get_max_rxfh_channel()
687 return -EINVAL; in ethtool_check_max_channel()
692 return -EINVAL; in ethtool_check_max_channel()
699 return -EINVAL; in ethtool_check_max_channel()
707 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_check_rss_ctx_busy()
711 if (!ops->get_rxnfc) in ethtool_check_rss_ctx_busy()
719 return -EINVAL; in ethtool_check_rss_ctx_busy()
723 return -ENOMEM; in ethtool_check_rss_ctx_busy()
725 info->cmd = ETHTOOL_GRXCLSRLALL; in ethtool_check_rss_ctx_busy()
726 info->rule_cnt = rule_cnt; in ethtool_check_rss_ctx_busy()
727 rc = ops->get_rxnfc(dev, info, info->rule_locs); in ethtool_check_rss_ctx_busy()
734 .fs.location = info->rule_locs[i], in ethtool_check_rss_ctx_busy()
737 rc = ops->get_rxnfc(dev, &rule_info, NULL); in ethtool_check_rss_ctx_busy()
743 rc = -EBUSY; in ethtool_check_rss_ctx_busy()
755 if (WARN_ON(ops->set_coalesce && !ops->supported_coalesce_params)) in ethtool_check_ops()
756 return -EINVAL; in ethtool_check_ops()
757 if (WARN_ON(ops->rxfh_max_num_contexts == 1)) in ethtool_check_ops()
758 return -EINVAL; in ethtool_check_ops()
768 const struct ethtool_ops *ops = dev->ethtool_ops; in __ethtool_get_ts_info()
769 struct phy_device *phydev = dev->phydev; in __ethtool_get_ts_info()
773 info->cmd = ETHTOOL_GET_TS_INFO; in __ethtool_get_ts_info()
774 info->phc_index = -1; in __ethtool_get_ts_info()
778 else if (ops->get_ts_info) in __ethtool_get_ts_info()
779 err = ops->get_ts_info(dev, info); in __ethtool_get_ts_info()
781 info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE | in __ethtool_get_ts_info()
824 link_ksettings->base.speed = link_info->speed; in ethtool_params_from_link_mode()
825 link_ksettings->lanes = link_info->lanes; in ethtool_params_from_link_mode()
826 link_ksettings->base.duplex = link_info->duplex; in ethtool_params_from_link_mode()
833 * @size: Array size
839 ethtool_forced_speed_maps_init(struct ethtool_forced_speed_map *maps, u32 size) in ethtool_forced_speed_maps_init() argument
841 for (u32 i = 0; i < size; i++) { in ethtool_forced_speed_maps_init()
844 linkmode_set_bit_array(map->cap_arr, map->arr_size, map->caps); in ethtool_forced_speed_maps_init()
845 map->cap_arr = NULL; in ethtool_forced_speed_maps_init()
846 map->arr_size = 0; in ethtool_forced_speed_maps_init()
856 !lockdep_is_held_type(&dev->ethtool->rss_lock, -1), in ethtool_rxfh_context_lost()
860 ctx = xa_erase(&dev->ethtool->rss_ctx, context_id); in ethtool_rxfh_context_lost()