Skip to content

Commit

Permalink
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/bluetooth/bluetooth-next

Johan Hedberg says:

====================
pull request: bluetooth-next 2017-04-30

Here's one last batch of Bluetooth patches in the bluetooth-next tree
targeting the 4.12 kernel.

 - Remove custom ECDH implementation and use new KPP API instead
 - Add protocol checks to hci_ldisc
 - Add module license to HCI UART Nokia H4+ driver
 - Minor fix for 32bit user space - 64 bit kernel combination

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 1, 2017
2 parents d5066c4 + 71653eb commit f9ed236
Show file tree
Hide file tree
Showing 11 changed files with 342 additions and 887 deletions.
14 changes: 11 additions & 3 deletions drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,21 @@ static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)
{
struct sk_buff *skb = hu->tx_skb;

if (!skb)
skb = hu->proto->dequeue(hu);
else
if (!skb) {
if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
skb = hu->proto->dequeue(hu);
} else {
hu->tx_skb = NULL;
}

return skb;
}

int hci_uart_tx_wakeup(struct hci_uart *hu)
{
if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
return 0;

if (test_and_set_bit(HCI_UART_SENDING, &hu->tx_state)) {
set_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
return 0;
Expand Down Expand Up @@ -256,6 +261,9 @@ static int hci_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
BT_DBG("%s: type %d len %d", hdev->name, hci_skb_pkt_type(skb),
skb->len);

if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
return -EUNATCH;

hu->proto->enqueue(hu, skb);

hci_uart_tx_wakeup(hu);
Expand Down
7 changes: 7 additions & 0 deletions drivers/bluetooth/hci_nokia.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include "hci_uart.h"
#include "btbcm.h"

#define VERSION "0.1"

#define NOKIA_ID_BCM2048 0x04
#define NOKIA_ID_TI1271 0x31

Expand Down Expand Up @@ -818,3 +820,8 @@ static struct serdev_device_driver nokia_bluetooth_serdev_driver = {
};

module_serdev_device_driver(nokia_bluetooth_serdev_driver);

MODULE_AUTHOR("Sebastian Reichel <sre@kernel.org>");
MODULE_DESCRIPTION("Bluetooth HCI UART Nokia H4+ driver ver " VERSION);
MODULE_VERSION(VERSION);
MODULE_LICENSE("GPL");
1 change: 1 addition & 0 deletions net/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ menuconfig BT
select CRYPTO_CMAC
select CRYPTO_ECB
select CRYPTO_SHA256
select CRYPTO_ECDH
help
Bluetooth is low-cost, low-power, short-range wireless technology.
It was designed as a replacement for cables and other short-range
Expand Down
2 changes: 1 addition & 1 deletion net/bluetooth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bluetooth_6lowpan-y := 6lowpan.o

bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o \
hci_sock.o hci_sysfs.o l2cap_core.o l2cap_sock.o smp.o lib.o \
ecc.o hci_request.o mgmt_util.o
ecdh_helper.o hci_request.o mgmt_util.o

bluetooth-$(CONFIG_BT_BREDR) += sco.o
bluetooth-$(CONFIG_BT_HS) += a2mp.o amp.o
Expand Down
Loading

0 comments on commit f9ed236

Please sign in to comment.