nl80211: Support OCE features (driver capability and scan params)

Check if the device supports specific mandatory features and set the the
relevant WPA_DRIVER_FLAGS_OCE_STA flag. Send the relevant scan
parameters for OCE scans.

Signed-off-by: Roee Zamir <roee.zamir@intel.com>
This commit is contained in:
Roee Zamir 2018-08-26 20:45:01 +03:00 committed by Jouni Malinen
parent 938dd97a84
commit d6801b0545
2 changed files with 28 additions and 0 deletions

View file

@ -415,6 +415,19 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
if (ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_DFS_OFFLOAD))
capa->flags |= WPA_DRIVER_FLAGS_DFS_OFFLOAD;
#ifdef CONFIG_MBO
if (ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME) &&
ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP) &&
ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE) &&
ext_feature_isset(
ext_features, len,
NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION))
capa->flags |= WPA_DRIVER_FLAGS_OCE_STA;
#endif /* CONFIG_MBO */
}

View file

@ -282,6 +282,21 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
goto fail;
}
if (params->oce_scan) {
wpa_printf(MSG_DEBUG,
"nl80211: Add NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME");
wpa_printf(MSG_DEBUG,
"nl80211: Add NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP");
wpa_printf(MSG_DEBUG,
"nl80211: Add NL80211_SCAN_FLAG_OCE_PROBE_REQ_MIN_TX_RATE");
wpa_printf(MSG_DEBUG,
"nl80211: Add NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION");
scan_flags |= NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME |
NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP |
NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE |
NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION;
}
if (scan_flags &&
nla_put_u32(msg, NL80211_ATTR_SCAN_FLAGS, scan_flags))
goto fail;