From: Amar Singhal Date: Sat, 22 Mar 2014 19:31:15 +0000 (+0200) Subject: hostapd: Check driver DFS offload capability for channel disablement X-Git-Tag: hostap_2_2~483 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70634eec0cb0003d83a8f25419eabf2d928dfc83;p=thirdparty%2Fhostap.git hostapd: Check driver DFS offload capability for channel disablement If the driver supports full offloading of DFS operations, do not disable a channel marked for radar detection. The driver will handle the needed operations for such channels. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index d319ce007..54a79b09d 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -111,10 +111,13 @@ int hostapd_get_hw_features(struct hostapd_iface *iface) if ((feature->channels[j].flag & HOSTAPD_CHAN_RADAR) && dfs_enabled) { dfs = 1; - } else if (feature->channels[j].flag & - (HOSTAPD_CHAN_NO_IBSS | - HOSTAPD_CHAN_PASSIVE_SCAN | - HOSTAPD_CHAN_RADAR)) { + } else if (((feature->channels[j].flag & + HOSTAPD_CHAN_RADAR) && + !(iface->drv_flags & + WPA_DRIVER_FLAGS_DFS_OFFLOAD)) || + (feature->channels[j].flag & + (HOSTAPD_CHAN_NO_IBSS | + HOSTAPD_CHAN_PASSIVE_SCAN))) { feature->channels[j].flag |= HOSTAPD_CHAN_DISABLED; }