Skip to content

Commit 2522bb0

Browse files
hasheddankartben
authored andcommitted
net: support configuring offloaded network device as default interface
Adds Kconfig option for making an offloaded network device the default interface. Signed-off-by: Daniel Mangum <[email protected]>
1 parent 6ab5c00 commit 2522bb0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

subsys/net/ip/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,9 @@ config NET_DEFAULT_IF_PPP
930930
bool "PPP interface"
931931
depends on NET_L2_PPP
932932

933+
config NET_DEFAULT_IF_OFFLOADED_NETDEV
934+
bool "Offloaded network device"
935+
933936
config NET_DEFAULT_IF_WIFI
934937
bool "WiFi interface"
935938
depends on NET_L2_ETHERNET

subsys/net/ip/net_if.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,9 @@ struct net_if *net_if_get_default(void)
632632
#if defined(CONFIG_NET_DEFAULT_IF_PPP)
633633
iface = net_if_get_first_by_type(&NET_L2_GET_NAME(PPP));
634634
#endif
635+
#if defined(CONFIG_NET_DEFAULT_IF_OFFLOADED_NETDEV)
636+
iface = net_if_get_first_by_type(&NET_L2_GET_NAME(OFFLOADED_NETDEV));
637+
#endif
635638
#if defined(CONFIG_NET_DEFAULT_IF_UP)
636639
iface = net_if_get_first_up();
637640
#endif

0 commit comments

Comments
 (0)