luckfox-pico-sdk/sysdrv/drv_ko/wifi/ssv6x5x/script/find_ssv_wlan
2023-08-08 20:36:47 +08:00

23 lines
406 B
Bash

#!/bin/sh
net_dirs="/sys/class/net/*"
key_word="SSV|RSV"
found=0
for net_dir in $net_dirs; do
drv_dir="${net_dir}/phy80211/device/driver"
if [ ! -e ${drv_dir} ] ; then
continue;
fi
drv_name=`ls ${drv_dir} | grep -E $key_word`
if [ ${drv_name} ]; then
echo `basename ${net_dir}`;
found=`expr $found + 1`
#break;
fi
done
if [ $found -gt 0 ]; then
exit 0
else
exit 1
fi