All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] band: introduce new method of tracking frequencies
@ 2022-12-13 20:36 James Prestwood
  2022-12-13 20:36 ` [PATCH 2/7] util: add scan_freq_set_remove James Prestwood
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: James Prestwood @ 2022-12-13 20:36 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

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 uint16_t array where
each index corresponds to a channel, and the value will contain
various flags for that frequency.
---
 src/band.c | 2 ++
 src/band.h | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/src/band.c b/src/band.c
index 01166b62..82ffc13e 100644
--- a/src/band.c
+++ b/src/band.c
@@ -36,6 +36,8 @@ void band_free(struct band *band)
 	if (band->he_capabilities)
 		l_queue_destroy(band->he_capabilities, l_free);
 
+	l_free(band->frequencies);
+
 	l_free(band);
 }
 
diff --git a/src/band.h b/src/band.h
index 9b307a77..06a8402a 100644
--- a/src/band.h
+++ b/src/band.h
@@ -55,8 +55,16 @@ struct band_he_capabilities {
 	uint8_t he_mcs_set[12];
 };
 
+enum band_freq_attribute {
+	BAND_FREQ_ATTR_SUPPORTED =	1 << 0,
+	BAND_FREQ_ATTR_DISABLED =	1 << 1,
+	BAND_FREQ_ATTR_NO_IR =		1 << 2,
+};
+
 struct band {
 	enum band_freq freq;
+	uint16_t *frequencies;
+	size_t freqs_len;
 	/* Each entry is type struct band_he_capabilities */
 	struct l_queue *he_capabilities;
 	uint8_t vht_mcs_set[8];
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-14 22:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-13 20:36 [PATCH 1/7] band: introduce new method of tracking frequencies James Prestwood
2022-12-13 20:36 ` [PATCH 2/7] util: add scan_freq_set_remove James Prestwood
2022-12-14 21:37   ` Denis Kenzior
2022-12-13 20:36 ` [PATCH 3/7] wiphy: parse/store frequency info in band object James Prestwood
2022-12-14 22:11   ` Denis Kenzior
2022-12-13 20:36 ` [PATCH 4/7] wiphy: add wiphy_check_{frequency,band} James Prestwood
2022-12-13 20:36 ` [PATCH 5/7] station: use wiphy_check_{frequency,band} James Prestwood
2022-12-13 20:36 ` [PATCH 6/7] ap: " James Prestwood
2022-12-13 20:36 ` [PATCH 7/7] wiphy: remove disabled_freqs and related dump code James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.