3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-14 16:09:24 +01:00

ie: Add RSNE parser that works on raw data

This commit is contained in:
Denis Kenzior 2015-01-15 17:33:08 -06:00
parent 2d8f1cca0b
commit 2be20e6644
2 changed files with 18 additions and 0 deletions

View File

@ -422,3 +422,19 @@ done:
return 0;
}
int ie_parse_rsne_from_data(const uint8_t *data, size_t len,
struct ie_rsn_info *info)
{
struct ie_tlv_iter iter;
ie_tlv_iter_init(&iter, data, len);
if (!ie_tlv_iter_next(&iter))
return -EMSGSIZE;
if (ie_tlv_iter_get_tag(&iter) != IE_TYPE_RSN)
return -EPROTOTYPE;
return ie_parse_rsne(&iter, info);
}

View File

@ -239,3 +239,5 @@ void ie_tlv_builder_finalize(struct ie_tlv_builder *builder,
unsigned int *out_len);
int ie_parse_rsne(struct ie_tlv_iter *iter, struct ie_rsn_info *info);
int ie_parse_rsne_from_data(const uint8_t *data, size_t len,
struct ie_rsn_info *info);