scan: add scan_freq_set_isempty

This commit is contained in:
James Prestwood 2019-09-16 13:14:12 -07:00 committed by Denis Kenzior
parent 09d336dbdd
commit d9e6b2263f
2 changed files with 9 additions and 0 deletions

View File

@ -1809,6 +1809,14 @@ void scan_freq_set_merge(struct scan_freq_set *to,
to->channels_5ghz);
}
bool scan_freq_set_isempty(const struct scan_freq_set *set)
{
if (set->channels_2ghz == 0 && l_uintset_isempty(set->channels_5ghz))
return true;
return false;
}
struct channels_5ghz_foreach_data {
scan_freq_set_func_t func;
void *user_data;

View File

@ -137,6 +137,7 @@ void scan_freq_set_merge(struct scan_freq_set *to,
const struct scan_freq_set *from);
void scan_freq_set_constrain(struct scan_freq_set *set,
const struct scan_freq_set *constraint);
bool scan_freq_set_isempty(const struct scan_freq_set *set);
bool scan_wdev_add(uint64_t wdev_id);
bool scan_wdev_remove(uint64_t wdev_id);