OSDN Git Service

android-x86/external-bluetooth-bluez.git
13 years agoAdd a way to retrieve ATT primary services
Vinicius Costa Gomes [Thu, 23 Dec 2010 00:21:13 +0000 (22:21 -0200)]
Add a way to retrieve ATT primary services

As the primary services were discovered by the core bluetoothd, we need
a way to export that information.

The service discovery uses the same primary list as the device, there's no
need to free that list when the discovery finishes. That list will be removed
when the device is free'd.

13 years agoAdd support for creating devices from stored primary services
Vinicius Costa Gomes [Thu, 23 Dec 2010 00:16:37 +0000 (22:16 -0200)]
Add support for creating devices from stored primary services

From what we can retrieve from storage we are able to create the devices
and probe the device drivers.

13 years agoAdd support for creating devices from stored types
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:28 +0000 (19:26 -0200)]
Add support for creating devices from stored types

This adds a way to restore devices from their types.

13 years agoAdd support for storing the device type
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:27 +0000 (19:26 -0200)]
Add support for storing the device type

When the service discovery (SDP or GATT) is finished, write the device
type so it can be retrieved from storage when needed.

13 years agosbc: detect when bitpool has changed
Luiz Augusto von Dentz [Wed, 22 Dec 2010 09:35:48 +0000 (11:35 +0200)]
sbc: detect when bitpool has changed

A2DP spec allow bitpool changes midstream which is why sbc configuration
has a range of values for bitpool that the encoder can use and decoder
must support.

Bitpool changes do not affect the state of encoder/decoder so they don't
need to be reinitialize when this happens, so the impact is fairly small,
what it does change is the frame length so encoders may change the
bitpool to use the link more efficiently.

13 years agoChange LE scan interval and window to recommended values
Bruna Moreira [Wed, 22 Dec 2010 19:11:48 +0000 (15:11 -0400)]
Change LE scan interval and window to recommended values

Replace default scan interval and scan window values with recommended
ones for general discovery procedure, according to the Core
specification.

13 years agoMove primary service storage to device.c
Sheldon Demario [Wed, 22 Dec 2010 22:01:13 +0000 (17:01 -0500)]
Move primary service storage to device.c

Discover All Primary Services has beed moved to device.c in order
to follow a similar approach of BR/EDR service records.

13 years agoAdd a way to store the remote device type
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:26 +0000 (19:26 -0200)]
Add a way to store the remote device type

Because we need to know the device type (LE, Basic Rate or Dual Mode)
to be able to fully restore the device from storage, we have to store
and load this information to permanent storage.

Note: due to "device_type_t" usage in storage.h, some header includes
needed to be reordered in files which include storage.h.

13 years agoFix memory leaks in the attrib-server
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:24 +0000 (19:26 -0200)]
Fix memory leaks in the attrib-server

13 years agoFix attrib plugin deregistration
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:23 +0000 (19:26 -0200)]
Fix attrib plugin deregistration

As the comparison method used for find what to de-register was
wrong, it was causing the btd_device reference that the attrib
plugin was keeping never to be dropped.

13 years agoConfigure HFP/HSP endpoints if headset interface is already connected
Luiz Augusto von Dentz [Tue, 21 Dec 2010 15:43:15 +0000 (17:43 +0200)]
Configure HFP/HSP endpoints if headset interface is already connected

HFP/HSP can be connected when registering an endpoint which is different
than on a2dp where the sep cannot be configured already since it wasn't
available before.

13 years agoRemove unneeded variables from link_key_request()
Johan Hedberg [Tue, 21 Dec 2010 13:01:04 +0000 (15:01 +0200)]
Remove unneeded variables from link_key_request()

13 years agoRemove unneeded variable
Claudio Takahasi [Tue, 21 Dec 2010 12:02:48 +0000 (08:02 -0400)]
Remove unneeded variable

13 years agoAdd disconnect command to test-device
Johan Hedberg [Tue, 21 Dec 2010 09:22:57 +0000 (11:22 +0200)]
Add disconnect command to test-device

