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 2015-08-16

Here's what's likely the last bluetooth-next pull request for 4.3:

 - 6lowpan/802.15.4 refactoring, cleanups & fixes
 - Document 6lowpan netdev usage in Documentation/networking/6lowpan.txt
 - Support for UART based QCA Bluetooth controllers
 - Power management support for Broeadcom Bluetooth controllers
 - Change LE connection initiation to always use passive scanning first
 - Support for new Silicon Wave USB ID

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

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Aug 17, 2015
2 parents 863960b + c0015bf commit 0aa65cc
Show file tree
Hide file tree
Showing 40 changed files with 2,462 additions and 237 deletions.
50 changes: 50 additions & 0 deletions Documentation/networking/6lowpan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

Netdev private dataroom for 6lowpan interfaces:

All 6lowpan able net devices, means all interfaces with ARPHRD_6LOWPAN,
must have "struct lowpan_priv" placed at beginning of netdev_priv.

The priv_size of each interface should be calculate by:

dev->priv_size = LOWPAN_PRIV_SIZE(LL_6LOWPAN_PRIV_DATA);

Where LL_PRIV_6LOWPAN_DATA is sizeof linklayer 6lowpan private data struct.
To access the LL_PRIV_6LOWPAN_DATA structure you can cast:

lowpan_priv(dev)-priv;

to your LL_6LOWPAN_PRIV_DATA structure.

Before registering the lowpan netdev interface you must run:

lowpan_netdev_setup(dev, LOWPAN_LLTYPE_FOOBAR);

wheres LOWPAN_LLTYPE_FOOBAR is a define for your 6LoWPAN linklayer type of
enum lowpan_lltypes.

Example to evaluate the private usually you can do:

static inline sturct lowpan_priv_foobar *
lowpan_foobar_priv(struct net_device *dev)
{
return (sturct lowpan_priv_foobar *)lowpan_priv(dev)->priv;
}

switch (dev->type) {
case ARPHRD_6LOWPAN:
lowpan_priv = lowpan_priv(dev);
/* do great stuff which is ARPHRD_6LOWPAN related */
switch (lowpan_priv->lltype) {
case LOWPAN_LLTYPE_FOOBAR:
/* do 802.15.4 6LoWPAN handling here */
lowpan_foobar_priv(dev)->bar = foo;
break;
...
}
break;
...
}

In case of generic 6lowpan branch ("net/6lowpan") you can remove the check
on ARPHRD_6LOWPAN, because you can be sure that these function are called
by ARPHRD_6LOWPAN interfaces.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ L: [email protected]
S: Maintained
F: net/6lowpan/
F: include/net/6lowpan.h
F: Documentation/networking/6lowpan.txt

6PACK NETWORK DRIVER FOR AX.25
M: Andreas Koensgen <[email protected]>
Expand Down
17 changes: 17 additions & 0 deletions drivers/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ config BT_RTL
tristate
select FW_LOADER

config BT_QCA
tristate
select FW_LOADER

config BT_HCIBTUSB
tristate "HCI USB driver"
depends on USB
Expand Down Expand Up @@ -151,6 +155,19 @@ config BT_HCIUART_BCM

Say Y here to compile support for Broadcom protocol.

config BT_HCIUART_QCA
bool "Qualcomm Atheros protocol support"
depends on BT_HCIUART
select BT_HCIUART_H4
select BT_QCA
help
The Qualcomm Atheros protocol supports HCI In-Band Sleep feature
over serial port interface(H4) between controller and host.
This protocol is required for UART clock control for QCA Bluetooth
devices.

Say Y here to compile support for QCA protocol.

config BT_HCIBCM203X
tristate "HCI BCM203x USB driver"
depends on USB
Expand Down
2 changes: 2 additions & 0 deletions drivers/bluetooth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o
obj-$(CONFIG_BT_WILINK) += btwilink.o
obj-$(CONFIG_BT_BCM) += btbcm.o
obj-$(CONFIG_BT_RTL) += btrtl.o
obj-$(CONFIG_BT_QCA) += btqca.o

btmrvl-y := btmrvl_main.o
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o
Expand All @@ -34,6 +35,7 @@ hci_uart-$(CONFIG_BT_HCIUART_ATH3K) += hci_ath.o
hci_uart-$(CONFIG_BT_HCIUART_3WIRE) += hci_h5.o
hci_uart-$(CONFIG_BT_HCIUART_INTEL) += hci_intel.o
hci_uart-$(CONFIG_BT_HCIUART_BCM) += hci_bcm.o
hci_uart-$(CONFIG_BT_HCIUART_QCA) += hci_qca.o
hci_uart-objs := $(hci_uart-y)

ccflags-y += -D__CHECK_ENDIAN__
4 changes: 2 additions & 2 deletions drivers/bluetooth/btmrvl_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,6 @@ static int btmrvl_sdio_download_fw(struct btmrvl_sdio_card *card)
}
}

sdio_release_host(card->func);

/*
* winner or not, with this test the FW synchronizes when the
* module can continue its initialization
Expand All @@ -1082,6 +1080,8 @@ static int btmrvl_sdio_download_fw(struct btmrvl_sdio_card *card)
return -ETIMEDOUT;
}

sdio_release_host(card->func);

return 0;

done:
Expand Down
Loading

0 comments on commit 0aa65cc

Please sign in to comment.