From fb718f94d60134b77d2a33d2bcddadedba2c5edd Mon Sep 17 00:00:00 2001 From: Ashwini Patil Date: Mon, 10 Jul 2017 15:03:01 +0530 Subject: [PATCH] nl80211: Check if driver supports OCE specific features Check if device supports OCE STA/STA-CFON/AP specific mandatory features. This commit includes checking based on the QCA vendor attributes. Signed-off-by: Jouni Malinen --- src/drivers/driver.h | 11 +++++++++++ src/drivers/driver_nl80211_capa.c | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 9b9c73166..c35d1f79f 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1582,6 +1582,17 @@ struct wpa_driver_capa { #define WPA_DRIVER_FLAGS_HE_CAPABILITIES 0x0002000000000000ULL /** Driver supports FILS shared key offload */ #define WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD 0x0004000000000000ULL +/** Driver supports all OCE STA specific mandatory features */ +#define WPA_DRIVER_FLAGS_OCE_STA 0x0008000000000000ULL +/** Driver supports all OCE AP specific mandatory features */ +#define WPA_DRIVER_FLAGS_OCE_AP 0x0010000000000000ULL +/** + * Driver supports all OCE STA-CFON specific mandatory features only. + * If a driver sets this bit but not the %WPA_DRIVER_FLAGS_OCE_AP, the + * userspace shall assume that this driver may not support all OCE AP + * functionality but can support only OCE STA-CFON functionality. + */ +#define WPA_DRIVER_FLAGS_OCE_STA_CFON 0x0020000000000000ULL u64 flags; #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \ diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 7a4df1a00..f11a1d70e 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -1114,6 +1114,12 @@ static void qca_nl80211_get_features(struct wpa_driver_nl80211_data *drv) drv->capa.flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS; if (check_feature(QCA_WLAN_VENDOR_FEATURE_P2P_LISTEN_OFFLOAD, &info)) drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD; + if (check_feature(QCA_WLAN_VENDOR_FEATURE_OCE_STA, &info)) + drv->capa.flags |= WPA_DRIVER_FLAGS_OCE_STA; + if (check_feature(QCA_WLAN_VENDOR_FEATURE_OCE_AP, &info)) + drv->capa.flags |= WPA_DRIVER_FLAGS_OCE_AP; + if (check_feature(QCA_WLAN_VENDOR_FEATURE_OCE_STA_CFON, &info)) + drv->capa.flags |= WPA_DRIVER_FLAGS_OCE_STA_CFON; os_free(info.flags); }