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 @@ -294,7 +294,6 @@ int netc_eth_init_common(const struct device *dev)
294
294
295
295
int netc_eth_tx (const struct device * dev , struct net_pkt * pkt )
296
296
{
297
- const struct netc_eth_config * cfg = dev -> config ;
298
297
struct netc_eth_data * data = dev -> data ;
299
298
netc_buffer_struct_t buff = {.buffer = data -> tx_buff , .length = sizeof (data -> tx_buff )};
300
299
netc_frame_struct_t frame = {.buffArray = & buff , .length = 1 };
@@ -303,6 +302,7 @@ int netc_eth_tx(const struct device *dev, struct net_pkt *pkt)
303
302
size_t pkt_len = net_pkt_get_len (pkt );
304
303
#if defined(NETC_HAS_NO_SWITCH_TAG_SUPPORT )
305
304
struct ethernet_context * eth_ctx = net_if_l2_data (data -> iface );
305
+ const struct netc_eth_config * cfg = dev -> config ;
306
306
#endif
307
307
status_t result ;
308
308
int ret ;
@@ -314,18 +314,16 @@ int netc_eth_tx(const struct device *dev, struct net_pkt *pkt)
314
314
315
315
iface_dst = data -> iface ;
316
316
317
- if (cfg -> pseudo_mac ) {
318
317
#if defined(NETC_HAS_NO_SWITCH_TAG_SUPPORT )
318
+ if (cfg -> pseudo_mac ) {
319
319
/* DSA conduit port not used */
320
320
if (eth_ctx -> dsa_port != DSA_CONDUIT_PORT ) {
321
321
return - ENOSYS ;
322
322
}
323
323
/* DSA driver redirects the iface */
324
324
iface_dst = pkt -> iface ;
325
- #else
326
- return - ENOSYS ;
327
- #endif
328
325
}
326
+ #endif
329
327
330
328
k_mutex_lock (& data -> tx_mutex , K_FOREVER );
331
329
You can’t perform that action at this time.
0 commit comments