13 years agoCoding style fixes for lib and tools
Michal Labedzki [Tue, 21 Dec 2010 08:34:49 +0000 (09:34 +0100)]
Coding style fixes for lib and tools

13 years agoRemove bt_discover_services function from glib-helper
Sheldon Demario [Mon, 20 Dec 2010 23:06:02 +0000 (18:06 -0500)]
Remove bt_discover_services function from glib-helper

There is no reference in the code for this function. SDP discovery in
the bluetoothd core and plugins are now using bt_search_service only.

13 years agoFix missing reply when create device is cancelled
Claudio Takahasi [Mon, 20 Dec 2010 22:47:35 +0000 (19:47 -0300)]
Fix missing reply when create device is cancelled

When CancelDeviceCreation is called or when the device is removed for
any reason, the reply for the pending CreateDevice is not sent.

13 years agoRemove le_advertising_info struct from adapter.c
Bruna Moreira [Mon, 20 Dec 2010 18:16:45 +0000 (14:16 -0400)]
Remove le_advertising_info struct from adapter.c

13 years agoMove EIR flags definitions to adapter.c
Bruna Moreira [Mon, 20 Dec 2010 18:16:44 +0000 (14:16 -0400)]
Move EIR flags definitions to adapter.c

13 years agoRemove unused variables from link_key_request()
Johan Hedberg [Mon, 20 Dec 2010 19:16:02 +0000 (21:16 +0200)]
Remove unused variables from link_key_request()

13 years agoMove debug key handling into adapter_ops
Johan Hedberg [Mon, 20 Dec 2010 17:38:43 +0000 (19:38 +0200)]
Move debug key handling into adapter_ops

There's no need for the core daemon to have special handling for debug
keys anymore as long as it tells adapter_ops if they are enabled or not
(new parameter added to adapter_ops->load_keys).

13 years agoAdd initial code for mgmtops adapter power control
Johan Hedberg [Mon, 20 Dec 2010 17:14:07 +0000 (19:14 +0200)]
Add initial code for mgmtops adapter power control

13 years agoFix tools UI to avoid program launch mistakes.
Michal Labedzki [Mon, 20 Dec 2010 10:13:48 +0000 (11:13 +0100)]
Fix tools UI to avoid program launch mistakes.

hciconfig: warrning user on unknown commands
hcitool: return error on unknown command in hcitool
fix length size in comparision to avoid ambiguity commands
check if command number of arguments is correct

13 years agoFix memory leak of unused EIR name
Anderson Lizardo [Mon, 20 Dec 2010 15:32:19 +0000 (11:32 -0400)]
Fix memory leak of unused EIR name

There is a code path in btd_event_device_found() where the EIR name is
not used. This requires freeing eir_data.name to avoid a leak.

13 years agoFix compilation error in read_simple_pairing_mode_complete
Johan Hedberg [Mon, 20 Dec 2010 11:45:09 +0000 (13:45 +0200)]
Fix compilation error in read_simple_pairing_mode_complete

This slipped in by mistake when doing the find -> find_by_id change.

13 years agoUse find_adapter_by_id instead of find_adapter when it makes sense
Johan Hedberg [Mon, 20 Dec 2010 10:42:01 +0000 (12:42 +0200)]
Use find_adapter_by_id instead of find_adapter when it makes sense

In most cases it's more convenient to use the adapter index when looking
up the adapter object since the index is always available in the
adapter_ops callbacks.

13 years agoGet rid of unnecessary manager_stop_adapter function
Johan Hedberg [Mon, 20 Dec 2010 10:35:09 +0000 (12:35 +0200)]
Get rid of unnecessary manager_stop_adapter function

13 years agoSimplify disconnect_addr helper function
Johan Hedberg [Sun, 19 Dec 2010 18:31:11 +0000 (20:31 +0200)]
Simplify disconnect_addr helper function

