3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-20 19:12:33 +01:00

unit: Update to handle WFA Extension recursion

This commit is contained in:
Denis Kenzior 2015-07-15 14:44:52 -05:00
parent ad08dfad33
commit 89dd69e160

View File

@ -55,6 +55,7 @@ static const unsigned char wsc_attrs1[] = {
static void wsc_test_iter_sanity_check(const void *data)
{
struct wsc_attr_iter iter;
struct wsc_wfa_ext_iter wfa_iter;
unsigned short len;
enum wsc_attr type;
@ -125,6 +126,18 @@ static void wsc_test_iter_sanity_check(const void *data)
assert(wsc_attr_iter_get_type(&iter) == WSC_ATTR_VENDOR_EXTENSION);
assert(wsc_attr_iter_get_length(&iter) == 14);
assert(wsc_attr_iter_recurse_wfa_ext(&iter, &wfa_iter));
assert(wsc_wfa_ext_iter_next(&wfa_iter));
assert(wsc_wfa_ext_iter_get_type(&wfa_iter) ==
WSC_WFA_EXTENSION_VERSION2);
assert(wsc_wfa_ext_iter_get_length(&wfa_iter) == 1);
assert(wsc_wfa_ext_iter_next(&wfa_iter));
assert(wsc_wfa_ext_iter_get_type(&wfa_iter) ==
WSC_WFA_EXTENSION_AUTHORIZED_MACS);
assert(wsc_wfa_ext_iter_get_length(&wfa_iter) == 6);
assert(!wsc_attr_iter_next(&iter));
}