public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Bluetooth: decode btmrvl MODULE_BRINGUP_REG response correctly
@ 2010-03-03 22:37 Bing Zhao
  2010-03-03 22:37 ` [PATCH 2/3] Bluetooth: separate btmrvl_register_hdev() from btmrvl_add_card() Bing Zhao
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bing Zhao @ 2010-03-03 22:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Bing Zhao

btmrvl MODULE_BRINGUP_REQ command response returns success with
either 0x00 or 0x0c.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/bluetooth/btmrvl_drv.h  |    5 ++++-
 drivers/bluetooth/btmrvl_main.c |    6 ++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
index 523d197..bdf5187 100644
--- a/drivers/bluetooth/btmrvl_drv.h
+++ b/drivers/bluetooth/btmrvl_drv.h
@@ -87,8 +87,11 @@ struct btmrvl_private {
 #define BT_CMD_HOST_SLEEP_ENABLE	0x5A
 #define BT_CMD_MODULE_CFG_REQ		0x5B
 
-/* Sub-commands: Module Bringup/Shutdown Request */
+/* Sub-commands: Module Bringup/Shutdown Request/Response */
 #define MODULE_BRINGUP_REQ		0xF1
+#define MODULE_BROUGHT_UP		0x00
+#define MODULE_ALREADY_UP		0x0C
+
 #define MODULE_SHUTDOWN_REQ		0xF2
 
 #define BT_EVENT_POWER_STATE		0x20
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 53a43ad..31e7412 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -112,8 +112,10 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
 	case BT_CMD_MODULE_CFG_REQ:
 		if (priv->btmrvl_dev.sendcmdflag &&
 				event->data[1] == MODULE_BRINGUP_REQ) {
-			BT_DBG("EVENT:%s", (event->data[2]) ?
-				"Bring-up failed" : "Bring-up succeed");
+			BT_DBG("EVENT:%s",
+				((event->data[2] == MODULE_BROUGHT_UP) ||
+				(event->data[2] == MODULE_ALREADY_UP)) ?
+				"Bring-up succeed" : "Bring-up failed");
 		} else if (priv->btmrvl_dev.sendcmdflag &&
 				event->data[1] == MODULE_SHUTDOWN_REQ) {
 			BT_DBG("EVENT:%s", (event->data[2]) ?
-- 
1.5.3.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-03-09  0:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03 22:37 [PATCH 1/3] Bluetooth: decode btmrvl MODULE_BRINGUP_REG response correctly Bing Zhao
2010-03-03 22:37 ` [PATCH 2/3] Bluetooth: separate btmrvl_register_hdev() from btmrvl_add_card() Bing Zhao
2010-03-09  0:58   ` Marcel Holtmann
2010-03-03 22:37 ` [PATCH 3/3] Bluetooth: set hdev->dev_type based on Marvell device type Bing Zhao
2010-03-09  0:59   ` Marcel Holtmann
2010-03-09  0:58 ` [PATCH 1/3] Bluetooth: decode btmrvl MODULE_BRINGUP_REG response correctly Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox