OSDN Git Service

ADV flag is missing LE discoverable flag
authorMudumba Ananth <ananthm@broadcom.com>
Fri, 4 Jul 2014 09:46:05 +0000 (02:46 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 30 Jul 2014 23:51:56 +0000 (16:51 -0700)
ADV flag is missing LE discoverable flag when setting device in
general discoverable mode. Device discovery mode is masked off
by a wrong flag that cause the problem. Use the correct discoverable
mask will solve this problem.

Bug: 16560957
Change-Id: Ic11d1497d38dedfea6feeaa84f36aed90590939c

stack/btm/btm_inq.c

index e5d2cdf..6e7ad87 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- *  Copyright (C) 1999-2012 Broadcom Corporation
+ *  Copyright (C) 1999-2014 Broadcom Corporation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -191,7 +191,7 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
                             == BTM_SUCCESS)
         {
             btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_BLE_DISCOVERABLE_MASK);
-            btm_cb.btm_inq_vars.discoverable_mode |= (inq_mode & BTM_BLE_CONNECTABLE_MASK);
+            btm_cb.btm_inq_vars.discoverable_mode |= (inq_mode & BTM_BLE_DISCOVERABLE_MASK);
         }
     }
     inq_mode &= ~BTM_BLE_DISCOVERABLE_MASK;