Commit Graph

8131 Commits

Author SHA1 Message Date
Marcel Holtmann
1bbbb1331c Update library version 2011-02-13 18:02:30 -08:00
Marcel Holtmann
cc04c6a2f7 audio: Remove workaround for compiler warnings 2011-02-13 17:51:45 -08:00
Andrei Emeltchenko
61b3ce7194 hcitool: Add bdaddr type option to lecc 2011-02-11 14:07:22 -08:00
Claudio Takahasi
06651f3f51 Add const modifier to avoid wrong usage of byte order functions 2011-02-11 14:04:34 -08:00
Claudio Takahasi
b67bf675e3 Fix wrong parameter order for memcpy in btoh128 function 2011-02-11 14:03:57 -08:00
Andrei Emeltchenko
2cc99a5ea6 Bluetooth: hcitool: add option for LE_Scan_Type parameter
The LE_Scan_Type parameter controls the type of scan to perform.
2011-02-11 13:41:28 -08:00
Daniel Wagner
ef4ee19895 hfp: gateway_suspend_stream should trigger a state change
When gateway_suspend_stream is called it should change the
gateway state machine from PLAYING to CONNECTED.
2011-02-11 11:48:45 -08:00
Johan Hedberg
cfe9a54a09 Add basic debug prints to attribute server 2011-02-10 15:58:54 -08:00
Johan Hedberg
988d196313 Fix coding style issues in attribute server code 2011-02-10 15:56:48 -08:00
Gustavo F. Padovan
cd09d807d3 Use a valid PSM value in l2test 2011-02-09 14:03:57 -08:00
Dmitriy Paliy
f05cb9d298 Fix bluetoothd exit on badly formated AT+VTS
This fixes bluetoothd exit when AT+VTS command is badly formatted,
e.g. as AT+VTS\xfe\xfe[...]=1

