mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-19 10:23:03 +00:00
18 lines
414 B
Bash
Executable File
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
|