ubus: don't request measurement from unsupported STAs

Don't request measurements from STAs which do not support the specific
measurement mode. Otherwise, hostapd complains in the syslog about
unsupported measurement modes.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer
2021-10-25 21:49:05 +02:00
parent abc6fe047f
commit 5d5a0be202
3 changed files with 22 additions and 0 deletions

15
sta.c
View File

@@ -202,6 +202,21 @@ usteer_handle_sta_event(struct usteer_node *node, const uint8_t *addr,
return ret;
}
bool
usteer_sta_supports_beacon_measurement_mode(struct sta *sta, enum usteer_beacon_measurement_mode mode)
{
switch (mode) {
case BEACON_MEASUREMENT_PASSIVE:
return sta->rrm & (1 << 4);
case BEACON_MEASUREMENT_ACTIVE:
return sta->rrm & (1 << 5);
case BEACON_MEASUREMENT_TABLE:
return sta->rrm & (1 << 6);
}
return false;
}
static void __usteer_init usteer_sta_init(void)
{
usteer_timeout_init(&tq);