From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v3 1/8] band: introduce new method of tracking frequencies
Date: Fri, 16 Dec 2022 13:27:34 -0800 [thread overview]
Message-ID: <20221216212741.1833286-1-prestwoj@gmail.com> (raw)
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
---
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..d89b2a90 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->freq_attrs);
+
l_free(band);
}
diff --git a/src/band.h b/src/band.h
index 9b307a77..da4c0ae5 100644
--- a/src/band.h
+++ b/src/band.h
@@ -55,8 +55,16 @@ struct band_he_capabilities {
uint8_t he_mcs_set[12];
};
+struct band_freq_attrs {
+ bool supported : 1;
+ bool disabled : 1;
+ bool no_ir : 1;
+} __attribute__ ((packed));
+
struct band {
enum band_freq freq;
+ struct band_freq_attrs *freq_attrs;
+ 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
next reply other threads:[~2022-12-16 21:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 21:27 James Prestwood [this message]
2022-12-16 21:27 ` [PATCH v3 2/8] wiphy: parse/store frequency info in band object James Prestwood
2022-12-16 21:27 ` [PATCH v3 3/8] wiphy: remove pending_freqs from wiphy_regdom_is_updating James Prestwood
2022-12-16 21:27 ` [PATCH v3 4/8] wiphy: don't parse dumps from unregistered wiphy's James Prestwood
2022-12-16 21:27 ` [PATCH v3 5/8] wiphy: add getter for frequency/band info James Prestwood
2022-12-16 21:27 ` [PATCH v3 6/8] station: use wiphy_get_frequency_info James Prestwood
2022-12-16 21:27 ` [PATCH v3 7/8] ap: " James Prestwood
2022-12-16 21:27 ` [PATCH v3 8/8] wiphy: remove disabled_freqs and related dump code James Prestwood
2022-12-16 22:37 ` [PATCH v3 1/8] band: introduce new method of tracking frequencies Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221216212741.1833286-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox