commit 77a6b498037263f76b592af77749f53b3cf5f9b6
parent 65eeab1313ff6df2662689ff1ce172b26872b0dc
Author: James Prestwood <james.prestwood@linux.intel.com>
Date: Fri, 14 Jun 2019 10:06:35 -0700
wiphy: parse OFFCHANNEL_TX_OK attribute
The wiphy can indicate if it supports sending offchannel frames. This
allows us to bail out of a Hotspot connection early if this is not
supported.
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/wiphy.c b/src/wiphy.c
@@ -74,6 +74,7 @@ struct wiphy {
bool support_adhoc_rsn:1;
bool soft_rfkill : 1;
bool hard_rfkill : 1;
+ bool offchannel_tx_ok : 1;
};
static struct l_queue *wiphy_list = NULL;
@@ -331,6 +332,11 @@ bool wiphy_supports_adhoc_rsn(struct wiphy *wiphy)
return wiphy->support_adhoc_rsn;
}
+bool wiphy_can_offchannel_tx(struct wiphy *wiphy)
+{
+ return wiphy->offchannel_tx_ok;
+}
+
const char *wiphy_get_driver(struct wiphy *wiphy)
{
return wiphy->driver_str;
@@ -613,6 +619,9 @@ static void wiphy_parse_attributes(struct wiphy *wiphy,
if (l_genl_attr_recurse(attr, &nested))
parse_supported_iftypes(wiphy, &nested);
break;
+ case NL80211_ATTR_OFFCHANNEL_TX_OK:
+ wiphy->offchannel_tx_ok = true;
+ break;
}
}
}
diff --git a/src/wiphy.h b/src/wiphy.h
@@ -67,6 +67,7 @@ bool wiphy_has_ext_feature(struct wiphy *wiphy, uint32_t feature);
uint8_t wiphy_get_max_num_ssids_per_scan(struct wiphy *wiphy);
bool wiphy_supports_iftype(struct wiphy *wiphy, uint32_t iftype);
bool wiphy_supports_adhoc_rsn(struct wiphy *wiphy);
+bool wiphy_can_offchannel_tx(struct wiphy *wiphy);
const char *wiphy_get_driver(struct wiphy *wiphy);
uint32_t wiphy_state_watch_add(struct wiphy *wiphy,