Message ID | 20241024184338.186018-1-prestwoj@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | unit: add test with list of known unsupported frequencies | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-alpine-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-gitlint | success | GitLint |
prestwoj/iwd-ci-fetch | success | Fetch PR |
prestwoj/iwd-alpine-ci-setupell | success | Prep - Setup ELL |
prestwoj/iwd-ci-setupell | success | Prep - Setup ELL |
prestwoj/iwd-ci-incremental_build | success | Incremental build not run PASS |
prestwoj/iwd-alpine-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-alpine-ci-incremental_build | success | Incremental build not run PASS |
prestwoj/iwd-ci-build | success | Build - Configure |
prestwoj/iwd-alpine-ci-build | success | Build - Configure |
prestwoj/iwd-alpine-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-alpine-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-ci-clang | success | clang PASS |
prestwoj/iwd-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-ci-testrunner | success | test-runner PASS |
Hi James, On 10/24/24 1:43 PM, James Prestwood wrote: > These frequencies were seen being advertised by a driver and IWD has > no operating class/channel mapping for them. Specifically 5960 was > causing issues due to a few bugs and mapping to channel 2 of the 6ghz > band. Those bugs have now been resolved. > > If these frequencies can be supported in a clean manor we can remove > this test, but until then ensure IWD does not parse them. > --- > unit/test-band.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > Applied, thanks. Regards, -Denis
diff --git a/unit/test-band.c b/unit/test-band.c index 606bb854..edf1e02e 100644 --- a/unit/test-band.c +++ b/unit/test-band.c @@ -683,6 +683,26 @@ static void test_conversion_fallback(const void *data) assert(band == BAND_FREQ_5_GHZ); } +static void test_unsupported_freqs(const void *data) +{ + /* + * These are frequencies that were seen advertised by some drivers + * but that don't match any global operating classes IWD has. They may + * be valid, but IWD should not parse them correctly without added + * support in band.c. + */ + uint32_t unsupported[] = { + 5920, 5940, 5960, 5980, 6000, 6020, 6040, 6060, 6080, + }; + unsigned int i; + + for (i = 0; i < L_ARRAY_SIZE(unsupported); i++) { + uint8_t channel = band_freq_to_channel(unsupported[i], NULL); + + assert(!channel); + } +} + int main(int argc, char *argv[]) { l_test_init(&argc, &argv); @@ -750,6 +770,7 @@ int main(int argc, char *argv[]) l_test_add("/band/conversions", test_conversions, NULL); l_test_add("/band/conversion fallback", test_conversion_fallback, NULL); + l_test_add("/band/unsupported freqs", test_unsupported_freqs, NULL); return l_test_run(); }