• Home
  • Raw
  • Download

Lines Matching refs:psm

62 uint16_t L2CA_Register2(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,  in L2CA_Register2()  argument
66 auto ret = L2CA_Register(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, in L2CA_Register2()
68 BTM_SetSecurityLevel(false, "", 0, sec_level, psm, 0, 0); in L2CA_Register2()
109 uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_Register() argument
114 return bluetooth::shim::L2CA_Register(psm, p_cb_info, enable_snoop, in L2CA_Register()
125 uint16_t vpsm = psm; in L2CA_Register()
136 psm, config_cfm_cb, config_ind_cb, data_ind_cb, disconnect_ind_cb); in L2CA_Register()
141 if (L2C_INVALID_PSM(psm)) { in L2CA_Register()
142 LOG_ERROR("L2CAP - invalid PSM value, PSM: 0x%04x", psm); in L2CA_Register()
148 if ((psm >= 0x1001) && (p_cb_info.pL2CA_ConnectInd_Cb == NULL)) { in L2CA_Register()
154 LOG_DEBUG("L2CAP - Real PSM: 0x%04x Virtual PSM: 0x%04x", psm, vpsm); in L2CA_Register()
162 LOG_WARN("L2CAP - no RCB available, PSM: 0x%04x vPSM: 0x%04x", psm, in L2CA_Register()
168 LOG_INFO("L2CAP Registered service classic PSM: 0x%04x", psm); in L2CA_Register()
171 p_rcb->real_psm = psm; in L2CA_Register()
192 void L2CA_Deregister(uint16_t psm) { in L2CA_Deregister() argument
194 return bluetooth::shim::L2CA_Deregister(psm); in L2CA_Deregister()
202 L2CAP_TRACE_API("L2CAP - L2CA_Deregister() called for PSM: 0x%04x", psm); in L2CA_Deregister()
204 p_rcb = l2cu_find_rcb_by_psm(psm); in L2CA_Deregister()
228 psm); in L2CA_Deregister()
247 uint16_t psm = l2cb.le_dyn_psm; in L2CA_AllocateLePSM() local
250 L2CAP_TRACE_API("%s: last psm=%d", __func__, psm); in L2CA_AllocateLePSM()
258 psm++; in L2CA_AllocateLePSM()
259 if (psm > LE_DYNAMIC_PSM_END) { in L2CA_AllocateLePSM()
260 psm = LE_DYNAMIC_PSM_START; in L2CA_AllocateLePSM()
263 if (!l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START]) { in L2CA_AllocateLePSM()
265 if (l2cu_find_ble_rcb_by_psm(psm)) { in L2CA_AllocateLePSM()
267 __func__, psm); in L2CA_AllocateLePSM()
271 l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START] = true; in L2CA_AllocateLePSM()
272 L2CAP_TRACE_DEBUG("%s: assigned PSM=%d", __func__, psm); in L2CA_AllocateLePSM()
277 l2cb.le_dyn_psm = psm; in L2CA_AllocateLePSM()
279 return (psm); in L2CA_AllocateLePSM()
291 void L2CA_FreeLePSM(uint16_t psm) { in L2CA_FreeLePSM() argument
293 return bluetooth::shim::L2CA_FreeLePSM(psm); in L2CA_FreeLePSM()
296 L2CAP_TRACE_API("%s: to free psm=%d", __func__, psm); in L2CA_FreeLePSM()
298 if ((psm < LE_DYNAMIC_PSM_START) || (psm > LE_DYNAMIC_PSM_END)) { in L2CA_FreeLePSM()
299 L2CAP_TRACE_ERROR("%s: Invalid PSM=%d value!", __func__, psm); in L2CA_FreeLePSM()
303 if (!l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START]) { in L2CA_FreeLePSM()
304 L2CAP_TRACE_WARNING("%s: PSM=%d was not allocated!", __func__, psm); in L2CA_FreeLePSM()
306 l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START] = false; in L2CA_FreeLePSM()
309 uint16_t L2CA_ConnectReq2(uint16_t psm, const RawAddress& p_bd_addr, in L2CA_ConnectReq2() argument
311 BTM_SetSecurityLevel(true, "", 0, sec_level, psm, 0, 0); in L2CA_ConnectReq2()
312 return L2CA_ConnectReq(psm, p_bd_addr); in L2CA_ConnectReq2()
328 uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr) { in L2CA_ConnectReq() argument
330 return bluetooth::shim::L2CA_ConnectReq(psm, p_bd_addr); in L2CA_ConnectReq()
334 << StringPrintf(" PSM: 0x%04x", psm); in L2CA_ConnectReq()
342 tL2C_RCB* p_rcb = l2cu_find_rcb_by_psm(psm); in L2CA_ConnectReq()
344 LOG(WARNING) << __func__ << ": no RCB, PSM=" << loghex(psm); in L2CA_ConnectReq()
357 << ": connection not started for PSM=" << loghex(psm) in L2CA_ConnectReq()
367 LOG(WARNING) << __func__ << ": no CCB, PSM=" << loghex(psm); in L2CA_ConnectReq()
393 psm, p_ccb->local_cid); in L2CA_ConnectReq()
413 uint16_t L2CA_RegisterLECoc(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_RegisterLECoc() argument
416 return bluetooth::shim::L2CA_RegisterLECoc(psm, p_cb_info, sec_level, cfg); in L2CA_RegisterLECoc()
419 if (p_cb_info.pL2CA_ConnectInd_Cb != nullptr || psm < LE_DYNAMIC_PSM_START) { in L2CA_RegisterLECoc()
422 BTM_SetSecurityLevel(false, "", 0, sec_level, psm, 0, 0); in L2CA_RegisterLECoc()
431 LOG_ERROR("No cb registering BLE PSM: 0x%04x", psm); in L2CA_RegisterLECoc()
436 if (!L2C_IS_VALID_LE_PSM(psm)) { in L2CA_RegisterLECoc()
437 LOG_ERROR("Invalid BLE PSM value, PSM: 0x%04x", psm); in L2CA_RegisterLECoc()
442 uint16_t vpsm = psm; in L2CA_RegisterLECoc()
446 if ((psm >= LE_DYNAMIC_PSM_START) && in L2CA_RegisterLECoc()
454 LOG_DEBUG("Real PSM: 0x%04x Virtual PSM: 0x%04x", psm, vpsm); in L2CA_RegisterLECoc()
463 LOG_WARN("No BLE RCB available, PSM: 0x%04x vPSM: 0x%04x", psm, vpsm); in L2CA_RegisterLECoc()
468 LOG_INFO("Registered service LE COC PSM: 0x%04x", psm); in L2CA_RegisterLECoc()
470 p_rcb->real_psm = psm; in L2CA_RegisterLECoc()
486 void L2CA_DeregisterLECoc(uint16_t psm) { in L2CA_DeregisterLECoc() argument
488 return bluetooth::shim::L2CA_DeregisterLECoc(psm); in L2CA_DeregisterLECoc()
491 L2CAP_TRACE_API("%s called for PSM: 0x%04x", __func__, psm); in L2CA_DeregisterLECoc()
493 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_DeregisterLECoc()
496 psm); in L2CA_DeregisterLECoc()
535 uint16_t L2CA_ConnectLECocReq(uint16_t psm, const RawAddress& p_bd_addr, in L2CA_ConnectLECocReq() argument
538 return bluetooth::shim::L2CA_ConnectLECocReq(psm, p_bd_addr, p_cfg); in L2CA_ConnectLECocReq()
541 BTM_SetSecurityLevel(true, "", 0, sec_level, psm, 0, 0); in L2CA_ConnectLECocReq()
544 << StringPrintf(" PSM: 0x%04x", psm); in L2CA_ConnectLECocReq()
553 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_ConnectLECocReq()
555 L2CAP_TRACE_WARNING("%s No BLE RCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectLECocReq()
568 __func__, psm, p_lcb); in L2CA_ConnectLECocReq()
576 L2CAP_TRACE_WARNING("%s no CCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectLECocReq()
621 L2CAP_TRACE_API("%s(psm: 0x%04x) returned CID: 0x%04x", __func__, psm, in L2CA_ConnectLECocReq()
776 std::vector<uint16_t> L2CA_ConnectCreditBasedReq(uint16_t psm, in L2CA_ConnectCreditBasedReq() argument
780 return bluetooth::shim::L2CA_ConnectCreditBasedReq(psm, p_bd_addr, p_cfg); in L2CA_ConnectCreditBasedReq()
784 << StringPrintf(" PSM: 0x%04x", psm); in L2CA_ConnectCreditBasedReq()
800 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_ConnectCreditBasedReq()
802 L2CAP_TRACE_WARNING("%s No BLE RCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectCreditBasedReq()
823 LOG_WARN("There is ongoing connection request, PSM: 0x%04x", psm); in L2CA_ConnectCreditBasedReq()
840 L2CAP_TRACE_WARNING("%s no CCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectCreditBasedReq()
872 L2CAP_TRACE_API("%s(psm: 0x%04x) returned CID: 0x%04x", __func__, psm, in L2CA_ConnectCreditBasedReq()