Hi Johan, On Wed, Jan 18, 2012 at 08:51:49PM +0200, Johan Hedberg wrote: > From: Johan Hedberg <johan.hedberg@xxxxxxxxx> > > There's no need to have a separate device class field since the same > information can be encoded into the EIR data. > > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx> > --- > include/net/bluetooth/hci_core.h | 11 +++++++++++ > include/net/bluetooth/mgmt.h | 1 - > net/bluetooth/mgmt.c | 20 +++++++++++++------- > 3 files changed, 24 insertions(+), 8 deletions(-) > > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h > index 393bb73..02aa0f9 100644 > --- a/include/net/bluetooth/hci_core.h > +++ b/include/net/bluetooth/hci_core.h > @@ -893,6 +893,17 @@ static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) > return false; > } > > +static inline u16 eir_append_data(u8 *eir, u16 eir_len, u8 type, u8 *data, > + u16 data_len) > +{ > + eir[eir_len++] = sizeof(type) + data_len; > + eir[eir_len++] = type; Would it be better to use struct eir_info/hdr and assign fields len and type? I saw already several places where this might improve readability and remove magic formulas (like "+ 2 - 1"). Best regards Andrei Emeltchenko -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html