Lines Matching +full:full +full:- +full:duplex

1 // SPDX-License-Identifier: GPL-2.0-only
17 [NETIF_F_SG_BIT] = "tx-scatter-gather",
18 [NETIF_F_IP_CSUM_BIT] = "tx-checksum-ipv4",
19 [NETIF_F_HW_CSUM_BIT] = "tx-checksum-ip-generic",
20 [NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6",
22 [NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist",
23 [NETIF_F_HW_VLAN_CTAG_TX_BIT] = "tx-vlan-hw-insert",
25 [NETIF_F_HW_VLAN_CTAG_RX_BIT] = "rx-vlan-hw-parse",
26 [NETIF_F_HW_VLAN_CTAG_FILTER_BIT] = "rx-vlan-filter",
27 [NETIF_F_HW_VLAN_STAG_TX_BIT] = "tx-vlan-stag-hw-insert",
28 [NETIF_F_HW_VLAN_STAG_RX_BIT] = "rx-vlan-stag-hw-parse",
29 [NETIF_F_HW_VLAN_STAG_FILTER_BIT] = "rx-vlan-stag-filter",
30 [NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged",
31 [NETIF_F_GSO_BIT] = "tx-generic-segmentation",
32 [NETIF_F_GRO_BIT] = "rx-gro",
33 [NETIF_F_GRO_HW_BIT] = "rx-gro-hw",
34 [NETIF_F_LRO_BIT] = "rx-lro",
36 [NETIF_F_TSO_BIT] = "tx-tcp-segmentation",
37 [NETIF_F_GSO_ROBUST_BIT] = "tx-gso-robust",
38 [NETIF_F_TSO_ECN_BIT] = "tx-tcp-ecn-segmentation",
39 [NETIF_F_GSO_ACCECN_BIT] = "tx-tcp-accecn-segmentation",
40 [NETIF_F_TSO_MANGLEID_BIT] = "tx-tcp-mangleid-segmentation",
41 [NETIF_F_TSO6_BIT] = "tx-tcp6-segmentation",
42 [NETIF_F_FSO_BIT] = "tx-fcoe-segmentation",
43 [NETIF_F_GSO_GRE_BIT] = "tx-gre-segmentation",
44 [NETIF_F_GSO_GRE_CSUM_BIT] = "tx-gre-csum-segmentation",
45 [NETIF_F_GSO_IPXIP4_BIT] = "tx-ipxip4-segmentation",
46 [NETIF_F_GSO_IPXIP6_BIT] = "tx-ipxip6-segmentation",
47 [NETIF_F_GSO_UDP_TUNNEL_BIT] = "tx-udp_tnl-segmentation",
48 [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
49 [NETIF_F_GSO_PARTIAL_BIT] = "tx-gso-partial",
50 [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-tunnel-remcsum-segmentation",
51 [NETIF_F_GSO_SCTP_BIT] = "tx-sctp-segmentation",
52 [NETIF_F_GSO_ESP_BIT] = "tx-esp-segmentation",
53 [NETIF_F_GSO_UDP_L4_BIT] = "tx-udp-segmentation",
54 [NETIF_F_GSO_FRAGLIST_BIT] = "tx-gso-list",
56 [NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc",
57 [NETIF_F_SCTP_CRC_BIT] = "tx-checksum-sctp",
58 [NETIF_F_NTUPLE_BIT] = "rx-ntuple-filter",
59 [NETIF_F_RXHASH_BIT] = "rx-hashing",
60 [NETIF_F_RXCSUM_BIT] = "rx-checksum",
61 [NETIF_F_NOCACHE_COPY_BIT] = "tx-nocache-copy",
63 [NETIF_F_RXFCS_BIT] = "rx-fcs",
64 [NETIF_F_RXALL_BIT] = "rx-all",
65 [NETIF_F_HW_L2FW_DOFFLOAD_BIT] = "l2-fwd-offload",
66 [NETIF_F_HW_TC_BIT] = "hw-tc-offload",
67 [NETIF_F_HW_ESP_BIT] = "esp-hw-offload",
68 [NETIF_F_HW_ESP_TX_CSUM_BIT] = "esp-tx-csum-hw-offload",
69 [NETIF_F_RX_UDP_TUNNEL_PORT_BIT] = "rx-udp_tunnel-port-offload",
70 [NETIF_F_HW_TLS_RECORD_BIT] = "tls-hw-record",
71 [NETIF_F_HW_TLS_TX_BIT] = "tls-hw-tx-offload",
72 [NETIF_F_HW_TLS_RX_BIT] = "tls-hw-rx-offload",
73 [NETIF_F_GRO_FRAGLIST_BIT] = "rx-gro-list",
74 [NETIF_F_HW_MACSEC_BIT] = "macsec-hw-offload",
75 [NETIF_F_GRO_UDP_FWD_BIT] = "rx-udp-gro-forwarding",
76 [NETIF_F_HW_HSR_TAG_INS_BIT] = "hsr-tag-ins-offload",
77 [NETIF_F_HW_HSR_TAG_RM_BIT] = "hsr-tag-rm-offload",
78 [NETIF_F_HW_HSR_FWD_BIT] = "hsr-fwd-offload",
79 [NETIF_F_HW_HSR_DUP_BIT] = "hsr-dup-offload",
92 [ETHTOOL_RX_COPYBREAK] = "rx-copybreak",
93 [ETHTOOL_TX_COPYBREAK] = "tx-copybreak",
94 [ETHTOOL_PFC_PREVENTION_TOUT] = "pfc-prevention-tout",
95 [ETHTOOL_TX_COPYBREAK_BUF_SIZE] = "tx-copybreak-buf-size",
101 [ETHTOOL_PHY_DOWNSHIFT] = "phy-downshift",
102 [ETHTOOL_PHY_FAST_LINK_DOWN] = "phy-fast-link-down",
103 [ETHTOOL_PHY_EDPD] = "phy-energy-detect-power-down",
106 #define __LINK_MODE_NAME(speed, type, duplex) \ argument
107 #speed "base" #type "/" #duplex
108 #define __DEFINE_LINK_MODE_NAME(speed, type, duplex) \ argument
109 [ETHTOOL_LINK_MODE(speed, type, duplex)] = \
110 __LINK_MODE_NAME(speed, type, duplex)
116 __DEFINE_LINK_MODE_NAME(10, T, Full),
118 __DEFINE_LINK_MODE_NAME(100, T, Full),
120 __DEFINE_LINK_MODE_NAME(1000, T, Full),
127 __DEFINE_LINK_MODE_NAME(10000, T, Full),
130 __DEFINE_LINK_MODE_NAME(2500, X, Full),
132 __DEFINE_LINK_MODE_NAME(1000, KX, Full),
133 __DEFINE_LINK_MODE_NAME(10000, KX4, Full),
134 __DEFINE_LINK_MODE_NAME(10000, KR, Full),
136 __DEFINE_LINK_MODE_NAME(20000, MLD2, Full),
137 __DEFINE_LINK_MODE_NAME(20000, KR2, Full),
138 __DEFINE_LINK_MODE_NAME(40000, KR4, Full),
139 __DEFINE_LINK_MODE_NAME(40000, CR4, Full),
140 __DEFINE_LINK_MODE_NAME(40000, SR4, Full),
141 __DEFINE_LINK_MODE_NAME(40000, LR4, Full),
142 __DEFINE_LINK_MODE_NAME(56000, KR4, Full),
143 __DEFINE_LINK_MODE_NAME(56000, CR4, Full),
144 __DEFINE_LINK_MODE_NAME(56000, SR4, Full),
145 __DEFINE_LINK_MODE_NAME(56000, LR4, Full),
146 __DEFINE_LINK_MODE_NAME(25000, CR, Full),
147 __DEFINE_LINK_MODE_NAME(25000, KR, Full),
148 __DEFINE_LINK_MODE_NAME(25000, SR, Full),
149 __DEFINE_LINK_MODE_NAME(50000, CR2, Full),
150 __DEFINE_LINK_MODE_NAME(50000, KR2, Full),
151 __DEFINE_LINK_MODE_NAME(100000, KR4, Full),
152 __DEFINE_LINK_MODE_NAME(100000, SR4, Full),
153 __DEFINE_LINK_MODE_NAME(100000, CR4, Full),
154 __DEFINE_LINK_MODE_NAME(100000, LR4_ER4, Full),
155 __DEFINE_LINK_MODE_NAME(50000, SR2, Full),
156 __DEFINE_LINK_MODE_NAME(1000, X, Full),
157 __DEFINE_LINK_MODE_NAME(10000, CR, Full),
158 __DEFINE_LINK_MODE_NAME(10000, SR, Full),
159 __DEFINE_LINK_MODE_NAME(10000, LR, Full),
160 __DEFINE_LINK_MODE_NAME(10000, LRM, Full),
161 __DEFINE_LINK_MODE_NAME(10000, ER, Full),
162 __DEFINE_LINK_MODE_NAME(2500, T, Full),
163 __DEFINE_LINK_MODE_NAME(5000, T, Full),
167 __DEFINE_LINK_MODE_NAME(50000, KR, Full),
168 __DEFINE_LINK_MODE_NAME(50000, SR, Full),
169 __DEFINE_LINK_MODE_NAME(50000, CR, Full),
170 __DEFINE_LINK_MODE_NAME(50000, LR_ER_FR, Full),
171 __DEFINE_LINK_MODE_NAME(50000, DR, Full),
172 __DEFINE_LINK_MODE_NAME(100000, KR2, Full),
173 __DEFINE_LINK_MODE_NAME(100000, SR2, Full),
174 __DEFINE_LINK_MODE_NAME(100000, CR2, Full),
175 __DEFINE_LINK_MODE_NAME(100000, LR2_ER2_FR2, Full),
176 __DEFINE_LINK_MODE_NAME(100000, DR2, Full),
177 __DEFINE_LINK_MODE_NAME(200000, KR4, Full),
178 __DEFINE_LINK_MODE_NAME(200000, SR4, Full),
179 __DEFINE_LINK_MODE_NAME(200000, LR4_ER4_FR4, Full),
180 __DEFINE_LINK_MODE_NAME(200000, DR4, Full),
181 __DEFINE_LINK_MODE_NAME(200000, CR4, Full),
182 __DEFINE_LINK_MODE_NAME(100, T1, Full),
183 __DEFINE_LINK_MODE_NAME(1000, T1, Full),
184 __DEFINE_LINK_MODE_NAME(400000, KR8, Full),
185 __DEFINE_LINK_MODE_NAME(400000, SR8, Full),
186 __DEFINE_LINK_MODE_NAME(400000, LR8_ER8_FR8, Full),
187 __DEFINE_LINK_MODE_NAME(400000, DR8, Full),
188 __DEFINE_LINK_MODE_NAME(400000, CR8, Full),
190 __DEFINE_LINK_MODE_NAME(100000, KR, Full),
191 __DEFINE_LINK_MODE_NAME(100000, SR, Full),
192 __DEFINE_LINK_MODE_NAME(100000, LR_ER_FR, Full),
193 __DEFINE_LINK_MODE_NAME(100000, DR, Full),
194 __DEFINE_LINK_MODE_NAME(100000, CR, Full),
195 __DEFINE_LINK_MODE_NAME(200000, KR2, Full),
196 __DEFINE_LINK_MODE_NAME(200000, SR2, Full),
197 __DEFINE_LINK_MODE_NAME(200000, LR2_ER2_FR2, Full),
198 __DEFINE_LINK_MODE_NAME(200000, DR2, Full),
199 __DEFINE_LINK_MODE_NAME(200000, CR2, Full),
200 __DEFINE_LINK_MODE_NAME(400000, KR4, Full),
201 __DEFINE_LINK_MODE_NAME(400000, SR4, Full),
202 __DEFINE_LINK_MODE_NAME(400000, LR4_ER4_FR4, Full),
203 __DEFINE_LINK_MODE_NAME(400000, DR4, Full),
204 __DEFINE_LINK_MODE_NAME(400000, CR4, Full),
206 __DEFINE_LINK_MODE_NAME(100, FX, Full),
207 __DEFINE_LINK_MODE_NAME(10, T1L, Full),
208 __DEFINE_LINK_MODE_NAME(800000, CR8, Full),
209 __DEFINE_LINK_MODE_NAME(800000, KR8, Full),
210 __DEFINE_LINK_MODE_NAME(800000, DR8, Full),
211 __DEFINE_LINK_MODE_NAME(800000, DR8_2, Full),
212 __DEFINE_LINK_MODE_NAME(800000, SR8, Full),
213 __DEFINE_LINK_MODE_NAME(800000, VR8, Full),
214 __DEFINE_LINK_MODE_NAME(10, T1S, Full),
217 __DEFINE_LINK_MODE_NAME(10, T1BRR, Full),
218 __DEFINE_LINK_MODE_NAME(200000, CR, Full),
219 __DEFINE_LINK_MODE_NAME(200000, KR, Full),
220 __DEFINE_LINK_MODE_NAME(200000, DR, Full),
221 __DEFINE_LINK_MODE_NAME(200000, DR_2, Full),
222 __DEFINE_LINK_MODE_NAME(200000, SR, Full),
223 __DEFINE_LINK_MODE_NAME(200000, VR, Full),
224 __DEFINE_LINK_MODE_NAME(400000, CR2, Full),
225 __DEFINE_LINK_MODE_NAME(400000, KR2, Full),
226 __DEFINE_LINK_MODE_NAME(400000, DR2, Full),
227 __DEFINE_LINK_MODE_NAME(400000, DR2_2, Full),
228 __DEFINE_LINK_MODE_NAME(400000, SR2, Full),
229 __DEFINE_LINK_MODE_NAME(400000, VR2, Full),
230 __DEFINE_LINK_MODE_NAME(800000, CR4, Full),
231 __DEFINE_LINK_MODE_NAME(800000, KR4, Full),
232 __DEFINE_LINK_MODE_NAME(800000, DR4, Full),
233 __DEFINE_LINK_MODE_NAME(800000, DR4_2, Full),
234 __DEFINE_LINK_MODE_NAME(800000, SR4, Full),
235 __DEFINE_LINK_MODE_NAME(800000, VR4, Full),
288 .duplex = __DUPLEX_ ## _duplex \
296 .duplex = DUPLEX_UNKNOWN, \
301 __DEFINE_LINK_MODE_PARAMS(10, T, Full),
303 __DEFINE_LINK_MODE_PARAMS(100, T, Full),
305 __DEFINE_LINK_MODE_PARAMS(1000, T, Full),
312 __DEFINE_LINK_MODE_PARAMS(10000, T, Full),
315 __DEFINE_LINK_MODE_PARAMS(2500, X, Full),
317 __DEFINE_LINK_MODE_PARAMS(1000, KX, Full),
318 __DEFINE_LINK_MODE_PARAMS(10000, KX4, Full),
319 __DEFINE_LINK_MODE_PARAMS(10000, KR, Full),
323 .duplex = DUPLEX_FULL,
325 __DEFINE_LINK_MODE_PARAMS(20000, MLD2, Full),
326 __DEFINE_LINK_MODE_PARAMS(20000, KR2, Full),
327 __DEFINE_LINK_MODE_PARAMS(40000, KR4, Full),
328 __DEFINE_LINK_MODE_PARAMS(40000, CR4, Full),
329 __DEFINE_LINK_MODE_PARAMS(40000, SR4, Full),
330 __DEFINE_LINK_MODE_PARAMS(40000, LR4, Full),
331 __DEFINE_LINK_MODE_PARAMS(56000, KR4, Full),
332 __DEFINE_LINK_MODE_PARAMS(56000, CR4, Full),
333 __DEFINE_LINK_MODE_PARAMS(56000, SR4, Full),
334 __DEFINE_LINK_MODE_PARAMS(56000, LR4, Full),
335 __DEFINE_LINK_MODE_PARAMS(25000, CR, Full),
336 __DEFINE_LINK_MODE_PARAMS(25000, KR, Full),
337 __DEFINE_LINK_MODE_PARAMS(25000, SR, Full),
338 __DEFINE_LINK_MODE_PARAMS(50000, CR2, Full),
339 __DEFINE_LINK_MODE_PARAMS(50000, KR2, Full),
340 __DEFINE_LINK_MODE_PARAMS(100000, KR4, Full),
341 __DEFINE_LINK_MODE_PARAMS(100000, SR4, Full),
342 __DEFINE_LINK_MODE_PARAMS(100000, CR4, Full),
343 __DEFINE_LINK_MODE_PARAMS(100000, LR4_ER4, Full),
344 __DEFINE_LINK_MODE_PARAMS(50000, SR2, Full),
345 __DEFINE_LINK_MODE_PARAMS(1000, X, Full),
346 __DEFINE_LINK_MODE_PARAMS(10000, CR, Full),
347 __DEFINE_LINK_MODE_PARAMS(10000, SR, Full),
348 __DEFINE_LINK_MODE_PARAMS(10000, LR, Full),
349 __DEFINE_LINK_MODE_PARAMS(10000, LRM, Full),
350 __DEFINE_LINK_MODE_PARAMS(10000, ER, Full),
351 __DEFINE_LINK_MODE_PARAMS(2500, T, Full),
352 __DEFINE_LINK_MODE_PARAMS(5000, T, Full),
356 __DEFINE_LINK_MODE_PARAMS(50000, KR, Full),
357 __DEFINE_LINK_MODE_PARAMS(50000, SR, Full),
358 __DEFINE_LINK_MODE_PARAMS(50000, CR, Full),
359 __DEFINE_LINK_MODE_PARAMS(50000, LR_ER_FR, Full),
360 __DEFINE_LINK_MODE_PARAMS(50000, DR, Full),
361 __DEFINE_LINK_MODE_PARAMS(100000, KR2, Full),
362 __DEFINE_LINK_MODE_PARAMS(100000, SR2, Full),
363 __DEFINE_LINK_MODE_PARAMS(100000, CR2, Full),
364 __DEFINE_LINK_MODE_PARAMS(100000, LR2_ER2_FR2, Full),
365 __DEFINE_LINK_MODE_PARAMS(100000, DR2, Full),
366 __DEFINE_LINK_MODE_PARAMS(200000, KR4, Full),
367 __DEFINE_LINK_MODE_PARAMS(200000, SR4, Full),
368 __DEFINE_LINK_MODE_PARAMS(200000, LR4_ER4_FR4, Full),
369 __DEFINE_LINK_MODE_PARAMS(200000, DR4, Full),
370 __DEFINE_LINK_MODE_PARAMS(200000, CR4, Full),
371 __DEFINE_LINK_MODE_PARAMS(100, T1, Full),
372 __DEFINE_LINK_MODE_PARAMS(1000, T1, Full),
373 __DEFINE_LINK_MODE_PARAMS(400000, KR8, Full),
374 __DEFINE_LINK_MODE_PARAMS(400000, SR8, Full),
375 __DEFINE_LINK_MODE_PARAMS(400000, LR8_ER8_FR8, Full),
376 __DEFINE_LINK_MODE_PARAMS(400000, DR8, Full),
377 __DEFINE_LINK_MODE_PARAMS(400000, CR8, Full),
379 __DEFINE_LINK_MODE_PARAMS(100000, KR, Full),
380 __DEFINE_LINK_MODE_PARAMS(100000, SR, Full),
381 __DEFINE_LINK_MODE_PARAMS(100000, LR_ER_FR, Full),
382 __DEFINE_LINK_MODE_PARAMS(100000, DR, Full),
383 __DEFINE_LINK_MODE_PARAMS(100000, CR, Full),
384 __DEFINE_LINK_MODE_PARAMS(200000, KR2, Full),
385 __DEFINE_LINK_MODE_PARAMS(200000, SR2, Full),
386 __DEFINE_LINK_MODE_PARAMS(200000, LR2_ER2_FR2, Full),
387 __DEFINE_LINK_MODE_PARAMS(200000, DR2, Full),
388 __DEFINE_LINK_MODE_PARAMS(200000, CR2, Full),
389 __DEFINE_LINK_MODE_PARAMS(400000, KR4, Full),
390 __DEFINE_LINK_MODE_PARAMS(400000, SR4, Full),
391 __DEFINE_LINK_MODE_PARAMS(400000, LR4_ER4_FR4, Full),
392 __DEFINE_LINK_MODE_PARAMS(400000, DR4, Full),
393 __DEFINE_LINK_MODE_PARAMS(400000, CR4, Full),
395 __DEFINE_LINK_MODE_PARAMS(100, FX, Full),
396 __DEFINE_LINK_MODE_PARAMS(10, T1L, Full),
397 __DEFINE_LINK_MODE_PARAMS(800000, CR8, Full),
398 __DEFINE_LINK_MODE_PARAMS(800000, KR8, Full),
399 __DEFINE_LINK_MODE_PARAMS(800000, DR8, Full),
400 __DEFINE_LINK_MODE_PARAMS(800000, DR8_2, Full),
401 __DEFINE_LINK_MODE_PARAMS(800000, SR8, Full),
402 __DEFINE_LINK_MODE_PARAMS(800000, VR8, Full),
403 __DEFINE_LINK_MODE_PARAMS(10, T1S, Full),
406 __DEFINE_LINK_MODE_PARAMS(10, T1BRR, Full),
407 __DEFINE_LINK_MODE_PARAMS(200000, CR, Full),
408 __DEFINE_LINK_MODE_PARAMS(200000, KR, Full),
409 __DEFINE_LINK_MODE_PARAMS(200000, DR, Full),
410 __DEFINE_LINK_MODE_PARAMS(200000, DR_2, Full),
411 __DEFINE_LINK_MODE_PARAMS(200000, SR, Full),
412 __DEFINE_LINK_MODE_PARAMS(200000, VR, Full),
413 __DEFINE_LINK_MODE_PARAMS(400000, CR2, Full),
414 __DEFINE_LINK_MODE_PARAMS(400000, KR2, Full),
415 __DEFINE_LINK_MODE_PARAMS(400000, DR2, Full),
416 __DEFINE_LINK_MODE_PARAMS(400000, DR2_2, Full),
417 __DEFINE_LINK_MODE_PARAMS(400000, SR2, Full),
418 __DEFINE_LINK_MODE_PARAMS(400000, VR2, Full),
419 __DEFINE_LINK_MODE_PARAMS(800000, CR4, Full),
420 __DEFINE_LINK_MODE_PARAMS(800000, KR4, Full),
421 __DEFINE_LINK_MODE_PARAMS(800000, DR4, Full),
422 __DEFINE_LINK_MODE_PARAMS(800000, DR4_2, Full),
423 __DEFINE_LINK_MODE_PARAMS(800000, SR4, Full),
424 __DEFINE_LINK_MODE_PARAMS(800000, VR4, Full),
461 [const_ilog2(SOF_TIMESTAMPING_TX_HARDWARE)] = "hardware-transmit",
462 [const_ilog2(SOF_TIMESTAMPING_TX_SOFTWARE)] = "software-transmit",
463 [const_ilog2(SOF_TIMESTAMPING_RX_HARDWARE)] = "hardware-receive",
464 [const_ilog2(SOF_TIMESTAMPING_RX_SOFTWARE)] = "software-receive",
465 [const_ilog2(SOF_TIMESTAMPING_SOFTWARE)] = "software-system-clock",
466 [const_ilog2(SOF_TIMESTAMPING_SYS_HARDWARE)] = "hardware-legacy-clock",
467 [const_ilog2(SOF_TIMESTAMPING_RAW_HARDWARE)] = "hardware-raw-clock",
468 [const_ilog2(SOF_TIMESTAMPING_OPT_ID)] = "option-id",
469 [const_ilog2(SOF_TIMESTAMPING_TX_SCHED)] = "sched-transmit",
470 [const_ilog2(SOF_TIMESTAMPING_TX_ACK)] = "ack-transmit",
471 [const_ilog2(SOF_TIMESTAMPING_OPT_CMSG)] = "option-cmsg",
472 [const_ilog2(SOF_TIMESTAMPING_OPT_TSONLY)] = "option-tsonly",
473 [const_ilog2(SOF_TIMESTAMPING_OPT_STATS)] = "option-stats",
474 [const_ilog2(SOF_TIMESTAMPING_OPT_PKTINFO)] = "option-pktinfo",
475 [const_ilog2(SOF_TIMESTAMPING_OPT_TX_SWHW)] = "option-tx-swhw",
476 [const_ilog2(SOF_TIMESTAMPING_BIND_PHC)] = "bind-phc",
477 [const_ilog2(SOF_TIMESTAMPING_OPT_ID_TCP)] = "option-id-tcp",
478 [const_ilog2(SOF_TIMESTAMPING_OPT_RX_FILTER)] = "option-rx-filter",
479 [const_ilog2(SOF_TIMESTAMPING_TX_COMPLETION)] = "tx-completion",
486 [HWTSTAMP_TX_ONESTEP_SYNC] = "onestep-sync",
487 [HWTSTAMP_TX_ONESTEP_P2P] = "onestep-p2p",
495 [HWTSTAMP_FILTER_PTP_V1_L4_EVENT] = "ptpv1-l4-event",
496 [HWTSTAMP_FILTER_PTP_V1_L4_SYNC] = "ptpv1-l4-sync",
497 [HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ] = "ptpv1-l4-delay-req",
498 [HWTSTAMP_FILTER_PTP_V2_L4_EVENT] = "ptpv2-l4-event",
499 [HWTSTAMP_FILTER_PTP_V2_L4_SYNC] = "ptpv2-l4-sync",
500 [HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ] = "ptpv2-l4-delay-req",
501 [HWTSTAMP_FILTER_PTP_V2_L2_EVENT] = "ptpv2-l2-event",
502 [HWTSTAMP_FILTER_PTP_V2_L2_SYNC] = "ptpv2-l2-sync",
503 [HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ] = "ptpv2-l2-delay-req",
504 [HWTSTAMP_FILTER_PTP_V2_EVENT] = "ptpv2-event",
505 [HWTSTAMP_FILTER_PTP_V2_SYNC] = "ptpv2-sync",
506 [HWTSTAMP_FILTER_PTP_V2_DELAY_REQ] = "ptpv2-delay-req",
507 [HWTSTAMP_FILTER_NTP_ALL] = "ntp-all",
512 [const_ilog2(HWTSTAMP_FLAG_BONDED_PHC_INDEX)] = "bonded-phc-index",
519 [ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE] = "vxlan-gpe",
524 /* return false if legacy contained non-0 deprecated fields
540 if (legacy_settings->maxtxpkt || in convert_legacy_settings_to_link_ksettings()
541 legacy_settings->maxrxpkt) in convert_legacy_settings_to_link_ksettings()
545 link_ksettings->link_modes.supported, in convert_legacy_settings_to_link_ksettings()
546 legacy_settings->supported); in convert_legacy_settings_to_link_ksettings()
548 link_ksettings->link_modes.advertising, in convert_legacy_settings_to_link_ksettings()
549 legacy_settings->advertising); in convert_legacy_settings_to_link_ksettings()
551 link_ksettings->link_modes.lp_advertising, in convert_legacy_settings_to_link_ksettings()
552 legacy_settings->lp_advertising); in convert_legacy_settings_to_link_ksettings()
553 link_ksettings->base.speed in convert_legacy_settings_to_link_ksettings()
555 link_ksettings->base.duplex in convert_legacy_settings_to_link_ksettings()
556 = legacy_settings->duplex; in convert_legacy_settings_to_link_ksettings()
557 link_ksettings->base.port in convert_legacy_settings_to_link_ksettings()
558 = legacy_settings->port; in convert_legacy_settings_to_link_ksettings()
559 link_ksettings->base.phy_address in convert_legacy_settings_to_link_ksettings()
560 = legacy_settings->phy_address; in convert_legacy_settings_to_link_ksettings()
561 link_ksettings->base.autoneg in convert_legacy_settings_to_link_ksettings()
562 = legacy_settings->autoneg; in convert_legacy_settings_to_link_ksettings()
563 link_ksettings->base.mdio_support in convert_legacy_settings_to_link_ksettings()
564 = legacy_settings->mdio_support; in convert_legacy_settings_to_link_ksettings()
565 link_ksettings->base.eth_tp_mdix in convert_legacy_settings_to_link_ksettings()
566 = legacy_settings->eth_tp_mdix; in convert_legacy_settings_to_link_ksettings()
567 link_ksettings->base.eth_tp_mdix_ctrl in convert_legacy_settings_to_link_ksettings()
568 = legacy_settings->eth_tp_mdix_ctrl; in convert_legacy_settings_to_link_ksettings()
574 if (!dev->ethtool_ops->get_link) in __ethtool_get_link()
575 return -EOPNOTSUPP; in __ethtool_get_link()
577 return netif_running(dev) && dev->ethtool_ops->get_link(dev); in __ethtool_get_link()
582 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_rx_ring_count()
586 if (ops->get_rx_ring_count) in ethtool_get_rx_ring_count()
587 return ops->get_rx_ring_count(dev); in ethtool_get_rx_ring_count()
589 if (!ops->get_rxnfc) in ethtool_get_rx_ring_count()
590 return -EOPNOTSUPP; in ethtool_get_rx_ring_count()
593 ret = ops->get_rxnfc(dev, &rx_rings, NULL); in ethtool_get_rx_ring_count()
602 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_rxnfc_rule_count()
608 err = ops->get_rxnfc(dev, &info, NULL); in ethtool_get_rxnfc_rule_count()
624 for (i = 0; i < ctx->indir_size; i++) in ethtool_get_rss_ctx_max_channel()
631 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_max_rxnfc_channel()
636 if (!ops->get_rxnfc) in ethtool_get_max_rxnfc_channel()
637 return -EOPNOTSUPP; in ethtool_get_max_rxnfc_channel()
641 return -EINVAL; in ethtool_get_max_rxnfc_channel()
645 return -ENOMEM; in ethtool_get_max_rxnfc_channel()
647 info->cmd = ETHTOOL_GRXCLSRLALL; in ethtool_get_max_rxnfc_channel()
648 info->rule_cnt = rule_cnt; in ethtool_get_max_rxnfc_channel()
649 err = ops->get_rxnfc(dev, info, info->rule_locs); in ethtool_get_max_rxnfc_channel()
656 .fs.location = info->rule_locs[i], in ethtool_get_max_rxnfc_channel()
659 err = ops->get_rxnfc(dev, &rule_info, NULL); in ethtool_get_max_rxnfc_channel()
671 ctx = xa_load(&dev->ethtool->rss_ctx, in ethtool_get_max_rxnfc_channel()
695 mutex_lock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
696 xa_for_each(&dev->ethtool->rss_ctx, context, ctx) in ethtool_get_max_rss_ctx_channel()
698 mutex_unlock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
711 * Assume drivers won't auto-regenerate the additional tables, in ethtool_get_max_rxfh_channel()
719 if (!dev->ethtool_ops->get_rxfh_indir_size || in ethtool_get_max_rxfh_channel()
720 !dev->ethtool_ops->get_rxfh) in ethtool_get_max_rxfh_channel()
722 dev_size = dev->ethtool_ops->get_rxfh_indir_size(dev); in ethtool_get_max_rxfh_channel()
730 mutex_lock(&dev->ethtool->rss_lock); in ethtool_get_max_rxfh_channel()
731 ret = dev->ethtool_ops->get_rxfh(dev, &rxfh); in ethtool_get_max_rxfh_channel()
732 mutex_unlock(&dev->ethtool->rss_lock); in ethtool_get_max_rxfh_channel()
738 while (dev_size--) in ethtool_get_max_rxfh_channel()
763 return -EINVAL; in ethtool_check_max_channel()
768 return -EINVAL; in ethtool_check_max_channel()
775 return -EINVAL; in ethtool_check_max_channel()
783 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_check_rss_ctx_busy()
787 if (!ops->get_rxnfc) in ethtool_check_rss_ctx_busy()
795 return -EINVAL; in ethtool_check_rss_ctx_busy()
799 return -ENOMEM; in ethtool_check_rss_ctx_busy()
801 info->cmd = ETHTOOL_GRXCLSRLALL; in ethtool_check_rss_ctx_busy()
802 info->rule_cnt = rule_cnt; in ethtool_check_rss_ctx_busy()
803 rc = ops->get_rxnfc(dev, info, info->rule_locs); in ethtool_check_rss_ctx_busy()
810 .fs.location = info->rule_locs[i], in ethtool_check_rss_ctx_busy()
813 rc = ops->get_rxnfc(dev, &rule_info, NULL); in ethtool_check_rss_ctx_busy()
819 rc = -EBUSY; in ethtool_check_rss_ctx_busy()
838 key_max = max(key_size, ops->rxfh_key_space); in ethtool_rxfh_ctx_alloc()
839 indir_max = max(indir_size, ops->rxfh_indir_space); in ethtool_rxfh_ctx_alloc()
841 priv_bytes = ALIGN(ops->rxfh_priv_size, sizeof(u32)); in ethtool_rxfh_ctx_alloc()
852 ctx->indir_size = indir_size; in ethtool_rxfh_ctx_alloc()
853 ctx->key_size = key_size; in ethtool_rxfh_ctx_alloc()
854 ctx->key_off = key_off; in ethtool_rxfh_ctx_alloc()
855 ctx->priv_size = ops->rxfh_priv_size; in ethtool_rxfh_ctx_alloc()
857 ctx->hfunc = ETH_RSS_HASH_NO_CHANGE; in ethtool_rxfh_ctx_alloc()
858 ctx->input_xfrm = RXH_XFRM_NO_CHANGE; in ethtool_rxfh_ctx_alloc()
863 /* Check if fields configured for flow hash are symmetric - if src is included
880 if (WARN_ON(ops->set_coalesce && !ops->supported_coalesce_params)) in ethtool_check_ops()
881 return -EINVAL; in ethtool_check_ops()
882 if (WARN_ON(ops->rxfh_max_num_contexts == 1)) in ethtool_check_ops()
883 return -EINVAL; in ethtool_check_ops()
884 if (WARN_ON(ops->supported_input_xfrm && !ops->get_rxfh_fields)) in ethtool_check_ops()
885 return -EINVAL; in ethtool_check_ops()
886 if (WARN_ON(ops->supported_input_xfrm && in ethtool_check_ops()
887 ops->rxfh_per_ctx_fields != ops->rxfh_per_ctx_key)) in ethtool_check_ops()
888 return -EINVAL; in ethtool_check_ops()
905 param->cmd = ETHTOOL_GRINGPARAM; in ethtool_ringparam_get_cfg()
906 dev->ethtool_ops->get_ringparam(dev, param, kparam, extack); in ethtool_ringparam_get_cfg()
909 kparam->tcp_data_split = dev->cfg->hds_config; in ethtool_ringparam_get_cfg()
910 kparam->hds_thresh = dev->cfg->hds_thresh; in ethtool_ringparam_get_cfg()
916 info->cmd = ETHTOOL_GET_TS_INFO; in ethtool_init_tsinfo()
917 info->phc_index = -1; in ethtool_init_tsinfo()
924 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_net_get_ts_info_by_phc()
927 if (!ops->get_ts_info) in ethtool_net_get_ts_info_by_phc()
928 return -EOPNOTSUPP; in ethtool_net_get_ts_info_by_phc()
932 info->phc_qualifier = hwprov_desc->qualifier; in ethtool_net_get_ts_info_by_phc()
933 err = ops->get_ts_info(dev, info); in ethtool_net_get_ts_info_by_phc()
937 if (info->phc_index == hwprov_desc->index && in ethtool_net_get_ts_info_by_phc()
938 net_support_hwtstamp_qualifier(dev, hwprov_desc->qualifier)) in ethtool_net_get_ts_info_by_phc()
941 return -ENODEV; in ethtool_net_get_ts_info_by_phc()
952 if (hwprov_desc->qualifier != HWTSTAMP_PROVIDER_QUALIFIER_PRECISE) in ethtool_phy_get_ts_info_by_phc()
953 return ERR_PTR(-ENODEV); in ethtool_phy_get_ts_info_by_phc()
956 if (dev->link_topo) { in ethtool_phy_get_ts_info_by_phc()
960 xa_for_each(&dev->link_topo->phys, phy_index, pdn) { in ethtool_phy_get_ts_info_by_phc()
961 if (!phy_has_tsinfo(pdn->phy)) in ethtool_phy_get_ts_info_by_phc()
965 err = phy_ts_info(pdn->phy, info); in ethtool_phy_get_ts_info_by_phc()
969 if (info->phc_index == hwprov_desc->index) in ethtool_phy_get_ts_info_by_phc()
970 return pdn->phy; in ethtool_phy_get_ts_info_by_phc()
972 return ERR_PTR(-ENODEV); in ethtool_phy_get_ts_info_by_phc()
975 /* Look on the dev->phydev */ in ethtool_phy_get_ts_info_by_phc()
976 if (phy_has_tsinfo(dev->phydev)) { in ethtool_phy_get_ts_info_by_phc()
978 err = phy_ts_info(dev->phydev, info); in ethtool_phy_get_ts_info_by_phc()
982 if (info->phc_index == hwprov_desc->index) in ethtool_phy_get_ts_info_by_phc()
983 return dev->phydev; in ethtool_phy_get_ts_info_by_phc()
986 return ERR_PTR(-ENODEV); in ethtool_phy_get_ts_info_by_phc()
996 if (err == -ENODEV || err == -EOPNOTSUPP) { in ethtool_get_ts_info_by_phc()
1006 if (info->phc_index >= 0) { in ethtool_get_ts_info_by_phc()
1007 info->phc_source = HWTSTAMP_SOURCE_PHYLIB; in ethtool_get_ts_info_by_phc()
1008 info->phc_phyindex = phy->phyindex; in ethtool_get_ts_info_by_phc()
1011 } else if (!err && info->phc_index >= 0) { in ethtool_get_ts_info_by_phc()
1012 info->phc_source = HWTSTAMP_SOURCE_NETDEV; in ethtool_get_ts_info_by_phc()
1015 info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE | in ethtool_get_ts_info_by_phc()
1028 hwprov = rcu_dereference(dev->hwprov); in __ethtool_get_ts_info()
1031 const struct ethtool_ops *ops = dev->ethtool_ops; in __ethtool_get_ts_info()
1032 struct phy_device *phydev = dev->phydev; in __ethtool_get_ts_info()
1041 if (!err && info->phc_index >= 0) { in __ethtool_get_ts_info()
1042 info->phc_source = HWTSTAMP_SOURCE_PHYLIB; in __ethtool_get_ts_info()
1043 info->phc_phyindex = phydev->phyindex; in __ethtool_get_ts_info()
1045 } else if (ops->get_ts_info) { in __ethtool_get_ts_info()
1046 err = ops->get_ts_info(dev, info); in __ethtool_get_ts_info()
1047 if (!err && info->phc_index >= 0) in __ethtool_get_ts_info()
1048 info->phc_source = HWTSTAMP_SOURCE_NETDEV; in __ethtool_get_ts_info()
1051 info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE | in __ethtool_get_ts_info()
1058 err = ethtool_get_ts_info_by_phc(dev, info, &hwprov->desc); in __ethtool_get_ts_info()
1066 const struct ethtool_ops *ops = dev->ethtool_ops; in net_support_hwtstamp_qualifier()
1074 if (!ops->supported_hwtstamp_qualifiers && in net_support_hwtstamp_qualifier()
1078 if (ops->supported_hwtstamp_qualifiers & BIT(qualifier)) in net_support_hwtstamp_qualifier()
1121 link_ksettings->base.speed = link_info->speed; in ethtool_params_from_link_mode()
1122 link_ksettings->lanes = link_info->lanes; in ethtool_params_from_link_mode()
1123 link_ksettings->base.duplex = link_info->duplex; in ethtool_params_from_link_mode()
1141 linkmode_set_bit_array(map->cap_arr, map->arr_size, map->caps); in ethtool_forced_speed_maps_init()
1142 map->cap_arr = NULL; in ethtool_forced_speed_maps_init()
1143 map->arr_size = 0; in ethtool_forced_speed_maps_init()
1153 !lockdep_is_held_type(&dev->ethtool->rss_lock, -1), in ethtool_rxfh_context_lost()
1157 ctx = xa_erase(&dev->ethtool->rss_ctx, context_id); in ethtool_rxfh_context_lost()