]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/bluetooth/l2cap_core.c
Bluetooth: Allow 3D profile to use security mode 4 level 0
[karo-tx-linux.git] / net / bluetooth / l2cap_core.c
index cc51cb860c4050578bf5050c40a7edd879ce5b7a..e932ffda5445f72f265e1dae90d90a86f5054d1b 100644 (file)
@@ -688,6 +688,16 @@ static inline u8 l2cap_get_auth_type(struct l2cap_chan *chan)
                        return HCI_AT_NO_BONDING;
                }
                break;
+       case L2CAP_CHAN_CONN_LESS:
+               if (chan->psm == __constant_cpu_to_le16(L2CAP_PSM_3DSP)) {
+                       if (chan->sec_level == BT_SECURITY_LOW)
+                               chan->sec_level = BT_SECURITY_SDP;
+               }
+               if (chan->sec_level == BT_SECURITY_HIGH)
+                       return HCI_AT_NO_BONDING_MITM;
+               else
+                       return HCI_AT_NO_BONDING;
+               break;
        case L2CAP_CHAN_CONN_ORIENTED:
                if (chan->psm == __constant_cpu_to_le16(L2CAP_PSM_SDP)) {
                        if (chan->sec_level == BT_SECURITY_LOW)