mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-30 17:23:31 +00:00
nimble/ll: Support scan on two PHYs when continous scanning requested
X-Original-Commit: 6258e862c56f2b99ef1682f1fc6c200ce36986ab
This commit is contained in:
@@ -2691,14 +2691,16 @@ ble_ll_set_ext_scan_params(uint8_t *cmd)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For now we don't accept request for continuous scan if 2 PHYs are
|
||||
* requested.
|
||||
/* If host requests continuous scan for 2 PHYs, we double scan interval
|
||||
* and split it for two equal scan windows between 2 PHYs
|
||||
*/
|
||||
if ((cmd[2] ==
|
||||
(BLE_HCI_LE_PHY_1M_PREF_MASK | BLE_HCI_LE_PHY_CODED_PREF_MASK)) &&
|
||||
if ((coded->configured && uncoded->configured) &&
|
||||
((uncoded->scan_itvl == uncoded->scan_window) ||
|
||||
(coded->scan_itvl == coded-> scan_window))) {
|
||||
return BLE_ERR_INV_HCI_CMD_PARMS;
|
||||
|
||||
uncoded->scan_itvl *= 2;
|
||||
coded-> scan_itvl = uncoded->scan_itvl;
|
||||
coded->scan_window = uncoded->scan_window;
|
||||
}
|
||||
|
||||
memcpy(g_ble_ll_scan_params, new_params, sizeof(new_params));
|
||||
|
||||
Reference in New Issue
Block a user