Lines Matching refs:hf

129 	struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at);  in hf_slc_error()  local
133 err = bt_rfcomm_dlc_disconnect(&hf->rfcomm_dlc); in hf_slc_error()
139 int hfp_hf_send_cmd(struct bt_hfp_hf *hf, at_resp_cb_t resp, in hfp_hf_send_cmd() argument
147 at_register(&hf->at, resp, finish); in hfp_hf_send_cmd()
166 LOG_DBG("HF %p, DLC %p sending buf %p", hf, &hf->rfcomm_dlc, buf); in hfp_hf_send_cmd()
168 ret = bt_rfcomm_dlc_send(&hf->rfcomm_dlc, buf); in hfp_hf_send_cmd()
179 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in brsf_handle() local
189 hf->ag_features = val; in brsf_handle()
216 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cind_handle_values() local
229 hf->ind_table[index] = i; in cind_handle_values()
301 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in ag_indicator_handle_values() local
302 struct bt_conn *conn = hf->acl; in ag_indicator_handle_values()
311 if (value > ag_ind[hf->ind_table[index]].max || in ag_indicator_handle_values()
312 value < ag_ind[hf->ind_table[index]].min) { in ag_indicator_handle_values()
317 switch (hf->ind_table[index]) { in ag_indicator_handle_values()
424 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in ring_handle() local
425 struct bt_conn *conn = hf->acl; in ring_handle()
478 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cmd_complete() local
479 struct bt_conn *conn = hf->acl; in cmd_complete()
521 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in slc_completed() local
522 struct bt_conn *conn = hf->acl; in slc_completed()
528 if (hfp_hf_send_cmd(hf, NULL, cmee_finish, "AT+CMEE=1") < 0) { in slc_completed()
550 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cind_status_finish() local
560 err = hfp_hf_send_cmd(hf, NULL, cmer_finish, "AT+CMER=3,0,0,1"); in cind_status_finish()
572 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cind_finish() local
581 err = hfp_hf_send_cmd(hf, cind_status_resp, cind_status_finish, in cind_finish()
594 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in brsf_finish() local
603 err = hfp_hf_send_cmd(hf, cind_resp, cind_finish, "AT+CIND=?"); in brsf_finish()
612 int hf_slc_establish(struct bt_hfp_hf *hf) in hf_slc_establish() argument
618 err = hfp_hf_send_cmd(hf, brsf_resp, brsf_finish, "AT+BRSF=%u", in hf_slc_establish()
619 hf->hf_features); in hf_slc_establish()
621 hf_slc_error(&hf->at); in hf_slc_establish()
633 struct bt_hfp_hf *hf = &bt_hfp_hf_pool[i]; in bt_hfp_hf_lookup_bt_conn() local
635 if (hf->acl == conn) { in bt_hfp_hf_lookup_bt_conn()
636 return hf; in bt_hfp_hf_lookup_bt_conn()
645 struct bt_hfp_hf *hf; in bt_hfp_hf_send_cmd() local
655 hf = bt_hfp_hf_lookup_bt_conn(conn); in bt_hfp_hf_send_cmd()
656 if (!hf) { in bt_hfp_hf_send_cmd()
663 err = hfp_hf_send_cmd(hf, NULL, cmd_complete, "ATA"); in bt_hfp_hf_send_cmd()
670 err = hfp_hf_send_cmd(hf, NULL, cmd_complete, "AT+CHUP"); in bt_hfp_hf_send_cmd()
686 struct bt_hfp_hf *hf = CONTAINER_OF(dlc, struct bt_hfp_hf, rfcomm_dlc); in hfp_hf_connected() local
690 BT_ASSERT(hf); in hfp_hf_connected()
691 hf_slc_establish(hf); in hfp_hf_connected()
696 struct bt_hfp_hf *hf = CONTAINER_OF(dlc, struct bt_hfp_hf, rfcomm_dlc); in hfp_hf_disconnected() local
697 struct bt_conn *conn = hf->acl; in hfp_hf_disconnected()
707 struct bt_hfp_hf *hf = CONTAINER_OF(dlc, struct bt_hfp_hf, rfcomm_dlc); in hfp_hf_recv() local
709 if (at_parse_input(&hf->at, buf) < 0) { in hfp_hf_recv()
732 struct bt_hfp_hf *hf = &bt_hfp_hf_pool[i]; in bt_hfp_hf_accept() local
735 if (hf->rfcomm_dlc.session) { in bt_hfp_hf_accept()
739 hf->acl = conn; in bt_hfp_hf_accept()
740 hf->at.buf = hf->hf_buffer; in bt_hfp_hf_accept()
741 hf->at.buf_max_len = HF_MAX_BUF_LEN; in bt_hfp_hf_accept()
743 hf->rfcomm_dlc.ops = &ops; in bt_hfp_hf_accept()
744 hf->rfcomm_dlc.mtu = BT_HFP_MAX_MTU; in bt_hfp_hf_accept()
746 *dlc = &hf->rfcomm_dlc; in bt_hfp_hf_accept()
749 hf->hf_features = BT_HFP_HF_SUPPORTED_FEATURES; in bt_hfp_hf_accept()
752 hf->ind_table[j] = -1; in bt_hfp_hf_accept()
789 struct bt_hfp_hf *hf = &bt_hfp_hf_pool[i]; in bt_hfp_hf_sco_accept() local
791 if (NULL == hf->rfcomm_dlc.session) { in bt_hfp_hf_sco_accept()
795 if (info->acl != hf->rfcomm_dlc.session->br_chan.chan.conn) { in bt_hfp_hf_sco_accept()
799 hf->chan.ops = &ops; in bt_hfp_hf_sco_accept()
801 *chan = &hf->chan; in bt_hfp_hf_sco_accept()