Lines Matching refs:peer
133 struct nfcsim *peer = dev->peer_dev; in nfcsim_dep_link_up() local
139 mutex_lock(&peer->lock); in nfcsim_dep_link_up()
141 nfc_tm_activated(peer->nfc_dev, NFC_PROTO_NFC_DEP_MASK, in nfcsim_dep_link_up()
144 remote_gb = nfc_get_local_general_bytes(peer->nfc_dev, &remote_gb_len); in nfcsim_dep_link_up()
146 DEV_ERR(peer, "Can't get remote general bytes\n"); in nfcsim_dep_link_up()
148 mutex_unlock(&peer->lock); in nfcsim_dep_link_up()
152 mutex_unlock(&peer->lock); in nfcsim_dep_link_up()
292 struct nfcsim *peer = dev->peer_dev; in nfcsim_tx() local
308 mutex_lock(&peer->lock); in nfcsim_tx()
310 peer->clone_skb = skb_clone(skb, GFP_KERNEL); in nfcsim_tx()
312 if (!peer->clone_skb) { in nfcsim_tx()
314 mutex_unlock(&peer->lock); in nfcsim_tx()
326 queue_delayed_work(wq, &peer->recv_work, msecs_to_jiffies(5)); in nfcsim_tx()
328 mutex_unlock(&peer->lock); in nfcsim_tx()
389 struct nfcsim *peer = dev->peer_dev; in nfcsim_wq_poll() local
395 mutex_lock(&peer->lock); in nfcsim_wq_poll()
411 if (peer->curr_polling_mode == NFCSIM_POLL_TARGET) { in nfcsim_wq_poll()
412 peer->polling_mode = NFCSIM_POLL_NONE; in nfcsim_wq_poll()
434 mutex_unlock(&peer->lock); in nfcsim_wq_poll()