aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-05-20 02:45:48 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-05-20 11:44:12 -0400
commit1ef35827a999582669b38b71d3167907b4c2afd0 (patch)
tree431dcf795951c7891fb91dd215c53b2b4441f019 /net/bluetooth
parent4bc58f51e156227d139668199ffe5df2ccb2f3c2 (diff)
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/smp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index df91ed28084f..72743f87b22f 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -685,8 +685,7 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
685{ 685{
686 struct smp_cmd_pairing rsp, *req = (void *) skb->data; 686 struct smp_cmd_pairing rsp, *req = (void *) skb->data;
687 struct smp_chan *smp; 687 struct smp_chan *smp;
688 u8 key_size; 688 u8 key_size, auth;
689 u8 auth = SMP_AUTH_NONE;
690 int ret; 689 int ret;
691 690
692 BT_DBG("conn %p", conn); 691 BT_DBG("conn %p", conn);
@@ -710,8 +709,7 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
710 skb_pull(skb, sizeof(*req)); 709 skb_pull(skb, sizeof(*req));
711 710
712 /* We didn't start the pairing, so match remote */ 711 /* We didn't start the pairing, so match remote */
713 if (req->auth_req & SMP_AUTH_BONDING) 712 auth = req->auth_req;
714 auth = req->auth_req;
715 713
716 conn->hcon->pending_sec_level = authreq_to_seclevel(auth); 714 conn->hcon->pending_sec_level = authreq_to_seclevel(auth);
717 715