/net/bluetooth/ |
D | hci_core.c | 53 static void hci_notify(struct hci_dev *hdev, int event) in hci_notify() argument 55 hci_sock_dev_event(hdev, event); in hci_notify() 60 static void hci_req_sync_complete(struct hci_dev *hdev, u8 result) in hci_req_sync_complete() argument 62 BT_DBG("%s result 0x%2.2x", hdev->name, result); in hci_req_sync_complete() 64 if (hdev->req_status == HCI_REQ_PEND) { in hci_req_sync_complete() 65 hdev->req_result = result; in hci_req_sync_complete() 66 hdev->req_status = HCI_REQ_DONE; in hci_req_sync_complete() 67 wake_up_interruptible(&hdev->req_wait_q); in hci_req_sync_complete() 71 static void hci_req_cancel(struct hci_dev *hdev, int err) in hci_req_cancel() argument 73 BT_DBG("%s err 0x%2.2x", hdev->name, err); in hci_req_cancel() [all …]
|
D | hci_event.c | 37 static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb) in hci_cc_inquiry_cancel() argument 41 BT_DBG("%s status 0x%2.2x", hdev->name, status); in hci_cc_inquiry_cancel() 44 hci_dev_lock(hdev); in hci_cc_inquiry_cancel() 45 mgmt_stop_discovery_failed(hdev, status); in hci_cc_inquiry_cancel() 46 hci_dev_unlock(hdev); in hci_cc_inquiry_cancel() 50 clear_bit(HCI_INQUIRY, &hdev->flags); in hci_cc_inquiry_cancel() 52 wake_up_bit(&hdev->flags, HCI_INQUIRY); in hci_cc_inquiry_cancel() 54 hci_dev_lock(hdev); in hci_cc_inquiry_cancel() 55 hci_discovery_set_state(hdev, DISCOVERY_STOPPED); in hci_cc_inquiry_cancel() 56 hci_dev_unlock(hdev); in hci_cc_inquiry_cancel() [all …]
|
D | mgmt.c | 119 #define hdev_is_powered(hdev) (test_bit(HCI_UP, &hdev->flags) && \ argument 120 !test_bit(HCI_AUTO_OFF, &hdev->dev_flags)) 196 bool mgmt_valid_hdev(struct hci_dev *hdev) in mgmt_valid_hdev() argument 198 return hdev->dev_type == HCI_BREDR; in mgmt_valid_hdev() 273 static int read_version(struct sock *sk, struct hci_dev *hdev, void *data, in read_version() argument 287 static int read_commands(struct sock *sk, struct hci_dev *hdev, void *data, in read_commands() argument 321 static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, in read_index_list() argument 374 static u32 get_supported_settings(struct hci_dev *hdev) in get_supported_settings() argument 381 if (lmp_ssp_capable(hdev)) in get_supported_settings() 384 if (lmp_bredr_capable(hdev)) { in get_supported_settings() [all …]
|
D | hci_sysfs.c | 104 struct hci_dev *hdev = conn->hdev; in hci_conn_init_sysfs() local 110 conn->dev.parent = &hdev->dev; in hci_conn_init_sysfs() 117 struct hci_dev *hdev = conn->hdev; in hci_conn_add_sysfs() local 121 dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); in hci_conn_add_sysfs() 128 hci_dev_hold(hdev); in hci_conn_add_sysfs() 133 struct hci_dev *hdev = conn->hdev; in hci_conn_del_sysfs() local 150 hci_dev_put(hdev); in hci_conn_del_sysfs() 190 struct hci_dev *hdev = to_hci_dev(dev); in show_bus() local 191 return sprintf(buf, "%s\n", host_bustostr(hdev->bus)); in show_bus() 197 struct hci_dev *hdev = to_hci_dev(dev); in show_type() local [all …]
|
D | hci_conn.c | 36 struct hci_dev *hdev = conn->hdev; in hci_le_create_connection() local 55 hci_send_cmd(hdev, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp); in hci_le_create_connection() 60 hci_send_cmd(conn->hdev, HCI_OP_LE_CREATE_CONN_CANCEL, 0, NULL); in hci_le_create_connection_cancel() 65 struct hci_dev *hdev = conn->hdev; in hci_acl_create_connection() local 78 conn->link_policy = hdev->link_policy; in hci_acl_create_connection() 84 ie = hci_inquiry_cache_lookup(hdev, &conn->dst); in hci_acl_create_connection() 99 if (lmp_rswitch_capable(hdev) && !(hdev->link_mode & HCI_LM_MASTER)) in hci_acl_create_connection() 104 hci_send_cmd(hdev, HCI_OP_CREATE_CONN, sizeof(cp), &cp); in hci_acl_create_connection() 113 if (conn->hdev->hci_ver < BLUETOOTH_VER_1_2) in hci_acl_create_connection_cancel() 117 hci_send_cmd(conn->hdev, HCI_OP_CREATE_CONN_CANCEL, sizeof(cp), &cp); in hci_acl_create_connection_cancel() [all …]
|
D | hci_sock.c | 70 void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) in hci_send_to_sock() argument 75 BT_DBG("hdev %p len %d", hdev, skb->len); in hci_send_to_sock() 83 if (sk->sk_state != BT_BOUND || hci_pi(sk)->hdev != hdev) in hci_send_to_sock() 174 void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb) in hci_send_to_monitor() argument 183 BT_DBG("hdev %p len %d", hdev, skb->len); in hci_send_to_monitor() 231 hdr->index = cpu_to_le16(hdev->id); in hci_send_to_monitor() 276 static struct sk_buff *create_monitor_event(struct hci_dev *hdev, int event) in create_monitor_event() argument 290 ni->type = hdev->dev_type; in create_monitor_event() 291 ni->bus = hdev->bus; in create_monitor_event() 292 bacpy(&ni->bdaddr, &hdev->bdaddr); in create_monitor_event() [all …]
|
D | amp.c | 110 struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr, in phylink_add() argument 116 hcon = hci_conn_add(hdev, AMP_LINK, 0, dst); in phylink_add() 169 struct hci_dev *hdev = conn->hdev; in phylink_gen_key() local 189 key = hci_find_link_key(hdev, &conn->dst); in phylink_gen_key() 216 void amp_read_loc_assoc_frag(struct hci_dev *hdev, u8 phy_handle) in amp_read_loc_assoc_frag() argument 219 struct amp_assoc *loc_assoc = &hdev->loc_assoc; in amp_read_loc_assoc_frag() 221 BT_DBG("%s handle %d", hdev->name, phy_handle); in amp_read_loc_assoc_frag() 224 cp.max_len = cpu_to_le16(hdev->amp_assoc_size); in amp_read_loc_assoc_frag() 227 hci_send_cmd(hdev, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); in amp_read_loc_assoc_frag() 230 void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr) in amp_read_loc_assoc() argument [all …]
|
D | a2mp.c | 89 struct hci_dev *hdev; in __a2mp_add_cl() local 93 list_for_each_entry(hdev, &hci_dev_list, list) { in __a2mp_add_cl() 95 if (hdev->id == HCI_BREDR_ID) in __a2mp_add_cl() 102 cl[i].id = hdev->id; in __a2mp_add_cl() 103 cl[i].type = hdev->amp_type; in __a2mp_add_cl() 104 cl[i].status = hdev->amp_status; in __a2mp_add_cl() 273 struct hci_dev *hdev; in a2mp_getinfo_req() local 280 hdev = hci_dev_get(req->id); in a2mp_getinfo_req() 281 if (!hdev || hdev->dev_type != HCI_AMP) { in a2mp_getinfo_req() 294 hci_send_cmd(hdev, HCI_OP_READ_LOCAL_AMP_INFO, 0, NULL); in a2mp_getinfo_req() [all …]
|
D | smp.c | 222 if (test_bit(HCI_PAIRABLE, &conn->hcon->hdev->dev_flags)) { in build_pairing_cmd() 269 mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, in smp_failure() 354 hci_dev_lock(hcon->hdev); in tk_request() 357 ret = mgmt_user_passkey_request(hcon->hdev, conn->dst, in tk_request() 360 ret = mgmt_user_confirm_request(hcon->hdev, conn->dst, in tk_request() 364 hci_dev_unlock(hcon->hdev); in tk_request() 482 hci_add_ltk(hcon->hdev, conn->dst, hcon->dst_type, in random_work() 564 queue_work(hcon->hdev->workqueue, &smp->confirm); in smp_user_confirm_reply() 627 struct hci_dev *hdev = conn->hcon->hdev; in smp_cmd_pairing_rsp() local 667 queue_work(hdev->workqueue, &smp->confirm); in smp_cmd_pairing_rsp() [all …]
|
D | sco.c | 80 struct hci_dev *hdev = hcon->hdev; in sco_conn_add() local 95 conn->src = &hdev->bdaddr; in sco_conn_add() 98 if (hdev->sco_mtu > 0) in sco_conn_add() 99 conn->mtu = hdev->sco_mtu; in sco_conn_add() 164 struct hci_dev *hdev; in sco_connect() local 169 hdev = hci_get_route(dst, src); in sco_connect() 170 if (!hdev) in sco_connect() 173 hci_dev_lock(hdev); in sco_connect() 175 if (lmp_esco_capable(hdev) && !disable_esco) in sco_connect() 182 hcon = hci_connect(hdev, type, pkt_type, dst, BDADDR_BREDR, in sco_connect() [all …]
|
D | l2cap_core.c | 748 if (lmp_no_flush_capable(conn->hcon->hdev)) in l2cap_send_cmd() 783 lmp_no_flush_capable(hcon->hdev)) in l2cap_do_send() 1464 struct hci_dev *hdev = conn->hcon->hdev; in l2cap_register_user() local 1474 hci_dev_lock(hdev); in l2cap_register_user() 1495 hci_dev_unlock(hdev); in l2cap_register_user() 1502 struct hci_dev *hdev = conn->hcon->hdev; in l2cap_unregister_user() local 1504 hci_dev_lock(hdev); in l2cap_unregister_user() 1515 hci_dev_unlock(hdev); in l2cap_unregister_user() 1619 if (hcon->hdev->le_mtu) { in l2cap_conn_add() 1620 conn->mtu = hcon->hdev->le_mtu; in l2cap_conn_add() [all …]
|
D | l2cap_sock.c | 689 if (!conn || !lmp_no_flush_capable(conn->hcon->hdev)) { in l2cap_sock_setsockopt()
|
/net/nfc/hci/ |
D | core.c | 53 struct nfc_hci_dev *hdev = container_of(work, struct nfc_hci_dev, in nfc_hci_msg_tx_work() local 59 mutex_lock(&hdev->msg_tx_mutex); in nfc_hci_msg_tx_work() 60 if (hdev->shutting_down) in nfc_hci_msg_tx_work() 63 if (hdev->cmd_pending_msg) { in nfc_hci_msg_tx_work() 64 if (timer_pending(&hdev->cmd_timer) == 0) { in nfc_hci_msg_tx_work() 65 if (hdev->cmd_pending_msg->cb) in nfc_hci_msg_tx_work() 66 hdev->cmd_pending_msg->cb(hdev-> in nfc_hci_msg_tx_work() 71 kfree(hdev->cmd_pending_msg); in nfc_hci_msg_tx_work() 72 hdev->cmd_pending_msg = NULL; in nfc_hci_msg_tx_work() 79 if (list_empty(&hdev->msg_tx_queue)) in nfc_hci_msg_tx_work() [all …]
|
D | command.c | 31 static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, in nfc_hci_execute_cmd_async() argument 41 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_COMMAND, cmd, in nfc_hci_execute_cmd_async() 67 static int nfc_hci_execute_cmd(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, in nfc_hci_execute_cmd() argument 83 hcp_ew.exec_result = nfc_hci_hcp_message_tx(hdev, pipe, in nfc_hci_execute_cmd() 103 int nfc_hci_send_event(struct nfc_hci_dev *hdev, u8 gate, u8 event, in nfc_hci_send_event() argument 110 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_event() 114 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_EVENT, event, in nfc_hci_send_event() 119 int nfc_hci_send_response(struct nfc_hci_dev *hdev, u8 gate, u8 response, in nfc_hci_send_response() argument 126 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_response() 130 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_RESPONSE, in nfc_hci_send_response() [all …]
|
D | hcp.c | 35 int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe, in nfc_hci_hcp_message_tx() argument 41 struct nfc_dev *ndev = hdev->ndev; in nfc_hci_hcp_message_tx() 65 hdev->max_data_link_payload) in nfc_hci_hcp_message_tx() 68 data_link_len = hdev->max_data_link_payload - in nfc_hci_hcp_message_tx() 107 mutex_lock(&hdev->msg_tx_mutex); in nfc_hci_hcp_message_tx() 109 if (hdev->shutting_down) { in nfc_hci_hcp_message_tx() 111 mutex_unlock(&hdev->msg_tx_mutex); in nfc_hci_hcp_message_tx() 115 list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue); in nfc_hci_hcp_message_tx() 116 mutex_unlock(&hdev->msg_tx_mutex); in nfc_hci_hcp_message_tx() 118 schedule_work(&hdev->msg_tx_work); in nfc_hci_hcp_message_tx() [all …]
|
D | llc_nop.c | 26 struct nfc_hci_dev *hdev; member 34 static void *llc_nop_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, in llc_nop_init() argument 48 llc_nop->hdev = hdev; in llc_nop_init() 77 llc_nop->rcv_to_hci(llc_nop->hdev, skb); in llc_nop_rcv_from_drv() 84 return llc_nop->xmit_to_drv(llc_nop->hdev, skb); in llc_nop_xmit_from_hci()
|
D | hci.h | 76 int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe, 82 u8 nfc_hci_pipe2gate(struct nfc_hci_dev *hdev, u8 pipe); 84 void nfc_hci_hcp_message_rx(struct nfc_hci_dev *hdev, u8 pipe, u8 type,
|
D | llc_shdlc.c | 40 struct nfc_hci_dev *hdev; member 167 r = shdlc->xmit_to_drv(shdlc->hdev, skb); in llc_shdlc_send_s_frame() 185 r = shdlc->xmit_to_drv(shdlc->hdev, skb); in llc_shdlc_send_u_frame() 260 shdlc->rcv_to_hci(shdlc->hdev, skb); in llc_shdlc_rcv_i_frame() 563 r = shdlc->xmit_to_drv(shdlc->hdev, skb); in llc_shdlc_handle_send_queue() 686 shdlc->llc_failure(shdlc->hdev, shdlc->hard_fault); in llc_shdlc_sm_work() 751 static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, in llc_shdlc_init() argument 789 shdlc->hdev = hdev; in llc_shdlc_init()
|
D | llc.c | 105 struct nfc_llc *nfc_llc_allocate(const char *name, struct nfc_hci_dev *hdev, in nfc_llc_allocate() argument 121 llc->data = llc_engine->ops->init(hdev, xmit_to_drv, rcv_to_hci, in nfc_llc_allocate()
|
D | llc.h | 29 void *(*init) (struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv,
|
/net/bluetooth/bnep/ |
D | core.c | 515 struct hci_dev *hdev; in bnep_get_device() local 518 hdev = hci_get_route(dst, src); in bnep_get_device() 519 if (!hdev) in bnep_get_device() 522 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); in bnep_get_device() 524 hci_dev_put(hdev); in bnep_get_device()
|
/net/bluetooth/rfcomm/ |
D | tty.c | 152 struct hci_dev *hdev; in rfcomm_get_device() local 155 hdev = hci_get_route(&dev->dst, &dev->src); in rfcomm_get_device() 156 if (!hdev) in rfcomm_get_device() 159 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &dev->dst); in rfcomm_get_device() 161 hci_dev_put(hdev); in rfcomm_get_device()
|
D | core.c | 2064 s = rfcomm_session_get(&conn->hdev->bdaddr, &conn->dst); in rfcomm_security_cfm()
|