summaryrefslogtreecommitdiffstats
path: root/stack/bnep/bnep_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack/bnep/bnep_utils.c')
-rw-r--r--stack/bnep/bnep_utils.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/stack/bnep/bnep_utils.c b/stack/bnep/bnep_utils.c
index c88a9b443..8c76b0028 100644
--- a/stack/bnep/bnep_utils.c
+++ b/stack/bnep/bnep_utils.c
@@ -197,7 +197,6 @@ void bnep_send_conn_req (tBNEP_CONN *p_bcb)
UINT16_TO_BE_STREAM (p, p_bcb->dst_uuid.uu.uuid16);
UINT16_TO_BE_STREAM (p, p_bcb->src_uuid.uu.uuid16);
}
-#if (defined (BNEP_SUPPORTS_ALL_UUID_LENGTHS) && BNEP_SUPPORTS_ALL_UUID_LENGTHS == TRUE)
else if (p_bcb->dst_uuid.len == 4)
{
UINT32_TO_BE_STREAM (p, p_bcb->dst_uuid.uu.uuid32);
@@ -210,7 +209,6 @@ void bnep_send_conn_req (tBNEP_CONN *p_bcb)
memcpy (p, p_bcb->src_uuid.uu.uuid128, p_bcb->dst_uuid.len);
p += p_bcb->dst_uuid.len;
}
-#endif
p_buf->len = (UINT16)(p - p_start);
@@ -268,7 +266,6 @@ void bnep_send_conn_responce (tBNEP_CONN *p_bcb, UINT16 resp_code)
*******************************************************************************/
void bnepu_send_peer_our_filters (tBNEP_CONN *p_bcb)
{
-#if (defined (BNEP_SUPPORTS_PROT_FILTERS) && BNEP_SUPPORTS_PROT_FILTERS == TRUE)
BT_HDR *p_buf;
UINT8 *p;
UINT16 xx;
@@ -305,7 +302,6 @@ void bnepu_send_peer_our_filters (tBNEP_CONN *p_bcb)
/* Start timer waiting for setup response */
btu_start_timer (&p_bcb->conn_tle, BTU_TTYPE_BNEP, BNEP_FILTER_SET_TIMEOUT);
-#endif
}
@@ -320,7 +316,6 @@ void bnepu_send_peer_our_filters (tBNEP_CONN *p_bcb)
*******************************************************************************/
void bnepu_send_peer_our_multi_filters (tBNEP_CONN *p_bcb)
{
-#if (defined (BNEP_SUPPORTS_MULTI_FILTERS) && BNEP_SUPPORTS_MULTI_FILTERS == TRUE)
BT_HDR *p_buf;
UINT8 *p;
UINT16 xx;
@@ -359,7 +354,6 @@ void bnepu_send_peer_our_multi_filters (tBNEP_CONN *p_bcb)
/* Start timer waiting for setup response */
btu_start_timer (&p_bcb->conn_tle, BTU_TTYPE_BNEP, BNEP_FILTER_SET_TIMEOUT);
-#endif
}
@@ -637,7 +631,6 @@ void bnep_process_setup_conn_req (tBNEP_CONN *p_bcb, UINT8 *p_setup, UINT8 len)
return;
}
}
-#if (defined (BNEP_SUPPORTS_ALL_UUID_LENGTHS) && BNEP_SUPPORTS_ALL_UUID_LENGTHS == TRUE)
else if (p_bcb->dst_uuid.len == 4)
{
BE_STREAM_TO_UINT32 (p_bcb->src_uuid.uu.uuid32, p_setup);
@@ -650,7 +643,6 @@ void bnep_process_setup_conn_req (tBNEP_CONN *p_bcb, UINT8 *p_setup, UINT8 len)
memcpy (p_bcb->dst_uuid.uu.uuid128, p_setup, p_bcb->dst_uuid.len);
p_setup += p_bcb->dst_uuid.len;
}
-#endif
else
{
BNEP_TRACE_ERROR ("BNEP - Bad UID len %d in ConnReq", p_bcb->dst_uuid.len);
@@ -902,7 +894,6 @@ UINT8 *bnep_process_control_packet (tBNEP_CONN *p_bcb, UINT8 *p, UINT16 *rem_len
*******************************************************************************/
void bnepu_process_peer_filter_set (tBNEP_CONN *p_bcb, UINT8 *p_filters, UINT16 len)
{
-#if (defined (BNEP_SUPPORTS_PROT_FILTERS) && BNEP_SUPPORTS_PROT_FILTERS == TRUE)
UINT16 num_filters = 0;
UINT16 xx, resp_code = BNEP_FILTER_CRL_OK;
UINT16 start, end;
@@ -966,9 +957,6 @@ void bnepu_process_peer_filter_set (tBNEP_CONN *p_bcb, UINT8 *p_filters, UINT16
}
bnepu_send_peer_filter_rsp (p_bcb, resp_code);
-#else
- bnepu_send_peer_filter_rsp (p_bcb, BNEP_FILTER_CRL_UNSUPPORTED);
-#endif
}
@@ -984,7 +972,6 @@ void bnepu_process_peer_filter_set (tBNEP_CONN *p_bcb, UINT8 *p_filters, UINT16
*******************************************************************************/
void bnepu_process_peer_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
{
-#if (defined (BNEP_SUPPORTS_PROT_FILTERS) && BNEP_SUPPORTS_PROT_FILTERS == TRUE)
UINT16 resp_code;
tBNEP_RESULT result;
@@ -1017,13 +1004,8 @@ void bnepu_process_peer_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
if (bnep_cb.p_filter_ind_cb)
(*bnep_cb.p_filter_ind_cb) (p_bcb->handle, FALSE, result, 0, NULL);
-
- return;
-#endif
}
-
-
/*******************************************************************************
**
** Function bnepu_process_multicast_filter_rsp
@@ -1036,7 +1018,6 @@ void bnepu_process_peer_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
*******************************************************************************/
void bnepu_process_multicast_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
{
-#if (defined (BNEP_SUPPORTS_MULTI_FILTERS) && BNEP_SUPPORTS_MULTI_FILTERS == TRUE)
UINT16 resp_code;
tBNEP_RESULT result;
@@ -1069,13 +1050,8 @@ void bnepu_process_multicast_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
if (bnep_cb.p_mfilter_ind_cb)
(*bnep_cb.p_mfilter_ind_cb) (p_bcb->handle, FALSE, result, 0, NULL);
-
- return;
-#endif
}
-
-
/*******************************************************************************
**
** Function bnepu_process_peer_multicast_filter_set
@@ -1089,7 +1065,6 @@ void bnepu_process_multicast_filter_rsp (tBNEP_CONN *p_bcb, UINT8 *p_data)
*******************************************************************************/
void bnepu_process_peer_multicast_filter_set (tBNEP_CONN *p_bcb, UINT8 *p_filters, UINT16 len)
{
-#if (defined (BNEP_SUPPORTS_MULTI_FILTERS) && BNEP_SUPPORTS_MULTI_FILTERS == TRUE)
UINT16 resp_code = BNEP_FILTER_CRL_OK;
UINT16 num_filters, xx;
UINT8 *p_temp_filters, null_bda[BD_ADDR_LEN] = {0,0,0,0,0,0};
@@ -1156,9 +1131,6 @@ void bnepu_process_peer_multicast_filter_set (tBNEP_CONN *p_bcb, UINT8 *p_filter
if (bnep_cb.p_mfilter_ind_cb)
(*bnep_cb.p_mfilter_ind_cb) (p_bcb->handle, TRUE, 0, len, p_filters);
-#else
- bnepu_send_peer_multicast_filter_rsp (p_bcb, BNEP_FILTER_CRL_UNSUPPORTED);
-#endif
}
@@ -1321,7 +1293,6 @@ tBNEP_RESULT bnep_is_packet_allowed (tBNEP_CONN *p_bcb,
BOOLEAN fw_ext_present,
UINT8 *p_data)
{
-#if (defined (BNEP_SUPPORTS_PROT_FILTERS) && BNEP_SUPPORTS_PROT_FILTERS == TRUE)
if (p_bcb->rcvd_num_filters)
{
UINT16 i, proto;
@@ -1359,9 +1330,7 @@ tBNEP_RESULT bnep_is_packet_allowed (tBNEP_CONN *p_bcb,
return BNEP_IGNORE_CMD;
}
}
-#endif
-#if (defined (BNEP_SUPPORTS_MULTI_FILTERS) && BNEP_SUPPORTS_MULTI_FILTERS == TRUE)
/* Ckeck for multicast address filtering */
if ((p_dest_addr[0] & 0x01) &&
p_bcb->rcvd_mcast_filters)
@@ -1392,15 +1361,10 @@ tBNEP_RESULT bnep_is_packet_allowed (tBNEP_CONN *p_bcb,
return BNEP_IGNORE_CMD;
}
}
-#endif
return BNEP_SUCCESS;
}
-
-
-
-
/*******************************************************************************
**
** Function bnep_get_uuid32
@@ -1425,41 +1389,3 @@ UINT32 bnep_get_uuid32 (tBT_UUID *src_uuid)
return result;
}
}
-
-
-
-
-/*******************************************************************************
-**
-** Function bnep_dump_status
-**
-** Description This function dumps the bnep control block and connection
-** blocks information
-**
-** Returns none
-**
-*******************************************************************************/
-void bnep_dump_status (void)
-{
-#if (defined (BNEP_SUPPORTS_DEBUG_DUMP) && BNEP_SUPPORTS_DEBUG_DUMP == TRUE)
- UINT16 i;
- char buff[200];
- tBNEP_CONN *p_bcb;
-
- BNEP_TRACE_DEBUG ("profile registered %d, trace %d", bnep_cb.profile_registered, bnep_cb.trace_level);
-
- for (i = 0, p_bcb = bnep_cb.bcb; i < BNEP_MAX_CONNECTIONS; i++, p_bcb++)
- {
- sprintf (buff, "%d state %d, flags 0x%x, cid %d, pfilts %d, mfilts %d, src 0x%x, dst 0x%x, BD %x.%x.%x.%x.%x.%x",
- i, p_bcb->con_state, p_bcb->con_flags, p_bcb->l2cap_cid,
- p_bcb->rcvd_num_filters, p_bcb->rcvd_mcast_filters,
- p_bcb->src_uuid.uu.uuid16, p_bcb->dst_uuid.uu.uuid16,
- p_bcb->rem_bda[0], p_bcb->rem_bda[1], p_bcb->rem_bda[2],
- p_bcb->rem_bda[3], p_bcb->rem_bda[4], p_bcb->rem_bda[5]);
-
- BNEP_TRACE_DEBUG (buff);
- }
-#endif
-}
-
-