misc fixes for building on linux

Change-Id: Ie2b7dd900efde197d11d20d0104b5a800e9e10ac
Reviewed-on: https://chromium-review.googlesource.com/428554
Commit-Ready: Dmitry Grinberg <dmitrygr@google.com>
Tested-by: Dmitry Grinberg <dmitrygr@google.com>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
diff --git a/Makefile b/Makefile
index ce43d7f..58c8e85 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,8 @@
     timer.o                 \
     uniq.o                  \
     vendorLib.o             \
+    uuid.o                  \
+    gatt-builtin.o          \
     workQueue.o
 
 OBJ +=                      \
diff --git a/README b/README
new file mode 100644
index 0000000..7181924
--- /dev/null
+++ b/README
@@ -0,0 +1,17 @@
+Architecture:
+
+Mostly see BT Core spec and this presentation: https://docs.google.com/presentation/d/16ItWGEZnAHpuGMPhUtLRrohxa0LlKd3GC1TUDBfHXak/edit#slide=id.p
+
+Abbreviation: (more will be added as questions arise)
+SM - Security Manager
+SG - a type of buffer (see presentation)
+MT - MultiThreading helpers
+
+
+Tests: TBD
+
+Coding style:
+Linux kernel
+
+Format of commit message:
+Linux kernel
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..873d483
--- /dev/null
+++ b/VERSION
@@ -0,0 +1,2 @@
+0
+#monotonically increasing as features change or bugs are fixed. See git log for features in each
diff --git a/hci_int.h b/hci_int.h
index 96c9e4e..a066d18 100644
--- a/hci_int.h
+++ b/hci_int.h
@@ -2416,7 +2416,7 @@
     uint16_t conn;
 } __packed;
 
-#define HCI_CMD_LE_Remote_Conn_Param_Request_Negative_Reply      0x0020 /* complete */
+#define HCI_CMD_LE_Remote_Conn_Param_Request_Negative_Reply      0x0021 /* complete */
 struct hciRemoteConnParamRequestNegativeReply {
     uint16_t conn;
     uint8_t reason;
diff --git a/multiNotif.c b/multiNotif.c
index 584acc0..4a1a188 100644
--- a/multiNotif.c
+++ b/multiNotif.c
@@ -41,7 +41,7 @@
         goto out_mutex_1;
     }
 
-    if (pthread_mutex_init(&nl->structLock, NULL)) {
+    if (pthread_mutex_init(&nl->bcastLock, NULL)) {
         loge("failed to init notif list bcast mutex\n");
         goto out_mutex_2;
     }
@@ -112,11 +112,11 @@
 {
     struct multiNotifItem *notifTodo, *notifDone = NULL, *t, *iter;
 
-    pthread_mutex_lock(&nl->structLock);
-
     /* assure only one broadcast at a time */
     pthread_mutex_lock(&nl->bcastLock);
 
+    pthread_mutex_lock(&nl->structLock);
+
     /* grab all items */
     notifTodo = nl->items;
     nl->items = NULL;