eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 15c7379b4d95bbf594bf5402c227119ba707c7cd
parent 0e72ce886144dc1ef5b3b0bc90d0a837f82afbe0
Author: James Prestwood <prestwoj@gmail.com>
Date:   Thu,  8 Sep 2022 15:33:08 -0700

rrm: constrain scan frequency before scanning

The RRM module was blindly scanning using the requested
frequency which may or may not be possible given the hardware.
Instead check that the frequency will work and if not reject
the request.

This was reported by a user seeing the RRM scan fail which was
due to the AP requesting a scan on 5GHz when the adapter was
2.4GHz only.

Diffstat:
Msrc/rrm.c | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/rrm.c b/src/rrm.c @@ -443,6 +443,9 @@ static void rrm_handle_beacon_scan(struct rrm_state *rrm, freq = band_channel_to_freq(beacon->channel, band); scan_freq_set_add(freqs, freq); + if (!wiphy_constrain_freq_set(wiphy_find_by_wdev(rrm->wdev_id), freqs)) + goto free_freqs; + if (passive) beacon->scan_id = scan_passive_full(rrm->wdev_id, &params, rrm_scan_triggered, @@ -454,12 +457,13 @@ static void rrm_handle_beacon_scan(struct rrm_state *rrm, rrm_scan_results, rrm, NULL); +free_freqs: scan_freq_set_free(freqs); - if (beacon->scan_id == 0) { - rrm_info_destroy(&beacon->info); - rrm->pending = NULL; - } + if (beacon->scan_id) + return; + + rrm_reject_measurement_request(rrm, REPORT_REJECT_INCAPABLE); } static bool rrm_verify_beacon_request(const uint8_t *request, size_t len)