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

band: introduce new method of tracking frequencies

Currently the wiphy object keeps track of supported and disabled
frequencies as two separate scan_freq_set's. This is very expensive
and limiting since we have to add more sets in order to track
additional frequency flags (no-IR, no-HT, no-HE etc).

Instead we can refactor how frequencies are stored. They will now
be part of the band object and stored as a list of flag structures
where each index corresponds to a channel
This commit is contained in:
James Prestwood 2022-12-16 13:27:34 -08:00 committed by Denis Kenzior
parent 428f1914ef
commit fce6234fbf
2 changed files with 10 additions and 0 deletions

View File

@ -36,6 +36,8 @@ void band_free(struct band *band)
if (band->he_capabilities) if (band->he_capabilities)
l_queue_destroy(band->he_capabilities, l_free); l_queue_destroy(band->he_capabilities, l_free);
l_free(band->freq_attrs);
l_free(band); l_free(band);
} }

View File

@ -55,8 +55,16 @@ struct band_he_capabilities {
uint8_t he_mcs_set[12]; uint8_t he_mcs_set[12];
}; };
struct band_freq_attrs {
bool supported : 1;
bool disabled : 1;
bool no_ir : 1;
} __attribute__ ((packed));
struct band { struct band {
enum band_freq freq; enum band_freq freq;
struct band_freq_attrs *freq_attrs;
size_t freqs_len;
/* Each entry is type struct band_he_capabilities */ /* Each entry is type struct band_he_capabilities */
struct l_queue *he_capabilities; struct l_queue *he_capabilities;
uint8_t vht_mcs_set[8]; uint8_t vht_mcs_set[8];