mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix score
This commit is contained in:
parent
5a3d431fdf
commit
bd5a2cdc4d
2 changed files with 10 additions and 5 deletions
|
@ -44,9 +44,10 @@ int eval_probe_metric(struct probe_entry_s probe_entry) {
|
||||||
|
|
||||||
// check if ap entry is available
|
// check if ap entry is available
|
||||||
if(mac_is_equal(ap_entry.bssid_addr, probe_entry.bssid_addr)) {
|
if(mac_is_equal(ap_entry.bssid_addr, probe_entry.bssid_addr)) {
|
||||||
score += probe_entry.ht_support ? dawn_metric.vht_support : 0;
|
//score += probe_entry.ht_support ? dawn_metric.ht_support : 0;
|
||||||
score += !probe_entry.ht_support && ap_entry.ht ? dawn_metric.n_ht_support : 0;
|
//score += !probe_entry.ht_support && !ap_entry.ht ? dawn_metric.n_ht_support : 0;
|
||||||
score += !probe_entry.vht_support && ap_entry.vht ? dawn_metric.n_vht_support : 0;
|
//score += probe_entry.vht_support ? dawn_metric.vht_support : 0;
|
||||||
|
//score += !probe_entry.vht_support && !ap_entry.vht ? dawn_metric.n_vht_support : 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// maybe don't score vht and ht if no ap is available
|
// maybe don't score vht and ht if no ap is available
|
||||||
|
@ -55,6 +56,10 @@ int eval_probe_metric(struct probe_entry_s probe_entry) {
|
||||||
//score += probe_entry.vht_support ? dawn_metric.ht_support : dawn_metric.n_ht_support;
|
//score += probe_entry.vht_support ? dawn_metric.ht_support : dawn_metric.n_ht_support;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
score += probe_entry.ht_support ? dawn_metric.ht_support : 0;
|
||||||
|
//score += !probe_entry.ht_support && !ap_entry.ht ? dawn_metric.n_ht_support : 0;
|
||||||
|
score += probe_entry.vht_support ? dawn_metric.vht_support : 0;
|
||||||
|
|
||||||
score += (probe_entry.freq > 5000) ? dawn_metric.freq : 0;
|
score += (probe_entry.freq > 5000) ? dawn_metric.freq : 0;
|
||||||
score += (probe_entry.signal > -60) ? dawn_metric.rssi : 0;
|
score += (probe_entry.signal > -60) ? dawn_metric.rssi : 0;
|
||||||
|
|
||||||
|
@ -132,7 +137,7 @@ void kick_clients(uint8_t bssid[], uint32_t id) {
|
||||||
printf("KICKING CLIENT!!!!!!!!!!!!!\n");
|
printf("KICKING CLIENT!!!!!!!!!!!!!\n");
|
||||||
del_client_interface(id, client_array[j].client_addr, 5, 1, 60000);
|
del_client_interface(id, client_array[j].client_addr, 5, 1, 60000);
|
||||||
} else {
|
} else {
|
||||||
//printf("STAAAY CLIENT!!!!!!!!!!!!!\n");
|
printf("STAAAY CLIENT!!!!!!!!!!!!!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ static int handle_probe_req(struct blob_attr *msg) {
|
||||||
|
|
||||||
//printf("[WC] Hostapd-Probe: %s : %s\n", "probe", str);
|
//printf("[WC] Hostapd-Probe: %s : %s\n", "probe", str);
|
||||||
|
|
||||||
//print_array();
|
print_array();
|
||||||
|
|
||||||
// deny access
|
// deny access
|
||||||
if (!decide_function(&tmp_probe)) {
|
if (!decide_function(&tmp_probe)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue