Skip to content

Commit 9d52bf0

Browse files
committed
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/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 <[email protected]>
2 parents 1dcf3ac + b5a61c3 commit 9d52bf0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2374
-1133
lines changed

Documentation/networking/ieee802154.txt

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ int sd = socket(PF_IEEE802154, SOCK_DGRAM, 0);
3030

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

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

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

5151

52-
MLME - MAC Level Management
53-
============================
54-
55-
Most of IEEE 802.15.4 MLME interfaces are directly mapped on netlink commands.
56-
See the include/net/nl802154.h header. Our userspace tools package
57-
(see above) provides CLI configuration utility for radio interfaces and simple
58-
coordinator for IEEE 802.15.4 networks as an example users of MLME protocol.
59-
60-
6152
HardMAC
6253
=======
6354

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

78-
We provide an example of simple HardMAC driver at drivers/ieee802154/fakehard.c
79-
8069

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

9079
This layer is going to be extended soon.
9180

92-
See header include/net/mac802154.h and several drivers in drivers/ieee802154/.
81+
See header include/net/mac802154.h and several drivers in
82+
drivers/net/ieee802154/.
9383

9484

9585
Device drivers API
@@ -114,18 +104,17 @@ Moreover IEEE 802.15.4 device operations structure should be filled.
114104
Fake drivers
115105
============
116106

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

122-
See sources in drivers/ieee802154 folder for more details.
111+
See sources in drivers/net/ieee802154 folder for more details.
123112

124113

125114
6LoWPAN Linux implementation
126115
============================
127116

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

143-
All the code related to 6lowpan you may find in files: net/ieee802154/6lowpan.*
132+
All the code related to 6lowpan you may find in files: net/6lowpan/*
133+
and net/ieee802154/6lowpan/*
144134

145135
To setup 6lowpan interface you need (busybox release > 1.17.0):
146136
1. Add IEEE802.15.4 interface and initialize PANid;

drivers/bluetooth/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ config BT_BCM
99
tristate
1010
select FW_LOADER
1111

12+
config BT_RTL
13+
tristate
14+
select FW_LOADER
15+
1216
config BT_HCIBTUSB
1317
tristate "HCI USB driver"
1418
depends on USB
@@ -32,6 +36,17 @@ config BT_HCIBTUSB_BCM
3236

3337
Say Y here to compile support for Broadcom protocol.
3438

39+
config BT_HCIBTUSB_RTL
40+
bool "Realtek protocol support"
41+
depends on BT_HCIBTUSB
42+
select BT_RTL
43+
default y
44+
help
45+
The Realtek protocol support enables firmware and configuration
46+
download support for Realtek Bluetooth controllers.
47+
48+
Say Y here to compile support for Realtek protocol.
49+
3550
config BT_HCIBTSDIO
3651
tristate "HCI SDIO driver"
3752
depends on MMC

drivers/bluetooth/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ obj-$(CONFIG_BT_MRVL) += btmrvl.o
2121
obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o
2222
obj-$(CONFIG_BT_WILINK) += btwilink.o
2323
obj-$(CONFIG_BT_BCM) += btbcm.o
24+
obj-$(CONFIG_BT_RTL) += btrtl.o
2425

2526
btmrvl-y := btmrvl_main.o
2627
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o

drivers/bluetooth/btbcm.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ int btbcm_check_bdaddr(struct hci_dev *hdev)
5555
}
5656

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

6559
/* The address 00:20:70:02:A0:00 indicates a BCM20702A0 controller
6660
* with no configured address.

drivers/bluetooth/btintel.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ int btintel_check_bdaddr(struct hci_dev *hdev)
5353
}
5454

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

6357
/* For some Intel based controllers, the default Bluetooth device
6458
* address 00:03:19:9E:8B:00 can be found. These controllers are

drivers/bluetooth/btmrvl_sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ static void btmrvl_sdio_dump_firmware(struct btmrvl_private *priv)
12171217
unsigned int reg, reg_start, reg_end;
12181218
enum rdwr_status stat;
12191219
u8 *dbg_ptr, *end_ptr, *fw_dump_data, *fw_dump_ptr;
1220-
u8 dump_num, idx, i, read_reg, doneflag = 0;
1220+
u8 dump_num = 0, idx, i, read_reg, doneflag = 0;
12211221
u32 memory_size, fw_dump_len = 0;
12221222

12231223
/* dump sdio register first */

0 commit comments

Comments
 (0)