Lines Matching refs:cpd

180 	struct conn_param_data *cpd = conn_param_data_get(conn);  in smp_notify_finished()  local
182 if (cpd != NULL) { in smp_notify_finished()
183 k_sem_give(&cpd->smp_notify_sem); in smp_notify_finished()
191 struct conn_param_data *cpd = conn_param_data_get(conn); in conn_param_set() local
193 if (cpd != NULL) { in conn_param_set()
197 (void)k_work_reschedule(&cpd->ework, K_MSEC(RETRY_TIME)); in conn_param_set()
199 (void)k_work_cancel_delayable(&cpd->ework); in conn_param_set()
208 struct conn_param_data *cpd = CONTAINER_OF(dwork, struct conn_param_data, dwork); in conn_param_on_pref_restore() local
210 if (cpd != NULL) { in conn_param_on_pref_restore()
211 conn_param_set(cpd->conn, CONN_PARAM_PREF); in conn_param_on_pref_restore()
212 cpd->state &= ~CONN_PARAM_SMP_REQUESTED; in conn_param_on_pref_restore()
220 struct conn_param_data *cpd = CONTAINER_OF(ework, struct conn_param_data, ework); in conn_param_on_error_retry() local
221 struct bt_le_conn_param *param = (cpd->state & CONN_PARAM_SMP_REQUESTED) ? in conn_param_on_error_retry()
224 conn_param_set(cpd->conn, param); in conn_param_on_error_retry()
229 struct conn_param_data *cpd = conn_param_data_get(conn); in conn_param_smp_enable() local
231 if (cpd != NULL) { in conn_param_smp_enable()
232 if (!(cpd->state & CONN_PARAM_SMP_REQUESTED)) { in conn_param_smp_enable()
234 cpd->state |= CONN_PARAM_SMP_REQUESTED; in conn_param_smp_enable()
238 (void)k_work_reschedule(&cpd->dwork, K_MSEC(RESTORE_TIME)); in conn_param_smp_enable()
250 struct conn_param_data *cpd = conn_param_data_get(conn); in smp_bt_chr_write() local
255 if (cpd == NULL) { in smp_bt_chr_write()
303 ud->id = cpd->id; in smp_bt_chr_write()
317 if (cpd == NULL) { in smp_bt_chr_write()
339 ud->id = cpd->id; in smp_bt_chr_write()
461 struct conn_param_data *cpd; in smp_bt_tx_pkt() local
494 cpd = conn_param_data_get(conn); in smp_bt_tx_pkt()
497 if (cpd == NULL || cpd->id == 0 || cpd->id != ud->id) { in smp_bt_tx_pkt()
505 k_sem_reset(&cpd->smp_notify_sem); in smp_bt_tx_pkt()
508 if (cpd->id == 0 || cpd->id != ud->id) { in smp_bt_tx_pkt()
555 k_sem_take(&cpd->smp_notify_sem, K_FOREVER); in smp_bt_tx_pkt()
593 struct conn_param_data *cpd = conn_param_data_get(conn); in disconnected() local
604 if (cpd != NULL) { in disconnected()
606 cpd->id = 0; in disconnected()
607 cpd->conn = NULL; in disconnected()
611 (void)k_work_cancel_delayable(&cpd->dwork); in disconnected()
612 (void)k_work_cancel_delayable(&cpd->ework); in disconnected()
615 cpd->state = 0; in disconnected()
618 k_sem_give(&cpd->smp_notify_sem); in disconnected()
636 struct conn_param_data *cpd; in smp_bt_query_valid_check() local
642 cpd = conn_param_data_get(conn); in smp_bt_query_valid_check()
644 if (cpd == NULL || (ud->conn == conn && cpd->id != ud->id)) { in smp_bt_query_valid_check()