mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix get_ap function
This commit is contained in:
parent
4020584bf3
commit
8a3216f942
1 changed files with 5 additions and 6 deletions
|
@ -44,9 +44,9 @@ int eval_probe_metric(struct probe_entry_s probe_entry) {
|
|||
|
||||
// check if ap entry is available
|
||||
if(mac_is_equal(ap_entry.bssid_addr, probe_entry.bssid_addr)) {
|
||||
//score += probe_entry.ht_support ? dawn_metric.ht_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.vht_support ? dawn_metric.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 {
|
||||
|
@ -54,7 +54,6 @@ int eval_probe_metric(struct probe_entry_s probe_entry) {
|
|||
char mac_buf_ap[20];
|
||||
sprintf(mac_buf_probe, "%x:%x:%x:%x:%x:%x", MAC2STR(probe_entry.bssid_addr));
|
||||
sprintf(mac_buf_ap, "%x:%x:%x:%x:%x:%x", MAC2STR(ap_entry.bssid_addr));
|
||||
|
||||
printf("\nNOOOOOOOOOOOOOOOOOO AP!!! AP: %s, Probe: %s\n", mac_buf_ap, mac_buf_probe);
|
||||
print_probe_entry(probe_entry);
|
||||
// maybe don't score vht and ht if no ap is available
|
||||
|
@ -63,9 +62,9 @@ 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.ht_support ? dawn_metric.ht_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.vht_support ? dawn_metric.vht_support : 0;
|
||||
//score += probe_entry.vht_support ? dawn_metric.vht_support : 0;
|
||||
|
||||
score += (probe_entry.freq > 5000) ? dawn_metric.freq : 0;
|
||||
score += (probe_entry.signal > -60) ? dawn_metric.rssi : 0;
|
||||
|
@ -390,7 +389,7 @@ ap ap_array_get_ap(uint8_t bssid_addr[]) {
|
|||
int i;
|
||||
|
||||
for (i = 0; i <= ap_entry_last; i++) {
|
||||
if (mac_is_equal(bssid_addr, ap_array[i].bssid_addr) || mac_is_greater(bssid_addr, ap_array[i].bssid_addr)) {
|
||||
if (mac_is_equal(bssid_addr, ap_array[i].bssid_addr) || mac_is_greater(ap_array[i].bssid_addr, bssid_addr )) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue