Lines Matching full:peer

60 	/* peer addresses in various formats */
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()
99 BT_DBG("last peer"); in peer_del()
109 struct lowpan_peer *peer; in peer_lookup_ba() local
116 list_for_each_entry_rcu(peer, &dev->peers, list) { in peer_lookup_ba()
118 &peer->chan->dst, peer->chan->dst_type); in peer_lookup_ba()
120 if (bacmp(&peer->chan->dst, ba)) in peer_lookup_ba()
123 if (type == peer->chan->dst_type) { in peer_lookup_ba()
125 return peer; in peer_lookup_ba()
137 struct lowpan_peer *peer; in __peer_lookup_chan() local
139 list_for_each_entry_rcu(peer, &dev->peers, list) { in __peer_lookup_chan()
140 if (peer->chan == chan) in __peer_lookup_chan()
141 return peer; in __peer_lookup_chan()
150 struct lowpan_peer *peer; in __peer_lookup_conn() local
152 list_for_each_entry_rcu(peer, &dev->peers, list) { in __peer_lookup_conn()
153 if (peer->chan->conn == conn) in __peer_lookup_conn()
154 return peer; in __peer_lookup_conn()
167 struct lowpan_peer *peer; in peer_lookup_dst() local
175 * probably the destination is a direct peer. in peer_lookup_dst()
197 list_for_each_entry_rcu(peer, &dev->peers, list) { in peer_lookup_dst()
199 &peer->chan->dst, peer->chan->dst_type, in peer_lookup_dst()
200 &peer->peer_addr); in peer_lookup_dst()
202 if (!ipv6_addr_cmp(&peer->peer_addr, nexthop)) { in peer_lookup_dst()
204 return peer; in peer_lookup_dst()
212 list_for_each_entry_rcu(peer, &dev->peers, list) { in peer_lookup_dst()
213 if (!memcmp(neigh->ha, peer->lladdr, ETH_ALEN)) { in peer_lookup_dst()
216 return peer; in peer_lookup_dst()
230 struct lowpan_peer *peer = NULL; in lookup_peer() local
235 peer = __peer_lookup_conn(entry, conn); in lookup_peer()
236 if (peer) in lookup_peer()
242 return peer; in lookup_peer()
276 struct lowpan_peer *peer) in iphc_decompress() argument
280 saddr = peer->lladdr; in iphc_decompress()
286 struct lowpan_peer *peer) in recv_pkt() argument
339 ret = iphc_decompress(local_skb, dev, peer); in recv_pkt()
376 struct lowpan_peer *peer; in chan_recv_cb() local
379 peer = lookup_peer(chan->conn); in chan_recv_cb()
380 if (!peer) in chan_recv_cb()
387 err = recv_pkt(skb, dev->netdev, peer); in chan_recv_cb()
402 struct lowpan_peer *peer; in setup_header() local
420 * or user set route) so get peer according to in setup_header()
423 peer = peer_lookup_dst(dev, &ipv6_daddr, skb); in setup_header()
424 if (!peer) { in setup_header()
425 BT_DBG("no such peer"); in setup_header()
429 daddr = peer->lladdr; in setup_header()
430 *peer_addr = peer->chan->dst; in setup_header()
431 *peer_addr_type = peer->chan->dst_type; in setup_header()
432 lowpan_cb(skb)->chan = peer->chan; in setup_header()
666 struct lowpan_peer *peer; in add_peer_chan() local
668 peer = kzalloc(sizeof(*peer), GFP_ATOMIC); in add_peer_chan()
669 if (!peer) in add_peer_chan()
672 peer->chan = chan; in add_peer_chan()
673 memset(&peer->peer_addr, 0, sizeof(struct in6_addr)); in add_peer_chan()
675 baswap((void *)peer->lladdr, &chan->dst); in add_peer_chan()
677 lowpan_iphc_uncompress_eui48_lladdr(&peer->peer_addr, peer->lladdr); in add_peer_chan()
680 INIT_LIST_HEAD(&peer->list); in add_peer_chan()
681 peer_add(dev, peer); in add_peer_chan()
689 return peer->chan; in add_peer_chan()
730 BT_DBG("ifindex %d peer bdaddr %pMR type %d my addr %pMR type %d", in setup_netdev()
795 struct lowpan_peer *peer; in chan_close_cb() local
815 peer = __peer_lookup_chan(dev, chan); in chan_close_cb()
816 if (peer) { in chan_close_cb()
817 last = peer_del(dev, peer); in chan_close_cb()
821 last ? "last " : "1 ", peer); in chan_close_cb()
944 struct lowpan_peer *peer; in bt_6lowpan_disconnect() local
948 peer = lookup_peer(conn); in bt_6lowpan_disconnect()
949 if (!peer) in bt_6lowpan_disconnect()
952 BT_DBG("peer %p chan %p", peer, peer->chan); in bt_6lowpan_disconnect()
954 l2cap_chan_close(peer->chan, ENOENT); in bt_6lowpan_disconnect()
1027 struct lowpan_peer *peer, *tmp_peer, *new_peer; in disconnect_all_peers() local
1040 list_for_each_entry_rcu(peer, &entry->peers, list) { in disconnect_all_peers()
1045 new_peer->chan = peer->chan; in disconnect_all_peers()
1055 list_for_each_entry_safe(peer, tmp_peer, &peers, list) { in disconnect_all_peers()
1056 l2cap_chan_close(peer->chan, ENOENT); in disconnect_all_peers()
1058 list_del_rcu(&peer->list); in disconnect_all_peers()
1059 kfree_rcu(peer, rcu); in disconnect_all_peers()
1150 struct lowpan_peer *peer; in lowpan_control_write() local
1155 peer = lookup_peer(conn); in lowpan_control_write()
1156 if (peer) { in lowpan_control_write()
1191 struct lowpan_peer *peer; in lowpan_control_show() local
1196 list_for_each_entry(peer, &entry->peers, list) in lowpan_control_show()
1198 &peer->chan->dst, peer->chan->dst_type); in lowpan_control_show()