Skip to content

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

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

Merged

Conversation

cvinayak
Copy link
Collaborator

@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
@carlescufi
Copy link
Member

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

@cvinayak cvinayak force-pushed the github_backport_legacy branch from 39e3813 to 94a763e Compare March 18, 2020 06:55
@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
@cvinayak cvinayak force-pushed the github_backport_legacy branch from 94a763e to 481c9ee Compare March 18, 2020 07:08
@carlescufi carlescufi modified the milestones: 2.2.1, v1.14.2 Mar 18, 2020
@aescolar aescolar closed this Mar 18, 2020
@aescolar aescolar reopened this Mar 18, 2020
@cvinayak cvinayak requested a review from kruithofa March 19, 2020 08:47
@cvinayak
Copy link
Collaborator Author

@kruithofa CC

@cvinayak cvinayak force-pushed the github_backport_legacy branch from 481c9ee to 0e7eb68 Compare March 27, 2020 10:04
@cvinayak cvinayak force-pushed the github_backport_legacy branch 2 times, most recently from 96189e3 to 104ee59 Compare April 3, 2020 12:18
@cvinayak cvinayak force-pushed the github_backport_legacy branch from 104ee59 to 1388cf1 Compare May 14, 2020 06:52
@cvinayak cvinayak added backport v1.14-branch bug The issue is a bug, or the PR is fixing a bug area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests labels May 20, 2020
@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jul 20, 2020
pabigot and others added 19 commits September 23, 2020 13:26
A conditional block to save a directed advertising report flag was
present three times.  Remove two of the blocks.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Fix controllers address check in cases of controller-based privacy.
When controller has been instructed by the host to use privacy
the controller should look up the peer identity address and generate
an address based on the local IRK. In the case where no match
is found or the local IRK is all zeroes the controller shall use
the fallback address. If the fallback address is not valid the
controller shall return invalid params.

This commit fixes these issues:
 - Starting a private advertiser without valid random address set
   but a valid local IRK exists. In this case the advertiser should
   be able to advertise using the RPA regardless of a valid random
   or public address.
 - Starting a private advertiser with a fallback to the public
   address type or an adveriser using public address  does not
   check if a valid public address exists. The host cannot
   advertise with an all-zero public address.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the redundant check of priv flag variable introduced as
regression in commit f8877e3 ("Bluetooth: controller:
legacy: Fix controller address check").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
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 cvinayak force-pushed the github_backport_legacy branch from 1388cf1 to 27b921a Compare September 23, 2020 08:10
@cvinayak
Copy link
Collaborator Author

@cvinayak will you please rebase?

@MaureenHelm done.

@cvinayak
Copy link
Collaborator Author

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

@cvinayak cvinayak closed this 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 cvinayak force-pushed the github_backport_legacy branch from 27b921a to 27dda66 Compare September 23, 2020 15:23
@cvinayak
Copy link
Collaborator 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
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
@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
Development

Successfully merging this pull request may close these issues.

8 participants