diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-10-19 13:55:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-19 13:55:42 -0400 |
commit | 06f40a41b80e25e88a2b612ea3b2a94f93c94f72 (patch) | |
tree | fa3bc4d691d7024425183bfc1be75a36c4e1d3f3 /net/bluetooth | |
parent | db0fe0b2f6bba2fda939737d063db2ae14c58d71 (diff) | |
parent | 290eddc4b3661dc4dfa95d199e0be5788928b3b1 (diff) | |
download | linux-06f40a41b80e25e88a2b612ea3b2a94f93c94f72.tar.gz linux-06f40a41b80e25e88a2b612ea3b2a94f93c94f72.tar.bz2 linux-06f40a41b80e25e88a2b612ea3b2a94f93c94f72.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/smp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 8c225ef349cd..2ac8d50861e0 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) |