- 02 4月, 2015 14 次提交
-
-
由 Johan Hedberg 提交于
Now that there's a HCI request API available where the callback receives the resulting skb, we can convert the local OOB data reading to use this new API. This patch does the necessary update in mgmt.c (which also requires moving the callback higher up since it's now a static function) and removes the custom calls from hci_event.c that are no-longer necessary. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
To make the hci_req_run_skb() API consistent with hci_cmd_sync_ev() the callback should receive the cmd_complete parameters in the 'normal' case and the full HCI event if a special event was expected. This patch moves the hci_get_cmd_complete() function from hci_core.c to hci_event.c where it's used to strip the skb from the needed headers before passing it on to the callback. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
The hci_req_pending() function has no users anymore, so simply remove it. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
Now that the synchronous HCI requests use the new API and a new private variable the recv_evt member of hci_dev is no-longer needed. This patch removes it. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
Now that there's an API in place that allows passing the resulting skb to the request callback we can conveniently convert the hci_req_sync and related functions to use it. Since we still need to get the skb from the async callback into the sleeping _sync() function the patch adds another req_skb variable to hci_dev where the sync request state is tracked. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
This patch adds a second possible callback for HCI requests where the callback will receive the full skb of the last successfully completed HCI command. This API is useful for cases where we want to use a request to read some data and the existing hci_event.c handlers do not store it e.g. in the hci_dev struct. The reason the patch is a bit bigger than just adding the new API is because the hci_req_cmd_complete() functions required some refactoring to enable it: now hci_req_cmd_complete() is simply used to request the callback pointers if any, and the actual calling of them happens from a single place at the end of hci_event_packet(). The reason for this is that we need to pass the original skb (without any skb_pull, etc modifications done to it) and it's simplest to keep track of it within the hci_event_packet() function. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
When dealing with HCI command status events, the reasoning for trying to mark a request as complete if no specific event is being waited for and status was success is not self-evident. This patch adds a clarifying comment above the if-statement. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Marcel Holtmann 提交于
When SMP selftest is enabled, then besides printing the result into the kernel message buffer, also create a debugfs file that allows retrieving the same information. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
When ECDH selftest is enabled, then besides printing the result into the kernel message buffer, also create a debugfs file that allows retrieving the same information. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
The BNEP flags should be clearly restricted to valid ones. So this puts extra checks in place to ensure this. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
The HIDP flags should be clearly restricted to valid ones. So this puts extra checks in place to ensure this. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
The CMTP flags should be clearly restricted to valid ones. So this puts extra checks in place to ensure this. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
For debugging purposes it is good to be able to read the current configured Device ID details. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
- 31 3月, 2015 2 次提交
-
-
由 Johan Hedberg 提交于
In order to shrink the size of bt_skb_cb, this patch moves the HCI request related variables into their own req_ctrl struct. Additionall the L2CAP and HCI request structs are placed inside the same union since they will never be used at the same time for the same skb. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
We're getting very close to the maximum possible size of bt_skb_cb. To prepare to shrink the struct with the help of a union this patch moves all L2CAP related variables into the l2cap_ctrl struct. To later add other 'ctrl' structs the L2CAP one is renamed simple 'l2cap' instead of 'control'. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 29 3月, 2015 7 次提交
-
-
由 Marcel Holtmann 提交于
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
The Read Local OOB Extended Data commands are required to return the address type and the data length at least. However currently the error returns only the address type. To fix this and avoid any extra allocations or stack memory, rearrange the code so that the same path can be used for error returns. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Marcel Holtmann 提交于
Taking the hci_dev lock for just a memory allocation seems a bit too much and not really needed. So instead try to allocate the memory first and then take the lock. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Arman Uguray 提交于
This patch fixes a bug where the advertising parameters weren't updated after a call to "Set Connectable" if the HCI_ADVERTISING_INSTANCE setting was set. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
With this patch, ADV_SCAN_IND will be used for advertising instances that have non-zero scan response data while the global "connectable" setting is "off". Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch fixes a bug where ADV_NONCONN_IND was being used for advertising instances >0 while the global connectable setting was set to "on". Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Johan Hedberg 提交于
During the HCI init phase a completed request might be the last part of the setup procedure after which the actual init procedure starts. The init procedure begins with a call to hci_reset_req() which sets the HCI_RESET flag. The purpose of this flag is to make us ignore any updates to ncmd/cmd_cnt as long as we haven't received the command complete event for the HCI_Reset. There's a potential race with this however: hci_req_cmd_complete(hdev, opcode, status); if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { atomic_set(&hdev->cmd_cnt, 1); if (!skb_queue_empty(&hdev->cmd_q)) queue_work(hdev->workqueue, &hdev->cmd_work); } Since the hci_req_cmd_complete() will trigger the completion of the setup stage, it's possible that hci_reset_req() gets called before we try to read ev->ncmd and the HCI_RESET flag. Because of this the cmd_cnt would never be updated and the hci_reset_req() in practice ends up blocking itself. This patch fixes the issue by updating cmd_cnt before notifying the request completion, and then reading it again to determine whether the cmd_work should be queued or not. Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 28 3月, 2015 4 次提交
-
-
由 Marcel Holtmann 提交于
For all modern Bluetooth USB devices from Broadcom it makes a lot more sense to use USB_VENDOR_AND_INTERFACE_INFO instead of manually adding USB_DEVICE for each one of them. There are already interface entries for these vendors and so just remove the duplicate device entries. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Alexander Aring 提交于
This patch fix the error handling when is_tx is true. The error handling tries to get the transceiver into RX_AACK_ON mode then we need to be sure that is_tx is false. Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This spinlock isn't necessary because if we are in TX_ON/TX_ARET_ON state the transceiver can't be interrupted e.g. by receiving a frame when a SHR was detected. In this time the transceiver doesn't leave the TX_ON/TX_ARET_ON state until the tx complete irq change the state into RX_AACK_ON again. This means a receiving interrupt in state TX_ON/TX_ARET_ON can't happen and is_tx is protected by transceiver. Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch cleanups the checking of different mac phy depended values by handling depended mac settings per hw support flag in one condition. Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 26 3月, 2015 10 次提交
-
-
由 Arman Uguray 提交于
This patch simplifies the code paths for assembling the advertising data used by advertising instances 0 and 1. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch updates the "supported_flags" parameter returned from the "Read Advertising Features" command. Add Advertising will now return an error if an unsupported flag is provided. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch adds support for the "tx-power" flag of the Add Advertising command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch adds support for the "managed-flags" flag of the Add Advertising command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch adds support for the "limited-discoverable" flag of the Add Advertising command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch adds support for the "discoverable" flag of the Add Advertising command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch adds support for the "connectable mode" flag of the Add Advertising command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch adds macro definitions for possible advertising instance flags that can be passed to the "Add Advertising" command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Marcel Holtmann 提交于
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Loic Poulain 提交于
Some Bluetooth controllers require initialization before being used (vendor config, firmware download). Add possibility for a HCI UART proto to implement this early init via the setup callback. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
- 25 3月, 2015 1 次提交
-
-
由 Marcel Holtmann 提交于
When the user of the management interface is not trusted, then it only has access to a limited set of commands and events. When providing the list of supported commands and events take the trusted vs untrusted status of the user into account and return different lists. This way the untrusted user knows exactly which commands it can execute and which events it can receive. So no guesswork needed. Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
- 24 3月, 2015 2 次提交
-
-
由 Arman Uguray 提交于
This patch implements support for the timeout parameter of the Add Advertising command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Arman Uguray 提交于
This patch implements setting the Scan Response data provided as part of an advertising instance through the Add Advertising command. Signed-off-by: NArman Uguray <armansito@chromium.org> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-