Bluetooth: Add error mapping for Directed Advertising Timeout
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 24 Mar 2014 18:21:52 +0000 (20:21 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 26 Mar 2014 16:31:36 +0000 (09:31 -0700)
When a timeout occurs using directed advertising a 0x3c error gets
generated. Since the operation is analogous to conventional connection
creation map this to the usual EHOSTDOWN error.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/lib.c

index b3fbc73..941ad75 100644 (file)
@@ -58,6 +58,7 @@ int bt_to_errno(__u16 code)
                return EIO;
 
        case 0x04:
+       case 0x3c:
                return EHOSTDOWN;
 
        case 0x05: