Home | History | Annotate | Download | only in l2cap

Lines Matching defs:psm

53 ** Returns          PSM to use or zero if error. Typically, the PSM returned
55 ** connection to a dynamic PSM, a "virtual" PSM is returned
60 UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info)
63 UINT16 vpsm = psm;
65 L2CAP_TRACE_API ("L2CAP - L2CA_Register() called for PSM: 0x%04x", psm);
77 L2CAP_TRACE_ERROR ("L2CAP - no cb registering PSM: 0x%04x", psm);
81 /* Verify PSM is valid */
82 if (L2C_INVALID_PSM(psm))
84 L2CAP_TRACE_ERROR ("L2CAP - invalid PSM value, PSM: 0x%04x", psm);
89 /* a dynamic PSM. If so, allocate a "virtual" PSM for the app to use. */
90 if ( (psm >= 0x1001) && (p_cb_info->pL2CA_ConnectInd_Cb == NULL) )
98 L2CAP_TRACE_API ("L2CA_Register - Real PSM: 0x%04x Virtual PSM: 0x%04x", psm, vpsm);
106 L2CAP_TRACE_WARNING ("L2CAP - no RCB available, PSM: 0x%04x vPSM: 0x%04x", psm, vpsm);
112 p_rcb->real_psm = psm;
127 void L2CA_Deregister (UINT16 psm)
134 L2CAP_TRACE_API ("L2CAP - L2CA_Deregister() called for PSM: 0x%04x", psm);
136 if ((p_rcb = l2cu_find_rcb_by_psm (psm)) != NULL)
160 L2CAP_TRACE_WARNING ("L2CAP - PSM: 0x%04x not found for deregistration", psm);
168 ** Description Other layers call this function to find an unused PSM for L2CAP
171 ** Returns PSM to use.
177 UINT16 psm = l2cb.dyn_psm;
182 psm += 2;
183 if (psm > 0xfeff)
185 psm = 0x1001;
187 else if (psm & 0x0100)
190 psm += 0x0100;
193 /* if psm is in range of reserved BRCM Aware features */
194 if ((BRCM_RESERVED_PSM_START <= psm)&&(psm <= BRCM_RESERVED_PSM_END))
197 /* make sure the newlly allocated psm is not used right now */
198 if ((l2cu_find_rcb_by_psm (psm)) == NULL)
201 l2cb.dyn_psm = psm;
203 return(psm);
218 UINT16 L2CA_ConnectReq (UINT16 psm, BD_ADDR p_bd_addr)
220 return L2CA_ErtmConnectReq (psm, p_bd_addr, NULL);
232 ** Parameters: PSM: L2CAP PSM for the connection
239 UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_ertm_info)
245 L2CAP_TRACE_API ("L2CA_ErtmConnectReq() PSM: 0x%04x BDA: %08x%04x p_ertm_info: 0x%08x allowed:0x%x preferred:%d", psm,
257 /* Fail if the PSM is not registered */
258 if ((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
260 L2CAP_TRACE_WARNING ("L2CAP - no RCB for L2CA_conn_req, PSM: 0x%04x", psm);
273 L2CAP_TRACE_WARNING ("L2CAP - conn not started for PSM: 0x%04x p_lcb: 0x%08x", psm, p_lcb);
281 L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_conn_req, PSM: 0x%04x", psm);
329 L2CAP_TRACE_API ("L2CAP - L2CA_conn_req(psm: 0x%04x) returned CID: 0x%04x", psm, p_ccb->local_cid);
342 ** Returns PSM to use or zero if error. Typically, the PSM returned
344 ** connection to a dynamic PSM, a "virtual" PSM is returned
349 UINT16 L2CA_RegisterLECoc(UINT16 psm, tL2CAP_APPL_INFO *p_cb_info)
351 L2CAP_TRACE_API("%s called for LE PSM: 0x%04x", __func__, psm);
361 L2CAP_TRACE_ERROR("%s No cb registering BLE PSM: 0x%04x", __func__, psm);
365 /* Verify PSM is valid */
366 if (!L2C_IS_VALID_LE_PSM(psm))
368 L2CAP_TRACE_ERROR("%s Invalid BLE PSM value, PSM: 0x%04x", __func__, psm);
373 UINT16 vpsm = psm;
376 /* a dynamic PSM. If so, allocate a "virtual" PSM for the app to use. */
377 if ((psm >= 0x0080) && (p_cb_info->pL2CA_ConnectInd_Cb == NULL))
386 L2CAP_TRACE_API("%s Real PSM: 0x%04x Virtual PSM: 0x%04x", __func__, psm, vpsm);
396 L2CAP_TRACE_WARNING("%s No BLE RCB available, PSM: 0x%04x vPSM: 0x%04x",
397 __func__, psm, vpsm);
403 p_rcb->real_psm = psm;
418 void L2CA_DeregisterLECoc(UINT16 psm)
420 L2CAP_TRACE_API("%s called for PSM: 0x%04x", __func__, psm);
422 tL2C_RCB *p_rcb = l2cu_find_ble_rcb_by_psm(psm);
425 L2CAP_TRACE_WARNING("%s PSM: 0x%04x not found for deregistration", psm);
460 ** Parameters: PSM: L2CAP PSM for the connection
467 UINT16 L2CA_ConnectLECocReq(UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_LE_CFG_INFO *p_cfg)
469 L2CAP_TRACE_API("%s PSM: 0x%04x BDA: %02x:%02x:%02x:%02x:%02x:%02x", __func__, psm,
479 /* Fail if the PSM is not registered */
480 tL2C_RCB *p_rcb = l2cu_find_ble_rcb_by_psm(psm);
483 L2CAP_TRACE_WARNING("%s No BLE RCB, PSM: 0x%04x", __func__, psm);
497 L2CAP_TRACE_WARNING("%s conn not started for PSM: 0x%04x p_lcb: 0x%08x",
498 __func__, psm, p_lcb);
507 L2CAP_TRACE_WARNING("%s no CCB, PSM: 0x%04x", __func__, psm);
542 L2CAP_TRACE_API("%s(psm: 0x%04x) returned CID: 0x%04x", __func__, psm, p_ccb->local_cid);
1232 UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr)
1238 L2CAP_TRACE_API ("L2CA_LocalLoopbackReq() PSM: %d Handle: 0x%04x", psm, handle);
1247 /* Fail if the PSM is not registered */
1248 if ((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
1250 L2CAP_TRACE_WARNING ("L2CAP - no RCB for L2CA_conn_req, PSM: %d", psm);