OSDN Git Service

Fix SMP pairing request issue on LE
authorSatya Calloji <satyac@broadcom.com>
Wed, 6 May 2015 16:24:06 +0000 (09:24 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 8 Jun 2015 09:50:31 +0000 (02:50 -0700)
commit8551d99ac3947c36b867f84dd6ba3776e0aeb3a4
treefb93cf439944eea28bcb1ef9646711c43d12f5bc
parent1f38e92c7045e92b6b9d7f31bf85ceb585733885
Fix SMP pairing request issue on LE

The cause of the failure:
- the master device sent the three keys to slave, but slave only receive
two and got the link drop before the third key is received.
- the slave device treats it as pairing failure due to the key missing.
SMP should wait for all keys been sent to controller before dropping the link.

Implement L2CAP fix channel tx_complete callback for this reason,
and it has been applied on the channel 6 (SMP).
Channel 7 (BR_SMP channel) was not keeping track of total_tx_unacked
number and closed the link too early. Added check in the
smp_br_key_distribution() and the ACL data tracking there before
posting SMP_BR_AUTH_CMPL_EVT.

Original author: Chaojing Sun <cjsun@broadcom.com>

Change-Id: If48a4c5e28b1d177f14ff089e8dfa3ace41eba83
stack/smp/smp_act.c
stack/smp/smp_l2c.c