This commit is contained in:
Carsten Schuette 2023-09-08 17:02:23 +00:00 committed by GitHub
commit 0defe4c1ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -562,15 +562,17 @@ int kick_clients(struct dawn_mac bssid_mac, uint32_t id) {
} }
else else
{ {
if (dawn_metric.bandwidth_threshold != 0)
{
// only use rx_rate for indicating if transmission is going on // only use rx_rate for indicating if transmission is going on
// <= 6MBits <- probably no transmission // <= 6MBits <- probably no transmission
// tx_rate has always some weird value so don't use ist // tx_rate has always some weird value so don't use ist
if (have_bandwidth_iwinfo && dawn_metric.bandwidth_threshold != 0 && rx_rate > dawn_metric.bandwidth_threshold) { if (have_bandwidth_iwinfo && rx_rate > dawn_metric.bandwidth_threshold) {
dawnlog_info("Client " MACSTR ": Don't kick due to active data transfer: RX rate %f exceeds %d limit\n", MAC2STR(j->client_addr.u8), rx_rate, dawn_metric.bandwidth_threshold); dawnlog_info("Client " MACSTR ": Don't kick due to active data transfer: RX rate %f exceeds %d limit\n", MAC2STR(j->client_addr.u8), rx_rate, dawn_metric.bandwidth_threshold);
} }
else else
{ {
if (have_bandwidth_iwinfo && dawn_metric.bandwidth_threshold != 0) if (have_bandwidth_iwinfo)
dawnlog_always("Client " MACSTR ": Kicking due to low active data transfer: RX rate %f below %d limit\n", MAC2STR(j->client_addr.u8), rx_rate, dawn_metric.bandwidth_threshold); dawnlog_always("Client " MACSTR ": Kicking due to low active data transfer: RX rate %f below %d limit\n", MAC2STR(j->client_addr.u8), rx_rate, dawn_metric.bandwidth_threshold);
else else
dawnlog_always("Client " MACSTR ": Kicking as no active transmission data for client, and / or limit of %d is OK.\n", dawnlog_always("Client " MACSTR ": Kicking as no active transmission data for client, and / or limit of %d is OK.\n",
@ -612,6 +614,7 @@ int kick_clients(struct dawn_mac bssid_mac, uint32_t id) {
kicked_clients++; kicked_clients++;
} }
}
} }
} }
} }