nl80211: Add support for self-managed regulatory device

Add a flag indicating if the device has the self-managed regulatory
support. Set the flag if NL80211_ATTR_WIPHY_SELF_MANAGED_REG attribute
is set when reading wiphy info.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Peng Xu 2018-10-18 11:17:05 -07:00 committed by Jouni Malinen
parent ac1f591567
commit 8aa4d5521c
2 changed files with 5 additions and 0 deletions

View file

@ -1577,6 +1577,8 @@ struct wpa_driver_capa {
#define WPA_DRIVER_FLAGS_OCE_STA_CFON 0x0020000000000000ULL
/** Driver supports MFP-optional in the connect command */
#define WPA_DRIVER_FLAGS_MFP_OPTIONAL 0x0040000000000000ULL
/** Driver is a self-managed regulatory device */
#define WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY 0x0080000000000000ULL
u64 flags;
#define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \

View file

@ -818,6 +818,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
capa->max_csa_counters =
nla_get_u8(tb[NL80211_ATTR_MAX_CSA_COUNTERS]);
if (tb[NL80211_ATTR_WIPHY_SELF_MANAGED_REG])
capa->flags |= WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY;
return NL_SKIP;
}