13 years agoGet rid of unneeded btd_adapter_get_conn_handle function
Johan Hedberg [Sun, 19 Dec 2010 14:50:27 +0000 (16:50 +0200)]
Get rid of unneeded btd_adapter_get_conn_handle function

13 years agoFix handle endianess issues with btd_adapter_read_clock
Johan Hedberg [Sun, 19 Dec 2010 14:34:44 +0000 (16:34 +0200)]
Fix handle endianess issues with btd_adapter_read_clock

13 years agoClean up btd_request_authorization code
Johan Hedberg [Sun, 19 Dec 2010 14:17:15 +0000 (16:17 +0200)]
Clean up btd_request_authorization code

13 years agoRemove unnecessary btd_adapter_get_remote_version function
Johan Hedberg [Sun, 19 Dec 2010 13:30:29 +0000 (15:30 +0200)]
Remove unnecessary btd_adapter_get_remote_version function

13 years agoRename btd_event_inquiry_result to btd_event_device_found
Johan Hedberg [Sun, 19 Dec 2010 13:16:29 +0000 (15:16 +0200)]
Rename btd_event_inquiry_result to btd_event_device_found

13 years agoMove PIN code storage access to core daemon
Johan Hedberg [Sun, 19 Dec 2010 13:04:32 +0000 (15:04 +0200)]
Move PIN code storage access to core daemon

13 years agoMove storage dependencies from hciops to core daemon
Johan Hedberg [Sun, 19 Dec 2010 12:40:54 +0000 (14:40 +0200)]
Move storage dependencies from hciops to core daemon

13 years agoMove local name parsing to parse_eir_data()
Anderson Lizardo [Fri, 17 Dec 2010 14:57:24 +0000 (10:57 -0400)]
Move local name parsing to parse_eir_data()

13 years agoMove AD flags parsing to parse_eir_data()
Anderson Lizardo [Fri, 17 Dec 2010 14:57:23 +0000 (10:57 -0400)]
Move AD flags parsing to parse_eir_data()

13 years agoModify get_eir_uuids() to parse other EIR data
Anderson Lizardo [Fri, 17 Dec 2010 14:57:22 +0000 (10:57 -0400)]
Modify get_eir_uuids() to parse other EIR data

Currently, EIR parsing (name, UUIDs, flags etc.) is done in various
places. This leads to duplicated checks and does not support parsing
multiple AD/EIR structures on a single transfer.

These changes modify get_eir_uuids() to parse other EIR data types and
avoid passing raw EIR data to higher layers.

To accomplish this, get_eir_uuids() was renamed to parse_eir_data(), and
a new (internal) "struct eir_data" was introduced to store the parsed
data.

This first commit only handles the services UUIDs, following patches
will move other EIR parsing to it until everything is done inside
parse_eir_data().

13 years agoMove get_eir_uuids() from src/adapter.c to src/event.c
Anderson Lizardo [Sun, 19 Dec 2010 12:23:26 +0000 (14:23 +0200)]
Move get_eir_uuids() from src/adapter.c to src/event.c

Moving get_eir_uuids() to src/event.c removes the need to pass the raw
EIR data to higher layers. Now it is not necessary to pass the original
GSList of service UUIDs, because the list is concatenated (with
verification of duplicate entries) on adapter_update_device_from_info()
(for LE) and adapter_update_found_devices() (for BR/EDR).

13 years agoAdd enc_read_blob_req() as defined in BT Core Spec v4.0
Brian Gix [Fri, 17 Dec 2010 19:08:53 +0000 (11:08 -0800)]
Add enc_read_blob_req() as defined in BT Core Spec v4.0

13 years agoRemove unused btd_adapter_get_remote_name function
Johan Hedberg [Sun, 19 Dec 2010 11:51:28 +0000 (13:51 +0200)]
Remove unused btd_adapter_get_remote_name function

13 years agoRemove unnecessary empty line
Johan Hedberg [Sun, 19 Dec 2010 11:46:16 +0000 (13:46 +0200)]
Remove unnecessary empty line

