mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-02-14 17:51:51 +00:00
dawn: fix typos
This commit is contained in:
parent
a25bb91f37
commit
5709b96a4d
7 changed files with 14 additions and 14 deletions
|
@ -41,7 +41,7 @@ I setup the OpenWRT Router as dumb APs.
|
|||
|chan_util_val | '140' |Threshold for an good channel utilization.|
|
||||
|max_chan_util_val | '170' |Threshold for a bad channel utilization.|
|
||||
|min_probe_count | '2' |Minimum number of probe requests aftrer calculating if AP is best and sending a probe response.|
|
||||
|bandwith_threshold | '6' |Threshold for the receiving bit rate indicating if a client is in an active transmission.|
|
||||
|bandwidth_threshold | '6' |Threshold for the receiving bit rate indicating if a client is in an active transmission.|
|
||||
|use_station_count | '1' |Use station count as metric.|
|
||||
|max_station_diff | '1' |Maximal station difference that is allowed.|
|
||||
|eval_probe_req | '1' |Evaluate the incoming probe requests.|
|
||||
|
|
|
@ -51,7 +51,7 @@ struct probe_metric_s {
|
|||
int chan_util_val;
|
||||
int max_chan_util_val;
|
||||
int min_probe_count;
|
||||
int bandwith_threshold;
|
||||
int bandwidth_threshold;
|
||||
int use_station_count;
|
||||
int max_station_diff;
|
||||
int eval_probe_req;
|
||||
|
|
|
@ -25,8 +25,8 @@ void daemon_shutdown() {
|
|||
uci_clear();
|
||||
uloop_cancelled = true;
|
||||
|
||||
// free ressources
|
||||
fprintf(stdout, "Freeing mutex ressources\n");
|
||||
// free resources
|
||||
fprintf(stdout, "Freeing mutex resources\n");
|
||||
pthread_mutex_destroy(&probe_array_mutex);
|
||||
pthread_mutex_destroy(&client_array_mutex);
|
||||
pthread_mutex_destroy(&ap_array_mutex);
|
||||
|
|
|
@ -403,7 +403,7 @@ int kick_client(struct client_s client_entry) {
|
|||
void kick_clients(uint8_t bssid[], uint32_t id) {
|
||||
pthread_mutex_lock(&client_array_mutex);
|
||||
pthread_mutex_lock(&probe_array_mutex);
|
||||
printf("-------- KICKING CLIENS!!!---------\n");
|
||||
printf("-------- KICKING CLIENTS!!!---------\n");
|
||||
char mac_buf_ap[20];
|
||||
sprintf(mac_buf_ap, MACSTR, MAC2STR(bssid));
|
||||
printf("EVAL %s\n", mac_buf_ap);
|
||||
|
@ -427,7 +427,7 @@ void kick_clients(uint8_t bssid[], uint32_t id) {
|
|||
int rssi = get_rssi_iwinfo(client_array[j].client_addr);
|
||||
int exp_thr = get_expected_throughput_iwinfo(client_array[j].client_addr);
|
||||
double exp_thr_tmp = iee80211_calculate_expected_throughput_mbit(exp_thr);
|
||||
printf("Expectd throughput %f Mbit/sec\n", exp_thr_tmp);
|
||||
printf("Expected throughput %f Mbit/sec\n", exp_thr_tmp);
|
||||
|
||||
if (rssi != INT_MIN) {
|
||||
pthread_mutex_unlock(&probe_array_mutex);
|
||||
|
@ -465,7 +465,7 @@ void kick_clients(uint8_t bssid[], uint32_t id) {
|
|||
// only use rx_rate for indicating if transmission is going on
|
||||
// <= 6MBits <- probably no transmission
|
||||
// tx_rate has always some weird value so don't use ist
|
||||
if (rx_rate > dawn_metric.bandwith_threshold) {
|
||||
if (rx_rate > dawn_metric.bandwidth_threshold) {
|
||||
printf("Client is probably in active transmisison. Don't kick! RxRate is: %f\n", rx_rate);
|
||||
continue;
|
||||
}
|
||||
|
@ -961,7 +961,7 @@ void denied_req_array_cb(struct uloop_timeout *t) {
|
|||
|
||||
// client is not connected for a given time threshold!
|
||||
if (!is_connected_somehwere(denied_req_array[i].client_addr)) {
|
||||
printf("Client has propaly a bad driver!\n");
|
||||
printf("Client has probably a bad driver!\n");
|
||||
|
||||
// problem that somehow station will land into this list
|
||||
// maybe delete again?
|
||||
|
|
|
@ -87,7 +87,7 @@ int get_bandwidth_iwinfo(uint8_t *client_addr, float *rx_rate, float *tx_rate) {
|
|||
struct dirent *entry;
|
||||
dirp = opendir(hostapd_dir_glob); // error handling?
|
||||
if (!dirp) {
|
||||
fprintf(stderr, "[BANDWITH INFO] Failed to open %s\n", hostapd_dir_glob);
|
||||
fprintf(stderr, "[BANDWIDTH INFO] Failed to open %s\n", hostapd_dir_glob);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ struct probe_metric_s uci_get_dawn_metric() {
|
|||
ret.min_probe_count = uci_lookup_option_int(uci_ctx, s, "min_probe_count");
|
||||
ret.low_rssi = uci_lookup_option_int(uci_ctx, s, "low_rssi");
|
||||
ret.low_rssi_val = uci_lookup_option_int(uci_ctx, s, "low_rssi_val");
|
||||
ret.bandwith_threshold = uci_lookup_option_int(uci_ctx, s, "bandwith_threshold");
|
||||
ret.bandwidth_threshold = uci_lookup_option_int(uci_ctx, s, "bandwidth_threshold");
|
||||
ret.use_station_count = uci_lookup_option_int(uci_ctx, s, "use_station_count");
|
||||
ret.eval_probe_req = uci_lookup_option_int(uci_ctx, s, "eval_probe_req");
|
||||
ret.eval_auth_req = uci_lookup_option_int(uci_ctx, s, "eval_auth_req");
|
||||
|
|
|
@ -1374,7 +1374,7 @@ int uci_send_via_network()
|
|||
blobmsg_add_u32(&b, "chan_util_val", dawn_metric.chan_util_val);
|
||||
blobmsg_add_u32(&b, "max_chan_util_val", dawn_metric.max_chan_util_val);
|
||||
blobmsg_add_u32(&b, "min_probe_count", dawn_metric.min_probe_count);
|
||||
blobmsg_add_u32(&b, "bandwith_threshold", dawn_metric.bandwith_threshold);
|
||||
blobmsg_add_u32(&b, "bandwidth_threshold", dawn_metric.bandwidth_threshold);
|
||||
blobmsg_add_u32(&b, "use_station_count", dawn_metric.use_station_count);
|
||||
blobmsg_add_u32(&b, "max_station_diff", dawn_metric.max_station_diff);
|
||||
blobmsg_add_u32(&b, "eval_probe_req", dawn_metric.eval_probe_req);
|
||||
|
@ -1424,7 +1424,7 @@ enum {
|
|||
UCI_CHAN_UTIL_VAL,
|
||||
UCI_MAX_CHAN_UTIL_VAL,
|
||||
UCI_MIN_PROBE_COUNT,
|
||||
UCI_BANDWITH_THRESHOLD,
|
||||
UCI_BANDWIDTH_THRESHOLD,
|
||||
UCI_USE_STATION_COUNT,
|
||||
UCI_MAX_STATION_DIFF,
|
||||
UCI_EVAL_PROBE_REQ,
|
||||
|
@ -1471,7 +1471,7 @@ static const struct blobmsg_policy uci_metric_policy[__UCI_METIC_MAX] = {
|
|||
[UCI_CHAN_UTIL_VAL] = {.name = "chan_util_val", .type = BLOBMSG_TYPE_INT32},
|
||||
[UCI_MAX_CHAN_UTIL_VAL] = {.name = "max_chan_util_val", .type = BLOBMSG_TYPE_INT32},
|
||||
[UCI_MIN_PROBE_COUNT] = {.name = "min_probe_count", .type = BLOBMSG_TYPE_INT32},
|
||||
[UCI_BANDWITH_THRESHOLD] = {.name = "bandwith_threshold", .type = BLOBMSG_TYPE_INT32},
|
||||
[UCI_BANDWIDTH_THRESHOLD] = {.name = "bandwidth_threshold", .type = BLOBMSG_TYPE_INT32},
|
||||
[UCI_USE_STATION_COUNT] = {.name = "use_station_count", .type = BLOBMSG_TYPE_INT32},
|
||||
[UCI_MAX_STATION_DIFF] = {.name = "max_station_diff", .type = BLOBMSG_TYPE_INT32},
|
||||
[UCI_EVAL_PROBE_REQ] = {.name = "eval_probe_req", .type = BLOBMSG_TYPE_INT32},
|
||||
|
@ -1548,7 +1548,7 @@ int handle_uci_config(struct blob_attr *msg) {
|
|||
sprintf(cmd_buffer, "dawn.@metric[0].min_probe_count=%d", blobmsg_get_u32(tb_metric[UCI_MIN_PROBE_COUNT]));
|
||||
uci_set_network(cmd_buffer);
|
||||
|
||||
sprintf(cmd_buffer, "dawn.@metric[0].bandwith_threshold=%d", blobmsg_get_u32(tb_metric[UCI_BANDWITH_THRESHOLD]));
|
||||
sprintf(cmd_buffer, "dawn.@metric[0].bandwidth_threshold=%d", blobmsg_get_u32(tb_metric[UCI_BANDWIDTH_THRESHOLD]));
|
||||
uci_set_network(cmd_buffer);
|
||||
|
||||
sprintf(cmd_buffer, "dawn.@metric[0].use_station_count=%d", blobmsg_get_u32(tb_metric[UCI_USE_STATION_COUNT]));
|
||||
|
|
Loading…
Reference in a new issue