nl80211: Extract driver offchannel simultaneous capability

Make the driver offchannel simultaneous capability available to
wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Kanchanapally, Vidyullatha 2015-09-22 16:19:02 +05:30 committed by Jouni Malinen
parent 94fb165c3a
commit 8e5097456a
2 changed files with 16 additions and 0 deletions

View file

@ -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

View file

@ -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;
}