From 2f2b5740da5c3ecbafc3fb8fffd94ba8439630c8 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 28 Mar 2024 07:26:21 -0700 Subject: [PATCH] band: make HE/no-HT rate estimators return more descriptive If the IEs were not provided return -ENOTSUP rather than -EINVAL or -EBADMSG since this just means the AP doesn't support those capabilities. --- src/band.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/band.c b/src/band.c index bf40f789..11cd965e 100644 --- a/src/band.c +++ b/src/band.c @@ -90,7 +90,7 @@ int band_estimate_nonht_rate(const struct band *band, int i; if (!supported_rates && !ext_supported_rates) - return -EINVAL; + return -ENOTSUP; /* * Start at the back of the array. Rates are generally given in @@ -607,7 +607,7 @@ int band_estimate_he_rx_rate(const struct band *band, const uint8_t *hec, uint8_t width_set; if (!hec || !band->he_capabilities) - return -EBADMSG; + return -ENOTSUP; for (entry = l_queue_get_entries(band->he_capabilities); entry; entry = entry->next) {