Files
wlan-ap/feeds/wlan-ap/opensync/files/bin/auto-conf
2021-06-03 12:50:56 -04:00

18 lines
414 B
Bash
Executable File

#!/bin/sh
# Finds the highest settings an AP can support for various settings when set to "auto" in config
find_auto_hwmode() {
# This function finds the highest mode (hw_mode) that the AP can support
# Arguments
device=$1
mode='11n'
iw phy "$device" info | grep -q 'VHT Capabilities*' && mode="11ac"
iw phy "$device" info | grep -q 'HE.*Capabilities' && mode="11ax"
echo "$mode"
}
find_auto_hwmode $1