Skip to content

Commit 87bc072

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
2 parents f421436 + 01925ef commit 87bc072

186 files changed

Lines changed: 15085 additions & 4189 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.

‎drivers/bluetooth/ath3k.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct ath3k_version {
5757
unsigned char reserved[0x07];
5858
};
5959

60-
static struct usb_device_id ath3k_table[] = {
60+
static const struct usb_device_id ath3k_table[] = {
6161
/* Atheros AR3011 */
6262
{ USB_DEVICE(0x0CF3, 0x3000) },
6363

@@ -112,7 +112,7 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
112112
#define BTUSB_ATH3012 0x80
113113
/* This table is to load patch and sysconfig files
114114
* for AR3012 */
115-
static struct usb_device_id ath3k_blist_tbl[] = {
115+
static const struct usb_device_id ath3k_blist_tbl[] = {
116116

117117
/* Atheros AR3012 with sflash firmware*/
118118
{ USB_DEVICE(0x0CF3, 0x0036), .driver_info = BTUSB_ATH3012 },

‎drivers/bluetooth/bfusb.c‎

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
static struct usb_driver bfusb_driver;
4444

45-
static struct usb_device_id bfusb_table[] = {
45+
static const struct usb_device_id bfusb_table[] = {
4646
/* AVM BlueFRITZ! USB */
4747
{ USB_DEVICE(0x057c, 0x2200) },
4848

@@ -318,7 +318,6 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
318318
return -ENOMEM;
319319
}
320320

321-
skb->dev = (void *) data->hdev;
322321
bt_cb(skb)->pkt_type = pkt_type;
323322

324323
data->reassembly = skb;
@@ -333,7 +332,7 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
333332
memcpy(skb_put(data->reassembly, len), buf, len);
334333

335334
if (hdr & 0x08) {
336-
hci_recv_frame(data->reassembly);
335+
hci_recv_frame(data->hdev, data->reassembly);
337336
data->reassembly = NULL;
338337
}
339338

@@ -465,26 +464,18 @@ static int bfusb_close(struct hci_dev *hdev)
465464
return 0;
466465
}
467466

468-
static int bfusb_send_frame(struct sk_buff *skb)
467+
static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
469468
{
470-
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
471-
struct bfusb_data *data;
469+
struct bfusb_data *data = hci_get_drvdata(hdev);
472470
struct sk_buff *nskb;
473471
unsigned char buf[3];
474472
int sent = 0, size, count;
475473

476474
BT_DBG("hdev %p skb %p type %d len %d", hdev, skb, bt_cb(skb)->pkt_type, skb->len);
477475

478-
if (!hdev) {
479-
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
480-
return -ENODEV;
481-
}
482-
483476
if (!test_bit(HCI_RUNNING, &hdev->flags))
484477
return -EBUSY;
485478

486-
data = hci_get_drvdata(hdev);
487-
488479
switch (bt_cb(skb)->pkt_type) {
489480
case HCI_COMMAND_PKT:
490481
hdev->stat.cmd_tx++;
@@ -544,11 +535,6 @@ static int bfusb_send_frame(struct sk_buff *skb)
544535
return 0;
545536
}
546537

547-
static int bfusb_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
548-
{
549-
return -ENOIOCTLCMD;
550-
}
551-
552538
static int bfusb_load_firmware(struct bfusb_data *data,
553539
const unsigned char *firmware, int count)
554540
{
@@ -699,11 +685,10 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
699685
hci_set_drvdata(hdev, data);
700686
SET_HCIDEV_DEV(hdev, &intf->dev);
701687

702-
hdev->open = bfusb_open;
703-
hdev->close = bfusb_close;
704-
hdev->flush = bfusb_flush;
705-
hdev->send = bfusb_send_frame;
706-
hdev->ioctl = bfusb_ioctl;
688+
hdev->open = bfusb_open;
689+
hdev->close = bfusb_close;
690+
hdev->flush = bfusb_flush;
691+
hdev->send = bfusb_send_frame;
707692

708693
if (hci_register_dev(hdev) < 0) {
709694
BT_ERR("Can't register HCI device");

‎drivers/bluetooth/bluecard_cs.c‎

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
399399

400400
if (info->rx_state == RECV_WAIT_PACKET_TYPE) {
401401

402-
info->rx_skb->dev = (void *) info->hdev;
403402
bt_cb(info->rx_skb)->pkt_type = buf[i];
404403

405404
switch (bt_cb(info->rx_skb)->pkt_type) {
@@ -477,7 +476,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
477476
break;
478477

479478
case RECV_WAIT_DATA:
480-
hci_recv_frame(info->rx_skb);
479+
hci_recv_frame(info->hdev, info->rx_skb);
481480
info->rx_skb = NULL;
482481
break;
483482

@@ -659,17 +658,9 @@ static int bluecard_hci_close(struct hci_dev *hdev)
659658
}
660659

661660

662-
static int bluecard_hci_send_frame(struct sk_buff *skb)
661+
static int bluecard_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
663662
{
664-
bluecard_info_t *info;
665-
struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
666-
667-
if (!hdev) {
668-
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
669-
return -ENODEV;
670-
}
671-
672-
info = hci_get_drvdata(hdev);
663+
bluecard_info_t *info = hci_get_drvdata(hdev);
673664

674665
switch (bt_cb(skb)->pkt_type) {
675666
case HCI_COMMAND_PKT:
@@ -693,12 +684,6 @@ static int bluecard_hci_send_frame(struct sk_buff *skb)
693684
}
694685

695686

696-
static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
697-
{
698-
return -ENOIOCTLCMD;
699-
}
700-
701-
702687

703688
/* ======================== Card services HCI interaction ======================== */
704689

@@ -734,11 +719,10 @@ static int bluecard_open(bluecard_info_t *info)
734719
hci_set_drvdata(hdev, info);
735720
SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
736721

737-
hdev->open = bluecard_hci_open;
738-
hdev->close = bluecard_hci_close;
739-
hdev->flush = bluecard_hci_flush;
740-
hdev->send = bluecard_hci_send_frame;
741-
hdev->ioctl = bluecard_hci_ioctl;
722+
hdev->open = bluecard_hci_open;
723+
hdev->close = bluecard_hci_close;
724+
hdev->flush = bluecard_hci_flush;
725+
hdev->send = bluecard_hci_send_frame;
742726

743727
id = inb(iobase + 0x30);
744728

‎drivers/bluetooth/bpa10x.c‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#define VERSION "0.10"
3939

40-
static struct usb_device_id bpa10x_table[] = {
40+
static const struct usb_device_id bpa10x_table[] = {
4141
/* Tektronix BPA 100/105 (Digianswer) */
4242
{ USB_DEVICE(0x08fd, 0x0002) },
4343

@@ -129,8 +129,6 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count)
129129
return -ENOMEM;
130130
}
131131

132-
skb->dev = (void *) hdev;
133-
134132
data->rx_skb[queue] = skb;
135133

136134
scb = (void *) skb->cb;
@@ -155,7 +153,7 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count)
155153
data->rx_skb[queue] = NULL;
156154

157155
bt_cb(skb)->pkt_type = scb->type;
158-
hci_recv_frame(skb);
156+
hci_recv_frame(hdev, skb);
159157
}
160158

161159
count -= len; buf += len;
@@ -352,9 +350,8 @@ static int bpa10x_flush(struct hci_dev *hdev)
352350
return 0;
353351
}
354352

355-
static int bpa10x_send_frame(struct sk_buff *skb)
353+
static int bpa10x_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
356354
{
357-
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
358355
struct bpa10x_data *data = hci_get_drvdata(hdev);
359356
struct usb_ctrlrequest *dr;
360357
struct urb *urb;
@@ -366,6 +363,8 @@ static int bpa10x_send_frame(struct sk_buff *skb)
366363
if (!test_bit(HCI_RUNNING, &hdev->flags))
367364
return -EBUSY;
368365

366+
skb->dev = (void *) hdev;
367+
369368
urb = usb_alloc_urb(0, GFP_ATOMIC);
370369
if (!urb)
371370
return -ENOMEM;

‎drivers/bluetooth/bt3c_cs.c‎

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ static void bt3c_receive(bt3c_info_t *info)
247247

248248
if (info->rx_state == RECV_WAIT_PACKET_TYPE) {
249249

250-
info->rx_skb->dev = (void *) info->hdev;
251250
bt_cb(info->rx_skb)->pkt_type = inb(iobase + DATA_L);
252251
inb(iobase + DATA_H);
253252
//printk("bt3c: PACKET_TYPE=%02x\n", bt_cb(info->rx_skb)->pkt_type);
@@ -318,7 +317,7 @@ static void bt3c_receive(bt3c_info_t *info)
318317
break;
319318

320319
case RECV_WAIT_DATA:
321-
hci_recv_frame(info->rx_skb);
320+
hci_recv_frame(info->hdev, info->rx_skb);
322321
info->rx_skb = NULL;
323322
break;
324323

@@ -416,19 +415,11 @@ static int bt3c_hci_close(struct hci_dev *hdev)
416415
}
417416

418417

419-
static int bt3c_hci_send_frame(struct sk_buff *skb)
418+
static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
420419
{
421-
bt3c_info_t *info;
422-
struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
420+
bt3c_info_t *info = hci_get_drvdata(hdev);
423421
unsigned long flags;
424422

425-
if (!hdev) {
426-
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
427-
return -ENODEV;
428-
}
429-
430-
info = hci_get_drvdata(hdev);
431-
432423
switch (bt_cb(skb)->pkt_type) {
433424
case HCI_COMMAND_PKT:
434425
hdev->stat.cmd_tx++;
@@ -455,12 +446,6 @@ static int bt3c_hci_send_frame(struct sk_buff *skb)
455446
}
456447

457448

458-
static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
459-
{
460-
return -ENOIOCTLCMD;
461-
}
462-
463-
464449

465450
/* ======================== Card services HCI interaction ======================== */
466451

@@ -577,11 +562,10 @@ static int bt3c_open(bt3c_info_t *info)
577562
hci_set_drvdata(hdev, info);
578563
SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
579564

580-
hdev->open = bt3c_hci_open;
581-
hdev->close = bt3c_hci_close;
582-
hdev->flush = bt3c_hci_flush;
583-
hdev->send = bt3c_hci_send_frame;
584-
hdev->ioctl = bt3c_hci_ioctl;
565+
hdev->open = bt3c_hci_open;
566+
hdev->close = bt3c_hci_close;
567+
hdev->flush = bt3c_hci_flush;
568+
hdev->send = bt3c_hci_send_frame;
585569

586570
/* Load firmware */
587571
err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);

‎drivers/bluetooth/btmrvl_main.c‎

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no,
187187

188188
bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
189189

190-
skb->dev = (void *) priv->btmrvl_dev.hcidev;
191190
skb_queue_head(&priv->adapter->tx_queue, skb);
192191

193192
priv->btmrvl_dev.sendcmdflag = true;
@@ -356,26 +355,12 @@ static void btmrvl_free_adapter(struct btmrvl_private *priv)
356355
priv->adapter = NULL;
357356
}
358357

359-
static int btmrvl_ioctl(struct hci_dev *hdev,
360-
unsigned int cmd, unsigned long arg)
358+
static int btmrvl_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
361359
{
362-
return -ENOIOCTLCMD;
363-
}
364-
365-
static int btmrvl_send_frame(struct sk_buff *skb)
366-
{
367-
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
368-
struct btmrvl_private *priv = NULL;
360+
struct btmrvl_private *priv = hci_get_drvdata(hdev);
369361

370362
BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len);
371363

372-
if (!hdev) {
373-
BT_ERR("Frame for unknown HCI device");
374-
return -ENODEV;
375-
}
376-
377-
priv = hci_get_drvdata(hdev);
378-
379364
if (!test_bit(HCI_RUNNING, &hdev->flags)) {
380365
BT_ERR("Failed testing HCI_RUNING, flags=%lx", hdev->flags);
381366
print_hex_dump_bytes("data: ", DUMP_PREFIX_OFFSET,
@@ -650,12 +635,11 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
650635
priv->btmrvl_dev.hcidev = hdev;
651636
hci_set_drvdata(hdev, priv);
652637

653-
hdev->bus = HCI_SDIO;
654-
hdev->open = btmrvl_open;
638+
hdev->bus = HCI_SDIO;
639+
hdev->open = btmrvl_open;
655640
hdev->close = btmrvl_close;
656641
hdev->flush = btmrvl_flush;
657-
hdev->send = btmrvl_send_frame;
658-
hdev->ioctl = btmrvl_ioctl;
642+
hdev->send = btmrvl_send_frame;
659643
hdev->setup = btmrvl_setup;
660644

661645
hdev->dev_type = priv->btmrvl_dev.dev_type;

‎drivers/bluetooth/btmrvl_sdio.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,28 +600,26 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
600600
case HCI_SCODATA_PKT:
601601
case HCI_EVENT_PKT:
602602
bt_cb(skb)->pkt_type = type;
603-
skb->dev = (void *)hdev;
604603
skb_put(skb, buf_len);
605604
skb_pull(skb, SDIO_HEADER_LEN);
606605

607606
if (type == HCI_EVENT_PKT) {
608607
if (btmrvl_check_evtpkt(priv, skb))
609-
hci_recv_frame(skb);
608+
hci_recv_frame(hdev, skb);
610609
} else {
611-
hci_recv_frame(skb);
610+
hci_recv_frame(hdev, skb);
612611
}
613612

614613
hdev->stat.byte_rx += buf_len;
615614
break;
616615

617616
case MRVL_VENDOR_PKT:
618617
bt_cb(skb)->pkt_type = HCI_VENDOR_PKT;
619-
skb->dev = (void *)hdev;
620618
skb_put(skb, buf_len);
621619
skb_pull(skb, SDIO_HEADER_LEN);
622620

623621
if (btmrvl_process_event(priv, skb))
624-
hci_recv_frame(skb);
622+
hci_recv_frame(hdev, skb);
625623

626624
hdev->stat.byte_rx += buf_len;
627625
break;

‎drivers/bluetooth/btsdio.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,9 @@ static int btsdio_rx_packet(struct btsdio_data *data)
157157

158158
data->hdev->stat.byte_rx += len;
159159

160-
skb->dev = (void *) data->hdev;
161160
bt_cb(skb)->pkt_type = hdr[3];
162161

163-
err = hci_recv_frame(skb);
162+
err = hci_recv_frame(data->hdev, skb);
164163
if (err < 0)
165164
return err;
166165

@@ -255,9 +254,8 @@ static int btsdio_flush(struct hci_dev *hdev)
255254
return 0;
256255
}
257256

258-
static int btsdio_send_frame(struct sk_buff *skb)
257+
static int btsdio_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
259258
{
260-
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
261259
struct btsdio_data *data = hci_get_drvdata(hdev);
262260

263261
BT_DBG("%s", hdev->name);

0 commit comments

Comments
 (0)