Allow non-PCS 6 GHz channels to be excluded from ACS

Add support to exclude non-PSC 6 GHz channels from the input frequency
list to ACS. The new acs_exclude_6ghz_non_psc=1 parameter can be used by
6 GHz only APs.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Ankita Bajaj 2019-11-26 11:19:32 +05:30 committed by Jouni Malinen
parent 59bb72642a
commit da8570f4c9
6 changed files with 35 additions and 0 deletions

View file

@ -2069,6 +2069,26 @@ int is_6ghz_op_class(u8 op_class)
}
int is_6ghz_psc_frequency(int freq)
{
int i;
if (!is_6ghz_freq(freq))
return 0;
if ((((freq - 5940) / 5) & 0x3) != 0x1)
return 0;
i = (freq - 5940 + 55) % 80;
if (i == 0)
i = (freq - 5940 + 55) / 80;
if (i >= 1 && i <= 15)
return 1;
return 0;
}
int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep,
size_t nei_rep_len)
{

View file

@ -226,6 +226,7 @@ int oper_class_bw_to_int(const struct oper_class_map *map);
int center_idx_to_bw_6ghz(u8 idx);
int is_6ghz_freq(int freq);
int is_6ghz_op_class(u8 op_class);
int is_6ghz_psc_frequency(int freq);
int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep,
size_t nei_rep_len);