diff options
author | Bing Zhao <bzhao@marvell.com> | 2010-03-03 17:37:37 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-05-10 03:34:04 -0400 |
commit | f120c6b635a62d414876b517aec0468628acfc60 (patch) | |
tree | 3fbfcbd85a296f46f56e45dfc416a20bf22e13de /drivers/bluetooth/btmrvl_main.c | |
parent | 64061607eab7cb146115927cb596de123c542d45 (diff) |
Bluetooth: Set hdev->dev_type based on Marvell device type
Get the device type from MODULE_BRINGUP_REQ command response.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btmrvl_main.c')
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index ec48bfe9e279..ee37ef0caee2 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c | |||
@@ -116,6 +116,13 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb) | |||
116 | ((event->data[2] == MODULE_BROUGHT_UP) || | 116 | ((event->data[2] == MODULE_BROUGHT_UP) || |
117 | (event->data[2] == MODULE_ALREADY_UP)) ? | 117 | (event->data[2] == MODULE_ALREADY_UP)) ? |
118 | "Bring-up succeed" : "Bring-up failed"); | 118 | "Bring-up succeed" : "Bring-up failed"); |
119 | |||
120 | if (event->length > 3) | ||
121 | priv->btmrvl_dev.dev_type = event->data[3]; | ||
122 | else | ||
123 | priv->btmrvl_dev.dev_type = HCI_BREDR; | ||
124 | |||
125 | BT_DBG("dev_type: %d", priv->btmrvl_dev.dev_type); | ||
119 | } else if (priv->btmrvl_dev.sendcmdflag && | 126 | } else if (priv->btmrvl_dev.sendcmdflag && |
120 | event->data[1] == MODULE_SHUTDOWN_REQ) { | 127 | event->data[1] == MODULE_SHUTDOWN_REQ) { |
121 | BT_DBG("EVENT:%s", (event->data[2]) ? | 128 | BT_DBG("EVENT:%s", (event->data[2]) ? |
@@ -549,6 +556,8 @@ int btmrvl_register_hdev(struct btmrvl_private *priv) | |||
549 | 556 | ||
550 | btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); | 557 | btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); |
551 | 558 | ||
559 | hdev->dev_type = priv->btmrvl_dev.dev_type; | ||
560 | |||
552 | ret = hci_register_dev(hdev); | 561 | ret = hci_register_dev(hdev); |
553 | if (ret < 0) { | 562 | if (ret < 0) { |
554 | BT_ERR("Can not register HCI device"); | 563 | BT_ERR("Can not register HCI device"); |