summaryrefslogtreecommitdiffstats
path: root/stack/avct/avct_lcb_act.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack/avct/avct_lcb_act.c')
-rw-r--r--stack/avct/avct_lcb_act.c74
1 files changed, 43 insertions, 31 deletions
diff --git a/stack/avct/avct_lcb_act.c b/stack/avct/avct_lcb_act.c
index 8d48c10..b883517 100644
--- a/stack/avct/avct_lcb_act.c
+++ b/stack/avct/avct_lcb_act.c
@@ -1,14 +1,26 @@
-/*****************************************************************************
-**
-** Name: avct_lcb_act.c
-**
-** Description: This module contains action functions of the link control
-** state machine.
-**
-** Copyright (c) 2003-2008, Broadcom Corp., All Rights Reserved.
-** WIDCOMM Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2003-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 module contains action functions of the link control state machine.
+ *
+ ******************************************************************************/
#include <string.h>
#include "data_types.h"
@@ -24,14 +36,14 @@ const UINT8 avct_lcb_pkt_type_len[] = {
AVCT_HDR_LEN_START,
AVCT_HDR_LEN_CONT,
AVCT_HDR_LEN_END
-};
+};
/*******************************************************************************
**
** Function avct_lcb_msg_asmbl
**
** Description Reassemble incoming message.
-**
+**
**
** Returns Pointer to reassembled message; NULL if no message
** available.
@@ -150,7 +162,7 @@ static BT_HDR *avct_lcb_msg_asmbl(tAVCT_LCB *p_lcb, BT_HDR *p_buf)
** Function avct_lcb_chnl_open
**
** Description Open L2CAP channel to peer
-**
+**
**
** Returns Nothing.
**
@@ -174,7 +186,7 @@ void avct_lcb_chnl_open(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_unbind_disc
**
** Description Deallocate ccb and call callback with disconnect event.
-**
+**
**
** Returns Nothing.
**
@@ -192,7 +204,7 @@ void avct_lcb_unbind_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** bound to this lcb, send a connect event. For each
** unbound ccb with a new PID, bind that ccb to this lcb and
** send a connect event.
-**
+**
**
** Returns Nothing.
**
@@ -243,7 +255,7 @@ void avct_lcb_open_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Description L2CAP channel open attempt failed. Deallocate any ccbs
** on this lcb and send connect confirm event with failure.
-**
+**
**
** Returns Nothing.
**
@@ -269,7 +281,7 @@ void avct_lcb_open_fail(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Description L2CAP channel closed by peer. Deallocate any initiator
** ccbs on this lcb and send disconnect ind event.
-**
+**
**
** Returns Nothing.
**
@@ -304,7 +316,7 @@ void avct_lcb_close_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Description L2CAP channel closed by us. Deallocate any initiator
** ccbs on this lcb and send disconnect ind or cfm event.
-**
+**
**
** Returns Nothing.
**
@@ -349,7 +361,7 @@ void avct_lcb_close_cfm(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_bind_conn
**
** Description Bind ccb to lcb and send connect cfm event.
-**
+**
**
** Returns Nothing.
**
@@ -365,10 +377,10 @@ void avct_lcb_bind_conn(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Function avct_lcb_chk_disc
**
-** Description A ccb wants to close; if it is the last ccb on this lcb,
+** Description A ccb wants to close; if it is the last ccb on this lcb,
** close channel. Otherwise just deallocate and call
** callback.
-**
+**
**
** Returns Nothing.
**
@@ -397,7 +409,7 @@ void avct_lcb_chk_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_chnl_disc
**
** Description Disconnect L2CAP channel.
-**
+**
**
** Returns Nothing.
**
@@ -411,9 +423,9 @@ void avct_lcb_chnl_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
**
** Function avct_lcb_bind_fail
**
-** Description Deallocate ccb and call callback with connect event
+** Description Deallocate ccb and call callback with connect event
** with failure result.
-**
+**
**
** Returns Nothing.
**
@@ -428,7 +440,7 @@ void avct_lcb_bind_fail(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_cong_ind
**
** Description Handle congestion indication from L2CAP.
-**
+**
**
** Returns Nothing.
**
@@ -469,7 +481,7 @@ void avct_lcb_cong_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_discard_msg
**
** Description Discard a message sent in from the API.
-**
+**
**
** Returns Nothing.
**
@@ -486,7 +498,7 @@ void avct_lcb_discard_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_send_msg
**
** Description Build and send an AVCTP message.
-**
+**
**
** Returns Nothing.
**
@@ -502,7 +514,7 @@ void avct_lcb_send_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
UINT16 temp;
UINT16 buf_size = p_lcb->peer_mtu + L2CAP_MIN_OFFSET + BT_HDR_SIZE;
-
+
/* store msg len */
curr_msg_len = p_data->ul_msg.p_buf->len;
@@ -604,7 +616,7 @@ void avct_lcb_send_msg(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_free_msg_ind
**
** Description Discard an incoming AVCTP message.
-**
+**
**
** Returns Nothing.
**
@@ -621,7 +633,7 @@ void avct_lcb_free_msg_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_msg_ind
**
** Description Handle an incoming AVCTP message.
-**
+**
**
** Returns Nothing.
**