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>
Thu, 21 May 2015 06:06:27 +0000 (23:06 -0700)
commitd0aa8e53aa7ac1137a47570e08c2b963aaa49141
treea27fd11fe4f14843770f46104795374ac2f1863e
parent6fc9526bba383fdb33c0536ed050489aa2215554
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