aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/uwb.h
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-10-27 12:48:09 -0400
committerDavid Vrabel <david.vrabel@csr.com>2008-10-28 08:09:17 -0400
commit1cde7f68ced8d10a20dd2370e9d1d22ab3c1ea5c (patch)
tree2fb65bbb93eae73e02fa1e9608212536259f8802 /include/linux/uwb.h
parent4d2bea4ca0adb4cebfbf89d34869c74081c42577 (diff)
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>
Diffstat (limited to 'include/linux/uwb.h')
-rw-r--r--include/linux/uwb.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/include/linux/uwb.h b/include/linux/uwb.h
index 010ee708304d..6d93f54b8879 100644
--- a/include/linux/uwb.h
+++ b/include/linux/uwb.h
@@ -444,7 +444,6 @@ ssize_t uwb_rc_vcmd(struct uwb_rc *rc, const char *cmd_name,
444 struct uwb_rccb *cmd, size_t cmd_size, 444 struct uwb_rccb *cmd, size_t cmd_size,
445 u8 expected_type, u16 expected_event, 445 u8 expected_type, u16 expected_event,
446 struct uwb_rceb **preply); 446 struct uwb_rceb **preply);
447ssize_t uwb_rc_get_ie(struct uwb_rc *, struct uwb_rc_evt_get_ie **);
448int uwb_bg_joined(struct uwb_rc *rc); 447int uwb_bg_joined(struct uwb_rc *rc);
449 448
450size_t __uwb_addr_print(char *, size_t, const unsigned char *, int); 449size_t __uwb_addr_print(char *, size_t, const unsigned char *, int);
@@ -653,22 +652,9 @@ static inline int edc_inc(struct edc *err_hist, u16 max_err, u16 timeframe)
653 652
654/* Information Element handling */ 653/* Information Element handling */
655 654
656/* For representing the state of writing to a buffer when iterating */
657struct uwb_buf_ctx {
658 char *buf;
659 size_t bytes, size;
660};
661
662typedef int (*uwb_ie_f)(struct uwb_dev *, const struct uwb_ie_hdr *,
663 size_t, void *);
664struct uwb_ie_hdr *uwb_ie_next(void **ptr, size_t *len); 655struct uwb_ie_hdr *uwb_ie_next(void **ptr, size_t *len);
665ssize_t uwb_ie_for_each(struct uwb_dev *uwb_dev, uwb_ie_f fn, void *data, 656int uwb_rc_ie_add(struct uwb_rc *uwb_rc, const struct uwb_ie_hdr *ies, size_t size);
666 const void *buf, size_t size); 657int uwb_rc_ie_rm(struct uwb_rc *uwb_rc, enum uwb_ie element_id);
667int uwb_ie_dump_hex(struct uwb_dev *, const struct uwb_ie_hdr *,
668 size_t, void *);
669int uwb_rc_set_ie(struct uwb_rc *, struct uwb_rc_cmd_set_ie *);
670struct uwb_ie_hdr *uwb_ie_next(void **ptr, size_t *len);
671
672 658
673/* 659/*
674 * Transmission statistics 660 * Transmission statistics