1. 02 Mar, 2016 1 commit
    • Pavlin Radoslavov's avatar
      Fix l2cu_initialize_fixed_ccb() to return only initialized entries · 62778f6e
      Pavlin Radoslavov authored
      Update the l2cu_initialize_fixed_ccb() implementation so
      it returns only entries that are properly initialized.
      In some complex scenarios, the p_lcb->p_fixed_ccbs[] array
      might contain an entry that has been released by l2cu_release_ccb(),
      and such entry cannot be reused as-is.
      
      Bug: 26927945
      Change-Id: I42d42926cc6da6b8be662781545753c36b75968e
      62778f6e
  2. 01 Mar, 2016 1 commit
  3. 27 Feb, 2016 1 commit
    • Andre Eisenbach's avatar
      Ensure inquiry is always stopped before service discovery · 2ae9b0a2
      Andre Eisenbach authored
      Service discovery cannot be initiated when the dm search state machine
      is not in idle state. This patch ensures that service discovery is
      always cancelled regardless of the current state of inquiry.
      
      Bug: 27368986
      Change-Id: Ib83d4c8d389e50a1c65e52b343f4996455747836
      2ae9b0a2
  4. 26 Feb, 2016 1 commit
  5. 25 Feb, 2016 2 commits
    • Pavlin Radoslavov's avatar
      Fix a crash triggered when firmware config takes too long · 3329e8b9
      Pavlin Radoslavov authored
      Fix a crash condition that is triggered when the firmware
      configuration takes too long:
       1. The startup_timer expires, and it resets startup_future to NULL
       2. The delayed firmware_config_callback is received, and it
          tries to use the startup_future pointer (already set to NULL).
      
      [Cherry-pick from AOSP]
      
      Bug: 27336555
      Change-Id: I4b04ca08a32c947f6f1eaabec7c4b099f96aab59
      3329e8b9
    • Edward Savage-Jones's avatar
      Swapped memset params · d5cb2e56
      Edward Savage-Jones authored
      Incorrect usage of memset
      
      Bug: 27358983
      Change-Id: I7d96c560c4b462c2794b63eb66c7272b1280ba23
      d5cb2e56
  6. 24 Feb, 2016 8 commits
    • Ajay Panicker's avatar
      Protect metrics API from race conditions · d5608850
      Ajay Panicker authored
      Bug: 27315491
      Change-Id: If57f7c23c94890e5f1cf196d2ec7a2a667b48cec
      d5608850
    • Ajay Panicker's avatar
      Alarm Dump output cleanup · 25ddee0e
      Ajay Panicker authored
      Before:
        Alarm : btm_ble.adv_raddr_timer (SINGLE)
          Action counts (sched/resched/exec/cancel)       : 1 / 0 / 0 / 0
          Deviation counts (overdue/premature)            : 0 / 0
          Time in ms (since creation/interval/remaining)  : 17824 / 900000 / 882176
          Callback execution time in ms (total/max/ave)   : 0 / 0 / 0
          Overdue scheduling time in ms (total/max/ave)   : 0 / 0 / 0
          Premature scheduling time in ms (total/max/ave)   : 0 / 0 / 0
      
      After:
        Alarm : btm_ble.adv_raddr_timer (SINGLE)
          Action counts (sched/resched/exec/cancel       : 1 / 0 / 0 / 0
          Deviation counts (overdue/premature)           : 0 / 0
          Time in ms (since creation/interval/remaining) : 88268 / 900000 / 811732
          Callback execution time in ms (total/max/avg)  : 0 / 0 / 0
          Overdue scheduling time in ms (total/max/avg)  : 0 / 0 / 0
          Premature scheduling time in ms (total/max/avg): 0 / 0 / 0
      
      Bug: 27294154
      Change-Id: I0e318ef570a591626fbc6443feace1cc99c06baf
      25ddee0e
    • Ajay Panicker's avatar
      Clean A2DP dump output · 8efca14b
      Ajay Panicker authored
      Before:
        TxQueue:
          Counts (enqueue/dequeue/readbuf)                        : 0 / 0 / 0
          Last update time ago in ms (enqueue/dequeue/readbuf)    : 0 / 0 / 0
          Frames per packet (total/max/ave)                       : 0 / 0 / 0
          Counts (flushed/dropped/dropouts)                       : 0 / 0 / 0
          Last update time ago in ms (flushed/dropped)            : 0 / 0
          Counts (underflow/underrun)                             : 0 / 0
          Bytes (underflow/underrun)                              : 0 / 0
          Last update time ago in ms (underflow/underrun)         : 0 / 0
          Enqueue deviation counts (overdue/premature)            : 0 / 0
          Enqueue overdue scheduling time in ms (total/max/ave)   : 0 / 0 / 0
          Enqueue premature scheduling time in ms (total/max/ave) : 0 / 0 / 0
          Dequeue deviation counts (overdue/premature)            : 0 / 0
          Dequeue overdue scheduling time in ms (total/max/ave)   : 0 / 0 / 0
          Dequeue premature scheduling time in ms (total/max/ave) : 0 / 0 / 0
      
      After:  
        TxQueue:
        Counts (enqueue/dequeue/readbuf)                        : 0 / 0 / 0
        Last update time ago in ms (enqueue/dequeue/readbuf)    : 0 / 0 / 0
        Frames per packet (total/max/ave)                       : 0 / 0 / 0
        Counts (flushed/dropped/dropouts)                       : 0 / 0 / 0
        Last update time ago in ms (flushed/dropped)            : 0 / 0
        Counts (underflow/underrun)                             : 0 / 0
        Bytes (underflow/underrun)                              : 0 / 0
        Last update time ago in ms (underflow/underrun)         : 0 / 0
        Enqueue deviation counts (overdue/premature)            : 0 / 0
        Enqueue overdue scheduling time in ms (total/max/ave)   : 0 / 0 / 0
        Enqueue premature scheduling time in ms (total/max/ave) : 0 / 0 / 0
        Dequeue deviation counts (overdue/premature)            : 0 / 0
        Dequeue overdue scheduling time in ms (total/max/ave)   : 0 / 0 / 0
        Dequeue premature scheduling time in ms (total/max/ave) : 0 / 0 / 0
      
      Bug: 27294154
      Change-Id: I2952ceed7b02db0d8497b67de0f57e4f9128e5bf
      8efca14b
    • Ajay Panicker's avatar
      Remove extra newline before Btsnoop log summary · 5931d375
      Ajay Panicker authored
      Bug: 27294154
      Change-Id: Ice69835cdddfc01e2222a47b0ceeb30d243442f5
      5931d375
    • Ajay Panicker's avatar
      Clean up bond event dump printout · 7bde09fe
      Ajay Panicker authored
      Bug: 27294154
      Change-Id: I0b7e5a9dda30875c9fc877baffa0daac9184cd42
      7bde09fe
    • Jakub Pawlowski's avatar
      Make wakelock compile on Linux · f14c582c
      Jakub Pawlowski authored
      This patch adds some missing header files that prevented wakelocks
      from compiling on linux.
      
      Bug: 27324453
      Change-Id: Ifabf3350fe840524cf7e1ec7aa2825acb4399c81
      f14c582c
    • Jakub Pawlowski's avatar
      Add missing log tag in config_clear() · f2b7708e
      Jakub Pawlowski authored
      Bug: 27324453
      Change-Id: Icebf0273c39040ff6b1bb29dcc4d0a827e25b4a8
      f2b7708e
    • Jakub Pawlowski's avatar
      Get rid of counter · 01658a74
      Jakub Pawlowski authored
      This patch removes counter. We were never using those values,
      except for increasing them.
      
      Bug: 27324326
      Change-Id: I3122a36fa0435a36a8401792267cb5ebff5ab269
      01658a74
  7. 19 Feb, 2016 4 commits
  8. 18 Feb, 2016 22 commits
    • Ajay Panicker's avatar
      Write Protobuf in Base64 · e064f084
      Ajay Panicker authored
      Change-Id: I3868365e7fd166517b13ff03a15d629271bd47b4
      e064f084
    • Pavlin Radoslavov's avatar
      Fix ParcelHelpersTest.ScanResult unit test · 512fabd1
      Pavlin Radoslavov authored
      Fix a failing unit test that was broken by some
      earlier cleanup work.
      
      Bug: 26879229
      Bug: 27152031
      Change-Id: I244d078a23a69c82fbc7cb4468649ab933131977
      512fabd1
    • Pavlin Radoslavov's avatar
      Add support for collecting A2DP Protobuf metrics · 4e6b1c82
      Pavlin Radoslavov authored
      * Add new function metrics_a2dp_session() to
        connect A2DP metrics into Protobuf
      
      * Add new function btif_update_a2dp_metrics()
        that is called when the metrics should be
        callected
      
      * Add few more statistics to the BTIF media stats.
      
      Change-Id: I5862ac82e55b3546dc1fbde0c78cb4683e40d19e
      4e6b1c82
    • Andre Eisenbach's avatar
      Instrument and fix calls to strncmp() · 0e888661
      Andre Eisenbach authored
      Bug: 27222508
      Change-Id: I0075b4480aff52dcdc326b7bdb7154ca919ccee9
      0e888661
    • Jaganath Kanakkassery's avatar
      Suspend properly when receiving events without response · b1f50e1f
      Jaganath Kanakkassery authored
      
      In the BTU handler for messages from the controller, rn event may be
      received that the stack does not have to respond to. In this case, the
      stack should go to sleep.
      
      This patch calls the provided function in the BTU to enter sleep.
      Signed-off-by: default avatarJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: default avatarYingkai Cheng <yingkaix.cheng@intel.com>
      Signed-off-by: default avatarZhiquan Liu <zhiquan.liu@intel.com>
      Change-Id: Ie7c3fcae418eb2480338509e86b7cc870177a965
      b1f50e1f
    • Ajay Panicker's avatar
      Additional logging for bond information · a72c96f8
      Ajay Panicker authored
      Log the bond state, the funciton that updated the bond state, as well as the
      device that was updated. Also added in functionality for protobuff logging.
      
      Example output
      Bond Events:
        Total Number of events: 8
        Time          BD_ADDR            Function             State
        00:01:12.353  ac:9e:17:07:58:d8  btif_dm_create_bond  BOND_STATE_NONE
        00:01:12.354  ac:9e:17:07:58:d8  bond_state_changed   BOND_STATE_BONDING
        00:01:13.999  ac:9e:17:07:58:d8  bond_state_changed   BOND_STATE_BONDING
        00:01:14.778  ac:9e:17:07:58:d8  bond_state_changed   BOND_STATE_BONDED
        00:01:14.827  ac:9e:17:07:58:d8  bond_state_changed   BOND_STATE_BONDED
        00:01:31.534  34:36:3b:c4:bf:99  btif_dm_create_bond  BOND_STATE_NONE
        00:01:31.535  34:36:3b:c4:bf:99  bond_state_changed   BOND_STATE_BONDING
        00:01:32.771  34:36:3b:c4:bf:99  bond_state_changed   BOND_STATE_BONDING
      
      Change-Id: I01ab3a232300203704a356a17aa045e638f97463
      a72c96f8
    • Loic Poulain's avatar
      Fix data reporting state when using HID device · 44efbb13
      Loic Poulain authored
      Start and Stop are called on HID driver probe/unprobe.
      Open/Close are called when driver is interesed/not-interested
      in data reports, typically when user-space open/close the input
      device. So we can have several open/close calls for one start/stop
      cycle.
      
      https://www.kernel.org/doc/Documentation/hid/hid-transport.txt
      
      
      
      Problem is that current implementation disables data reporting on close
      but never enables it on open. This patch fixes this issue to match the
      expected behavior.
      
      Change-Id: Id5d4627dba389338b06df60a6e1d993ac3e3e5ec
      Signed-off-by: default avatarLoic Poulain <loic.poulain@intel.com>
      Signed-off-by: default avatarZhiquan Liu <zhiquan.liu@intel.com>
      44efbb13
    • Jakub Pawlowski's avatar
      service: Use built-in byte vector parser · b6806d0f
      Jakub Pawlowski authored
      Change-Id: I72369c0b7678338fc8ccf520b59a95affdfd2994
      b6806d0f
    • Andre Eisenbach's avatar
      Remove the need for -Wno-constant-logical-operand · 302bae5e
      Andre Eisenbach authored
      Change-Id: Iea44eeed487df3236d9b482b7e5bbc92f7f46797
      302bae5e
    • Andre Eisenbach's avatar
      Remove Porsche car-kit pairing workaround · 8ee098cd
      Andre Eisenbach authored
      Bug: 26551752
      Change-Id: I14c5e3fcda0849874c8a94e48aeb7d09585617e1
      8ee098cd
    • Andre Eisenbach's avatar
      Fix compile error due to interop_feature_t not being public · dc0b89cc
      Andre Eisenbach authored
      Change-Id: I3c6d2d28d98098aea1854ebd2726fdaac9cc14e9
      dc0b89cc
    • Andre Eisenbach's avatar
      Add new HAL functions to fake Bluetooth interface · f79d9cb5
      Andre Eisenbach authored
      Change-Id: I5b2b5a495ea14fd743885c4061a6bcd3e7c39c23
      f79d9cb5
    • Andre Eisenbach's avatar
      Add ability to add interop entries dynamically (2/2) · a0c02f62
      Andre Eisenbach authored
      Add ability and interface for adding dynamic entries to the interop
      workaround database.
      
      Bug: 26548845
      Change-Id: Id886e4233fc1548727e79f1581cdc0c6f0738d59
      a0c02f62
    • Pavlin Radoslavov's avatar
      Fix compilation warnings/errors on fugu · 3aa58c5f
      Pavlin Radoslavov authored
      Fix compilation warnings/errors on fugu about unused
      variables.
      
      Change-Id: Ib68097122f27c631ab36b71a6815d4e1f3b60558
      3aa58c5f
    • Pavlin Radoslavov's avatar
      Fix C/C++ compiler generated warnings · 12265e39
      Pavlin Radoslavov authored
       * Remove unused functions: -Wno-unused-function
       * Fix logical operations that are missing parentheses:
         -Wno-logical-not-parentheses, -Wno-parentheses
       * Add missing braces in initializers: -Wno-missing-braces
       * Remove unused variables: -Wno-unused-variable
       * Fix printf()-like formatting issues: -Wno-format
       * Avoid using unitialized variables:
         -Wno-maybe-uninitialized, -Wno-uninitialized
       * Fix a bug inside bta_gattc_get_gatt_db_impl()
         when the processed GATT DB attribute type is unknown.
       * Fix warnings about missing field initializers:
         -Wno-missing-field-initializers
       * Re-implement macro COMPILE_ASSERT(COND) to fix a compilation warning:
         -Wno-non-literal-null-conversion
       * Fix sign mismatch comparison warnings:
         -Wno-sign-compare
       * Fix warnings related to enum conversion:
         -Wno-enum-conversion
       * Fix warnings related to incompatible pointer types:
         -Wno-incompatible-pointer-types
       * Fix warnings related to enum conversion:
         -Wno-enum-conversion
      
      Bug: 26879229
      Change-Id: I522931fe156aeab23ae841051a9e25ceab00b1c2
      12265e39
    • Jakub Pawlowski's avatar
      service: Add services removed/added handlers · 0bd8fa5b
      Jakub Pawlowski authored
      Change-Id: Ida3f232b4e77bfb95dec78ea4af7677c9c12b411
      0bd8fa5b
    • Pavlin Radoslavov's avatar
      Cleanup C and C++ compiler flags · 0b60bb04
      Pavlin Radoslavov authored
      Cleanup the setting of C and C++ compiler flags:
       * (Almost) all compiler flags are set uniformly
         in the system/bt/Android.mk file.
       * Enable by default breaking the compilation if there is a
         compilation warning: -Werror
       * Enable most compilation warnings: -Wall -Wextra
       * Renamed Android.mk related flags:
         - bdroid_C_INCLUDES -> bluetooth_C_INCLUDES
         - bdroid_CFLAGS -> bluetooth_CFLAGS
       * Introduce variables for C-only and C++ only compiler:
         - bluetooth_CFLAGS: common C and C++ compiler flags
         - bluetooth_CONLYFLAGS: C only compiler flags
         - bluetooth_CPPFLAGS: C++ only compiler flags
       * Disable warnings for existing issues - to be removed as issues are
         resolved
       * Add a workaround for libchrome and -DNDEBUG usage.
      
      Bug: 26879229
      Change-Id: Ie7595965ca0c8ead0e95e983e76c327e7891b2c3
      0b60bb04
    • Jakub Pawlowski's avatar
      Pick proper addres type for unknown devices · 0ec558b5
      Jakub Pawlowski authored
      Change-Id: I46641d0fe065b5e5a6620dc34c770429ac8dbe11
      0ec558b5
    • Jakub Pawlowski's avatar
      Fix discovery status handling · 0e36a4d1
      Jakub Pawlowski authored
      This typo was introduced in commit 48db2d25 3years ago.
      This cause unnecesary purge of cache and rediscovery even though
      discovery was successfull.
      
      Change-Id: I828e148ad489af1e231d33d7807bbe0e46f445c5
      0e36a4d1
    • Subramanian Srinivasan's avatar
      Validates the PDU length of GATT Prepare Write attribute requests · 4c1e089a
      Subramanian Srinivasan authored
      Validates whether the PDU length of GATT Prepare Write
      requests satisfy the minimum length requirements of
      GATT write attribute request format.
      
      Change-Id: Id18d32b050389ff8c71341bb738dd77225029acd
      4c1e089a
    • Ajay Panicker's avatar
      Create backup for bt_config.conf · f621aa86
      Ajay Panicker authored
      Move current config file to a backup when a new config file is
      saved. This backup can be used in case there is an error loading
      the current config file.
      
      Change-Id: Icc210c457dc71a72fc2e82ff72c91207b25deaf1
      f621aa86
    • Ajay Panicker's avatar
      Removed function bte_load_ble_conf · d0e384c3
      Ajay Panicker authored
      The functionality provided by this function is not needed anymore.
      
      Change-Id: I59696c7a7e1d7ddb095f3a450f58ce1db97927b6
      d0e384c3