• Home
  • Raw
  • Download

Lines Matching refs:psm

51 uint16_t L2CA_Register2(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,  in L2CA_Register2()  argument
55 auto ret = L2CA_Register(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, in L2CA_Register2()
57 BTM_SetSecurityLevel(false, "", 0, sec_level, psm, 0, 0); in L2CA_Register2()
75 uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_Register() argument
80 return bluetooth::shim::L2CA_Register(psm, p_cb_info, enable_snoop, in L2CA_Register()
91 uint16_t vpsm = psm; in L2CA_Register()
102 psm, config_cfm_cb, config_ind_cb, data_ind_cb, disconnect_ind_cb); in L2CA_Register()
107 if (L2C_INVALID_PSM(psm)) { in L2CA_Register()
108 LOG_ERROR("L2CAP - invalid PSM value, PSM: 0x%04x", psm); in L2CA_Register()
114 if ((psm >= 0x1001) && (p_cb_info.pL2CA_ConnectInd_Cb == NULL)) { in L2CA_Register()
120 LOG_DEBUG("L2CAP - Real PSM: 0x%04x Virtual PSM: 0x%04x", psm, vpsm); in L2CA_Register()
128 LOG_WARN("L2CAP - no RCB available, PSM: 0x%04x vPSM: 0x%04x", psm, in L2CA_Register()
134 LOG_INFO("L2CAP Registered service classic PSM: 0x%04x", psm); in L2CA_Register()
137 p_rcb->real_psm = psm; in L2CA_Register()
158 void L2CA_Deregister(uint16_t psm) { in L2CA_Deregister() argument
160 return bluetooth::shim::L2CA_Deregister(psm); in L2CA_Deregister()
168 L2CAP_TRACE_API("L2CAP - L2CA_Deregister() called for PSM: 0x%04x", psm); in L2CA_Deregister()
170 p_rcb = l2cu_find_rcb_by_psm(psm); in L2CA_Deregister()
194 psm); in L2CA_Deregister()
213 uint16_t psm = l2cb.le_dyn_psm; in L2CA_AllocateLePSM() local
216 L2CAP_TRACE_API("%s: last psm=%d", __func__, psm); in L2CA_AllocateLePSM()
224 psm++; in L2CA_AllocateLePSM()
225 if (psm > LE_DYNAMIC_PSM_END) { in L2CA_AllocateLePSM()
226 psm = LE_DYNAMIC_PSM_START; in L2CA_AllocateLePSM()
229 if (!l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START]) { in L2CA_AllocateLePSM()
231 if (l2cu_find_ble_rcb_by_psm(psm)) { in L2CA_AllocateLePSM()
233 __func__, psm); in L2CA_AllocateLePSM()
237 l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START] = true; in L2CA_AllocateLePSM()
238 L2CAP_TRACE_DEBUG("%s: assigned PSM=%d", __func__, psm); in L2CA_AllocateLePSM()
243 l2cb.le_dyn_psm = psm; in L2CA_AllocateLePSM()
245 return (psm); in L2CA_AllocateLePSM()
257 void L2CA_FreeLePSM(uint16_t psm) { in L2CA_FreeLePSM() argument
259 return bluetooth::shim::L2CA_FreeLePSM(psm); in L2CA_FreeLePSM()
262 L2CAP_TRACE_API("%s: to free psm=%d", __func__, psm); in L2CA_FreeLePSM()
264 if ((psm < LE_DYNAMIC_PSM_START) || (psm > LE_DYNAMIC_PSM_END)) { in L2CA_FreeLePSM()
265 L2CAP_TRACE_ERROR("%s: Invalid PSM=%d value!", __func__, psm); in L2CA_FreeLePSM()
269 if (!l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START]) { in L2CA_FreeLePSM()
270 L2CAP_TRACE_WARNING("%s: PSM=%d was not allocated!", __func__, psm); in L2CA_FreeLePSM()
272 l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START] = false; in L2CA_FreeLePSM()
275 uint16_t L2CA_ConnectReq2(uint16_t psm, const RawAddress& p_bd_addr, in L2CA_ConnectReq2() argument
277 BTM_SetSecurityLevel(true, "", 0, sec_level, psm, 0, 0); in L2CA_ConnectReq2()
278 return L2CA_ConnectReq(psm, p_bd_addr); in L2CA_ConnectReq2()
294 uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr) { in L2CA_ConnectReq() argument
296 return bluetooth::shim::L2CA_ConnectReq(psm, p_bd_addr); in L2CA_ConnectReq()
300 << StringPrintf(" PSM: 0x%04x", psm); in L2CA_ConnectReq()
308 tL2C_RCB* p_rcb = l2cu_find_rcb_by_psm(psm); in L2CA_ConnectReq()
310 LOG(WARNING) << __func__ << ": no RCB, PSM=" << loghex(psm); in L2CA_ConnectReq()
323 << ": connection not started for PSM=" << loghex(psm) in L2CA_ConnectReq()
333 LOG(WARNING) << __func__ << ": no CCB, PSM=" << loghex(psm); in L2CA_ConnectReq()
359 psm, p_ccb->local_cid); in L2CA_ConnectReq()
379 uint16_t L2CA_RegisterLECoc(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_RegisterLECoc() argument
382 return bluetooth::shim::L2CA_RegisterLECoc(psm, p_cb_info, sec_level, cfg); in L2CA_RegisterLECoc()
385 if (p_cb_info.pL2CA_ConnectInd_Cb != nullptr || psm < LE_DYNAMIC_PSM_START) { in L2CA_RegisterLECoc()
388 BTM_SetSecurityLevel(false, "", 0, sec_level, psm, 0, 0); in L2CA_RegisterLECoc()
397 LOG_ERROR("No cb registering BLE PSM: 0x%04x", psm); in L2CA_RegisterLECoc()
402 if (!L2C_IS_VALID_LE_PSM(psm)) { in L2CA_RegisterLECoc()
403 LOG_ERROR("Invalid BLE PSM value, PSM: 0x%04x", psm); in L2CA_RegisterLECoc()
408 uint16_t vpsm = psm; in L2CA_RegisterLECoc()
412 if ((psm >= LE_DYNAMIC_PSM_START) && in L2CA_RegisterLECoc()
420 LOG_DEBUG("Real PSM: 0x%04x Virtual PSM: 0x%04x", psm, vpsm); in L2CA_RegisterLECoc()
429 LOG_WARN("No BLE RCB available, PSM: 0x%04x vPSM: 0x%04x", psm, vpsm); in L2CA_RegisterLECoc()
434 LOG_INFO("Registered service LE COC PSM: 0x%04x", psm); in L2CA_RegisterLECoc()
436 p_rcb->real_psm = psm; in L2CA_RegisterLECoc()
452 void L2CA_DeregisterLECoc(uint16_t psm) { in L2CA_DeregisterLECoc() argument
454 return bluetooth::shim::L2CA_DeregisterLECoc(psm); in L2CA_DeregisterLECoc()
457 L2CAP_TRACE_API("%s called for PSM: 0x%04x", __func__, psm); in L2CA_DeregisterLECoc()
459 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_DeregisterLECoc()
462 psm); in L2CA_DeregisterLECoc()
501 uint16_t L2CA_ConnectLECocReq(uint16_t psm, const RawAddress& p_bd_addr, in L2CA_ConnectLECocReq() argument
504 return bluetooth::shim::L2CA_ConnectLECocReq(psm, p_bd_addr, p_cfg); in L2CA_ConnectLECocReq()
507 BTM_SetSecurityLevel(true, "", 0, sec_level, psm, 0, 0); in L2CA_ConnectLECocReq()
510 << StringPrintf(" PSM: 0x%04x", psm); in L2CA_ConnectLECocReq()
519 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_ConnectLECocReq()
521 L2CAP_TRACE_WARNING("%s No BLE RCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectLECocReq()
534 __func__, psm, p_lcb); in L2CA_ConnectLECocReq()
542 L2CAP_TRACE_WARNING("%s no CCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectLECocReq()
578 L2CAP_TRACE_API("%s(psm: 0x%04x) returned CID: 0x%04x", __func__, psm, in L2CA_ConnectLECocReq()
705 std::vector<uint16_t> L2CA_ConnectCreditBasedReq(uint16_t psm, in L2CA_ConnectCreditBasedReq() argument
709 return bluetooth::shim::L2CA_ConnectCreditBasedReq(psm, p_bd_addr, p_cfg); in L2CA_ConnectCreditBasedReq()
713 << StringPrintf(" PSM: 0x%04x", psm); in L2CA_ConnectCreditBasedReq()
729 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_ConnectCreditBasedReq()
731 L2CAP_TRACE_WARNING("%s No BLE RCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectCreditBasedReq()
757 L2CAP_TRACE_WARNING("%s no CCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectCreditBasedReq()
789 L2CAP_TRACE_API("%s(psm: 0x%04x) returned CID: 0x%04x", __func__, psm, in L2CA_ConnectCreditBasedReq()