mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
wscutil: Add extractor for UUID_R
This commit is contained in:
parent
1c9e82001b
commit
d4c41103d9
@ -168,6 +168,15 @@ static bool extract_bool(struct wsc_attr_iter *iter, void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool extract_uuid(struct wsc_attr_iter *iter, void *data)
|
||||
{
|
||||
if (wsc_attr_iter_get_length(iter) != 16)
|
||||
return false;
|
||||
|
||||
memcpy(data, wsc_attr_iter_get_data(iter), 16);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool extract_ascii_string(struct wsc_attr_iter *iter, void *data,
|
||||
unsigned int max_len)
|
||||
{
|
||||
@ -442,15 +451,6 @@ static bool extract_version(struct wsc_attr_iter *iter, void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool extract_uuid(struct wsc_attr_iter *iter, void *data)
|
||||
{
|
||||
if (wsc_attr_iter_get_length(iter) != 16)
|
||||
return false;
|
||||
|
||||
memcpy(data, wsc_attr_iter_get_data(iter), 16);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool extract_wsc_state(struct wsc_attr_iter *iter, void *data)
|
||||
{
|
||||
uint8_t *out = data;
|
||||
@ -527,6 +527,8 @@ static attr_handler handler_for_type(enum wsc_attr type)
|
||||
return extract_wsc_state;
|
||||
case WSC_ATTR_UUID_E:
|
||||
return extract_uuid;
|
||||
case WSC_ATTR_UUID_R:
|
||||
return extract_uuid;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user