- 08 11月, 2011 3 次提交
-
-
由 Andrei Emeltchenko 提交于
Use HCI error reasons instead of magic numbers. Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Luiz Augusto von Dentz 提交于
This implement priority based scheduler using skbuffer priority set via SO_PRIORITY socket option. It introduces hci_chan_hash (list of HCI Channel/hci_chan) per connection, each item in this list refer to a L2CAP connection and it is used to queue the data for transmission. Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Luiz Augusto von Dentz 提交于
When all items in the list have the same type there is no much of a point to use list_for_each except if you want to use the list pointer itself. Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 28 9月, 2011 1 次提交
-
-
由 Anderson Lizardo 提交于
The new connection parameters now match the recommended values for Proximity and Health Thermometer profiles. The previous values were ramdomly chosen, and are either too low or too high for most cases. New values: Scan Interval: 60 ms Scan Window: 30 ms Minimum Connection Interval: 50 ms Maximum Connection Interval: 70 ms Supervision Timeout: 420 ms See "Table 5.2: Recommended Scan Interval and Scan Window Values" and "Table 5.3: Recommended Connection Interval Values" for both profiles for details. Note that the "fast connection" parameters were chosen, because we do not support yet dynamically changing these parameters from initiator side. Additionally, the Proximity profile recommends (section "4.4 Alert on Link Loss"): "It is recommended that the Link Supervision Timeout (LSTO) is set to 6x the connection interval." Minimum_CE_Length and Maximum_CE_Length were also changed from 0x0001 to 0x0000 because they are informational and optional, and old value was not reflecting reality. Signed-off-by: NAnderson Lizardo <anderson.lizardo@openbossa.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 21 9月, 2011 1 次提交
-
-
由 Anderson Briglia 提交于
This patch fixes wrong memcpy size when copying rand value to HCI_OP_LE_START_ENC command. The compiler pretends that the array parameter was declared as a pointer and sizeof reports the size of the pointer. [1] [1] http://www.c-faq.com/aryptr/aryparmsize.htmlSigned-off-by: NAnderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: NAnderson Lizardo <anderson.lizardo@openbossa.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 01 7月, 2011 1 次提交
-
-
由 Tomas Targownik 提交于
If the remote device is not present, the connections attemp fails and the struct hci_conn was not freed Signed-off-by: NTomas Targownik <ttargownik@geicp.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 16 6月, 2011 1 次提交
-
-
由 Ilia Kolomisnky 提交于
In hci_conn_security ( which is used during L2CAP connection establishment ) test for HCI_CONN_ENCRYPT_PEND state also sets this state, which is bogus and leads to connection time-out on L2CAP sockets in certain situations (especially when using non-ssp devices ) Signed-off-by: NIlia Kolomisnky <iliak@ti.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 14 6月, 2011 3 次提交
-
-
由 Vinicius Costa Gomes 提交于
As the default security level (BT_SECURITY_SDP) doesn't make sense for LE links, initialize LE links with something that makes sense. Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Vinicius Costa Gomes 提交于
This adds support for starting SMP Phase 2 Encryption, when the initial SMP negotiation is successful. This adds the LE Start Encryption and LE Long Term Key Request commands and related events. Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Luiz Augusto von Dentz 提交于
With older userspace versions (using hciops) it might not have the key type to check if the key has sufficient security for any security level so it is necessary to check the return of hci_conn_auth to make sure the connection is authenticated Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com> Acked-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 09 6月, 2011 6 次提交
-
-
由 Waldemar Rymarkiewicz 提交于
If the link key is secure (authenticated or combination 16 digit) the sec_level will be always BT_SECURITY_HIGH. Therefore, instead of checking the link key type simply check the sec_level on the link. Signed-off-by: NWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Jaikumar Ganesh 提交于
Add BT_POWER socket option used to control the power characteristics of the underlying ACL link. When the remote end has put the link in sniff mode and the host stack wants to send data we need need to explicitly exit sniff mode to work well with certain devices (For example, A2DP on Plantronics Voyager 855). However, this causes problems with HID devices. Hence, moving into active mode when sending data, irrespective of who set the sniff mode has been made as a socket option. By default, we will move into active mode. HID devices can set the L2CAP socket option to prevent this from happening. Currently, this has been implemented for L2CAP sockets. This has been tested with incoming and outgoing L2CAP sockets for HID and A2DP. Based on discussions on linux-bluetooth and patches submitted by Andrei Emeltchenko. Signed-off-by: NJaikumar Ganesh <jaikumar@google.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Andre Guedes 提交于
Set the 'peer_addr_type' field of the LE Create Connection command sent in hci_le_connect(). Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org> Acked-by: NVille Tervo <ville.tervo@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Andre Guedes 提交于
When connecting to a LE device, we need to check the advertising cache in order to know the address type of that device. If its advertising entry is not found, the connection is not established and hci_connect() returns error. Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org> Acked-by: NVille Tervo <ville.tervo@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Andre Guedes 提交于
There is no need to check the connection's state since hci_conn_add() has just created a new connection and its state has been set properly. Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org> Acked-by: NVille Tervo <ville.tervo@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Waldemar Rymarkiewicz 提交于
Legacy devices don't re-authenticate the link properly if a link key already exists. Thus, don't update sec_level for this case even if hci_auth_complete_evt indicates success. Otherwise the sec_level will not reflect a real security on the link. Signed-off-by: NWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 12 5月, 2011 1 次提交
-
-
由 Waldemar Rymarkiewicz 提交于
In case of pre v2.1 devices authentication request will return success immediately if the link key already exists without any authentication process. That means, it's not possible to re-authenticate the link if you already have combination key and for instance want to re-authenticate to get the high security (use 16 digit pin). Therefore, it's necessary to check security requirements on auth complete event to prevent not enough secure connection. Signed-off-by: NWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 29 4月, 2011 2 次提交
-
-
由 Johan Hedberg 提交于
Some test systems require an arbitrary delay to the auto-accept test cases for Secure Simple Pairing in order for the tests to pass. Previously when this was handled in user space it was worked around by code modifications and recompilation, but now that it's on the kernel side it's more convenient if there's a debugfs interface for it. Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Waldemar Rymarkiewicz 提交于
Keep the link key type together with connection and use it to map security level to link key requirements. Authenticate and/or encrypt connection if the link is insufficiently secure. Signed-off-by: NWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 28 2月, 2011 1 次提交
-
-
由 Ville Tervo 提交于
Use ERR_PTR mechanism to return error from hci_connect. Signed-off-by: NVille Tervo <ville.tervo@nokia.com> Signed-off-by: NAnderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 22 2月, 2011 2 次提交
-
-
由 Anderson Briglia 提交于
This patch prevents a crash when remote host tries to create a LE link which already exists. i.e.: call l2test twice passing the same parameters. Signed-off-by: NAnderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: NVille Tervo <ville.tervo@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Johan Hedberg 提交于
The remote authentication requirements for conections need to be initialized to 0xff (unknown) since it is possible that we receive a IO Capability Request before we have received information about the remote requirements. Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 17 2月, 2011 4 次提交
-
-
由 Claudio Takahasi 提交于
If the new connection update parameter are accepted, the LE master host sends the LE Connection Update Command to its controller informing the new requested parameters. Signed-off-by: NClaudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Vinicius Costa Gomes 提交于
Fix LE connections not being marked as master. Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@openbossa.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Ville Tervo 提交于
Bluetooth chips may have separate buffers for LE traffic. This patch add support to use LE buffers provided by the chip. Signed-off-by: NVille Tervo <ville.tervo@nokia.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Ville Tervo 提交于
Bluetooth V4.0 adds support for Low Energy (LE) connections. Specification introduces new set of hci commands to control LE connection. This patch adds logic to create, cancel and disconnect LE connections. Signed-off-by: NVille Tervo <ville.tervo@nokia.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 08 2月, 2011 1 次提交
-
-
由 Johan Hedberg 提交于
This patch adds a new set_io_capability management command which is used to set the IO capability for Secure Simple Pairing (SSP) as well as the Security Manager Protocol (SMP). The value is per hci_dev and each hci_conn object inherits it upon creation. Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 20 1月, 2011 3 次提交
-
-
由 Johan Hedberg 提交于
The conn->sec_level value is supposed to represent the current level of security that the connection has. However, by assigning to it before requesting authentication it will have the wrong value during the authentication procedure. To fix this a pending_sec_level variable is added which is used to track the desired security level while making sure that sec_level always represents the current level of security. Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Johan Hedberg 提交于
If an existing connection has a MITM protection requirement (the first bit of the auth_type) then that requirement should not be cleared by new sockets that reuse the ACL but don't have that requirement. Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
由 Johan Hedberg 提交于
This reverts commit 04530982. That commit is wrong for two reasons: - The conn->sec_level shouldn't be updated without performing authentication first (as it's supposed to represent the level of security that the existing connection has) - A higher auth_type value doesn't mean "more secure" like the commit seems to assume. E.g. dedicated bonding with MITM protection is 0x03 whereas general bonding without MITM protection is 0x04. hci_conn_auth already takes care of updating conn->auth_type so hci_connect doesn't need to do it. Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 02 12月, 2010 1 次提交
-
-
由 Andrei Emeltchenko 提交于
Do not use assignment in IF condition, remove extra spaces, fixing typos, simplify code. Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@nokia.com> Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
-
- 28 7月, 2010 1 次提交
-
-
由 Marcel Holtmann 提交于
Certain headsets such as the Motorola H350 will reject SCO and eSCO connection requests while the ACL is transitioning from sniff mode to active mode. Add synchronization so that SCO and eSCO connection requests will wait until the ACL has fully transitioned to active mode. < HCI Command: Exit Sniff Mode (0x02|0x0004) plen 2 handle 12 > HCI Event: Command Status (0x0f) plen 4 Exit Sniff Mode (0x02|0x0004) status 0x00 ncmd 1 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17 handle 12 voice setting 0x0040 > HCI Event: Command Status (0x0f) plen 4 Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 12 packets 1 > HCI Event: Mode Change (0x14) plen 6 status 0x00 handle 12 mode 0x00 interval 0 Mode: Active > HCI Event: Synchronous Connect Complete (0x2c) plen 17 status 0x10 handle 14 bdaddr 00:1A:0E:50:28:A4 type SCO Error: Connection Accept Timeout Exceeded Signed-off-by: NRon Shaffer <rshaffer@codeaurora.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 22 7月, 2010 1 次提交
-
-
由 Ron Shaffer 提交于
Qualcomm, Inc. has reassigned rights to Code Aurora Forum. Accordingly, as files are modified by Code Aurora Forum members, the copyright statement will be updated. Signed-off-by: NRon Shaffer <rshaffer@codeaurora.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 09 7月, 2010 1 次提交
-
-
由 Ville Tervo 提交于
Update auth level for already existing connections if it is lower than required by new connection. Signed-off-by: NVille Tervo <ville.tervo@nokia.com> Reviewed-by: NEmeltchenko Andrei <andrei.emeltchenko@nokia.com> Signed-off-by: NLuciano Coelho <luciano.coelho@nokia.com> Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@nokia.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 04 2月, 2010 1 次提交
-
-
由 Nick Pelly 提交于
When in sniff mode with a long interval time (1.28s) it can take 4+ seconds to establish a SCO link. Fix by requesting active mode before requesting SCO connection. This improves SCO setup time to ~500ms. Bluetooth headsets that use a long interval time, and exhibit the long SCO connection time include Motorola H790, HX1 and H17. They have a CSR 2.1 chipset. Verified this behavior and fix with host Bluetooth chipsets: BCM4329 and TI1271. 2009-10-13 14:17:46.183722 > HCI Event: Mode Change (0x14) plen 6 status 0x00 handle 1 mode 0x02 interval 2048 Mode: Sniff 2009-10-13 14:17:53.436285 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17 handle 1 voice setting 0x0060 2009-10-13 14:17:53.445593 > HCI Event: Command Status (0x0f) plen 4 Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1 2009-10-13 14:17:57.788855 > HCI Event: Synchronous Connect Complete 0x2c) plen 17 status 0x00 handle 257 bdaddr 00:1A:0E:F1:A4:7F type eSCO Air mode: CVSD Signed-off-by: NNick Pelly <npelly@google.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 16 11月, 2009 1 次提交
-
-
由 Andrei Emeltchenko 提交于
This patch fixes double pairing issues with Secure Simple Paring support. It was observed that when pairing with SSP enabled, that the confirmation will be asked twice. http://www.spinics.net/lists/linux-bluetooth/msg02473.html This also causes bug when initiating SSP connection from Windows Vista. The reason is because bluetoothd does not store link keys since HCIGETAUTHINFO returns 0. Setting default to general bonding fixes these issues. Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@nokia.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 23 8月, 2009 1 次提交
-
-
由 Marcel Holtmann 提交于
The device model itself has no real usable reference counting at the moment and this causes problems if parents are deleted before their children. The device model itself handles the memory details of this correctly, but the uevent order is not consistent. This causes various problems for systems like HAL or even X. So until device_put() does a proper cleanup, the device for Bluetooth connection will be protected with an extra reference counting to ensure the correct order of uevents when connections are terminated. This is not an automatic feature. Higher Bluetooth layers like HIDP or BNEP should grab this new reference to ensure that their uevents are send before the ones from the parent device. Based on a report by Brian Rogers <brian@xyzw.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 10 5月, 2009 2 次提交
-
-
由 Marcel Holtmann 提交于
The connection setup phase takes around 2 seconds or longer and in that time it is possible that the need for an ACL connection is no longer present. If that happens then, the connection attempt will be canceled. This only applies to outgoing connections, but currently it can also be triggered by incoming connection. Don't call hci_acl_connect_cancel() on incoming connection since these have to be either accepted or rejected in this state. Once they are successfully connected they need to be fully disconnected anyway. Also remove the wrong hci_acl_disconn() call for SCO and eSCO links since at this stage they can't be disconnected either, because the connection handle is still unknown. Based on a report by Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Tested-by: NJohan Hedberg <johan.hedberg@nokia.com>
-
由 Marcel Holtmann 提交于
The module refcount is increased by hci_dev_hold() call in hci_conn_add() and decreased by hci_dev_put() call in del_conn(). In case the connection setup fails, hci_dev_put() is never called. Procedure to reproduce the issue: # hciconfig hci0 up # lsmod | grep btusb -> "used by" refcount = 1 # hcitool cc <non-exisiting bdaddr> -> will get timeout # lsmod | grep btusb -> "used by" refcount = 2 # hciconfig hci0 down # lsmod | grep btusb -> "used by" refcount = 1 # rmmod btusb -> ERROR: Module btusb is in use The hci_dev_put() call got moved into del_conn() with the 2.6.25 kernel to fix an issue with hci_dev going away before hci_conn. However that change was wrong and introduced this problem. When calling hci_conn_del() it has to call hci_dev_put() after freeing the connection details. This handling should be fully symmetric. The execution of del_conn() is done in a work queue and needs it own calls to hci_dev_hold() and hci_dev_put() to ensure that the hci_dev stays until the connection cleanup has been finished. Based on a report by Bing Zhao <bzhao@marvell.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Tested-by: NBing Zhao <bzhao@marvell.com>
-
- 05 5月, 2009 1 次提交
-
-
由 Marcel Holtmann 提交于
Due to a semantic changes in flush_workqueue() the current approach of synchronizing the sysfs handling for connections doesn't work anymore. The whole approach is actually fully broken and based on assumptions that are no longer valid. With the introduction of Simple Pairing support, the creation of low-level ACL links got changed. This change invalidates the reason why in the past two independent work queues have been used for adding/removing sysfs devices. The adding of the actual sysfs device is now postponed until the host controller successfully assigns an unique handle to that link. So the real synchronization happens inside the controller and not the host. The only left-over problem is that some internals of the sysfs device handling are not initialized ahead of time. This leaves potential access to invalid data and can cause various NULL pointer dereferences. To fix this a new function makes sure that all sysfs details are initialized when an connection attempt is made. The actual sysfs device is only registered when the connection has been successfully established. To avoid a race condition with the registration, the check if a device is registered has been moved into the removal work. As an extra protection two flush_work() calls are left in place to make sure a previous add/del work has been completed first. Based on a report by Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Tested-by: NJustin P. Mattock <justinmattock@gmail.com> Tested-by: NRoger Quadros <ext-roger.quadros@nokia.com> Tested-by: NMarc Pignat <marc.pignat@hevs.ch>
-