Lines Matching refs:ssap

183 		int ssap = nfc_llcp_wks_sap(sock->service_name,  in nfc_llcp_get_sdp_ssap()  local
186 if (ssap > 0) { in nfc_llcp_get_sdp_ssap()
187 pr_debug("WKS %d\n", ssap); in nfc_llcp_get_sdp_ssap()
190 if (local->local_wks & BIT(ssap)) { in nfc_llcp_get_sdp_ssap()
196 set_bit(ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
199 return ssap; in nfc_llcp_get_sdp_ssap()
206 ssap = find_first_zero_bit(&local->local_sdp, LLCP_SDP_NUM_SAP); in nfc_llcp_get_sdp_ssap()
207 if (ssap == LLCP_SDP_NUM_SAP) { in nfc_llcp_get_sdp_ssap()
213 pr_debug("SDP ssap %d\n", LLCP_WKS_NUM_SAP + ssap); in nfc_llcp_get_sdp_ssap()
215 set_bit(ssap, &local->local_sdp); in nfc_llcp_get_sdp_ssap()
218 return LLCP_WKS_NUM_SAP + ssap; in nfc_llcp_get_sdp_ssap()
220 } else if (sock->ssap != 0) { in nfc_llcp_get_sdp_ssap()
221 if (sock->ssap < LLCP_WKS_NUM_SAP) { in nfc_llcp_get_sdp_ssap()
222 if (!test_bit(sock->ssap, &local->local_wks)) { in nfc_llcp_get_sdp_ssap()
223 set_bit(sock->ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
226 return sock->ssap; in nfc_llcp_get_sdp_ssap()
229 } else if (sock->ssap < LLCP_SDP_NUM_SAP) { in nfc_llcp_get_sdp_ssap()
230 if (!test_bit(sock->ssap - LLCP_WKS_NUM_SAP, in nfc_llcp_get_sdp_ssap()
232 set_bit(sock->ssap - LLCP_WKS_NUM_SAP, in nfc_llcp_get_sdp_ssap()
236 return sock->ssap; in nfc_llcp_get_sdp_ssap()
265 void nfc_llcp_put_ssap(struct nfc_llcp_local *local, u8 ssap) in nfc_llcp_put_ssap() argument
270 if (ssap < LLCP_WKS_NUM_SAP) { in nfc_llcp_put_ssap()
271 local_ssap = ssap; in nfc_llcp_put_ssap()
273 } else if (ssap < LLCP_LOCAL_NUM_SAP) { in nfc_llcp_put_ssap()
274 local_ssap = ssap - LLCP_WKS_NUM_SAP; in nfc_llcp_put_ssap()
276 } else if (ssap < LLCP_MAX_SAP) { in nfc_llcp_put_ssap()
277 local_ssap = ssap - LLCP_LOCAL_NUM_SAP; in nfc_llcp_put_ssap()
434 u8 ssap, u8 dsap) in nfc_llcp_sock_get() argument
438 if (ssap == 0 && dsap == 0) in nfc_llcp_sock_get()
442 sock = local->sockets[ssap]; in nfc_llcp_sock_get()
466 pr_err("Could not find socket for %d %d\n", ssap, dsap); in nfc_llcp_sock_get()
506 u8 dsap, ssap, bound_sap, reason; in nfc_llcp_recv_connect() local
509 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_connect()
511 pr_debug("%d %d\n", dsap, ssap); in nfc_llcp_recv_connect()
602 new_sock->ssap = bound_sap; in nfc_llcp_recv_connect()
603 new_sock->dsap = ssap; in nfc_llcp_recv_connect()
629 nfc_llcp_send_dm(local, dsap, ssap, reason); in nfc_llcp_recv_connect()
671 u8 dsap, ssap, ptype, ns, nr; in nfc_llcp_recv_hdlc() local
675 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_hdlc()
679 pr_debug("%d %d R %d S %d\n", dsap, ssap, nr, ns); in nfc_llcp_recv_hdlc()
681 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_hdlc()
683 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_hdlc()
740 u8 dsap, ssap; in nfc_llcp_recv_disc() local
743 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_disc()
745 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_disc()
747 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_disc()
764 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_DISC); in nfc_llcp_recv_disc()
773 u8 dsap, ssap; in nfc_llcp_recv_cc() local
776 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_cc()
778 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_cc()
785 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_cc()
790 llcp_sock->dsap = ssap; in nfc_llcp_recv_cc()
802 u8 dsap, ssap, ptype; in nfc_llcp_rx_work() local
813 ssap = nfc_llcp_ssap(skb); in nfc_llcp_rx_work()
815 pr_debug("ptype 0x%x dsap 0x%x ssap 0x%x\n", ptype, dsap, ssap); in nfc_llcp_rx_work()