13 years agoRemove non-existent adapter_is_ready prototype
Johan Hedberg [Sun, 19 Dec 2010 11:43:49 +0000 (13:43 +0200)]
Remove non-existent adapter_is_ready prototype

13 years agoRemove non-existent btd_adapter_get_init_mode prototype
Johan Hedberg [Sun, 19 Dec 2010 11:42:47 +0000 (13:42 +0200)]
Remove non-existent btd_adapter_get_init_mode prototype

13 years agoRemove non-existent adapter_set_service_classes prototype
Johan Hedberg [Sun, 19 Dec 2010 11:40:27 +0000 (13:40 +0200)]
Remove non-existent adapter_set_service_classes prototype

13 years agoGet rid of unused btd_manager_set_offline function
Johan Hedberg [Sun, 19 Dec 2010 11:39:10 +0000 (13:39 +0200)]
Get rid of unused btd_manager_set_offline function

13 years agoGet rid of non-existend manager_update_svc prototype
Johan Hedberg [Sun, 19 Dec 2010 11:35:58 +0000 (13:35 +0200)]
Get rid of non-existend manager_update_svc prototype

13 years agoGet rid of unnecessary manager_get_default_adapter function
Johan Hedberg [Sun, 19 Dec 2010 11:35:13 +0000 (13:35 +0200)]
Get rid of unnecessary manager_get_default_adapter function

13 years agoGet rid of unnecessary manager_find_adapter_by_path function
Johan Hedberg [Sun, 19 Dec 2010 11:33:18 +0000 (13:33 +0200)]
Get rid of unnecessary manager_find_adapter_by_path function

13 years agoGet rid of unnecessary manager_find_adapter_by_address function
Johan Hedberg [Sun, 19 Dec 2010 11:32:04 +0000 (13:32 +0200)]
Get rid of unnecessary manager_find_adapter_by_address function

13 years agoAdd manager_foreach_adapter()
Johan Hedberg [Sun, 19 Dec 2010 11:25:51 +0000 (13:25 +0200)]
Add manager_foreach_adapter()

Ultimately manager_get_adapters shouldn't be needed at all. By
introducing manager_foreach_adapter most instances can be removed.

13 years agoFix memory leak in adapter_service_ins_rem()
Johan Hedberg [Sun, 19 Dec 2010 08:40:43 +0000 (10:40 +0200)]
Fix memory leak in adapter_service_ins_rem()

Since the adapters list is artificially created for specific adapters
(bdaddr != BDADDR_ANY) the list needs freeing at the end of the
function. However, there's no need to artificially create the list at
all if the address comparison is done within the for-loop. Since
manager_find_adapter needs to iterate through the adapters anyway while
comparing the address there really isn't a significant penalty in doing
this in the loop in adapter_service_ins_rem.

Based on the original report and initial patch from
Anderson Lizardo <anderson.lizardo@openbossa.org>.

13 years agoFix clearing authentication request for renewed keys
Johan Hedberg [Sun, 19 Dec 2010 00:01:55 +0000 (02:01 +0200)]
Fix clearing authentication request for renewed keys

In the case of upgrading an unauthenticated key to an authenticated one
there will be a second authentication request which needs to be cleared
upon the link key notification event.

13 years agoFix setting paired state when device->authr is false
Johan Hedberg [Sat, 18 Dec 2010 11:52:02 +0000 (13:52 +0200)]
Fix setting paired state when device->authr is false

Some buggy controllers might generate a link key notification even after
a disconnect has been requested. To make sure that device->paired is in
sync with the real paired state set the value independent of
device->authr when a link key notification happens. Below is a snippet
of such buggy (or at least strange) behavior from a controller:

< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 6 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Link Key Notification (0x18) plen 23
    bdaddr 00:26:CC:77:xx:xx key 33E6F2B75FC870AA794BB6249EBD6AC6 type 0
    Type: Combination Key
> HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 6
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 6 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 6 reason 0x16
    Reason: Connection Terminated by Local Host

