OSDN Git Service

adapter/hal: Implement adapter disable call
authorSzymon Janc <szymon.janc@tieto.com>
Tue, 22 Oct 2013 13:24:57 +0000 (15:24 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 22 Oct 2013 13:58:21 +0000 (16:58 +0300)
android/hal-bluetooth.c

index d5019a4..efc5962 100644 (file)
@@ -115,12 +115,19 @@ static int enable(void)
 
 static int disable(void)
 {
+       int ret;
+
        DBG("");
 
        if (!interface_ready())
                return BT_STATUS_NOT_READY;
 
-       return BT_STATUS_UNSUPPORTED;
+       ret = hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_MSG_OP_BT_DISABLE, 0, NULL,
+                                                               0, NULL, NULL);
+       if (ret < 0)
+               return -ret;
+
+       return BT_STATUS_SUCCESS;
 }
 
 static void cleanup(void)