mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
wsc: Add wsc_uuid_from_addr
This commit is contained in:
parent
e055460709
commit
c37e700921
@ -1107,3 +1107,14 @@ done:
|
||||
ret = wsc_attr_builder_free(builder, false, out_len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool wsc_uuid_from_addr(const uint8_t addr[], uint8_t *out_uuid)
|
||||
{
|
||||
/* Reuse the NSID from WPA Supplicant for compatibility */
|
||||
static const uint8_t nsid[] = {
|
||||
0x52, 0x64, 0x80, 0xf8, 0xc9, 0x9b, 0x4b, 0xe5,
|
||||
0xa6, 0x55, 0x58, 0xed, 0x5f, 0x5d, 0x60, 0x84,
|
||||
};
|
||||
|
||||
return l_uuid_v5(nsid, addr, 6, out_uuid);
|
||||
}
|
||||
|
@ -389,3 +389,5 @@ int wsc_parse_probe_request(const unsigned char *pdu, unsigned int len,
|
||||
|
||||
uint8_t *wsc_build_probe_request(const struct wsc_probe_request *probe_request,
|
||||
size_t *out_len);
|
||||
|
||||
bool wsc_uuid_from_addr(const uint8_t addr[], uint8_t *out_uuid);
|
||||
|
Loading…
Reference in New Issue
Block a user