Verification it done for the numeric value to be larger than 0x23,
that corresponds to the hash '#', and to be lower than 0x44, that
corresponds to 'D', such that the tone is in {0-9, *, #, A, B, C, D}.
2011-02-09 14:00:55 -08:00
Elvis Pfützenreuter
bdc943dd18 Fix small typo 2011-02-09 13:57:58 -08:00
Andre Dieb Martins
2fab731d89 Fix GATT listen mode updating
Update gatt's listen-mode flag whenever connect_cb() is called again.
2011-02-08 15:07:23 -08:00
Johan Hedberg
1c93c6fa88 mgmt: Add mgmt_pair_device command
This patch adds a new management command for triggering a dedicated
bonding procedure to a remote device.
2011-02-08 23:15:23 +02:00
Johan Hedberg
de96fcd899 Reuse same SEP when reconfiguring A2DP streams
It makes sense to try to reuse the same SEP whenever possible when
reconfiguring streams. In fact this is even necessary with a particular
BMW car kit which doesn't allow a new stream to be set up to any other
SEP.
2011-02-08 11:04:39 -08:00
Johan Hedberg
f9b170951f Fix HID channel reference count issues
This patch cleans up the reference counting of the HID control and
interrupt channels. Particularly the connection failure cases weren't
properly handled previously.

Based on the original report and patch from Jaikumar Ganesh.
2011-02-07 15:27:03 -08:00
Ankush Bansal
c7acda4dd5 Change required GLib version in acinclude.m4
The g_strcmp0 function requires at least 2.16.
2011-02-04 06:59:02 +02:00
Anderson Lizardo
5f7c387957 Fix refcount in btd_adapter_any_request_path()
adapter_any_refcount was not being incremented when a pointer to
allocated buffer was returned.
2011-02-04 06:58:02 +02:00
Gustavo F. Padovan
12eac6993b rename: tools/main.c to tools/rfcomm.c 2011-02-04 06:55:46 +02:00
Bruna Moreira
240fcdb006 Fix invalid read after list concatenation
g_slist_concat uses the items from second list directly so they should
not be freed.
2011-02-04 06:55:02 +02:00
Elvis Pfützenreuter
05133a40fd Fix parameter type in att_put_u32 2011-02-04 06:53:35 +02:00
Luiz Augusto von Dentz
1a004cf882 Fix crash while parsering of endpoint properties
When parsing endpoint properties application my not have set some of the
mandatory properties, also the size of capability is now initialized with
0 so if the codec doesn't have any capabilities (e.g. pcm) the variable
won't be used uninitialized.
2011-02-02 13:56:12 +02:00
Dmitriy Paliy
ed8bfe8b81 Code cleanup: unnesessary line removed in avdtp.c 2011-02-02 12:10:27 +02:00
Dmitriy Paliy
c9ae4cd416 Fix possible crash on AVDTP Suspend req timeout
This fixes possible bluetoothd crash on AVDTP Suspend request timeout
if A2DP client was destroyed after the request was sent but before its
timeout handled.

If Suspend request times out due to any reason, then references to A2DP
session and stream are cleared in unix_client. Therefore, callback cannot
be removed when unix_client is destroyed (e.g. on incomming call).

After that, consequent Abort request is sent. If the request times out
as well, than stream_state_changed callback is invoked to change AVDTP
state to Idle, which causes crash due to NULL dereferencing.

Therefore, it is important to keep references to AVDTP session and stream
in unix_client until it is destroyed.
2011-02-02 12:10:09 +02:00
Johan Hedberg
71ba00415b Clean up hciops dev_info init code a little bit 2011-02-02 01:21:52 +02:00
Luiz Augusto von Dentz
dc2860e16a Fix stopping inquiry before adapter object is initialized
This can cause errors on command complete since the adapter object could
not be found to set its mode.
2011-02-02 01:07:50 +02:00
Luiz Augusto von Dentz
149f5d0b49 Fix sending HCIDEVUP when adapter is already up
There is no need for HCIDEVUP/fork in such cases it will just consume
more resources for no reason.

To fix this HCI_DEV_REG is no longer generate for adapter already up
instead init_device is called directly which simplify the code path.
2011-02-02 01:06:44 +02:00
Andre Dieb Martins
ea6c8a871f Fix hciconfig leadv returned response
Fixes hciconfig leadv returned response by treating both status of the
command execution and HCI error code.
2011-02-01 11:07:00 +02:00
Johan Hedberg
cfd434354d Remove unused device variables 2011-02-01 10:33:11 +02:00
Luiz Augusto von Dentz
1530ae1df3 Fix creating device object when connection fails
There is no need to create a new object since there is no connection and
the device is not permanent/paired.
2011-02-01 10:28:17 +02:00
Johan Hedberg
596e8ddd21 Remove unneeded adapter_ops->request_authentication callback 2011-01-31 15:10:11 +02:00
Claudio Takahasi
a026163d2c Add option to enable privacy during scanning to hcitool
When privacy is enabled, random address is used during active scanning.
The non-resolvable private address shall be set using hciconfig.
2011-01-31 10:37:05 +02:00
Claudio Takahasi
150f7a26db Add option to set LE random address to hciconfig 2011-01-31 10:37:02 +02:00
Johan Hedberg
1cd99f445e Fix bonding IO channel closing
The kernel seems to have some state tracking issues if we close the
bonding socket before it gets into connected state. This needs to be
investigated on the kernel side but a simple fix is to let the socket be
closed in its BtIO callback instead of through some HCI event (for the
successful case).
2011-01-29 15:18:56 +02:00
Johan Hedberg
629c9dbe7f Add some more debug prints to the bonding procedure 2011-01-29 10:23:15 +02:00
Johan Hedberg
d04f4e1df5 Remove redundant device_is_authenticating check 2011-01-29 09:57:23 +02:00
Johan Hedberg
253209e37f Fix error response for connection failures 2011-01-29 09:20:15 +02:00
Johan Hedberg
d4a25e44a8 Fix agent cancellation in security mode 3 situations
When there's a connection failure the issue needs to be communicated to
the device bonding logic so that any pending agent request is cancelled.
2011-01-29 09:04:00 +02:00
Johan Hedberg
ec1949bf4c Add debug log for agent cancellation 2011-01-29 09:00:26 +02:00
Johan Hedberg
b18b51e97b Create a separate conn_failed callback to match mgmt interface 2011-01-29 11:33:32 +02:00
Johan Hedberg
32c3d13c1f Clean up connection failure handling 2011-01-29 11:27:18 +02:00
Johan Hedberg
fa41c93fe1 Rename btd_event_bonding_process_complete to btd_event_bonding_complete 2011-01-29 10:56:15 +02:00
Johan Hedberg
5ac0142426 hciops: Use g_slist_prepend instead of g_slist_append for storing keys
Once a key is generated it's likely to be used soon again. Therefore,
store it in the beginning of the list for fast lookup.
2011-01-28 23:57:48 +02:00
Johan Hedberg
c614654d76 hciops: Remove unnecessary conn->key_type
Since we always store the keys in runtime memory there's no need to have
a separate per-connection variable for the key type.
2011-01-28 23:54:52 +02:00
Johan Hedberg
b9efb73d37 Refactor pairing code to match the management interface
This patch refactors the pairing code in hciops and the core daemon to
better match the management interface. Particularly all logic regarding
IO capabilities and authentication requirements are moved into hciops.c.
The patch is quite big because there are a lot of cross-dependencies
which makes it difficult to split the changes up into smaller chunks.

The important adapter_ops preparations for the management interface in
this patch are the create_bonding and cancel_bonding callbacks. Those
will be directly mapped to corresponding management commands.
2011-01-28 23:34:39 +02:00
Elvis Pfutzenreuter
1effccc664 HDP: reject MDL reconnection with different MTU
This patch implements refusal of a MDL reconnection if the new L2CAP
connection presents a different MTU. Accordingly to HDP spec. item 3.5.

It aims to pass the TC_SNK_HCT_BV_07_C PTS test. (It does not pass yet
because PTS itself seems to have issues. See tickets 7212, 7214 and
7244 for details.)
2011-01-28 18:07:55 +02:00
Elvis Pfützenreuter
5d57b628c2 Add Health API document to distribution package 2011-01-27 17:54:38 +02:00
Andrei Emeltchenko
2430512c98 Bluetooth: flushable packet supports headers
Modify headers to enable support for flushable packets. Following
commit: 8bcbd526c84724d8de087130d53e79da256e34bf to linux kernel
implements functionality on kernel side.
2011-01-27 11:00:21 +02:00
Pavan Savoy
06ee7ea71b hciops: remove scan disable on poweroff
Remove sending of the scan disable command when the device is being
powered off. This was originally a safe-guard for the non-connectable
GAP test case in case the HCI driver leaves the controller powered after
the DEV_DOWN ioctl, but now-days it can be expected that drivers behave
properly.
2011-01-26 13:33:40 +02:00
Marcel Holtmann
9963f1b1e2 Release 4.87 2011-01-25 22:08:26 +01:00