When connection is initiated in one of either 1M or Coded PHY initiating scan instance then the other scanning instance's scheduling and memory allocation needs to be cleaned up. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
79 lines
1.6 KiB
C
79 lines
1.6 KiB
C
/*
|
|
* Copyright (c) 2018-2019 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
struct lll_scan {
|
|
struct lll_hdr hdr;
|
|
|
|
#if defined(CONFIG_BT_CENTRAL)
|
|
/* NOTE: conn context SHALL be after lll_hdr,
|
|
* check ull_conn_setup how it access the connection LLL
|
|
* context.
|
|
*/
|
|
struct lll_conn *volatile conn;
|
|
|
|
uint8_t adv_addr[BDADDR_SIZE];
|
|
uint32_t conn_win_offset_us;
|
|
uint16_t conn_timeout;
|
|
#endif /* CONFIG_BT_CENTRAL */
|
|
|
|
uint8_t state:1;
|
|
uint8_t chan:2;
|
|
uint8_t filter_policy:2;
|
|
uint8_t type:1;
|
|
uint8_t init_addr_type:1;
|
|
uint8_t is_stop:1;
|
|
|
|
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
|
uint16_t duration_reload;
|
|
uint16_t duration_expire;
|
|
uint8_t phy:3;
|
|
uint8_t is_adv_ind:1;
|
|
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
|
|
|
#if defined(CONFIG_BT_CENTRAL)
|
|
uint8_t adv_addr_type:1;
|
|
#endif /* CONFIG_BT_CENTRAL */
|
|
|
|
#if defined(CONFIG_BT_CTLR_PRIVACY)
|
|
uint8_t rpa_gen:1;
|
|
/* initiator only */
|
|
uint8_t rl_idx;
|
|
#endif /* CONFIG_BT_CTLR_PRIVACY */
|
|
|
|
uint8_t init_addr[BDADDR_SIZE];
|
|
|
|
uint16_t interval;
|
|
uint32_t ticks_window;
|
|
|
|
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
|
|
int8_t tx_pwr_lvl;
|
|
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
|
|
};
|
|
|
|
struct lll_scan_aux {
|
|
struct lll_hdr hdr;
|
|
|
|
uint8_t chan:6;
|
|
|
|
uint8_t phy:3;
|
|
|
|
uint32_t window_size_us;
|
|
|
|
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
|
|
int8_t tx_pwr_lvl;
|
|
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
|
|
|
|
#if defined(CONFIG_BT_CENTRAL)
|
|
struct node_rx_pdu *node_conn_rx;
|
|
#endif /* CONFIG_BT_CENTRAL */
|
|
};
|
|
|
|
int lll_scan_init(void);
|
|
int lll_scan_reset(void);
|
|
|
|
void lll_scan_prepare(void *param);
|
|
|
|
extern uint8_t ull_scan_lll_handle_get(struct lll_scan *lll);
|