scan: Parse the Country String IE

and save to struct scan_bss
This commit is contained in:
Andrew Zaborowski 2016-10-28 05:59:54 +02:00 committed by Denis Kenzior
parent 1720edfc0e
commit b29f333bb4
2 changed files with 12 additions and 0 deletions

View File

@ -600,6 +600,16 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss,
bss->cap_rm_neighbor_report =
(iter.data[0] & IE_RM_CAP_NEIGHBOR_REPORT) > 0;
break;
case IE_TYPE_COUNTRY:
if (bss->cc_present || iter.len < 6)
break;
bss->cc[0] = iter.data[0];
bss->cc[1] = iter.data[1];
bss->cc[2] = iter.data[2];
bss->cc_present = true;
break;
}
}

View File

@ -57,9 +57,11 @@ struct scan_bss {
uint8_t ssid_len;
struct l_uintset *supported_rates;
uint8_t utilization;
uint8_t cc[3];
uint16_t rank;
bool sha256:1;
bool mde_present : 1;
bool cc_present : 1;
bool cap_rm_neighbor_report : 1;
};