OSDN Git Service

iso: Fix handling same sequence number
authorJakub Tyszkowski <jakub.tyszkowski@codecoup.pl>
Mon, 4 Jan 2021 14:06:13 +0000 (15:06 +0100)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 27 Jan 2021 12:10:33 +0000 (12:10 +0000)
commit32c501000afb5e5acb7382f4d67512bc83a561e5
tree930c95ea30b939442be2a55a1957bf421707f4e0
parentb4a1a9570306507b793df2dc3c36ac7170a6d308
iso: Fix handling same sequence number

When calculating the sequence number it may happen that we
compute the same value as for previous packet. If that happens
we manually increment the value by one. This was a problem when
yet another packet comes in a short interval and calculated seq.
number is still the same. Our calcualted seq. number for current
packet can now be lower than the previos one (after the previous
one was manually incremented). This resulted in wrongly calculated
packet lost counter dropping below 0.

Tag: #feature
Bug: 159786353
Sponsor: jpawlowski@
Test: atest --host net_test_btm_iso

Change-Id: I7d726ef292e85851af6383bfc8f4bcf125ccbf54
stack/btm/btm_iso_impl.h
stack/test/btm_iso_test.cc