Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport v1.14] Bluetooth: controller: legacy: Backport v2.2 to v1.14-branch #23091

Merged

Conversation

cvinayak
Copy link
Contributor

@cvinayak cvinayak commented Feb 26, 2020

Commits in this PR are manual cherry-pick of commits based on differences in ctrl.c file.

Fixes #25314

@zephyrbot
Copy link
Collaborator

zephyrbot commented Feb 26, 2020

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

@cvinayak cvinayak force-pushed the github_backport_legacy branch 3 times, most recently from 0ba9b1e to 39e3813 Compare February 27, 2020 05:05
@nashif nashif added this to To do in Backports Mar 15, 2020
@carlescufi
Copy link
Member

@cvinayak please move this out of draft in order to get it in a 1.14 dot release

@cvinayak cvinayak changed the title Bluetooth: controller: legacy: Backport v2.2 to v1.14-branch [backport v1.14] Bluetooth: controller: legacy: Backport v2.2 to v1.14-branch Mar 18, 2020
@cvinayak cvinayak marked this pull request as ready for review March 18, 2020 06:56
@cvinayak cvinayak requested a review from thoh-ot as a code owner March 18, 2020 06:56
@carlescufi carlescufi modified the milestones: 2.2.1, v1.14.2 Mar 18, 2020
@aescolar aescolar closed this Mar 18, 2020
Backports automation moved this from To do to Done Mar 18, 2020
@aescolar aescolar reopened this Mar 18, 2020
@aescolar aescolar moved this from Done to To do in Backports Mar 18, 2020
@cvinayak cvinayak requested a review from kruithofa March 19, 2020 08:47
@cvinayak
Copy link
Contributor Author

@kruithofa CC

According to BT Spec v5.1 Vol 2 Part E Section 7.8.16, if the
device is already in the White List, the controller should not
add the device to the White List and should return success.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Tx pool from being corrupted when rough central device
uses invalid packet sequence numbers, causing NULL pointer
to be released into free data Tx pool.

Fixes zephyrproject-rtos#22968.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Data Length Update procedure calculation of transmit
and receive time.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix local initiated Data Length Update procedure from being
stalled when a remote initiates a procedure with instant.

Fixes zephyrproject-rtos#23069.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix conditional compilation error when enabling
BT_CTLR_FAST_ENC for central only application builds.

Also added additional compilation to code exclusive to
central or peripheral role.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Data Length Update transmit and receive time calculation
on PHY update procedure completion.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix to return the max tx/rx time back to set default time
after using mandatory minimum PDU length and time while
switching back from Coded PHY to 1M PHY.

Also fixes zephyrproject-rtos#23109.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add Kconfig option to support building the controller
optimized for speed.

Fixes zephyrproject-rtos#21601.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Connection Parameter Request offset calculation to only use
slot margins around slave roles.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add ticker_stop_abs interface, similar functionality as to
ticker_stop interface to stop a running ticker but with a
supplied absolute tick reference value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing first connection event due to first connection
event ticks_slot overlapping with the initiator window
ticks_slot.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix regression in handling tx pool corruption in relation to
commit 7a3e29a ("Bluetooth: controller: legacy: Fix Tx
pool corruption").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update the ticks_current value on last stopped ticker
instance, so that when a new ticker instance is started
the anchor ticks calculation uses the correct current tick
with respect to supplied anchor ticks.

Fixes zephyrproject-rtos#23805.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add validation of channel map and hop increment value
received in CONNECT_IND PDU.

Zero bit count leads to controller assert or divide-by-zero
fault.

Hop increment shall be between 5 and 16 by BT Specification.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Simplify the Data Length Update Procedure state check when
processing incoming LENGTH_REQ/RSP PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix implementation to handle back-to-back and duplicate
LENGTH_REQ PDU reception.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
@cvinayak
Copy link
Contributor Author

@cvinayak will you please rebase?

@MaureenHelm done.

@cvinayak
Copy link
Contributor Author

Closing to re-open, so as to retrigger CI.

@cvinayak cvinayak closed this Sep 23, 2020
Backports automation moved this from Needs more info to Done Sep 23, 2020
@cvinayak cvinayak reopened this Sep 23, 2020
Fix regression in cancelling slave latency during Connection
Update Procedure.

Slave latency should not be applied between the ack of a
Connection Update Indication PDU and until the instant.
When caching was introduced, implementation missed this
consideration.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
@cvinayak
Copy link
Contributor Author

cvinayak commented Sep 23, 2020

@MaureenHelm I get unrelated build failure, maybe the v1.14-branch is broken? need help from maintainers/implementors of the following:

qemu_x86_64               tests/crypto/rand32/crypto.rand32
qemu_x86_64               tests/drivers/ipm/peripheral.mailbox
qemu_x86_64               tests/kernel/sched/schedule_api/kernel.sched
qemu_x86_64               tests/kernel/timer/timer_api/kernel.timer
qemu_x86_64               tests/lib/crc/misc.crc

@MaureenHelm MaureenHelm moved this from Done to To do in Backports Sep 23, 2020
@MaureenHelm
Copy link
Member

@MaureenHelm I get unrelated build failure, maybe the v1.14-branch is broken? need help from maintainers/implementors of the following:

@nashif can you take a look?

@nashif nashif merged commit 17e2618 into zephyrproject-rtos:v1.14-branch Nov 17, 2020
Backports automation moved this from To do to Done Nov 17, 2020
@cvinayak cvinayak deleted the github_backport_legacy branch March 1, 2021 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth bug The issue is a bug, or the PR is fixing a bug
Projects
Status: Done
Backports
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants