summaryrefslogtreecommitdiffstats
path: root/bta/pan/bta_pan_ci.c
diff options
context:
space:
mode:
Diffstat (limited to 'bta/pan/bta_pan_ci.c')
-rw-r--r--bta/pan/bta_pan_ci.c80
1 files changed, 46 insertions, 34 deletions
diff --git a/bta/pan/bta_pan_ci.c b/bta/pan/bta_pan_ci.c
index 843d2b9..f8e5832 100644
--- a/bta/pan/bta_pan_ci.c
+++ b/bta/pan/bta_pan_ci.c
@@ -1,14 +1,26 @@
-/*****************************************************************************
-**
-** Name: bta_pan_ci.c
-**
-** Description: This is the implementation file for data gateway call-in
-** functions.
-**
-** Copyright (c) 2004, Widcomm Inc., All Rights Reserved.
-** Widcomm Bluetooth Core. Proprietary and confidential.
-**
-*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2004-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 data gateway call-in functions.
+ *
+ ******************************************************************************/
#include "bt_target.h"
@@ -33,9 +45,9 @@
** ready for more data and PAN should call bta_pan_co_tx_path().
** This function is used when the TX data path is configured
** to use a pull interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_tx_ready(UINT16 handle)
@@ -58,9 +70,9 @@ void bta_pan_ci_tx_ready(UINT16 handle)
** has data available to send to PAN and PAN should call
** bta_pan_co_rx_path(). This function is used when the RX
** data path is configured to use a pull interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_rx_ready(UINT16 handle)
@@ -85,9 +97,9 @@ void bta_pan_ci_rx_ready(UINT16 handle)
** any more data sent by bta_pan_co_tx_write() or
** bta_pan_co_tx_writebuf(). This function is used when the
** TX data path is configured to use a push interface.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_tx_flow(UINT16 handle, BOOLEAN enable)
@@ -110,29 +122,29 @@ void bta_pan_ci_tx_flow(UINT16 handle, BOOLEAN enable)
** Description This function is called to send data to PAN when the RX path
** is configured to use a push interface. The function copies
** data to an event buffer and sends it to PAN.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_rx_write(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol,
UINT8 *p_data, UINT16 len, BOOLEAN ext)
{
BT_HDR * p_buf;
-
+
if((p_buf = (BT_HDR *) GKI_getpoolbuf(PAN_POOL_ID)) != NULL)
{
p_buf->offset = PAN_MINIMUM_OFFSET;
-
+
/* copy all other params before the data */
bdcpy(((tBTA_PAN_DATA_PARAMS *)p_buf)->src, src);
bdcpy(((tBTA_PAN_DATA_PARAMS *)p_buf)->dst, dst);
((tBTA_PAN_DATA_PARAMS *)p_buf)->protocol = protocol;
((tBTA_PAN_DATA_PARAMS *)p_buf)->ext = ext;
p_buf->len=len;
-
+
/* copy data */
memcpy((UINT8 *)(p_buf + 1) + p_buf->offset, p_data, len);
@@ -153,9 +165,9 @@ void bta_pan_ci_rx_write(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protoco
** the data buffer. The buffer must be allocated using
** functions GKI_getbuf() or GKI_getpoolbuf(). The buffer
** will be freed by BTA; the phone must not free the buffer.
-**
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol,
@@ -180,13 +192,13 @@ void bta_pan_ci_rx_writebuf(UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 prot
**
** Function bta_pan_ci_readbuf
**
-** Description
-**
+** Description
**
-** Returns void
+**
+** Returns void
**
*******************************************************************************/
-BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16* p_protocol,
+BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16* p_protocol,
BOOLEAN* p_ext, BOOLEAN* p_forward)
{
tBTA_PAN_SCB * p_scb;
@@ -213,10 +225,10 @@ BT_HDR * bta_pan_ci_readbuf(UINT16 handle, BD_ADDR src, BD_ADDR dst, UINT16* p_p
**
** Function bta_pan_ci_set_mfilters
**
-** Description This function is called to set multicast filters
-**
+** Description This function is called to set multicast filters
+**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_set_mfilters(UINT16 handle, UINT16 num_mcast_filters, UINT8 *p_start_array,
@@ -232,10 +244,10 @@ void bta_pan_ci_set_mfilters(UINT16 handle, UINT16 num_mcast_filters, UINT8 *p_s
**
** Function bta_pan_ci_set_mfilters
**
-** Description This function is called to set protocol filters
-**
+** Description This function is called to set protocol filters
+**
**
-** Returns void
+** Returns void
**
*******************************************************************************/
void bta_pan_ci_set_pfilters(UINT16 handle, UINT16 num_filters, UINT16 *p_start_array, UINT16 *p_end_array)