summaryrefslogtreecommitdiffstats
path: root/stack/bnep
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/bnep
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/bnep')
-rw-r--r--stack/bnep/bnep_api.c41
-rw-r--r--stack/bnep/bnep_int.h39
-rw-r--r--stack/bnep/bnep_main.c41
-rw-r--r--stack/bnep/bnep_utils.c42
4 files changed, 108 insertions, 55 deletions
diff --git a/stack/bnep/bnep_api.c b/stack/bnep/bnep_api.c
index 7c4dee9..fbbf179 100644
--- a/stack/bnep/bnep_api.c
+++ b/stack/bnep/bnep_api.c
@@ -1,13 +1,26 @@
-/*****************************************************************************/
-/* */
-/* Name: bnep_api.c */
-/* */
-/* Description: this file contains the BNEP API code */
-/* */
-/* */
-/* Copyright (c) 2001-2004, WIDCOMM Inc., All Rights Reserved. */
-/* WIDCOMM Bluetooth Core. Proprietary and confidential. */
-/*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2001-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 the BNEP API code
+ *
+ ******************************************************************************/
#include <string.h>
#include "bnep_api.h"
@@ -46,7 +59,7 @@ void BNEP_Init (void)
** its callbacks with BNEP
**
** Parameters: p_reg_info - contains all callback function pointers
-**
+**
**
** Returns BNEP_SUCCESS if registered successfully
** BNEP_FAILURE if connection state callback is missing
@@ -65,7 +78,7 @@ tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info)
bnep_cb.p_filter_ind_cb = p_reg_info->p_filter_ind_cb;
bnep_cb.p_mfilter_ind_cb = p_reg_info->p_mfilter_ind_cb;
bnep_cb.p_tx_data_flow_cb = p_reg_info->p_tx_data_flow_cb;
-
+
if (bnep_register_with_l2cap ())
return BNEP_SECURITY_FAIL;
@@ -83,7 +96,7 @@ tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info)
** its callbacks.
**
** Parameters: void
-**
+**
**
** Returns void
**
@@ -214,7 +227,7 @@ tBNEP_RESULT BNEP_Connect (BD_ADDR p_rem_bda,
** Function BNEP_ConnectResp
**
** Description This function is called in responce to connection indication
-**
+**
**
** Parameters: handle - handle given in the connection indication
** resp - responce for the connection indication
diff --git a/stack/bnep/bnep_int.h b/stack/bnep/bnep_int.h
index a849052..528c809 100644
--- a/stack/bnep/bnep_int.h
+++ b/stack/bnep/bnep_int.h
@@ -1,14 +1,27 @@
-/****************************************************************************/
-/* */
-/* Name: bnep_int.h */
-/* */
-/* Function this file contains internally used BNEP definitions */
-/* */
-/* */
-/* Copyright (c) 2001-2004, WIDCOMM Inc., All Rights Reserved. */
-/* WIDCOMM Bluetooth Core. Proprietary and confidential. */
-/* */
-/****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2001-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 internally used BNEP definitions
+ *
+ ******************************************************************************/
+
#ifndef BNEP_INT_H
#define BNEP_INT_H
@@ -206,9 +219,9 @@ extern void bnepu_release_bcb (tBNEP_CONN *p_bcb);
extern void bnepu_send_peer_our_filters (tBNEP_CONN *p_bcb);
extern void bnepu_send_peer_our_multi_filters (tBNEP_CONN *p_bcb);
extern BOOLEAN bnepu_does_dest_support_prot (tBNEP_CONN *p_bcb, UINT16 protocol);
-extern void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
+extern void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
UINT8 *p_src_addr, UINT8 *p_dest_addr, BOOLEAN ext_bit);
-extern void test_bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
+extern void test_bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
UINT8 *p_src_addr, UINT8 *p_dest_addr, UINT8 type);
extern tBNEP_CONN *bnepu_get_route_to_dest (UINT8 *p_bda);
diff --git a/stack/bnep/bnep_main.c b/stack/bnep/bnep_main.c
index fca0d22..12c9da0 100644
--- a/stack/bnep/bnep_main.c
+++ b/stack/bnep/bnep_main.c
@@ -1,13 +1,26 @@
-/*****************************************************************************
-**
-** Name: bnep_main.c
-**
-** Description: this file contains the main BNEP functions
-**
-**
-** Copyright (c) 2001-2008, Broadcom Corp., All Rights Reserved.
-** WIDCOMM Bluetooth Core. Proprietary and confidential.
-******************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2001-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 the main BNEP functions
+ *
+ ******************************************************************************/
#include "bt_target.h"
#include <stdlib.h>
@@ -99,7 +112,7 @@ tBNEP_RESULT bnep_register_with_l2cap (void)
**
** Description This function handles an inbound connection indication
** from L2CAP. This is the case where we are acting as a
-** server.
+** server.
**
** Returns void
**
@@ -113,7 +126,7 @@ static void bnep_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UI
if (!(bnep_cb.profile_registered) || (p_bcb)
|| ((p_bcb = bnepu_allocate_bcb(bd_addr)) == NULL))
{
- L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_NO_PSM, 0);
+ L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_NO_PSM, 0);
return;
}
@@ -124,7 +137,7 @@ static void bnep_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UI
p_bcb->l2cap_cid = l2cap_cid;
/* Send response to the L2CAP layer. */
- L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
/* Send a Configuration Request. */
L2CA_ConfigReq (l2cap_cid, &bnep_cb.l2cap_my_cfg);
@@ -385,7 +398,7 @@ static void bnep_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
**
** Function bnep_congestion_ind
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** congestion status changes
**
*******************************************************************************/
diff --git a/stack/bnep/bnep_utils.c b/stack/bnep/bnep_utils.c
index 22c2730..205eeeb 100644
--- a/stack/bnep/bnep_utils.c
+++ b/stack/bnep/bnep_utils.c
@@ -1,13 +1,27 @@
-/*****************************************************************************/
-/* */
-/* Name: bnep_utils.c */
-/* */
-/* Description: this file contains BNEP utility functions */
-/* */
-/* */
-/* Copyright (c) 2001-2004, WIDCOMM Inc., All Rights Reserved. */
-/* WIDCOMM Bluetooth Core. Proprietary and confidential. */
-/*****************************************************************************/
+/******************************************************************************
+ *
+ * Copyright (C) 2001-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 BNEP utility functions
+ *
+ ******************************************************************************/
+
#include <stdio.h>
#include <string.h>
#include "gki.h"
@@ -469,7 +483,7 @@ void bnepu_check_send_packet (tBNEP_CONN *p_bcb, BT_HDR *p_buf)
** Returns void
**
*******************************************************************************/
-void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
+void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
UINT8 *p_src_addr, UINT8 *p_dest_addr, BOOLEAN fw_ext_present)
{
UINT8 ext_bit, *p = (UINT8 *)NULL;
@@ -650,7 +664,7 @@ void bnep_process_setup_conn_req (tBNEP_CONN *p_bcb, UINT8 *p_setup, UINT8 len)
bnep_sec_check_complete (p_bcb->rem_bda, p_bcb, BTM_SUCCESS);
else
#endif
- btm_sec_mx_access_request (p_bcb->rem_bda, BT_PSM_BNEP, FALSE,
+ btm_sec_mx_access_request (p_bcb->rem_bda, BT_PSM_BNEP, FALSE,
BTM_SEC_PROTO_BNEP, bnep_get_uuid32(&(p_bcb->src_uuid)),
&bnep_sec_check_complete, p_bcb);
@@ -960,7 +974,7 @@ void bnepu_process_peer_filter_set (tBNEP_CONN *p_bcb, UINT8 *p_filters, UINT16
** Function bnepu_process_peer_filter_rsp
**
** Description This function processes a peer's filter control
-** 'response' message.
+** 'response' message.
**
** Returns void
**
@@ -1012,7 +1026,7 @@ void bnepu_process_peer_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
** Function bnepu_process_multicast_filter_rsp
**
** Description This function processes multicast filter control
-** 'response' message.
+** 'response' message.
**
** Returns void
**