summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_h5.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-11Bluetooth: Provide hdev parameter to hci_recv_frame() driver callbackMarcel Holtmann1-1/+1
To avoid casting skb->dev into hdev, just let the drivers provide the hdev directly when calling hci_recv_frame() function. This patch also fixes up all drivers to provide the hdev. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2012-07-17Bluetooth: Introduce a flags variable to Three-wire UART stateJohan Hedberg1-11/+15
This patch introduces a flags variable to the Three-wire UART state struct and converts the two existing bools in the struct into flags. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Improve Three-wire UART configuration handlingJohan Hedberg1-7/+27
The configuration request/response messages contain a configuration field which contains the sliding window size (amount of unacked reliable packets that can be pending). This patch makes sure that we configure the correct size (minimum of local and remote values) and use it when determining whether to send new packets or not. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Remove unnecessary h5_build_pkt functionJohan Hedberg1-26/+23
The implementation of h5_build_packet can be moved into h5_prepare_pkt since all h5_prepare_pkt does is determine whether the packet is reliable and then call h5_build_packet. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Implement proper low-power support for Three-wire UARTJohan Hedberg1-5/+32
This patch adds on-demand wakeup request sending (and re-sendind) when we are in low-power state. When the controller enters this state it will send a sleep message after which the host is not allowed to send any other packets until a wakeup request has been sent and the woken message received as a response to it. The wakeup requests are re-sent periodically until a woken message is received. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add initialization tracking to HCI Three-wire driverJohan Hedberg1-16/+50
This patch adds tracking for the uninitialized, initialized and active states for Three-wire UART. This is needed so we can handle periodic sending of the Link Establishment messages before reaching active state and so that we do not try to do any higher level HCI data transmission before reaching active state. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add initial sleep support to Three-wire UARTJohan Hedberg1-0/+13
This patch adds very basic support for the sleep related messages. The only thing the code does right now is send a wakeup message as soon as receiving a sleep one, essentially preventing the controller from going to sleep. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Improve rx debug logs for Three-wire UARTJohan Hedberg1-14/+3
Remove unnecessary debug logs and add some to more centralized places. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Use delayed init for Three-wire UARTJohan Hedberg1-0/+3
This patch takes into use the delayed initialization feature that the Bluetooth UART framework provides. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add support for Three-wire Link Control packetsJohan Hedberg1-17/+79
This patch adds basic support for parsing and sending Three-wire UART Link Control packets. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Fix/implement Three-wire reliable packet sendingJohan Hedberg1-17/+70
This patch should complete the necessary code for sending reliable Three-wire packets. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add Three-wire header value convenience macrosJohan Hedberg1-0/+8
This patch adds convenience macros for reading Three-wire header values. This will help make the code more readable. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add initial packet sending support to Three-wire UARTJohan Hedberg1-7/+98
This patch adds initial packed encoding and sending support to the Three-wire UART HCI transport driver. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add basic packet parsing to Three-wire UART driverJohan Hedberg1-8/+222
This patch adds basic packet parsing to the Three-wire UART HCI driver for packets received from the controller. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add initial reliable packet support for Three-wire UARTJohan Hedberg1-0/+56
This patch adds initial support for reliable packets along with the necessary retransmission timer for the Three-wire UART HCI driver. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Add basic state tracking to Three-wire UART driverJohan Hedberg1-4/+92
This patch adds basic state tracking and socket buffer handling to the Three-wire UART (H5) HCI driver. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-07-17Bluetooth: Initial skeleton for Three-wire UART (H5) supportJohan Hedberg1-0/+88
This patch adds the initial skeleton for Three-wire UART (H5) support and hooks it up to the HCI UART framework. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>