Skip to content

Commit

Permalink
bluetooth: controller: Set missing bits in supported list
Browse files Browse the repository at this point in the history
A bunch of commands were missing from the bitmap in the Read Local
Supported Commands response. Add them accordingly.

Fixes #33324.

Signed-off-by: Carles Cufi <[email protected]>
  • Loading branch information
carlescufi authored and nashif committed Mar 17, 2021
1 parent 010c5c2 commit 66c298d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions subsys/bluetooth/controller/hci/hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,12 +682,28 @@ static void read_supported_commands(struct net_buf *buf, struct net_buf **evt)
BIT(6) | BIT(7);
/* LE Remove Adv Set, LE Clear Adv Sets */
rp->commands[37] |= BIT(0) | BIT(1);
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC)
/* LE Set PA Params, LE Set PA Data, LE Set PA Enable */
rp->commands[37] |= BIT(2) | BIT(3) | BIT(4);
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
#endif /* CONFIG_BT_CTLR_ADV_EXT */
#endif /* CONFIG_BT_BROADCASTER */

#if defined(CONFIG_BT_OBSERVER)
/* LE Set Scan Params, LE Set Scan Enable */
rp->commands[26] |= BIT(2) | BIT(3);

#if defined(CONFIG_BT_CTLR_ADV_EXT)
/* LE Set Extended Scan Params, LE Set Extended Scan Enable */
rp->commands[37] |= BIT(5) | BIT(6);
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC)
/* LE PA Create Sync, LE PA Create Sync Cancel, LE PA Terminate Sync */
rp->commands[38] |= BIT(0) | BIT(1) | BIT(2);
/* LE Set PA Receive Enable */
rp->commands[40] |= BIT(5);
#endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */
#endif /* CONFIG_BT_CTLR_ADV_EXT */

#endif /* CONFIG_BT_OBSERVER */

#if defined(CONFIG_BT_CONN)
Expand All @@ -697,6 +713,11 @@ static void read_supported_commands(struct net_buf *buf, struct net_buf **evt)
/* Set Host Channel Classification */
rp->commands[27] |= BIT(3);

#if defined(CONFIG_BT_CTLR_ADV_EXT)
/* LE Extended Create Connection */
rp->commands[37] |= BIT(7);
#endif /* CONFIG_BT_CTLR_ADV_EXT */

#if defined(CONFIG_BT_CTLR_LE_ENC)
/* LE Start Encryption */
rp->commands[28] |= BIT(0);
Expand Down

0 comments on commit 66c298d

Please sign in to comment.