15 # Include wired net drivers, excluding wireless
16 local _arch
=$
(uname
-m)
19 local _net_drivers
='eth_type_trans|register_virtio_device|usbnet_open'
20 local _unwanted_drivers
='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/'
22 # subfunctions inherit following FDs
23 local _merge
=8 _side2
=9
27 [[ $_fname =~
$_unwanted_drivers ]] && continue
29 *.ko
) _fcont
="$(< $_fname)" ;;
30 *.ko.gz
) _fcont
="$(gzip -dc $_fname)" ;;
31 *.ko.xz
) _fcont
="$(xz -dc $_fname)" ;;
33 [[ $_fcont =~
$_net_drivers
34 && ! $_fcont =~ iw_handler_get_spy
]] \
44 echo "$_f2" 1>&${_side2}
46 done | nmf1
1>&${_merge}
49 # Use two parallel streams to filter alternating modules.
51 eval "( ( rotor ) ${_side2}>&1 | nmf1 ) ${_merge}>&1"
52 [[ $debug ]] && set -x
56 { find_kernel_modules_by_path drivers
/net
; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers
/s390
/net
; fi; } \
57 | net_module_filter | instmods
59 #instmods() will take care of hostonly
63 =drivers
/net
/ethernet \
64 ecb arc4 bridge stp llc ipv6 bonding
8021q af_packet virtio_net