aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-11-14 12:38:08 +0100
committerFelix Fietkau <nbd@nbd.name>2017-11-15 18:49:12 +0100
commitd91494eedf06ac6b31c1aa9f7172871b16af96c8 (patch)
tree179fa470b2a6e6afb3fe29d9edb48479487c293b /package/network/services/hostapd/files
parent0da54fa6428ea98d31b49f5d9a4a272214f5d188 (diff)
downloadupstream-d91494eedf06ac6b31c1aa9f7172871b16af96c8.tar.gz
upstream-d91494eedf06ac6b31c1aa9f7172871b16af96c8.tar.bz2
upstream-d91494eedf06ac6b31c1aa9f7172871b16af96c8.zip
hostapd: rework frequency/ht/vht selection for ibss/mesh
- Remove obsolete patch chunks regarding fixed_freq - Instead of patching in custom HT40+/- parameters, use the standard config syntax as much as possible. - Use fixed_freq for mesh - Fix issues with disabling obss scan when using fixed_freq on mesh Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/services/hostapd/files')
-rw-r--r--package/network/services/hostapd/files/hostapd.sh34
-rw-r--r--package/network/services/hostapd/files/wpa_supplicant-full.config4
-rw-r--r--package/network/services/hostapd/files/wpa_supplicant-mini.config4
-rw-r--r--package/network/services/hostapd/files/wpa_supplicant-p2p.config4
4 files changed, 31 insertions, 15 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 6e95805e4b..240097648a 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -594,8 +594,31 @@ EOF
return 0
}
+wpa_supplicant_set_fixed_freq() {
+ local freq="$1"
+ local htmode="$2"
+
+ append network_data "fixed_freq=1" "$N$T"
+ append network_data "frequency=$freq" "$N$T"
+ case "$htmode" in
+ NOHT) append network_data "disable_ht=1" "$N$T";;
+ HT20|VHT20) append network_data "disable_ht40=1" "$N$T";;
+ HT40*|VHT40*|VHT80*|VHT160*) append network_data "ht40=1" "$N$T";;
+ esac
+ case "$htmode" in
+ VHT*) append network_data "vht=1" "$N$T";;
+ esac
+ case "$htmode" in
+ VHT80) append network_data "max_oper_chwidth=1" "$N$T";;
+ VHT160) append network_data "max_oper_chwidth=2" "$N$T";;
+ *) append network_data "max_oper_chwidth=0" "$N$T";;
+ esac
+}
+
wpa_supplicant_add_network() {
local ifname="$1"
+ local freq="$2"
+ local htmode="$3"
_wpa_supplicant_common "$1"
wireless_vif_parse_encryption
@@ -617,11 +640,7 @@ wpa_supplicant_add_network() {
[[ "$_w_mode" = "adhoc" ]] && {
append network_data "mode=1" "$N$T"
- [ -n "$channel" ] && {
- freq="$(get_freq "$phy" "$channel")"
- append network_data "fixed_freq=1" "$N$T"
- append network_data "frequency=$freq" "$N$T"
- }
+ [ -n "$channel" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode"
scan_ssid="scan_ssid=0"
@@ -633,10 +652,7 @@ wpa_supplicant_add_network() {
ssid="${mesh_id}"
append network_data "mode=5" "$N$T"
- [ -n "$channel" ] && {
- freq="$(get_freq "$phy" "$channel")"
- append network_data "frequency=$freq" "$N$T"
- }
+ [ -n "$channel" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode"
append wpa_key_mgmt "SAE"
scan_ssid=""
}
diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config b/package/network/services/hostapd/files/wpa_supplicant-full.config
index 094741b50e..81fa8f5393 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-full.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-full.config
@@ -179,10 +179,10 @@ CONFIG_SMARTCARD=y
#CONFIG_PCSC=y
# Support HT overrides (disable HT/HT40, mask MCS rates, etc.)
-#CONFIG_HT_OVERRIDES=y
+CONFIG_HT_OVERRIDES=y
# Support VHT overrides (disable VHT, mask MCS rates, etc.)
-#CONFIG_VHT_OVERRIDES=y
+CONFIG_VHT_OVERRIDES=y
# Development testing
#CONFIG_EAPOL_TEST=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-mini.config b/package/network/services/hostapd/files/wpa_supplicant-mini.config
index 3e9a661056..3e088715c8 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-mini.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-mini.config
@@ -179,10 +179,10 @@ CONFIG_DRIVER_WIRED=y
#CONFIG_PCSC=y
# Support HT overrides (disable HT/HT40, mask MCS rates, etc.)
-#CONFIG_HT_OVERRIDES=y
+CONFIG_HT_OVERRIDES=y
# Support VHT overrides (disable VHT, mask MCS rates, etc.)
-#CONFIG_VHT_OVERRIDES=y
+CONFIG_VHT_OVERRIDES=y
# Development testing
#CONFIG_EAPOL_TEST=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-p2p.config b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
index de6055137b..420aebcf98 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-p2p.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
@@ -179,10 +179,10 @@ CONFIG_SMARTCARD=y
#CONFIG_PCSC=y
# Support HT overrides (disable HT/HT40, mask MCS rates, etc.)
-#CONFIG_HT_OVERRIDES=y
+CONFIG_HT_OVERRIDES=y
# Support VHT overrides (disable VHT, mask MCS rates, etc.)
-#CONFIG_VHT_OVERRIDES=y
+CONFIG_VHT_OVERRIDES=y
# Development testing
#CONFIG_EAPOL_TEST=y