Lines Matching refs:peer
84 struct lowpan_peer *peer) in peer_add() argument
86 list_add_rcu(&peer->list, &dev->peers); in peer_add()
91 struct lowpan_peer *peer) in peer_del() argument
93 list_del_rcu(&peer->list); in peer_del()
94 kfree_rcu(peer, rcu); in peer_del()
109 struct lowpan_peer *peer; in __peer_lookup_chan() local
111 list_for_each_entry_rcu(peer, &dev->peers, list) { in __peer_lookup_chan()
112 if (peer->chan == chan) in __peer_lookup_chan()
113 return peer; in __peer_lookup_chan()
122 struct lowpan_peer *peer; in __peer_lookup_conn() local
124 list_for_each_entry_rcu(peer, &dev->peers, list) { in __peer_lookup_conn()
125 if (peer->chan->conn == conn) in __peer_lookup_conn()
126 return peer; in __peer_lookup_conn()
139 struct lowpan_peer *peer; in peer_lookup_dst() local
169 list_for_each_entry_rcu(peer, &dev->peers, list) { in peer_lookup_dst()
171 &peer->chan->dst, peer->chan->dst_type, in peer_lookup_dst()
172 &peer->peer_addr); in peer_lookup_dst()
174 if (!ipv6_addr_cmp(&peer->peer_addr, nexthop)) { in peer_lookup_dst()
176 return peer; in peer_lookup_dst()
183 list_for_each_entry_rcu(peer, &dev->peers, list) { in peer_lookup_dst()
184 if (!memcmp(neigh->ha, peer->lladdr, ETH_ALEN)) { in peer_lookup_dst()
187 return peer; in peer_lookup_dst()
201 struct lowpan_peer *peer = NULL; in lookup_peer() local
206 peer = __peer_lookup_conn(entry, conn); in lookup_peer()
207 if (peer) in lookup_peer()
213 return peer; in lookup_peer()
247 struct lowpan_peer *peer) in iphc_decompress() argument
251 saddr = peer->lladdr; in iphc_decompress()
257 struct lowpan_peer *peer) in recv_pkt() argument
310 ret = iphc_decompress(local_skb, dev, peer); in recv_pkt()
347 struct lowpan_peer *peer; in chan_recv_cb() local
350 peer = lookup_peer(chan->conn); in chan_recv_cb()
351 if (!peer) in chan_recv_cb()
358 err = recv_pkt(skb, dev->netdev, peer); in chan_recv_cb()
373 struct lowpan_peer *peer; in setup_header() local
394 peer = peer_lookup_dst(dev, &ipv6_daddr, skb); in setup_header()
395 if (!peer) { in setup_header()
400 daddr = peer->lladdr; in setup_header()
401 *peer_addr = peer->chan->dst; in setup_header()
402 *peer_addr_type = peer->chan->dst_type; in setup_header()
403 lowpan_cb(skb)->chan = peer->chan; in setup_header()
637 struct lowpan_peer *peer; in add_peer_chan() local
639 peer = kzalloc(sizeof(*peer), GFP_ATOMIC); in add_peer_chan()
640 if (!peer) in add_peer_chan()
643 peer->chan = chan; in add_peer_chan()
645 baswap((void *)peer->lladdr, &chan->dst); in add_peer_chan()
647 lowpan_iphc_uncompress_eui48_lladdr(&peer->peer_addr, peer->lladdr); in add_peer_chan()
650 INIT_LIST_HEAD(&peer->list); in add_peer_chan()
651 peer_add(dev, peer); in add_peer_chan()
659 return peer->chan; in add_peer_chan()
767 struct lowpan_peer *peer; in chan_close_cb() local
787 peer = __peer_lookup_chan(dev, chan); in chan_close_cb()
788 if (peer) { in chan_close_cb()
789 last = peer_del(dev, peer); in chan_close_cb()
793 last ? "last " : "1 ", peer); in chan_close_cb()
906 struct lowpan_peer *peer; in bt_6lowpan_disconnect() local
910 peer = lookup_peer(conn); in bt_6lowpan_disconnect()
911 if (!peer) in bt_6lowpan_disconnect()
914 BT_DBG("peer %p chan %p", peer, peer->chan); in bt_6lowpan_disconnect()
916 l2cap_chan_close(peer->chan, ENOENT); in bt_6lowpan_disconnect()
990 struct lowpan_peer *peer, *tmp_peer, *new_peer; in disconnect_all_peers() local
1003 list_for_each_entry_rcu(peer, &entry->peers, list) { in disconnect_all_peers()
1008 new_peer->chan = peer->chan; in disconnect_all_peers()
1018 list_for_each_entry_safe(peer, tmp_peer, &peers, list) { in disconnect_all_peers()
1019 l2cap_chan_close(peer->chan, ENOENT); in disconnect_all_peers()
1021 list_del_rcu(&peer->list); in disconnect_all_peers()
1022 kfree_rcu(peer, rcu); in disconnect_all_peers()
1113 struct lowpan_peer *peer; in lowpan_control_write() local
1118 peer = lookup_peer(conn); in lowpan_control_write()
1119 if (peer) { in lowpan_control_write()
1154 struct lowpan_peer *peer; in lowpan_control_show() local
1159 list_for_each_entry(peer, &entry->peers, list) in lowpan_control_show()
1161 &peer->chan->dst, peer->chan->dst_type); in lowpan_control_show()