From: Dmitry Lebed Date: Sat, 24 Mar 2018 07:54:27 +0000 (+0300) Subject: nl80211: Add DFS offload support using upstream nl80211 definitions X-Git-Tag: hostap_2_7~487 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c17915462a99de99622b6598c5eebf72b3fe9e54;p=thirdparty%2Fhostap.git nl80211: Add DFS offload support using upstream nl80211 definitions Add generic DFS offload support using the nl80211 feature that was recently added to the mac80211-next tree. This uses the already available DFS offload infrastructure that was previously used with vendor specific definitions and just sets necessary flags (DFS_OFFLOAD ext_feature) and forawrds CAC_STARTED event for processing. Signed-off-by: Dmitry Lebed --- diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index e5bc7693b..ba053b44c 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -411,6 +411,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info, if (ext_feature_isset(ext_features, len, NL80211_EXT_FEATURE_MFP_OPTIONAL)) capa->flags |= WPA_DRIVER_FLAGS_MFP_OPTIONAL; + + if (ext_feature_isset(ext_features, len, + NL80211_EXT_FEATURE_DFS_OFFLOAD)) + capa->flags |= WPA_DRIVER_FLAGS_DFS_OFFLOAD; } diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index fd9eac970..062b0b318 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -1592,6 +1592,9 @@ static void nl80211_radar_event(struct wpa_driver_nl80211_data *drv, wpa_supplicant_event(drv->ctx, EVENT_DFS_PRE_CAC_EXPIRED, &data); break; + case NL80211_RADAR_CAC_STARTED: + wpa_supplicant_event(drv->ctx, EVENT_DFS_CAC_STARTED, &data); + break; default: wpa_printf(MSG_DEBUG, "nl80211: Unknown radar event %d " "received", event_type);