From: Peng Xu Date: Thu, 18 Oct 2018 18:17:05 +0000 (-0700) Subject: nl80211: Add support for self-managed regulatory device X-Git-Tag: hostap_2_7~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aa4d5521c9e515ab1f1b47f9dcccfba89f93f28;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 22a37cc40..d34c6794f 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -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) \ diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index a51b50de4..c751713e7 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -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; }