Lines Matching refs:la

86 	struct sockaddr_l2 la;  in l2cap_sock_bind()  local
95 memset(&la, 0, sizeof(la)); in l2cap_sock_bind()
96 len = min_t(unsigned int, sizeof(la), alen); in l2cap_sock_bind()
97 memcpy(&la, addr, len); in l2cap_sock_bind()
99 if (la.l2_cid && la.l2_psm) in l2cap_sock_bind()
102 if (!bdaddr_type_is_valid(la.l2_bdaddr_type)) in l2cap_sock_bind()
105 if (bdaddr_type_is_le(la.l2_bdaddr_type)) { in l2cap_sock_bind()
107 if (la.l2_cid && in l2cap_sock_bind()
108 la.l2_cid != cpu_to_le16(L2CAP_CID_ATT)) in l2cap_sock_bind()
119 if (la.l2_psm) { in l2cap_sock_bind()
120 __u16 psm = __le16_to_cpu(la.l2_psm); in l2cap_sock_bind()
122 if (la.l2_bdaddr_type == BDADDR_BREDR) in l2cap_sock_bind()
131 bacpy(&chan->src, &la.l2_bdaddr); in l2cap_sock_bind()
132 chan->src_type = la.l2_bdaddr_type; in l2cap_sock_bind()
134 if (la.l2_cid) in l2cap_sock_bind()
135 err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid)); in l2cap_sock_bind()
137 err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm); in l2cap_sock_bind()
144 if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_3DSP) in l2cap_sock_bind()
148 if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_SDP || in l2cap_sock_bind()
149 __le16_to_cpu(la.l2_psm) == L2CAP_PSM_RFCOMM) in l2cap_sock_bind()
200 struct sockaddr_l2 la; in l2cap_sock_connect() local
217 memset(&la, 0, sizeof(la)); in l2cap_sock_connect()
218 len = min_t(unsigned int, sizeof(la), alen); in l2cap_sock_connect()
219 memcpy(&la, addr, len); in l2cap_sock_connect()
221 if (la.l2_cid && la.l2_psm) in l2cap_sock_connect()
224 if (!bdaddr_type_is_valid(la.l2_bdaddr_type)) in l2cap_sock_connect()
233 bdaddr_type_is_le(la.l2_bdaddr_type)) { in l2cap_sock_connect()
241 la.l2_cid != cpu_to_le16(L2CAP_CID_ATT)) in l2cap_sock_connect()
253 if (chan->src_type != BDADDR_BREDR && la.l2_bdaddr_type == BDADDR_BREDR) in l2cap_sock_connect()
256 if (bdaddr_type_is_le(la.l2_bdaddr_type)) { in l2cap_sock_connect()
258 if (la.l2_cid && in l2cap_sock_connect()
259 la.l2_cid != cpu_to_le16(L2CAP_CID_ATT)) in l2cap_sock_connect()
272 err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid), in l2cap_sock_connect()
273 &la.l2_bdaddr, la.l2_bdaddr_type); in l2cap_sock_connect()
405 struct sockaddr_l2 *la = (struct sockaddr_l2 *) addr; in l2cap_sock_getname() local
416 memset(la, 0, sizeof(struct sockaddr_l2)); in l2cap_sock_getname()
419 la->l2_psm = chan->psm; in l2cap_sock_getname()
422 bacpy(&la->l2_bdaddr, &chan->dst); in l2cap_sock_getname()
423 la->l2_cid = cpu_to_le16(chan->dcid); in l2cap_sock_getname()
424 la->l2_bdaddr_type = chan->dst_type; in l2cap_sock_getname()
426 bacpy(&la->l2_bdaddr, &chan->src); in l2cap_sock_getname()
427 la->l2_cid = cpu_to_le16(chan->scid); in l2cap_sock_getname()
428 la->l2_bdaddr_type = chan->src_type; in l2cap_sock_getname()
1771 DECLARE_SOCKADDR(struct sockaddr_l2 *, la, msg_name); in l2cap_skb_msg_name()
1773 memset(la, 0, sizeof(struct sockaddr_l2)); in l2cap_skb_msg_name()
1774 la->l2_family = AF_BLUETOOTH; in l2cap_skb_msg_name()
1775 la->l2_psm = bt_cb(skb)->l2cap.psm; in l2cap_skb_msg_name()
1776 bacpy(&la->l2_bdaddr, &bt_cb(skb)->l2cap.bdaddr); in l2cap_skb_msg_name()