]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Avoid calling undefined smp_conn_security()
authorBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:46:46 +0000 (16:46 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:46:46 +0000 (16:46 +0000)
Commit ff03261adc8b4bdd8291f1783c079b53a892b429 ('Bluetooth: Fix
sending a HCI Authorization Request over LE links', commit
d8343f125710fb596f7a88cd756679f14f4e77b9 upstream) added an
call to smp_conn_security() from hci_conn_security().  The
former is only defined if CONFIG_BT_L2CAP=y.

This is not required in mainline since commit
f1e91e1640d808d332498a6b09b2bcd01462eff9 ('Bluetooth: Always compile
SCO and L2CAP in Bluetooth Core') removed that option.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/bluetooth/hci_conn.c

index 1fb1aeca748d259cd921ea6ca69c73da0b77c980..aa1264910c4e1cd5b5cba361d7249cbb71535ceb 100644 (file)
@@ -642,8 +642,10 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
 {
        BT_DBG("conn %p", conn);
 
+#ifdef CONFIG_BT_L2CAP
        if (conn->type == LE_LINK)
                return smp_conn_security(conn, sec_level);
+#endif
 
        /* For sdp we don't need the link key. */
        if (sec_level == BT_SECURITY_SDP)