Home
last modified time | relevance | path

Searched refs:hdev (Results 1 – 25 of 45) sorted by relevance

12

/net/bluetooth/
Dhci_sync.c24 static void hci_cmd_sync_complete(struct hci_dev *hdev, u8 result, u16 opcode, in hci_cmd_sync_complete() argument
27 bt_dev_dbg(hdev, "result 0x%2.2x", result); in hci_cmd_sync_complete()
29 if (hdev->req_status != HCI_REQ_PEND) in hci_cmd_sync_complete()
32 hdev->req_result = result; in hci_cmd_sync_complete()
33 hdev->req_status = HCI_REQ_DONE; in hci_cmd_sync_complete()
36 kfree_skb(hdev->req_skb); in hci_cmd_sync_complete()
37 hdev->req_skb = NULL; in hci_cmd_sync_complete()
46 hdev->req_rsp = skb_get(skb); in hci_cmd_sync_complete()
49 wake_up_interruptible(&hdev->req_wait_q); in hci_cmd_sync_complete()
52 static struct sk_buff *hci_cmd_sync_alloc(struct hci_dev *hdev, u16 opcode, in hci_cmd_sync_alloc() argument
[all …]
Dhci_debugfs.c39 struct hci_dev *hdev = file->private_data; \
42 buf[0] = test_bit(__quirk, &hdev->quirks) ? 'Y' : 'N'; \
52 struct hci_dev *hdev = file->private_data; \
56 if (test_bit(HCI_UP, &hdev->flags)) \
63 if (enable == test_bit(__quirk, &hdev->quirks)) \
66 change_bit(__quirk, &hdev->quirks); \
81 struct hci_dev *hdev = f->private; \
83 hci_dev_lock(hdev); \
84 seq_printf(f, "%s\n", hdev->__field ? : ""); \
85 hci_dev_unlock(hdev); \
[all …]
Dhci_core.c70 struct hci_dev *hdev = NULL, *d; in hci_dev_get() local
80 hdev = hci_dev_hold(d); in hci_dev_get()
85 return hdev; in hci_dev_get()
90 bool hci_discovery_active(struct hci_dev *hdev) in hci_discovery_active() argument
92 struct discovery_state *discov = &hdev->discovery; in hci_discovery_active()
104 void hci_discovery_set_state(struct hci_dev *hdev, int state) in hci_discovery_set_state() argument
106 int old_state = hdev->discovery.state; in hci_discovery_set_state()
108 BT_DBG("%s state %u -> %u", hdev->name, hdev->discovery.state, state); in hci_discovery_set_state()
113 hdev->discovery.state = state; in hci_discovery_set_state()
117 hci_update_passive_scan(hdev); in hci_discovery_set_state()
[all …]
Dcoredump.c32 bt_dev_dbg(hdev, \
34 hci_dmp_cb(skb)->pkt_type, hdev->dump.state)
51 static int hci_devcd_update_state(struct hci_dev *hdev, int state) in hci_devcd_update_state() argument
53 bt_dev_dbg(hdev, "Updating devcoredump state from %d to %d.", in hci_devcd_update_state()
54 hdev->dump.state, state); in hci_devcd_update_state()
56 hdev->dump.state = state; in hci_devcd_update_state()
58 return hci_devcd_update_hdr_state(hdev->dump.head, in hci_devcd_update_state()
59 hdev->dump.alloc_size, state); in hci_devcd_update_state()
62 static int hci_devcd_mkheader(struct hci_dev *hdev, struct sk_buff *skb) in hci_devcd_mkheader() argument
72 if (hdev->dump.dmp_hdr) in hci_devcd_mkheader()
[all …]
Dhci_event.c50 static void *hci_ev_skb_pull(struct hci_dev *hdev, struct sk_buff *skb, in hci_ev_skb_pull() argument
57 bt_dev_err(hdev, "Malformed Event: 0x%2.2x", ev); in hci_ev_skb_pull()
62 static void *hci_cc_skb_pull(struct hci_dev *hdev, struct sk_buff *skb, in hci_cc_skb_pull() argument
69 bt_dev_err(hdev, "Malformed Command Complete: 0x%4.4x", op); in hci_cc_skb_pull()
74 static void *hci_le_ev_skb_pull(struct hci_dev *hdev, struct sk_buff *skb, in hci_le_ev_skb_pull() argument
81 bt_dev_err(hdev, "Malformed LE Event: 0x%2.2x", ev); in hci_le_ev_skb_pull()
86 static u8 hci_cc_inquiry_cancel(struct hci_dev *hdev, void *data, in hci_cc_inquiry_cancel() argument
91 bt_dev_dbg(hdev, "status 0x%2.2x", rp->status); in hci_cc_inquiry_cancel()
100 if (rp->status == 0x0c && !test_bit(HCI_INQUIRY, &hdev->flags)) { in hci_cc_inquiry_cancel()
101 bt_dev_warn(hdev, "Ignoring error of Inquiry Cancel command"); in hci_cc_inquiry_cancel()
[all …]
Dmgmt.c323 static int mgmt_index_event(u16 event, struct hci_dev *hdev, void *data, in mgmt_index_event() argument
326 return mgmt_send_event(event, hdev, HCI_CHANNEL_CONTROL, data, len, in mgmt_index_event()
330 static int mgmt_limited_event(u16 event, struct hci_dev *hdev, void *data, in mgmt_limited_event() argument
333 return mgmt_send_event(event, hdev, HCI_CHANNEL_CONTROL, data, len, in mgmt_limited_event()
337 static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, u16 len, in mgmt_event() argument
340 return mgmt_send_event(event, hdev, HCI_CHANNEL_CONTROL, data, len, in mgmt_event()
366 static int read_version(struct sock *sk, struct hci_dev *hdev, void *data, in read_version() argument
371 bt_dev_dbg(hdev, "sock %p", sk); in read_version()
379 static int read_commands(struct sock *sk, struct hci_dev *hdev, void *data, in read_commands() argument
387 bt_dev_dbg(hdev, "sock %p", sk); in read_commands()
[all …]
Dhci_request.c35 void hci_req_init(struct hci_request *req, struct hci_dev *hdev) in hci_req_init() argument
38 req->hdev = hdev; in hci_req_init()
47 bool hci_req_status_pend(struct hci_dev *hdev) in hci_req_status_pend() argument
49 return hdev->req_status == HCI_REQ_PEND; in hci_req_status_pend()
55 struct hci_dev *hdev = req->hdev; in req_run() local
59 bt_dev_dbg(hdev, "length %u", skb_queue_len(&req->cmd_q)); in req_run()
81 spin_lock_irqsave(&hdev->cmd_q.lock, flags); in req_run()
82 skb_queue_splice_tail(&req->cmd_q, &hdev->cmd_q); in req_run()
83 spin_unlock_irqrestore(&hdev->cmd_q.lock, flags); in req_run()
85 queue_work(hdev->workqueue, &hdev->cmd_work); in req_run()
[all …]
Dmsft.c137 bool msft_monitor_supported(struct hci_dev *hdev) in msft_monitor_supported() argument
139 return !!(msft_get_features(hdev) & MSFT_FEATURE_MASK_LE_ADV_MONITOR); in msft_monitor_supported()
142 static bool read_supported_features(struct hci_dev *hdev, in read_supported_features() argument
151 skb = __hci_cmd_sync(hdev, hdev->msft_opcode, sizeof(cp), &cp, in read_supported_features()
154 bt_dev_err(hdev, "Failed to read MSFT supported features (%ld)", in read_supported_features()
160 bt_dev_err(hdev, "MSFT supported features length mismatch"); in read_supported_features()
180 hdev->msft_curve_validity = true; in read_supported_features()
195 (struct hci_dev *hdev, u16 handle, bool is_mgmt) in msft_find_handle_data() argument
198 struct msft_data *msft = hdev->msft_data; in msft_find_handle_data()
212 (struct hci_dev *hdev, u8 addr_type, bdaddr_t *addr, in msft_find_address_data() argument
[all …]
Dhci_conn.c74 struct hci_dev *hdev = conn->hdev; in hci_connect_le_scan_cleanup() local
83 irk = hci_get_irk(hdev, bdaddr, bdaddr_type); in hci_connect_le_scan_cleanup()
89 params = hci_pend_le_action_lookup(&hdev->pend_le_conns, bdaddr, in hci_connect_le_scan_cleanup()
110 mgmt_connect_failed(hdev, &conn->dst, conn->type, in hci_connect_le_scan_cleanup()
124 hci_conn_params_del(hdev, bdaddr, bdaddr_type); in hci_connect_le_scan_cleanup()
129 hci_pend_le_list_add(params, &hdev->pend_le_conns); in hci_connect_le_scan_cleanup()
132 hci_pend_le_list_add(params, &hdev->pend_le_reports); in hci_connect_le_scan_cleanup()
138 hci_update_passive_scan(hdev); in hci_connect_le_scan_cleanup()
143 struct hci_dev *hdev = conn->hdev; in hci_conn_cleanup() local
146 hci_conn_params_del(conn->hdev, &conn->dst, conn->dst_type); in hci_conn_cleanup()
[all …]
Dmgmt_config.c29 cpu_to_le16(hdev->_param_name_) \
35 hdev->_param_name_ \
41 cpu_to_le16(jiffies_to_msecs(hdev->_param_name_)) \
44 int read_def_system_config(struct sock *sk, struct hci_dev *hdev, void *data, in read_def_system_config() argument
116 bt_dev_dbg(hdev, "sock %p", sk); in read_def_system_config()
118 ret = mgmt_cmd_complete(sk, hdev->id, in read_def_system_config()
128 int set_def_system_config(struct sock *sk, struct hci_dev *hdev, void *data, in set_def_system_config() argument
135 return mgmt_cmd_status(sk, hdev->id, in set_def_system_config()
149 bt_dev_warn(hdev, "invalid len left %u, exp >= %u", in set_def_system_config()
152 return mgmt_cmd_status(sk, hdev->id, in set_def_system_config()
[all …]
Deir.c16 u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len) in eir_append_local_name() argument
22 if ((max_adv_len(hdev) - ad_len) < HCI_MAX_SHORT_NAME_LENGTH + 2) in eir_append_local_name()
26 complete_len = strnlen(hdev->dev_name, sizeof(hdev->dev_name)); in eir_append_local_name()
29 hdev->dev_name, complete_len); in eir_append_local_name()
32 short_len = strnlen(hdev->short_name, sizeof(hdev->short_name)); in eir_append_local_name()
35 hdev->short_name, in eir_append_local_name()
43 hdev->dev_name, in eir_append_local_name()
49 u8 eir_append_appearance(struct hci_dev *hdev, u8 *ptr, u8 ad_len) in eir_append_appearance() argument
51 return eir_append_le16(ptr, ad_len, EIR_APPEARANCE, hdev->appearance); in eir_append_appearance()
67 static u8 *create_uuid16_list(struct hci_dev *hdev, u8 *data, ptrdiff_t len) in create_uuid16_list() argument
[all …]
Dmsft.h15 bool msft_monitor_supported(struct hci_dev *hdev);
16 void msft_register(struct hci_dev *hdev);
17 void msft_release(struct hci_dev *hdev);
18 void msft_do_open(struct hci_dev *hdev);
19 void msft_do_close(struct hci_dev *hdev);
20 void msft_vendor_evt(struct hci_dev *hdev, void *data, struct sk_buff *skb);
21 __u64 msft_get_features(struct hci_dev *hdev);
22 int msft_add_monitor_pattern(struct hci_dev *hdev, struct adv_monitor *monitor);
23 int msft_remove_monitor(struct hci_dev *hdev, struct adv_monitor *monitor);
25 int msft_set_filter_enable(struct hci_dev *hdev, bool enable);
[all …]
Daosp.c43 void aosp_do_open(struct hci_dev *hdev) in aosp_do_open() argument
49 if (!hdev->aosp_capable) in aosp_do_open()
52 bt_dev_dbg(hdev, "Initialize AOSP extension"); in aosp_do_open()
55 skb = __hci_cmd_sync(hdev, hci_opcode_pack(0x3f, 0x153), 0, NULL, in aosp_do_open()
61 bt_dev_err(hdev, "AOSP get vendor capabilities (%ld)", in aosp_do_open()
74 bt_dev_info(hdev, "AOSP extensions version v%u.%02u", in aosp_do_open()
79 bt_dev_warn(hdev, "AOSP capabilities version %u too old", in aosp_do_open()
85 bt_dev_warn(hdev, "AOSP quality report is not supported"); in aosp_do_open()
98 hdev->aosp_quality_report = true; in aosp_do_open()
99 bt_dev_info(hdev, "AOSP quality report is supported"); in aosp_do_open()
[all …]
Dhci_sock.c53 struct hci_dev *hdev; member
65 struct hci_dev *hdev = hci_pi(sk)->hdev; in hci_hdev_from_sock() local
67 if (!hdev) in hci_hdev_from_sock()
69 if (hci_dev_test_flag(hdev, HCI_UNREGISTER)) in hci_hdev_from_sock()
71 return hdev; in hci_hdev_from_sock()
203 void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) in hci_send_to_sock() argument
208 BT_DBG("hdev %p len %d", hdev, skb->len); in hci_send_to_sock()
215 if (sk->sk_state != BT_BOUND || hci_pi(sk)->hdev != hdev) in hci_send_to_sock()
358 void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb) in hci_send_to_monitor() argument
367 BT_DBG("hdev %p len %d", hdev, skb->len); in hci_send_to_monitor()
[all …]
Dmgmt_util.c59 struct sk_buff *mgmt_alloc_skb(struct hci_dev *hdev, u16 opcode, in mgmt_alloc_skb() argument
69 bt_cb(skb)->mgmt.hdev = hdev; in mgmt_alloc_skb()
78 struct hci_dev *hdev; in mgmt_send_event_skb() local
86 hdev = bt_cb(skb)->mgmt.hdev; in mgmt_send_event_skb()
93 hci_send_monitor_ctrl_event(hdev, bt_cb(skb)->mgmt.opcode, in mgmt_send_event_skb()
99 if (hdev) in mgmt_send_event_skb()
100 hdr->index = cpu_to_le16(hdev->id); in mgmt_send_event_skb()
111 int mgmt_send_event(u16 event, struct hci_dev *hdev, unsigned short channel, in mgmt_send_event() argument
116 skb = mgmt_alloc_skb(hdev, event, data_len); in mgmt_send_event()
218 struct hci_dev *hdev) in mgmt_pending_find() argument
[all …]
Dhci_sysfs.c36 struct hci_dev *hdev = conn->hdev; in hci_conn_init_sysfs() local
38 bt_dev_dbg(hdev, "conn %p", conn); in hci_conn_init_sysfs()
42 conn->dev.parent = &hdev->dev; in hci_conn_init_sysfs()
49 struct hci_dev *hdev = conn->hdev; in hci_conn_add_sysfs() local
51 bt_dev_dbg(hdev, "conn %p", conn); in hci_conn_add_sysfs()
56 dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); in hci_conn_add_sysfs()
59 bt_dev_err(hdev, "failed to register connection device"); in hci_conn_add_sysfs()
64 struct hci_dev *hdev = conn->hdev; in hci_conn_del_sysfs() local
66 bt_dev_dbg(hdev, "conn %p", conn); in hci_conn_del_sysfs()
91 struct hci_dev *hdev = to_hci_dev(dev); in bt_host_release() local
[all …]
Dleds.c15 struct hci_dev *hdev; member
21 void hci_leds_update_powered(struct hci_dev *hdev, bool enabled) in hci_leds_update_powered() argument
23 if (hdev->power_led) in hci_leds_update_powered()
24 led_trigger_event(hdev->power_led, in hci_leds_update_powered()
49 powered = test_bit(HCI_UP, &htrig->hdev->flags); in power_activate()
56 static struct led_trigger *led_allocate_basic(struct hci_dev *hdev, in led_allocate_basic() argument
62 htrig = devm_kzalloc(&hdev->dev, sizeof(*htrig), GFP_KERNEL); in led_allocate_basic()
66 htrig->hdev = hdev; in led_allocate_basic()
68 htrig->led_trigger.name = devm_kasprintf(&hdev->dev, GFP_KERNEL, in led_allocate_basic()
69 "%s-%s", hdev->name, in led_allocate_basic()
[all …]
Dsmp.c39 #define SMP_DEV(hdev) \ argument
40 ((struct smp_dev *)((struct l2cap_chan *)((hdev)->smp_data))->data)
498 bool smp_irk_matches(struct hci_dev *hdev, const u8 irk[16], in smp_irk_matches() argument
501 struct l2cap_chan *chan = hdev->smp_data; in smp_irk_matches()
508 bt_dev_dbg(hdev, "RPA %pMR IRK %*phN", bdaddr, 16, irk); in smp_irk_matches()
517 int smp_generate_rpa(struct hci_dev *hdev, const u8 irk[16], bdaddr_t *rpa) in smp_generate_rpa() argument
519 struct l2cap_chan *chan = hdev->smp_data; in smp_generate_rpa()
534 bt_dev_dbg(hdev, "RPA %pMR", rpa); in smp_generate_rpa()
539 int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16]) in smp_generate_oob() argument
541 struct l2cap_chan *chan = hdev->smp_data; in smp_generate_oob()
[all …]
Dhci_request.h29 #define hci_req_sync_lock(hdev) mutex_lock(&hdev->req_lock) argument
30 #define hci_req_sync_unlock(hdev) mutex_unlock(&hdev->req_lock) argument
37 struct hci_dev *hdev; member
46 void hci_req_init(struct hci_request *req, struct hci_dev *hdev);
48 bool hci_req_status_pend(struct hci_dev *hdev);
51 void hci_req_sync_complete(struct hci_dev *hdev, u8 result, u16 opcode,
57 void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status,
61 int hci_req_sync(struct hci_dev *hdev, int (*req)(struct hci_request *req,
64 int __hci_req_sync(struct hci_dev *hdev, int (*func)(struct hci_request *req,
68 struct sk_buff *hci_prepare_cmd(struct hci_dev *hdev, u16 opcode, u32 plen,
[all …]
Dhci_codec.c48 static void hci_read_codec_capabilities(struct hci_dev *hdev, __u8 transport, in hci_read_codec_capabilities() argument
67 if (!(hdev->commands[45] & 0x08)) { in hci_read_codec_capabilities()
68 hci_dev_lock(hdev); in hci_read_codec_capabilities()
69 hci_codec_list_add(&hdev->local_codecs, cmd, in hci_read_codec_capabilities()
71 hci_dev_unlock(hdev); in hci_read_codec_capabilities()
75 skb = __hci_cmd_sync_sk(hdev, HCI_OP_READ_LOCAL_CODEC_CAPS, in hci_read_codec_capabilities()
78 bt_dev_err(hdev, "Failed to read codec capabilities (%ld)", in hci_read_codec_capabilities()
110 hci_dev_lock(hdev); in hci_read_codec_capabilities()
111 hci_codec_list_add(&hdev->local_codecs, cmd, rp, in hci_read_codec_capabilities()
113 hci_dev_unlock(hdev); in hci_read_codec_capabilities()
[all …]
Daosp.h8 void aosp_do_open(struct hci_dev *hdev);
9 void aosp_do_close(struct hci_dev *hdev);
11 bool aosp_has_quality_report(struct hci_dev *hdev);
12 int aosp_set_quality_report(struct hci_dev *hdev, bool enable);
16 static inline void aosp_do_open(struct hci_dev *hdev) {} in aosp_do_open() argument
17 static inline void aosp_do_close(struct hci_dev *hdev) {} in aosp_do_close() argument
19 static inline bool aosp_has_quality_report(struct hci_dev *hdev) in aosp_has_quality_report() argument
24 static inline int aosp_set_quality_report(struct hci_dev *hdev, bool enable) in aosp_set_quality_report() argument
Dmgmt_util.h45 struct sk_buff *mgmt_alloc_skb(struct hci_dev *hdev, u16 opcode,
49 int mgmt_send_event(u16 event, struct hci_dev *hdev, unsigned short channel,
56 struct hci_dev *hdev);
59 struct hci_dev *hdev,
61 void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
65 struct hci_dev *hdev,
68 struct hci_dev *hdev,
72 void mgmt_mesh_foreach(struct hci_dev *hdev,
75 struct mgmt_mesh_tx *mgmt_mesh_find(struct hci_dev *hdev, u8 handle);
76 struct mgmt_mesh_tx *mgmt_mesh_next(struct hci_dev *hdev, struct sock *sk);
[all …]
/net/nfc/hci/
Dcore.c37 void nfc_hci_reset_pipes(struct nfc_hci_dev *hdev) in nfc_hci_reset_pipes() argument
42 hdev->pipes[i].gate = NFC_HCI_INVALID_GATE; in nfc_hci_reset_pipes()
43 hdev->pipes[i].dest_host = NFC_HCI_INVALID_HOST; in nfc_hci_reset_pipes()
45 memset(hdev->gate2pipe, NFC_HCI_INVALID_PIPE, sizeof(hdev->gate2pipe)); in nfc_hci_reset_pipes()
49 void nfc_hci_reset_pipes_per_host(struct nfc_hci_dev *hdev, u8 host) in nfc_hci_reset_pipes_per_host() argument
54 if (hdev->pipes[i].dest_host != host) in nfc_hci_reset_pipes_per_host()
57 hdev->pipes[i].gate = NFC_HCI_INVALID_GATE; in nfc_hci_reset_pipes_per_host()
58 hdev->pipes[i].dest_host = NFC_HCI_INVALID_HOST; in nfc_hci_reset_pipes_per_host()
65 struct nfc_hci_dev *hdev = container_of(work, struct nfc_hci_dev, in nfc_hci_msg_tx_work() local
71 mutex_lock(&hdev->msg_tx_mutex); in nfc_hci_msg_tx_work()
[all …]
Dcommand.c19 static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, in nfc_hci_execute_cmd_async() argument
29 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_COMMAND, cmd, in nfc_hci_execute_cmd_async()
55 static int nfc_hci_execute_cmd(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, in nfc_hci_execute_cmd() argument
71 hcp_ew.exec_result = nfc_hci_hcp_message_tx(hdev, pipe, in nfc_hci_execute_cmd()
91 int nfc_hci_send_event(struct nfc_hci_dev *hdev, u8 gate, u8 event, in nfc_hci_send_event() argument
98 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_event()
102 return nfc_hci_hcp_message_tx(hdev, pipe, NFC_HCI_HCP_EVENT, event, in nfc_hci_send_event()
112 int nfc_hci_send_cmd(struct nfc_hci_dev *hdev, u8 gate, u8 cmd, in nfc_hci_send_cmd() argument
117 pipe = hdev->gate2pipe[gate]; in nfc_hci_send_cmd()
121 return nfc_hci_execute_cmd(hdev, pipe, cmd, param, param_len, skb); in nfc_hci_send_cmd()
[all …]
Dhcp.c21 int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe, in nfc_hci_hcp_message_tx() argument
27 struct nfc_dev *ndev = hdev->ndev; in nfc_hci_hcp_message_tx()
51 hdev->max_data_link_payload) in nfc_hci_hcp_message_tx()
54 data_link_len = hdev->max_data_link_payload - in nfc_hci_hcp_message_tx()
91 mutex_lock(&hdev->msg_tx_mutex); in nfc_hci_hcp_message_tx()
93 if (hdev->shutting_down) { in nfc_hci_hcp_message_tx()
95 mutex_unlock(&hdev->msg_tx_mutex); in nfc_hci_hcp_message_tx()
99 list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue); in nfc_hci_hcp_message_tx()
100 mutex_unlock(&hdev->msg_tx_mutex); in nfc_hci_hcp_message_tx()
102 schedule_work(&hdev->msg_tx_work); in nfc_hci_hcp_message_tx()
[all …]

12