]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add support for self-managed regulatory device
authorPeng Xu <pxu@codeaurora.org>
Thu, 18 Oct 2018 18:17:05 +0000 (11:17 -0700)
committerJouni Malinen <jouni@codeaurora.org>
Wed, 24 Oct 2018 15:34:31 +0000 (18:34 +0300)
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>
src/drivers/driver.h
src/drivers/driver_nl80211_capa.c

index 22a37cc40b69591e705bd93c54c3de57e623cf76..d34c6794f56676e7dcaae64e0daeee832dbb9a57 100644 (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) \
index a51b50de40a4b96a54f4d30379343f4c582fd461..c751713e78eedc704430c6001daa8e4f37b48c85 100644 (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;
 }