File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
drivers/ethernet/nxp_imx_netc Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -367,7 +367,6 @@ int netc_eth_init_common(const struct device *dev)
367
367
368
368
int netc_eth_tx (const struct device * dev , struct net_pkt * pkt )
369
369
{
370
- const struct netc_eth_config * cfg = dev -> config ;
371
370
struct netc_eth_data * data = dev -> data ;
372
371
netc_buffer_struct_t buff = {.buffer = data -> tx_buff , .length = sizeof (data -> tx_buff )};
373
372
netc_frame_struct_t frame = {.buffArray = & buff , .length = 1 };
@@ -376,6 +375,7 @@ int netc_eth_tx(const struct device *dev, struct net_pkt *pkt)
376
375
size_t pkt_len = net_pkt_get_len (pkt );
377
376
#if defined(NETC_HAS_NO_SWITCH_TAG_SUPPORT )
378
377
struct ethernet_context * eth_ctx = net_if_l2_data (data -> iface );
378
+ const struct netc_eth_config * cfg = dev -> config ;
379
379
#endif
380
380
status_t result ;
381
381
int ret ;
@@ -387,18 +387,16 @@ int netc_eth_tx(const struct device *dev, struct net_pkt *pkt)
387
387
388
388
iface_dst = data -> iface ;
389
389
390
- if (cfg -> pseudo_mac ) {
391
390
#if defined(NETC_HAS_NO_SWITCH_TAG_SUPPORT )
391
+ if (cfg -> pseudo_mac ) {
392
392
/* DSA conduit port not used */
393
393
if (eth_ctx -> dsa_port != DSA_CONDUIT_PORT ) {
394
394
return - ENOSYS ;
395
395
}
396
396
/* DSA driver redirects the iface */
397
397
iface_dst = pkt -> iface ;
398
- #else
399
- return - ENOSYS ;
400
- #endif
401
398
}
399
+ #endif
402
400
403
401
k_mutex_lock (& data -> tx_mutex , K_FOREVER );
404
402
You can’t perform that action at this time.
0 commit comments