Lines Matching full:local
21 static void nfc_llcp_rx_skb(struct nfc_llcp_local *local, struct sk_buff *skb);
45 struct nfc_llcp_local *local = sock->local; in nfc_llcp_socket_purge() local
51 if (local == NULL) in nfc_llcp_socket_purge()
54 /* Search for local pending SKBs that are related to this socket */ in nfc_llcp_socket_purge()
55 skb_queue_walk_safe(&local->tx_queue, s, tmp) { in nfc_llcp_socket_purge()
59 skb_unlink(s, &local->tx_queue); in nfc_llcp_socket_purge()
64 static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool device, in nfc_llcp_socket_release() argument
71 skb_queue_purge(&local->tx_queue); in nfc_llcp_socket_release()
73 write_lock(&local->sockets.lock); in nfc_llcp_socket_release()
75 sk_for_each_safe(sk, tmp, &local->sockets.head) { in nfc_llcp_socket_release()
116 write_unlock(&local->sockets.lock); in nfc_llcp_socket_release()
122 write_lock(&local->raw_sockets.lock); in nfc_llcp_socket_release()
124 sk_for_each_safe(sk, tmp, &local->raw_sockets.head) { in nfc_llcp_socket_release()
141 write_unlock(&local->raw_sockets.lock); in nfc_llcp_socket_release()
144 struct nfc_llcp_local *nfc_llcp_local_get(struct nfc_llcp_local *local) in nfc_llcp_local_get() argument
146 kref_get(&local->ref); in nfc_llcp_local_get()
148 return local; in nfc_llcp_local_get()
151 static void local_cleanup(struct nfc_llcp_local *local) in local_cleanup() argument
153 nfc_llcp_socket_release(local, false, ENXIO); in local_cleanup()
154 del_timer_sync(&local->link_timer); in local_cleanup()
155 skb_queue_purge(&local->tx_queue); in local_cleanup()
156 cancel_work_sync(&local->tx_work); in local_cleanup()
157 cancel_work_sync(&local->rx_work); in local_cleanup()
158 cancel_work_sync(&local->timeout_work); in local_cleanup()
159 kfree_skb(local->rx_pending); in local_cleanup()
160 del_timer_sync(&local->sdreq_timer); in local_cleanup()
161 cancel_work_sync(&local->sdreq_timeout_work); in local_cleanup()
162 nfc_llcp_free_sdp_tlv_list(&local->pending_sdreqs); in local_cleanup()
167 struct nfc_llcp_local *local; in local_release() local
169 local = container_of(ref, struct nfc_llcp_local, ref); in local_release()
171 list_del(&local->list); in local_release()
172 local_cleanup(local); in local_release()
173 kfree(local); in local_release()
176 int nfc_llcp_local_put(struct nfc_llcp_local *local) in nfc_llcp_local_put() argument
178 if (local == NULL) in nfc_llcp_local_put()
181 return kref_put(&local->ref, local_release); in nfc_llcp_local_put()
184 static struct nfc_llcp_sock *nfc_llcp_sock_get(struct nfc_llcp_local *local, in nfc_llcp_sock_get() argument
195 read_lock(&local->sockets.lock); in nfc_llcp_sock_get()
199 sk_for_each(sk, &local->sockets.head) { in nfc_llcp_sock_get()
208 read_unlock(&local->sockets.lock); in nfc_llcp_sock_get()
225 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_timeout_work() local
228 nfc_dep_link_down(local->dev); in nfc_llcp_timeout_work()
233 struct nfc_llcp_local *local = from_timer(local, t, link_timer); in nfc_llcp_symm_timer() local
237 schedule_work(&local->timeout_work); in nfc_llcp_symm_timer()
246 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_sdreq_timeout_work() local
249 mutex_lock(&local->sdreq_lock); in nfc_llcp_sdreq_timeout_work()
251 time = jiffies - msecs_to_jiffies(3 * local->remote_lto); in nfc_llcp_sdreq_timeout_work()
253 hlist_for_each_entry_safe(sdp, n, &local->pending_sdreqs, node) { in nfc_llcp_sdreq_timeout_work()
264 if (!hlist_empty(&local->pending_sdreqs)) in nfc_llcp_sdreq_timeout_work()
265 mod_timer(&local->sdreq_timer, in nfc_llcp_sdreq_timeout_work()
266 jiffies + msecs_to_jiffies(3 * local->remote_lto)); in nfc_llcp_sdreq_timeout_work()
268 mutex_unlock(&local->sdreq_lock); in nfc_llcp_sdreq_timeout_work()
271 nfc_genl_llc_send_sdres(local->dev, &nl_sdres_list); in nfc_llcp_sdreq_timeout_work()
276 struct nfc_llcp_local *local = from_timer(local, t, sdreq_timer); in nfc_llcp_sdreq_timer() local
278 schedule_work(&local->sdreq_timeout_work); in nfc_llcp_sdreq_timer()
283 struct nfc_llcp_local *local; in nfc_llcp_find_local() local
285 list_for_each_entry(local, &llcp_devices, list) in nfc_llcp_find_local()
286 if (local->dev == dev) in nfc_llcp_find_local()
287 return local; in nfc_llcp_find_local()
325 struct nfc_llcp_sock *nfc_llcp_sock_from_sn(struct nfc_llcp_local *local, in nfc_llcp_sock_from_sn() argument
336 read_lock(&local->sockets.lock); in nfc_llcp_sock_from_sn()
340 sk_for_each(sk, &local->sockets.head) { in nfc_llcp_sock_from_sn()
366 read_unlock(&local->sockets.lock); in nfc_llcp_sock_from_sn()
373 u8 nfc_llcp_get_sdp_ssap(struct nfc_llcp_local *local, in nfc_llcp_get_sdp_ssap() argument
376 mutex_lock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
386 if (test_bit(ssap, &local->local_wks)) { in nfc_llcp_get_sdp_ssap()
387 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
392 set_bit(ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
393 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
402 if (nfc_llcp_sock_from_sn(local, sock->service_name, in nfc_llcp_get_sdp_ssap()
404 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
409 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
414 if (!test_bit(sock->ssap, &local->local_wks)) { in nfc_llcp_get_sdp_ssap()
415 set_bit(sock->ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
416 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
422 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
427 u8 nfc_llcp_get_local_ssap(struct nfc_llcp_local *local) in nfc_llcp_get_local_ssap() argument
431 mutex_lock(&local->sdp_lock); in nfc_llcp_get_local_ssap()
433 local_ssap = find_first_zero_bit(&local->local_sap, LLCP_LOCAL_NUM_SAP); in nfc_llcp_get_local_ssap()
435 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_local_ssap()
439 set_bit(local_ssap, &local->local_sap); in nfc_llcp_get_local_ssap()
441 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_local_ssap()
446 void nfc_llcp_put_ssap(struct nfc_llcp_local *local, u8 ssap) in nfc_llcp_put_ssap() argument
453 sdp = &local->local_wks; in nfc_llcp_put_ssap()
458 sdp = &local->local_sdp; in nfc_llcp_put_ssap()
459 client_cnt = &local->local_sdp_cnt[local_ssap]; in nfc_llcp_put_ssap()
463 mutex_lock(&local->sdp_lock); in nfc_llcp_put_ssap()
473 l_sock = nfc_llcp_sock_get(local, ssap, LLCP_SAP_SDP); in nfc_llcp_put_ssap()
480 mutex_unlock(&local->sdp_lock); in nfc_llcp_put_ssap()
485 sdp = &local->local_sap; in nfc_llcp_put_ssap()
490 mutex_lock(&local->sdp_lock); in nfc_llcp_put_ssap()
494 mutex_unlock(&local->sdp_lock); in nfc_llcp_put_ssap()
497 static u8 nfc_llcp_reserve_sdp_ssap(struct nfc_llcp_local *local) in nfc_llcp_reserve_sdp_ssap() argument
501 mutex_lock(&local->sdp_lock); in nfc_llcp_reserve_sdp_ssap()
503 ssap = find_first_zero_bit(&local->local_sdp, LLCP_SDP_NUM_SAP); in nfc_llcp_reserve_sdp_ssap()
505 mutex_unlock(&local->sdp_lock); in nfc_llcp_reserve_sdp_ssap()
512 set_bit(ssap, &local->local_sdp); in nfc_llcp_reserve_sdp_ssap()
514 mutex_unlock(&local->sdp_lock); in nfc_llcp_reserve_sdp_ssap()
519 static int nfc_llcp_build_gb(struct nfc_llcp_local *local) in nfc_llcp_build_gb() argument
525 __be16 wks = cpu_to_be16(local->local_wks); in nfc_llcp_build_gb()
538 lto_tlv = nfc_llcp_build_tlv(LLCP_TLV_LTO, &local->lto, 1, <o_length); in nfc_llcp_build_gb()
545 pr_debug("Local wks 0x%lx\n", local->local_wks); in nfc_llcp_build_gb()
553 miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&local->miux, 0, in nfc_llcp_build_gb()
568 gb_cur = local->gb; in nfc_llcp_build_gb()
585 local->gb_len = gb_len; in nfc_llcp_build_gb()
598 struct nfc_llcp_local *local; in nfc_llcp_general_bytes() local
600 local = nfc_llcp_find_local(dev); in nfc_llcp_general_bytes()
601 if (local == NULL) { in nfc_llcp_general_bytes()
606 nfc_llcp_build_gb(local); in nfc_llcp_general_bytes()
608 *general_bytes_len = local->gb_len; in nfc_llcp_general_bytes()
610 return local->gb; in nfc_llcp_general_bytes()
615 struct nfc_llcp_local *local; in nfc_llcp_set_remote_gb() local
620 local = nfc_llcp_find_local(dev); in nfc_llcp_set_remote_gb()
621 if (local == NULL) { in nfc_llcp_set_remote_gb()
626 memset(local->remote_gb, 0, NFC_MAX_GT_LEN); in nfc_llcp_set_remote_gb()
627 memcpy(local->remote_gb, gb, gb_len); in nfc_llcp_set_remote_gb()
628 local->remote_gb_len = gb_len; in nfc_llcp_set_remote_gb()
630 if (memcmp(local->remote_gb, llcp_magic, 3)) { in nfc_llcp_set_remote_gb()
635 return nfc_llcp_parse_gb_tlv(local, in nfc_llcp_set_remote_gb()
636 &local->remote_gb[3], in nfc_llcp_set_remote_gb()
637 local->remote_gb_len - 3); in nfc_llcp_set_remote_gb()
672 void nfc_llcp_send_to_raw_sock(struct nfc_llcp_local *local, in nfc_llcp_send_to_raw_sock() argument
679 read_lock(&local->raw_sockets.lock); in nfc_llcp_send_to_raw_sock()
681 sk_for_each(sk, &local->raw_sockets.head) { in nfc_llcp_send_to_raw_sock()
694 data[0] = local->dev ? local->dev->idx : 0xFF; in nfc_llcp_send_to_raw_sock()
707 read_unlock(&local->raw_sockets.lock); in nfc_llcp_send_to_raw_sock()
714 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_tx_work() local
720 skb = skb_dequeue(&local->tx_queue); in nfc_llcp_tx_work()
727 nfc_llcp_send_symm(local->dev); in nfc_llcp_tx_work()
729 skb_queue_head(&local->tx_queue, skb); in nfc_llcp_tx_work()
730 nfc_llcp_send_symm(local->dev); in nfc_llcp_tx_work()
745 nfc_llcp_send_to_raw_sock(local, skb, in nfc_llcp_tx_work()
748 ret = nfc_data_exchange(local->dev, local->target_idx, in nfc_llcp_tx_work()
749 skb, nfc_llcp_recv, local); in nfc_llcp_tx_work()
761 nfc_llcp_send_symm(local->dev); in nfc_llcp_tx_work()
765 mod_timer(&local->link_timer, in nfc_llcp_tx_work()
766 jiffies + msecs_to_jiffies(2 * local->remote_lto)); in nfc_llcp_tx_work()
769 static struct nfc_llcp_sock *nfc_llcp_connecting_sock_get(struct nfc_llcp_local *local, in nfc_llcp_connecting_sock_get() argument
775 read_lock(&local->connecting_sockets.lock); in nfc_llcp_connecting_sock_get()
777 sk_for_each(sk, &local->connecting_sockets.head) { in nfc_llcp_connecting_sock_get()
789 read_unlock(&local->connecting_sockets.lock); in nfc_llcp_connecting_sock_get()
794 static struct nfc_llcp_sock *nfc_llcp_sock_get_sn(struct nfc_llcp_local *local, in nfc_llcp_sock_get_sn() argument
799 llcp_sock = nfc_llcp_sock_from_sn(local, sn, sn_len); in nfc_llcp_sock_get_sn()
833 static void nfc_llcp_recv_ui(struct nfc_llcp_local *local, in nfc_llcp_recv_ui() argument
850 llcp_sock = nfc_llcp_sock_get(local, dsap, LLCP_SAP_SDP); in nfc_llcp_recv_ui()
869 static void nfc_llcp_recv_connect(struct nfc_llcp_local *local, in nfc_llcp_recv_connect() argument
882 sock = nfc_llcp_sock_get(local, dsap, LLCP_SAP_SDP); in nfc_llcp_recv_connect()
899 sock = nfc_llcp_sock_get_sn(local, sn, sn_len); in nfc_llcp_recv_connect()
918 u8 ssap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_connect()
941 new_sock->dev = local->dev; in nfc_llcp_recv_connect()
942 new_sock->local = nfc_llcp_local_get(local); in nfc_llcp_recv_connect()
947 new_sock->target_idx = local->target_idx; in nfc_llcp_recv_connect()
956 &local->local_sdp_cnt[sock->ssap - LLCP_WKS_NUM_SAP]; in nfc_llcp_recv_connect()
967 nfc_llcp_sock_link(&local->sockets, new_sk); in nfc_llcp_recv_connect()
971 nfc_get_device(local->dev->idx); in nfc_llcp_recv_connect()
988 nfc_llcp_send_dm(local, dsap, ssap, reason); in nfc_llcp_recv_connect()
994 struct nfc_llcp_local *local = sock->local; in nfc_llcp_queue_i_frames() local
1012 skb_queue_tail(&local->tx_queue, pdu); in nfc_llcp_queue_i_frames()
1019 static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local, in nfc_llcp_recv_hdlc() argument
1034 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_hdlc()
1036 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_hdlc()
1090 skb_queue_head(&local->tx_queue, s); in nfc_llcp_recv_hdlc()
1106 static void nfc_llcp_recv_disc(struct nfc_llcp_local *local, in nfc_llcp_recv_disc() argument
1118 nfc_dep_link_down(local->dev); in nfc_llcp_recv_disc()
1122 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_disc()
1124 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_disc()
1139 nfc_put_device(local->dev); in nfc_llcp_recv_disc()
1144 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_DISC); in nfc_llcp_recv_disc()
1150 static void nfc_llcp_recv_cc(struct nfc_llcp_local *local, in nfc_llcp_recv_cc() argument
1160 llcp_sock = nfc_llcp_connecting_sock_get(local, dsap); in nfc_llcp_recv_cc()
1163 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_cc()
1171 nfc_llcp_sock_unlink(&local->connecting_sockets, sk); in nfc_llcp_recv_cc()
1172 nfc_llcp_sock_link(&local->sockets, sk); in nfc_llcp_recv_cc()
1184 static void nfc_llcp_recv_dm(struct nfc_llcp_local *local, in nfc_llcp_recv_dm() argument
1200 llcp_sock = nfc_llcp_connecting_sock_get(local, dsap); in nfc_llcp_recv_dm()
1204 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_dm()
1222 static void nfc_llcp_recv_snl(struct nfc_llcp_local *local, in nfc_llcp_recv_snl() argument
1270 llcp_sock = nfc_llcp_sock_from_sn(local, service_name, in nfc_llcp_recv_snl()
1285 sap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_snl()
1295 &local->local_sdp_cnt[sap - in nfc_llcp_recv_snl()
1318 mutex_lock(&local->sdreq_lock); in nfc_llcp_recv_snl()
1322 hlist_for_each_entry(sdp, &local->pending_sdreqs, node) { in nfc_llcp_recv_snl()
1338 mutex_unlock(&local->sdreq_lock); in nfc_llcp_recv_snl()
1352 nfc_genl_llc_send_sdres(local->dev, &nl_sdres_list); in nfc_llcp_recv_snl()
1355 nfc_llcp_send_snl_sdres(local, &llc_sdres_list, sdres_tlvs_len); in nfc_llcp_recv_snl()
1358 static void nfc_llcp_recv_agf(struct nfc_llcp_local *local, struct sk_buff *skb) in nfc_llcp_recv_agf() argument
1394 nfc_llcp_rx_skb(local, new_skb); in nfc_llcp_recv_agf()
1402 static void nfc_llcp_rx_skb(struct nfc_llcp_local *local, struct sk_buff *skb) in nfc_llcp_rx_skb() argument
1423 nfc_llcp_recv_ui(local, skb); in nfc_llcp_rx_skb()
1428 nfc_llcp_recv_connect(local, skb); in nfc_llcp_rx_skb()
1433 nfc_llcp_recv_disc(local, skb); in nfc_llcp_rx_skb()
1438 nfc_llcp_recv_cc(local, skb); in nfc_llcp_rx_skb()
1443 nfc_llcp_recv_dm(local, skb); in nfc_llcp_rx_skb()
1448 nfc_llcp_recv_snl(local, skb); in nfc_llcp_rx_skb()
1455 nfc_llcp_recv_hdlc(local, skb); in nfc_llcp_rx_skb()
1460 nfc_llcp_recv_agf(local, skb); in nfc_llcp_rx_skb()
1467 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_rx_work() local
1471 skb = local->rx_pending; in nfc_llcp_rx_work()
1479 nfc_llcp_send_to_raw_sock(local, skb, NFC_DIRECTION_RX); in nfc_llcp_rx_work()
1481 nfc_llcp_rx_skb(local, skb); in nfc_llcp_rx_work()
1483 schedule_work(&local->tx_work); in nfc_llcp_rx_work()
1484 kfree_skb(local->rx_pending); in nfc_llcp_rx_work()
1485 local->rx_pending = NULL; in nfc_llcp_rx_work()
1488 static void __nfc_llcp_recv(struct nfc_llcp_local *local, struct sk_buff *skb) in __nfc_llcp_recv() argument
1490 local->rx_pending = skb; in __nfc_llcp_recv()
1491 del_timer(&local->link_timer); in __nfc_llcp_recv()
1492 schedule_work(&local->rx_work); in __nfc_llcp_recv()
1497 struct nfc_llcp_local *local = (struct nfc_llcp_local *) data; in nfc_llcp_recv() local
1504 __nfc_llcp_recv(local, skb); in nfc_llcp_recv()
1509 struct nfc_llcp_local *local; in nfc_llcp_data_received() local
1511 local = nfc_llcp_find_local(dev); in nfc_llcp_data_received()
1512 if (local == NULL) { in nfc_llcp_data_received()
1517 __nfc_llcp_recv(local, skb); in nfc_llcp_data_received()
1524 struct nfc_llcp_local *local; in nfc_llcp_mac_is_down() local
1526 local = nfc_llcp_find_local(dev); in nfc_llcp_mac_is_down()
1527 if (local == NULL) in nfc_llcp_mac_is_down()
1530 local->remote_miu = LLCP_DEFAULT_MIU; in nfc_llcp_mac_is_down()
1531 local->remote_lto = LLCP_DEFAULT_LTO; in nfc_llcp_mac_is_down()
1534 nfc_llcp_socket_release(local, true, 0); in nfc_llcp_mac_is_down()
1540 struct nfc_llcp_local *local; in nfc_llcp_mac_is_up() local
1544 local = nfc_llcp_find_local(dev); in nfc_llcp_mac_is_up()
1545 if (local == NULL) in nfc_llcp_mac_is_up()
1548 local->target_idx = target_idx; in nfc_llcp_mac_is_up()
1549 local->comm_mode = comm_mode; in nfc_llcp_mac_is_up()
1550 local->rf_mode = rf_mode; in nfc_llcp_mac_is_up()
1555 schedule_work(&local->tx_work); in nfc_llcp_mac_is_up()
1557 mod_timer(&local->link_timer, in nfc_llcp_mac_is_up()
1558 jiffies + msecs_to_jiffies(local->remote_lto)); in nfc_llcp_mac_is_up()
1564 struct nfc_llcp_local *local; in nfc_llcp_register_device() local
1566 local = kzalloc(sizeof(struct nfc_llcp_local), GFP_KERNEL); in nfc_llcp_register_device()
1567 if (local == NULL) in nfc_llcp_register_device()
1570 local->dev = ndev; in nfc_llcp_register_device()
1571 INIT_LIST_HEAD(&local->list); in nfc_llcp_register_device()
1572 kref_init(&local->ref); in nfc_llcp_register_device()
1573 mutex_init(&local->sdp_lock); in nfc_llcp_register_device()
1574 timer_setup(&local->link_timer, nfc_llcp_symm_timer, 0); in nfc_llcp_register_device()
1576 skb_queue_head_init(&local->tx_queue); in nfc_llcp_register_device()
1577 INIT_WORK(&local->tx_work, nfc_llcp_tx_work); in nfc_llcp_register_device()
1579 local->rx_pending = NULL; in nfc_llcp_register_device()
1580 INIT_WORK(&local->rx_work, nfc_llcp_rx_work); in nfc_llcp_register_device()
1582 INIT_WORK(&local->timeout_work, nfc_llcp_timeout_work); in nfc_llcp_register_device()
1584 rwlock_init(&local->sockets.lock); in nfc_llcp_register_device()
1585 rwlock_init(&local->connecting_sockets.lock); in nfc_llcp_register_device()
1586 rwlock_init(&local->raw_sockets.lock); in nfc_llcp_register_device()
1588 local->lto = 150; /* 1500 ms */ in nfc_llcp_register_device()
1589 local->rw = LLCP_MAX_RW; in nfc_llcp_register_device()
1590 local->miux = cpu_to_be16(LLCP_MAX_MIUX); in nfc_llcp_register_device()
1591 local->local_wks = 0x1; /* LLC Link Management */ in nfc_llcp_register_device()
1593 nfc_llcp_build_gb(local); in nfc_llcp_register_device()
1595 local->remote_miu = LLCP_DEFAULT_MIU; in nfc_llcp_register_device()
1596 local->remote_lto = LLCP_DEFAULT_LTO; in nfc_llcp_register_device()
1598 mutex_init(&local->sdreq_lock); in nfc_llcp_register_device()
1599 INIT_HLIST_HEAD(&local->pending_sdreqs); in nfc_llcp_register_device()
1600 timer_setup(&local->sdreq_timer, nfc_llcp_sdreq_timer, 0); in nfc_llcp_register_device()
1601 INIT_WORK(&local->sdreq_timeout_work, nfc_llcp_sdreq_timeout_work); in nfc_llcp_register_device()
1603 list_add(&local->list, &llcp_devices); in nfc_llcp_register_device()
1610 struct nfc_llcp_local *local = nfc_llcp_find_local(dev); in nfc_llcp_unregister_device() local
1612 if (local == NULL) { in nfc_llcp_unregister_device()
1617 local_cleanup(local); in nfc_llcp_unregister_device()
1619 nfc_llcp_local_put(local); in nfc_llcp_unregister_device()