diff mbox series

[v2,3/4] band: return -ENETUNREACH for HE rate estimation

Message ID 20240415192948.65857-3-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [v2,1/4] wiphy: include MAC of BSS with invalid HE capabilities | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood April 15, 2024, 7:29 p.m. UTC
This was overlooked in a prior patch and causes warnings to be
printed when the RSSI is too low to estimate an HE data rate or
due to incompatible local capabilities (e.g. MCS support).

Similar to the other estimations, return -ENETUNREACH if the IE
was valid but incompatible.
---
 src/band.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2:
 * Remove the -ENOTSUP return and keep -ENETUNREACH
diff mbox series

Patch

diff --git a/src/band.c b/src/band.c
index 11cd965e..906d6197 100644
--- a/src/band.c
+++ b/src/band.c
@@ -678,7 +678,7 @@  int band_estimate_he_rx_rate(const struct band *band, const uint8_t *hec,
 	}
 
 	if (!rate)
-		return -EBADMSG;
+		return -ENETUNREACH;
 
 	*out_data_rate = rate;