Bluetooth: controller: split: Fix missing coded PHY scanning
Fix, use phy variable instead of type to determine if scanning on Coded PHY is to be enabled. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
a40b1e9212
commit
eb102d7822
1 changed files with 13 additions and 12 deletions
|
@ -124,17 +124,17 @@ uint8_t ll_scan_enable(uint8_t enable)
|
|||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT)) {
|
||||
scan_coded = ull_scan_is_disabled_get(SCAN_HANDLE_PHY_CODED);
|
||||
if (!scan_coded) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
}
|
||||
|
||||
own_addr_type = scan_coded->own_addr_type;
|
||||
is_coded_phy = (scan_coded->lll.type >> 1) &
|
||||
BT_HCI_LE_EXT_SCAN_PHY_CODED;
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
scan_coded = ull_scan_is_disabled_get(SCAN_HANDLE_PHY_CODED);
|
||||
if (!scan_coded) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
}
|
||||
|
||||
own_addr_type = scan_coded->own_addr_type;
|
||||
is_coded_phy = (scan_coded->lll.phy &
|
||||
BT_HCI_LE_EXT_SCAN_PHY_CODED);
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
|
||||
if ((IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT) && is_coded_phy &&
|
||||
(own_addr_type & 0x1)) ||
|
||||
(scan->own_addr_type & 0x1)) {
|
||||
|
@ -169,9 +169,10 @@ uint8_t ll_scan_enable(uint8_t enable)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!IS_ENABLED(CONFIG_BT_CTLR_ADV_EXT) ||
|
||||
!is_coded_phy ||
|
||||
((scan->lll.type >> 1) & BIT(0))) {
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
if (!is_coded_phy || (scan->lll.phy & BT_HCI_LE_EXT_SCAN_PHY_1M))
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
{
|
||||
err = ull_scan_enable(scan);
|
||||
if (err) {
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue