By analogy to wpa_supplicant.conf Active Channel Selection (ACS) is coded as "channel=0" within a connection. Signed-off-by: Ulrich Ölmann <u.oelmann@xxxxxxxxxxxxxx> --- src/supplicant-manager/nm-supplicant-config.c | 13 +++++++++++++ src/supplicant-manager/nm-supplicant-settings-verify.c | 1 + 2 files changed, 14 insertions(+) diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c index 692efef..c722966 100644 --- a/src/supplicant-manager/nm-supplicant-config.c +++ b/src/supplicant-manager/nm-supplicant-config.c @@ -381,6 +381,19 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, nm_log_warn (LOGD_SUPPLICANT, "Error adding mode=2 (ap) to supplicant config."); return FALSE; } + + /* By analogy to wpa_supplicant.conf Active Channel Selection (ACS) has + * to be coded as "channel=0" within the connection - wpa_supplicant + * does not need a frequency then. + */ + if (!nm_setting_wireless_get_channel (setting)) { + if (!nm_supplicant_config_add_option (self, "acs", "1", -1, FALSE)) { + nm_log_warn (LOGD_SUPPLICANT, "Error adding acs=1 (enable active channel selection) to supplicant config."); + return FALSE; + } + + fixed_freq = 0; + } } if ((is_adhoc || is_ap) && fixed_freq) { diff --git a/src/supplicant-manager/nm-supplicant-settings-verify.c b/src/supplicant-manager/nm-supplicant-settings-verify.c index 1328fd5..68bc66b 100644 --- a/src/supplicant-manager/nm-supplicant-settings-verify.c +++ b/src/supplicant-manager/nm-supplicant-settings-verify.c @@ -94,6 +94,7 @@ static const struct Opt opt_table[] = { { "bssid", TYPE_KEYWORD, 0, 0, FALSE, NULL }, { "scan_ssid", TYPE_INT, 0, 1, FALSE, NULL }, { "mode", TYPE_INT, 0, 2, FALSE, NULL }, + { "acs", TYPE_INT, 0, 1, FALSE, NULL }, { "frequency", TYPE_INT, 2412, 5825, FALSE, NULL }, { "auth_alg", TYPE_KEYWORD, 0, 0, FALSE, auth_alg_allowed }, { "psk", TYPE_BYTES, 0, 0, FALSE, NULL }, -- 2.1.4 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap