scan: Helper function to get ML IE of specified type from scan result IEs

Add a helper function to get Multi-Link element of a specified type from
scan result Probe Response frame or Beacon frame elements.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
This commit is contained in:
Shivani Baranwal 2022-09-08 20:14:13 +05:30 committed by Jouni Malinen
parent e211286140
commit 9a8bd7be0f
2 changed files with 13 additions and 0 deletions

View file

@ -1947,6 +1947,18 @@ const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie)
}
const u8 * wpa_scan_get_ml_ie(const struct wpa_scan_res *res, u8 type)
{
size_t ie_len = res->ie_len;
/* Use the Beacon frame IEs if res->ie_len is not available */
if (!ie_len)
ie_len = res->beacon_ie_len;
return get_ml_ie((const u8 *) (res + 1), ie_len, type);
}
/**
* wpa_scan_get_vendor_ie - Fetch vendor information element from a scan result
* @res: Scan result entry

View file

@ -51,6 +51,7 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s,
struct scan_info *info, int new_scan);
int wpa_supplicant_update_scan_results(struct wpa_supplicant *wpa_s);
const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie);
const u8 * wpa_scan_get_ml_ie(const struct wpa_scan_res *res, u8 type);
const u8 * wpa_scan_get_vendor_ie(const struct wpa_scan_res *res,
u32 vendor_type);
const u8 * wpa_scan_get_vendor_ie_beacon(const struct wpa_scan_res *res,