aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-03-30 10:09:32 +0100
committerFelix Fietkau <nbd@nbd.name>2019-04-03 10:40:09 +0200
commitb3d8b3ab8e6fc0c0355f0680fc1c5f9c90a0c35a (patch)
treee792e85d3764df356a596b2065595d0b06f85b15 /package/kernel/mac80211
parent1dd536f1fa63d6ace1a4b3c558b64c84edfc726f (diff)
downloadupstream-b3d8b3ab8e6fc0c0355f0680fc1c5f9c90a0c35a.tar.gz
upstream-b3d8b3ab8e6fc0c0355f0680fc1c5f9c90a0c35a.tar.bz2
upstream-b3d8b3ab8e6fc0c0355f0680fc1c5f9c90a0c35a.zip
mac80211: set noscan=1 if sta/adhoc/mesh interfaces are present
Fixes channel selection issues and suppresses an unnecessary extra scan Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index e9389e3447..0426cb60f7 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -99,6 +99,8 @@ mac80211_hostapd_setup_base() {
json_get_vars noscan ht_coex
json_get_values ht_capab_list ht_capab
+ [ -n "$noscan" -a "$noscan" -gt 0 ] && hostapd_noscan=1
+
ieee80211n=1
ht_capab=
case "$htmode" in
@@ -307,7 +309,7 @@ mac80211_hostapd_setup_base() {
cat >> "$hostapd_conf_file" <<EOF
${channel:+channel=$channel}
${channel_list:+chanlist=$channel_list}
-${noscan:+noscan=$noscan}
+${hostapd_noscan:+noscan=1}
$base_cfg
EOF
@@ -735,6 +737,10 @@ mac80211_interface_cleanup() {
done
}
+mac80211_set_noscan() {
+ hostapd_noscan=1
+}
+
drv_mac80211_cleanup() {
hostapd_common_cleanup
}
@@ -798,9 +804,12 @@ drv_mac80211_setup() {
has_ap=
hostapd_ctrl=
+ hostapd_noscan=
for_each_interface "ap" mac80211_check_ap
rm -f "$hostapd_conf_file"
+
+ for_each_interface "sta adhoc mesh" mac80211_set_noscan
[ -n "$has_ap" ] && mac80211_hostapd_setup_base "$phy"
for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif