Bluetooth: HCI devices are either BR/EDR or AMP radios
authorDavid Vrabel <david.vrabel@csr.com>
Mon, 9 Aug 2010 21:38:10 +0000 (17:38 -0400)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 12 Oct 2010 15:44:51 +0000 (12:44 -0300)
HCI transport drivers may not know what type of radio an AMP device has
so only say whether they're BR/EDR or AMP devices.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
drivers/bluetooth/btmrvl_main.c
include/net/bluetooth/hci.h
net/bluetooth/hci_sysfs.c

index 0d32ec82e9bfa5a72e847e43202830f91b2c26d0..548d1d9e4ddad7328c2ac9d68ec7d17de949d15a 100644 (file)
@@ -117,8 +117,8 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
                                (event->data[2] == MODULE_ALREADY_UP)) ?
                                "Bring-up succeed" : "Bring-up failed");
 
-                       if (event->length > 3)
-                               priv->btmrvl_dev.dev_type = event->data[3];
+                       if (event->length > 3 && event->data[3])
+                               priv->btmrvl_dev.dev_type = HCI_AMP;
                        else
                                priv->btmrvl_dev.dev_type = HCI_BREDR;
 
index bcbdd6d4e6dd43f1dfb4196a5eb3998309cf5909..e30e00834340a1330e373d7397fadbbccb1f035f 100644 (file)
@@ -54,7 +54,7 @@
 
 /* HCI controller types */
 #define HCI_BREDR      0x00
-#define HCI_80211      0x01
+#define HCI_AMP                0x01
 
 /* HCI device quirks */
 enum {
index 8fb967beee80bd617597d5e8f7eba981206361c9..1a9f0db027da006135458f5b1f4f8419e79ee976 100644 (file)
@@ -196,8 +196,8 @@ static inline char *host_typetostr(int type)
        switch (type) {
        case HCI_BREDR:
                return "BR/EDR";
-       case HCI_80211:
-               return "802.11";
+       case HCI_AMP:
+               return "AMP";
        default:
                return "UNKNOWN";
        }