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

band: add BAND_FREQ_6_GHZ

This is a new band defined in the WiFi 6E (ax) amendment. A completely
new value is needed due to channel reuse between 2.4/5 and 6GHz.

util.c needed minimal updating to prevent compile errors which will
be fixed later to actually handle this band. WSC also needed a case
added for 6GHz but the spec does not outline any RF Band value for
6GHz so the 5GHz value will be returned in this case.
This commit is contained in:
James Prestwood 2022-02-25 09:58:02 -08:00 committed by Denis Kenzior
parent 417b6fd022
commit ff6961fbc4
4 changed files with 8 additions and 1 deletions

View File

@ -1092,10 +1092,11 @@ static const uint8_t oper_class_jp_to_global[] = {
/* 128 - 130 is a 1 to 1 mapping */
};
/* Annex E, table E-4 (only 2.4GHz and 4.9 / 5GHz bands) */
/* Annex E, table E-4 (only 2.4GHz, 4.9 / 5GHz, and 6GHz bands) */
static const enum band_freq oper_class_to_band_global[] = {
[81 ... 84] = BAND_FREQ_2_4_GHZ,
[104 ... 130] = BAND_FREQ_5_GHZ,
[131 ... 136] = BAND_FREQ_6_GHZ,
};
/* Annex E, table E-5 */

View File

@ -39,6 +39,7 @@ enum band_chandef_width {
enum band_freq {
BAND_FREQ_2_4_GHZ = 0x1,
BAND_FREQ_5_GHZ = 0x2,
BAND_FREQ_6_GHZ = 0x4,
};
struct band_chandef {

View File

@ -347,6 +347,8 @@ bool scan_freq_set_add(struct scan_freq_set *freqs, uint32_t freq)
return true;
case BAND_FREQ_5_GHZ:
return l_uintset_put(freqs->channels_5ghz, channel);
case BAND_FREQ_6_GHZ:
return false;
}
return false;
@ -366,6 +368,8 @@ bool scan_freq_set_contains(const struct scan_freq_set *freqs, uint32_t freq)
return freqs->channels_2ghz & (1 << (channel - 1));
case BAND_FREQ_5_GHZ:
return l_uintset_contains(freqs->channels_5ghz, channel);
case BAND_FREQ_6_GHZ:
return false;
}
return false;

View File

@ -308,6 +308,7 @@ static inline enum wsc_rf_band freq_to_rf_band(uint32_t freq)
case BAND_FREQ_2_4_GHZ:
return WSC_RF_BAND_2_4_GHZ;
case BAND_FREQ_5_GHZ:
case BAND_FREQ_6_GHZ:
return WSC_RF_BAND_5_0_GHZ;
}