diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-12-08 14:55:33 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-12-08 15:02:41 -0500 |
commit | 53b834d2333aec1e60fcbfadfddd4ad472329570 (patch) | |
tree | 4226799dc2cd531f231fffa033c8964b237d672f /include/net | |
parent | c6d1649050aa7da42f9c0901dc7fa3971254648f (diff) |
Bluetooth: Use macros for connectionless slave broadcast features
Add the LMP feature constants for connectionless slave broadcast
and use them for capability testing.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/hci.h | 6 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 1784c48699f0..cc2da73055fa 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -275,6 +275,12 @@ enum { | |||
275 | #define LMP_EXTFEATURES 0x80 | 275 | #define LMP_EXTFEATURES 0x80 |
276 | 276 | ||
277 | /* Extended LMP features */ | 277 | /* Extended LMP features */ |
278 | #define LMP_CSB_MASTER 0x01 | ||
279 | #define LMP_CSB_SLAVE 0x02 | ||
280 | #define LMP_SYNC_TRAIN 0x04 | ||
281 | #define LMP_SYNC_SCAN 0x08 | ||
282 | |||
283 | /* Host features */ | ||
278 | #define LMP_HOST_SSP 0x01 | 284 | #define LMP_HOST_SSP 0x01 |
279 | #define LMP_HOST_LE 0x02 | 285 | #define LMP_HOST_LE 0x02 |
280 | #define LMP_HOST_LE_BREDR 0x04 | 286 | #define LMP_HOST_LE_BREDR 0x04 |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index f8555ad7b104..b796161fb04e 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -798,6 +798,12 @@ void hci_conn_del_sysfs(struct hci_conn *conn); | |||
798 | #define lmp_transp_capable(dev) ((dev)->features[0][2] & LMP_TRANSPARENT) | 798 | #define lmp_transp_capable(dev) ((dev)->features[0][2] & LMP_TRANSPARENT) |
799 | 799 | ||
800 | /* ----- Extended LMP capabilities ----- */ | 800 | /* ----- Extended LMP capabilities ----- */ |
801 | #define lmp_csb_master_capable(dev) ((dev)->features[2][0] & LMP_CSB_MASTER) | ||
802 | #define lmp_csb_slave_capable(dev) ((dev)->features[2][0] & LMP_CSB_SLAVE) | ||
803 | #define lmp_sync_train_capable(dev) ((dev)->features[2][0] & LMP_SYNC_TRAIN) | ||
804 | #define lmp_sync_scan_capable(dev) ((dev)->features[2][0] & LMP_SYNC_SCAN) | ||
805 | |||
806 | /* ----- Host capabilities ----- */ | ||
801 | #define lmp_host_ssp_capable(dev) ((dev)->features[1][0] & LMP_HOST_SSP) | 807 | #define lmp_host_ssp_capable(dev) ((dev)->features[1][0] & LMP_HOST_SSP) |
802 | #define lmp_host_le_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE)) | 808 | #define lmp_host_le_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE)) |
803 | #define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR)) | 809 | #define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR)) |