13 years agoRemove unnecessary empty line
Johan Hedberg [Sat, 18 Dec 2010 11:51:48 +0000 (13:51 +0200)]
Remove unnecessary empty line

13 years agoImplement storing of link keys in runtime memory
Johan Hedberg [Sat, 18 Dec 2010 11:50:10 +0000 (13:50 +0200)]
Implement storing of link keys in runtime memory

The management interface will enable storing link keys in runtime memory
in the kernel. This patch makes the adapter interface match this model
and adds storing of link keys into hciops.

13 years agoAdd missing mgmtops callbacks
Johan Hedberg [Sat, 18 Dec 2010 02:38:16 +0000 (04:38 +0200)]
Add missing mgmtops callbacks

13 years agoSwitch to using power_on & power_off adapter_ops callbacks
Johan Hedberg [Sat, 18 Dec 2010 02:31:55 +0000 (04:31 +0200)]
Switch to using power_on & power_off adapter_ops callbacks

These map better to the new management interface.

13 years agoRemove hciops device info struct member defines
Johan Hedberg [Sat, 18 Dec 2010 01:49:14 +0000 (03:49 +0200)]
Remove hciops device info struct member defines

The struct is growing quite large and having a define for every member
is not really clean.

13 years agoRemove unnecessary read_local_ext_features callback
Johan Hedberg [Sat, 18 Dec 2010 00:32:45 +0000 (02:32 +0200)]
Remove unnecessary read_local_ext_features callback

13 years agoRefactor adapter initialization and power control
Johan Hedberg [Fri, 17 Dec 2010 12:07:19 +0000 (14:07 +0200)]
Refactor adapter initialization and power control

This (rather big) patch refactors the way that adapters are initialized
and powered on/off. The purpose is to align the adapter_ops <-> core
daemon interface with how the management interface will behave.

13 years agoRelease 4.82
Marcel Holtmann [Sat, 18 Dec 2010 19:34:45 +0000 (20:34 +0100)]
Release 4.82

13 years agoFix crash when mmaping files which size is multiple of page size
Luiz Augusto von Dentz [Fri, 17 Dec 2010 13:31:26 +0000 (15:31 +0200)]
Fix crash when mmaping files which size is multiple of page size

In this case the buffer returned by mmap is not NULL terminated so
functions like strpbrk that expect a string goes out of bounds.

To fix this strpbrk_len was introduced which takes the size of the buffer
making sure it never goes out of bounds.

13 years agoAdd AVDTP SRC stream send buffer size verification
Dmitriy Paliy [Wed, 15 Dec 2010 09:48:53 +0000 (11:48 +0200)]
Add AVDTP SRC stream send buffer size verification

Functions get_send_buffer_size and set_send_buffer_size are added to
avdpt.c.

get_send_buffer_size returns size of send buffer for a given socket
on success or error code on failure. set_send_buffer_size sets size
of send buffer for a given socket, and returns 0 on success or error
code on failure.

Size of send buffer for L2CAP socket for SRC AVDTP stream is verified
during establishment of a new transport channel. If the size is less
than twice of outgoing L2CAP MTU, then it is considered as being
insufficient to handle streaming data reliably.

In this case buffer size is increased to be twice of MTU size. Such
fixes some IOP problems with car-kits that use large MTU for music
playback.

13 years agoConvert more D-Bus errors to btd_error_*
Gustavo F. Padovan [Thu, 16 Dec 2010 17:58:09 +0000 (15:58 -0200)]
Convert more D-Bus errors to btd_error_*

13 years agoAdd btd_error_not_ready()
Gustavo F. Padovan [Thu, 16 Dec 2010 17:58:08 +0000 (15:58 -0200)]
Add btd_error_not_ready()

13 years agoAdd btd_error_agent_not_available()
Gustavo F. Padovan [Thu, 16 Dec 2010 17:58:07 +0000 (15:58 -0200)]
Add btd_error_agent_not_available()

