- 08 Nov, 2011 4 commits
-
-
Johan Hedberg authored
A proper mgmt_command_status should be returned to user-space if either discoverable or connectable enabling fails. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
Based on the revised mgmt API set_discoverable has a timeout parameter to specify how long the adapter will remain discoverable. A value of 0 means "indefinitively". Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
By using periodic inquiry command we're not able to detect correctly when the controller has started inquiry. Today we have this workaround in inquiry result event handler to set the HCI_INQUIRY flag when it sees the first inquiry result event. This workaround isn't enough because the device may be performing an inquiry but the HCI_INQUIRY flag is not set. For instance, if there is no device in range, no inquiry result event is generated, consequently, the HCI_INQUIRY flags isn't set when it should so. We rely on HCI_INQUIRY flag to implement the discovery procedure properly. So, as we aren't able to clear/set the HCI_INQUIRY flag in a reliable manner, periodic inquiry events shouldn't change the HCI_INQUIRY flag. Thus, due to that issue and in order to keep compatibility with userspace, periodic inquiry events shouldn't send mgmt discovering events. In future, we might track if periodic inquiry is enabled or not. By tracking this state we'll be able to do some improvements in Discovery such as failing MGMT_OP_START_DISCOVERY command in case periodic inquiry is on. We can also send no mgmt_device_found event if periodic inquiry is on. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andrei Emeltchenko authored
Use HCI error reasons instead of magic numbers. Signed-off-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 07 Nov, 2011 2 commits
-
-
Johan Hedberg authored
This patch adds a new label to hci_cc_write_scan_enable to avoid unnecessary indentation. This will be convenient especially when new code for the discoverable timeout gets added. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
This patch adds the necessary code to send proper command status or command complete events to the start/stop discovery management commands. Before this patch these events were completely missing. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 13 Oct, 2011 1 commit
-
-
Andrei Emeltchenko authored
Implementation of Read Local AMP Info Command Signed-off-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 11 Oct, 2011 1 commit
-
-
Gustavo F. Padovan authored
With 0444 it is impossible to change the param, changing it to 0644. Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 29 Sep, 2011 2 commits
-
-
Andre Guedes authored
There is no reason to treat the first advertising entry differently from the potential other ones. Besides, the current implementation can easily leads to typos. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Waldemar Rymarkiewicz authored
Checking conn->pending_sec_level if there is no connection leads to potential null pointer dereference. Don't process pin_code_request_event at all if no connection exists. Signed-off-by:
Waldemar Rymarkiewicz <waldemar.rymarkiewicz@gmail.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 21 Sep, 2011 3 commits
-
-
Andre Guedes authored
This patch reduces the critial region (protected by hdev->lock) in hci_cc_le_set_scan_enable(). This way, only really required code is synchronized. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Vinicius Costa Gomes authored
The HIGH security level requires a 16 digit pin code for non-SSP bondings. Sometimes this requirement is not acceptable and we still want protection againts MITM attacks (which is something that the MEDIUM security level doesn't provide), for that we should allow another way to request authentication without using the HIGH security level. Signed-off-by:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Vinicius Costa Gomes authored
One piece of information that was lost when using the mgmt interface, was the type of the connection. Using HCI events we used to know the type of the connection based on the type of the event, e.g. HCI_LE_Connection_Complete for LE links. Signed-off-by:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 15 Sep, 2011 1 commit
-
-
Oliver Neukum authored
The checks for HCI_INQUIRY and HCI_MGMT were in the wrong order, so that second scans always failed. Signed-off-by:
Oliver Neukum <oneukum@suse.de> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 08 Jul, 2011 2 commits
-
-
Vinicius Costa Gomes authored
In some cases it will be useful having the key size used for encrypting the link. For example, some profiles may restrict some operations depending on the key length. The key size is stored in the key that is passed to userspace using the pin_length field in the key structure. For now this field is only valid for LE controllers. 3.0+HS controllers define the Read Encryption Key Size command, this field is intended for storing the value returned by that command. Signed-off-by:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Vinicius Costa Gomes authored
Now that we have methods to finding keys by its parameters we can reject an encryption request if the key isn't found. Signed-off-by:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 06 Jul, 2011 3 commits
-
-
Andre Guedes authored
This patch adds a new module parameter to enable/disable host LE support. By default host LE support is disabled. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
This patch adds a handler to Write LE Host Supported command complete events. Once this commands has completed successfully, we should read the extended LMP features and update the extfeatures field in hci_dev. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
This new field holds the extended LMP features value. Some LE mechanism such as discovery procedure needs to read the extended LMP features to work properly. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 13 Jun, 2011 3 commits
-
-
Vinicius Costa Gomes authored
This patch implements a simple version of the SMP Pairing Features exchange procedure (Vol. 3 Part H, Section 2.3.5.1). For now, everything that would cause a Pairing Method different of Just Works to be chosen is rejected. Signed-off-by:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Vinicius Costa Gomes authored
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:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Vinicius Costa Gomes authored
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:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 10 Jun, 2011 1 commit
-
-
Ville Tervo authored
Some old hci controllers do not accept any mask so leave the default mask on for these devices. < HCI Command: Set Event Mask (0x03|0x0001) plen 8 Mask: 0xfffffbff00000000 > HCI Event: Command Complete (0x0e) plen 4 Set Event Mask (0x03|0x0001) ncmd 1 status 0x12 Error: Invalid HCI Command Parameters Signed-off-by:
Ville Tervo <ville.tervo@nokia.com> Tested-by:
Corey Boyle <corey@kansanian.com> Tested-by:
Ed Tomlinson <edt@aei.ca> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 09 Jun, 2011 1 commit
-
-
Ville Tervo authored
Some old hci controllers do not accept any mask so leave the default mask on for these devices. < HCI Command: Set Event Mask (0x03|0x0001) plen 8 Mask: 0xfffffbff00000000 > HCI Event: Command Complete (0x0e) plen 4 Set Event Mask (0x03|0x0001) ncmd 1 status 0x12 Error: Invalid HCI Command Parameters Signed-off-by:
Ville Tervo <ville.tervo@nokia.com> Tested-by:
Corey Boyle <corey@kansanian.com> Tested-by:
Ed Tomlinson <edt@aei.ca> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 08 Jun, 2011 6 commits
-
-
Andre Guedes authored
This patch adds a new field (dst_type) to the struct hci_conn which holds the type of the destination address (bdaddr_t dst). This approach is needed in order to use the struct hci_conn as an abstraction of LE connections in HCI Layer. For non-LE this field is ignored. This patch also set properly the 'dst_type' field after initializing LE hci_conn structures. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Waldemar Rymarkiewicz authored
Replace if(conn) with if(!conn) checking to avoid too many nested statements Signed-off-by:
Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Waldemar Rymarkiewicz authored
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:
Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
This patch adds a timer to clear 'adv_entries' after three minutes. After some amount of time, the advertising entries cached during the last LE scan should be considered expired and they should be removed from the advertising cache. It was chosen a three minutes timeout as an initial attempt. This value might change in future. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
The LE advertising cache should be cleared before performing a LE scanning. This will force the cache to contain only fresh advertising entries. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
This patch adds a function to handle LE Advertising Report Meta Events. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Anderson Briglia <anderson.briglia@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 11 May, 2011 1 commit
-
-
Vinicius Costa Gomes authored
We need to be able for receive events notifying that the connection was established, the connection attempt failed or that disconnection happened. Signed-off-by:
Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 28 Apr, 2011 9 commits
-
-
Johan Hedberg authored
In some circumstances hci_get_auth_req will return a value different from the current conn->auth_type. In these cases update conn->auth_type so that when a user confirm request comes it doesn't falsely trigger auto-accept. Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
Link keys should only be stored if very specific criteria of the authentication process are fulfilled. This patch essentially copies the criteria that user space has so far been using to the kernel side so that the management interface works properly. Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
The mgmt_ev_pin_code_request event should not be sent to user space if the request gets rejected by the kernel due to the pairable flag not being set. Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
"Pairing not allowed" is 0x18 and not 0x16. Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
When accepting a pairing request which fulfills the SSP auto-accept criteria we need to push the request all the way to the user for confirmation. This patch adds a new hint to the user_confirm_request management event so user space can know when to show a numeric comparison dialog and when to show a simple yes/no confirmation dialog. Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
The HCI_CONN_AUTH_PEND flag should be set whenever requesting authentication so that multiple pending requests can't occur. Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
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:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
This patch adds automated negative and positive (auto-accept) responses for Secure Simple Pairing user confirmation requests. The responses are only sent if the HCI_MGMT flag is set in order not to confuse older user space versions (without management interface support). Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Waldemar Rymarkiewicz authored
Extend the mgmt_pin_code_request interface to require secure pin code (16 digit) for authentication. This is a kernel part of the secure pin code requirement notification to user space agent. Code styling fix by Johan Hedberg. Signed-off-by:
Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by:
Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-