summaryrefslogtreecommitdiffstats
path: root/stack/mcap
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2012-09-18 01:35:44 -0700
committerMatthew Xie <mattx@google.com>2012-09-18 16:26:28 -0700
commit6ef101187774e30ddba6b46bbedef549a42196ad (patch)
treef36eb347f03083671640fbc750171e3b951e0082 /stack/mcap
parentf80d3d045eab5f002be4b5e8a3d2d376fdf7581a (diff)
downloadexternal_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.zip
external_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.tar.gz
external_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.tar.bz2
Initual Bluetooth open source release
First release under Apache source license with updated header files and whitespace cleanups. Also fixed file permission to remove executable bit from source files. Change-Id: I7155903edfc2f491c1cbbd0db108f207852caaa0
Diffstat (limited to 'stack/mcap')
-rw-r--r--stack/mcap/mca_api.c49
-rw-r--r--stack/mcap/mca_cact.c51
-rw-r--r--stack/mcap/mca_csm.c55
-rw-r--r--stack/mcap/mca_dact.c41
-rw-r--r--stack/mcap/mca_dsm.c34
-rw-r--r--stack/mcap/mca_int.h33
-rw-r--r--stack/mcap/mca_l2c.c74
-rw-r--r--stack/mcap/mca_main.c35
8 files changed, 237 insertions, 135 deletions
diff --git a/stack/mcap/mca_api.c b/stack/mcap/mca_api.c
index c4cf7a3..1792f8c 100644
--- a/stack/mcap/mca_api.c
+++ b/stack/mcap/mca_api.c
@@ -1,14 +1,27 @@
-/*****************************************************************************
-**
-** Name: mca_api.c
-**
-** Description: This is the API implementation file for the
-** Multi-Channel Adaptation Protocol (MCAP).
-**
-** Copyright (c) 2009-2011, Broadcom Corp., All Rights Reserved.
-** Broadcom Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This is the API implementation file for the Multi-Channel Adaptation
+ * Protocol (MCAP).
+ *
+ ******************************************************************************/
#include <string.h>
#include "bt_target.h"
@@ -27,7 +40,7 @@
** Function mca_process_timeout
**
** Description This function is called by BTU when an MCA timer
-** expires.
+** expires.
**
** This function is for use internal to the stack only.
**
@@ -101,7 +114,7 @@ UINT8 MCA_SetTraceLevel (UINT8 level)
** It is assumed that the control channel PSM and data channel
** PSM are not used by any other instances of the stack.
** If the given p_reg->ctrl_psm is 0, this handle is INT only.
-**
+**
** Returns 0, if failed. Otherwise, the MCA handle.
**
*******************************************************************************/
@@ -196,7 +209,7 @@ void MCA_Deregister(tMCA_HANDLE handle)
** Description Create a data endpoint. If the MDEP is created successfully,
** the MDEP ID is returned in *p_dep. After a data endpoint is
** created, an application can initiate a connection between this
-** endpoint and an endpoint on a peer device.
+** endpoint and an endpoint on a peer device.
**
** Returns MCA_SUCCESS if successful, otherwise error.
**
@@ -307,7 +320,7 @@ tMCA_RESULT MCA_DeleteDep(tMCA_HANDLE handle, tMCA_DEP dep)
**
** Function MCA_ConnectReq
**
-** Description This function initiates an MCAP control channel connection
+** Description This function initiates an MCAP control channel connection
** to the peer device. When the connection is completed, an
** MCA_CONNECT_IND_EVT is reported to the application via its
** control callback function.
@@ -367,7 +380,7 @@ tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, BD_ADDR bd_addr,
** Function MCA_DisconnectReq
**
** Description This function disconnect an MCAP control channel
-** to the peer device.
+** to the peer device.
** If associated data channel exists, they are disconnected.
** When the MCL is disconnected an MCA_DISCONNECT_IND_EVT is
** reported to the application via its control callback function.
@@ -397,7 +410,7 @@ tMCA_RESULT MCA_DisconnectReq(tMCA_CL mcl)
** Description This function sends a CREATE_MDL request to the peer device.
** When the response is received, a MCA_CREATE_CFM_EVT is reported
** with the given MDL ID.
-** If the response is successful, a data channel is open
+** If the response is successful, a data channel is open
** with the given p_chnl_cfg
** If p_chnl_cfg is NULL, the data channel is not initiated until
** MCA_DataChnlCfg is called to provide the p_chnl_cfg.
@@ -853,7 +866,7 @@ tMCA_RESULT MCA_Delete(tMCA_CL mcl, UINT16 mdl_id)
**
** Function MCA_WriteReq
**
-** Description Send a data packet to the peer device.
+** Description Send a data packet to the peer device.
**
** The application passes the packet using the BT_HDR structure.
** The offset field must be equal to or greater than L2CAP_MIN_OFFSET.
diff --git a/stack/mcap/mca_cact.c b/stack/mcap/mca_cact.c
index d074172..85f19f4 100644
--- a/stack/mcap/mca_cact.c
+++ b/stack/mcap/mca_cact.c
@@ -1,14 +1,27 @@
-/*****************************************************************************
-**
-** Name: mca_cact.c
-**
-** Description: This is the implementation file for the MCAP
-** Control Channel Action Functions.
-**
-** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
-** WIDCOMM Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This is the implementation file for the MCAP Control Channel Action
+ * Functions.
+ *
+ ******************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "gki.h"
@@ -88,7 +101,7 @@ void mca_ccb_snd_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
if ((p_ccb->status == MCA_CCB_STAT_PENDING) && (p_msg->op_code == MCA_OP_MDL_ABORT_REQ))
{
p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx);
- /* the Abort API does not have the associated mdl_id.
+ /* the Abort API does not have the associated mdl_id.
* Get the mdl_id in dcb to compose the request */
p_msg->mdl_id = p_dcb->mdl_id;
mca_dcb_event(p_dcb, MCA_DCB_API_CLOSE_EVT, NULL);
@@ -231,7 +244,7 @@ void mca_ccb_cong(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
** Function mca_ccb_hdl_req
**
** Description This function is called when a MCAP request is received from
-** the peer. It calls the application callback function to
+** the peer. It calls the application callback function to
** report the event.
**
** Returns void.
@@ -294,7 +307,7 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
check_req = TRUE;
reject_code = MCA_RSP_SUCCESS;
/* drop the previous request */
- if ((p_ccb->p_tx_req->op_code == MCA_OP_MDL_CREATE_REQ) &&
+ if ((p_ccb->p_tx_req->op_code == MCA_OP_MDL_CREATE_REQ) &&
((p_dcb = mca_dcb_by_hdl(p_ccb->p_tx_req->dcb_idx)) != NULL))
{
mca_dcb_dealloc(p_dcb, NULL);
@@ -311,9 +324,9 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
}
else if (p_pkt->layer_specific != MCA_RSP_SUCCESS)
{
-
+
reject_code = (UINT8)p_pkt->layer_specific;
- if (((evt_data.hdr.op_code >= MCA_NUM_STANDARD_OPCODE) &&
+ if (((evt_data.hdr.op_code >= MCA_NUM_STANDARD_OPCODE) &&
(evt_data.hdr.op_code < MCA_FIRST_SYNC_OP)) ||
(evt_data.hdr.op_code > MCA_LAST_SYNC_OP))
{
@@ -387,7 +400,7 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
}
}
- if (((reject_code != MCA_RSP_SUCCESS) && (evt_data.hdr.op_code != MCA_OP_SYNC_INFO_IND))
+ if (((reject_code != MCA_RSP_SUCCESS) && (evt_data.hdr.op_code != MCA_OP_SYNC_INFO_IND))
|| send_rsp)
{
p_buf = (BT_HDR *)GKI_getbuf (MCA_CTRL_MTU);
@@ -432,7 +445,7 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
** Function mca_ccb_hdl_rsp
**
** Description This function is called when a MCAP response is received from
-** the peer. It calls the application callback function with
+** the peer. It calls the application callback function with
** the results.
**
** Returns void.
@@ -533,7 +546,7 @@ void mca_ccb_hdl_rsp(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
**
** Function mca_ccb_ll_open
**
-** Description This function is called to report MCA_CONNECT_IND_EVT event.
+** Description This function is called to report MCA_CONNECT_IND_EVT event.
** It also clears the congestion flag (ccb.cong).
**
** Returns void.
diff --git a/stack/mcap/mca_csm.c b/stack/mcap/mca_csm.c
index 411ee6a..af43bef 100644
--- a/stack/mcap/mca_csm.c
+++ b/stack/mcap/mca_csm.c
@@ -1,14 +1,27 @@
-/*****************************************************************************
-**
-** Name: mca_csm.c
-**
-** Description: This is the implementation file for the MCAP
-** Control channel state machine.
-**
-** Copyright (c) 2009-2011, Broadcom Corp., All Rights Reserved.
-** Broadcom Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This is the implementation file for the MCAP Control channel state
+ * machine.
+ *
+ ******************************************************************************/
#include <string.h>
#include "bt_target.h"
@@ -144,7 +157,7 @@ static const char * const mca_ccb_st_str[] = {
**
** Function mca_stop_timer
**
-** Description This function is stop a MCAP timer
+** Description This function is stop a MCAP timer
**
** This function is for use internal to MCAP only.
**
@@ -164,8 +177,8 @@ void mca_stop_timer(tMCA_CCB *p_ccb)
**
** Function mca_ccb_event
**
-** Description This function is the CCB state machine main function.
-** It uses the state and action function tables to execute
+** Description This function is the CCB state machine main function.
+** It uses the state and action function tables to execute
** action functions.
**
** Returns void.
@@ -181,7 +194,7 @@ void mca_ccb_event(tMCA_CCB *p_ccb, UINT8 event, tMCA_CCB_EVT *p_data)
#else
MCA_TRACE_EVENT3("CCB ccb=%d event=%d state=%d", mca_ccb_to_hdl(p_ccb), event, p_ccb->state);
#endif
-
+
/* look up the state table for the current state */
state_table = mca_ccb_st_tbl[p_ccb->state - 1];
@@ -199,8 +212,8 @@ void mca_ccb_event(tMCA_CCB *p_ccb, UINT8 event, tMCA_CCB_EVT *p_data)
**
** Function mca_ccb_by_bd
**
-** Description This function looks up the CCB based on the BD address.
-** It returns a pointer to the CCB.
+** Description This function looks up the CCB based on the BD address.
+** It returns a pointer to the CCB.
** If no CCB is found it returns NULL.
**
** Returns void.
@@ -234,7 +247,7 @@ tMCA_CCB *mca_ccb_by_bd(tMCA_HANDLE handle, BD_ADDR bd_addr)
** Function mca_ccb_alloc
**
** Description This function allocates a CCB and copies the BD address to
-** the CCB. It returns a pointer to the CCB. If no CCB can
+** the CCB. It returns a pointer to the CCB. If no CCB can
** be allocated it returns NULL.
**
** Returns void.
@@ -273,7 +286,7 @@ tMCA_CCB *mca_ccb_alloc(tMCA_HANDLE handle, BD_ADDR bd_addr)
**
** Function mca_ccb_dealloc
**
-** Description This function deallocates a CCB.
+** Description This function deallocates a CCB.
**
** Returns void.
**
@@ -311,7 +324,7 @@ void mca_ccb_dealloc(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data)
**
** Function mca_ccb_to_hdl
**
-** Description This function converts a pointer to a CCB to a tMCA_CL
+** Description This function converts a pointer to a CCB to a tMCA_CL
** and returns the value.
**
** Returns void.
@@ -326,7 +339,7 @@ tMCA_CL mca_ccb_to_hdl(tMCA_CCB *p_ccb)
**
** Function mca_ccb_by_hdl
**
-** Description This function converts an index value to a CCB. It returns
+** Description This function converts an index value to a CCB. It returns
** a pointer to the CCB. If no valid CCB matches the index it
** returns NULL.
**
diff --git a/stack/mcap/mca_dact.c b/stack/mcap/mca_dact.c
index 5ace8fa..353153e 100644
--- a/stack/mcap/mca_dact.c
+++ b/stack/mcap/mca_dact.c
@@ -1,14 +1,27 @@
-/*****************************************************************************
-**
-** Name: mca_dact.c
-**
-** Description: This is the implementation file for the MCAP
-** Data Channel Action Functions.
-**
-** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
-** WIDCOMM Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This is the implementation file for the MCAP Data Channel Action
+ * Functions.
+ *
+ ******************************************************************************/
#include "bt_target.h"
#include "gki.h"
#include "mca_api.h"
@@ -37,8 +50,8 @@ void mca_dcb_report_cong (tMCA_DCB *p_dcb)
**
** Function mca_dcb_tc_open
**
-** Description This function is called to report MCA_OPEN_IND_EVT or
-** MCA_OPEN_CFM_EVT event.
+** Description This function is called to report MCA_OPEN_IND_EVT or
+** MCA_OPEN_CFM_EVT event.
** It also clears the congestion flag (dcb.cong).
**
** Returns void.
@@ -136,7 +149,7 @@ void mca_dcb_snd_data (tMCA_DCB *p_dcb, tMCA_DCB_EVT *p_data)
**
** Function mca_dcb_hdl_data
**
-** Description This function reports the received data through the data
+** Description This function reports the received data through the data
** callback function.
**
** Returns void.
diff --git a/stack/mcap/mca_dsm.c b/stack/mcap/mca_dsm.c
index e6139a3..255b5d4 100644
--- a/stack/mcap/mca_dsm.c
+++ b/stack/mcap/mca_dsm.c
@@ -1,14 +1,26 @@
-/*****************************************************************************
-**
-** Name: mca_dsm.c
-**
-** Description: This is the implementation file for the MCAP
-** Data chahnel state machine.
-**
-** Copyright (c) 2009-2011, Broadcom Corp., All Rights Reserved.
-** Broadcom Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This is the implementation file for the MCAP Data chahnel state machine.
+ *
+ ******************************************************************************/
#include <string.h>
#include "bt_target.h"
diff --git a/stack/mcap/mca_int.h b/stack/mcap/mca_int.h
index f248dbe..2563f7f 100644
--- a/stack/mcap/mca_int.h
+++ b/stack/mcap/mca_int.h
@@ -1,13 +1,26 @@
-/*****************************************************************************
-**
-** Name: mca_int.h
-**
-** Description: This file contains interfaces which are internal to MCAP.
-**
-** Copyright (c) 2009-2010, Broadcom Corp., All Rights Reserved.
-** Broadcom Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This file contains interfaces which are internal to MCAP.
+ *
+ ******************************************************************************/
#ifndef MCA_INT_H
#define MCA_INT_H
#include "gki.h"
diff --git a/stack/mcap/mca_l2c.c b/stack/mcap/mca_l2c.c
index a776568..f8a48bf 100644
--- a/stack/mcap/mca_l2c.c
+++ b/stack/mcap/mca_l2c.c
@@ -1,14 +1,26 @@
-/*****************************************************************************
-**
-** Name: mca_l2c.c
-**
-** Description: This is the implementation file for the MCAP
-** at L2CAP Interface.
-**
-** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
-** WIDCOMM Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This is the implementation file for the MCAP at L2CAP Interface.
+ *
+ ******************************************************************************/
#include <string.h>
#include "bt_target.h"
@@ -58,8 +70,8 @@ const tL2CAP_FCR_OPTS mca_l2c_fcr_opts_def = {
**
** Function mca_sec_check_complete_term
**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
+** Description The function called when Security Manager finishes
+** verification of the service side connection
**
** Returns void
**
@@ -83,7 +95,7 @@ static void mca_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT
ertm_info.fcr_rx_pool_id = MCA_FCR_RX_POOL_ID;
ertm_info.fcr_tx_pool_id = MCA_FCR_TX_POOL_ID;
/* Send response to the L2CAP layer. */
- L2CA_ErtmConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK, &ertm_info);
+ L2CA_ErtmConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK, &ertm_info);
/* transition to configuration state */
p_tbl->state = MCA_TC_ST_CFG;
@@ -94,7 +106,7 @@ static void mca_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT
}
else
{
- L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
mca_tc_close_ind(p_tbl, L2CAP_CONN_SECURITY_BLOCK);
}
}
@@ -103,8 +115,8 @@ static void mca_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT
**
** Function mca_sec_check_complete_orig
**
-** Description The function called when Security Manager finishes
-** verification of the service side connection
+** Description The function called when Security Manager finishes
+** verification of the service side connection
**
** Returns void
**
@@ -190,9 +202,9 @@ void mca_l2c_cconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
if (!p_tbl || (p_tbl->state != MCA_TC_ST_CFG))
{
/* Send L2CAP connect rsp */
- L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, L2CAP_CONN_OK, p_ertm_info);
+ L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, L2CAP_CONN_OK, p_ertm_info);
- /* if result ok, proceed with connection and send L2CAP
+ /* if result ok, proceed with connection and send L2CAP
config req */
if (result == L2CAP_CONN_OK)
{
@@ -211,7 +223,7 @@ void mca_l2c_cconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
** Function mca_l2c_dconn_ind_cback
**
** Description This is the L2CAP connect indication callback function.
-**
+**
**
** Returns void
**
@@ -253,13 +265,13 @@ void mca_l2c_dconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
}
else
{
- /* else we're not listening for traffic channel; reject
+ /* else we're not listening for traffic channel; reject
* (this error code is specified by MCAP spec) */
result = L2CAP_CONN_NO_RESOURCES;
}
/* Send L2CAP connect rsp */
- L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, result, p_ertm_info);
+ L2CA_ErtmConnectRsp (bd_addr, id, lcid, result, result, p_ertm_info);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -278,7 +290,7 @@ void mca_l2c_dconn_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
** Function mca_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -325,8 +337,8 @@ void mca_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
p_tbl->cfg_flags= MCA_L2C_CFG_CONN_INT;
/* Check the security */
- btm_sec_mx_access_request (p_ccb->peer_addr, p_ccb->ctrl_vpsm,
- TRUE, BTM_SEC_PROTO_MCA,
+ btm_sec_mx_access_request (p_ccb->peer_addr, p_ccb->ctrl_vpsm,
+ TRUE, BTM_SEC_PROTO_MCA,
p_tbl->tcid,
&mca_sec_check_complete_orig, p_tbl);
}
@@ -348,7 +360,7 @@ void mca_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function mca_l2c_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -390,7 +402,7 @@ void mca_l2c_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function mca_l2c_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -443,7 +455,7 @@ void mca_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function mca_l2c_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -476,7 +488,7 @@ void mca_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function mca_l2c_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -501,7 +513,7 @@ void mca_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function mca_l2c_congestion_ind_cback
**
** Description This is the L2CAP congestion indication callback function.
-**
+**
**
** Returns void
**
@@ -522,7 +534,7 @@ void mca_l2c_congestion_ind_cback(UINT16 lcid, BOOLEAN is_congested)
** Function mca_l2c_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
diff --git a/stack/mcap/mca_main.c b/stack/mcap/mca_main.c
index bc6118c..2e05d5e 100644
--- a/stack/mcap/mca_main.c
+++ b/stack/mcap/mca_main.c
@@ -1,14 +1,27 @@
-/*****************************************************************************
-**
-** Name: mca_main.c
-**
-** Description: This is the implementation file for the MCAP
-** Main Control Block and Utility functions.
-**
-** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
-** WIDCOMM Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2009-2012 Broadcom Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/******************************************************************************
+ *
+ * This is the implementation file for the MCAP Main Control Block and
+ * Utility functions.
+ *
+ ******************************************************************************/
#include <string.h>
#include "bt_target.h"