summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.c
diff options
context:
space:
mode:
authorJohn W. Linville2012-10-23 17:41:46 +0200
committerJohn W. Linville2012-10-23 17:41:46 +0200
commit9b34f40c20111ba658f88e1669598db494be1fbc (patch)
treebe98189b178ca63a44c09c8a5e92574a92932b51 /net/bluetooth/smp.c
parentbrcm80211: remove some truely barftastic code (diff)
parentMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber... (diff)
downloadkernel-qcow2-linux-9b34f40c20111ba658f88e1669598db494be1fbc.tar.gz
kernel-qcow2-linux-9b34f40c20111ba658f88e1669598db494be1fbc.tar.xz
kernel-qcow2-linux-9b34f40c20111ba658f88e1669598db494be1fbc.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c net/mac80211/mlme.c
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r--net/bluetooth/smp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 9b54fea080c9..9176bc17595c 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -32,6 +32,8 @@
#define SMP_TIMEOUT msecs_to_jiffies(30000)
+#define AUTH_REQ_MASK 0x07
+
static inline void swap128(u8 src[16], u8 dst[16])
{
int i;
@@ -230,7 +232,7 @@ static void build_pairing_cmd(struct l2cap_conn *conn,
req->max_key_size = SMP_MAX_ENC_KEY_SIZE;
req->init_key_dist = 0;
req->resp_key_dist = dist_keys;
- req->auth_req = authreq;
+ req->auth_req = (authreq & AUTH_REQ_MASK);
return;
}
@@ -239,7 +241,7 @@ static void build_pairing_cmd(struct l2cap_conn *conn,
rsp->max_key_size = SMP_MAX_ENC_KEY_SIZE;
rsp->init_key_dist = 0;
rsp->resp_key_dist = req->resp_key_dist & dist_keys;
- rsp->auth_req = authreq;
+ rsp->auth_req = (authreq & AUTH_REQ_MASK);
}
static u8 check_enc_key_size(struct l2cap_conn *conn, __u8 max_key_size)