• Home
  • Raw
  • Download

Lines Matching refs:psm

61 uint16_t L2CA_Register(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info,  in L2CA_Register()  argument
64 uint16_t vpsm = psm; in L2CA_Register()
66 L2CAP_TRACE_API("L2CAP - L2CA_Register() called for PSM: 0x%04x", psm); in L2CA_Register()
75 L2CAP_TRACE_ERROR("L2CAP - no cb registering PSM: 0x%04x", psm); in L2CA_Register()
80 if (L2C_INVALID_PSM(psm)) { in L2CA_Register()
81 L2CAP_TRACE_ERROR("L2CAP - invalid PSM value, PSM: 0x%04x", psm); in L2CA_Register()
87 if ((psm >= 0x1001) && (p_cb_info->pL2CA_ConnectInd_Cb == NULL)) { in L2CA_Register()
94 psm, vpsm); in L2CA_Register()
103 psm, vpsm); in L2CA_Register()
110 p_rcb->real_psm = psm; in L2CA_Register()
125 void L2CA_Deregister(uint16_t psm) { in L2CA_Deregister() argument
131 L2CAP_TRACE_API("L2CAP - L2CA_Deregister() called for PSM: 0x%04x", psm); in L2CA_Deregister()
133 p_rcb = l2cu_find_rcb_by_psm(psm); in L2CA_Deregister()
157 psm); in L2CA_Deregister()
173 uint16_t psm = l2cb.dyn_psm; in L2CA_AllocatePSM() local
177 psm += 2; in L2CA_AllocatePSM()
178 if (psm > 0xfeff) { in L2CA_AllocatePSM()
179 psm = 0x1001; in L2CA_AllocatePSM()
180 } else if (psm & 0x0100) { in L2CA_AllocatePSM()
182 psm += 0x0100; in L2CA_AllocatePSM()
186 if ((BRCM_RESERVED_PSM_START <= psm) && (psm <= BRCM_RESERVED_PSM_END)) in L2CA_AllocatePSM()
190 if ((l2cu_find_rcb_by_psm(psm)) == NULL) done = true; in L2CA_AllocatePSM()
192 l2cb.dyn_psm = psm; in L2CA_AllocatePSM()
194 return (psm); in L2CA_AllocatePSM()
208 uint16_t psm = l2cb.le_dyn_psm; in L2CA_AllocateLePSM() local
211 L2CAP_TRACE_API("%s: last psm=%d", __func__, psm); in L2CA_AllocateLePSM()
219 psm++; in L2CA_AllocateLePSM()
220 if (psm > LE_DYNAMIC_PSM_END) { in L2CA_AllocateLePSM()
221 psm = LE_DYNAMIC_PSM_START; in L2CA_AllocateLePSM()
224 if (!l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START]) { in L2CA_AllocateLePSM()
226 if (l2cu_find_ble_rcb_by_psm(psm)) { in L2CA_AllocateLePSM()
228 __func__, psm); in L2CA_AllocateLePSM()
232 l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START] = true; in L2CA_AllocateLePSM()
233 L2CAP_TRACE_DEBUG("%s: assigned PSM=%d", __func__, psm); in L2CA_AllocateLePSM()
238 l2cb.le_dyn_psm = psm; in L2CA_AllocateLePSM()
240 return (psm); in L2CA_AllocateLePSM()
252 void L2CA_FreeLePSM(uint16_t psm) { in L2CA_FreeLePSM() argument
253 L2CAP_TRACE_API("%s: to free psm=%d", __func__, psm); in L2CA_FreeLePSM()
255 if ((psm < LE_DYNAMIC_PSM_START) || (psm > LE_DYNAMIC_PSM_END)) { in L2CA_FreeLePSM()
256 L2CAP_TRACE_ERROR("%s: Invalid PSM=%d value!", __func__, psm); in L2CA_FreeLePSM()
260 if (!l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START]) { in L2CA_FreeLePSM()
261 L2CAP_TRACE_WARNING("%s: PSM=%d was not allocated!", __func__, psm); in L2CA_FreeLePSM()
263 l2cb.le_dyn_psm_assigned[psm - LE_DYNAMIC_PSM_START] = false; in L2CA_FreeLePSM()
279 uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr) { in L2CA_ConnectReq() argument
280 return L2CA_ErtmConnectReq(psm, p_bd_addr, nullptr); in L2CA_ConnectReq()
300 uint16_t L2CA_ErtmConnectReq(uint16_t psm, const RawAddress& p_bd_addr, in L2CA_ErtmConnectReq() argument
303 << StringPrintf(" PSM: 0x%04x allowed:0x%x preferred:%d", psm, in L2CA_ErtmConnectReq()
313 tL2C_RCB* p_rcb = l2cu_find_rcb_by_psm(psm); in L2CA_ErtmConnectReq()
315 LOG(WARNING) << __func__ << ": no RCB, PSM=" << loghex(psm); in L2CA_ErtmConnectReq()
328 << ": connection not started for PSM=" << loghex(psm) in L2CA_ErtmConnectReq()
337 LOG(WARNING) << __func__ << ": no CCB, PSM=" << loghex(psm); in L2CA_ErtmConnectReq()
382 psm, p_ccb->local_cid); in L2CA_ErtmConnectReq()
402 uint16_t L2CA_RegisterLECoc(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info) { in L2CA_RegisterLECoc() argument
403 L2CAP_TRACE_API("%s called for LE PSM: 0x%04x", __func__, psm); in L2CA_RegisterLECoc()
411 L2CAP_TRACE_ERROR("%s No cb registering BLE PSM: 0x%04x", __func__, psm); in L2CA_RegisterLECoc()
416 if (!L2C_IS_VALID_LE_PSM(psm)) { in L2CA_RegisterLECoc()
417 L2CAP_TRACE_ERROR("%s Invalid BLE PSM value, PSM: 0x%04x", __func__, psm); in L2CA_RegisterLECoc()
422 uint16_t vpsm = psm; in L2CA_RegisterLECoc()
426 if ((psm >= LE_DYNAMIC_PSM_START) && in L2CA_RegisterLECoc()
434 L2CAP_TRACE_API("%s Real PSM: 0x%04x Virtual PSM: 0x%04x", __func__, psm, in L2CA_RegisterLECoc()
445 __func__, psm, vpsm); in L2CA_RegisterLECoc()
451 p_rcb->real_psm = psm; in L2CA_RegisterLECoc()
466 void L2CA_DeregisterLECoc(uint16_t psm) { in L2CA_DeregisterLECoc() argument
467 L2CAP_TRACE_API("%s called for PSM: 0x%04x", __func__, psm); in L2CA_DeregisterLECoc()
469 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_DeregisterLECoc()
472 psm); in L2CA_DeregisterLECoc()
511 uint16_t L2CA_ConnectLECocReq(uint16_t psm, const RawAddress& p_bd_addr, in L2CA_ConnectLECocReq() argument
514 << StringPrintf(" PSM: 0x%04x", psm); in L2CA_ConnectLECocReq()
523 tL2C_RCB* p_rcb = l2cu_find_ble_rcb_by_psm(psm); in L2CA_ConnectLECocReq()
525 L2CAP_TRACE_WARNING("%s No BLE RCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectLECocReq()
538 __func__, psm, p_lcb); in L2CA_ConnectLECocReq()
546 L2CAP_TRACE_WARNING("%s no CCB, PSM: 0x%04x", __func__, psm); in L2CA_ConnectLECocReq()
580 L2CAP_TRACE_API("%s(psm: 0x%04x) returned CID: 0x%04x", __func__, psm, in L2CA_ConnectLECocReq()
1231 uint16_t L2CA_LocalLoopbackReq(uint16_t psm, uint16_t handle, in L2CA_LocalLoopbackReq() argument
1237 L2CAP_TRACE_API("L2CA_LocalLoopbackReq() PSM: %d Handle: 0x%04x", psm, in L2CA_LocalLoopbackReq()
1247 p_rcb = l2cu_find_rcb_by_psm(psm); in L2CA_LocalLoopbackReq()
1249 L2CAP_TRACE_WARNING("L2CAP - no RCB for L2CA_conn_req, PSM: %d", psm); in L2CA_LocalLoopbackReq()