@@ -264,13 +264,8 @@ function network.scandevices(specificIfaces)
264264 end
265265
266266 if dev :match (" ^eth%d+$" ) then
267- -- ! We only get here with devices not listed in board.json, e.g
268- -- ! pluggable ethernet dongles.
269267 utils .log ( " network.scandevices.dev_parser found plain Ethernet " ..
270268 " device %s" , dev )
271- elseif dev :match (" ^wlan%d+" .. wireless .WIFI_MODE_SEPARATOR ().. " %w+$" ) then
272- utils .log ( " network.scandevices.dev_parser found WiFi device %s" ,
273- dev )
274269 elseif specificIfaces [dev ] then
275270 utils .log ( " network.scandevices.dev_parser found device %s that " ..
276271 " matches the config net section %s" , dev ,
@@ -285,11 +280,13 @@ function network.scandevices(specificIfaces)
285280 end
286281
287282 function owrt_ifname_parser (section )
288- local ifn = section [" ifname" ]
289- if ( type (ifn ) == " string" ) then
283+ local dev = section [" ifname" ]
284+ if ( type (dev ) == " string" ) then
285+ local is_dsa = utils .is_dsa (dev )
286+ devices [dev ] = devices [dev ] or {}
287+ devices [dev ][" dsa" ] = is_dsa
290288 utils .log ( " network.scandevices.owrt_ifname_parser found ifname %s" ,
291- ifn )
292- dev_parser (ifn )
289+ dev )
293290 end
294291 end
295292
@@ -298,10 +295,11 @@ function network.scandevices(specificIfaces)
298295 devices [dev ] = devices [dev ] or {}
299296 devices [dev ][" dsa" ] = is_dsa
300297 if is_dsa then
301- utils .log ( " network.scandevices found DSA-port %s in board.json " ,
302- dev )
298+ utils .log ( " network.scandevices.board_port_parser found " ..
299+ " DSA-port %s in board.json " , dev )
303300 else
304- utils .log ( " network.scandevices found device %s in board.json" , dev )
301+ utils .log ( " network.scandevices.board_port_parser found " ..
302+ " device %s in board.json" , dev )
305303 end
306304 end
307305
0 commit comments