mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Merge pull request #15 from berlin-open-wireless-lab/feature/add_more_chan_util_val
Feature/add more chan util val
This commit is contained in:
commit
8653bc3fcc
4 changed files with 26 additions and 4 deletions
|
@ -12,7 +12,7 @@ config settings hostapd
|
|||
option hostapd_dir '/var/run/hostapd'
|
||||
|
||||
config settings times
|
||||
option update_client '10'
|
||||
option update_client '50'
|
||||
option remove_client '120'
|
||||
option remove_probe '120'
|
||||
option remove_ap '460'
|
||||
|
@ -27,8 +27,10 @@ config settings metric
|
|||
option low_rssi '-500'
|
||||
option freq '100'
|
||||
option chan_util '50'
|
||||
option max_chan_util '150'
|
||||
option max_chan_util '-50'
|
||||
option rssi_val '-60'
|
||||
option low_rssi_val '-80'
|
||||
option chan_util_val '140'
|
||||
option max_chan_util_val '170'
|
||||
option min_probe_count '2'
|
||||
option bandwith_threshold '6'
|
||||
|
|
|
@ -29,6 +29,8 @@ struct probe_metric_s {
|
|||
int max_chan_util;
|
||||
int rssi_val;
|
||||
int low_rssi_val;
|
||||
int chan_util_val;
|
||||
int max_chan_util_val;
|
||||
int min_probe_count;
|
||||
int bandwith_threshold;
|
||||
};
|
||||
|
|
|
@ -75,7 +75,8 @@ int eval_probe_metric(struct probe_entry_s probe_entry) {
|
|||
score += !probe_entry.ht_support && !ap_entry.ht ? dawn_metric.no_ht_support : 0;
|
||||
score += probe_entry.vht_support && ap_entry.vht ? dawn_metric.vht_support : 0;
|
||||
score += !probe_entry.vht_support && !ap_entry.vht ? dawn_metric.no_vht_support : 0;
|
||||
score += ap_entry.channel_utilization <= dawn_metric.max_chan_util ? dawn_metric.chan_util : 0;
|
||||
score += ap_entry.channel_utilization <= dawn_metric.chan_util_val ? dawn_metric.chan_util : 0;
|
||||
score += ap_entry.channel_utilization > dawn_metric.max_chan_util_val ? dawn_metric.max_chan_util : 0;
|
||||
}
|
||||
|
||||
score += (probe_entry.freq > 5000) ? dawn_metric.freq : 0;
|
||||
|
@ -189,7 +190,7 @@ void kick_clients(uint8_t bssid[], uint32_t id) {
|
|||
}
|
||||
printf("Client is probably NOT in active transmisison. KICK! RxRate is: %f\n", rx_rate);
|
||||
|
||||
del_client_interface(id, client_array[j].client_addr, 5, 1, 60000);
|
||||
del_client_interface(id, client_array[j].client_addr, 5, 1, 1000);
|
||||
client_array_delete(client_array[j]);
|
||||
|
||||
// don't delete clients in a row. use update function again...
|
||||
|
|
|
@ -158,6 +158,23 @@ struct probe_metric_s uci_get_dawn_metric() {
|
|||
if (ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.max_chan_util = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_chan_util_val[] = "dawn.metric.chan_util_val";
|
||||
if (uci_lookup_ptr(c, &ptr, tmp_chan_util_val, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
}
|
||||
if (ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.chan_util_val = atoi(ptr.o->v.string);
|
||||
|
||||
|
||||
char tmp_max_chan_util_val[] = "dawn.metric.max_chan_util_val";
|
||||
if (uci_lookup_ptr(c, &ptr, tmp_max_chan_util_val, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
}
|
||||
if (ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.max_chan_util_val = atoi(ptr.o->v.string);
|
||||
|
||||
|
||||
printf("Try to load min_probe_count\n");
|
||||
char tmp_min_probe_count[] = "dawn.metric.min_probe_count";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue