On May 16, 2013, at 7:34 PM, Frédéric Dalleau <frederic.dalleau@xxxxxxxxxxxxxxx> wrote: > This patchs define constants and macro for extracting SCO airmode from SCO > voice setting. It refers to Bluetooth Core V4.0 specification, Part E, Chap > 6.12 which describe SCO voice setting format. > > Signed-off-by: Frédéric Dalleau <frederic.dalleau@xxxxxxxxxxxxxxx> > --- > include/net/bluetooth/hci_core.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h > index e9cf9fa..a6fd544 100644 > --- a/include/net/bluetooth/hci_core.h > +++ b/include/net/bluetooth/hci_core.h > @@ -1214,4 +1214,9 @@ void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], > > u8 bdaddr_to_le(u8 bdaddr_type); > > +#define SCO_AIRMODE_MASK 0x0003 > +#define SCO_AIRMODE_CVSD 0x0000 > +#define SCO_AIRMODE_TRANSP 0x0003 > +#define hci_sco_airmode(setting) ((setting) & SCO_AIRMODE_MASK) the constants are fine, but I would not bother with the macro. Just use SCO_AIRMODE_MASK directly. Regards Marcel -- 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