From 2a46ab3042c3af1cd34001df820aa19a52cc2970 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 15 Mar 2021 10:29:30 -0700 Subject: [PATCH] wiphy: parse NL80211_ATTR_ROAM_SUPPORT flag This tells us if the hardware is going to automatically roam. We need this to know if station roaming logic should be disabled. --- src/wiphy.c | 9 +++++++++ src/wiphy.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/wiphy.c b/src/wiphy.c index 4aa3d502..82e3ca87 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -96,6 +96,7 @@ struct wiphy { bool support_adhoc_rsn:1; bool support_qos_set_map:1; bool support_cmds_auth_assoc:1; + bool support_fw_roam:1; bool soft_rfkill : 1; bool hard_rfkill : 1; bool offchannel_tx_ok : 1; @@ -462,6 +463,11 @@ bool wiphy_supports_qos_set_map(struct wiphy *wiphy) return wiphy->support_qos_set_map; } +bool wiphy_supports_firmware_roam(struct wiphy *wiphy) +{ + return wiphy->support_fw_roam; +} + const char *wiphy_get_driver(struct wiphy *wiphy) { return wiphy->driver_str; @@ -990,6 +996,9 @@ static void wiphy_parse_attributes(struct wiphy *wiphy, else wiphy->max_roc_duration = *((uint32_t *) data); break; + case NL80211_ATTR_ROAM_SUPPORT: + wiphy->support_fw_roam = true; + break; } } } diff --git a/src/wiphy.h b/src/wiphy.h index 50c8c936..1fd71f0d 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -92,6 +92,7 @@ const uint8_t *wiphy_get_supported_rates(struct wiphy *wiphy, unsigned int band, bool wiphy_supports_adhoc_rsn(struct wiphy *wiphy); bool wiphy_can_offchannel_tx(struct wiphy *wiphy); bool wiphy_supports_qos_set_map(struct wiphy *wiphy); +bool wiphy_supports_firmware_roam(struct wiphy *wiphy); const char *wiphy_get_driver(struct wiphy *wiphy); const char *wiphy_get_name(struct wiphy *wiphy); const uint8_t *wiphy_get_permanent_address(struct wiphy *wiphy);