From d66873f5cf804bc247aa5c01cc3d5f17e5df35da Mon Sep 17 00:00:00 2001 From: Andrei Otcheretianski Date: Wed, 1 Jan 2014 15:32:10 +0200 Subject: [PATCH] Do not start CSA flow when CSA is not supported by the driver Signed-hostap: Andrei Otcheretianski --- src/ap/hostapd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 314239159..764722f96 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -2367,6 +2367,12 @@ int hostapd_switch_channel(struct hostapd_data *hapd, struct csa_settings *settings) { int ret; + + if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_CSA)) { + wpa_printf(MSG_INFO, "CSA is not supported"); + return -1; + } + ret = hostapd_fill_csa_settings(hapd, settings); if (ret) return ret;