aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/bt3c_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/bt3c_cs.c')
-rw-r--r--drivers/bluetooth/bt3c_cs.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index a1aaa3ba2a4b..73d87994d028 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -247,7 +247,6 @@ static void bt3c_receive(bt3c_info_t *info)
247 247
248 if (info->rx_state == RECV_WAIT_PACKET_TYPE) { 248 if (info->rx_state == RECV_WAIT_PACKET_TYPE) {
249 249
250 info->rx_skb->dev = (void *) info->hdev;
251 bt_cb(info->rx_skb)->pkt_type = inb(iobase + DATA_L); 250 bt_cb(info->rx_skb)->pkt_type = inb(iobase + DATA_L);
252 inb(iobase + DATA_H); 251 inb(iobase + DATA_H);
253 //printk("bt3c: PACKET_TYPE=%02x\n", bt_cb(info->rx_skb)->pkt_type); 252 //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)
318 break; 317 break;
319 318
320 case RECV_WAIT_DATA: 319 case RECV_WAIT_DATA:
321 hci_recv_frame(info->rx_skb); 320 hci_recv_frame(info->hdev, info->rx_skb);
322 info->rx_skb = NULL; 321 info->rx_skb = NULL;
323 break; 322 break;
324 323
@@ -416,19 +415,11 @@ static int bt3c_hci_close(struct hci_dev *hdev)
416} 415}
417 416
418 417
419static int bt3c_hci_send_frame(struct sk_buff *skb) 418static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
420{ 419{
421 bt3c_info_t *info; 420 bt3c_info_t *info = hci_get_drvdata(hdev);
422 struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
423 unsigned long flags; 421 unsigned long flags;
424 422
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
432 switch (bt_cb(skb)->pkt_type) { 423 switch (bt_cb(skb)->pkt_type) {
433 case HCI_COMMAND_PKT: 424 case HCI_COMMAND_PKT:
434 hdev->stat.cmd_tx++; 425 hdev->stat.cmd_tx++;
@@ -455,12 +446,6 @@ static int bt3c_hci_send_frame(struct sk_buff *skb)
455} 446}
456 447
457 448
458static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
459{
460 return -ENOIOCTLCMD;
461}
462
463
464 449
465/* ======================== Card services HCI interaction ======================== */ 450/* ======================== Card services HCI interaction ======================== */
466 451
@@ -577,11 +562,10 @@ static int bt3c_open(bt3c_info_t *info)
577 hci_set_drvdata(hdev, info); 562 hci_set_drvdata(hdev, info);
578 SET_HCIDEV_DEV(hdev, &info->p_dev->dev); 563 SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
579 564
580 hdev->open = bt3c_hci_open; 565 hdev->open = bt3c_hci_open;
581 hdev->close = bt3c_hci_close; 566 hdev->close = bt3c_hci_close;
582 hdev->flush = bt3c_hci_flush; 567 hdev->flush = bt3c_hci_flush;
583 hdev->send = bt3c_hci_send_frame; 568 hdev->send = bt3c_hci_send_frame;
584 hdev->ioctl = bt3c_hci_ioctl;
585 569
586 /* Load firmware */ 570 /* Load firmware */
587 err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev); 571 err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);