File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -698,22 +698,31 @@ get_interface_pci_info() { # pci id / model / virtual
698
698
local pci_id
699
699
local pci_full
700
700
701
+ local pci_path
702
+ local driver
703
+
701
704
device_path=" $( readlink -f /sys/class/net/$1 ) "
705
+ pci_path=$device_path /../..
702
706
703
707
if [[ " $device_path " == " /sys/devices/pci" * ]]; then
704
708
pci_id=" $( echo " $device_path " | sed ' s/\//\n/g' | tail -n 3 | sed -n 1p) "
705
709
706
710
if which lspci > /dev/null 2>&1 ; then
707
- pci_full=" $( lspci -D -nn | grep -E " ^ $pci_id " ) "
708
- echo " PCI: $pci_full "
711
+ pci_full=" $( lspci -D -nn -s " $pci_id " ) "
712
+ echo -n " PCI: $pci_full "
709
713
else
710
- echo " PCI: $pci_id "
714
+ echo -n " PCI: $pci_id "
711
715
fi
712
716
elif [[ " $device_path " == * " /virtual/" * ]]; then
713
717
echo " virtual interface"
714
718
fi
719
+
720
+ if [[ -d " $pci_path /driver" ]] ; then
721
+ driver=$( readlink -f " $pci_path /driver" | sed ' s/\//\n/g' | tail -n 1)
722
+ echo -n " System-already-loaded driver: $driver "
723
+ fi
724
+ echo " "
715
725
# TODO usb
716
- # TODO current driver
717
726
}
718
727
719
728
alloc_new_vface_name () { # only for wifi
You can’t perform that action at this time.
0 commit comments