From 9eac017ec453d5b0a4c0207973d6a4ac024e6e39 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 10 Jun 2015 13:05:58 -0500 Subject: [PATCH] scan: Parse [extended] supported rates ie --- src/scan.c | 8 ++++++++ src/scan.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/scan.c b/src/scan.c index 1230f8ff..3d525403 100644 --- a/src/scan.c +++ b/src/scan.c @@ -236,6 +236,13 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss, bss->ssid_len = iter.len; have_ssid = true; break; + case IE_TYPE_SUPPORTED_RATES: + case IE_TYPE_EXTENDED_SUPPORTED_RATES: + if (ie_parse_supported_rates(&iter, + &bss->supported_rates) < 0) + l_warn("Unable to parse [Extended] " + "Supported Rates IE"); + break; case IE_TYPE_RSN: if (!bss->rsne) bss->rsne = l_memdup(iter.data - 2, @@ -420,6 +427,7 @@ void scan_bss_compute_rank(struct scan_bss *bss) void scan_bss_free(struct scan_bss *bss) { + l_uintset_free(bss->supported_rates); l_free(bss->rsne); l_free(bss->wpa); l_free(bss); diff --git a/src/scan.h b/src/scan.h index f33a8822..d237b822 100644 --- a/src/scan.h +++ b/src/scan.h @@ -40,6 +40,7 @@ struct scan_bss { uint8_t *wpa; uint8_t ssid[32]; uint8_t ssid_len; + struct l_uintset *supported_rates; uint8_t utilization; uint16_t rank; };