diff options
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 16 | ||||
-rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 13 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_debugfs.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_drv.h | 1 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 55 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_sdio.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/btuart_cs.c | 13 | ||||
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 12 | ||||
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 20 |
9 files changed, 54 insertions, 81 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index b0e569ba730d..2acdc605cb4b 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -867,11 +867,9 @@ static int bluecard_probe(struct pcmcia_device *link) | |||
867 | 867 | ||
868 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 868 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
869 | link->io.NumPorts1 = 8; | 869 | link->io.NumPorts1 = 8; |
870 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; | 870 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
871 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
872 | 871 | ||
873 | link->irq.Handler = bluecard_interrupt; | 872 | link->irq.Handler = bluecard_interrupt; |
874 | link->irq.Instance = info; | ||
875 | 873 | ||
876 | link->conf.Attributes = CONF_ENABLE_IRQ; | 874 | link->conf.Attributes = CONF_ENABLE_IRQ; |
877 | link->conf.IntType = INT_MEMORY_AND_IO; | 875 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -905,22 +903,16 @@ static int bluecard_config(struct pcmcia_device *link) | |||
905 | break; | 903 | break; |
906 | } | 904 | } |
907 | 905 | ||
908 | if (i != 0) { | 906 | if (i != 0) |
909 | cs_error(link, RequestIO, i); | ||
910 | goto failed; | 907 | goto failed; |
911 | } | ||
912 | 908 | ||
913 | i = pcmcia_request_irq(link, &link->irq); | 909 | i = pcmcia_request_irq(link, &link->irq); |
914 | if (i != 0) { | 910 | if (i != 0) |
915 | cs_error(link, RequestIRQ, i); | ||
916 | link->irq.AssignedIRQ = 0; | 911 | link->irq.AssignedIRQ = 0; |
917 | } | ||
918 | 912 | ||
919 | i = pcmcia_request_configuration(link, &link->conf); | 913 | i = pcmcia_request_configuration(link, &link->conf); |
920 | if (i != 0) { | 914 | if (i != 0) |
921 | cs_error(link, RequestConfiguration, i); | ||
922 | goto failed; | 915 | goto failed; |
923 | } | ||
924 | 916 | ||
925 | if (bluecard_open(info) != 0) | 917 | if (bluecard_open(info) != 0) |
926 | goto failed; | 918 | goto failed; |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index d58e22b9f06a..d814a2755ccb 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -659,11 +659,9 @@ static int bt3c_probe(struct pcmcia_device *link) | |||
659 | 659 | ||
660 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 660 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
661 | link->io.NumPorts1 = 8; | 661 | link->io.NumPorts1 = 8; |
662 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; | 662 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
663 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
664 | 663 | ||
665 | link->irq.Handler = bt3c_interrupt; | 664 | link->irq.Handler = bt3c_interrupt; |
666 | link->irq.Instance = info; | ||
667 | 665 | ||
668 | link->conf.Attributes = CONF_ENABLE_IRQ; | 666 | link->conf.Attributes = CONF_ENABLE_IRQ; |
669 | link->conf.IntType = INT_MEMORY_AND_IO; | 667 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -740,21 +738,16 @@ static int bt3c_config(struct pcmcia_device *link) | |||
740 | goto found_port; | 738 | goto found_port; |
741 | 739 | ||
742 | BT_ERR("No usable port range found"); | 740 | BT_ERR("No usable port range found"); |
743 | cs_error(link, RequestIO, -ENODEV); | ||
744 | goto failed; | 741 | goto failed; |
745 | 742 | ||
746 | found_port: | 743 | found_port: |
747 | i = pcmcia_request_irq(link, &link->irq); | 744 | i = pcmcia_request_irq(link, &link->irq); |
748 | if (i != 0) { | 745 | if (i != 0) |
749 | cs_error(link, RequestIRQ, i); | ||
750 | link->irq.AssignedIRQ = 0; | 746 | link->irq.AssignedIRQ = 0; |
751 | } | ||
752 | 747 | ||
753 | i = pcmcia_request_configuration(link, &link->conf); | 748 | i = pcmcia_request_configuration(link, &link->conf); |
754 | if (i != 0) { | 749 | if (i != 0) |
755 | cs_error(link, RequestConfiguration, i); | ||
756 | goto failed; | 750 | goto failed; |
757 | } | ||
758 | 751 | ||
759 | if (bt3c_open(info) != 0) | 752 | if (bt3c_open(info) != 0) |
760 | goto failed; | 753 | goto failed; |
diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c index 4617bd12f63b..d43b5cb864ef 100644 --- a/drivers/bluetooth/btmrvl_debugfs.c +++ b/drivers/bluetooth/btmrvl_debugfs.c | |||
@@ -29,7 +29,6 @@ struct btmrvl_debugfs_data { | |||
29 | struct dentry *root_dir, *config_dir, *status_dir; | 29 | struct dentry *root_dir, *config_dir, *status_dir; |
30 | 30 | ||
31 | /* config */ | 31 | /* config */ |
32 | struct dentry *drvdbg; | ||
33 | struct dentry *psmode; | 32 | struct dentry *psmode; |
34 | struct dentry *pscmd; | 33 | struct dentry *pscmd; |
35 | struct dentry *hsmode; | 34 | struct dentry *hsmode; |
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h index 411c7a77082d..523d197b9824 100644 --- a/drivers/bluetooth/btmrvl_drv.h +++ b/drivers/bluetooth/btmrvl_drv.h | |||
@@ -131,6 +131,7 @@ void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb); | |||
131 | int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); | 131 | int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); |
132 | 132 | ||
133 | int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd); | 133 | int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd); |
134 | int btmrvl_enable_ps(struct btmrvl_private *priv); | ||
134 | int btmrvl_prepare_command(struct btmrvl_private *priv); | 135 | int btmrvl_prepare_command(struct btmrvl_private *priv); |
135 | 136 | ||
136 | #ifdef CONFIG_DEBUG_FS | 137 | #ifdef CONFIG_DEBUG_FS |
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index e605563b4eaa..f97771ce432c 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c | |||
@@ -189,6 +189,38 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd) | |||
189 | } | 189 | } |
190 | EXPORT_SYMBOL_GPL(btmrvl_send_module_cfg_cmd); | 190 | EXPORT_SYMBOL_GPL(btmrvl_send_module_cfg_cmd); |
191 | 191 | ||
192 | int btmrvl_enable_ps(struct btmrvl_private *priv) | ||
193 | { | ||
194 | struct sk_buff *skb; | ||
195 | struct btmrvl_cmd *cmd; | ||
196 | |||
197 | skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC); | ||
198 | if (skb == NULL) { | ||
199 | BT_ERR("No free skb"); | ||
200 | return -ENOMEM; | ||
201 | } | ||
202 | |||
203 | cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd)); | ||
204 | cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, | ||
205 | BT_CMD_AUTO_SLEEP_MODE)); | ||
206 | cmd->length = 1; | ||
207 | |||
208 | if (priv->btmrvl_dev.psmode) | ||
209 | cmd->data[0] = BT_PS_ENABLE; | ||
210 | else | ||
211 | cmd->data[0] = BT_PS_DISABLE; | ||
212 | |||
213 | bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; | ||
214 | |||
215 | skb->dev = (void *) priv->btmrvl_dev.hcidev; | ||
216 | skb_queue_head(&priv->adapter->tx_queue, skb); | ||
217 | |||
218 | BT_DBG("Queue PSMODE Command:%d", cmd->data[0]); | ||
219 | |||
220 | return 0; | ||
221 | } | ||
222 | EXPORT_SYMBOL_GPL(btmrvl_enable_ps); | ||
223 | |||
192 | static int btmrvl_enable_hs(struct btmrvl_private *priv) | 224 | static int btmrvl_enable_hs(struct btmrvl_private *priv) |
193 | { | 225 | { |
194 | struct sk_buff *skb; | 226 | struct sk_buff *skb; |
@@ -258,28 +290,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv) | |||
258 | 290 | ||
259 | if (priv->btmrvl_dev.pscmd) { | 291 | if (priv->btmrvl_dev.pscmd) { |
260 | priv->btmrvl_dev.pscmd = 0; | 292 | priv->btmrvl_dev.pscmd = 0; |
261 | 293 | btmrvl_enable_ps(priv); | |
262 | skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC); | ||
263 | if (skb == NULL) { | ||
264 | BT_ERR("No free skb"); | ||
265 | return -ENOMEM; | ||
266 | } | ||
267 | |||
268 | cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd)); | ||
269 | cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_AUTO_SLEEP_MODE)); | ||
270 | cmd->length = 1; | ||
271 | |||
272 | if (priv->btmrvl_dev.psmode) | ||
273 | cmd->data[0] = BT_PS_ENABLE; | ||
274 | else | ||
275 | cmd->data[0] = BT_PS_DISABLE; | ||
276 | |||
277 | bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; | ||
278 | |||
279 | skb->dev = (void *) priv->btmrvl_dev.hcidev; | ||
280 | skb_queue_head(&priv->adapter->tx_queue, skb); | ||
281 | |||
282 | BT_DBG("Queue PSMODE Command:%d", cmd->data[0]); | ||
283 | } | 294 | } |
284 | 295 | ||
285 | if (priv->btmrvl_dev.hscmd) { | 296 | if (priv->btmrvl_dev.hscmd) { |
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 5b33b85790f2..1e6eb1aeba2b 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c | |||
@@ -930,6 +930,8 @@ static int btmrvl_sdio_probe(struct sdio_func *func, | |||
930 | priv->hw_wakeup_firmware = btmrvl_sdio_wakeup_fw; | 930 | priv->hw_wakeup_firmware = btmrvl_sdio_wakeup_fw; |
931 | 931 | ||
932 | btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); | 932 | btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); |
933 | priv->btmrvl_dev.psmode = 1; | ||
934 | btmrvl_enable_ps(priv); | ||
933 | 935 | ||
934 | return 0; | 936 | return 0; |
935 | 937 | ||
@@ -1001,3 +1003,5 @@ MODULE_AUTHOR("Marvell International Ltd."); | |||
1001 | MODULE_DESCRIPTION("Marvell BT-over-SDIO driver ver " VERSION); | 1003 | MODULE_DESCRIPTION("Marvell BT-over-SDIO driver ver " VERSION); |
1002 | MODULE_VERSION(VERSION); | 1004 | MODULE_VERSION(VERSION); |
1003 | MODULE_LICENSE("GPL v2"); | 1005 | MODULE_LICENSE("GPL v2"); |
1006 | MODULE_FIRMWARE("sd8688_helper.bin"); | ||
1007 | MODULE_FIRMWARE("sd8688.bin"); | ||
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index efd689a062eb..d339464dc15e 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -588,11 +588,9 @@ static int btuart_probe(struct pcmcia_device *link) | |||
588 | 588 | ||
589 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 589 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
590 | link->io.NumPorts1 = 8; | 590 | link->io.NumPorts1 = 8; |
591 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; | 591 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
592 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
593 | 592 | ||
594 | link->irq.Handler = btuart_interrupt; | 593 | link->irq.Handler = btuart_interrupt; |
595 | link->irq.Instance = info; | ||
596 | 594 | ||
597 | link->conf.Attributes = CONF_ENABLE_IRQ; | 595 | link->conf.Attributes = CONF_ENABLE_IRQ; |
598 | link->conf.IntType = INT_MEMORY_AND_IO; | 596 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -669,21 +667,16 @@ static int btuart_config(struct pcmcia_device *link) | |||
669 | goto found_port; | 667 | goto found_port; |
670 | 668 | ||
671 | BT_ERR("No usable port range found"); | 669 | BT_ERR("No usable port range found"); |
672 | cs_error(link, RequestIO, -ENODEV); | ||
673 | goto failed; | 670 | goto failed; |
674 | 671 | ||
675 | found_port: | 672 | found_port: |
676 | i = pcmcia_request_irq(link, &link->irq); | 673 | i = pcmcia_request_irq(link, &link->irq); |
677 | if (i != 0) { | 674 | if (i != 0) |
678 | cs_error(link, RequestIRQ, i); | ||
679 | link->irq.AssignedIRQ = 0; | 675 | link->irq.AssignedIRQ = 0; |
680 | } | ||
681 | 676 | ||
682 | i = pcmcia_request_configuration(link, &link->conf); | 677 | i = pcmcia_request_configuration(link, &link->conf); |
683 | if (i != 0) { | 678 | if (i != 0) |
684 | cs_error(link, RequestConfiguration, i); | ||
685 | goto failed; | 679 | goto failed; |
686 | } | ||
687 | 680 | ||
688 | if (btuart_open(info) != 0) | 681 | if (btuart_open(info) != 0) |
689 | goto failed; | 682 | goto failed; |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index b881a9cd8741..4f02a6f3c980 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -573,11 +573,9 @@ static int dtl1_probe(struct pcmcia_device *link) | |||
573 | 573 | ||
574 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 574 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
575 | link->io.NumPorts1 = 8; | 575 | link->io.NumPorts1 = 8; |
576 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; | 576 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
577 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
578 | 577 | ||
579 | link->irq.Handler = dtl1_interrupt; | 578 | link->irq.Handler = dtl1_interrupt; |
580 | link->irq.Instance = info; | ||
581 | 579 | ||
582 | link->conf.Attributes = CONF_ENABLE_IRQ; | 580 | link->conf.Attributes = CONF_ENABLE_IRQ; |
583 | link->conf.IntType = INT_MEMORY_AND_IO; | 581 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -622,16 +620,12 @@ static int dtl1_config(struct pcmcia_device *link) | |||
622 | goto failed; | 620 | goto failed; |
623 | 621 | ||
624 | i = pcmcia_request_irq(link, &link->irq); | 622 | i = pcmcia_request_irq(link, &link->irq); |
625 | if (i != 0) { | 623 | if (i != 0) |
626 | cs_error(link, RequestIRQ, i); | ||
627 | link->irq.AssignedIRQ = 0; | 624 | link->irq.AssignedIRQ = 0; |
628 | } | ||
629 | 625 | ||
630 | i = pcmcia_request_configuration(link, &link->conf); | 626 | i = pcmcia_request_configuration(link, &link->conf); |
631 | if (i != 0) { | 627 | if (i != 0) |
632 | cs_error(link, RequestConfiguration, i); | ||
633 | goto failed; | 628 | goto failed; |
634 | } | ||
635 | 629 | ||
636 | if (dtl1_open(info) != 0) | 630 | if (dtl1_open(info) != 0) |
637 | goto failed; | 631 | goto failed; |
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index d5cde6d86f89..7595274103fd 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -41,8 +41,6 @@ | |||
41 | 41 | ||
42 | #define VERSION "1.3" | 42 | #define VERSION "1.3" |
43 | 43 | ||
44 | static int minor = MISC_DYNAMIC_MINOR; | ||
45 | |||
46 | struct vhci_data { | 44 | struct vhci_data { |
47 | struct hci_dev *hdev; | 45 | struct hci_dev *hdev; |
48 | 46 | ||
@@ -218,12 +216,6 @@ static unsigned int vhci_poll(struct file *file, poll_table *wait) | |||
218 | return POLLOUT | POLLWRNORM; | 216 | return POLLOUT | POLLWRNORM; |
219 | } | 217 | } |
220 | 218 | ||
221 | static int vhci_ioctl(struct inode *inode, struct file *file, | ||
222 | unsigned int cmd, unsigned long arg) | ||
223 | { | ||
224 | return -EINVAL; | ||
225 | } | ||
226 | |||
227 | static int vhci_open(struct inode *inode, struct file *file) | 219 | static int vhci_open(struct inode *inode, struct file *file) |
228 | { | 220 | { |
229 | struct vhci_data *data; | 221 | struct vhci_data *data; |
@@ -284,10 +276,10 @@ static int vhci_release(struct inode *inode, struct file *file) | |||
284 | } | 276 | } |
285 | 277 | ||
286 | static const struct file_operations vhci_fops = { | 278 | static const struct file_operations vhci_fops = { |
279 | .owner = THIS_MODULE, | ||
287 | .read = vhci_read, | 280 | .read = vhci_read, |
288 | .write = vhci_write, | 281 | .write = vhci_write, |
289 | .poll = vhci_poll, | 282 | .poll = vhci_poll, |
290 | .ioctl = vhci_ioctl, | ||
291 | .open = vhci_open, | 283 | .open = vhci_open, |
292 | .release = vhci_release, | 284 | .release = vhci_release, |
293 | }; | 285 | }; |
@@ -302,18 +294,12 @@ static int __init vhci_init(void) | |||
302 | { | 294 | { |
303 | BT_INFO("Virtual HCI driver ver %s", VERSION); | 295 | BT_INFO("Virtual HCI driver ver %s", VERSION); |
304 | 296 | ||
305 | if (misc_register(&vhci_miscdev) < 0) { | 297 | return misc_register(&vhci_miscdev); |
306 | BT_ERR("Can't register misc device with minor %d", minor); | ||
307 | return -EIO; | ||
308 | } | ||
309 | |||
310 | return 0; | ||
311 | } | 298 | } |
312 | 299 | ||
313 | static void __exit vhci_exit(void) | 300 | static void __exit vhci_exit(void) |
314 | { | 301 | { |
315 | if (misc_deregister(&vhci_miscdev) < 0) | 302 | misc_deregister(&vhci_miscdev); |
316 | BT_ERR("Can't unregister misc device with minor %d", minor); | ||
317 | } | 303 | } |
318 | 304 | ||
319 | module_init(vhci_init); | 305 | module_init(vhci_init); |