Lines Matching refs:ssap

202 					       u8 ssap, u8 dsap)  in nfc_llcp_sock_get()  argument
207 pr_debug("ssap dsap %d %d\n", ssap, dsap); in nfc_llcp_sock_get()
209 if (ssap == 0 && dsap == 0) in nfc_llcp_sock_get()
219 if (tmp_sock->ssap == ssap && tmp_sock->dsap == dsap) { in nfc_llcp_sock_get()
416 int ssap = nfc_llcp_wks_sap(sock->service_name, in nfc_llcp_get_sdp_ssap() local
419 if (ssap > 0) { in nfc_llcp_get_sdp_ssap()
420 pr_debug("WKS %d\n", ssap); in nfc_llcp_get_sdp_ssap()
423 if (test_bit(ssap, &local->local_wks)) { in nfc_llcp_get_sdp_ssap()
429 set_bit(ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
432 return ssap; in nfc_llcp_get_sdp_ssap()
451 } else if (sock->ssap != 0 && sock->ssap < LLCP_WKS_NUM_SAP) { in nfc_llcp_get_sdp_ssap()
452 if (!test_bit(sock->ssap, &local->local_wks)) { in nfc_llcp_get_sdp_ssap()
453 set_bit(sock->ssap, &local->local_wks); in nfc_llcp_get_sdp_ssap()
456 return sock->ssap; in nfc_llcp_get_sdp_ssap()
484 void nfc_llcp_put_ssap(struct nfc_llcp_local *local, u8 ssap) in nfc_llcp_put_ssap() argument
489 if (ssap < LLCP_WKS_NUM_SAP) { in nfc_llcp_put_ssap()
490 local_ssap = ssap; in nfc_llcp_put_ssap()
492 } else if (ssap < LLCP_LOCAL_NUM_SAP) { in nfc_llcp_put_ssap()
495 local_ssap = ssap - LLCP_WKS_NUM_SAP; in nfc_llcp_put_ssap()
506 pr_debug("No more clients for SAP %d\n", ssap); in nfc_llcp_put_ssap()
511 l_sock = nfc_llcp_sock_get(local, ssap, LLCP_SAP_SDP); in nfc_llcp_put_ssap()
513 l_sock->ssap = LLCP_SDP_UNBOUND; in nfc_llcp_put_ssap()
521 } else if (ssap < LLCP_MAX_SAP) { in nfc_llcp_put_ssap()
522 local_ssap = ssap - LLCP_LOCAL_NUM_SAP; in nfc_llcp_put_ssap()
537 u8 ssap; in nfc_llcp_reserve_sdp_ssap() local
541 ssap = find_first_zero_bit(&local->local_sdp, LLCP_SDP_NUM_SAP); in nfc_llcp_reserve_sdp_ssap()
542 if (ssap == LLCP_SDP_NUM_SAP) { in nfc_llcp_reserve_sdp_ssap()
548 pr_debug("SDP ssap %d\n", LLCP_WKS_NUM_SAP + ssap); in nfc_llcp_reserve_sdp_ssap()
550 set_bit(ssap, &local->local_sdp); in nfc_llcp_reserve_sdp_ssap()
554 return LLCP_WKS_NUM_SAP + ssap; in nfc_llcp_reserve_sdp_ssap()
815 u8 ssap) in nfc_llcp_connecting_sock_get() argument
825 if (llcp_sock->ssap == ssap) { in nfc_llcp_connecting_sock_get()
874 u8 dsap, ssap; in nfc_llcp_recv_ui() local
877 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_ui()
881 ui_cb->ssap = ssap; in nfc_llcp_recv_ui()
883 pr_debug("%d %d\n", dsap, ssap); in nfc_llcp_recv_ui()
910 u8 dsap, ssap, reason; in nfc_llcp_recv_connect() local
913 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_connect()
915 pr_debug("%d %d\n", dsap, ssap); in nfc_llcp_recv_connect()
953 if (sock->ssap == LLCP_SDP_UNBOUND) { in nfc_llcp_recv_connect()
954 u8 ssap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_connect() local
956 pr_debug("First client, reserving %d\n", ssap); in nfc_llcp_recv_connect()
958 if (ssap == LLCP_SAP_MAX) { in nfc_llcp_recv_connect()
965 sock->ssap = ssap; in nfc_llcp_recv_connect()
991 new_sock->dsap = ssap; in nfc_llcp_recv_connect()
994 new_sock->ssap = sock->ssap; in nfc_llcp_recv_connect()
995 if (sock->ssap < LLCP_LOCAL_NUM_SAP && sock->ssap >= LLCP_WKS_NUM_SAP) { in nfc_llcp_recv_connect()
998 pr_debug("reserved_ssap %d for %p\n", sock->ssap, new_sock); in nfc_llcp_recv_connect()
1001 &local->local_sdp_cnt[sock->ssap - LLCP_WKS_NUM_SAP]; in nfc_llcp_recv_connect()
1004 new_sock->reserved_ssap = sock->ssap; in nfc_llcp_recv_connect()
1033 nfc_llcp_send_dm(local, dsap, ssap, reason); in nfc_llcp_recv_connect()
1069 u8 dsap, ssap, ptype, ns, nr; in nfc_llcp_recv_hdlc() local
1073 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_hdlc()
1077 pr_debug("%d %d R %d S %d\n", dsap, ssap, nr, ns); in nfc_llcp_recv_hdlc()
1079 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_hdlc()
1081 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_hdlc()
1156 u8 dsap, ssap; in nfc_llcp_recv_disc() local
1159 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_disc()
1161 if ((dsap == 0) && (ssap == 0)) { in nfc_llcp_recv_disc()
1167 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_disc()
1169 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_disc()
1189 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_DISC); in nfc_llcp_recv_disc()
1200 u8 dsap, ssap; in nfc_llcp_recv_cc() local
1203 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_cc()
1208 nfc_llcp_send_dm(local, dsap, ssap, LLCP_DM_NOCONN); in nfc_llcp_recv_cc()
1218 llcp_sock->dsap = ssap; in nfc_llcp_recv_cc()
1234 u8 dsap, ssap, reason; in nfc_llcp_recv_dm() local
1237 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_dm()
1240 pr_debug("%d %d reason %d\n", ssap, dsap, reason); in nfc_llcp_recv_dm()
1249 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); in nfc_llcp_recv_dm()
1271 u8 dsap, ssap, type, length, tid, sap; in nfc_llcp_recv_snl() local
1282 ssap = nfc_llcp_ssap(skb); in nfc_llcp_recv_snl()
1284 pr_debug("%d %d\n", dsap, ssap); in nfc_llcp_recv_snl()
1286 if (dsap != LLCP_SAP_SDP || ssap != LLCP_SAP_SDP) { in nfc_llcp_recv_snl()
1328 if (llcp_sock->ssap == LLCP_SDP_UNBOUND) { in nfc_llcp_recv_snl()
1347 llcp_sock->ssap = sap; in nfc_llcp_recv_snl()
1350 sap = llcp_sock->ssap; in nfc_llcp_recv_snl()
1452 u8 dsap, ssap, ptype; in nfc_llcp_rx_skb() local
1456 ssap = nfc_llcp_ssap(skb); in nfc_llcp_rx_skb()
1458 pr_debug("ptype 0x%x dsap 0x%x ssap 0x%x\n", ptype, dsap, ssap); in nfc_llcp_rx_skb()