13 years agoFix overriding global link_policy due to a single adapter
Johan Hedberg [Thu, 16 Dec 2010 17:48:48 +0000 (19:48 +0200)]
Fix overriding global link_policy due to a single adapter

The global link policy should remain unchanged even if an adapter
doesn't happen to support some features. These features should only be
disabled for that specific adapter.

13 years agoFix sending duplicate speaker/microphone gains to the headset
Luiz Augusto von Dentz [Thu, 16 Dec 2010 14:13:21 +0000 (16:13 +0200)]
Fix sending duplicate speaker/microphone gains to the headset

Current code only prevent duplicate D-Bus signals, so in case headset
changes the volume a client may set the same volume level again which
would be send as new volume level.

To fix this headset_set_gain now return -EALREADY if nothing has changed
so code using it can just ignore the change instead of sending to remote
device.

13 years agoFix not calling SetConfiguration on hfp/hsp endpoints before connected
Luiz Augusto von Dentz [Thu, 16 Dec 2010 14:13:20 +0000 (16:13 +0200)]
Fix not calling SetConfiguration on hfp/hsp endpoints before connected

This cause some clients like PulseAudio to fail to find a proper
transport since connected state is send before transport configuration
is set.

To fix this now SetConfiguration is called early on when headset is still
in connecting phase, this matches sink/source where SetConfiguration is
also called before connected.

13 years agoRemove error_common_reply()
Gustavo F. Padovan [Wed, 15 Dec 2010 22:07:01 +0000 (20:07 -0200)]
Remove error_common_reply()

Remove old dbus error report function. This patch doesn't make things
really really better, but is a start.

13 years agoFix memory leak of gattrib commands queue
Claudio Takahasi [Wed, 15 Dec 2010 20:00:09 +0000 (17:00 -0300)]
Fix memory leak of gattrib commands queue

13 years agoImplement cancel primary discovery session
Claudio Takahasi [Wed, 15 Dec 2010 19:54:08 +0000 (16:54 -0300)]
Implement cancel primary discovery session

Extend bt_cancel_discovery function to cancel an ongoing Discover
All Primary Services procedure.

13 years agoImplement support for management powered event
Johan Hedberg [Wed, 15 Dec 2010 22:41:41 +0000 (00:41 +0200)]
Implement support for management powered event

13 years agoRename set_powered callbacks accordingly
Johan Hedberg [Wed, 15 Dec 2010 22:41:10 +0000 (00:41 +0200)]
Rename set_powered callbacks accordingly

13 years agoFix invalid g_io_channel_unref call in hf_io_cb
Johan Hedberg [Wed, 15 Dec 2010 17:51:11 +0000 (19:51 +0200)]
Fix invalid g_io_channel_unref call in hf_io_cb

13 years agoFix signess of err variable passed to strerror
Johan Hedberg [Tue, 14 Dec 2010 13:43:41 +0000 (15:43 +0200)]
Fix signess of err variable passed to strerror

13 years agoFix add_record_to_server to return a proper error value
Johan Hedberg [Tue, 14 Dec 2010 08:52:18 +0000 (10:52 +0200)]
Fix add_record_to_server to return a proper error value

13 years agoFix start_discovery error return value
Johan Hedberg [Tue, 14 Dec 2010 08:52:04 +0000 (10:52 +0200)]
Fix start_discovery error return value

13 years agoUse correct signess for err variable
Johan Hedberg [Tue, 14 Dec 2010 08:51:41 +0000 (10:51 +0200)]
Use correct signess for err variable

13 years agoFix input disconnect function error return value
Johan Hedberg [Tue, 14 Dec 2010 08:51:03 +0000 (10:51 +0200)]
Fix input disconnect function error return value

13 years agoFix avctp_send_passthrough to return a proper error value
Johan Hedberg [Tue, 14 Dec 2010 08:50:34 +0000 (10:50 +0200)]
Fix avctp_send_passthrough to return a proper error value

13 years agosrc: use btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:07 +0000 (19:33 -0200)]
src: use btd_error_failed()

