summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2021-03-19 22:10:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-03-19 22:10:33 +0000
commit157000483e84f29726fbb25c9ecb1818c0e53409 (patch)
tree85d1c17b39de7e14db0f7a12cf81156a227e634a
parent62b0336ba4b2b7439c6f44ef602f2d3d0d6b8820 (diff)
parenta0662b0c1022dca6d72faa4afb18dddb0b84b8cd (diff)
downloadlibhardware-157000483e84f29726fbb25c9ecb1818c0e53409.tar.gz
Merge "Update oob data struct" am: f2c4a568cc am: a0662b0c10
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1636699 Change-Id: I589fdd3ed84c0221059a8c87cae1eae217aeb594
-rw-r--r--OWNERS2
-rw-r--r--include/hardware/bluetooth.h33
2 files changed, 21 insertions, 14 deletions
diff --git a/OWNERS b/OWNERS
index da2454a9..b6b18dac 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,4 +1,4 @@
-eisenbach@google.com
+zachoverflow@google.com
elaurent@google.com
jpawlowski@google.com
malchev@google.com
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h
index 3fe6aa86..afa0eef7 100644
--- a/include/hardware/bluetooth.h
+++ b/include/hardware/bluetooth.h
@@ -258,19 +258,25 @@ typedef struct
void *val;
} bt_property_t;
-/** Bluetooth Out Of Band data for bonding */
-typedef struct
-{
- uint8_t le_bt_dev_addr[7]; /* LE Bluetooth Device Address */
- uint8_t c192[16]; /* Simple Pairing Hash C-192 */
- uint8_t r192[16]; /* Simple Pairing Randomizer R-192 */
- uint8_t c256[16]; /* Simple Pairing Hash C-256 */
- uint8_t r256[16]; /* Simple Pairing Randomizer R-256 */
- uint8_t sm_tk[16]; /* Security Manager TK Value */
- uint8_t le_sc_c[16]; /* LE Secure Connections Confirmation Value */
- uint8_t le_sc_r[16]; /* LE Secure Connections Random Value */
-} bt_out_of_band_data_t;
+/** Represents the actual Out of Band data itself */
+typedef struct {
+ // Both
+ uint8_t address[7]; /* Bluetooth Device Address (6) plus Address Type (1) */
+ uint8_t c[16]; /* Simple Pairing Hash C-192/256 (Classic or LE) */
+ uint8_t r[16]; /* Simple Pairing Randomizer R-192/256 (Classic or LE) */
+ uint8_t device_name[256]; /* Name of the device */
+
+ // Classic
+ uint8_t oob_data_length[2]; /* Classic only data Length. Value includes this
+ in length */
+ uint8_t class_of_device[2]; /* Class of Device (Classic or LE) */
+ // LE
+ uint8_t le_device_role; /* Supported and preferred role of device */
+ uint8_t sm_tk[16]; /* Security Manager TK Value (LE Only) */
+ uint8_t le_flags; /* LE Flags for discoverability and features */
+ uint8_t le_appearance[2]; /* For the appearance of the device */
+} bt_oob_data_t;
/** Bluetooth Device Type */
@@ -508,7 +514,8 @@ typedef struct {
/** Create Bluetooth Bond using out of band data */
int (*create_bond_out_of_band)(const RawAddress *bd_addr, int transport,
- const bt_out_of_band_data_t *oob_data);
+ const bt_oob_data_t *p192_data,
+ const bt_oob_data_t *p256_data);
/** Remove Bond */
int (*remove_bond)(const RawAddress *bd_addr);