File tree 40 files changed +76
-81
lines changed
doc/connectivity/networking/api
40 files changed +76
-81
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ also priority queues ``ETHERNET_PRIORITY_QUEUES`` need to be supported.
28
28
ARG_UNUSED(dev);
29
29
30
30
return ETHERNET_QAV | ETHERNET_PRIORITY_QUEUES |
31
- ETHERNET_HW_VLAN | ETHERNET_LINK_10BASE_T |
32
- ETHERNET_LINK_100BASE_T ;
31
+ ETHERNET_HW_VLAN | ETHERNET_LINK_10BASE |
32
+ ETHERNET_LINK_100BASE ;
33
33
}
34
34
35
35
See ``sam-e70-xplained `` board Ethernet driver
Original file line number Diff line number Diff line change @@ -1114,8 +1114,8 @@ static enum ethernet_hw_caps dsa_port_get_capabilities(const struct device *dev)
1114
1114
{
1115
1115
ARG_UNUSED (dev );
1116
1116
1117
- return ETHERNET_DSA_SLAVE_PORT | ETHERNET_LINK_10BASE_T |
1118
- ETHERNET_LINK_100BASE_T ;
1117
+ return ETHERNET_DSA_SLAVE_PORT | ETHERNET_LINK_10BASE |
1118
+ ETHERNET_LINK_100BASE ;
1119
1119
}
1120
1120
1121
1121
const struct ethernet_api dsa_eth_api_funcs = {
Original file line number Diff line number Diff line change @@ -1728,7 +1728,7 @@ static enum ethernet_hw_caps eth_dwc_xgmac_get_capabilities(const struct device
1728
1728
ARG_UNUSED (dev );
1729
1729
enum ethernet_hw_caps caps = (enum ethernet_hw_caps )0 ;
1730
1730
1731
- caps = (ETHERNET_LINK_1000BASE_T | ETHERNET_LINK_100BASE_T | ETHERNET_LINK_10BASE_T |
1731
+ caps = (ETHERNET_LINK_1000BASE | ETHERNET_LINK_100BASE | ETHERNET_LINK_10BASE |
1732
1732
ETHERNET_AUTO_NEGOTIATION_SET | ETHERNET_DUPLEX_SET );
1733
1733
1734
1734
#ifdef CONFIG_ETH_DWC_XGMAC_RX_CS_OFFLOAD
Original file line number Diff line number Diff line change @@ -1217,7 +1217,7 @@ static void adin2111_port_iface_init(struct net_if *iface)
1217
1217
static enum ethernet_hw_caps adin2111_port_get_capabilities (const struct device * dev )
1218
1218
{
1219
1219
ARG_UNUSED (dev );
1220
- return ETHERNET_LINK_10BASE_T |
1220
+ return ETHERNET_LINK_10BASE |
1221
1221
ETHERNET_HW_FILTERING
1222
1222
#if defined(CONFIG_NET_LLDP )
1223
1223
| ETHERNET_LLDP
Original file line number Diff line number Diff line change @@ -366,11 +366,11 @@ static enum ethernet_hw_caps eth_cyclonev_caps(const struct device *dev)
366
366
enum ethernet_hw_caps caps = 0 ;
367
367
368
368
if (p -> feature & EMAC_DMA_HW_FEATURE_MIISEL ) {
369
- caps |= ETHERNET_LINK_10BASE_T ;
370
- caps |= ETHERNET_LINK_100BASE_T ;
369
+ caps |= ETHERNET_LINK_10BASE ;
370
+ caps |= ETHERNET_LINK_100BASE ;
371
371
}
372
372
if (p -> feature & EMAC_DMA_HW_FEATURE_GMIISEL ) {
373
- caps |= ETHERNET_LINK_1000BASE_T ;
373
+ caps |= ETHERNET_LINK_1000BASE ;
374
374
}
375
375
if (p -> feature & EMAC_DMA_HW_FEATURE_RXTYP2COE ) {
376
376
caps |= ETHERNET_HW_RX_CHKSUM_OFFLOAD ;
Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ static enum ethernet_hw_caps dwmac_caps(const struct device *dev)
102
102
enum ethernet_hw_caps caps = 0 ;
103
103
104
104
if (p -> feature0 & MAC_HW_FEATURE0_GMIISEL ) {
105
- caps |= ETHERNET_LINK_1000BASE_T ;
105
+ caps |= ETHERNET_LINK_1000BASE ;
106
106
}
107
107
108
108
if (p -> feature0 & MAC_HW_FEATURE0_MIISEL ) {
109
- caps |= ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T ;
109
+ caps |= ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE ;
110
110
}
111
111
112
112
caps |= ETHERNET_PROMISC_MODE ;
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ static enum ethernet_hw_caps e1000_caps(const struct device *dev)
82
82
#if defined(CONFIG_ETH_E1000_PTP_CLOCK )
83
83
ETHERNET_PTP |
84
84
#endif
85
- ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T |
86
- ETHERNET_LINK_1000BASE_T |
85
+ ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE |
86
+ ETHERNET_LINK_1000BASE |
87
87
/* The driver does not really support TXTIME atm but mark
88
88
* it to support it so that we can test the txtime sample.
89
89
*/
Original file line number Diff line number Diff line change @@ -750,7 +750,7 @@ static enum ethernet_hw_caps eth_enc28j60_get_capabilities(const struct device *
750
750
{
751
751
ARG_UNUSED (dev );
752
752
753
- return ETHERNET_LINK_10BASE_T
753
+ return ETHERNET_LINK_10BASE
754
754
#if defined(CONFIG_NET_VLAN )
755
755
| ETHERNET_HW_VLAN
756
756
#endif
Original file line number Diff line number Diff line change @@ -553,7 +553,7 @@ static enum ethernet_hw_caps enc424j600_get_capabilities(const struct device *de
553
553
{
554
554
ARG_UNUSED (dev );
555
555
556
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T ;
556
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE ;
557
557
}
558
558
559
559
static int enc424j600_set_config (const struct device * dev ,
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ static const struct device *eth_esp32_phy_dev = DEVICE_DT_GET(
56
56
static enum ethernet_hw_caps eth_esp32_caps (const struct device * dev )
57
57
{
58
58
ARG_UNUSED (dev );
59
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T ;
59
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE ;
60
60
}
61
61
62
62
static int eth_esp32_set_config (const struct device * dev ,
Original file line number Diff line number Diff line change @@ -631,8 +631,8 @@ static enum ethernet_hw_caps eth_gecko_get_capabilities(const struct device *dev
631
631
{
632
632
ARG_UNUSED (dev );
633
633
634
- return (ETHERNET_AUTO_NEGOTIATION_SET | ETHERNET_LINK_10BASE_T |
635
- ETHERNET_LINK_100BASE_T | ETHERNET_DUPLEX_SET );
634
+ return (ETHERNET_AUTO_NEGOTIATION_SET | ETHERNET_LINK_10BASE |
635
+ ETHERNET_LINK_100BASE | ETHERNET_DUPLEX_SET );
636
636
}
637
637
638
638
static const struct ethernet_api eth_api = {
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ static int eth_ivshmem_stop(const struct device *dev)
88
88
static enum ethernet_hw_caps eth_ivshmem_caps (const struct device * dev )
89
89
{
90
90
ARG_UNUSED (dev );
91
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T | ETHERNET_LINK_1000BASE_T ;
91
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE | ETHERNET_LINK_1000BASE ;
92
92
}
93
93
94
94
static int eth_ivshmem_send (const struct device * dev , struct net_pkt * pkt )
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ static void lan865x_iface_init(struct net_if *iface)
112
112
static enum ethernet_hw_caps lan865x_port_get_capabilities (const struct device * dev )
113
113
{
114
114
ARG_UNUSED (dev );
115
- return ETHERNET_LINK_10BASE_T | ETHERNET_PROMISC_MODE ;
115
+ return ETHERNET_LINK_10BASE | ETHERNET_PROMISC_MODE ;
116
116
}
117
117
118
118
static int lan865x_gpio_reset (const struct device * dev );
Original file line number Diff line number Diff line change @@ -615,7 +615,7 @@ static enum ethernet_hw_caps lan9250_get_capabilities(const struct device *dev)
615
615
{
616
616
ARG_UNUSED (dev );
617
617
618
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T ;
618
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE ;
619
619
}
620
620
621
621
static void lan9250_iface_init (struct net_if * iface )
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ static enum ethernet_hw_caps eth_caps(const struct device *dev)
294
294
#ifdef CONFIG_NET_VLAN
295
295
ETHERNET_HW_VLAN |
296
296
#endif
297
- ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T | ETHERNET_LINK_1000BASE_T ;
297
+ ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE | ETHERNET_LINK_1000BASE ;
298
298
}
299
299
300
300
static const struct ethernet_api eth_api = {
Original file line number Diff line number Diff line change @@ -552,9 +552,9 @@ static enum ethernet_hw_caps numaker_eth_get_cap(const struct device *dev)
552
552
{
553
553
ARG_UNUSED (dev );
554
554
#if defined(NU_USING_HW_CHECKSUM )
555
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T | ETHERNET_HW_RX_CHKSUM_OFFLOAD ;
555
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE | ETHERNET_HW_RX_CHKSUM_OFFLOAD ;
556
556
#else
557
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T ;
557
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE ;
558
558
#endif
559
559
}
560
560
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ static enum ethernet_hw_caps eth_nxp_enet_get_capabilities(const struct device *
252
252
#endif
253
253
enum ethernet_hw_caps caps ;
254
254
255
- caps = ETHERNET_LINK_10BASE_T |
255
+ caps = ETHERNET_LINK_10BASE |
256
256
ETHERNET_HW_FILTERING |
257
257
#if defined(CONFIG_NET_VLAN )
258
258
ETHERNET_HW_VLAN |
@@ -267,11 +267,11 @@ static enum ethernet_hw_caps eth_nxp_enet_get_capabilities(const struct device *
267
267
ETHERNET_HW_TX_CHKSUM_OFFLOAD |
268
268
ETHERNET_HW_RX_CHKSUM_OFFLOAD |
269
269
#endif
270
- ETHERNET_LINK_100BASE_T ;
270
+ ETHERNET_LINK_100BASE ;
271
271
272
272
if (COND_CODE_1 (IS_ENABLED (CONFIG_ETH_NXP_ENET_1G ),
273
273
(config -> phy_mode == NXP_ENET_RGMII_MODE ), (0 ))) {
274
- caps |= ETHERNET_LINK_1000BASE_T ;
274
+ caps |= ETHERNET_LINK_1000BASE ;
275
275
}
276
276
277
277
return caps ;
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ static void tx_dma_done(struct k_work *work)
161
161
162
162
static enum ethernet_hw_caps eth_nxp_enet_qos_get_capabilities (const struct device * dev )
163
163
{
164
- return ETHERNET_LINK_100BASE_T | ETHERNET_LINK_10BASE_T | ENET_MAC_PACKET_FILTER_PM_MASK ;
164
+ return ETHERNET_LINK_100BASE | ETHERNET_LINK_10BASE | ENET_MAC_PACKET_FILTER_PM_MASK ;
165
165
}
166
166
167
167
static void eth_nxp_enet_qos_rx (struct k_work * work )
Original file line number Diff line number Diff line change @@ -559,10 +559,10 @@ static enum ethernet_hw_caps eth_nxp_s32_get_capabilities(const struct device *d
559
559
{
560
560
ARG_UNUSED (dev );
561
561
562
- return (ETHERNET_LINK_10BASE_T
563
- | ETHERNET_LINK_100BASE_T
562
+ return (ETHERNET_LINK_10BASE
563
+ | ETHERNET_LINK_100BASE
564
564
#if (FEATURE_GMAC_RGMII_EN == 1U )
565
- | ETHERNET_LINK_1000BASE_T
565
+ | ETHERNET_LINK_1000BASE
566
566
#endif
567
567
| ETHERNET_DUPLEX_SET
568
568
| ETHERNET_HW_TX_CHKSUM_OFFLOAD
Original file line number Diff line number Diff line change @@ -267,9 +267,9 @@ enum ethernet_hw_caps nxp_s32_eth_get_capabilities(const struct device *dev)
267
267
{
268
268
ARG_UNUSED (dev );
269
269
270
- return (ETHERNET_LINK_10BASE_T
271
- | ETHERNET_LINK_100BASE_T
272
- | ETHERNET_LINK_1000BASE_T
270
+ return (ETHERNET_LINK_10BASE
271
+ | ETHERNET_LINK_100BASE
272
+ | ETHERNET_LINK_1000BASE
273
273
| ETHERNET_HW_RX_CHKSUM_OFFLOAD
274
274
| ETHERNET_HW_FILTERING
275
275
#if defined(CONFIG_NET_VLAN )
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ static enum ethernet_hw_caps renesas_ra_eth_get_capabilities(const struct device
134
134
{
135
135
ARG_UNUSED (dev );
136
136
137
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T ;
137
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE ;
138
138
}
139
139
140
140
void renesas_ra_eth_callback (ether_callback_args_t * p_args )
Original file line number Diff line number Diff line change @@ -1920,7 +1920,7 @@ static enum ethernet_hw_caps eth_sam_gmac_get_capabilities(const struct device *
1920
1920
{
1921
1921
ARG_UNUSED (dev );
1922
1922
1923
- return ETHERNET_LINK_10BASE_T |
1923
+ return ETHERNET_LINK_10BASE |
1924
1924
#if defined(CONFIG_NET_VLAN )
1925
1925
ETHERNET_HW_VLAN |
1926
1926
#endif
@@ -1931,7 +1931,7 @@ static enum ethernet_hw_caps eth_sam_gmac_get_capabilities(const struct device *
1931
1931
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 1
1932
1932
ETHERNET_QAV |
1933
1933
#endif
1934
- ETHERNET_LINK_100BASE_T ;
1934
+ ETHERNET_LINK_100BASE ;
1935
1935
}
1936
1936
1937
1937
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 1
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ static enum ethernet_hw_caps sy1xx_mac_get_caps(const struct device *dev)
346
346
347
347
/* basic implemented features */
348
348
supported |= ETHERNET_PROMISC_MODE ;
349
- supported |= ETHERNET_LINK_1000BASE_T ;
349
+ supported |= ETHERNET_LINK_1000BASE ;
350
350
supported |= ETHERNET_PROMISC_MODE ;
351
351
352
352
return supported ;
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ static enum ethernet_hw_caps eth_smsc911x_get_capabilities(const struct device *
416
416
{
417
417
ARG_UNUSED (dev );
418
418
419
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T ;
419
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE ;
420
420
}
421
421
422
422
#if defined(CONFIG_NET_STATISTICS_ETHERNET )
Original file line number Diff line number Diff line change @@ -688,8 +688,8 @@ static enum ethernet_hw_caps eth_smsc_get_caps(const struct device *dev)
688
688
{
689
689
ARG_UNUSED (dev );
690
690
691
- return (ETHERNET_LINK_10BASE_T
692
- | ETHERNET_LINK_100BASE_T
691
+ return (ETHERNET_LINK_10BASE
692
+ | ETHERNET_LINK_100BASE
693
693
#if defined(CONFIG_NET_PROMISCUOUS_MODE )
694
694
| ETHERNET_PROMISC_MODE
695
695
#endif
Original file line number Diff line number Diff line change @@ -1264,7 +1264,7 @@ static enum ethernet_hw_caps eth_stm32_hal_get_capabilities(const struct device
1264
1264
{
1265
1265
ARG_UNUSED (dev );
1266
1266
1267
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T
1267
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE
1268
1268
#if defined(CONFIG_NET_VLAN )
1269
1269
| ETHERNET_HW_VLAN
1270
1270
#endif
Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ static enum ethernet_hw_caps w5500_get_capabilities(const struct device *dev)
370
370
{
371
371
ARG_UNUSED (dev );
372
372
373
- return ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T
373
+ return ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE
374
374
#if defined(CONFIG_NET_PROMISCUOUS_MODE )
375
375
| ETHERNET_PROMISC_MODE
376
376
#endif
Original file line number Diff line number Diff line change @@ -356,8 +356,8 @@ static void xilinx_axienet_isr(const struct device *dev)
356
356
static enum ethernet_hw_caps xilinx_axienet_caps (const struct device * dev )
357
357
{
358
358
const struct xilinx_axienet_config * config = dev -> config ;
359
- enum ethernet_hw_caps ret = ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T |
360
- ETHERNET_LINK_1000BASE_T ;
359
+ enum ethernet_hw_caps ret = ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE |
360
+ ETHERNET_LINK_1000BASE ;
361
361
362
362
if (config -> have_rx_csum_offload ) {
363
363
ret |= ETHERNET_HW_RX_CHKSUM_OFFLOAD ;
Original file line number Diff line number Diff line change @@ -622,21 +622,19 @@ static enum ethernet_hw_caps eth_xlnx_gem_get_capabilities(
622
622
623
623
if (dev_conf -> max_link_speed == LINK_1GBIT ) {
624
624
if (dev_conf -> phy_advertise_lower ) {
625
- caps |= (ETHERNET_LINK_1000BASE_T |
626
- ETHERNET_LINK_100BASE_T |
627
- ETHERNET_LINK_10BASE_T );
625
+ caps |= (ETHERNET_LINK_1000BASE | ETHERNET_LINK_100BASE |
626
+ ETHERNET_LINK_10BASE );
628
627
} else {
629
- caps |= ETHERNET_LINK_1000BASE_T ;
628
+ caps |= ETHERNET_LINK_1000BASE ;
630
629
}
631
630
} else if (dev_conf -> max_link_speed == LINK_100MBIT ) {
632
631
if (dev_conf -> phy_advertise_lower ) {
633
- caps |= (ETHERNET_LINK_100BASE_T |
634
- ETHERNET_LINK_10BASE_T );
632
+ caps |= (ETHERNET_LINK_100BASE | ETHERNET_LINK_10BASE );
635
633
} else {
636
- caps |= ETHERNET_LINK_100BASE_T ;
634
+ caps |= ETHERNET_LINK_100BASE ;
637
635
}
638
636
} else {
639
- caps |= ETHERNET_LINK_10BASE_T ;
637
+ caps |= ETHERNET_LINK_10BASE ;
640
638
}
641
639
642
640
if (dev_conf -> enable_rx_chksum_offload ) {
Original file line number Diff line number Diff line change @@ -884,7 +884,7 @@ static int eth_xmc4xxx_init(const struct device *dev)
884
884
static enum ethernet_hw_caps eth_xmc4xxx_capabilities (const struct device * dev )
885
885
{
886
886
ARG_UNUSED (dev );
887
- enum ethernet_hw_caps caps = ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T |
887
+ enum ethernet_hw_caps caps = ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE |
888
888
ETHERNET_HW_TX_CHKSUM_OFFLOAD | ETHERNET_HW_RX_CHKSUM_OFFLOAD ;
889
889
890
890
#if defined(CONFIG_PTP_CLOCK_XMC4XXX )
Original file line number Diff line number Diff line change @@ -214,8 +214,8 @@ static enum ethernet_hw_caps dsa_netc_get_capabilities(const struct device *dev)
214
214
{
215
215
ARG_UNUSED (dev );
216
216
217
- return ETHERNET_DSA_SLAVE_PORT | ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T |
218
- ETHERNET_LINK_1000BASE_T ;
217
+ return ETHERNET_DSA_SLAVE_PORT | ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE |
218
+ ETHERNET_LINK_1000BASE ;
219
219
}
220
220
221
221
static const struct device * dsa_netc_get_phy (const struct device * dev )
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ enum ethernet_hw_caps netc_eth_get_capabilities(const struct device *dev)
284
284
const struct netc_eth_config * cfg = dev -> config ;
285
285
uint32_t caps ;
286
286
287
- caps = (ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T | ETHERNET_LINK_1000BASE_T |
287
+ caps = (ETHERNET_LINK_10BASE | ETHERNET_LINK_100BASE | ETHERNET_LINK_1000BASE |
288
288
ETHERNET_HW_RX_CHKSUM_OFFLOAD | ETHERNET_HW_FILTERING
289
289
#if defined(CONFIG_NET_VLAN )
290
290
| ETHERNET_HW_VLAN
Original file line number Diff line number Diff line change @@ -331,8 +331,8 @@ static bool is_eapol(struct net_pkt *pkt)
331
331
332
332
enum ethernet_hw_caps nrf_wifi_if_caps_get (const struct device * dev )
333
333
{
334
- enum ethernet_hw_caps caps = (ETHERNET_LINK_10BASE_T |
335
- ETHERNET_LINK_100BASE_T | ETHERNET_LINK_1000BASE_T );
334
+ enum ethernet_hw_caps caps = (ETHERNET_LINK_10BASE |
335
+ ETHERNET_LINK_100BASE | ETHERNET_LINK_1000BASE );
336
336
337
337
#ifdef CONFIG_NRF70_TCP_IP_CHECKSUM_OFFLOAD
338
338
caps |= ETHERNET_HW_TX_CHKSUM_OFFLOAD |
You can’t perform that action at this time.
0 commit comments