0585ab5fe19aa8ca3ea54a0733ced4341978acbd
2 # checks if a given device can be used for a VAP interface (1 adhoc + 1 ap)
7 if [ -z "$dev" -o -z "$type" ]; then
11 if [ "$type" = "atheros" ]; then
13 elif [ "$type" = "mac80211" ]; then
14 # not hostapd[-mini], no VAP
15 if [ ! -x /usr
/sbin
/hostapd
]; then
16 echo "WARNING: hostapd[-mini] is required to be able to use VAP with mac80211."
20 netindex
="$(echo $dev |sed 's/[a-zA-z]*//')"
21 if [ -d /sys
/class
/net
/wlan
${netindex}/device
/driver
/module
]; then
22 driver
="$(basename $(ls -l /sys/class/net/wlan${netindex}/device/driver/module | sed -ne 's/.* -> //p'))"
23 if [ "$driver" = "ath9k" -o "$driver" = "ath5k" ]; then