uwb: order IEs by element ID
ECMA-368 requires that IEs in a beacon must be sorted by element ID. Most hardware uses the ordering in the Set IE URC command so get the ordering right on the host. Also refactor the IE management code: - use uwb_ie_next() instead of uwb_ie_for_each(). - remove unnecessary functions. - API is now only uwb_rc_ie_add() and uwb_rc_ie_rm(). Signed-off-by: David Vrabel <david.vrabel@csr.com>
This commit is contained in:
parent
4d2bea4ca0
commit
1cde7f68ce
6 changed files with 169 additions and 375 deletions
|
|
@ -468,28 +468,3 @@ void uwb_rc_put(struct uwb_rc *rc)
|
|||
__uwb_rc_put(rc);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(uwb_rc_put);
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
ssize_t uwb_rc_print_IEs(struct uwb_rc *uwb_rc, char *buf, size_t size)
|
||||
{
|
||||
ssize_t result;
|
||||
struct uwb_rc_evt_get_ie *ie_info;
|
||||
struct uwb_buf_ctx ctx;
|
||||
|
||||
result = uwb_rc_get_ie(uwb_rc, &ie_info);
|
||||
if (result < 0)
|
||||
goto error_get_ie;
|
||||
ctx.buf = buf;
|
||||
ctx.size = size;
|
||||
ctx.bytes = 0;
|
||||
uwb_ie_for_each(&uwb_rc->uwb_dev, uwb_ie_dump_hex, &ctx,
|
||||
ie_info->IEData, result - sizeof(*ie_info));
|
||||
result = ctx.bytes;
|
||||
kfree(ie_info);
|
||||
error_get_ie:
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue