Skip to content

Commit 49c0ca1

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2 parents a85ae0e + 67b3bd4 commit 49c0ca1

215 files changed

Lines changed: 13523 additions & 2758 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
* Texas Instruments TRF7970A RFID/NFC/15693 Transceiver
2+
3+
Required properties:
4+
- compatible: Should be "ti,trf7970a".
5+
- spi-max-frequency: Maximum SPI frequency (<= 2000000).
6+
- interrupt-parent: phandle of parent interrupt handler.
7+
- interrupts: A single interrupt specifier.
8+
- ti,enable-gpios: Two GPIO entries used for 'EN' and 'EN2' pins on the
9+
TRF7970A.
10+
- vin-supply: Regulator for supply voltage to VIN pin
11+
12+
Optional SoC Specific Properties:
13+
- pinctrl-names: Contains only one value - "default".
14+
- pintctrl-0: Specifies the pin control groups used for this controller.
15+
16+
Example (for ARM-based BeagleBone with TRF7970A on SPI1):
17+
18+
&spi1 {
19+
status = "okay";
20+
21+
nfc@0 {
22+
compatible = "ti,trf7970a";
23+
reg = <0>;
24+
pinctrl-names = "default";
25+
pinctrl-0 = <&trf7970a_default>;
26+
spi-max-frequency = <2000000>;
27+
interrupt-parent = <&gpio2>;
28+
interrupts = <14 0>;
29+
ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>,
30+
<&gpio2 5 GPIO_ACTIVE_LOW>;
31+
vin-supply = <&ldo3_reg>;
32+
status = "okay";
33+
};
34+
};

‎MAINTAINERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6117,6 +6117,7 @@ F: include/net/nfc/
61176117
F: include/uapi/linux/nfc.h
61186118
F: drivers/nfc/
61196119
F: include/linux/platform_data/pn544.h
6120+
F: Documentation/devicetree/bindings/net/nfc/
61206121

61216122
NFS, SUNRPC, AND LOCKD CLIENTS
61226123
M: Trond Myklebust <trond.myklebust@primarydata.com>

‎drivers/bluetooth/ath3k.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ static const struct usb_device_id ath3k_table[] = {
8989
{ USB_DEVICE(0x0b05, 0x17d0) },
9090
{ USB_DEVICE(0x0CF3, 0x0036) },
9191
{ USB_DEVICE(0x0CF3, 0x3004) },
92+
{ USB_DEVICE(0x0CF3, 0x3005) },
9293
{ USB_DEVICE(0x0CF3, 0x3008) },
9394
{ USB_DEVICE(0x0CF3, 0x311D) },
9495
{ USB_DEVICE(0x0CF3, 0x311E) },
@@ -137,6 +138,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
137138
{ USB_DEVICE(0x0b05, 0x17d0), .driver_info = BTUSB_ATH3012 },
138139
{ USB_DEVICE(0x0CF3, 0x0036), .driver_info = BTUSB_ATH3012 },
139140
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
141+
{ USB_DEVICE(0x0cf3, 0x3005), .driver_info = BTUSB_ATH3012 },
140142
{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
141143
{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
142144
{ USB_DEVICE(0x0cf3, 0x311E), .driver_info = BTUSB_ATH3012 },
@@ -180,10 +182,9 @@ static int ath3k_load_firmware(struct usb_device *udev,
180182
}
181183

182184
memcpy(send_buf, firmware->data, 20);
183-
if ((err = usb_control_msg(udev, pipe,
184-
USB_REQ_DFU_DNLOAD,
185-
USB_TYPE_VENDOR, 0, 0,
186-
send_buf, 20, USB_CTRL_SET_TIMEOUT)) < 0) {
185+
err = usb_control_msg(udev, pipe, USB_REQ_DFU_DNLOAD, USB_TYPE_VENDOR,
186+
0, 0, send_buf, 20, USB_CTRL_SET_TIMEOUT);
187+
if (err < 0) {
187188
BT_ERR("Can't change to loading configuration err");
188189
goto error;
189190
}
@@ -366,7 +367,7 @@ static int ath3k_load_patch(struct usb_device *udev)
366367
}
367368

368369
snprintf(filename, ATH3K_NAME_LEN, "ar3k/AthrBT_0x%08x.dfu",
369-
fw_version.rom_version);
370+
le32_to_cpu(fw_version.rom_version));
370371

371372
ret = request_firmware(&firmware, filename, &udev->dev);
372373
if (ret < 0) {
@@ -428,7 +429,7 @@ static int ath3k_load_syscfg(struct usb_device *udev)
428429
}
429430

430431
snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s",
431-
fw_version.rom_version, clk_value, ".dfu");
432+
le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
432433

433434
ret = request_firmware(&firmware, filename, &udev->dev);
434435
if (ret < 0) {

‎drivers/bluetooth/bfusb.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,11 @@ static int bfusb_send_bulk(struct bfusb_data *data, struct sk_buff *skb)
131131

132132
BT_DBG("bfusb %p skb %p len %d", data, skb, skb->len);
133133

134-
if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
135-
return -ENOMEM;
134+
if (!urb) {
135+
urb = usb_alloc_urb(0, GFP_ATOMIC);
136+
if (!urb)
137+
return -ENOMEM;
138+
}
136139

137140
pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep);
138141

@@ -218,8 +221,11 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct urb *urb)
218221

219222
BT_DBG("bfusb %p urb %p", data, urb);
220223

221-
if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
222-
return -ENOMEM;
224+
if (!urb) {
225+
urb = usb_alloc_urb(0, GFP_ATOMIC);
226+
if (!urb)
227+
return -ENOMEM;
228+
}
223229

224230
skb = bt_skb_alloc(size, GFP_ATOMIC);
225231
if (!skb) {

‎drivers/bluetooth/bluecard_cs.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ static void bluecard_write_wakeup(bluecard_info_t *info)
257257
ready_bit = XMIT_BUF_ONE_READY;
258258
}
259259

260-
if (!(skb = skb_dequeue(&(info->txq))))
260+
skb = skb_dequeue(&(info->txq));
261+
if (!skb)
261262
break;
262263

263264
if (bt_cb(skb)->pkt_type & 0x80) {
@@ -391,7 +392,8 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
391392
if (info->rx_skb == NULL) {
392393
info->rx_state = RECV_WAIT_PACKET_TYPE;
393394
info->rx_count = 0;
394-
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
395+
info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
396+
if (!info->rx_skb) {
395397
BT_ERR("Can't allocate mem for new packet");
396398
return;
397399
}
@@ -566,7 +568,8 @@ static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud)
566568
/* Ericsson baud rate command */
567569
unsigned char cmd[] = { HCI_COMMAND_PKT, 0x09, 0xfc, 0x01, 0x03 };
568570

569-
if (!(skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
571+
skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
572+
if (!skb) {
570573
BT_ERR("Can't allocate mem for new packet");
571574
return -1;
572575
}

‎drivers/bluetooth/bt3c_cs.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ static void bt3c_write_wakeup(bt3c_info_t *info)
193193
if (!pcmcia_dev_present(info->p_dev))
194194
break;
195195

196-
197-
if (!(skb = skb_dequeue(&(info->txq)))) {
196+
skb = skb_dequeue(&(info->txq));
197+
if (!skb) {
198198
clear_bit(XMIT_SENDING, &(info->tx_state));
199199
break;
200200
}
@@ -238,7 +238,8 @@ static void bt3c_receive(bt3c_info_t *info)
238238
if (info->rx_skb == NULL) {
239239
info->rx_state = RECV_WAIT_PACKET_TYPE;
240240
info->rx_count = 0;
241-
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
241+
info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
242+
if (!info->rx_skb) {
242243
BT_ERR("Can't allocate mem for new packet");
243244
return;
244245
}

‎drivers/bluetooth/btuart_cs.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ static void btuart_write_wakeup(btuart_info_t *info)
149149
if (!pcmcia_dev_present(info->p_dev))
150150
return;
151151

152-
if (!(skb = skb_dequeue(&(info->txq))))
152+
skb = skb_dequeue(&(info->txq));
153+
if (!skb)
153154
break;
154155

155156
/* Send frame */
@@ -190,7 +191,8 @@ static void btuart_receive(btuart_info_t *info)
190191
if (info->rx_skb == NULL) {
191192
info->rx_state = RECV_WAIT_PACKET_TYPE;
192193
info->rx_count = 0;
193-
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
194+
info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
195+
if (!info->rx_skb) {
194196
BT_ERR("Can't allocate mem for new packet");
195197
return;
196198
}

‎drivers/bluetooth/btusb.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static const struct usb_device_id blacklist_table[] = {
159159
{ USB_DEVICE(0x0b05, 0x17d0), .driver_info = BTUSB_ATH3012 },
160160
{ USB_DEVICE(0x0cf3, 0x0036), .driver_info = BTUSB_ATH3012 },
161161
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
162+
{ USB_DEVICE(0x0cf3, 0x3005), .driver_info = BTUSB_ATH3012 },
162163
{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
163164
{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
164165
{ USB_DEVICE(0x0cf3, 0x311e), .driver_info = BTUSB_ATH3012 },

‎drivers/bluetooth/dtl1_cs.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ static void dtl1_write_wakeup(dtl1_info_t *info)
153153
if (!pcmcia_dev_present(info->p_dev))
154154
return;
155155

156-
if (!(skb = skb_dequeue(&(info->txq))))
156+
skb = skb_dequeue(&(info->txq));
157+
if (!skb)
157158
break;
158159

159160
/* Send frame */
@@ -215,13 +216,15 @@ static void dtl1_receive(dtl1_info_t *info)
215216
info->hdev->stat.byte_rx++;
216217

217218
/* Allocate packet */
218-
if (info->rx_skb == NULL)
219-
if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) {
219+
if (info->rx_skb == NULL) {
220+
info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
221+
if (!info->rx_skb) {
220222
BT_ERR("Can't allocate mem for new packet");
221223
info->rx_state = RECV_WAIT_NSH;
222224
info->rx_count = NSHL;
223225
return;
224226
}
227+
}
225228

226229
*skb_put(info->rx_skb, 1) = inb(iobase + UART_RX);
227230
nsh = (nsh_t *)info->rx_skb->data;

‎drivers/bluetooth/hci_bcsp.c‎

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ static struct sk_buff *bcsp_dequeue(struct hci_uart *hu)
291291
/* First of all, check for unreliable messages in the queue,
292292
since they have priority */
293293

294-
if ((skb = skb_dequeue(&bcsp->unrel)) != NULL) {
294+
skb = skb_dequeue(&bcsp->unrel);
295+
if (skb != NULL) {
295296
struct sk_buff *nskb = bcsp_prepare_pkt(bcsp, skb->data, skb->len, bt_cb(skb)->pkt_type);
296297
if (nskb) {
297298
kfree_skb(skb);
@@ -308,16 +309,20 @@ static struct sk_buff *bcsp_dequeue(struct hci_uart *hu)
308309

309310
spin_lock_irqsave_nested(&bcsp->unack.lock, flags, SINGLE_DEPTH_NESTING);
310311

311-
if (bcsp->unack.qlen < BCSP_TXWINSIZE && (skb = skb_dequeue(&bcsp->rel)) != NULL) {
312-
struct sk_buff *nskb = bcsp_prepare_pkt(bcsp, skb->data, skb->len, bt_cb(skb)->pkt_type);
313-
if (nskb) {
314-
__skb_queue_tail(&bcsp->unack, skb);
315-
mod_timer(&bcsp->tbcsp, jiffies + HZ / 4);
316-
spin_unlock_irqrestore(&bcsp->unack.lock, flags);
317-
return nskb;
318-
} else {
319-
skb_queue_head(&bcsp->rel, skb);
320-
BT_ERR("Could not dequeue pkt because alloc_skb failed");
312+
if (bcsp->unack.qlen < BCSP_TXWINSIZE) {
313+
skb = skb_dequeue(&bcsp->rel);
314+
if (skb != NULL) {
315+
struct sk_buff *nskb = bcsp_prepare_pkt(bcsp, skb->data, skb->len,
316+
bt_cb(skb)->pkt_type);
317+
if (nskb) {
318+
__skb_queue_tail(&bcsp->unack, skb);
319+
mod_timer(&bcsp->tbcsp, jiffies + HZ / 4);
320+
spin_unlock_irqrestore(&bcsp->unack.lock, flags);
321+
return nskb;
322+
} else {
323+
skb_queue_head(&bcsp->rel, skb);
324+
BT_ERR("Could not dequeue pkt because alloc_skb failed");
325+
}
321326
}
322327
}
323328

@@ -715,14 +720,16 @@ static int bcsp_open(struct hci_uart *hu)
715720
static int bcsp_close(struct hci_uart *hu)
716721
{
717722
struct bcsp_struct *bcsp = hu->priv;
723+
724+
del_timer_sync(&bcsp->tbcsp);
725+
718726
hu->priv = NULL;
719727

720728
BT_DBG("hu %p", hu);
721729

722730
skb_queue_purge(&bcsp->unack);
723731
skb_queue_purge(&bcsp->rel);
724732
skb_queue_purge(&bcsp->unrel);
725-
del_timer(&bcsp->tbcsp);
726733

727734
kfree(bcsp);
728735
return 0;

0 commit comments

Comments
 (0)