nl80211: Add driver capability flag for CAN_REPLACE_PTK0

The CAN_REPLACE_PTK0 flag provided by nl80211 can be used to detect if
the card/driver is explicitly indicating capability to rekey STA PTK
keys using only keyid 0 correctly.

Check if the card/driver supports it and make the status available as a
driver flag.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
This commit is contained in:
Alexander Wetzel 2020-01-04 23:10:00 +01:00 committed by Jouni Malinen
parent 7b26238d46
commit 35da7c20ac
2 changed files with 6 additions and 0 deletions

View file

@ -1838,6 +1838,8 @@ struct wpa_driver_capa {
#define WPA_DRIVER_FLAGS_VLAN_OFFLOAD 0x0800000000000000ULL
/** Driver supports UPDATE_FT_IES command */
#define WPA_DRIVER_FLAGS_UPDATE_FT_IES 0x1000000000000000ULL
/** Driver can correctly rekey PTKs without Extended Key ID */
#define WPA_DRIVER_FLAGS_SAFE_PTK0_REKEYS 0x2000000000000000ULL
u64 flags;
#define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \

View file

@ -445,6 +445,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
if (ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_VLAN_OFFLOAD))
capa->flags |= WPA_DRIVER_FLAGS_VLAN_OFFLOAD;
if (ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_CAN_REPLACE_PTK0))
capa->flags |= WPA_DRIVER_FLAGS_SAFE_PTK0_REKEYS;
}