13 years agoserial: use btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:06 +0000 (19:33 -0200)]
serial: use btd_error_failed()

13 years agoaudio: use btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:05 +0000 (19:33 -0200)]
audio: use btd_error_failed()

13 years agoinput: use btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:04 +0000 (19:33 -0200)]
input: use btd_error_failed()

13 years agonetwork: use btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:03 +0000 (19:33 -0200)]
network: use btd_error_failed()

13 years agoattrib: use btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:02 +0000 (19:33 -0200)]
attrib: use btd_error_failed()

13 years agoplugins: use btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:01 +0000 (19:33 -0200)]
plugins: use btd_error_failed()

13 years agoAdd btd_error_failed()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:33:00 +0000 (19:33 -0200)]
Add btd_error_failed()

This is a special error type. It has a more general meaning and allows you
to add a string to the error.

13 years agosrc: use btd_error_invalid_args()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:32:59 +0000 (19:32 -0200)]
src: use btd_error_invalid_args()

13 years agoAdd btd_error_no_such_adapter()
Gustavo F. Padovan [Mon, 13 Dec 2010 21:32:58 +0000 (19:32 -0200)]
Add btd_error_no_such_adapter()

13 years agoUpdate mgmt-api.txt to match current implementation of read_info
Johan Hedberg [Mon, 13 Dec 2010 19:35:24 +0000 (21:35 +0200)]
Update mgmt-api.txt to match current implementation of read_info

13 years agoSetting default Link Policy according to the chip supported features
Pawel Wieczorkiewicz [Mon, 13 Dec 2010 14:19:14 +0000 (15:19 +0100)]
Setting default Link Policy according to the chip supported features

By default all features are enabled (RSWITCH, HOLD, PARK, SNIFF).
When "read local supported features" complete event occurs, not supported
features are disabled and then "Write default link policy" command with
supported features is sent.

On behalf of ST-Ericsson SA

13 years agoFix potential memory leak of ag.number
Johan Hedberg [Mon, 13 Dec 2010 12:08:02 +0000 (14:08 +0200)]
Fix potential memory leak of ag.number

13 years agoRename hciops_set_class to write_class
Johan Hedberg [Mon, 13 Dec 2010 10:30:25 +0000 (12:30 +0200)]
Rename hciops_set_class to write_class

Since hciops_set_class isn't (anymore) part of the exported adapter_ops
callbacks it's better to change it's name to avoid confusion.

13 years agoRefactor class of device (and related values) handling to adapter_ops
Johan Hedberg [Mon, 13 Dec 2010 09:12:03 +0000 (11:12 +0200)]
Refactor class of device (and related values) handling to adapter_ops

The management interface will move class of device and extended inquiry
response handling to the kernel side so the same functionality needs to
be moved into hciops. These features are quite tightly coupled in
bluetoothd so splitting this into multiple patches would have been hard
(if not impossible). Thus this quite large single commit.

13 years agoFix cleaning up HFP state after calling telephony_exit
Johan Hedberg [Sun, 12 Dec 2010 21:03:59 +0000 (23:03 +0200)]
Fix cleaning up HFP state after calling telephony_exit

HFP state variables in telephony.h need to be reset when telephony_exit
is called. This is even more important now that telephony_init/exit get
called simply by toggling the adapter powered state.

13 years agoDon't strdup the chld string for HFP
Johan Hedberg [Sun, 12 Dec 2010 21:02:32 +0000 (23:02 +0200)]
Don't strdup the chld string for HFP

The chld string is of type const char * and is referring to a fixed
string in the telephony driver. I.e. there's no need to strdup it.

13 years agoRemove unused adapter_ops->read_link_policy function
Johan Hedberg [Sat, 11 Dec 2010 22:00:19 +0000 (00:00 +0200)]
Remove unused adapter_ops->read_link_policy function

There is no code to react to the command complete of this HCI command so
there's really no value in issuing it to begin with.