Skip to content

fix(BLE): Defer sending ARQ_Q_FLUSH until after llcp state variables have been updated#1501

Closed
khpeterson wants to merge 4 commits intoanalogdevicesinc:mainfrom
khpeterson:fix/phy-update-hang
Closed

fix(BLE): Defer sending ARQ_Q_FLUSH until after llcp state variables have been updated#1501
khpeterson wants to merge 4 commits intoanalogdevicesinc:mainfrom
khpeterson:fix/phy-update-hang

Conversation

@khpeterson
Copy link
Copy Markdown
Contributor

Description

Defer call to lctrSendConnMsg until after the llcp state variables have been updated.

Fix for #1497, see issue description for details.

Tested with simple BLE peripheral app built for both WSF/FreeRTOS and WSF/baremetal targets.

Checklist Before Requesting Review

  • PR Title follows correct guidelines.
  • Description of changes and all other relevant information.
  • (Optional) Link any related GitHub issues using a keyword
  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

@github-actions github-actions Bot added the BLE Related to Bluetooth label Jan 15, 2026
@ttmut ttmut requested a review from kevin-gillespie January 16, 2026 07:41
@khpeterson
Copy link
Copy Markdown
Contributor Author

Of course, an alternative implementation would enforce the critical section, something like:

      WSF_CS_ENTER();
      lctrExecAction(pCtx, event);

      if (pCtx->phyUpdState != LCTR_PU_STATE_IDLE)
      {
        pCtx->llcpState = LCTR_LLCP_STATE_BUSY;
        pCtx->llcpActiveProc = LCTR_PROC_PHY_UPD;
        pCtx->llcpInstantComp = FALSE;
      }
      WSF_CS_EXIT();

but that's a really big critical section and kind of unnecessary when the only thing that needs to be reordered is the call to WsfMsgSnd(). That's how I ended up with the flag to indicate if an ARQ_Q_FLUSHED message needs to be sent.

@github-actions
Copy link
Copy Markdown

This pull request is stale because it has been open for 30 days with no activity. Remove stale label, commit, or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the stale This issue or pull request is stale. label Feb 16, 2026
@khpeterson
Copy link
Copy Markdown
Contributor Author

What can I do to move this forward?

@github-actions github-actions Bot removed the stale This issue or pull request is stale. label Feb 16, 2026
@github-actions
Copy link
Copy Markdown

This pull request is stale because it has been open for 30 days with no activity. Remove stale label, commit, or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the stale This issue or pull request is stale. label Mar 18, 2026
@khpeterson
Copy link
Copy Markdown
Contributor Author

This fix is not general enough to address the root cause.

@khpeterson khpeterson closed this Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLE Related to Bluetooth

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant