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 v3.5-branch] Bluetooth: Controller: Few control procedure and compiler re-ordering fixes #74112

Commits on Jul 17, 2024

  1. Bluetooth: controller: Prevent invalid compiler code reordering

    In ull_disable, it is imperative that the callback is set up before a
    second reference counter check, otherwise it may happen that an LLL done
    event has already passed when the disable callback and semaphore is
    assigned.
    
    This causes the HCI thread to wait until timeout and assert after
    ull_ticker_stop_with_mark.
    
    For certain compilers, due to compiler optimizations, it can be seen
    from the assembler code that the callback is assigned after the second
    reference counter check.
    
    By adding memory barriers, the code correctly reorders code to the
    expected sequence.
    
    Signed-off-by: Morten Priess <[email protected]>
    (cherry picked from commit 7f82b6a)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    mtpr-ot authored and cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    a7cf34f View commit details
    Browse the repository at this point in the history
  2. Bluetooth: controller: fixing rx node leak on CPR reject of parallel CPR

    In case a CPR is intiated but rejected due to CPR active on
    other connection, rx nodes are leaked due to retained node not
    being properly released.
    
    Signed-off-by: Erik Brockhoff <[email protected]>
    (cherry picked from commit edef1b7)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    erbr-ot authored and cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    a85ee2c View commit details
    Browse the repository at this point in the history
  3. Bluetooth: controller: fix node_rx retention mechanism

    Ensure that in LLCP reference to node_rx is cleared when
    retention is NOT used, to avoid corruption of node_rx later
    re-allocated
    
    Signed-off-by: Erik Brockhoff <[email protected]>
    (cherry picked from commit 806a4fc)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    erbr-ot authored and cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    8d8b727 View commit details
    Browse the repository at this point in the history
  4. Bluetooth: controller: minor cleanup and a fix-up re. LLCP

    Only perform retention if not already done.
    Ensure 'sched' is performed on phy ntf even if dle is not.
    
    Signed-off-by: Erik Brockhoff <[email protected]>
    (cherry picked from commit 9d8059b)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    erbr-ot authored and cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    ebeb1fd View commit details
    Browse the repository at this point in the history
  5. Bluetooth: Controller: Fix missing conn update ind PDU validation

    Fix missing validation of Connection Update Ind PDU. Ignore
    invalid connection update parameters and force a silent
    local connection termination.
    
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    (cherry picked from commit 4b6d3f1)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    7840a33 View commit details
    Browse the repository at this point in the history
  6. Bluetooth: Controller: Refactor BT_CTLR_LE_ENC implementation

    Refactor reused function in BT_CTLR_LE_ENC feature.
    
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    (cherry picked from commit fe205a5)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    4e7d9d0 View commit details
    Browse the repository at this point in the history
  7. Bluetooth: Controller: Use BT_HCI_ERR_UNSPECIFIED as needed

    A Host shall consider any error code that it does not
    explicitly understand equivalent to the error code
    Unspecified Error (0x1F).
    
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    (cherry picked from commit 78466c8)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    2211c34 View commit details
    Browse the repository at this point in the history
  8. Bluetooth: Controller: Add explicit LLCP error code check

    Add unit tests to cover explicit LLCP error code check and
    cover the same in the Controller implementation.
    
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    (cherry picked from commit d6f2bc9)
    Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
    cvinayak committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    59510f9 View commit details
    Browse the repository at this point in the history