Lines Matching refs: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
53 if (local == NULL) in nfc_llcp_socket_purge()
57 skb_queue_walk_safe(&local->tx_queue, s, tmp) { in nfc_llcp_socket_purge()
61 skb_unlink(s, &local->tx_queue); in nfc_llcp_socket_purge()
66 static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool device, in nfc_llcp_socket_release() argument
73 skb_queue_purge(&local->tx_queue); in nfc_llcp_socket_release()
75 write_lock(&local->sockets.lock); in nfc_llcp_socket_release()
77 sk_for_each_safe(sk, tmp, &local->sockets.head) { in nfc_llcp_socket_release()
118 write_unlock(&local->sockets.lock); in nfc_llcp_socket_release()
124 write_lock(&local->raw_sockets.lock); in nfc_llcp_socket_release()
126 sk_for_each_safe(sk, tmp, &local->raw_sockets.head) { in nfc_llcp_socket_release()
143 write_unlock(&local->raw_sockets.lock); in nfc_llcp_socket_release()
146 struct nfc_llcp_local *nfc_llcp_local_get(struct nfc_llcp_local *local) in nfc_llcp_local_get() argument
148 kref_get(&local->ref); in nfc_llcp_local_get()
150 return local; in nfc_llcp_local_get()
153 static void local_cleanup(struct nfc_llcp_local *local) in local_cleanup() argument
155 nfc_llcp_socket_release(local, false, ENXIO); in local_cleanup()
156 del_timer_sync(&local->link_timer); in local_cleanup()
157 skb_queue_purge(&local->tx_queue); in local_cleanup()
158 cancel_work_sync(&local->tx_work); in local_cleanup()
159 cancel_work_sync(&local->rx_work); in local_cleanup()
160 cancel_work_sync(&local->timeout_work); in local_cleanup()
161 kfree_skb(local->rx_pending); in local_cleanup()
162 del_timer_sync(&local->sdreq_timer); in local_cleanup()
163 cancel_work_sync(&local->sdreq_timeout_work); in local_cleanup()
164 nfc_llcp_free_sdp_tlv_list(&local->pending_sdreqs); in local_cleanup()
169 struct nfc_llcp_local *local; in local_release() local
171 local = container_of(ref, struct nfc_llcp_local, ref); in local_release()
173 list_del(&local->list); in local_release()
174 local_cleanup(local); in local_release()
175 kfree(local); in local_release()
178 int nfc_llcp_local_put(struct nfc_llcp_local *local) in nfc_llcp_local_put() argument
180 if (local == NULL) in nfc_llcp_local_put()
183 return kref_put(&local->ref, local_release); in nfc_llcp_local_put()
186 static struct nfc_llcp_sock *nfc_llcp_sock_get(struct nfc_llcp_local *local, in nfc_llcp_sock_get() argument
197 read_lock(&local->sockets.lock); in nfc_llcp_sock_get()
201 sk_for_each(sk, &local->sockets.head) { in nfc_llcp_sock_get()
210 read_unlock(&local->sockets.lock); in nfc_llcp_sock_get()
227 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_timeout_work() local
230 nfc_dep_link_down(local->dev); in nfc_llcp_timeout_work()
235 struct nfc_llcp_local *local = from_timer(local, t, link_timer); in nfc_llcp_symm_timer() local
239 schedule_work(&local->timeout_work); in nfc_llcp_symm_timer()
248 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_sdreq_timeout_work() local
251 mutex_lock(&local->sdreq_lock); in nfc_llcp_sdreq_timeout_work()
253 time = jiffies - msecs_to_jiffies(3 * local->remote_lto); in nfc_llcp_sdreq_timeout_work()
255 hlist_for_each_entry_safe(sdp, n, &local->pending_sdreqs, node) { in nfc_llcp_sdreq_timeout_work()
266 if (!hlist_empty(&local->pending_sdreqs)) in nfc_llcp_sdreq_timeout_work()
267 mod_timer(&local->sdreq_timer, in nfc_llcp_sdreq_timeout_work()
268 jiffies + msecs_to_jiffies(3 * local->remote_lto)); in nfc_llcp_sdreq_timeout_work()
270 mutex_unlock(&local->sdreq_lock); in nfc_llcp_sdreq_timeout_work()
273 nfc_genl_llc_send_sdres(local->dev, &nl_sdres_list); in nfc_llcp_sdreq_timeout_work()
278 struct nfc_llcp_local *local = from_timer(local, t, sdreq_timer); in nfc_llcp_sdreq_timer() local
280 schedule_work(&local->sdreq_timeout_work); in nfc_llcp_sdreq_timer()
285 struct nfc_llcp_local *local; in nfc_llcp_find_local() local
287 list_for_each_entry(local, &llcp_devices, list) in nfc_llcp_find_local()
288 if (local->dev == dev) in nfc_llcp_find_local()
289 return local; in nfc_llcp_find_local()
327 struct nfc_llcp_sock *nfc_llcp_sock_from_sn(struct nfc_llcp_local *local, in nfc_llcp_sock_from_sn() argument
338 read_lock(&local->sockets.lock); in nfc_llcp_sock_from_sn()
342 sk_for_each(sk, &local->sockets.head) { in nfc_llcp_sock_from_sn()
368 read_unlock(&local->sockets.lock); in nfc_llcp_sock_from_sn()
375 u8 nfc_llcp_get_sdp_ssap(struct nfc_llcp_local *local, in nfc_llcp_get_sdp_ssap() argument
378 mutex_lock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
388 if (local->local_wks & BIT(ssap)) { in nfc_llcp_get_sdp_ssap()
389 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
394 set_bit(ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
395 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
404 if (nfc_llcp_sock_from_sn(local, sock->service_name, in nfc_llcp_get_sdp_ssap()
406 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
411 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
416 if (!test_bit(sock->ssap, &local->local_wks)) { in nfc_llcp_get_sdp_ssap()
417 set_bit(sock->ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
418 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
424 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_sdp_ssap()
429 u8 nfc_llcp_get_local_ssap(struct nfc_llcp_local *local) in nfc_llcp_get_local_ssap() argument
433 mutex_lock(&local->sdp_lock); in nfc_llcp_get_local_ssap()
435 local_ssap = find_first_zero_bit(&local->local_sap, LLCP_LOCAL_NUM_SAP); in nfc_llcp_get_local_ssap()
437 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_local_ssap()
441 set_bit(local_ssap, &local->local_sap); in nfc_llcp_get_local_ssap()
443 mutex_unlock(&local->sdp_lock); in nfc_llcp_get_local_ssap()
448 void nfc_llcp_put_ssap(struct nfc_llcp_local *local, u8 ssap) in nfc_llcp_put_ssap() argument
455 sdp = &local->local_wks; in nfc_llcp_put_ssap()
460 sdp = &local->local_sdp; in nfc_llcp_put_ssap()
461 client_cnt = &local->local_sdp_cnt[local_ssap]; in nfc_llcp_put_ssap()
465 mutex_lock(&local->sdp_lock); in nfc_llcp_put_ssap()
475 l_sock = nfc_llcp_sock_get(local, ssap, LLCP_SAP_SDP); in nfc_llcp_put_ssap()
482 mutex_unlock(&local->sdp_lock); in nfc_llcp_put_ssap()
487 sdp = &local->local_sap; in nfc_llcp_put_ssap()
492 mutex_lock(&local->sdp_lock); in nfc_llcp_put_ssap()
496 mutex_unlock(&local->sdp_lock); in nfc_llcp_put_ssap()
499 static u8 nfc_llcp_reserve_sdp_ssap(struct nfc_llcp_local *local) in nfc_llcp_reserve_sdp_ssap() argument
503 mutex_lock(&local->sdp_lock); in nfc_llcp_reserve_sdp_ssap()
505 ssap = find_first_zero_bit(&local->local_sdp, LLCP_SDP_NUM_SAP); in nfc_llcp_reserve_sdp_ssap()
507 mutex_unlock(&local->sdp_lock); in nfc_llcp_reserve_sdp_ssap()
514 set_bit(ssap, &local->local_sdp); in nfc_llcp_reserve_sdp_ssap()
516 mutex_unlock(&local->sdp_lock); in nfc_llcp_reserve_sdp_ssap()
521 static int nfc_llcp_build_gb(struct nfc_llcp_local *local) in nfc_llcp_build_gb() argument
527 __be16 wks = cpu_to_be16(local->local_wks); in nfc_llcp_build_gb()
540 lto_tlv = nfc_llcp_build_tlv(LLCP_TLV_LTO, &local->lto, 1, &lto_length); in nfc_llcp_build_gb()
547 pr_debug("Local wks 0x%lx\n", local->local_wks); in nfc_llcp_build_gb()
555 miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&local->miux, 0, in nfc_llcp_build_gb()
570 gb_cur = local->gb; in nfc_llcp_build_gb()
587 local->gb_len = gb_len; in nfc_llcp_build_gb()
600 struct nfc_llcp_local *local; in nfc_llcp_general_bytes() local
602 local = nfc_llcp_find_local(dev); in nfc_llcp_general_bytes()
603 if (local == NULL) { in nfc_llcp_general_bytes()
608 nfc_llcp_build_gb(local); in nfc_llcp_general_bytes()
610 *general_bytes_len = local->gb_len; in nfc_llcp_general_bytes()
612 return local->gb; in nfc_llcp_general_bytes()
617 struct nfc_llcp_local *local; in nfc_llcp_set_remote_gb() local
622 local = nfc_llcp_find_local(dev); in nfc_llcp_set_remote_gb()
623 if (local == NULL) { in nfc_llcp_set_remote_gb()
628 memset(local->remote_gb, 0, NFC_MAX_GT_LEN); in nfc_llcp_set_remote_gb()
629 memcpy(local->remote_gb, gb, gb_len); in nfc_llcp_set_remote_gb()
630 local->remote_gb_len = gb_len; in nfc_llcp_set_remote_gb()
632 if (memcmp(local->remote_gb, llcp_magic, 3)) { in nfc_llcp_set_remote_gb()
637 return nfc_llcp_parse_gb_tlv(local, in nfc_llcp_set_remote_gb()
638 &local->remote_gb[3], in nfc_llcp_set_remote_gb()
639 local->remote_gb_len - 3); in nfc_llcp_set_remote_gb()
674 void nfc_llcp_send_to_raw_sock(struct nfc_llcp_local *local, in nfc_llcp_send_to_raw_sock() argument
681 read_lock(&local->raw_sockets.lock); in nfc_llcp_send_to_raw_sock()
683 sk_for_each(sk, &local->raw_sockets.head) { in nfc_llcp_send_to_raw_sock()
696 data[0] = local->dev ? local->dev->idx : 0xFF; in nfc_llcp_send_to_raw_sock()
709 read_unlock(&local->raw_sockets.lock); in nfc_llcp_send_to_raw_sock()
716 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_tx_work() local
722 skb = skb_dequeue(&local->tx_queue); in nfc_llcp_tx_work()
729 nfc_llcp_send_symm(local->dev); in nfc_llcp_tx_work()
731 skb_queue_head(&local->tx_queue, skb); in nfc_llcp_tx_work()
732 nfc_llcp_send_symm(local->dev); in nfc_llcp_tx_work()
744 nfc_llcp_sock_unlink(&local->sockets, sk); in nfc_llcp_tx_work()
754 nfc_llcp_send_to_raw_sock(local, skb, in nfc_llcp_tx_work()
757 ret = nfc_data_exchange(local->dev, local->target_idx, in nfc_llcp_tx_work()
758 skb, nfc_llcp_recv, local); in nfc_llcp_tx_work()
770 nfc_llcp_send_symm(local->dev); in nfc_llcp_tx_work()
774 mod_timer(&local->link_timer, in nfc_llcp_tx_work()
775 jiffies + msecs_to_jiffies(2 * local->remote_lto)); in nfc_llcp_tx_work()
778 static struct nfc_llcp_sock *nfc_llcp_connecting_sock_get(struct nfc_llcp_local *local, in nfc_llcp_connecting_sock_get() argument
784 read_lock(&local->connecting_sockets.lock); in nfc_llcp_connecting_sock_get()
786 sk_for_each(sk, &local->connecting_sockets.head) { in nfc_llcp_connecting_sock_get()
798 read_unlock(&local->connecting_sockets.lock); in nfc_llcp_connecting_sock_get()
803 static struct nfc_llcp_sock *nfc_llcp_sock_get_sn(struct nfc_llcp_local *local, in nfc_llcp_sock_get_sn() argument
808 llcp_sock = nfc_llcp_sock_from_sn(local, sn, sn_len); in nfc_llcp_sock_get_sn()
842 static void nfc_llcp_recv_ui(struct nfc_llcp_local *local, in nfc_llcp_recv_ui() argument
859 llcp_sock = nfc_llcp_sock_get(local, dsap, LLCP_SAP_SDP); in nfc_llcp_recv_ui()
878 static void nfc_llcp_recv_connect(struct nfc_llcp_local *local, in nfc_llcp_recv_connect() argument
891 sock = nfc_llcp_sock_get(local, dsap, LLCP_SAP_SDP); in nfc_llcp_recv_connect()
908 sock = nfc_llcp_sock_get_sn(local, sn, sn_len); in nfc_llcp_recv_connect()
927 u8 ssap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_connect()
950 new_sock->dev = local->dev; in nfc_llcp_recv_connect()
951 new_sock->local = nfc_llcp_local_get(local); in nfc_llcp_recv_connect()
956 new_sock->target_idx = local->target_idx; in nfc_llcp_recv_connect()
965 &local->local_sdp_cnt[sock->ssap - LLCP_WKS_NUM_SAP]; in nfc_llcp_recv_connect()
976 nfc_llcp_sock_link(&local->sockets, new_sk); in nfc_llcp_recv_connect()
980 nfc_get_device(local->dev->idx); in nfc_llcp_recv_connect()
997 nfc_llcp_send_dm(local, dsap, ssap, reason); in nfc_llcp_recv_connect()
1003 struct nfc_llcp_local *local = sock->local; in nfc_llcp_queue_i_frames() local
1021 skb_queue_tail(&local->tx_queue, pdu); in nfc_llcp_queue_i_frames()
1028 static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local, in nfc_llcp_recv_hdlc() argument
1043 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_hdlc()
1045 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_hdlc()
1099 skb_queue_head(&local->tx_queue, s); in nfc_llcp_recv_hdlc()
1115 static void nfc_llcp_recv_disc(struct nfc_llcp_local *local, in nfc_llcp_recv_disc() argument
1127 nfc_dep_link_down(local->dev); in nfc_llcp_recv_disc()
1131 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_disc()
1133 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_disc()
1148 nfc_put_device(local->dev); in nfc_llcp_recv_disc()
1153 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_DISC); in nfc_llcp_recv_disc()
1159 static void nfc_llcp_recv_cc(struct nfc_llcp_local *local, in nfc_llcp_recv_cc() argument
1169 llcp_sock = nfc_llcp_connecting_sock_get(local, dsap); in nfc_llcp_recv_cc()
1172 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_cc()
1180 nfc_llcp_sock_unlink(&local->connecting_sockets, sk); in nfc_llcp_recv_cc()
1181 nfc_llcp_sock_link(&local->sockets, sk); in nfc_llcp_recv_cc()
1193 static void nfc_llcp_recv_dm(struct nfc_llcp_local *local, in nfc_llcp_recv_dm() argument
1209 llcp_sock = nfc_llcp_connecting_sock_get(local, dsap); in nfc_llcp_recv_dm()
1213 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_dm()
1231 static void nfc_llcp_recv_snl(struct nfc_llcp_local *local, in nfc_llcp_recv_snl() argument
1279 llcp_sock = nfc_llcp_sock_from_sn(local, service_name, in nfc_llcp_recv_snl()
1294 sap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_snl()
1304 &local->local_sdp_cnt[sap - in nfc_llcp_recv_snl()
1327 mutex_lock(&local->sdreq_lock); in nfc_llcp_recv_snl()
1331 hlist_for_each_entry(sdp, &local->pending_sdreqs, node) { in nfc_llcp_recv_snl()
1347 mutex_unlock(&local->sdreq_lock); in nfc_llcp_recv_snl()
1361 nfc_genl_llc_send_sdres(local->dev, &nl_sdres_list); in nfc_llcp_recv_snl()
1364 nfc_llcp_send_snl_sdres(local, &llc_sdres_list, sdres_tlvs_len); in nfc_llcp_recv_snl()
1367 static void nfc_llcp_recv_agf(struct nfc_llcp_local *local, struct sk_buff *skb) in nfc_llcp_recv_agf() argument
1403 nfc_llcp_rx_skb(local, new_skb); in nfc_llcp_recv_agf()
1411 static void nfc_llcp_rx_skb(struct nfc_llcp_local *local, struct sk_buff *skb) in nfc_llcp_rx_skb() argument
1432 nfc_llcp_recv_ui(local, skb); in nfc_llcp_rx_skb()
1437 nfc_llcp_recv_connect(local, skb); in nfc_llcp_rx_skb()
1442 nfc_llcp_recv_disc(local, skb); in nfc_llcp_rx_skb()
1447 nfc_llcp_recv_cc(local, skb); in nfc_llcp_rx_skb()
1452 nfc_llcp_recv_dm(local, skb); in nfc_llcp_rx_skb()
1457 nfc_llcp_recv_snl(local, skb); in nfc_llcp_rx_skb()
1464 nfc_llcp_recv_hdlc(local, skb); in nfc_llcp_rx_skb()
1469 nfc_llcp_recv_agf(local, skb); in nfc_llcp_rx_skb()
1476 struct nfc_llcp_local *local = container_of(work, struct nfc_llcp_local, in nfc_llcp_rx_work() local
1480 skb = local->rx_pending; in nfc_llcp_rx_work()
1488 nfc_llcp_send_to_raw_sock(local, skb, NFC_DIRECTION_RX); in nfc_llcp_rx_work()
1490 nfc_llcp_rx_skb(local, skb); in nfc_llcp_rx_work()
1492 schedule_work(&local->tx_work); in nfc_llcp_rx_work()
1493 kfree_skb(local->rx_pending); in nfc_llcp_rx_work()
1494 local->rx_pending = NULL; in nfc_llcp_rx_work()
1497 static void __nfc_llcp_recv(struct nfc_llcp_local *local, struct sk_buff *skb) in __nfc_llcp_recv() argument
1499 local->rx_pending = skb; in __nfc_llcp_recv()
1500 del_timer(&local->link_timer); in __nfc_llcp_recv()
1501 schedule_work(&local->rx_work); in __nfc_llcp_recv()
1506 struct nfc_llcp_local *local = (struct nfc_llcp_local *) data; in nfc_llcp_recv() local
1514 __nfc_llcp_recv(local, skb); in nfc_llcp_recv()
1519 struct nfc_llcp_local *local; in nfc_llcp_data_received() local
1521 local = nfc_llcp_find_local(dev); in nfc_llcp_data_received()
1522 if (local == NULL) { in nfc_llcp_data_received()
1527 __nfc_llcp_recv(local, skb); in nfc_llcp_data_received()
1534 struct nfc_llcp_local *local; in nfc_llcp_mac_is_down() local
1536 local = nfc_llcp_find_local(dev); in nfc_llcp_mac_is_down()
1537 if (local == NULL) in nfc_llcp_mac_is_down()
1540 local->remote_miu = LLCP_DEFAULT_MIU; in nfc_llcp_mac_is_down()
1541 local->remote_lto = LLCP_DEFAULT_LTO; in nfc_llcp_mac_is_down()
1544 nfc_llcp_socket_release(local, true, 0); in nfc_llcp_mac_is_down()
1550 struct nfc_llcp_local *local; in nfc_llcp_mac_is_up() local
1554 local = nfc_llcp_find_local(dev); in nfc_llcp_mac_is_up()
1555 if (local == NULL) in nfc_llcp_mac_is_up()
1558 local->target_idx = target_idx; in nfc_llcp_mac_is_up()
1559 local->comm_mode = comm_mode; in nfc_llcp_mac_is_up()
1560 local->rf_mode = rf_mode; in nfc_llcp_mac_is_up()
1565 schedule_work(&local->tx_work); in nfc_llcp_mac_is_up()
1567 mod_timer(&local->link_timer, in nfc_llcp_mac_is_up()
1568 jiffies + msecs_to_jiffies(local->remote_lto)); in nfc_llcp_mac_is_up()
1574 struct nfc_llcp_local *local; in nfc_llcp_register_device() local
1576 local = kzalloc(sizeof(struct nfc_llcp_local), GFP_KERNEL); in nfc_llcp_register_device()
1577 if (local == NULL) in nfc_llcp_register_device()
1580 local->dev = ndev; in nfc_llcp_register_device()
1581 INIT_LIST_HEAD(&local->list); in nfc_llcp_register_device()
1582 kref_init(&local->ref); in nfc_llcp_register_device()
1583 mutex_init(&local->sdp_lock); in nfc_llcp_register_device()
1584 timer_setup(&local->link_timer, nfc_llcp_symm_timer, 0); in nfc_llcp_register_device()
1586 skb_queue_head_init(&local->tx_queue); in nfc_llcp_register_device()
1587 INIT_WORK(&local->tx_work, nfc_llcp_tx_work); in nfc_llcp_register_device()
1589 local->rx_pending = NULL; in nfc_llcp_register_device()
1590 INIT_WORK(&local->rx_work, nfc_llcp_rx_work); in nfc_llcp_register_device()
1592 INIT_WORK(&local->timeout_work, nfc_llcp_timeout_work); in nfc_llcp_register_device()
1594 rwlock_init(&local->sockets.lock); in nfc_llcp_register_device()
1595 rwlock_init(&local->connecting_sockets.lock); in nfc_llcp_register_device()
1596 rwlock_init(&local->raw_sockets.lock); in nfc_llcp_register_device()
1598 local->lto = 150; /* 1500 ms */ in nfc_llcp_register_device()
1599 local->rw = LLCP_MAX_RW; in nfc_llcp_register_device()
1600 local->miux = cpu_to_be16(LLCP_MAX_MIUX); in nfc_llcp_register_device()
1601 local->local_wks = 0x1; /* LLC Link Management */ in nfc_llcp_register_device()
1603 nfc_llcp_build_gb(local); in nfc_llcp_register_device()
1605 local->remote_miu = LLCP_DEFAULT_MIU; in nfc_llcp_register_device()
1606 local->remote_lto = LLCP_DEFAULT_LTO; in nfc_llcp_register_device()
1608 mutex_init(&local->sdreq_lock); in nfc_llcp_register_device()
1609 INIT_HLIST_HEAD(&local->pending_sdreqs); in nfc_llcp_register_device()
1610 timer_setup(&local->sdreq_timer, nfc_llcp_sdreq_timer, 0); in nfc_llcp_register_device()
1611 INIT_WORK(&local->sdreq_timeout_work, nfc_llcp_sdreq_timeout_work); in nfc_llcp_register_device()
1613 list_add(&local->list, &llcp_devices); in nfc_llcp_register_device()
1620 struct nfc_llcp_local *local = nfc_llcp_find_local(dev); in nfc_llcp_unregister_device() local
1622 if (local == NULL) { in nfc_llcp_unregister_device()
1627 local_cleanup(local); in nfc_llcp_unregister_device()
1629 nfc_llcp_local_put(local); in nfc_llcp_unregister_device()