commit 6f2fbe32f9e6ea4e48d4905af78dadc21beed415
parent 59697ead344e8b8d0cf3bb400f6666192bd5a028
Author: Denis Kenzior <denkenz@gmail.com>
Date: Tue, 7 Aug 2018 11:15:23 -0500
wiphy: Add wiphy_supports_adhoc_rsn
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/wiphy.c b/src/wiphy.c
@@ -58,6 +58,7 @@ struct wiphy {
uint8_t max_num_ssids_per_scan;
bool support_scheduled_scan:1;
bool support_rekey_offload:1;
+ bool support_adhoc_rsn:1;
uint16_t supported_ciphers;
struct scan_freq_set *supported_freqs;
char *model_str;
@@ -201,6 +202,11 @@ uint8_t wiphy_get_max_num_ssids_per_scan(struct wiphy *wiphy)
return wiphy->max_num_ssids_per_scan;
}
+bool wiphy_supports_adhoc_rsn(struct wiphy *wiphy)
+{
+ return wiphy->support_adhoc_rsn;
+}
+
static void wiphy_print_basic_info(struct wiphy *wiphy)
{
uint32_t bands;
@@ -388,6 +394,9 @@ static void wiphy_parse_attributes(struct wiphy *wiphy,
wiphy->max_num_ssids_per_scan =
*((uint8_t *) data);
break;
+ case NL80211_ATTR_SUPPORT_IBSS_RSN:
+ wiphy->support_adhoc_rsn = true;
+ break;
}
}
diff --git a/src/wiphy.h b/src/wiphy.h
@@ -38,6 +38,8 @@ bool wiphy_has_feature(struct wiphy *wiphy, uint32_t feature);
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_adhoc_rsn(struct wiphy *wiphy);
+
bool wiphy_init(struct l_genl_family *in, const char *whitelist,
const char *blacklist);
bool wiphy_exit(void);