Bluetooth: Fix bogus check for re-auth no supported with non-ssp
[platform/kernel/linux-starfive.git] / include / net / bluetooth / hci_core.h
index f36c1fd..b83cfcf 100644 (file)
@@ -189,6 +189,7 @@ struct blocked_key {
 struct smp_csrk {
        bdaddr_t bdaddr;
        u8 bdaddr_type;
+       u8 link_type;
        u8 type;
        u8 val[16];
 };
@@ -198,6 +199,7 @@ struct smp_ltk {
        struct rcu_head rcu;
        bdaddr_t bdaddr;
        u8 bdaddr_type;
+       u8 link_type;
        u8 authenticated;
        u8 type;
        u8 enc_size;
@@ -212,6 +214,7 @@ struct smp_irk {
        bdaddr_t rpa;
        bdaddr_t bdaddr;
        u8 addr_type;
+       u8 link_type;
        u8 val[16];
 };
 
@@ -219,6 +222,8 @@ struct link_key {
        struct list_head list;
        struct rcu_head rcu;
        bdaddr_t bdaddr;
+       u8 bdaddr_type;
+       u8 link_type;
        u8 type;
        u8 val[HCI_LINK_KEY_SIZE];
        u8 pin_len;
@@ -350,6 +355,8 @@ struct hci_dev {
        struct list_head list;
        struct mutex    lock;
 
+       struct ida      unset_handle_ida;
+
        const char      *name;
        unsigned long   flags;
        __u16           id;
@@ -950,7 +957,6 @@ void hci_inquiry_cache_flush(struct hci_dev *hdev);
 /* ----- HCI Connections ----- */
 enum {
        HCI_CONN_AUTH_PEND,
-       HCI_CONN_REAUTH_PEND,
        HCI_CONN_ENCRYPT_PEND,
        HCI_CONN_RSWITCH_PEND,
        HCI_CONN_MODE_CHANGE_PEND,
@@ -1225,11 +1231,11 @@ static inline struct hci_conn *hci_conn_hash_lookup_cis(struct hci_dev *hdev,
                        continue;
 
                /* Match CIG ID if set */
-               if (cig != BT_ISO_QOS_CIG_UNSET && cig != c->iso_qos.ucast.cig)
+               if (cig != c->iso_qos.ucast.cig)
                        continue;
 
                /* Match CIS ID if set */
-               if (id != BT_ISO_QOS_CIS_UNSET && id != c->iso_qos.ucast.cis)
+               if (id != c->iso_qos.ucast.cis)
                        continue;
 
                /* Match destination address if set */
@@ -1449,7 +1455,9 @@ int hci_le_create_cis_pending(struct hci_dev *hdev);
 int hci_conn_check_create_cis(struct hci_conn *conn);
 
 struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst,
-                             u8 role);
+                             u8 role, u16 handle);
+struct hci_conn *hci_conn_add_unset(struct hci_dev *hdev, int type,
+                                   bdaddr_t *dst, u8 role);
 void hci_conn_del(struct hci_conn *conn);
 void hci_conn_hash_flush(struct hci_dev *hdev);
 void hci_conn_check_pending(struct hci_dev *hdev);