]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add DFS offload support using upstream nl80211 definitions
authorDmitry Lebed <lebed.dmitry@gmail.com>
Sat, 24 Mar 2018 07:54:27 +0000 (10:54 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 30 Mar 2018 07:56:05 +0000 (10:56 +0300)
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 <lebed.dmitry@gmail.com>
src/drivers/driver_nl80211_capa.c
src/drivers/driver_nl80211_event.c

index e5bc7693b51e87e43c5ca2869948ab8e4de78299..ba053b44c4e775fd942197246f39a3e0e028532f 100644 (file)
@@ -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;
 }
 
 
index fd9eac97029ed1955322e3ae00068fecd0aaaba8..062b0b3184cac819a01eace3a035a9bb64621c04 100644 (file)
@@ -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);