OSDN Git Service
Jakub Pawlowski [Thu, 12 May 2016 17:27:31 +0000 (17:27 +0000)]
Rewrite btif_gattc_open to new style
am:
26e51cb185
* commit '
26e51cb18509e7e04755b4fa4250c60f105ab9d2':
Rewrite btif_gattc_open to new style
Change-Id: I3545e59f8913cd69703e311d327d49f58636b87b
Jakub Pawlowski [Thu, 12 May 2016 17:27:29 +0000 (17:27 +0000)]
Rewrite btif_gattc_close to new style
am:
b454953bb6
* commit '
b454953bb6620cbafba86351b91d58b47dda107d':
Rewrite btif_gattc_close to new style
Change-Id: If0be0f67d14230a2ee0886ad7f8d033a211657bc
Jakub Pawlowski [Thu, 12 May 2016 17:27:26 +0000 (17:27 +0000)]
Rewrite btif_gattc_search_service to new style
am:
d05e50e7df
* commit '
d05e50e7df462c928041bf565821d77fb493bc28':
Rewrite btif_gattc_search_service to new style
Change-Id: I2fda5393fc407799f2e3b025fcd8f3a5609d7ed9
Jakub Pawlowski [Thu, 12 May 2016 17:27:23 +0000 (17:27 +0000)]
Rewrite btif_gattc_execute_write to new style
am:
a684a52231
* commit '
a684a52231bf0422d991fb16e4dcfc88e4584680':
Rewrite btif_gattc_execute_write to new style
Change-Id: Ib01994744d50b6b2bf737ad95f0d2fb4f7a78776
Jakub Pawlowski [Thu, 12 May 2016 17:27:21 +0000 (17:27 +0000)]
Rewrite btif_gattc_write_char to new style
am:
39a3361288
* commit '
39a33612889a562da5c919f14df24707ba3e6007':
Rewrite btif_gattc_write_char to new style
Change-Id: I8bbead7e38bb8755663ce48b924244814dbe3a28
Jakub Pawlowski [Thu, 12 May 2016 17:27:19 +0000 (17:27 +0000)]
Rewrite btif_gattc_reg_for_notification to new style
am:
ca9d889000
* commit '
ca9d889000b087ddb9bedaa716176be986be158f':
Rewrite btif_gattc_reg_for_notification to new style
Change-Id: I171687aa0f7398317f4c34aae624c7192de610ab
Jakub Pawlowski [Thu, 12 May 2016 17:26:01 +0000 (17:26 +0000)]
Rewrite btif_gattc_listen to new style
am:
144998f689
* commit '
144998f68990205ba711e701be6be8325dd6e820':
Rewrite btif_gattc_listen to new style
Change-Id: I151ca8a21d468adcd0180373337c4774ccd84506
Jakub Pawlowski [Thu, 12 May 2016 17:26:00 +0000 (17:26 +0000)]
Rewrite btif_gattc_set_adv_data to new style
am:
1ce0819a83
* commit '
1ce0819a83f47f3bec3c16c46befd1e7faddf0ff':
Rewrite btif_gattc_set_adv_data to new style
Change-Id: I45c99c023d75a7af08b54db0a650c73981b43fa0
Jakub Pawlowski [Thu, 12 May 2016 17:25:59 +0000 (17:25 +0000)]
Rewrite read RSSI and set MTU to new style
am:
c9fe4b6f62
* commit '
c9fe4b6f62c95b195fa99c4fbb75863e547929bf':
Rewrite read RSSI and set MTU to new style
Change-Id: Iea321bd4e8aa6462564a323797cded2e10c4ef9c
Jakub Pawlowski [Thu, 12 May 2016 17:25:58 +0000 (17:25 +0000)]
Rewrite btif_gattc_conn_parameter_update to new style
am:
7cb29a3802
* commit '
7cb29a38027f9cb24fc30eefb389f848cfc17082':
Rewrite btif_gattc_conn_parameter_update to new style
Change-Id: Ifad5e8babdc6eff78f0c532aa5a924062ce3a310
Jakub Pawlowski [Thu, 12 May 2016 17:25:56 +0000 (17:25 +0000)]
Rewrite btif_gattc_scan_filter_param_setup to new style
am:
1a9e2ac4da
* commit '
1a9e2ac4dab5a74139613f4ff5dde1b979522f0e':
Rewrite btif_gattc_scan_filter_param_setup to new style
Change-Id: I054ccfefa0e12d55305dba0e0c25c745fcb54bb4
Jakub Pawlowski [Thu, 12 May 2016 17:25:55 +0000 (17:25 +0000)]
Rewrite scan filter related methods to new style
am:
71d4e33a08
* commit '
71d4e33a08a5eaf458c4cd3de1ca65a542be81e3':
Rewrite scan filter related methods to new style
Change-Id: I9da69f4300b888b0cc4f21c855f64df3fa8f60f9
Jakub Pawlowski [Thu, 12 May 2016 17:25:54 +0000 (17:25 +0000)]
Rewrite btif_gattc_multi_adv_enable to new style
am:
3a70173f66
* commit '
3a70173f66b9ca3c5ad6260ca963180c479c5d0d':
Rewrite btif_gattc_multi_adv_enable to new style
Change-Id: I2b27b9a8691b8db10026c6d6f82e194f1d6fe38a
Jakub Pawlowski [Thu, 12 May 2016 17:25:53 +0000 (17:25 +0000)]
Rewrite btif_gattc_multi_adv_update to new style
am:
5dfe8ba500
* commit '
5dfe8ba500ad0594c787a0b905369f36de7da38b':
Rewrite btif_gattc_multi_adv_update to new style
Change-Id: I37dd5cd7a3605ee621352228ad73d6cd2033b002
Jakub Pawlowski [Thu, 12 May 2016 17:25:51 +0000 (17:25 +0000)]
Rewrite multi adv set data to new style.
am:
ed8aefe613
* commit '
ed8aefe6134359cc70b127a23bac3a6d4c24065e':
Rewrite multi adv set data to new style.
Change-Id: Iea27f1f0c783a2f74bf487e265358fe5c97fd338
Jakub Pawlowski [Thu, 12 May 2016 17:25:50 +0000 (17:25 +0000)]
Rewrite btif_gattc_multi_adv_disable to new style
am:
772fc669dc
* commit '
772fc669dcf1221df03377e5c16507f2f7caa91b':
Rewrite btif_gattc_multi_adv_disable to new style
Change-Id: I82f7092afc59bf24e21ebccb2ecef95636741ac7
Jakub Pawlowski [Thu, 12 May 2016 17:25:49 +0000 (17:25 +0000)]
Rewrite btif batch scan methods to new style.
am:
2af2129df7
* commit '
2af2129df720baee246d4ff9a0f1a02884da856e':
Rewrite btif batch scan methods to new style.
Change-Id: I9280ad6c5b4417c0c0262ea668a04f93d1cf56e6
Jakub Pawlowski [Thu, 12 May 2016 17:25:48 +0000 (17:25 +0000)]
Rewrite btif_get_gatt_db to new style
am:
61a98132c3
* commit '
61a98132c39d3181a0ea23988ac36fbfef8194b4':
Rewrite btif_get_gatt_db to new style
Change-Id: I0431c64890aa823f679c33fe98260b3c3d2450e2
Jakub Pawlowski [Thu, 12 May 2016 17:25:47 +0000 (17:25 +0000)]
Rewrite btif_gattc_set_scan_parameters to new style
am:
4c634eeafc
* commit '
4c634eeafc79e68b40ff1ade0d96ba7b1c34f85f':
Rewrite btif_gattc_set_scan_parameters to new style
Change-Id: I51ea085022cba4ff8c9aa221d6cb523a1b6cb5bc
Jakub Pawlowski [Thu, 12 May 2016 17:25:45 +0000 (17:25 +0000)]
Rewrite GATT read operations to use new style
am:
61a112e488
* commit '
61a112e488a7686e5cc9680434c42895ef9db878':
Rewrite GATT read operations to use new style
Change-Id: I981bfd27a7010da48b204f22f7854055665497e4
Jakub Pawlowski [Thu, 12 May 2016 17:25:44 +0000 (17:25 +0000)]
Use MessageLoop in bt_jni_workqueue thread
am:
140645f6b8
* commit '
140645f6b8d87464c08f082bd14740eecab23f71':
Use MessageLoop in bt_jni_workqueue thread
Change-Id: I0d60049b62c4295bea9f2fa5f12bcbee81a5c962
Jakub Pawlowski [Tue, 3 May 2016 22:47:50 +0000 (15:47 -0700)]
Rewrite btif_gattc_open to new style
Bug:
28485365
Change-Id: Idc0e12a00f155a128806b1c2a7f3f71daf6cd23f
Jakub Pawlowski [Tue, 3 May 2016 22:44:44 +0000 (15:44 -0700)]
Rewrite btif_gattc_close to new style
Bug:
28485365
Change-Id: Ic82a28cc3659b4ac9936861310578ee07f46ee31
Jakub Pawlowski [Tue, 3 May 2016 21:34:57 +0000 (14:34 -0700)]
Rewrite btif_gattc_search_service to new style
Bug:
28485365
Change-Id: I80ad14db9cfa69cbbfeee3cf362017ca0da70c8e
Jakub Pawlowski [Tue, 3 May 2016 21:33:06 +0000 (14:33 -0700)]
Rewrite btif_gattc_execute_write to new style
Bug:
28485365
Change-Id: Id93cf6e3ee1d2c9eded20d98ba791c462ff0b5af
Jakub Pawlowski [Tue, 3 May 2016 21:23:37 +0000 (14:23 -0700)]
Rewrite btif_gattc_write_char to new style
Bug:
28485365
Change-Id: Ibe0c1386befb77ddb55d20effd7ba1fda6135d7b
Jakub Pawlowski [Tue, 3 May 2016 21:08:45 +0000 (14:08 -0700)]
Rewrite btif_gattc_reg_for_notification to new style
Bug:
28485365
Change-Id: I227634b11be381977135f7c6668c4d15b7cca31b
Jakub Pawlowski [Tue, 3 May 2016 21:00:12 +0000 (14:00 -0700)]
Rewrite btif_gattc_listen to new style
Bug:
28485365
Change-Id: I63c677262b316210ab5f59908fd2e30fb9d5eebc
Jakub Pawlowski [Tue, 3 May 2016 20:48:20 +0000 (13:48 -0700)]
Rewrite btif_gattc_set_adv_data to new style
Bug:
28485365
Change-Id: Id3868d321226bc3c251bb15f3176c6e2d4b66e82
Jakub Pawlowski [Tue, 3 May 2016 20:43:58 +0000 (13:43 -0700)]
Rewrite read RSSI and set MTU to new style
Bug:
28485365
Change-Id: Ife20d1ce569a1feff561a1b7b3e7b22560a4f108
Jakub Pawlowski [Tue, 3 May 2016 19:06:36 +0000 (12:06 -0700)]
Rewrite btif_gattc_conn_parameter_update to new style
Bug:
28485365
Change-Id: Ibc5e085d381855ec139383545cfbec2750efb33f
Jakub Pawlowski [Tue, 3 May 2016 18:59:28 +0000 (11:59 -0700)]
Rewrite btif_gattc_scan_filter_param_setup to new style
Bug:
28485365
Change-Id: I290af35e0de35f4fbb7fa18ffc40eb5349027343
Jakub Pawlowski [Tue, 3 May 2016 18:50:08 +0000 (11:50 -0700)]
Rewrite scan filter related methods to new style
Bug:
28485365
Change-Id: I68e270e4d7bceee6a9a67ef2a7c50a047cf2d574
Jakub Pawlowski [Tue, 3 May 2016 18:33:36 +0000 (11:33 -0700)]
Rewrite btif_gattc_multi_adv_enable to new style
Bug:
28485365
Change-Id: I7e055c4930fc39dd3b83ea0086f0c0e12f7d815f
Jakub Pawlowski [Tue, 3 May 2016 18:20:01 +0000 (11:20 -0700)]
Rewrite btif_gattc_multi_adv_update to new style
Bug:
28485365
Change-Id: I59a908560856eff0b46b2bf5040c2ecb990ae350
Jakub Pawlowski [Tue, 3 May 2016 18:12:49 +0000 (11:12 -0700)]
Rewrite multi adv set data to new style.
Bug:
28485365
Change-Id: I28f1fd875998b039b5df969771e7b07c08d7fd3e
Jakub Pawlowski [Tue, 3 May 2016 16:11:29 +0000 (09:11 -0700)]
Rewrite btif_gattc_multi_adv_disable to new style
Bug:
28485365
Change-Id: Ifa5e4b4812ec236cc9a41a2129eaa43c328fa28f
Jakub Pawlowski [Tue, 3 May 2016 16:03:11 +0000 (09:03 -0700)]
Rewrite btif batch scan methods to new style.
Bug:
28485365
Change-Id: I62dfa6911ca0e26d490a9702d391aa30a09829a9
Jakub Pawlowski [Tue, 3 May 2016 15:55:11 +0000 (08:55 -0700)]
Rewrite btif_get_gatt_db to new style
Bug:
28485365
Change-Id: Iec63e595bfb82a4ac33564f3095cf0e7c4c37e39
Jakub Pawlowski [Tue, 3 May 2016 01:12:11 +0000 (18:12 -0700)]
Rewrite btif_gattc_set_scan_parameters to new style
Bug:
28485365
Change-Id: I29cb2e11b3e407676e312fe83248fc8b551e60ad
Jakub Pawlowski [Tue, 3 May 2016 00:50:25 +0000 (17:50 -0700)]
Rewrite GATT read operations to use new style
Bug:
28485365
Change-Id: I3c5918abdf79da7d6b566506ad53fa38656bcb65
Jakub Pawlowski [Sat, 30 Apr 2016 21:37:40 +0000 (14:37 -0700)]
Use MessageLoop in bt_jni_workqueue thread
Up till now, to execute anyting on bt_jni_workqueue thread, we were
sending events to workqueue associated with this thread. Flow was:
btif_transfer_context -> btif_sendmsg -> thread_post.
Events were containing defined action, i.e. BTIF_GATTC_SCAN_START and
pointer to struct that contained all required data to execute it.
This was very cumbersome - figuring out what is executed when event is
send was hard. Also everything have to be packed into structure which
means that
we have to define lots of structures, or have one big super-structure
holding data for all events (like in btif_gatt_client.cc). Event sending
and receiving
logic is a huge percent of all code.
From now on, there will be a MessageLoop running inside bt_jni_workqueue
that will execute all tasks that will be posted with PostTask. The
benefit of having PostTask method, is that we can simply create Closure
that will be run in bt_jni_workqueue thread. It will take care of
transferring all associated values, and their cleanup. It will also do
compile-time check of all parameters. We no longer have to create
events, structs, and separate call logic from execution logic.
Bug:
28485365
Change-Id: I5014ef680757c0d3c6c69781aadc5139c8e1c3c4
Andre Eisenbach [Wed, 11 May 2016 20:34:13 +0000 (20:34 +0000)]
Add additional VW car kits to absolute volume blacklist
am:
29e7944184
* commit '
29e794418452c8b35c2d42fe0cda81acd86bbf43':
Add additional VW car kits to absolute volume blacklist
Change-Id: If5c53e050f667e1042748809d04c48d5c7bb108d
Andre Eisenbach [Wed, 11 May 2016 19:20:23 +0000 (12:20 -0700)]
Add additional VW car kits to absolute volume blacklist
Change-Id: I8b0b73595e9183b9c1540b06e9e0378312c6a63d
Fixes:
25613423
Andre Eisenbach [Wed, 11 May 2016 18:34:08 +0000 (18:34 +0000)]
Fix double mutex unlock and if() condition
am:
0403dcd262
* commit '
0403dcd262980110ef2a24ac9c0a72d0dc3d96bb':
Fix double mutex unlock and if() condition
Change-Id: Ib81d74eb8940060149509bcae7c8f289b3bf0f9c
Andre Eisenbach [Wed, 11 May 2016 03:27:20 +0000 (20:27 -0700)]
Fix double mutex unlock and if() condition
Commit "L2CAP and SDP Search API for BT profiles (2/2)" introduced two
separate issues in btsock_rfc_signaled():
1. The "slot_lock" potentially gets unlocked twice, causing
undefined behaviour.
2. The call to BTA_JvRfcommWrite() was incorrectly taken outside
of the conditional if() block that only executes the code if
data is available.
This patch reverts the relevant locking change and fixes the if()
condition.
Bug:
27204458
Change-Id: I63b1257d21ca7bdd248858ec67e28f64e37a7895
Bryce Lee [Wed, 11 May 2016 18:23:10 +0000 (18:23 +0000)]
Move extern "C" to top of headers and remove tBTA_HF_CLIENT_HDR.
am:
3d6accfcc0
* commit '
3d6accfcc0bdc5c7a8713320c9bb069cbf253348':
Move extern "C" to top of headers and remove tBTA_HF_CLIENT_HDR.
Change-Id: I0850e31cd573afb2ef6d625cbe8c6ae78ab3a000
Bryce Lee [Wed, 11 May 2016 00:10:09 +0000 (17:10 -0700)]
Move extern "C" to top of headers and remove tBTA_HF_CLIENT_HDR.
Previously, extern "C" was placed in various locations within the header
files, sometimes below actual struct declarations. Doing so would lead to
alignment issues between C and C++ code.
tBTA_HF_CLIENT_HDR was removed from bta_hf_client_api since it was
extraneous and empty - leading to alignment issues.
Change-Id: Icdd338f1affe4c3a70c7bbd716249be6a16443d2
Jakub Pawlowski [Wed, 11 May 2016 16:42:16 +0000 (16:42 +0000)]
Change initial order of commands after establishing an LE connection
am:
9376f77974
* commit '
9376f7797412447a7a00aabafafc53f06232405f':
Change initial order of commands after establishing an LE connection
Change-Id: I3cbf6a6f338085f6cf71ebbd757f24af17e51357
Jakub Pawlowski [Wed, 11 May 2016 16:42:14 +0000 (16:42 +0000)]
Change initial order of commands after establishing an LE connection
am:
272c9711bc
* commit '
272c9711bc6363f0b32c48a86d71726bdd9abfd9':
Change initial order of commands after establishing an LE connection
Change-Id: Ia1d2d01da3f34efeefe17f61d7f82cb4d32f6cb3
Jakub Pawlowski [Tue, 10 May 2016 23:43:41 +0000 (16:43 -0700)]
Change initial order of commands after establishing an LE connection
This patch changes order of commands send to LE device after connecting.
This will cause update connection parameters to be send after read
remote version. Having it other way around cause some problems with
broadcom chips, even though it should work both ways.
Bug:
28435172
Change-Id: I8ecf76217b036842e1d9ec7df714da94a99df7d5
Jakub Pawlowski [Tue, 10 May 2016 20:29:59 +0000 (13:29 -0700)]
Change initial order of commands after establishing an LE connection
This patch changes order of commands send to LE device after connecting.
This will cause update connection parameters to be send after read
remote features. Having it other way around cause some problems with
broadcom chips, even though it should work both ways.
Bug:
28435172
Change-Id: I280993d40b63d41729f5a8ccf246809c3abf617d
AnubhavGupta [Tue, 10 May 2016 19:25:42 +0000 (19:25 +0000)]
A2DP_SINK: create avrcp connection only if a2dp is successful
am:
71461b979a
* commit '
71461b979a25adc0c30eae899837575e1d95490d':
A2DP_SINK: create avrcp connection only if a2dp is successful
Change-Id: I66a2e42b6b491266eb6dd21d73b7409f0eade41d
AnubhavGupta [Thu, 7 Apr 2016 17:35:53 +0000 (23:05 +0530)]
A2DP_SINK: create avrcp connection only if a2dp is successful
Scenario: Pair and connect carkit to a remote mobile
Disconnect from carkit
Initiate connection from carkit and turn BT-OFF
on remote mobile phone
Issuses: Even though A2DP connection is unsuccessful we
try to connect AVRCP connectoin
Solution:
- for a2dp sink, we should not send pending play command
- we should create avrcp connection only if a2dp connection
is successful
Change-Id: If2c6a3710b6ebdaa382a3d8bcae5c137aaef1f2c
Nitin Arora [Tue, 10 May 2016 15:16:51 +0000 (15:16 +0000)]
PTS: Read SMP pairing options from bt_stack.conf
am:
2aa2b80259
* commit '
2aa2b80259612d1a324891c2e036a7bb002b2462':
PTS: Read SMP pairing options from bt_stack.conf
Change-Id: Ic9a9c40284da55ff2389f5a987afaf8528867bfb
Nitin Arora [Tue, 10 May 2016 15:16:49 +0000 (15:16 +0000)]
PTS: Avoid BR SDP after LE pairing
am:
4cdb0e547b
* commit '
4cdb0e547b0dd056e60cc4724efa10c07e45fb96':
PTS: Avoid BR SDP after LE pairing
Change-Id: I98b651ab3b94a8c9a71a892d4919e249da0b1bcf
Nitin Arora [Tue, 10 May 2016 15:16:48 +0000 (15:16 +0000)]
PTS: Allow disabling connection updates
am:
36ad41b678
* commit '
36ad41b67822fed38597556eb102418ecf623c21':
PTS: Allow disabling connection updates
Change-Id: I42444ce90406c09f0aed17a9032c357238022ecf
Nitin Arora [Tue, 10 May 2016 15:16:47 +0000 (15:16 +0000)]
PTS: Add a Secure Only mode.
am:
a0ee0f8968
* commit '
a0ee0f896808a0d78cbaa30afc432cee5cf4d658':
PTS: Add a Secure Only mode.
Change-Id: Ib440967673774e098255d55f96dd40740aab27ce
Nitin Arora [Tue, 10 May 2016 15:16:45 +0000 (15:16 +0000)]
Changes to allow LE key upgrade
am:
6ea4d23280
* commit '
6ea4d232808d04f476b60aa2dcfc935ad4f8398e':
Changes to allow LE key upgrade
Change-Id: Id3e99c6a5fea64432917da824fc8282565de9384
Nitin Arora [Sat, 12 Mar 2016 00:37:51 +0000 (16:37 -0800)]
PTS: Read SMP pairing options from bt_stack.conf
Use Case:
A number of cenrtification test cases require the host
to change the pairing options including auth request,
I/O capabilities, key distribution mask, key length
and Out of band capability.
Test Case: TP/PKE/BV-02-C
Failure:
Host currently only supports fixed SMP options and only
a few test cases involving pairing, are executed due
to that limitation.
Fix:
Added changes to read the SMP options from the bt_stack.conf
file at run time.
The pairing options are entered as a comma separated list eg:
SMPOptions=0xD,0x4,0xf,0xf,0x10
where the included hex values are in the following order:
\#auth, io, ikey, rkey, ksize
If all 5 options are not present, the host falls back to the
default values
Bug:
27852645
Change-Id: I693b05966695cf4660c5da10249c5f7c0663e53a
Nitin Arora [Fri, 11 Mar 2016 02:27:24 +0000 (18:27 -0800)]
PTS: Avoid BR SDP after LE pairing
Use Case: Certification test case requiring LE secure pairing
with PTS.
Test Case: TP/SCJW/BV-01-C
Failure:
While pairing with PTS for certification test cases, LE secure
pairing followed by BR/EDR cross key derivation results in the
host initiating the SDP to gather the remote BR/EDR services.
PTS considers it as a test failure.
Fix: Added run time flag in bt_stack.conf file
"PTS_DisableSDPOnLEPair" to disable the SDP immidiately after
LE pairing followed by cross key derivation.
Bug:
27852645
Change-Id: Ib5a05c47b99c2ef8256967a608ae9ebbdfba60ee
Nitin Arora [Thu, 11 Jun 2015 00:10:57 +0000 (17:10 -0700)]
PTS: Allow disabling connection updates
Use Case: Certification test case requiring LE secure pairing
with PTS.
Failure:
LE pairing test cases follow the host behavior where
connection parameters are switched to fast parameters
for SMP and service discovery and switched back to the
default values after SMP/LE discovery is complete.
PTS disconnects to these series of connection updates.
Fix:
This change disables connection updates based on run time
flag "PTS_DisableConnUpdates" fetched from bt_stack.conf
Bug:
27852645
Change-Id: I1da213fd143ccfcb0ac82c7049a94094d2716ff1
Nitin Arora [Fri, 11 Mar 2016 20:26:51 +0000 (12:26 -0800)]
PTS: Add a Secure Only mode.
Use Case:
Certification test cases require BLE to be in secure only
mode and reject legacy pairing requests.
Test Case: TP/SEC/SEM/BV-28-C
Failure:
Currently the host doesn't have a method of putting host into
a mode where it can only perform secure pairing.
This prevents execution of certification test cases
requiring Secure Only mode.
Fix:
Made changes to read the value of a tag "PTS_SecurePairOnly"
at runtime from the file "bt_stack.conf".
Bug:
27852645
Change-Id: I32cd6412621efeed2cb31c760a031762d9f369f9
Nitin Arora [Tue, 30 Jun 2015 22:04:23 +0000 (15:04 -0700)]
Changes to allow LE key upgrade
Use Case: Certifiation test cases require the LE key upgrade
to happen when the current MITM level of the device has
been upgraded. In that case, a repairing is performed,
leading to more authenticated LTK.
Test Case: TP/SEC/AUT/BV-17-C
Steps:
1. Perform LE pairing between two devices using no MITM.
2. Change the IO capability of the devices, so that a
repair would involve authentication.
3. Reconnect the devices and expect key upgrade.
Failure:
No key upgrade is seen at reconnection and the devices
continue to use the old key.
Fix:
Added changes to re-calulate the requirement of key
upgrade when the LE channel is already encrypted.
Bug:
27852645
Change-Id: If62f334dcf298b2ce9840e95035b4398cb951c84
Ajay Panicker [Mon, 9 May 2016 18:26:59 +0000 (18:26 +0000)]
Fix undefined usage of snprintf
am:
def4219f08
* commit '
def4219f08f34fd5d930b1b98cfd8e3f29b3fc86':
Fix undefined usage of snprintf
Change-Id: I66b0939e09d2d32f4fbae8cdea6c8a8847d547cc
Ajay Panicker [Mon, 9 May 2016 17:34:30 +0000 (17:34 +0000)]
Remove redefine of ARRAY_SIZE
am:
778d57b7e8
* commit '
778d57b7e8222fff731d7deabed25983d508dc14':
Remove redefine of ARRAY_SIZE
Change-Id: I1ab8580f2cc7d8cf51cf1b7a93733e3b8ec079ef
Ajay Panicker [Thu, 5 May 2016 21:51:34 +0000 (14:51 -0700)]
Fix undefined usage of snprintf
Using a buffer as both the format and output for snprintf could
cause undefinied behaviour on certain platforms. Instead just
use a temporary variable.
Bug:
27882028
Change-Id: If9f96fba4b3447b3248917ab9fb994bd80cbca0f
Pavlin Radoslavov [Mon, 9 May 2016 17:30:19 +0000 (17:30 +0000)]
Update l2c_fcr_clone_buf() to allocate large enough buffer
am:
871e9ba306
* commit '
871e9ba3063530a81ca7ff03e8433c25e1e8c096':
Update l2c_fcr_clone_buf() to allocate large enough buffer
Change-Id: Id80eba1a1bd5fba4b9fa525b05fe59ec0e4be61e
Ajay Panicker [Fri, 6 May 2016 21:01:24 +0000 (14:01 -0700)]
Remove redefine of ARRAY_SIZE
Bug:
28621069
Change-Id: Ie3db0ff733052113493d0e53bb35e2d617c31bff
Pavlin Radoslavov [Mon, 9 May 2016 02:12:53 +0000 (19:12 -0700)]
Update l2c_fcr_clone_buf() to allocate large enough buffer
Apparently, in some parts of the code we assumed the original
buffer size is large enough and we can extend it and write
few more octets at the end.
Bug:
28351270
Change-Id: Idc53d8f68e55808c9f6bf7f18568288304a9bfb9
Jakub Pawlowski [Mon, 9 May 2016 16:05:50 +0000 (16:05 +0000)]
Lower unnecesary high log level
am:
292a62d370
* commit '
292a62d3708900ba83c1789dc2c06d6dfdb0cfac':
Lower unnecesary high log level
Change-Id: I83f1bb9d6797c5cc67bd37746498f221d7933bfb
Jakub Pawlowski [Fri, 6 May 2016 20:26:45 +0000 (13:26 -0700)]
Lower unnecesary high log level
Change-Id: Id4d255d79c844cd8dbf044e5bda073b8f5d784e7
Pavlin Radoslavov [Fri, 6 May 2016 01:24:02 +0000 (01:24 +0000)]
Call BTA_VendorCleanup() during actual cleanup of the stack
am:
58318f48fc
* commit '
58318f48fc93afe606c77f3ef83c7bff83b65bf8':
Call BTA_VendorCleanup() during actual cleanup of the stack
Change-Id: Ib3ba5aea125cc08676cbe3bbea8eac7e0ca90085
Pavlin Radoslavov [Thu, 5 May 2016 23:20:15 +0000 (16:20 -0700)]
Call BTA_VendorCleanup() during actual cleanup of the stack
Previously, BTA_VendorCleanup() was called during the shutdown
process, and this created race condition crashing the stack.
Bug:
28450506
Change-Id: Ibee90d406036862b95d18e2ef00b08b820c70f68
Andre Eisenbach [Thu, 5 May 2016 23:44:37 +0000 (23:44 +0000)]
Merge "Return handle if an RFCOMM port is already open"
am:
6787eb8288
* commit '
6787eb828800e0a0999db3c947e54818bbc1c101':
Return handle if an RFCOMM port is already open
Change-Id: I41aedda07880ee8f25356b39dd1d818d7420498b
Treehugger Robot [Thu, 5 May 2016 23:29:24 +0000 (23:29 +0000)]
Merge "Return handle if an RFCOMM port is already open"
Ajay Panicker [Thu, 5 May 2016 22:41:03 +0000 (22:41 +0000)]
Merge "Fix size of SDP black list array"
am:
f7432dc822
* commit '
f7432dc8225e7085dd194e7a5f99243c019e195b':
Fix size of SDP black list array
Change-Id: I34c18f6c51c2ac189ba456e603c4695f54644236
Treehugger Robot [Thu, 5 May 2016 22:31:40 +0000 (22:31 +0000)]
Merge "Fix size of SDP black list array"
Andre Eisenbach [Thu, 5 May 2016 17:57:44 +0000 (10:57 -0700)]
Return handle if an RFCOMM port is already open
By returning the handle, the upper layer (BTA) will attempt to
disconnect on failure to connect. Thus the attempt to open the port will
still fail, but any subsequent attempts will be able to recover.
Bug:
27204458
Change-Id: I0f8489b98adeb7f5e217201ffbbb35132a66f210
Myles Watson [Thu, 5 May 2016 21:04:57 +0000 (21:04 +0000)]
Allow C++ code to check bt_stack_config options
am:
e8a76f58bc
* commit '
e8a76f58bc176828f1824044eebe33bb0d55b0ce':
Allow C++ code to check bt_stack_config options
Change-Id: I50e07a19968183c523b0d2b5f09d2e11bde08a20
Ajay Panicker [Thu, 5 May 2016 19:51:49 +0000 (12:51 -0700)]
Fix size of SDP black list array
Bug:
28617843
Change-Id: Iff5690e3aae42d9907ed9351f1059461985c8a20
Myles Watson [Thu, 5 May 2016 18:57:54 +0000 (11:57 -0700)]
Allow C++ code to check bt_stack_config options
Stack configuration options are parsed in C.
Bug:
28485365
Change-Id: I046ef5c676256a8da23bf8c0a7d1eeb1e9603c05
Pavlin Radoslavov [Wed, 4 May 2016 23:44:17 +0000 (23:44 +0000)]
Fixed test_periodic_unregister_processing_queue unit test
am:
f5d575c418
* commit '
f5d575c4183dae210876ff0f27a54747367b6a19':
Fixed test_periodic_unregister_processing_queue unit test
Change-Id: I9add4ca7c14f0c03f22e33ad057fe47eb587d849
Pavlin Radoslavov [Wed, 4 May 2016 23:44:16 +0000 (23:44 +0000)]
Avoid NULL pointer usage of startup_future in case of HCI startup timeout
am:
3d1aa9d385
* commit '
3d1aa9d3856342764db13503a07452a79edbaeda':
Avoid NULL pointer usage of startup_future in case of HCI startup timeout
Change-Id: Id2c6442e547ed77ef685f9d0c37137d4d45c0e6c
Pavlin Radoslavov [Wed, 4 May 2016 06:00:15 +0000 (23:00 -0700)]
Fixed test_periodic_unregister_processing_queue unit test
Removed a copy-and-paste check in the
test_periodic_unregister_processing_queue unit test.
The removed check adds little value - it has time-dependency,
and is not robust.
Bug:
26982349
Change-Id: I4adb948713b9946b5eb821d6fe52b7ada1400182
Pavlin Radoslavov [Wed, 4 May 2016 03:20:06 +0000 (20:20 -0700)]
Avoid NULL pointer usage of startup_future in case of HCI startup timeout
Previously, the startup_timer was created within the HCI layer start_up()
function, and after several vendor calls, we created the startup_future
that is used elsewhere. However, if any of the vendor calls blocks for
very long time, the startup_timer will timeout.
The startup_timer_expired() callback will try to use startup_future
that is still NULL, and that will trigger an assert.
The issue is avoided by creating the startup_future right before
the startup_timer is scheduled.
Bug:
28528815
Change-Id: Ib9f2c6581a86d3df0fd4d02d0b4c290663b5cfa1
Pavlin Radoslavov [Wed, 4 May 2016 00:05:52 +0000 (00:05 +0000)]
Merge "Update alarm_unregister_processing_queue() to cancel scheduled alarms"
am:
757b1b48d7
* commit '
757b1b48d72a917443a6eb48dba45075d0e546c9':
Update alarm_unregister_processing_queue() to cancel scheduled alarms
Change-Id: Ifb404ace4b6b24d673f3f67e0270f37f40eddf49
Treehugger Robot [Tue, 3 May 2016 23:57:18 +0000 (23:57 +0000)]
Merge "Update alarm_unregister_processing_queue() to cancel scheduled alarms"
Pavlin Radoslavov [Mon, 2 May 2016 17:52:07 +0000 (10:52 -0700)]
Update alarm_unregister_processing_queue() to cancel scheduled alarms
Update the alarm_unregister_processing_queue() implementation
so it cancels all alarms that are scheduled on the corresponding
queue.
This fixes a race condition during Bluetooth shutdown: if an alarm
expires right after an alarm processing queue is invalidated,
the alarm processing would try to use the invalidated queue.
Added the corresponding unit tests.
Also, added a missing call to alarm_unregister_processing_queue().
Bug:
26982349
Change-Id: I09a111e8080b6dbc354dffa03a487f7a8c578ce6
Jakub Pawlowski [Tue, 3 May 2016 19:57:44 +0000 (19:57 +0000)]
Simplify btif multi adv data handling
am:
1668d204a0
* commit '
1668d204a0da63609fa1affcc86de9b76d0a0f48':
Simplify btif multi adv data handling
Change-Id: I038037fcb58e82aa5fa59359bc905cdc5f3ce55b
Jakub Pawlowski [Tue, 3 May 2016 16:42:34 +0000 (09:42 -0700)]
Simplify btif multi adv data handling
Use static fixed size arrays to transport advertisement data instead of
dynamically allocated ones. This simplifies memory allocation and
cleanup handling.
Bug:
28485365
Change-Id: I3a2642e3b11a272eeec50fd959e10820ea3de74f
Chih-Hung Hsieh [Tue, 3 May 2016 18:48:34 +0000 (18:48 +0000)]
Fix google-explicit-constructor warnings.
am:
0194affe0f
* commit '
0194affe0fb5e0d850206007bd56c6c15d91afae':
Fix google-explicit-constructor warnings.
Change-Id: I40c225f5326a357d5d4887eb779d559f824e13f7
Chih-Hung Hsieh [Tue, 3 May 2016 17:23:34 +0000 (10:23 -0700)]
Fix google-explicit-constructor warnings.
Bug:
28341362
Change-Id: I7ed9eb20b9b378a25a5454ce2ebfa113428baaf4
Jakub Pawlowski [Tue, 3 May 2016 04:26:35 +0000 (04:26 +0000)]
Build fix
am:
f9a8352fd2
* commit '
f9a8352fd2388b582b09fe01c9a4d4094b3c287c':
Build fix
Change-Id: I99e209bcfcc4889b8e0208710245f0746f74929c
Jakub Pawlowski [Tue, 3 May 2016 04:06:16 +0000 (21:06 -0700)]
Build fix
Change-Id: I6fd0ebe5e1d650ef307b22f96869c0004f6c956f
Pavlin Radoslavov [Tue, 3 May 2016 00:08:59 +0000 (00:08 +0000)]
Add read/write timeout to the audio sockets
am:
9fc08748b7
* commit '
9fc08748b716e29d25d9cf1dc2ac918edda14d98':
Add read/write timeout to the audio sockets
Change-Id: I6f38b5230d1ffc1ec43ba722d0584dc51dbc0324
Pavlin Radoslavov [Tue, 3 May 2016 00:08:57 +0000 (00:08 +0000)]
Fix test_set_zero_periodic unit test failure
am:
b290604bd8
* commit '
b290604bd88742c468a52ea4c261e1c74d7380fc':
Fix test_set_zero_periodic unit test failure
Change-Id: I3a92fce4a46d53d615abf54389aac80a5db7144e
Pavlin Radoslavov [Mon, 2 May 2016 20:40:26 +0000 (13:40 -0700)]
Add read/write timeout to the audio sockets
Add read/write timeout of 2 seconds when reading/writing
from/to the audio-related control and data sockets.
Also, removed unnecessary poll(POLLOUT), because it is not needed anymore.
Bug:
27996931
Change-Id: Ib214a85f4837760b17cded155464957f56806bd3
Pavlin Radoslavov [Mon, 2 May 2016 22:53:22 +0000 (15:53 -0700)]
Fix test_set_zero_periodic unit test failure
Removed an "EXPECT_EQ(cb_counter, 0)" statement
right after a timer of value 0 is scheduled.
The EXPECT_EQ statement shouldn't be there,
because by the time it is reached, the callback might
have been called already.
Change-Id: I61fbec96c436787321c6b36006a2bc1c0e627667
Jakub Pawlowski [Mon, 2 May 2016 21:05:14 +0000 (21:05 +0000)]
Convert BTIF code from C to C++
am:
713993d178
* commit '
713993d1784ab7c23aee1fa3cf1ab8676cc0aa69':
Convert BTIF code from C to C++
Change-Id: I5ff141fbb5614e0eee7d0b14af39ba103c008ffa