File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ int init_vlan(void)
105
105
struct ud user_data ;
106
106
int ret ;
107
107
108
+ if (CONFIG_NET_VLAN_COUNT == 0 ) {
109
+ LOG_DBG ("No VLAN interfaces defined." );
110
+ return 0 ;
111
+ }
112
+
108
113
iface = net_if_get_first_by_type (& NET_L2_GET_NAME (ETHERNET ));
109
114
if (!iface ) {
110
115
LOG_ERR ("No ethernet interfaces found." );
Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ int init_vlan(void)
85
85
struct ud ud ;
86
86
int ret ;
87
87
88
+ if (CONFIG_NET_VLAN_COUNT == 0 ) {
89
+ LOG_DBG ("No VLAN interfaces defined." );
90
+ return 0 ;
91
+ }
92
+
88
93
iface = net_if_get_first_by_type (& NET_L2_GET_NAME (ETHERNET ));
89
94
if (!iface ) {
90
95
LOG_ERR ("No ethernet interfaces found." );
Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ int init_vlan(void)
107
107
struct ud ud ;
108
108
int ret ;
109
109
110
+ if (CONFIG_NET_VLAN_COUNT == 0 ) {
111
+ LOG_DBG ("No VLAN interfaces defined." );
112
+ return 0 ;
113
+ }
114
+
110
115
memset (& ud , 0 , sizeof (ud ));
111
116
112
117
net_if_foreach (iface_cb , & ud );
Original file line number Diff line number Diff line change @@ -99,6 +99,11 @@ int init_vlan(void)
99
99
struct ud ud ;
100
100
int ret ;
101
101
102
+ if (CONFIG_NET_VLAN_COUNT == 0 ) {
103
+ LOG_DBG ("No VLAN interfaces defined." );
104
+ return 0 ;
105
+ }
106
+
102
107
iface = net_if_get_first_by_type (& NET_L2_GET_NAME (ETHERNET ));
103
108
if (!iface ) {
104
109
LOG_ERR ("No ethernet interfaces found." );
You can’t perform that action at this time.
0 commit comments