fff-wireless: Use previous HT/VHT mode instead of detecting capabilities

Submitted by Fabian Blaese on Dec. 14, 2019, 8:17 p.m.

Details

Message ID 20191214201706.3858652-1-fabian@blaese.de
State Accepted
Headers show

Commit Message

Fabian Blaese Dec. 14, 2019, 8:17 p.m.
Previously the HT/VHT mode was detected using the output of iw phy. This
command erroneously used the $radio variable, which doesn't contain the
phy name. Therefore it doesn't work like it is supposed to.

As we don't completely configure the wifi-device sections, but only adjust
some of OpenWRTs default values, the HT/VHT detection can easily be done by
just checking if the previous mode did contain "VHT".

Signed-off-by: Fabian Bläse <fabian@blaese.de>
---
 .../fff/fff-wireless/files/etc/uci-defaults/24a-fff-wireless    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/24a-fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-defaults/24a-fff-wireless
index d02af16..3f28ae0 100644
--- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/24a-fff-wireless
+++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/24a-fff-wireless
@@ -19,7 +19,7 @@  configWifiDevice() {
 
 	# detect 802.11ac capable radio and set htmode appropriately
 	local htmode="HT20"
-	iw phy "${radio}" info | grep -q 'VHT Capabilities' && htmode="VHT20"
+	uci -q get wireless.${radio}.htmode | grep VHT && htmode="VHT20"
 
 	# Comments
 	# wXmesh: use 802.11s mesh as "default"

Comments

Christian Dresel Dec. 24, 2019, 11:13 a.m.
Reviewed-by: Christian Dresel <fff@chrisi01.de>

Gruß

Christian
Fabian Blaese Dec. 24, 2019, 11:53 a.m.
applied