Bluetooth: Fix setting initial local auth_req value

There is no reason to have the initial local value conditional to
whether the remote value has bonding set or not. We can either way start
off with the value we received.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Johan Hedberg 2014-05-20 09:45:48 +03:00 коммит произвёл Marcel Holtmann
Родитель 4bc58f51e1
Коммит 1ef35827a9
1 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -685,8 +685,7 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
{ {
struct smp_cmd_pairing rsp, *req = (void *) skb->data; struct smp_cmd_pairing rsp, *req = (void *) skb->data;
struct smp_chan *smp; struct smp_chan *smp;
u8 key_size; u8 key_size, auth;
u8 auth = SMP_AUTH_NONE;
int ret; int ret;
BT_DBG("conn %p", conn); BT_DBG("conn %p", conn);
@ -710,8 +709,7 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
skb_pull(skb, sizeof(*req)); skb_pull(skb, sizeof(*req));
/* We didn't start the pairing, so match remote */ /* We didn't start the pairing, so match remote */
if (req->auth_req & SMP_AUTH_BONDING) auth = req->auth_req;
auth = req->auth_req;
conn->hcon->pending_sec_level = authreq_to_seclevel(auth); conn->hcon->pending_sec_level = authreq_to_seclevel(auth);