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-05-28

Here's a set of patches intended for 4.2. The majority of the changes
are on the 802.15.4 side of things rather than Bluetooth related:

 - All sorts of cleanups & fixes to ieee802154 and related drivers
 - Rework of tx power support in ieee802154 and its drivers
 - Support for setting ieee802154 tx power through nl802154
 - New IDs for the btusb driver
 - Various cleanups & smaller fixes to btusb
 - New btrtl driver for Realtec devices
 - Fix suspend/resume for Realtek devices

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 31, 2015
2 parents 1dcf3ac + b5a61c3 commit 9d52bf0
Show file tree
Hide file tree
Showing 46 changed files with 2,374 additions and 1,133 deletions.
32 changes: 11 additions & 21 deletions Documentation/networking/ieee802154.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ int sd = socket(PF_IEEE802154, SOCK_DGRAM, 0);

The address family, socket addresses etc. are defined in the
include/net/af_ieee802154.h header or in the special header
in our userspace package (see either linux-zigbee sourceforge download page
or git tree at git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee).
in the userspace package (see either http://wpan.cakelab.org/ or the
git tree at https://github.com/linux-wpan/wpan-tools).

One can use SOCK_RAW for passing raw data towards device xmit function. YMMV.

Expand All @@ -49,15 +49,6 @@ Like with WiFi, there are several types of devices implementing IEEE 802.15.4.
Those types of devices require different approach to be hooked into Linux kernel.


MLME - MAC Level Management
============================

Most of IEEE 802.15.4 MLME interfaces are directly mapped on netlink commands.
See the include/net/nl802154.h header. Our userspace tools package
(see above) provides CLI configuration utility for radio interfaces and simple
coordinator for IEEE 802.15.4 networks as an example users of MLME protocol.


HardMAC
=======

Expand All @@ -75,8 +66,6 @@ net_device with a pointer to struct ieee802154_mlme_ops instance. The fields
assoc_req, assoc_resp, disassoc_req, start_req, and scan_req are optional.
All other fields are required.

We provide an example of simple HardMAC driver at drivers/ieee802154/fakehard.c


SoftMAC
=======
Expand All @@ -89,7 +78,8 @@ stack interface for network sniffers (e.g. WireShark).

This layer is going to be extended soon.

See header include/net/mac802154.h and several drivers in drivers/ieee802154/.
See header include/net/mac802154.h and several drivers in
drivers/net/ieee802154/.


Device drivers API
Expand All @@ -114,18 +104,17 @@ Moreover IEEE 802.15.4 device operations structure should be filled.
Fake drivers
============

In addition there are two drivers available which simulate real devices with
HardMAC (fakehard) and SoftMAC (fakelb - IEEE 802.15.4 loopback driver)
interfaces. This option provides possibility to test and debug stack without
usage of real hardware.
In addition there is a driver available which simulates a real device with
SoftMAC (fakelb - IEEE 802.15.4 loopback driver) interface. This option
provides possibility to test and debug stack without usage of real hardware.

See sources in drivers/ieee802154 folder for more details.
See sources in drivers/net/ieee802154 folder for more details.


6LoWPAN Linux implementation
============================

The IEEE 802.15.4 standard specifies an MTU of 128 bytes, yielding about 80
The IEEE 802.15.4 standard specifies an MTU of 127 bytes, yielding about 80
octets of actual MAC payload once security is turned on, on a wireless link
with a link throughput of 250 kbps or less. The 6LoWPAN adaptation format
[RFC4944] was specified to carry IPv6 datagrams over such constrained links,
Expand All @@ -140,7 +129,8 @@ In Semptember 2011 the standard update was published - [RFC6282].
It deprecates HC1 and HC2 compression and defines IPHC encoding format which is
used in this Linux implementation.

All the code related to 6lowpan you may find in files: net/ieee802154/6lowpan.*
All the code related to 6lowpan you may find in files: net/6lowpan/*
and net/ieee802154/6lowpan/*

To setup 6lowpan interface you need (busybox release > 1.17.0):
1. Add IEEE802.15.4 interface and initialize PANid;
Expand Down
15 changes: 15 additions & 0 deletions drivers/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ config BT_BCM
tristate
select FW_LOADER

config BT_RTL
tristate
select FW_LOADER

config BT_HCIBTUSB
tristate "HCI USB driver"
depends on USB
Expand All @@ -32,6 +36,17 @@ config BT_HCIBTUSB_BCM

Say Y here to compile support for Broadcom protocol.

config BT_HCIBTUSB_RTL
bool "Realtek protocol support"
depends on BT_HCIBTUSB
select BT_RTL
default y
help
The Realtek protocol support enables firmware and configuration
download support for Realtek Bluetooth controllers.

Say Y here to compile support for Realtek protocol.

config BT_HCIBTSDIO
tristate "HCI SDIO driver"
depends on MMC
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ obj-$(CONFIG_BT_MRVL) += btmrvl.o
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

btmrvl-y := btmrvl_main.o
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o
Expand Down
6 changes: 0 additions & 6 deletions drivers/bluetooth/btbcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ int btbcm_check_bdaddr(struct hci_dev *hdev)
}

bda = (struct hci_rp_read_bd_addr *)skb->data;
if (bda->status) {
BT_ERR("%s: BCM: Device address result failed (%02x)",
hdev->name, bda->status);
kfree_skb(skb);
return -bt_to_errno(bda->status);
}

/* The address 00:20:70:02:A0:00 indicates a BCM20702A0 controller
* with no configured address.
Expand Down
6 changes: 0 additions & 6 deletions drivers/bluetooth/btintel.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ int btintel_check_bdaddr(struct hci_dev *hdev)
}

bda = (struct hci_rp_read_bd_addr *)skb->data;
if (bda->status) {
BT_ERR("%s: Intel device address result failed (%02x)",
hdev->name, bda->status);
kfree_skb(skb);
return -bt_to_errno(bda->status);
}

/* For some Intel based controllers, the default Bluetooth device
* address 00:03:19:9E:8B:00 can be found. These controllers are
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/btmrvl_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ static void btmrvl_sdio_dump_firmware(struct btmrvl_private *priv)
unsigned int reg, reg_start, reg_end;
enum rdwr_status stat;
u8 *dbg_ptr, *end_ptr, *fw_dump_data, *fw_dump_ptr;
u8 dump_num, idx, i, read_reg, doneflag = 0;
u8 dump_num = 0, idx, i, read_reg, doneflag = 0;
u32 memory_size, fw_dump_len = 0;

/* dump sdio register first */
Expand Down
Loading

0 comments on commit 9d52bf0

Please sign in to comment.