From d4770fe487a33f023afce15156bd6d87197c4130 Mon Sep 17 00:00:00 2001 From: "Kanchanapally, Vidyullatha" Date: Tue, 22 Sep 2015 16:19:02 +0530 Subject: nl80211: Extract driver offchannel simultaneous capability Make the driver offchannel simultaneous capability available to wpa_supplicant. Signed-off-by: Jouni Malinen Git-commit: 8e5097456af34c43beee03e63ef7ab10aabd9680 Git-repo: git://w1.fi/srv/git/hostap.git Change-Id: I76dbc6b6f9d871b3703030f0e204eb10ccc90fa3 CRs-fixed: 909284 --- src/drivers/driver.h | 2 ++ src/drivers/driver_nl80211_capa.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 31cb23f1..b2df1a73 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1214,6 +1214,8 @@ struct wpa_driver_capa { #define WPA_DRIVER_FLAGS_VHT_IBSS 0x0000002000000000ULL /** Driver supports automatic band selection */ #define WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY 0x0000004000000000ULL +/** Driver supports simultaneous off-channel operations */ +#define WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS 0x0000008000000000ULL u64 flags; #define WPA_DRIVER_SMPS_MODE_STATIC 0x00000001 diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 4adc95b3..7b0e81d9 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -843,6 +843,10 @@ static void qca_nl80211_get_features(struct wpa_driver_nl80211_data *drv) if (check_feature(QCA_WLAN_VENDOR_FEATURE_SUPPORT_HW_MODE_ANY, &info)) drv->capa.flags |= WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY; + + if (check_feature(QCA_WLAN_VENDOR_FEATURE_OFFCHANNEL_SIMULTANEOUS, + &info)) + drv->capa.flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS; } @@ -928,6 +932,16 @@ int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv) qca_nl80211_check_dfs_capa(drv); qca_nl80211_get_features(drv); + /* + * To enable offchannel simultaneous support in wpa_supplicant, the + * underlying driver needs to support the same along with offchannel TX. + * Offchannel TX support is needed since remain_on_channel and + * action_tx use some common data structures and hence cannot be + * scheduled simultaneously. + */ + if (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX)) + drv->capa.flags &= ~WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS; + return 0; } -- cgit v1.2.3