3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

wiphy: Add wiphy_get_max_roc_duration

Add a function to retrieve the maximum Remain On Channel listen duration
supported by the wiphy's driver.
This commit is contained in:
Andrew Zaborowski 2019-10-21 15:55:09 +02:00 committed by Denis Kenzior
parent a1189d64b1
commit cd47834d6c
2 changed files with 13 additions and 0 deletions

View File

@ -66,6 +66,7 @@ struct wiphy {
uint32_t feature_flags;
uint8_t ext_features[(NUM_NL80211_EXT_FEATURES + 7) / 8];
uint8_t max_num_ssids_per_scan;
uint32_t max_roc_duration;
uint16_t supported_iftypes;
uint16_t supported_ciphers;
struct scan_freq_set *supported_freqs;
@ -355,6 +356,11 @@ uint8_t wiphy_get_max_num_ssids_per_scan(struct wiphy *wiphy)
return wiphy->max_num_ssids_per_scan;
}
uint32_t wiphy_get_max_roc_duration(struct wiphy *wiphy)
{
return wiphy->max_roc_duration;
}
bool wiphy_supports_adhoc_rsn(struct wiphy *wiphy)
{
return wiphy->support_adhoc_rsn;
@ -769,6 +775,12 @@ static void wiphy_parse_attributes(struct wiphy *wiphy,
parse_iftype_extended_capabilities(wiphy, &nested);
break;
case NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION:
if (len != 4)
l_warn("Invalid MAX_ROC_DURATION attribute");
else
wiphy->max_roc_duration = *((uint32_t *) data);
break;
}
}
}

View File

@ -64,6 +64,7 @@ bool wiphy_rrm_capable(struct wiphy *wiphy);
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);
uint32_t wiphy_get_max_roc_duration(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);