summaryrefslogtreecommitdiffstats
path: root/stack
diff options
context:
space:
mode:
Diffstat (limited to 'stack')
-rw-r--r--stack/Android.mk4
-rw-r--r--stack/a2dp/a2d_api.c16
-rw-r--r--stack/a2dp/a2d_int.h2
-rw-r--r--stack/a2dp/a2d_sbc.c4
-rw-r--r--stack/avct/avct_api.c24
-rw-r--r--stack/avct/avct_ccb.c12
-rw-r--r--stack/avct/avct_defs.h4
-rw-r--r--stack/avct/avct_int.h4
-rw-r--r--stack/avct/avct_l2c.c24
-rw-r--r--stack/avct/avct_lcb.c22
-rw-r--r--stack/avct/avct_lcb_act.c40
-rw-r--r--stack/avdt/avdt_ad.c34
-rw-r--r--stack/avdt/avdt_api.c36
-rw-r--r--stack/avdt/avdt_ccb.c74
-rw-r--r--stack/avdt/avdt_ccb_act.c100
-rw-r--r--stack/avdt/avdt_defs.h6
-rw-r--r--stack/avdt/avdt_l2c.c46
-rw-r--r--stack/avdt/avdt_msg.c110
-rw-r--r--stack/avdt/avdt_scb.c22
-rw-r--r--stack/avdt/avdt_scb_act.c70
-rw-r--r--stack/avrc/avrc_api.c28
-rw-r--r--stack/avrc/avrc_int.h4
-rw-r--r--stack/avrc/avrc_sdp.c10
-rw-r--r--stack/bnep/bnep_api.c8
-rw-r--r--stack/bnep/bnep_int.h4
-rw-r--r--stack/bnep/bnep_main.c8
-rw-r--r--stack/bnep/bnep_utils.c8
-rw-r--r--stack/btm/btm_acl.c70
-rw-r--r--stack/btm/btm_ble.c204
-rw-r--r--stack/btm/btm_ble_addr.c64
-rw-r--r--stack/btm/btm_ble_bgconn.c62
-rw-r--r--stack/btm/btm_ble_gap.c256
-rw-r--r--stack/btm/btm_ble_int.h10
-rw-r--r--stack/btm/btm_dev.c20
-rw-r--r--stack/btm/btm_devctl.c92
-rw-r--r--stack/btm/btm_inq.c224
-rw-r--r--stack/btm/btm_int.h32
-rw-r--r--stack/btm/btm_pm.c20
-rw-r--r--stack/btm/btm_sco.c84
-rwxr-xr-x[-rw-r--r--]stack/btm/btm_sec.c92
-rw-r--r--stack/btu/btu_hcif.c260
-rw-r--r--stack/btu/btu_init.c6
-rw-r--r--stack/btu/btu_task.c12
-rw-r--r--stack/gatt/att_protocol.c66
-rw-r--r--stack/gatt/gatt_api.c214
-rw-r--r--stack/gatt/gatt_attr.c28
-rw-r--r--stack/gatt/gatt_auth.c34
-rw-r--r--stack/gatt/gatt_cl.c184
-rw-r--r--stack/gatt/gatt_db.c200
-rw-r--r--stack/gatt/gatt_int.h80
-rw-r--r--stack/gatt/gatt_main.c76
-rw-r--r--stack/gatt/gatt_sr.c198
-rw-r--r--stack/gatt/gatt_utils.c308
-rw-r--r--stack/hcic/hciblecmds.c30
-rw-r--r--stack/hcic/hcicmds.c22
-rw-r--r--stack/hid/hid_conn.h2
-rw-r--r--stack/hid/hidh_api.c44
-rw-r--r--stack/hid/hidh_conn.c48
-rw-r--r--stack/hid/hidh_int.h4
-rw-r--r--stack/include/a2d_api.h6
-rw-r--r--stack/include/avct_api.h20
-rw-r--r--stack/include/avdt_api.h30
-rw-r--r--stack/include/avdtc_api.h28
-rw-r--r--stack/include/avrc_api.h50
-rw-r--r--stack/include/avrc_defs.h54
-rw-r--r--stack/include/bnep_api.h10
-rw-r--r--stack/include/bt_types.h26
-rw-r--r--stack/include/btm_api.h88
-rw-r--r--stack/include/btm_ble_api.h104
-rw-r--r--stack/include/btu.h12
-rw-r--r--stack/include/gatt_api.h242
-rw-r--r--stack/include/gattdefs.h8
-rw-r--r--stack/include/goep_fs.h30
-rw-r--r--stack/include/hcidefs.h72
-rw-r--r--stack/include/hcimsgs.h88
-rw-r--r--stack/include/hiddefs.h4
-rw-r--r--stack/include/hidh_api.h10
-rw-r--r--stack/include/l2c_api.h64
-rw-r--r--stack/include/l2cdefs.h4
-rw-r--r--stack/include/mca_api.h18
-rw-r--r--stack/include/mca_defs.h2
-rw-r--r--stack/include/obx_api.h70
-rw-r--r--stack/include/pan_api.h24
-rw-r--r--stack/include/rfcdefs.h24
-rw-r--r--stack/include/sdpdefs.h6
-rw-r--r--stack/include/smp_api.h34
-rw-r--r--stack/include/uipc_msg.h24
-rw-r--r--stack/include/wcassert.h14
-rw-r--r--stack/l2cap/l2c_api.c100
-rw-r--r--stack/l2cap/l2c_ble.c38
-rw-r--r--stack/l2cap/l2c_csm.c38
-rw-r--r--stack/l2cap/l2c_fcr.c50
-rw-r--r--stack/l2cap/l2c_int.h6
-rw-r--r--stack/l2cap/l2c_link.c66
-rw-r--r--stack/l2cap/l2c_main.c20
-rw-r--r--stack/l2cap/l2c_ucd.c36
-rw-r--r--stack/l2cap/l2c_utils.c100
-rw-r--r--stack/mcap/mca_api.c16
-rw-r--r--stack/mcap/mca_cact.c16
-rw-r--r--stack/mcap/mca_csm.c20
-rw-r--r--stack/mcap/mca_dact.c6
-rw-r--r--stack/mcap/mca_l2c.c40
-rw-r--r--stack/pan/pan_api.c24
-rw-r--r--stack/pan/pan_main.c4
-rw-r--r--stack/pan/pan_utils.c34
-rw-r--r--stack/rfcomm/port_rfc.c58
-rw-r--r--stack/rfcomm/port_utils.c36
-rw-r--r--stack/rfcomm/rfc_int.h32
-rw-r--r--stack/rfcomm/rfc_l2cap_if.c22
-rw-r--r--stack/rfcomm/rfc_mx_fsm.c28
-rw-r--r--stack/rfcomm/rfc_port_fsm.c80
-rw-r--r--stack/rfcomm/rfc_port_if.c48
-rw-r--r--stack/rfcomm/rfc_ts_frames.c42
-rw-r--r--stack/rfcomm/rfc_utils.c28
-rwxr-xr-x[-rw-r--r--]stack/sdp/sdp_api.c0
-rw-r--r--stack/sdp/sdp_db.c2
-rw-r--r--stack/sdp/sdp_discovery.c6
-rw-r--r--stack/sdp/sdp_server.c4
-rw-r--r--stack/sdp/sdp_utils.c14
-rw-r--r--stack/smp/aes.c40
-rw-r--r--stack/smp/smp_act.c66
-rw-r--r--stack/smp/smp_api.c30
-rw-r--r--stack/smp/smp_cmac.c42
-rw-r--r--stack/smp/smp_int.h24
-rw-r--r--stack/smp/smp_keys.c128
-rw-r--r--stack/smp/smp_l2c.c20
-rw-r--r--stack/smp/smp_main.c78
-rw-r--r--stack/smp/smp_utils.c4
128 files changed, 3191 insertions, 3191 deletions
diff --git a/stack/Android.mk b/stack/Android.mk
index 968cfdb..f209fb7 100644
--- a/stack/Android.mk
+++ b/stack/Android.mk
@@ -34,7 +34,7 @@ LOCAL_CFLAGS += $(bdroid_CFLAGS)
ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
LOCAL_CFLAGS += \
- -DBOARD_HAVE_BLUETOOTH_BCM
+ -DBOARD_HAVE_BLUETOOTH_BCM
endif
LOCAL_PRELINK_MODULE:=false
@@ -130,7 +130,7 @@ LOCAL_SRC_FILES:= \
./l2cap/l2c_link.c \
./l2cap/l2c_ble.c
-LOCAL_MODULE := libbt-brcm_stack
+LOCAL_MODULE := libbt-brcm_stack
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_SHARED_LIBRARIES := libcutils libc
diff --git a/stack/a2dp/a2d_api.c b/stack/a2dp/a2d_api.c
index b77c60c..dbff646 100644
--- a/stack/a2dp/a2d_api.c
+++ b/stack/a2dp/a2d_api.c
@@ -54,7 +54,7 @@ static void a2d_sdp_cback(UINT16 status)
do
{
/* get next record; if none found, we're done */
- if ((p_rec = SDP_FindServiceInDb(a2d_cb.find.p_db,
+ if ((p_rec = SDP_FindServiceInDb(a2d_cb.find.p_db,
a2d_cb.find.service_uuid, p_rec)) == NULL)
{
break;
@@ -112,7 +112,7 @@ static void a2d_sdp_cback(UINT16 status)
**
** Function a2d_set_avdt_sdp_ver
**
-** Description This function allows the script wrapper to change the
+** Description This function allows the script wrapper to change the
** avdt version of a2dp.
**
** Returns None
@@ -172,7 +172,7 @@ tA2D_STATUS A2D_AddRecord(UINT16 service_uuid, char *p_service_name, char *p_pro
result &= SDP_AddServiceClassIdList(sdp_handle, 1, &service_uuid);
memset((void*) proto_list, 0 , A2D_NUM_PROTO_ELEMS*sizeof(tSDP_PROTOCOL_ELEM));
-
+
/* add protocol descriptor list */
proto_list[0].protocol_uuid = UUID_PROTOCOL_L2CAP;
proto_list[0].num_params = 1;
@@ -239,7 +239,7 @@ tA2D_STATUS A2D_AddRecord(UINT16 service_uuid, char *p_service_name, char *p_pro
**
** p_db: Pointer to the information to initialize
** the discovery database.
-**
+**
** p_cback: Pointer to the A2D_FindService()
** callback function.
**
@@ -269,7 +269,7 @@ tA2D_STATUS A2D_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
p_db == NULL || p_db->p_db == NULL || p_cback == NULL)
return A2D_INVALID_PARAMS;
- if( a2d_cb.find.service_uuid == UUID_SERVCLASS_AUDIO_SOURCE ||
+ if( a2d_cb.find.service_uuid == UUID_SERVCLASS_AUDIO_SOURCE ||
a2d_cb.find.service_uuid == UUID_SERVCLASS_AUDIO_SINK)
return A2D_BUSY;
@@ -360,9 +360,9 @@ UINT8 A2D_BitsSet(UINT8 num)
** Function A2D_Init
**
** Description This function is called to initialize the control block
-** for this layer. It must be called before accessing any
+** for this layer. It must be called before accessing any
** other API functions for this layer. It is typically called
-** once during the start up of the stack.
+** once during the start up of the stack.
**
** Returns void
**
@@ -372,7 +372,7 @@ void A2D_Init(void)
memset(&a2d_cb, 0, sizeof(tA2D_CB));
a2d_cb.avdt_sdp_ver = AVDT_VERSION;
-
+
#if defined(A2D_INITIAL_TRACE_LEVEL)
a2d_cb.trace_level = A2D_INITIAL_TRACE_LEVEL;
#else
diff --git a/stack/a2dp/a2d_int.h b/stack/a2dp/a2d_int.h
index b90b701..07cf34c 100644
--- a/stack/a2dp/a2d_int.h
+++ b/stack/a2dp/a2d_int.h
@@ -29,7 +29,7 @@
*****************************************************************************/
/* Control block used by A2D_FindService(). */
-typedef struct
+typedef struct
{
tA2D_FIND_CBACK *p_cback; /* pointer to application callback */
tSDP_DISCOVERY_DB *p_db; /* pointer to discovery database */
diff --git a/stack/a2dp/a2d_sbc.c b/stack/a2dp/a2d_sbc.c
index 77549ee..cec335a 100644
--- a/stack/a2dp/a2d_sbc.c
+++ b/stack/a2dp/a2d_sbc.c
@@ -2,7 +2,7 @@
**
** Name: a2d_sbc.c
**
-** Description:utility functions to help build and parse SBC
+** Description:utility functions to help build and parse SBC
** Codec Information Element and Media Payload.
** Copyright (c) 2002-2004, WIDCOMM Inc., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
@@ -46,7 +46,7 @@
*
* if(index > 0)
* {
- * p = &u8frame[base_index];
+ * p = &u8frame[base_index];
* if((index&1)&&(u16PacketLength > (base_index+index*2)))
* {
* // odd index: swap 2 bytes
diff --git a/stack/avct/avct_api.c b/stack/avct/avct_api.c
index 90edb3d..d1d5cee 100644
--- a/stack/avct/avct_api.c
+++ b/stack/avct/avct_api.c
@@ -34,7 +34,7 @@ tAVCT_CB avct_cb;
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVCTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -45,7 +45,7 @@ void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask)
/* register PSM with L2CAP */
L2CA_Register(AVCT_PSM, (tL2CAP_APPL_INFO *) &avct_l2c_appl);
-
+
/* set security level */
BTM_SetSecurityLevel(TRUE, "", BTM_SEC_SERVICE_AVCTP, sec_mask, AVCT_PSM, 0, 0);
BTM_SetSecurityLevel(FALSE, "", BTM_SEC_SERVICE_AVCTP, sec_mask, AVCT_PSM, 0, 0);
@@ -86,7 +86,7 @@ void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask)
** application in the system. Before this function can be
** called, all connections must be removed with
** AVCT_RemoveConn().
-**
+**
**
** Returns void
**
@@ -108,9 +108,9 @@ void AVCT_Deregister(void)
** the p_cc->role parameter. When this function is called to
** create an initiator connection, an AVCTP connection to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -173,7 +173,7 @@ UINT16 AVCT_CreateConn(UINT8 *p_handle, tAVCT_CC *p_cc, BD_ADDR peer_addr)
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -212,9 +212,9 @@ UINT16 AVCT_RemoveConn(UINT8 handle)
** the role parameter. When this function is called to
** create an initiator connection, the Browse channel to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -289,7 +289,7 @@ UINT16 AVCT_CreateBrowse (UINT8 handle, UINT8 role)
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -322,7 +322,7 @@ UINT16 AVCT_RemoveBrowse (UINT8 handle)
**
** Function AVCT_GetBrowseMtu
**
-** Description Get the peer_mtu for the AVCTP Browse channel of the given
+** Description Get the peer_mtu for the AVCTP Browse channel of the given
** connection.
**
** Returns the peer browsing channel MTU.
@@ -346,7 +346,7 @@ UINT16 AVCT_GetBrowseMtu (UINT8 handle)
**
** Function AVCT_GetPeerMtu
**
-** Description Get the peer_mtu for the AVCTP channel of the given
+** Description Get the peer_mtu for the AVCTP channel of the given
** connection.
**
** Returns the peer MTU size.
@@ -423,7 +423,7 @@ UINT16 AVCT_MsgReq(UINT8 handle, UINT8 label, UINT8 cr, BT_HDR *p_msg)
ul_msg.p_buf = p_msg;
ul_msg.p_ccb = p_ccb;
ul_msg.label = label;
- ul_msg.cr = cr;
+ ul_msg.cr = cr;
#if (AVCT_BROWSE_INCLUDED == TRUE)
/* send msg event to bcb */
diff --git a/stack/avct/avct_ccb.c b/stack/avct/avct_ccb.c
index 1de4652..89465a2 100644
--- a/stack/avct/avct_ccb.c
+++ b/stack/avct/avct_ccb.c
@@ -21,7 +21,7 @@
** Function avct_ccb_alloc
**
** Description Allocate a connection control block; copy parameters to ccb.
-**
+**
**
** Returns pointer to the ccb, or NULL if none could be allocated.
**
@@ -41,7 +41,7 @@ tAVCT_CCB *avct_ccb_alloc(tAVCT_CC *p_cc)
break;
}
}
-
+
if (i == AVCT_NUM_CONN)
{
/* out of ccbs */
@@ -57,7 +57,7 @@ tAVCT_CCB *avct_ccb_alloc(tAVCT_CC *p_cc)
**
** Description Deallocate a connection control block and call application
** callback.
-**
+**
**
** Returns void.
**
@@ -91,7 +91,7 @@ void avct_ccb_dealloc(tAVCT_CCB *p_ccb, UINT8 event, UINT16 result, BD_ADDR bd_a
** Function avct_ccb_to_idx
**
** Description Given a pointer to an ccb, return its index.
-**
+**
**
** Returns Index of ccb.
**
@@ -107,7 +107,7 @@ UINT8 avct_ccb_to_idx(tAVCT_CCB *p_ccb)
** Function avct_ccb_by_idx
**
** Description Return ccb pointer based on ccb index (or handle).
-**
+**
**
** Returns pointer to the ccb, or NULL if none found.
**
@@ -126,7 +126,7 @@ tAVCT_CCB *avct_ccb_by_idx(UINT8 idx)
{
p_ccb = NULL;
AVCT_TRACE_WARNING1("ccb %d not allocated", idx);
- }
+ }
}
else
{
diff --git a/stack/avct/avct_defs.h b/stack/avct/avct_defs.h
index 4496acd..dd03c1e 100644
--- a/stack/avct/avct_defs.h
+++ b/stack/avct/avct_defs.h
@@ -5,7 +5,7 @@
** Description: This contains constants definitions and other information
** from the AVCTP specification. This file is intended for
** use internal to AVCT only.
-**
+**
**
** Copyright (c) 2003-2004, WIDCOMM Inc., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
@@ -47,5 +47,5 @@
#define AVCT_PRS_PKT_TYPE(p, type) \
type = (*(p) >> 2) & 3;
-
+
#endif /* AVCT_DEFS_H */
diff --git a/stack/avct/avct_int.h b/stack/avct/avct_int.h
index 193ecb1..d67c404 100644
--- a/stack/avct/avct_int.h
+++ b/stack/avct/avct_int.h
@@ -3,7 +3,7 @@
** Name: avct_int.h
**
** Description: This file contains interfaces which are internal to AVCTP.
-**
+**
**
** Copyright (c) 2003-2008, Broadcom Corp., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
@@ -104,7 +104,7 @@ typedef struct {
UINT8 label;
UINT8 cr;
} tAVCT_UL_MSG;
-
+
/* union associated with lcb state machine events */
typedef union {
tAVCT_UL_MSG ul_msg;
diff --git a/stack/avct/avct_l2c.c b/stack/avct/avct_l2c.c
index b5f10a7..cf1a652 100644
--- a/stack/avct/avct_l2c.c
+++ b/stack/avct/avct_l2c.c
@@ -82,7 +82,7 @@ static BOOLEAN avct_l2c_is_passive (tAVCT_LCB *p_lcb)
** Function avct_l2c_connect_ind_cback
**
** Description This is the L2CAP connect indication callback function.
-**
+**
**
** Returns void
**
@@ -118,14 +118,14 @@ void avct_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
AVCT_TRACE_DEBUG1("avct_l2c_connect_ind_cback conflict_lcid:0x%x", p_lcb->conflict_lcid);
}
}
-
+
if(p_lcb)
{
AVCT_TRACE_DEBUG3("avct_l2c_connect_ind_cback: 0x%x, res: %d, ch_state: %d",
lcid, result, p_lcb->ch_state);
}
/* Send L2CAP connect rsp */
- L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
+ L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -155,7 +155,7 @@ void avct_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
** Function avct_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -216,7 +216,7 @@ void avct_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avct_l2c_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -266,7 +266,7 @@ void avct_l2c_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avct_l2c_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -296,7 +296,7 @@ void avct_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
/* if first config ind */
if ((p_lcb->ch_flags & AVCT_L2C_CFG_IND_DONE) == 0)
- {
+ {
/* update flags */
p_lcb->ch_flags |= AVCT_L2C_CFG_IND_DONE;
@@ -316,7 +316,7 @@ void avct_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avct_l2c_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -335,7 +335,7 @@ void avct_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
/* send L2CAP disconnect response */
L2CA_DisconnectRsp(lcid);
}
-
+
avct_lcb_event(p_lcb, AVCT_LCB_LL_CLOSE_EVT, (tAVCT_LCB_EVT *) &result);
AVCT_TRACE_DEBUG1("ch_state di: %d ", p_lcb->ch_state);
}
@@ -346,7 +346,7 @@ void avct_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function avct_l2c_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -375,7 +375,7 @@ void avct_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avct_l2c_congestion_ind_cback
**
** Description This is the L2CAP congestion indication callback function.
-**
+**
**
** Returns void
**
@@ -397,7 +397,7 @@ void avct_l2c_congestion_ind_cback(UINT16 lcid, BOOLEAN is_congested)
** Function avct_l2c_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
diff --git a/stack/avct/avct_lcb.c b/stack/avct/avct_lcb.c
index abbe1ad..f7127a3 100644
--- a/stack/avct/avct_lcb.c
+++ b/stack/avct/avct_lcb.c
@@ -173,7 +173,7 @@ const tAVCT_LCB_ST_TBL avct_lcb_st_tbl[] = {
** Function avct_lcb_event
**
** Description State machine event handling function for lcb
-**
+**
**
** Returns Nothing.
**
@@ -215,7 +215,7 @@ void avct_lcb_event(tAVCT_LCB *p_lcb, UINT8 event, tAVCT_LCB_EVT *p_data)
** Function avct_bcb_event
**
** Description State machine event handling function for lcb
-**
+**
**
** Returns Nothing.
**
@@ -259,7 +259,7 @@ void avct_bcb_event(tAVCT_BCB *p_bcb, UINT8 event, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_by_bd
**
** Description This lookup function finds the lcb for a BD address.
-**
+**
**
** Returns pointer to the lcb, or NULL if none found.
**
@@ -277,7 +277,7 @@ tAVCT_LCB *avct_lcb_by_bd(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVCT_NUM_LINKS)
{
/* if no lcb found */
@@ -294,7 +294,7 @@ tAVCT_LCB *avct_lcb_by_bd(BD_ADDR bd_addr)
** Function avct_lcb_alloc
**
** Description Allocate a link control block.
-**
+**
**
** Returns pointer to the lcb, or NULL if none could be allocated.
**
@@ -314,7 +314,7 @@ tAVCT_LCB *avct_lcb_alloc(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVCT_NUM_LINKS)
{
/* out of lcbs */
@@ -329,7 +329,7 @@ tAVCT_LCB *avct_lcb_alloc(BD_ADDR bd_addr)
** Function avct_lcb_dealloc
**
** Description Deallocate a link control block.
-**
+**
**
** Returns void.
**
@@ -374,7 +374,7 @@ void avct_lcb_dealloc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
** Function avct_lcb_by_lcid
**
** Description Find the LCB associated with the L2CAP LCID
-**
+**
**
** Returns pointer to the lcb, or NULL if none found.
**
@@ -391,7 +391,7 @@ tAVCT_LCB *avct_lcb_by_lcid(UINT16 lcid)
break;
}
}
-
+
if (i == AVCT_NUM_LINKS)
{
/* out of lcbs */
@@ -407,7 +407,7 @@ tAVCT_LCB *avct_lcb_by_lcid(UINT16 lcid)
** Function avct_lcb_has_pid
**
** Description See if any ccbs on this lcb have a particular pid.
-**
+**
**
** Returns Pointer to CCB if PID found, NULL otherwise.
**
@@ -432,7 +432,7 @@ tAVCT_CCB *avct_lcb_has_pid(tAVCT_LCB *p_lcb, UINT16 pid)
** Function avct_lcb_last_ccb
**
** Description See if given ccb is only one on the lcb.
-**
+**
**
** Returns TRUE if ccb is last, FALSE otherwise.
**
diff --git a/stack/avct/avct_lcb_act.c b/stack/avct/avct_lcb_act.c
index 186c5d2..8d48c10 100644
--- a/stack/avct/avct_lcb_act.c
+++ b/stack/avct/avct_lcb_act.c
@@ -24,14 +24,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 +150,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 +174,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 +192,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 +243,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 +269,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 +304,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 +349,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 +365,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 +397,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 +411,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 +428,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 +469,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 +486,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 +502,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 +604,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 +621,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.
**
diff --git a/stack/avdt/avdt_ad.c b/stack/avdt/avdt_ad.c
index 3de56ae..cebbb93 100644
--- a/stack/avdt/avdt_ad.c
+++ b/stack/avdt/avdt_ad.c
@@ -25,7 +25,7 @@
** Function avdt_ad_type_to_tcid
**
** Description Derives the TCID from the channel type and SCB.
-**
+**
**
** Returns TCID value.
**
@@ -53,7 +53,7 @@ UINT8 avdt_ad_type_to_tcid(UINT8 type, tAVDT_SCB *p_scb)
** Function avdt_ad_tcid_to_type
**
** Description Derives the channel type from the TCID.
-**
+**
**
** Returns Channel type value.
**
@@ -85,7 +85,7 @@ static UINT8 avdt_ad_tcid_to_type(UINT8 tcid)
** Function avdt_ad_init
**
** Description Initialize adaption layer.
-**
+**
**
** Returns Nothing.
**
@@ -110,7 +110,7 @@ void avdt_ad_init(void)
**
** Description Find adaption layer transport channel table entry matching
** the given state.
-**
+**
**
** Returns Pointer to matching entry. For control channel it returns
** the matching entry. For media or other it returns the
@@ -180,7 +180,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_st(UINT8 type, tAVDT_CCB *p_ccb, UINT8 state)
** Function avdt_ad_tc_tbl_by_lcid
**
** Description Find adaption layer transport channel table entry by LCID.
-**
+**
**
** Returns Pointer to entry.
**
@@ -188,7 +188,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_st(UINT8 type, tAVDT_CCB *p_ccb, UINT8 state)
tAVDT_TC_TBL *avdt_ad_tc_tbl_by_lcid(UINT16 lcid)
{
UINT8 idx;
-
+
idx = avdt_cb.ad.lcid_tbl[lcid - L2CAP_BASE_APPL_CID];
if (idx < AVDT_NUM_TC_TBL)
@@ -208,7 +208,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_lcid(UINT16 lcid)
**
** Description This function retrieves the transport channel table entry
** for a particular channel.
-**
+**
**
** Returns Pointer to transport channel table entry.
**
@@ -242,7 +242,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_by_type(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_
** Function avdt_ad_tc_tbl_alloc
**
** Description Allocate an entry in the traffic channel table.
-**
+**
**
** Returns Pointer to entry.
**
@@ -278,7 +278,7 @@ tAVDT_TC_TBL *avdt_ad_tc_tbl_alloc(tAVDT_CCB *p_ccb)
** Function avdt_ad_tc_tbl_to_idx
**
** Description Convert a transport channel table entry to an index.
-**
+**
**
** Returns Index value.
**
@@ -299,7 +299,7 @@ UINT8 avdt_ad_tc_tbl_to_idx(tAVDT_TC_TBL *p_tbl)
** the channel and sends it a close event. The reason
** parameter is the same value passed by the L2CAP
** callback function.
-**
+**
**
** Returns Nothing.
**
@@ -345,7 +345,7 @@ void avdt_ad_tc_close_ind(tAVDT_TC_TBL *p_tbl, UINT16 reason)
** Description This function is called by the L2CAP interface when
** the L2CAP channel is opened. It looks up the CCB or SCB
** for the channel and sends it an open event.
-**
+**
**
** Returns Nothing.
**
@@ -402,7 +402,7 @@ void avdt_ad_tc_open_ind(tAVDT_TC_TBL *p_tbl)
** or SCB for the channel and sends it a congestion event.
** The is_congested parameter is the same value passed by
** the L2CAP callback function.
-**
+**
**
** Returns Nothing.
**
@@ -438,7 +438,7 @@ void avdt_ad_tc_cong_ind(tAVDT_TC_TBL *p_tbl, BOOLEAN is_congested)
** Description This function is called by the L2CAP interface layer when
** incoming data is received from L2CAP. It looks up the CCB
** or SCB for the channel and routes the data accordingly.
-**
+**
**
** Returns Nothing.
**
@@ -479,7 +479,7 @@ void avdt_ad_tc_data_ind(tAVDT_TC_TBL *p_tbl, BT_HDR *p_buf)
** transport channel. It looks up the LCID of the channel
** based on the type, CCB, and SCB (if present). Then it
** passes the data to L2CA_DataWrite().
-**
+**
**
** Returns AVDT_AD_SUCCESS, if data accepted, else FALSE
** AVDT_AD_CONGESTED, if data accepted and the channel is congested
@@ -509,7 +509,7 @@ UINT8 avdt_ad_write_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, BT_HDR *
** as an initiator the function will start an L2CAP connection.
** When opened as an acceptor the function simply configures
** the table entry to listen for an incoming channel.
-**
+**
**
** Returns Nothing.
**
@@ -536,7 +536,7 @@ void avdt_ad_open_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, UINT8 role
/* otherwise get mtu from scb */
p_tbl->my_mtu = p_scb->cs.mtu;
p_tbl->my_flush_to = p_scb->cs.flush_to;
-
+
/* also set scb_hdl in rt_tbl */
avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].scb_hdl = avdt_scb_to_hdl(p_scb);
AVDT_TRACE_DEBUG3("avdt_cb.ad.rt_tbl[%d][%d].scb_hdl = %d",
@@ -582,7 +582,7 @@ void avdt_ad_open_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, UINT8 role
** Description This function is called by a CCB or SCB to close a
** transport channel. The function looks up the LCID for the
** channel and calls L2CA_DisconnectReq().
-**
+**
**
** Returns Nothing.
**
diff --git a/stack/avdt/avdt_api.c b/stack/avdt/avdt_api.c
index 4b3c465..02e9e57 100644
--- a/stack/avdt/avdt_api.c
+++ b/stack/avdt/avdt_api.c
@@ -40,7 +40,7 @@ tAVDT_CB avdt_cb;
** appropriate CCB or SCB state machine.
**
** This function is for use internal to the stack only.
-**
+**
**
** Returns void
**
@@ -92,7 +92,7 @@ void avdt_process_timeout(TIMER_LIST_ENT *p_tle)
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVDTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -104,7 +104,7 @@ void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback)
/* register PSM with L2CAP */
L2CA_Register(AVDT_PSM, (tL2CAP_APPL_INFO *) &avdt_l2c_appl);
-
+
/* set security level */
BTM_SetSecurityLevel(TRUE, "", BTM_SEC_SERVICE_AVDTP, p_reg->sec_mask,
AVDT_PSM, BTM_SEC_PROTO_AVDT, AVDT_CHAN_SIG);
@@ -148,7 +148,7 @@ void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback)
** It is called when AVDTP is no longer being used by any
** application in the system. Before this function can be
** called, all streams must be removed with AVDT_RemoveStream().
-**
+**
**
** Returns void
**
@@ -170,7 +170,7 @@ void AVDT_Deregister(void)
** this endpoint and an endpoint on a peer device. In
** addition, a peer device can discover, get the capabilities,
** and connect to this endpoint.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -186,7 +186,7 @@ UINT16 AVDT_CreateStream(UINT8 *p_handle, tAVDT_CS *p_cs)
if (((p_cs->cfg.psc_mask & (~AVDT_PSC)) != 0) || (p_cs->p_ctrl_cback == NULL))
{
result = AVDT_BAD_PARAMS;
- }
+ }
/* Allocate scb; if no scbs, return failure */
else if ((p_scb = avdt_scb_alloc(p_cs)) == NULL)
{
@@ -208,7 +208,7 @@ UINT16 AVDT_CreateStream(UINT8 *p_handle, tAVDT_CS *p_cs)
** If this function is called when the endpoint is connected
** the connection is closed and then the stream endpoint
** is removed.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -244,7 +244,7 @@ UINT16 AVDT_RemoveStream(UINT8 handle)
** that AVDTP discovery is unrelated to SDP discovery).
** This function can be called at any time regardless of whether
** there is an AVDTP connection to the peer device.
-**
+**
** When discovery is complete, an AVDT_DISCOVER_CFM_EVT
** is sent to the application via its callback function.
** The application must not call AVDT_GetCapReq() or
@@ -354,7 +354,7 @@ static UINT16 avdt_get_cap_req(BD_ADDR bd_addr, tAVDT_CCB_API_GETCAP *p_evt)
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -391,7 +391,7 @@ UINT16 AVDT_GetCapReq(BD_ADDR bd_addr, UINT8 seid, tAVDT_CFG *p_cfg, tAVDT_CTRL_
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -582,7 +582,7 @@ UINT16 AVDT_StartReq(UINT8 *p_handles, UINT8 num_handles)
tAVDT_CCB_EVT evt;
UINT16 result = AVDT_SUCCESS;
int i;
-
+
BTTRC_AVDT_API0(AVDT_TRACE_API_START_REQ);
if ((num_handles == 0) || (num_handles > AVDT_NUM_SEPS))
@@ -640,7 +640,7 @@ UINT16 AVDT_SuspendReq(UINT8 *p_handles, UINT8 num_handles)
tAVDT_CCB_EVT evt;
UINT16 result = AVDT_SUCCESS;
int i;
-
+
BTTRC_AVDT_API0(AVDT_TRACE_API_SUSPEND_REQ);
if ((num_handles == 0) || (num_handles > AVDT_NUM_SEPS))
@@ -967,7 +967,7 @@ UINT16 AVDT_ConnectReq(BD_ADDR bd_addr, UINT8 sec_mask, tAVDT_CTRL_CBACK *p_cbac
/* ccb was already allocated for the incoming signalling. */
result = AVDT_BUSY;
}
-
+
if (result == AVDT_SUCCESS)
{
/* send event to ccb */
@@ -1177,10 +1177,10 @@ AVDT_API extern UINT16 AVDT_WriteDataReq(UINT8 handle, UINT8 *p_data, UINT32 dat
** buffer if argument p_buf is NULL. This function can only
** be called if the stream is a SNK.
**
-** AVDTP uses this buffer to reassemble fragmented media packets.
+** AVDTP uses this buffer to reassemble fragmented media packets.
** When AVDTP receives a complete media packet, it calls the
** p_media_cback assigned by AVDT_CreateStream().
-** This function can be called during callback to assign a
+** This function can be called during callback to assign a
** different buffer for next media packet or can leave the current
** buffer for next packet.
**
@@ -1219,11 +1219,11 @@ AVDT_API extern UINT16 AVDT_SetMediaBuf(UINT8 handle, UINT8 *p_buf, UINT32 buf_l
**
** Function AVDT_SendReport
**
-** Description
-**
+** Description
+**
**
**
-** Returns
+** Returns
**
*******************************************************************************/
UINT16 AVDT_SendReport(UINT8 handle, AVDT_REPORT_TYPE type,
diff --git a/stack/avdt/avdt_ccb.c b/stack/avdt/avdt_ccb.c
index 808c22f..ea1990d 100644
--- a/stack/avdt/avdt_ccb.c
+++ b/stack/avdt/avdt_ccb.c
@@ -35,33 +35,33 @@ const char * const avdt_ccb_st_str[] = {
/* verbose event strings for trace */
const char * const avdt_ccb_evt_str[] = {
- "API_DISCOVER_REQ_EVT",
- "API_GETCAP_REQ_EVT",
- "API_START_REQ_EVT",
- "API_SUSPEND_REQ_EVT",
- "API_DISCOVER_RSP_EVT",
- "API_GETCAP_RSP_EVT",
- "API_START_RSP_EVT",
- "API_SUSPEND_RSP_EVT",
- "API_CONNECT_REQ_EVT",
+ "API_DISCOVER_REQ_EVT",
+ "API_GETCAP_REQ_EVT",
+ "API_START_REQ_EVT",
+ "API_SUSPEND_REQ_EVT",
+ "API_DISCOVER_RSP_EVT",
+ "API_GETCAP_RSP_EVT",
+ "API_START_RSP_EVT",
+ "API_SUSPEND_RSP_EVT",
+ "API_CONNECT_REQ_EVT",
"API_DISCONNECT_REQ_EVT",
- "MSG_DISCOVER_CMD_EVT",
- "MSG_GETCAP_CMD_EVT",
- "MSG_START_CMD_EVT",
- "MSG_SUSPEND_CMD_EVT",
- "MSG_DISCOVER_RSP_EVT",
- "MSG_GETCAP_RSP_EVT",
- "MSG_START_RSP_EVT",
- "MSG_SUSPEND_RSP_EVT",
- "RCVRSP_EVT",
- "SENDMSG_EVT",
- "RET_TOUT_EVT",
- "RSP_TOUT_EVT",
- "IDLE_TOUT_EVT",
- "UL_OPEN_EVT",
- "UL_CLOSE_EVT",
- "LL_OPEN_EVT",
- "LL_CLOSE_EVT",
+ "MSG_DISCOVER_CMD_EVT",
+ "MSG_GETCAP_CMD_EVT",
+ "MSG_START_CMD_EVT",
+ "MSG_SUSPEND_CMD_EVT",
+ "MSG_DISCOVER_RSP_EVT",
+ "MSG_GETCAP_RSP_EVT",
+ "MSG_START_RSP_EVT",
+ "MSG_SUSPEND_RSP_EVT",
+ "RCVRSP_EVT",
+ "SENDMSG_EVT",
+ "RET_TOUT_EVT",
+ "RSP_TOUT_EVT",
+ "IDLE_TOUT_EVT",
+ "UL_OPEN_EVT",
+ "UL_CLOSE_EVT",
+ "LL_OPEN_EVT",
+ "LL_CLOSE_EVT",
"LL_CONG_EVT"
};
@@ -261,7 +261,7 @@ const tAVDT_CCB_ST_TBL avdt_ccb_st_tbl[] = {
** Function avdt_ccb_init
**
** Description Initialize channel control block module.
-**
+**
**
** Returns Nothing.
**
@@ -277,7 +277,7 @@ void avdt_ccb_init(void)
** Function avdt_ccb_event
**
** Description State machine event handling function for ccb
-**
+**
**
** Returns Nothing.
**
@@ -306,7 +306,7 @@ void avdt_ccb_event(tAVDT_CCB *p_ccb, UINT8 event, tAVDT_CCB_EVT *p_data)
{
if ((action = state_table[event][i]) != AVDT_CCB_IGNORE)
{
- BTTRC_AVDT_CCB_ACTION(action);
+ BTTRC_AVDT_CCB_ACTION(action);
(*avdt_cb.p_ccb_act[action])(p_ccb, p_data);
}
else
@@ -322,7 +322,7 @@ void avdt_ccb_event(tAVDT_CCB *p_ccb, UINT8 event, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_by_bd
**
** Description This lookup function finds the ccb for a BD address.
-**
+**
**
** Returns pointer to the ccb, or NULL if none found.
**
@@ -340,7 +340,7 @@ tAVDT_CCB *avdt_ccb_by_bd(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVDT_NUM_LINKS)
{
/* if no ccb found */
@@ -357,7 +357,7 @@ tAVDT_CCB *avdt_ccb_by_bd(BD_ADDR bd_addr)
** Function avdt_ccb_alloc
**
** Description Allocate a channel control block.
-**
+**
**
** Returns pointer to the ccb, or NULL if none could be allocated.
**
@@ -380,7 +380,7 @@ tAVDT_CCB *avdt_ccb_alloc(BD_ADDR bd_addr)
break;
}
}
-
+
if (i == AVDT_NUM_LINKS)
{
/* out of ccbs */
@@ -395,7 +395,7 @@ tAVDT_CCB *avdt_ccb_alloc(BD_ADDR bd_addr)
** Function avdt_ccb_dealloc
**
** Description Deallocate a stream control block.
-**
+**
**
** Returns void.
**
@@ -412,7 +412,7 @@ void avdt_ccb_dealloc(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_to_idx
**
** Description Given a pointer to an ccb, return its index.
-**
+**
**
** Returns Index of ccb.
**
@@ -428,7 +428,7 @@ UINT8 avdt_ccb_to_idx(tAVDT_CCB *p_ccb)
** Function avdt_ccb_by_idx
**
** Description Return ccb pointer based on ccb index.
-**
+**
**
** Returns pointer to the ccb, or NULL if none found.
**
@@ -440,7 +440,7 @@ tAVDT_CCB *avdt_ccb_by_idx(UINT8 idx)
/* verify index */
if (idx < AVDT_NUM_LINKS)
{
- p_ccb = &avdt_cb.ccb[idx];
+ p_ccb = &avdt_cb.ccb[idx];
}
else
{
diff --git a/stack/avdt/avdt_ccb_act.c b/stack/avdt/avdt_ccb_act.c
index 3237028..87de480 100644
--- a/stack/avdt/avdt_ccb_act.c
+++ b/stack/avdt/avdt_ccb_act.c
@@ -24,9 +24,9 @@
**
** Function avdt_ccb_clear_ccb
**
-** Description This function clears out certain buffers, queues, and
+** Description This function clears out certain buffers, queues, and
** other data elements of a ccb.
-**
+**
**
** Returns void.
**
@@ -66,7 +66,7 @@ static void avdt_ccb_clear_ccb(tAVDT_CCB *p_ccb)
**
** Description This function calls avdt_ad_open_req() to
** initiate a signaling channel connection.
-**
+**
**
** Returns void.
**
@@ -83,7 +83,7 @@ void avdt_ccb_chan_open(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function calls avdt_ad_close_req() to close a
** signaling channel connection.
-**
+**
**
** Returns void.
**
@@ -100,7 +100,7 @@ void avdt_ccb_chan_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function checks for active streams on this CCB.
** If there are none, it starts an idle timer.
-**
+**
**
** Returns void.
**
@@ -134,7 +134,7 @@ void avdt_ccb_chk_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** received from the peer. It gathers up the stream
** information for all allocated streams and initiates
** sending of a discover response.
-**
+**
**
** Returns void.
**
@@ -144,7 +144,7 @@ void avdt_ccb_hdl_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
tAVDT_SEP_INFO sep_info[AVDT_NUM_SEPS];
tAVDT_SCB *p_scb = &avdt_cb.scb[0];
int i;
-
+
p_data->msg.discover_rsp.p_sep_info = sep_info;
p_data->msg.discover_rsp.num_seps = 0;
@@ -174,7 +174,7 @@ void avdt_ccb_hdl_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called when a discover response or
** reject is received from the peer. It calls the application
** callback function with the results.
-**
+**
**
** Returns void.
**
@@ -185,7 +185,7 @@ void avdt_ccb_hdl_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
p_ccb->proc_busy = FALSE;
/* call app callback with results */
- (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_DISCOVER_CFM_EVT,
+ (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_DISCOVER_CFM_EVT,
(tAVDT_CTRL *)(&p_data->msg.discover_rsp));
}
@@ -197,7 +197,7 @@ void avdt_ccb_hdl_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** is received from the peer. It retrieves the stream
** configuration for the requested stream and initiates
** sending of a get capabilities response.
-**
+**
**
** Returns void.
**
@@ -221,7 +221,7 @@ void avdt_ccb_hdl_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called with a get capabilities response
** or reject is received from the peer. It calls the
** application callback function with the results.
-**
+**
**
** Returns void.
**
@@ -232,7 +232,7 @@ void avdt_ccb_hdl_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
p_ccb->proc_busy = FALSE;
/* call app callback with results */
- (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_GETCAP_CFM_EVT,
+ (*p_ccb->proc_cback)(0, p_ccb->peer_addr, AVDT_GETCAP_CFM_EVT,
(tAVDT_CTRL *)(&p_data->msg.svccap));
}
@@ -244,7 +244,7 @@ void avdt_ccb_hdl_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** from the peer. It verifies that all requested streams
** are in the proper state. If so, it initiates sending of
** a start response. Otherwise it sends a start reject.
-**
+**
**
** Returns void.
**
@@ -278,7 +278,7 @@ void avdt_ccb_hdl_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** is received from the peer. Using the SEIDs stored in the
** current command message, it sends a start response or start
** reject event to each SCB associated with the command.
-**
+**
**
** Returns void.
**
@@ -316,7 +316,7 @@ void avdt_ccb_hdl_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** in the proper state. If so, it initiates sending of a
** suspend response. Otherwise it sends a suspend reject.
-**
+**
**
** Returns void.
**
@@ -351,7 +351,7 @@ void avdt_ccb_hdl_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** current command message, it sends a suspend response or
** suspend reject event to each SCB associated with the command.
**
-**
+**
**
** Returns void.
**
@@ -388,7 +388,7 @@ void avdt_ccb_hdl_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It copies variables needed for the procedure from
** the event to the CCB. It marks the CCB as busy and then
** sends a discover command.
-**
+**
**
** Returns void.
**
@@ -414,7 +414,7 @@ void avdt_ccb_snd_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to send a discover response to
** the peer. It takes the stream information passed in the
** event and sends a discover response.
-**
+**
**
** Returns void.
**
@@ -433,7 +433,7 @@ void avdt_ccb_snd_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** to the peer. It copies variables needed for the procedure
** from the event to the CCB. It marks the CCB as busy and
** then sends a get capabilities command.
-**
+**
**
** Returns void.
**
@@ -463,7 +463,7 @@ void avdt_ccb_snd_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to send a get capabilities response
** to the peer. It takes the stream information passed in the
** event and sends a get capabilities response.
-**
+**
**
** Returns void.
**
@@ -487,7 +487,7 @@ void avdt_ccb_snd_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It verifies that all requested streams are in the
** proper state. If so, it sends a start command. Otherwise
** send ourselves back a start reject.
-**
+**
**
** Returns void.
**
@@ -533,7 +533,7 @@ void avdt_ccb_snd_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It takes the stream information passed in the event
** and sends a start response. Then it sends a start event
** to the SCB for each stream.
-**
+**
**
** Returns void.
**
@@ -565,7 +565,7 @@ void avdt_ccb_snd_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** proper state. If so, it sends a suspend command.
** Otherwise it calls the callback function for each requested
** stream and sends a suspend confirmation with failure.
-**
+**
**
** Returns void.
**
@@ -611,14 +611,14 @@ void avdt_ccb_snd_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** peer. It takes the stream information passed in the event
** and sends a suspend response. Then it sends a suspend event
** to the SCB for each stream.
-**
+**
**
** Returns void.
**
*******************************************************************************/
void avdt_ccb_snd_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
- tAVDT_SCB *p_scb;
+ tAVDT_SCB *p_scb;
int i;
/* send response message */
@@ -643,7 +643,7 @@ void avdt_ccb_snd_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** command in the command queue, it frees the command and
** calls the application callback function indicating failure.
** Certain CCB variables are also initialized.
-**
+**
**
** Returns void.
**
@@ -686,9 +686,9 @@ void avdt_ccb_clear_cmds(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_cmd_fail
**
** Description This function is called when there is a response timeout.
-** The currently pending command is freed and we fake a
+** The currently pending command is freed and we fake a
** reject message back to ourselves.
-**
+**
**
** Returns void.
**
@@ -705,7 +705,7 @@ void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
msg.hdr.err_code = p_data->err_code;
msg.hdr.err_param = 0;
msg.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb);
-
+
/* pretend that we received a rej message */
evt = avdt_msg_rej_2_evt[p_ccb->p_curr_cmd->event - 1];
@@ -722,7 +722,7 @@ void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
avdt_scb_event(p_scb, evt, (tAVDT_SCB_EVT *) &msg);
}
}
-
+
GKI_freebuf(p_ccb->p_curr_cmd);
p_ccb->p_curr_cmd = NULL;
}
@@ -734,7 +734,7 @@ void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function is called when a response is received for a
** currently pending command. The command is freed.
-**
+**
**
** Returns void.
**
@@ -754,7 +754,7 @@ void avdt_ccb_free_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function is called to set the congestion state for
** the CCB.
-**
+**
**
** Returns void.
**
@@ -772,7 +772,7 @@ void avdt_ccb_cong_state(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** pending command. The retransmission count is incremented.
** If the count reaches the maximum number of retransmissions,
** the event is treated as a response timeout.
-**
+**
**
** Returns void.
**
@@ -805,7 +805,7 @@ void avdt_ccb_ret_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
avdt_msg_send(p_ccb, p_msg);
}
}
-
+
/* restart timer */
btu_start_timer(&p_ccb->timer_entry, BTU_TTYPE_AVDT_CCB_RET, avdt_cb.rcb.ret_tout);
}
@@ -817,7 +817,7 @@ void avdt_ccb_ret_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function is called the send the next command,
** if any, in the command queue.
-**
+**
**
** Returns void.
**
@@ -848,8 +848,8 @@ void avdt_ccb_snd_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Function avdt_ccb_snd_msg
**
-** Description
-**
+** Description
+**
**
** Returns void.
**
@@ -878,7 +878,7 @@ void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
}
}
}
-
+
/* do we have commands to send? send next command */
avdt_ccb_snd_cmd(p_ccb, NULL);
}
@@ -891,7 +891,7 @@ void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to enable a reconnect attempt when
** a channel transitions from closing to idle state. It sets
** the reconn variable to TRUE.
-**
+**
**
** Returns void.
**
@@ -906,7 +906,7 @@ void avdt_ccb_set_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_clr_reconn
**
** Description This function is called to clear the reconn variable.
-**
+**
**
** Returns void.
**
@@ -923,7 +923,7 @@ void avdt_ccb_clr_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Description This function is called to check if a reconnect attempt
** is enabled. If enabled, it sends an AVDT_CCB_UL_OPEN_EVT
** to the CCB. If disabled, the CCB is deallocated.
-**
+**
**
** Returns void.
**
@@ -957,7 +957,7 @@ void avdt_ccb_chk_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
**
** Description This function stops the CCB timer if the idle timer is
** running.
-**
+**
**
** Returns void.
**
@@ -975,7 +975,7 @@ void avdt_ccb_chk_timer(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_set_conn
**
** Description Set CCB variables associated with AVDT_ConnectReq().
-**
+**
**
** Returns void.
**
@@ -995,7 +995,7 @@ void avdt_ccb_set_conn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_set_disconn
**
** Description Set CCB variables associated with AVDT_DisconnectReq().
-**
+**
**
** Returns void.
**
@@ -1016,7 +1016,7 @@ void avdt_ccb_set_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_do_disconn
**
** Description Do action associated with AVDT_DisconnectReq().
-**
+**
**
** Returns void.
**
@@ -1035,7 +1035,7 @@ void avdt_ccb_do_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_ll_closed
**
** Description Clear commands from and deallocate CCB.
-**
+**
**
** Returns void.
**
@@ -1063,7 +1063,7 @@ void avdt_ccb_ll_closed(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
{
avdt_ctrl.hdr.err_code = 0;
(*p_cback)(0, bd_addr, AVDT_DISCONNECT_IND_EVT, &avdt_ctrl);
- }
+ }
}
/*******************************************************************************
@@ -1071,7 +1071,7 @@ void avdt_ccb_ll_closed(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
** Function avdt_ccb_ll_opened
**
** Description Call callback on open.
-**
+**
**
** Returns void.
**
@@ -1081,7 +1081,7 @@ void avdt_ccb_ll_opened(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
tAVDT_CTRL avdt_ctrl;
p_ccb->ll_opened = TRUE;
-
+
if (!p_ccb->p_conn_cback)
p_ccb->p_conn_cback = avdt_cb.p_conn_cback;
@@ -1091,5 +1091,5 @@ void avdt_ccb_ll_opened(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
avdt_ctrl.hdr.err_code = 0;
avdt_ctrl.hdr.err_param = p_data->msg.hdr.err_param;
(*p_ccb->p_conn_cback)(0, p_ccb->peer_addr, AVDT_CONNECT_IND_EVT, &avdt_ctrl);
- }
+ }
}
diff --git a/stack/avdt/avdt_defs.h b/stack/avdt/avdt_defs.h
index 283e7f8..4f67853 100644
--- a/stack/avdt/avdt_defs.h
+++ b/stack/avdt/avdt_defs.h
@@ -5,7 +5,7 @@
** Description: This contains constants definitions and other information
** from the AVDTP specification. This file is intended for
** use internal to AVDT only.
-**
+**
**
** Copyright (c) 2002-2010, Broadcom Corp., All Rights Reserved.
** Broadcom Bluetooth Core. Proprietary and confidential.
@@ -165,7 +165,7 @@
#define AVDT_MSG_PRS_M_PT(p, m_pt, marker) \
marker = *(p) >> 7; \
m_pt = *(p)++ & 0x7F;
-
+
#define AVDT_MSG_BLD_HDR(p, lbl, pkt, msg) \
*(p)++ = (UINT8) ((lbl) << 4) | ((pkt) << 2) | (msg);
@@ -187,6 +187,6 @@
#define AVDT_MSG_BLD_NOSP(p, nosp) \
*(p)++ = (UINT8) (nosp);
-
+
#endif /* AVDT_DEFS_H */
diff --git a/stack/avdt/avdt_l2c.c b/stack/avdt/avdt_l2c.c
index 6dec38d..ecab37d 100644
--- a/stack/avdt/avdt_l2c.c
+++ b/stack/avdt/avdt_l2c.c
@@ -50,8 +50,8 @@ const tL2CAP_APPL_INFO avdt_l2c_appl = {
**
** Function avdt_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
**
@@ -70,7 +70,7 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
}
p_ccb = avdt_ccb_by_bd(bd_addr);
-
+
p_tbl = avdt_ad_tc_tbl_by_st(AVDT_CHAN_SIG, p_ccb, AVDT_AD_ST_SEC_ACP);
if (p_tbl == NULL)
return;
@@ -78,7 +78,7 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
if (res == BTM_SUCCESS)
{
/* Send response to the L2CAP layer. */
- L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, p_tbl->id, p_tbl->lcid, L2CAP_CONN_OK, L2CAP_CONN_OK);
/* store idx in LCID table, store LCID in routing table */
avdt_cb.ad.lcid_tbl[p_tbl->lcid - L2CAP_BASE_APPL_CID] = avdt_ad_tc_tbl_to_idx(p_tbl);
@@ -97,7 +97,7 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
}
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);
avdt_ad_tc_close_ind(p_tbl, L2CAP_CONN_SECURITY_BLOCK);
}
}
@@ -106,8 +106,8 @@ static void avdt_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UIN
**
** Function avdt_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
**
@@ -149,7 +149,7 @@ static void avdt_sec_check_complete_orig (BD_ADDR bd_addr, void *p_ref_data, UIN
** Function avdt_l2c_connect_ind_cback
**
** Description This is the L2CAP connect indication callback function.
-**
+**
**
** Returns void
**
@@ -184,13 +184,13 @@ void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
p_tbl->cfg_flags = AVDT_L2C_CFG_CONN_ACP;
/* Check the security */
- rc = btm_sec_mx_access_request (bd_addr, AVDT_PSM,
- FALSE, BTM_SEC_PROTO_AVDT,
+ rc = btm_sec_mx_access_request (bd_addr, AVDT_PSM,
+ FALSE, BTM_SEC_PROTO_AVDT,
AVDT_CHAN_SIG,
&avdt_sec_check_complete_term, NULL);
if(rc == BTM_CMD_STARTED)
{
- L2CA_ConnectRsp (p_ccb->peer_addr, p_tbl->id, lcid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (p_ccb->peer_addr, p_tbl->id, lcid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
}
return;
}
@@ -226,7 +226,7 @@ void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
}
/* Send L2CAP connect rsp */
- L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
+ L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -253,7 +253,7 @@ void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8
** Function avdt_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -303,8 +303,8 @@ void avdt_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
p_tbl->cfg_flags = AVDT_L2C_CFG_CONN_INT;
/* Check the security */
- btm_sec_mx_access_request (p_ccb->peer_addr, AVDT_PSM,
- TRUE, BTM_SEC_PROTO_AVDT,
+ btm_sec_mx_access_request (p_ccb->peer_addr, AVDT_PSM,
+ TRUE, BTM_SEC_PROTO_AVDT,
AVDT_CHAN_SIG,
&avdt_sec_check_complete_orig, NULL);
}
@@ -325,7 +325,7 @@ void avdt_l2c_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avdt_l2c_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -367,7 +367,7 @@ void avdt_l2c_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avdt_l2c_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -415,7 +415,7 @@ void avdt_l2c_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function avdt_l2c_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -434,7 +434,7 @@ void avdt_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
/* send L2CAP disconnect response */
L2CA_DisconnectRsp(lcid);
}
-
+
avdt_ad_tc_close_ind(p_tbl, 0);
}
}
@@ -444,7 +444,7 @@ void avdt_l2c_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function avdt_l2c_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -457,7 +457,7 @@ void avdt_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
lcid, result);
/* look up info for this channel */
if ((p_tbl = avdt_ad_tc_tbl_by_lcid(lcid)) != NULL)
- {
+ {
avdt_ad_tc_close_ind(p_tbl, result);
}
}
@@ -467,7 +467,7 @@ void avdt_l2c_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function avdt_l2c_congestion_ind_cback
**
** Description This is the L2CAP congestion indication callback function.
-**
+**
**
** Returns void
**
@@ -488,7 +488,7 @@ void avdt_l2c_congestion_ind_cback(UINT16 lcid, BOOLEAN is_congested)
** Function avdt_l2c_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
diff --git a/stack/avdt/avdt_msg.c b/stack/avdt/avdt_msg.c
index 3242407..35066f9 100644
--- a/stack/avdt/avdt_msg.c
+++ b/stack/avdt/avdt_msg.c
@@ -138,7 +138,7 @@ const tAVDT_MSG_BLD avdt_msg_bld_cmd[] = {
avdt_msg_bld_single, /* abort */
avdt_msg_bld_security_cmd, /* security control */
avdt_msg_bld_single, /* get all capabilities */
- avdt_msg_bld_delay_rpt /* delay report */
+ avdt_msg_bld_delay_rpt /* delay report */
};
/* function table for building response messages */
@@ -249,7 +249,7 @@ const UINT8 avdt_msg_rej_2_evt[] = {
**
** Description This function builds the configuration parameters contained
** in a command or response message.
-**
+**
**
** Returns void.
**
@@ -280,22 +280,22 @@ static void avdt_msg_bld_cfg(UINT8 **p, tAVDT_CFG *p_cfg)
if (p_cfg->num_codec != 0)
{
*(*p)++ = AVDT_CAT_CODEC;
- len = p_cfg->codec_info[0] + 1;
- if( len > AVDT_CODEC_SIZE )
+ len = p_cfg->codec_info[0] + 1;
+ if( len > AVDT_CODEC_SIZE )
len = AVDT_CODEC_SIZE;
memcpy(*p, p_cfg->codec_info, len);
*p += len;
}
-
+
/* content protection */
if (p_cfg->num_protect != 0)
- {
+ {
*(*p)++ = AVDT_CAT_PROTECT;
- len = p_cfg->protect_info[0] + 1;
+ len = p_cfg->protect_info[0] + 1;
if( len > AVDT_PROTECT_SIZE )
len = AVDT_PROTECT_SIZE;
-
+
memcpy(*p, p_cfg->protect_info, len);
*p += len;
}
@@ -354,7 +354,7 @@ static void avdt_msg_bld_cfg(UINT8 **p, tAVDT_CFG *p_cfg)
** Function avdt_msg_bld_none
**
** Description This message building function builds an empty message.
-**
+**
**
** Returns void.
**
@@ -370,7 +370,7 @@ static void avdt_msg_bld_none(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** a single SEID.
-**
+**
**
** Returns void.
**
@@ -386,7 +386,7 @@ static void avdt_msg_bld_single(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a set configuration
** command message.
-**
+**
**
** Returns void.
**
@@ -404,7 +404,7 @@ static void avdt_msg_bld_setconfig_cmd(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a reconfiguration
** command message.
-**
+**
**
** Returns void.
**
@@ -424,7 +424,7 @@ static void avdt_msg_bld_reconfig_cmd(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** multiple SEID's.
-**
+**
**
** Returns void.
**
@@ -445,7 +445,7 @@ static void avdt_msg_bld_multi(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a security
** command message.
-**
+**
** Returns void.
**
*******************************************************************************/
@@ -478,7 +478,7 @@ static void avdt_msg_bld_delay_rpt(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a discover
** response message.
-**
+**
**
** Returns void.
**
@@ -503,7 +503,7 @@ static void avdt_msg_bld_discover_rsp(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** service capabilities parameters.
-**
+**
**
** Returns void.
**
@@ -524,7 +524,7 @@ static void avdt_msg_bld_svccap(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a message containing
** service capabilities parameters.
-**
+**
**
** Returns void.
**
@@ -540,7 +540,7 @@ static void avdt_msg_bld_all_svccap(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message building function builds a security
** response message.
-**
+**
**
** Returns void.
**
@@ -557,9 +557,9 @@ static void avdt_msg_bld_security_rsp(UINT8 **p, tAVDT_MSG *p_msg)
**
** Description This message parsing function parses the configuration
** parameters field of a message.
+**
**
-**
-** Returns Error code or zero if no error, and element that failed
+** Returns Error code or zero if no error, and element that failed
** in p_elem.
**
*******************************************************************************/
@@ -622,7 +622,7 @@ static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_e
continue;
}
}
-
+
if ((elem_len > avdt_msg_ie_len_max[elem]) ||
(elem_len < avdt_msg_ie_len_min[elem]))
{
@@ -675,8 +675,8 @@ static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_e
case AVDT_CAT_MUX:
/* verify length */
AVDT_TRACE_WARNING2("psc_mask=0x%x elem_len=%d", p_cfg->psc_mask, elem_len);
- if( ((0 == (p_cfg->psc_mask & (AVDT_PSC_RECOV|AVDT_PSC_REPORT))) && (elem_len != 3))
- || ((p_cfg->psc_mask & AVDT_PSC_RECOV) && (elem_len != 7))
+ if( ((0 == (p_cfg->psc_mask & (AVDT_PSC_RECOV|AVDT_PSC_REPORT))) && (elem_len != 3))
+ || ((p_cfg->psc_mask & AVDT_PSC_RECOV) && (elem_len != 7))
|| ((p_cfg->psc_mask & AVDT_PSC_REPORT) && (elem_len != 5)) )
{
err = AVDT_ERR_MUX_FMT;
@@ -752,7 +752,7 @@ static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_e
**
** Description This message parsing function parses a message with no parameters.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -768,7 +768,7 @@ static UINT8 avdt_msg_prs_none(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message with a
** single SEID.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -800,7 +800,7 @@ static UINT8 avdt_msg_prs_single(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a set configuration
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -808,7 +808,7 @@ static UINT8 avdt_msg_prs_single(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
{
UINT8 err = 0;
-
+
p_msg->hdr.err_param = 0;
/* verify len */
@@ -817,7 +817,7 @@ static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
err = AVDT_ERR_LENGTH;
}
else
- {
+ {
/* get seids */
AVDT_MSG_PRS_SEID(p, p_msg->config_cmd.hdr.seid);
if (avdt_scb_by_hdl(p_msg->config_cmd.hdr.seid) == NULL)
@@ -859,7 +859,7 @@ static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a reconfiguration
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -867,7 +867,7 @@ static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
{
UINT8 err = 0;
-
+
p_msg->hdr.err_param = 0;
/* verify len */
@@ -876,7 +876,7 @@ static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
err = AVDT_ERR_LENGTH;
}
else
- {
+ {
/* get seid */
AVDT_MSG_PRS_SEID(p, p_msg->reconfig_cmd.hdr.seid);
if (avdt_scb_by_hdl(p_msg->reconfig_cmd.hdr.seid) == NULL)
@@ -910,7 +910,7 @@ static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message containing
** multiple SEID's.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -952,7 +952,7 @@ static UINT8 avdt_msg_prs_multi(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a security
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -989,7 +989,7 @@ static UINT8 avdt_msg_prs_security_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a discover
** response message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1034,7 +1034,7 @@ static UINT8 avdt_msg_prs_discover_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message containing
** service capabilities parameters.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1057,7 +1057,7 @@ static UINT8 avdt_msg_prs_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parses a message containing
** service capabilities parameters.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1078,7 +1078,7 @@ static UINT8 avdt_msg_prs_all_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Description This message parsing function parsing a security
** response message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1095,8 +1095,8 @@ static UINT8 avdt_msg_prs_security_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
**
** Function avdt_msg_prs_rej
**
-** Description
-**
+** Description
+**
**
** Returns Error code or zero if no error.
**
@@ -1117,7 +1117,7 @@ static UINT8 avdt_msg_prs_rej(tAVDT_MSG *p_msg, UINT8 *p, UINT8 sig)
{
p_msg->hdr.err_code = *p;
}
-
+
return 0;
}
@@ -1127,7 +1127,7 @@ static UINT8 avdt_msg_prs_rej(tAVDT_MSG *p_msg, UINT8 *p, UINT8 sig)
**
** Description This message parsing function parses a security
** command message.
-**
+**
**
** Returns Error code or zero if no error.
**
@@ -1166,7 +1166,7 @@ static UINT8 avdt_msg_prs_delay_rpt (tAVDT_MSG *p_msg, UINT8 *p, UINT16 len)
** Function avdt_msg_send
**
** Description Send, and if necessary fragment the next message.
-**
+**
**
** Returns Congested state; TRUE if CCB congested, FALSE if not.
**
@@ -1183,7 +1183,7 @@ BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg)
UINT8 msg;
UINT8 sig;
UINT8 nosp = 0; /* number of subsequent packets */
-
+
/* look up transport channel table entry to get peer mtu */
p_tbl = avdt_ad_tc_tbl_by_type(AVDT_CHAN_SIG, p_ccb, NULL);
@@ -1325,7 +1325,7 @@ BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg)
** Function avdt_msg_asmbl
**
** Description Reassemble incoming message.
-**
+**
**
** Returns Pointer to reassembled message; NULL if no message
** available.
@@ -1447,7 +1447,7 @@ BT_HDR *avdt_msg_asmbl(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
** from the AVDTP command pool, executes the message building
** function for this message type. It then queues the message
** in the command queue for this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1516,7 +1516,7 @@ void avdt_msg_send_cmd(tAVDT_CCB *p_ccb, void *p_scb, UINT8 sig_id, tAVDT_MSG *p
** from the AVDTP command pool, executes the message building
** function for this message type. It then queues the message
** in the response queue for this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1561,7 +1561,7 @@ void avdt_msg_send_rsp(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
** message based on the message type and the error code.
** It then queues the message in the response queue for
** this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1579,7 +1579,7 @@ void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
/* set up gki buf pointer and offset */
p_buf->offset = AVDT_MSG_OFFSET;
p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset;
-
+
/* if sig id included, build into message */
if (sig_id != AVDT_SIG_NONE)
{
@@ -1622,7 +1622,7 @@ void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
** message based on the message type and the error code.
** It then queues the message in the response queue for
** this CCB.
-**
+**
**
** Returns Nothing.
**
@@ -1640,7 +1640,7 @@ void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
/* set up gki buf pointer and offset */
p_buf->offset = AVDT_MSG_OFFSET;
p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset;
-
+
/* calculate length */
p_buf->len = (UINT16) (p - p_start);
@@ -1664,7 +1664,7 @@ void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
** incoming message is received on the signaling channel.
** It parses the message and sends an event to the appropriate
** SCB or CCB for the message.
-**
+**
**
** Returns Nothing.
**
@@ -1750,7 +1750,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
msg.discover_rsp.p_sep_info = (tAVDT_SEP_INFO *) p_ccb->p_proc_data;
msg.discover_rsp.num_seps = p_ccb->proc_param;
}
- else if ((msg_type == AVDT_MSG_TYPE_RSP) &&
+ else if ((msg_type == AVDT_MSG_TYPE_RSP) &&
((sig == AVDT_SIG_GETCAP) || (sig == AVDT_SIG_GET_ALLCAP)))
{
/* parse discover rsp message to struct supplied by app */
@@ -1764,7 +1764,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
else if ((msg_type == AVDT_MSG_TYPE_CMD) && (sig == AVDT_SIG_SETCONFIG))
{
/* parse config cmd message to struct allocated locally */
- msg.config_cmd.p_cfg = &cfg;
+ msg.config_cmd.p_cfg = &cfg;
}
else if ((msg_type == AVDT_MSG_TYPE_CMD) && (sig == AVDT_SIG_RECONFIG))
{
@@ -1833,7 +1833,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
}
}
}
-
+
if (ok)
{
/* if it's a ccb event send to ccb */
@@ -1844,7 +1844,7 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
/* if it's a scb event */
else
{
- /* Scb events always have a single seid. For cmd, get seid from
+ /* Scb events always have a single seid. For cmd, get seid from
** message. For rej and rsp, get seid from p_curr_cmd.
*/
if (msg_type == AVDT_MSG_TYPE_CMD)
diff --git a/stack/avdt/avdt_scb.c b/stack/avdt/avdt_scb.c
index c43262b..346d1ad 100644
--- a/stack/avdt/avdt_scb.c
+++ b/stack/avdt/avdt_scb.c
@@ -86,7 +86,7 @@ const char * const avdt_scb_evt_str[] = {
"CC_CLOSE_EVT"
};
-#endif
+#endif
/* action function list */
@@ -503,7 +503,7 @@ const tAVDT_SCB_ST_TBL avdt_scb_st_tbl[] = {
** Function avdt_scb_event
**
** Description State machine event handling function for scb
-**
+**
**
** Returns Nothing.
**
@@ -552,7 +552,7 @@ void avdt_scb_event(tAVDT_SCB *p_scb, UINT8 event, tAVDT_SCB_EVT *p_data)
** Function avdt_scb_init
**
** Description Initialize stream control block module.
-**
+**
**
** Returns Nothing.
**
@@ -569,7 +569,7 @@ void avdt_scb_init(void)
** Function avdt_scb_alloc
**
** Description Allocate a stream control block.
-**
+**
**
** Returns pointer to the scb, or NULL if none could be allocated.
**
@@ -608,7 +608,7 @@ tAVDT_SCB *avdt_scb_alloc(tAVDT_CS *p_cs)
break;
}
}
-
+
if (i == AVDT_NUM_SEPS)
{
/* out of ccbs */
@@ -624,7 +624,7 @@ tAVDT_SCB *avdt_scb_alloc(tAVDT_CS *p_cs)
** Function avdt_scb_dealloc
**
** Description Deallocate a stream control block.
-**
+**
**
** Returns void.
**
@@ -652,7 +652,7 @@ void avdt_scb_dealloc(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
** Function avdt_scb_to_hdl
**
** Description Given a pointer to an scb, return its handle (or seid).
-**
+**
**
** Returns Index of scb.
**
@@ -667,7 +667,7 @@ UINT8 avdt_scb_to_hdl(tAVDT_SCB *p_scb)
** Function avdt_scb_by_hdl
**
** Description Given an scb handle (or seid), return a pointer to the scb.
-**
+**
**
** Returns Pointer to scb or NULL if index is out of range or scb
** is not allocated.
@@ -681,7 +681,7 @@ tAVDT_SCB *avdt_scb_by_hdl(UINT8 hdl)
if ((hdl > 0) && (hdl <= AVDT_NUM_SEPS))
{
p_scb = &avdt_cb.scb[hdl - 1];
-
+
/* verify scb is allocated */
if (!p_scb->allocated)
{
@@ -702,7 +702,7 @@ tAVDT_SCB *avdt_scb_by_hdl(UINT8 hdl)
** Function avdt_scb_verify
**
** Description Verify the condition of a list of scbs.
-**
+**
**
** Returns SEID that failed, or 0 if success.
**
@@ -766,7 +766,7 @@ UINT8 avdt_scb_verify(tAVDT_CCB *p_ccb, UINT8 state, UINT8 *p_seid, UINT16 num_s
**
** Description Given a list of SCB handles, return a list of peer SEIDs
** for the handles, copied in place into the struct passed in.
-**
+**
**
** Returns Nothing.
**
diff --git a/stack/avdt/avdt_scb_act.c b/stack/avdt/avdt_scb_act.c
index f117f33..1784713 100644
--- a/stack/avdt/avdt_scb_act.c
+++ b/stack/avdt/avdt_scb_act.c
@@ -25,15 +25,15 @@
** allowing for this table.
*/
const UINT8 avdt_scb_cback_evt[] = {
- 0, /* API_REMOVE_EVT (no event) */
- AVDT_WRITE_CFM_EVT, /* API_WRITE_REQ_EVT */
- 0, /* API_GETCONFIG_REQ_EVT (no event) */
+ 0, /* API_REMOVE_EVT (no event) */
+ AVDT_WRITE_CFM_EVT, /* API_WRITE_REQ_EVT */
+ 0, /* API_GETCONFIG_REQ_EVT (no event) */
0, /* API_DELAY_RPT_REQ_EVT (no event) */
- AVDT_OPEN_CFM_EVT, /* API_SETCONFIG_REQ_EVT */
- AVDT_OPEN_CFM_EVT, /* API_OPEN_REQ_EVT */
- AVDT_CLOSE_CFM_EVT, /* API_CLOSE_REQ_EVT */
- AVDT_RECONFIG_CFM_EVT, /* API_RECONFIG_REQ_EVT */
- AVDT_SECURITY_CFM_EVT, /* API_SECURITY_REQ_EVT */
+ AVDT_OPEN_CFM_EVT, /* API_SETCONFIG_REQ_EVT */
+ AVDT_OPEN_CFM_EVT, /* API_OPEN_REQ_EVT */
+ AVDT_CLOSE_CFM_EVT, /* API_CLOSE_REQ_EVT */
+ AVDT_RECONFIG_CFM_EVT, /* API_RECONFIG_REQ_EVT */
+ AVDT_SECURITY_CFM_EVT, /* API_SECURITY_REQ_EVT */
0 /* API_ABORT_REQ_EVT (no event) */
};
@@ -214,7 +214,7 @@ void avdt_scb_hdl_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
**
** Function avdt_scb_hdl_pkt_no_frag
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -261,7 +261,7 @@ void avdt_scb_hdl_pkt_no_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
/* padding length in last byte of packet */
pad_len = *(p_start + p_data->p_pkt->len);
}
-
+
/* do sanity check */
if ((offset > p_data->p_pkt->len) || ((pad_len + offset) > p_data->p_pkt->len))
{
@@ -285,7 +285,7 @@ void avdt_scb_hdl_pkt_no_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
#if AVDT_MULTIPLEXING == TRUE
if ((p_scb->cs.p_media_cback != NULL)
- && (p_scb->p_media_buf != NULL)
+ && (p_scb->p_media_buf != NULL)
&& (p_scb->media_buf_len > p_data->p_pkt->len))
{
/* media buffer enough length is assigned by application. Lets use it*/
@@ -305,7 +305,7 @@ void avdt_scb_hdl_pkt_no_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
**
** Function avdt_scb_hdl_report
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -382,7 +382,7 @@ UINT8 * avdt_scb_hdl_report(tAVDT_SCB *p_scb, UINT8 *p, UINT16 len)
**
** Function avdt_scb_hdl_pkt_frag
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -423,7 +423,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
al_tsid = (*p)>>3;
al_frag = ( (*p) >> 2 ) & 0x01;
al_lcode = (*p++) & AVDT_ALH_LCODE_MASK;
-
+
/* in case of TSID=00000, a second AL header byte, before the length field,
** is expected and contains the actual TSID, aligned with MSB */
if(al_tsid == 0)
@@ -451,8 +451,8 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
if(frag_len >= al_len)
frag_len = al_len;
- /* check TSID corresponds to config */
- if (al_tsid != p_scb->curr_cfg.mux_tsid_media)
+ /* check TSID corresponds to config */
+ if (al_tsid != p_scb->curr_cfg.mux_tsid_media)
{
#if AVDT_REPORTING == TRUE
if((p_scb->curr_cfg.psc_mask & AVDT_PSC_REPORT) &&
@@ -470,7 +470,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
}
}
/* check are buffer for assembling and related callback set */
- else if ((p_scb->p_media_buf == NULL) || (p_scb->cs.p_media_cback == NULL))
+ else if ((p_scb->p_media_buf == NULL) || (p_scb->cs.p_media_cback == NULL))
{
AVDT_TRACE_WARNING0("NULL p_media_buf or p_media_cback");
break;
@@ -486,19 +486,19 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
p_scb->frag_off = 0;
p_scb->frag_org_len = al_len; /* total length of original media packet */
/* length check: minimum length of media header is 12 */
- if (p_scb->frag_org_len < 12)
+ if (p_scb->frag_org_len < 12)
{
AVDT_TRACE_WARNING1("bad al_len: %d(<12)", al_len);
break;
}
/* check that data fit into buffer */
- if (al_len > p_scb->media_buf_len)
+ if (al_len > p_scb->media_buf_len)
{
AVDT_TRACE_WARNING2("bad al_len: %d(>%d)", al_len, p_scb->media_buf_len);
break;
}
/* make sure it is the last fragment in l2cap packet */
- if (p + al_len < p_end)
+ if (p + al_len < p_end)
{
AVDT_TRACE_WARNING2("bad al_len: %d(>%d)", al_len, p_scb->media_buf_len);
break;
@@ -513,13 +513,13 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
if(al_len != p_scb->frag_org_len - p_scb->frag_off)
{
AVDT_TRACE_WARNING4("al_len:%d != (frag_org_len:%d - frag_off:%d) %d",
- al_len, p_scb->frag_org_len, p_scb->frag_off,
+ al_len, p_scb->frag_org_len, p_scb->frag_off,
(p_scb->frag_org_len- p_scb->frag_off));
break;
}
/* do sanity check */
- if (p_scb->frag_off == 0)
+ if (p_scb->frag_off == 0)
{
AVDT_TRACE_WARNING0("frag_off=0");
break;
@@ -532,7 +532,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
p_scb->frag_off, p_scb->frag_org_len, p_scb->media_buf_len);
break;
}
-
+
AVDT_TRACE_DEBUG4("Received fragment org_len=%d off=%d al_len=%d frag_len=%d",
p_scb->frag_org_len, p_scb->frag_off, al_len, frag_len);
@@ -612,7 +612,7 @@ void avdt_scb_hdl_pkt_frag(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
**
** Function avdt_scb_hdl_pkt
**
-** Description
+** Description
**
** Returns Nothing.
**
@@ -629,7 +629,7 @@ void avdt_scb_hdl_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
avdt_scb_hdl_pkt_frag(p_scb, p_data);
}
- else
+ else
#endif
#if AVDT_REPORTING == TRUE
if(p_data->p_pkt->layer_specific == AVDT_CHAN_REPORT)
@@ -718,7 +718,7 @@ void avdt_scb_hdl_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
memcpy(p_scb->curr_cfg.protect_info, p_scb->req_cfg.protect_info, AVDT_PROTECT_SIZE);
}
}
-
+
p_data->msg.svccap.p_cfg = &p_scb->curr_cfg;
/* call application callback */
@@ -861,7 +861,7 @@ void avdt_scb_hdl_setconfig_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
void avdt_scb_hdl_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
tAVDT_EVT_HDR single;
-
+
if (p_scb->p_ccb != NULL)
{
/* save configuration */
@@ -950,9 +950,9 @@ void avdt_scb_hdl_suspend_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
** Function avdt_scb_hdl_tc_close
**
** Description This function is called when the transport channel is
-** closed. It marks the SCB as not in use and
-** initializes certain SCB parameters. It then sends
-** an AVDT_CCB_UL_CLOSE_EVT to the CCB if the SCB
+** closed. It marks the SCB as not in use and
+** initializes certain SCB parameters. It then sends
+** an AVDT_CCB_UL_CLOSE_EVT to the CCB if the SCB
** initiated the close. It then checks to see if the SCB
** is to be removed. If it is it deallocates the SCB. Finally,
** it calls the application callback with a close indication.
@@ -1000,7 +1000,7 @@ void avdt_scb_hdl_tc_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
if (p_scb->remove)
{
- avdt_scb_dealloc(p_scb, NULL);
+ avdt_scb_dealloc(p_scb, NULL);
}
/* call app callback */
@@ -1122,7 +1122,7 @@ void avdt_scb_hdl_tc_open(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
/* stop transport channel connect timer */
btu_stop_timer(&p_scb->timer_entry);
-
+
event = (p_scb->role == AVDT_OPEN_INT) ? AVDT_OPEN_CFM_EVT : AVDT_OPEN_IND_EVT;
p_data->open.hdr.err_code = 0;
@@ -1330,7 +1330,7 @@ void avdt_scb_snd_abort_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
tAVDT_EVT_HDR hdr;
if (p_scb->p_ccb != NULL)
- {
+ {
p_scb->role = AVDT_CLOSE_INT;
hdr.seid = p_scb->peer_seid;
@@ -1493,7 +1493,7 @@ void avdt_scb_snd_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
/* send response */
avdt_msg_send_rsp(p_scb->p_ccb, AVDT_SIG_OPEN, &p_data->msg);
-
+
/* start tc connect timer */
btu_start_timer(&p_scb->timer_entry, BTU_TTYPE_AVDT_SCB_TC, AVDT_SCB_TC_CONN_TOUT);
}
@@ -1548,7 +1548,7 @@ void avdt_scb_snd_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
/* send reject */
avdt_msg_send_rej(p_scb->p_ccb, AVDT_SIG_RECONFIG, &p_data->msg);
- }
+ }
}
/*******************************************************************************
diff --git a/stack/avrc/avrc_api.c b/stack/avrc/avrc_api.c
index e2ffd45..94425af 100644
--- a/stack/avrc/avrc_api.c
+++ b/stack/avrc/avrc_api.c
@@ -22,7 +22,7 @@
#define AVRC_MAX_RCV_CTRL_EVT AVCT_BROWSE_UNCONG_IND_EVT
-static const UINT8 avrc_ctrl_event_map[] =
+static const UINT8 avrc_ctrl_event_map[] =
{
AVRC_OPEN_IND_EVT, /* AVCT_CONNECT_CFM_EVT */
AVRC_OPEN_IND_EVT, /* AVCT_CONNECT_IND_EVT */
@@ -30,8 +30,8 @@ static const UINT8 avrc_ctrl_event_map[] =
AVRC_CLOSE_IND_EVT, /* AVCT_DISCONNECT_IND_EVT */
AVRC_CONG_IND_EVT, /* AVCT_CONG_IND_EVT */
AVRC_UNCONG_IND_EVT,/* AVCT_UNCONG_IND_EVT */
- AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_CFM_EVT */
- AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_IND_EVT */
+ AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_CFM_EVT */
+ AVRC_BROWSE_OPEN_IND_EVT, /* AVCT_BROWSE_CONN_IND_EVT */
AVRC_BROWSE_CLOSE_IND_EVT, /* AVCT_BROWSE_DISCONN_CFM_EVT */
AVRC_BROWSE_CLOSE_IND_EVT, /* AVCT_BROWSE_DISCONN_IND_EVT */
AVRC_BROWSE_CONG_IND_EVT, /* AVCT_BROWSE_CONG_IND_EVT */
@@ -262,7 +262,7 @@ static void avrc_msg_cback(UINT8 handle, UINT8 label, UINT8 cr,
msg.pass.state = FALSE;
p_data++;
msg.pass.pass_len = *p_data++;
- if (msg.pass.pass_len != p_pkt->len - 5)
+ if (msg.pass.pass_len != p_pkt->len - 5)
msg.pass.pass_len = p_pkt->len - 5;
if (msg.pass.pass_len)
msg.pass.p_pass_data = p_data;
@@ -389,13 +389,13 @@ static BT_HDR * avrc_pass_msg(tAVRC_MSG_PASS *p_msg)
**
** Function AVRC_Open
**
-** Description This function is called to open a connection to AVCTP.
+** Description This function is called to open a connection to AVCTP.
** The connection can be either an initiator or acceptor, as
-** determined by the p_ccb->stream parameter.
+** determined by the p_ccb->stream parameter.
** The connection can be a target, a controller or for both role,
-** as determined by the p_ccb->control parameter.
+** as determined by the p_ccb->control parameter.
** By definition, a target connection is an acceptor connection
-** that waits for an incoming AVCTP connection from the peer.
+** that waits for an incoming AVCTP connection from the peer.
** The connection remains available to the application until
** the application closes it by calling AVRC_Close(). The
** application does not need to reopen the connection after an
@@ -407,7 +407,7 @@ static BT_HDR * avrc_pass_msg(tAVRC_MSG_PASS *p_msg)
** p_ccb->p_ctrl_cback: Pointer to control callback function.
**
** p_ccb->p_msg_cback: Pointer to message callback function.
-**
+**
** p_ccb->conn: AVCTP connection role. This is set to
** AVCTP_INT for initiator connections and AVCTP_ACP
** for acceptor connections.
@@ -422,7 +422,7 @@ static BT_HDR * avrc_pass_msg(tAVRC_MSG_PASS *p_msg)
** connections it can be set to NULL.
**
** Output Parameters:
-** p_handle: Pointer to handle. This parameter is only
+** p_handle: Pointer to handle. This parameter is only
** valid if AVRC_SUCCESS is returned.
**
** Returns AVRC_SUCCESS if successful.
@@ -482,10 +482,10 @@ UINT16 AVRC_Close(UINT8 handle)
**
** Description This function is used to send the AVRCP byte stream in p_pkt
** down to AVCTP.
-**
+**
** It is expected that p_pkt->offset is at least AVCT_MSG_OFFSET
** p_pkt->layer_specific is AVCT_DATA_CTRL or AVCT_DATA_BROWSE
-** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
+** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSE
** The above BT_HDR settings are set by the AVRC_Bld* functions.
**
** Returns AVRC_SUCCESS if successful.
@@ -512,7 +512,7 @@ UINT16 AVRC_MsgReq (UINT8 handle, UINT8 label, UINT8 ctype, BT_HDR *p_pkt)
**
** label: Transaction label.
**
-** p_msg: Pointer to PASS THROUGH message structure.
+** p_msg: Pointer to PASS THROUGH message structure.
**
** Output Parameters:
** None.
@@ -540,7 +540,7 @@ UINT16 AVRC_PassCmd(UINT8 handle, UINT8 label, tAVRC_MSG_PASS *p_msg)
** Function AVRC_PassRsp
**
** Description Send a PASS THROUGH response to the peer device. This
-** function can only be called for target role connections.
+** function can only be called for target role connections.
** This function must be called when a PASS THROUGH command
** message is received from the peer through the
** tAVRC_MSG_CBACK callback function.
diff --git a/stack/avrc/avrc_int.h b/stack/avrc/avrc_int.h
index ee8f1f8..a2a4073 100644
--- a/stack/avrc/avrc_int.h
+++ b/stack/avrc/avrc_int.h
@@ -17,8 +17,8 @@
#include "avrc_api.h"
/* DEBUG FLAGS
- *
- * #define META_DEBUG_ENABLED
+ *
+ * #define META_DEBUG_ENABLED
*/
/*****************************************************************************
** Constants
diff --git a/stack/avrc/avrc_sdp.c b/stack/avrc/avrc_sdp.c
index d856b4e..c9ad935 100644
--- a/stack/avrc/avrc_sdp.c
+++ b/stack/avrc/avrc_sdp.c
@@ -22,7 +22,7 @@ tAVRC_CB avrc_cb;
#endif
/* update AVRC_NUM_PROTO_ELEMS if this constant is changed */
-const tSDP_PROTOCOL_ELEM avrc_proto_list [] =
+const tSDP_PROTOCOL_ELEM avrc_proto_list [] =
{
{UUID_PROTOCOL_L2CAP, 1, {AVCT_PSM, 0} },
{UUID_PROTOCOL_AVCTP, 1, {AVCT_REV_1_0, 0} }
@@ -65,7 +65,7 @@ static void avrc_sdp_cback(UINT16 status)
** Description This function is called by the application to perform service
** discovery and retrieve AVRCP SDP record information from a
** peer device. Information is returned for the first service
-** record found on the server that matches the service UUID.
+** record found on the server that matches the service UUID.
** The callback function will be executed when service discovery
** is complete. There can only be one outstanding call to
** AVRC_FindService() at a time; the application must wait for
@@ -83,7 +83,7 @@ static void avrc_sdp_cback(UINT16 status)
** bd_addr: BD address of the peer device.
**
** p_db: SDP discovery database parameters.
-**
+**
** p_cback: Pointer to the callback function.
**
** Output Parameters:
@@ -113,7 +113,7 @@ UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
return AVRC_BAD_PARAM;
/* check if it is busy */
- if( avrc_cb.service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET ||
+ if( avrc_cb.service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET ||
avrc_cb.service_uuid == UUID_SERVCLASS_AV_REMOTE_CONTROL)
return AVRC_NO_RESOURCES;
@@ -149,7 +149,7 @@ UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
** Function AVRC_AddRecord
**
** Description This function is called to build an AVRCP SDP record.
-** Prior to calling this function the application must
+** Prior to calling this function the application must
** call SDP_CreateRecord() to create an SDP record.
**
** Input Parameters:
diff --git a/stack/bnep/bnep_api.c b/stack/bnep/bnep_api.c
index 90dd946..7c4dee9 100644
--- a/stack/bnep/bnep_api.c
+++ b/stack/bnep/bnep_api.c
@@ -46,7 +46,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 +65,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 +83,7 @@ tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info)
** its callbacks.
**
** Parameters: void
-**
+**
**
** Returns void
**
@@ -214,7 +214,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 adc5c2b..a849052 100644
--- a/stack/bnep/bnep_int.h
+++ b/stack/bnep/bnep_int.h
@@ -206,9 +206,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 2a4933a..fca0d22 100644
--- a/stack/bnep/bnep_main.c
+++ b/stack/bnep/bnep_main.c
@@ -99,7 +99,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 +113,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 +124,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 +385,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 8c23877..22c2730 100644
--- a/stack/bnep/bnep_utils.c
+++ b/stack/bnep/bnep_utils.c
@@ -469,7 +469,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 +650,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 +960,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 +1012,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
**
diff --git a/stack/btm/btm_acl.c b/stack/btm/btm_acl.c
index 57a7b5b..4dd229c 100644
--- a/stack/btm/btm_acl.c
+++ b/stack/btm/btm_acl.c
@@ -131,7 +131,7 @@ UINT8 btm_handle_to_acl_index (UINT16 hci_handle)
** Returns void
**
*******************************************************************************/
-void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
+void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
UINT16 hci_handle, UINT8 link_role, UINT8 is_le_link)
{
tBTM_SEC_DEV_REC *p_dev_rec;
@@ -194,10 +194,10 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
{
BTM_TRACE_DEBUG1 ("device_type=0x%x", p_dev_rec->device_type);
}
-#endif
+#endif
- if (p_dev_rec
+ if (p_dev_rec
#if (BLE_INCLUDED == TRUE)
&& p_dev_rec->device_type != BT_DEVICE_TYPE_BLE
#endif
@@ -213,7 +213,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
if (p_dev_rec->features[yy])
{
memcpy (p->features, p_dev_rec->features, BD_FEATURES_LEN);
- if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
+ if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
HCI_SIMPLE_PAIRING_SUPPORTED(p->features))
{
/* if SM4 supported, check peer support for SM4
@@ -237,7 +237,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
btm_establish_continue(p);
if (link_role == HCI_ROLE_MASTER)
- {
+ {
btm_ble_update_bg_state();
btm_ble_resume_bg_conn (NULL, FALSE);
@@ -337,7 +337,7 @@ void btm_acl_removed (BD_ADDR bda)
#if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE)
- BTM_TRACE_DEBUG4 ("acl hci_handle=%d is_le_link=%d connectable_mode=0x%0x link_role=%d",
+ BTM_TRACE_DEBUG4 ("acl hci_handle=%d is_le_link=%d connectable_mode=0x%0x link_role=%d",
p->hci_handle,
p->is_le_link,
btm_cb.ble_ctr_cb.inq_var.connectable_mode,
@@ -380,7 +380,7 @@ void btm_acl_removed (BD_ADDR bda)
}
else
{
- BTM_TRACE_DEBUG0("Bletooth link down");
+ BTM_TRACE_DEBUG0("Bletooth link down");
p_dev_rec->sec_flags &= ~(BTM_SEC_AUTHORIZED | BTM_SEC_AUTHENTICATED | BTM_SEC_ENCRYPTED | BTM_SEC_ROLE_SWITCHED);
}
BTM_TRACE_DEBUG1("after update p_dev_rec->sec_flags=0x%x", p_dev_rec->sec_flags);
@@ -530,7 +530,7 @@ tBTM_STATUS BTM_GetRole (BD_ADDR remote_bd_addr, UINT8 *p_role)
** Function BTM_SwitchRole
**
** Description This function is called to switch role between master and
-** slave. If role is already set it will do nothing. If the
+** slave. If role is already set it will do nothing. If the
** command was initiated, the callback function is called upon
** completion.
**
@@ -626,7 +626,7 @@ tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, UINT8 new_role, tBTM_CMPL_CB
/* Coverity FALSE-POSITIVE error from Coverity tool. Please do NOT remove following comment. */
/* coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
-*/
+*/
settings.mode = BTM_PM_MD_ACTIVE;
status = BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p->remote_addr, &settings);
if (status != BTM_CMD_STARTED)
@@ -671,7 +671,7 @@ tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, UINT8 new_role, tBTM_CMPL_CB
if (p_cb)
{
memcpy (btm_cb.devcb.switch_role_ref_data.remote_bd_addr, remote_bd_addr,
- BD_ADDR_LEN);
+ BD_ADDR_LEN);
btm_cb.devcb.switch_role_ref_data.role = new_role;
/* initialized to an error code */
btm_cb.devcb.switch_role_ref_data.hci_status = HCI_ERR_UNSUPPORTED_VALUE;
@@ -736,7 +736,7 @@ tBTM_STATUS BTM_ChangeLinkKey (BD_ADDR remote_bd_addr, tBTM_CMPL_CB *p_cb)
/* Coverity: FALSE-POSITIVE error from Coverity tool. Please do NOT remove following comment. */
/* coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
-*/
+*/
settings.mode = BTM_PM_MD_ACTIVE;
status = BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p->remote_addr, &settings);
if (status != BTM_CMD_STARTED)
@@ -770,7 +770,7 @@ tBTM_STATUS BTM_ChangeLinkKey (BD_ADDR remote_bd_addr, tBTM_CMPL_CB *p_cb)
/* Initialize return structure in case request fails */
memcpy (btm_cb.devcb.chg_link_key_ref_data.remote_bd_addr, remote_bd_addr,
- BD_ADDR_LEN);
+ BD_ADDR_LEN);
btm_cb.devcb.p_chg_link_key_cb = p_cb;
return(BTM_CMD_STARTED);
}
@@ -843,7 +843,7 @@ void btm_acl_link_key_change (UINT16 handle, UINT8 status)
**
** Function btm_acl_encrypt_change
**
-** Description This function is when encryption of the connection is
+** Description This function is when encryption of the connection is
** completed by the LM. Checks to see if a role switch or
** change of link key was active and initiates or continues
** process if needed.
@@ -930,7 +930,7 @@ void btm_acl_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable)
BTM_TRACE_WARNING0("btm_acl_encrypt_change -> Issuing delayed HCI_Disconnect!!!");
btsnd_hcic_disconnect(p_dev_rec->hci_handle, HCI_ERR_PEER_USER);
}
- BTM_TRACE_ERROR2("btm_acl_encrypt_change: tBTM_SEC_DEV:0x%x rs_disc_pending=%d",
+ BTM_TRACE_ERROR2("btm_acl_encrypt_change: tBTM_SEC_DEV:0x%x rs_disc_pending=%d",
(UINT32)p_dev_rec, p_dev_rec->rs_disc_pending);
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
}
@@ -1216,7 +1216,7 @@ void btm_read_remote_features_complete (UINT8 *p)
memcpy (p_dev_rec->features, p_acl_cb->features, BD_FEATURES_LEN);
- if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
+ if (BTM_SEC_MODE_SP == btm_cb.security_mode &&
HCI_SIMPLE_PAIRING_SUPPORTED(p_acl_cb->features))
{
/* if SM4 supported, check peer support for SM4
@@ -1375,10 +1375,10 @@ static void btm_establish_continue (tACL_CONN *p_acl_cb)
btm_acl_update_busy_level (BTM_BLI_ACL_UP_EVT);
#else
if (btm_cb.p_acl_changed_cb)
- (*btm_cb.p_acl_changed_cb) (p_acl_cb->remote_addr,
- p_acl_cb->remote_dc,
- p_acl_cb->remote_name,
- p_acl_cb->features,
+ (*btm_cb.p_acl_changed_cb) (p_acl_cb->remote_addr,
+ p_acl_cb->remote_dc,
+ p_acl_cb->remote_name,
+ p_acl_cb->features,
TRUE);
#endif
}
@@ -1421,7 +1421,7 @@ tBTM_STATUS BTM_SetLinkSuperTout (BD_ADDR remote_bda, UINT16 timeout)
/* Only send if current role is Master; 2.0 spec requires this */
if (p->link_role == BTM_ROLE_MASTER)
{
- if (!btsnd_hcic_write_link_super_tout (LOCAL_BR_EDR_CONTROLLER_ID,
+ if (!btsnd_hcic_write_link_super_tout (LOCAL_BR_EDR_CONTROLLER_ID,
p->hci_handle, timeout))
return(BTM_NO_RESOURCES);
@@ -1812,7 +1812,7 @@ BOOLEAN BTM_IsAclConnectionUp (BD_ADDR remote_bda)
**
** Function BTM_GetNumAclLinks
**
-** Description This function is called to count the number of
+** Description This function is called to count the number of
** ACL links that are active.
**
** Returns UINT16 Number of active ACL links
@@ -2098,7 +2098,7 @@ UINT8 BTM_AllocateSCN(void)
** Function BTM_TryAllocateSCN
**
** Description Try to allocate a fixed server channel
-**
+**
** Returns Returns TRUE if server channel was available
**
*******************************************************************************/
@@ -2119,7 +2119,7 @@ BOOLEAN BTM_TryAllocateSCN(UINT8 scn)
btm_cb.btm_scn[scn-1] = TRUE;
return TRUE;
}
-
+
return (FALSE); /* Port was busy */
}
@@ -2291,7 +2291,7 @@ UINT16 btm_get_max_packet_size (BD_ADDR addr)
#ifdef BRCM_VS
/* Using HCI size 1017 instead of 1021 */
- if ((pkt_size == HCI_EDR3_DH5_PACKET_SIZE)
+ if ((pkt_size == HCI_EDR3_DH5_PACKET_SIZE)
&& (btu_cb.hcit_acl_data_size == 1017))
pkt_size = 1017;
#endif
@@ -2423,7 +2423,7 @@ tBTM_STATUS BTM_SetQoS (BD_ADDR bd, FLOW_SPEC *p_flow, tBTM_CMPL_CB *p_cb)
btu_start_timer (&btm_cb.devcb.qossu_timer, BTU_TTYPE_BTM_ACL, BTM_DEV_REPLY_TIMEOUT);
btm_cb.devcb.p_qossu_cmpl_cb = p_cb;
- if (!btsnd_hcic_qos_setup (p->hci_handle, p_flow->qos_flags, p_flow->service_type,
+ if (!btsnd_hcic_qos_setup (p->hci_handle, p_flow->qos_flags, p_flow->service_type,
p_flow->token_rate, p_flow->peak_bandwidth, p_flow->latency,p_flow->delay_variation))
{
btm_cb.devcb.p_qossu_cmpl_cb = NULL;
@@ -2469,7 +2469,7 @@ void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow)
qossu.flow.token_rate = p_flow->token_rate;
qossu.flow.peak_bandwidth = p_flow->peak_bandwidth;
qossu.flow.latency = p_flow->latency;
- qossu.flow.delay_variation = p_flow->delay_variation;
+ qossu.flow.delay_variation = p_flow->delay_variation;
}
BTM_TRACE_DEBUG1 ("BTM: p_flow->delay_variation: 0x%02x",
qossu.flow.delay_variation);
@@ -2571,8 +2571,8 @@ tBTM_STATUS BTM_ReadLinkQuality (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
**
** Function BTM_ReadTxPower
**
-** Description This function is called to read the current
-** TX power of the connection. The tx power level results
+** Description This function is called to read the current
+** TX power of the connection. The tx power level results
** are returned in the callback.
** (tBTM_RSSI_RESULTS)
**
@@ -2608,7 +2608,7 @@ tBTM_STATUS BTM_ReadTxPower (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
memcpy(btm_cb.devcb.read_tx_pwr_addr, remote_bda, BD_ADDR_LEN);
ret = btsnd_hcic_ble_read_adv_chnl_tx_power();
}
- else
+ else
#endif
{
ret = btsnd_hcic_read_tx_power (p->hci_handle, BTM_READ_RSSI_TYPE_CUR);
@@ -2656,7 +2656,7 @@ void btm_read_tx_power_complete (UINT8 *p, BOOLEAN is_ble)
if (results.hci_status == HCI_SUCCESS)
{
results.status = BTM_SUCCESS;
-
+
if (!is_ble)
{
STREAM_TO_UINT16 (handle, p);
@@ -2871,7 +2871,7 @@ void btm_cont_rswitch_or_chglinkkey (tACL_CONN *p, tBTM_SEC_DEV_REC *p_dev_rec,
BOOLEAN sw_ok = TRUE;
BOOLEAN chlk_ok = TRUE;
BTM_TRACE_DEBUG0 ("btm_cont_rswitch_or_chglinkkey ");
- /* Check to see if encryption needs to be turned off if pending
+ /* Check to see if encryption needs to be turned off if pending
change of link key or role switch */
if (p->switch_role_state == BTM_ACL_SWKEY_STATE_MODE_CHANGE ||
p->change_key_state == BTM_ACL_SWKEY_STATE_MODE_CHANGE)
@@ -3102,13 +3102,13 @@ void btm_acl_chk_peer_pkt_type_support (tACL_CONN *p, UINT16 *p_pkt_type)
/* 3 and 5 slot packets? */
if (!HCI_3_SLOT_PACKETS_SUPPORTED(p->features))
*p_pkt_type &= ~(BTM_ACL_PKT_TYPES_MASK_DH3 +BTM_ACL_PKT_TYPES_MASK_DM3);
-
+
if (!HCI_5_SLOT_PACKETS_SUPPORTED(p->features))
*p_pkt_type &= ~(BTM_ACL_PKT_TYPES_MASK_DH5 + BTM_ACL_PKT_TYPES_MASK_DM5);
- /* If HCI version > 2.0, then also check EDR packet types */
+ /* If HCI version > 2.0, then also check EDR packet types */
if (btm_cb.devcb.local_version.hci_version >= HCI_PROTO_VERSION_2_0)
- {
+ {
/* 2 and 3 MPS support? */
if (!HCI_EDR_ACL_2MPS_SUPPORTED(p->features))
/* Not supported. Add 'not_supported' mask for all 2MPS packet types */
@@ -3118,7 +3118,7 @@ void btm_acl_chk_peer_pkt_type_support (tACL_CONN *p, UINT16 *p_pkt_type)
/* Not supported. Add 'not_supported' mask for all 3MPS packet types */
*p_pkt_type |= (BTM_ACL_PKT_TYPES_MASK_NO_3_DH1 + BTM_ACL_PKT_TYPES_MASK_NO_3_DH3 + BTM_ACL_PKT_TYPES_MASK_NO_3_DH5);
- /* EDR 3 and 5 slot support? */
+ /* EDR 3 and 5 slot support? */
if (HCI_EDR_ACL_2MPS_SUPPORTED(p->features) || HCI_EDR_ACL_3MPS_SUPPORTED(p->features))
{
if (!HCI_3_SLOT_EDR_ACL_SUPPORTED(p->features))
diff --git a/stack/btm/btm_ble.c b/stack/btm/btm_ble.c
index 6b1db39..e34b8e2 100644
--- a/stack/btm/btm_ble.c
+++ b/stack/btm/btm_ble.c
@@ -47,7 +47,7 @@ static void btm_ble_update_active_bgconn_scan_params(void);
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type,
+BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type,
tBLE_ADDR_TYPE addr_type)
{
#if BLE_INCLUDED == TRUE
@@ -78,9 +78,9 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
p_dev_rec->hci_handle = BTM_GetHCIConnHandle (bd_addr);
/* update conn params, use default value for background connection params */
- p_dev_rec->conn_params.min_conn_int =
- p_dev_rec->conn_params.max_conn_int =
- p_dev_rec->conn_params.supervision_tout =
+ p_dev_rec->conn_params.min_conn_int =
+ p_dev_rec->conn_params.max_conn_int =
+ p_dev_rec->conn_params.supervision_tout =
p_dev_rec->conn_params.slave_latency = BTM_BLE_CONN_PARAM_UNDEF;
BTM_TRACE_DEBUG1 ("hci_handl=0x%x ", p_dev_rec->hci_handle );
@@ -106,7 +106,7 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
}
p_dev_rec->device_type = dev_type;
p_dev_rec->ble.ble_addr_type = addr_type;
- BTM_TRACE_DEBUG3 ("p_dev_rec->device_type =0x%x addr_type=0x%x sec_flags=0x%x",
+ BTM_TRACE_DEBUG3 ("p_dev_rec->device_type =0x%x addr_type=0x%x sec_flags=0x%x",
dev_type, addr_type, p_dev_rec->sec_flags);
/* sync up with the Inq Data base*/
@@ -115,7 +115,7 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
{
p_info->results.ble_addr_type = p_dev_rec->ble.ble_addr_type ;
p_info->results.device_type = p_dev_rec->device_type;
- BTM_TRACE_DEBUG2 ("InqDb device_type =0x%x addr_type=0x%x",
+ BTM_TRACE_DEBUG2 ("InqDb device_type =0x%x addr_type=0x%x",
p_info->results.device_type, p_info->results.ble_addr_type);
}
@@ -127,8 +127,8 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d
**
** Function BTM_SecAddBleKey
**
-** Description Add/modify LE device information. This function will be
-** normally called during host startup to restore all required
+** Description Add/modify LE device information. This function will be
+** normally called during host startup to restore all required
** information stored in the NVRAM.
**
** Parameters: bd_addr - BD address of the peer
@@ -144,7 +144,7 @@ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_
tBTM_SEC_DEV_REC *p_dev_rec;
BTM_TRACE_DEBUG0 ("BTM_SecAddBleKey");
p_dev_rec = btm_find_dev (bd_addr);
- if (!p_dev_rec || !p_le_key ||
+ if (!p_dev_rec || !p_le_key ||
(key_type != BTM_LE_KEY_PENC && key_type != BTM_LE_KEY_PID &&
key_type != BTM_LE_KEY_PCSRK && key_type != BTM_LE_KEY_LENC))
{
@@ -168,7 +168,7 @@ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_
#endif
- return(TRUE);
+ return(TRUE);
}
/*******************************************************************************
@@ -299,8 +299,8 @@ void BTM_ReadConnectionAddr (BD_ADDR conn_addr)
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation BTM_SUCCESS if success.
-** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation BTM_SUCCESS if success.
+** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -322,7 +322,7 @@ void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res)
** passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which passkey was requested
-** res - result of the operation BTM_SUCCESS if success
+** res - result of the operation BTM_SUCCESS if success
** key_len - length in bytes of the Passkey
** p_passkey - pointer to array with the passkey
** trusted_mask - bitwise OR of trusted services (array of UINT32)
@@ -348,7 +348,7 @@ void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey)
** SMP in response to BTM_LE_OOB_REQ_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
@@ -398,8 +398,8 @@ void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan_window)
p_ble_cb->scan_win = scan_window;
new_param = TRUE;
}
-
- if (new_param)
+
+ if (new_param)
btm_ble_update_active_bgconn_scan_params();
}
else
@@ -426,7 +426,7 @@ void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan_window)
** Returns void
**
*******************************************************************************/
-void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
+void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
UINT16 min_conn_int, UINT16 max_conn_int,
UINT16 slave_latency, UINT16 supervision_tout)
{
@@ -486,8 +486,8 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr,
**
** Function BTM_ReadDevInfo
**
-** Description This function is called to read the device/address type
-** of BD address.
+** Description This function is called to read the device/address type
+** of BD address.
**
** Parameter remote_bda: remote device address
** p_dev_type: output parameter to read the device type.
@@ -499,7 +499,7 @@ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR
#if BLE_INCLUDED == TRUE
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (remote_bda);
tBTM_INQ_INFO *p_inq_info = BTM_InqDbRead(remote_bda);
-
+
*p_dev_type = BT_DEVICE_TYPE_BREDR;
*p_addr_type = BLE_ADDR_PUBLIC;
@@ -566,7 +566,7 @@ static void btm_ble_update_active_bgconn_scan_params(void)
btm_ble_start_select_conn(TRUE, p_select_cback);
}
}
- return;
+ return;
}
/*******************************************************************************
@@ -654,7 +654,7 @@ void btm_ble_increment_sign_ctr(BD_ADDR bd_addr, BOOLEAN is_local )
else
p_dev_rec->ble.keys.counter++;
BTM_TRACE_DEBUG3 ("is_local=%d local sign counter=%d peer sign counter=%d",
- is_local,
+ is_local,
p_dev_rec->ble.keys.local_counter,
p_dev_rec->ble.keys.counter);
}
@@ -727,7 +727,7 @@ BOOLEAN btm_get_local_div (BD_ADDR bd_addr, UINT16 *p_div)
** Returns void
**
*******************************************************************************/
-void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY_VALUE *p_keys,
+void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY_VALUE *p_keys,
BOOLEAN pass_to_application)
{
tBTM_SEC_DEV_REC *p_rec;
@@ -750,20 +750,20 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN);
p_rec->ble.keys.sec_level = p_keys->penc_key.sec_level;
p_rec->ble.keys.ediv = p_keys->penc_key.ediv;
- p_rec->ble.keys.key_size = p_keys->penc_key.key_size;
+ p_rec->ble.keys.key_size = p_keys->penc_key.key_size;
p_rec->ble.key_type |= BTM_LE_KEY_PENC;
p_rec->sec_flags |= BTM_SEC_LINK_KEY_KNOWN;
if (p_keys->penc_key.sec_level == SMP_SEC_AUTHENTICATED)
p_rec->sec_flags |= BTM_SEC_LINK_KEY_AUTHED;
else
p_rec->sec_flags &= ~BTM_SEC_LINK_KEY_AUTHED;
- BTM_TRACE_DEBUG3("BTM_LE_KEY_PENC key_type=0x%x sec_flags=0x%x sec_leve=0x%x",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG3("BTM_LE_KEY_PENC key_type=0x%x sec_flags=0x%x sec_leve=0x%x",
+ p_rec->ble.key_type,
p_rec->sec_flags,
p_rec->ble.keys.sec_level);
break;
- case BTM_LE_KEY_PID:
+ case BTM_LE_KEY_PID:
memcpy(p_rec->ble.keys.irk, p_keys->pid_key, BT_OCTET16_LEN);
p_rec->ble.key_type |= BTM_LE_KEY_PID;
BTM_TRACE_DEBUG1("BTM_LE_KEY_PID key_type=0x%x save peer IRK", p_rec->ble.key_type);
@@ -780,8 +780,8 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
else
p_rec->sec_flags &= ~BTM_SEC_LINK_KEY_AUTHED;
- BTM_TRACE_DEBUG4("BTM_LE_KEY_PCSRK key_type=0x%x sec_flags=0x%x sec_level=0x%x peer_counter=%d",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG4("BTM_LE_KEY_PCSRK key_type=0x%x sec_flags=0x%x sec_level=0x%x peer_counter=%d",
+ p_rec->ble.key_type,
p_rec->sec_flags,
p_rec->ble.keys.srk_sec_level,
p_rec->ble.keys.counter );
@@ -790,11 +790,11 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
case BTM_LE_KEY_LENC:
p_rec->ble.keys.div = p_keys->lenc_key.div; /* update DIV */
p_rec->ble.keys.sec_level = p_keys->lenc_key.sec_level;
- p_rec->ble.keys.key_size = p_keys->lenc_key.key_size;
+ p_rec->ble.keys.key_size = p_keys->lenc_key.key_size;
p_rec->ble.key_type |= BTM_LE_KEY_LENC;
- BTM_TRACE_DEBUG4("BTM_LE_KEY_LENC key_type=0x%x DIV=0x%x key_size=0x%x sec_level=0x%x",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG4("BTM_LE_KEY_LENC key_type=0x%x DIV=0x%x key_size=0x%x sec_level=0x%x",
+ p_rec->ble.key_type,
p_rec->ble.keys.div,
p_rec->ble.keys.key_size,
p_rec->ble.keys.sec_level );
@@ -805,8 +805,8 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
p_rec->ble.keys.local_csrk_sec_level = p_keys->lcsrk_key.sec_level;
p_rec->ble.keys.local_counter = p_keys->lcsrk_key.counter;
p_rec->ble.key_type |= BTM_LE_KEY_LCSRK;
- BTM_TRACE_DEBUG4("BTM_LE_KEY_LCSRK key_type=0x%x DIV=0x%x scrk_sec_level=0x%x local_counter=%d",
- p_rec->ble.key_type,
+ BTM_TRACE_DEBUG4("BTM_LE_KEY_LCSRK key_type=0x%x DIV=0x%x scrk_sec_level=0x%x local_counter=%d",
+ p_rec->ble.key_type,
p_rec->ble.keys.div,
p_rec->ble.keys.local_csrk_sec_level,
p_rec->ble.keys.local_counter );
@@ -818,7 +818,7 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
}
BTM_TRACE_DEBUG3 ("BLE key type 0x%02x updated for BDA: %08x%04x (btm_sec_save_le_key)", key_type,
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5]);
/* Notify the application that one of the BLE keys has been updated
@@ -834,7 +834,7 @@ void btm_sec_save_le_key(BD_ADDR bd_addr, tBTM_LE_KEY_TYPE key_type, tBTM_LE_KEY
}
BTM_TRACE_WARNING3 ("BLE key type 0x%02x called for Unknown BDA or type: %08x%04x !! (btm_sec_save_le_key)", key_type,
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5]);
if (p_rec)
@@ -899,11 +899,11 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
UINT8 req_sec_level, cur_sec_level;
- BTM_TRACE_DEBUG1 ("btm_ble_link_sec_check auth_req =0x%x", auth_req);
+ BTM_TRACE_DEBUG1 ("btm_ble_link_sec_check auth_req =0x%x", auth_req);
if (p_dev_rec == NULL)
{
- BTM_TRACE_ERROR0 ("btm_ble_link_sec_check received for unknown device");
+ BTM_TRACE_ERROR0 ("btm_ble_link_sec_check received for unknown device");
return;
}
@@ -939,7 +939,7 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
else
cur_sec_level = BTM_LE_SEC_NONE;
}
-
+
if (cur_sec_level >= req_sec_level)
{
if (cur_sec_level == BTM_LE_SEC_NONE)
@@ -965,7 +965,7 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
BTM_TRACE_DEBUG3("cur_sec_level=%d req_sec_level=%d sec_req_act=%d",
cur_sec_level,
req_sec_level,
- *p_sec_req_act);
+ *p_sec_req_act);
}
@@ -973,7 +973,7 @@ void btm_ble_link_sec_check(BD_ADDR bd_addr, tBTM_LE_AUTH_REQ auth_req, tBTM_BLE
**
** Function btm_ble_set_encryption
**
-** Description This function is called to ensure that LE connection is
+** Description This function is called to ensure that LE connection is
** encrypted. Should be called only on an open connection.
** Typically only needed for connections that first want to
** bring up unencrypted links, then later encrypt them.
@@ -1006,7 +1006,7 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
if (link_role == BTM_ROLE_MASTER)
{
/* start link layer encryption using the security info stored */
- btm_ble_start_encrypt(bd_addr, FALSE, NULL);
+ btm_ble_start_encrypt(bd_addr, FALSE, NULL);
p_rec->sec_state = BTM_SEC_STATE_ENCRYPTING;
cmd = BTM_CMD_STARTED;
break;
@@ -1018,7 +1018,7 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
if (SMP_Pair(bd_addr) == SMP_STARTED)
{
- cmd = BTM_CMD_STARTED;
+ cmd = BTM_CMD_STARTED;
p_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING;
}
break;
@@ -1036,8 +1036,8 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
**
** Description This function is called when encryption request is received
** on a slave device.
-**
-**
+**
+**
** Returns void
**
*******************************************************************************/
@@ -1064,8 +1064,8 @@ void btm_ble_ltk_request(UINT16 handle, UINT8 rand[8], UINT16 ediv)
** Function btm_ble_start_encrypt
**
** Description This function is called to start LE encryption.
-**
-**
+**
+**
** Returns void
**
*******************************************************************************/
@@ -1092,19 +1092,19 @@ BOOLEAN btm_ble_start_encrypt(BD_ADDR bda, BOOLEAN use_stk, BT_OCTET16 stk)
}
else
{
- if (!btsnd_hcic_ble_start_enc(p_rec->hci_handle, p_rec->ble.keys.rand,
+ if (!btsnd_hcic_ble_start_enc(p_rec->hci_handle, p_rec->ble.keys.rand,
p_rec->ble.keys.ediv, p_rec->ble.keys.ltk))
return FALSE;
}
return TRUE;
-}
+}
/*******************************************************************************
**
** Function btm_ble_link_encrypted
**
** Description This function is called when LE link encrption status is changed.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1179,7 +1179,7 @@ static void btm_enc_proc_slave_y(tSMP_ENC *p)
BTM_TRACE_DEBUG0 ("LTK request OK");
/* calculating LTK , LTK = E er(div) */
SMP_Encrypt(p_cb->devcb.er, BT_OCTET16_LEN, (UINT8 *)&div, 2, &output);
- btm_enc_proc_ltk(&output);
+ btm_enc_proc_ltk(&output);
}
else
{
@@ -1190,15 +1190,15 @@ static void btm_enc_proc_slave_y(tSMP_ENC *p)
}
}
-}
+}
/*******************************************************************************
**
** Function btm_ble_ltk_request_reply
**
-** Description This function is called to send a LTK request reply on a slave
+** Description This function is called to send a LTK request reply on a slave
** device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1226,18 +1226,18 @@ void btm_ble_ltk_request_reply(BD_ADDR bda, BOOLEAN use_stk, BT_OCTET16 stk)
else /* calculate LTK using peer device */
{
/* generate Y= Encrypt(DHK, Rand) received from encrypt request */
- SMP_Encrypt(p_cb->devcb.id_keys.dhk, BT_OCTET16_LEN, p_cb->enc_rand,
+ SMP_Encrypt(p_cb->devcb.id_keys.dhk, BT_OCTET16_LEN, p_cb->enc_rand,
BT_OCTET8_LEN, &output);
btm_enc_proc_slave_y(&output);
}
-}
+}
/*******************************************************************************
**
** Function btm_ble_io_capabilities_req
**
** Description This function is called to handle SMP get IO capability request.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1258,7 +1258,7 @@ UINT8 btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_LE_IO_REQ *p
{
p_data->auth_req &= BTM_LE_AUTH_REQ_MASK;
- BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 1: p_dev_rec->security_required = %d auth_req:%d",
+ BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 1: p_dev_rec->security_required = %d auth_req:%d",
p_dev_rec->security_required, p_data->auth_req);
BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 2: i_keys=0x%x r_keys=0x%x (bit 0-LTK 1-IRK 2-CSRK)",
p_data->init_keys,
@@ -1280,7 +1280,7 @@ UINT8 btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_LE_IO_REQ *p
p_data->init_keys,
p_data->resp_keys);
- BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 5: p_data->io_cap = %d auth_req:%d",
+ BTM_TRACE_DEBUG2 ("btm_ble_io_capabilities_req 5: p_data->io_cap = %d auth_req:%d",
p_data->io_cap, p_data->auth_req);
/* remove MITM protection requirement if IO cap does not allow it */
@@ -1328,7 +1328,7 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
}
else
{
- BTM_TRACE_ERROR0 ("btm_proc_smp_cback: btm_cb.api.p_le_callback ==NULL");
+ BTM_TRACE_ERROR0 ("btm_proc_smp_cback: btm_cb.api.p_le_callback ==NULL");
}
if (event == SMP_COMPLT_EVT)
@@ -1337,7 +1337,7 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
res = (p_data->cmplt.reason == SMP_SUCCESS) ? BTM_SUCCESS : BTM_ERR_PROCESSING;
- BTM_TRACE_DEBUG3 ("after update result=%d sec_level=0x%x sec_flags=0x%x",
+ BTM_TRACE_DEBUG3 ("after update result=%d sec_level=0x%x sec_flags=0x%x",
res, p_data->cmplt.sec_level , p_dev_rec->sec_flags );
btm_sec_dev_rec_cback_event(p_dev_rec, res);
@@ -1366,12 +1366,12 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
btm_remove_acl(bd_addr);
#endif
- BTM_TRACE_DEBUG3 ("btm_cb pairing_state=%x pairing_flags=%x pin_code_len=%x",
- btm_cb.pairing_state,
+ BTM_TRACE_DEBUG3 ("btm_cb pairing_state=%x pairing_flags=%x pin_code_len=%x",
+ btm_cb.pairing_state,
btm_cb.pairing_flags,
btm_cb.pin_code_len );
BTM_TRACE_DEBUG6 ("btm_cb.pairing_bda %02x:%02x:%02x:%02x:%02x:%02x",
- btm_cb.pairing_bda[0], btm_cb.pairing_bda[1], btm_cb.pairing_bda[2],
+ btm_cb.pairing_bda[0], btm_cb.pairing_bda[1], btm_cb.pairing_bda[2],
btm_cb.pairing_bda[3], btm_cb.pairing_bda[4], btm_cb.pairing_bda[5]);
memset (btm_cb.pairing_bda, 0xff, BD_ADDR_LEN);
@@ -1407,14 +1407,14 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
**
** Parameter bd_addr: target device the data to be signed for.
** p_text: singing data
-** len: length of the data to be signed.
-** signature: output parameter where data signature is going to
-** be stored.
+** len: length of the data to be signed.
+** signature: output parameter where data signature is going to
+** be stored.
**
** Returns TRUE if signing sucessul, otherwise FALSE.
**
*******************************************************************************/
-BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
+BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
BLE_SIGNATURE signature)
{
BOOLEAN ret = FALSE;
@@ -1428,7 +1428,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
UINT16 r=1;
UINT8 *p=temp, *p_mac = (UINT8 *)signature;
tSMP_ENC output;
- BT_OCTET16 local_csrk;
+ BT_OCTET16 local_csrk;
BTM_TRACE_DEBUG0 ("BTM_BleDataSignature");
if (p_rec == NULL)
@@ -1439,7 +1439,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
{
if ((p_buf = (UINT8 *)GKI_getbuf((UINT16)(len + 4))) != NULL)
{
- BTM_TRACE_DEBUG0("Start to generate Local CSRK");
+ BTM_TRACE_DEBUG0("Start to generate Local CSRK");
/* prepare plain text */
if (p_text)
{
@@ -1472,30 +1472,30 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
if (!SMP_Encrypt(er, BT_OCTET16_LEN, temp, 4, &output))
{
- BTM_TRACE_ERROR0("Local CSRK generation failed ");
+ BTM_TRACE_ERROR0("Local CSRK generation failed ");
}
else
{
- BTM_TRACE_DEBUG0("local CSRK generation success");
- memcpy((void *)local_csrk, output.param_buf, BT_OCTET16_LEN);
+ BTM_TRACE_DEBUG0("local CSRK generation success");
+ memcpy((void *)local_csrk, output.param_buf, BT_OCTET16_LEN);
#if BTM_BLE_CONFORMANCE_TESTING == TRUE
if (btm_cb.devcb.enable_test_local_sign_cntr)
{
- UINT32_TO_STREAM(p_mac, btm_cb.devcb.test_local_sign_cntr);
+ UINT32_TO_STREAM(p_mac, btm_cb.devcb.test_local_sign_cntr);
}
else
{
- UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
+ UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
}
#else
- UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
+ UINT32_TO_STREAM(p_mac, p_rec->ble.keys.local_counter);
#endif
if ((ret = AES_CMAC(local_csrk, p_buf, (UINT16)(len + 4), BTM_CMAC_TLEN_SIZE, p_mac)) == TRUE)
{
- btm_ble_increment_sign_ctr(bd_addr, TRUE);
+ btm_ble_increment_sign_ctr(bd_addr, TRUE);
#if BTM_BLE_CONFORMANCE_TESTING == TRUE
if ( btm_cb.devcb.enable_test_mac_val)
@@ -1506,9 +1506,9 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
#endif
}
BTM_TRACE_DEBUG1("BTM_BleDataSignature p_mac = %d", p_mac);
- BTM_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
+ BTM_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
*p_mac, *(p_mac + 1), *(p_mac + 2), *(p_mac + 3));
- BTM_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
+ BTM_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
*(p_mac + 4), *(p_mac + 5), *(p_mac + 6), *(p_mac + 7));
GKI_freebuf(p_buf);
@@ -1528,9 +1528,9 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
**
** Parameter bd_addr: target device the data to be signed for.
** p_orig: original data before signature.
-** len: length of the signing data
+** len: length of the signing data
** counter: counter used when doing data signing
-** p_comp: signature to be compared against.
+** p_comp: signature to be compared against.
** Returns TRUE if signature verified correctly; otherwise FALSE.
**
@@ -1558,7 +1558,7 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT
else
{
BTM_TRACE_DEBUG2 ("BTM_BleVerifySignature rcv_cnt=%d >= expected_cnt=%d", counter, p_rec->ble.keys.counter);
-
+
if (AES_CMAC(p_rec->ble.keys.csrk, p_orig, len, BTM_CMAC_TLEN_SIZE, p_mac))
{
if (memcmp(p_mac, p_comp, BTM_CMAC_TLEN_SIZE) == 0)
@@ -1580,9 +1580,9 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT
**
** Function btm_notify_new_key
**
-** Description This function is to notify application new keys have been
+** Description This function is to notify application new keys have been
** generated.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1621,7 +1621,7 @@ static void btm_notify_new_key(UINT8 key_type)
**
** Description This function is called when ER is generated, store it in
** local control block.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1647,7 +1647,7 @@ static void btm_ble_process_er2(tBTM_RAND_ENC *p)
**
** Description This function is called when ER is generated, store it in
** local control block.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1677,7 +1677,7 @@ static void btm_ble_process_er(tBTM_RAND_ENC *p)
**
** Description This function is called when IRK is generated, store it in
** local control block.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1706,9 +1706,9 @@ static void btm_ble_process_irk(tSMP_ENC *p)
** Function btm_ble_process_dhk
**
** Description This function is called when DHK is calculated, store it in
-** local control block, and proceed to generate ER, a 128-bits
+** local control block, and proceed to generate ER, a 128-bits
** random number.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1726,7 +1726,7 @@ static void btm_ble_process_dhk(tSMP_ENC *p)
BTM_TRACE_DEBUG0("BLE DHK generated.");
/* IRK = D1(IR, 1) */
- if (!SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_irk_pt,
+ if (!SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_irk_pt,
1, &output))
{
/* reset all identity root related key */
@@ -1751,7 +1751,7 @@ static void btm_ble_process_dhk(tSMP_ENC *p)
**
** Description This function is called when IR is generated, proceed to calculate
** DHK = Eir({0x03, 0, 0 ...})
-**
+**
**
** Returns void
**
@@ -1771,9 +1771,9 @@ static void btm_ble_process_ir2(tBTM_RAND_ENC *p)
/* generate DHK= Eir({0x03, 0x00, 0x00 ...}) */
- SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_dhk_pt,
- 1, &output);
- btm_ble_process_dhk(&output);
+ SMP_Encrypt(btm_cb.devcb.id_keys.ir, BT_OCTET16_LEN, &btm_ble_dhk_pt,
+ 1, &output);
+ btm_ble_process_dhk(&output);
BTM_TRACE_DEBUG0("BLE IR generated.");
}
@@ -1790,7 +1790,7 @@ static void btm_ble_process_ir2(tBTM_RAND_ENC *p)
**
** Description This function is called when IR is generated, proceed to calculate
** DHK = Eir({0x02, 0, 0 ...})
-**
+**
**
** Returns void
**
@@ -1817,7 +1817,7 @@ static void btm_ble_process_ir(tBTM_RAND_ENC *p)
** Function btm_ble_reset_id
**
** Description This function is called to reset LE device identity.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1837,9 +1837,9 @@ void btm_ble_reset_id( void )
**
** Function btm_ble_set_no_disc_if_pair_fail
**
-** Description This function indicates that whether no disconnect of the ACL
+** Description This function indicates that whether no disconnect of the ACL
** should be used if pairing failed
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1854,7 +1854,7 @@ void btm_ble_set_no_disc_if_pair_fail(BOOLEAN disable_disc )
** Function btm_ble_set_test_mac_value
**
** Description This function set test MAC value
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1870,16 +1870,16 @@ void btm_ble_set_test_mac_value(BOOLEAN enable, UINT8 *p_test_mac_val )
** Function btm_ble_set_test_local_sign_cntr_value
**
** Description This function set test local sign counter value
-**
+**
** Returns void
**
*******************************************************************************/
void btm_ble_set_test_local_sign_cntr_value(BOOLEAN enable, UINT32 test_local_sign_cntr )
{
- BTM_TRACE_DEBUG2 ("btm_ble_set_test_local_sign_cntr_value enable=%d local_sign_cntr=%d",
+ BTM_TRACE_DEBUG2 ("btm_ble_set_test_local_sign_cntr_value enable=%d local_sign_cntr=%d",
enable, test_local_sign_cntr);
btm_cb.devcb.enable_test_local_sign_cntr = enable;
- btm_cb.devcb.test_local_sign_cntr = test_local_sign_cntr;
+ btm_cb.devcb.test_local_sign_cntr = test_local_sign_cntr;
}
#endif /* BTM_BLE_CONFORMANCE_TESTING */
diff --git a/stack/btm/btm_ble_addr.c b/stack/btm/btm_ble_addr.c
index c73f967..08a3018 100644
--- a/stack/btm/btm_ble_addr.c
+++ b/stack/btm/btm_ble_addr.c
@@ -26,22 +26,22 @@
**
** Function btm_gen_resolve_paddr_cmpl
**
-** Description This is callback functioin when resolvable private address
+** Description This is callback functioin when resolvable private address
** generation is complete.
-**
+**
** Returns void
**
*******************************************************************************/
-static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
+static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
{
tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
tBTM_BLE_INQ_CB *p_inq_cb = &btm_cb.ble_ctr_cb.inq_var;
BTM_TRACE_EVENT0 ("btm_gen_resolve_paddr_cmpl");
if (p && p->param_buf)
{
- /* get the high bytes of the random address */
- p_cb->private_addr[2] = p->param_buf[0];
- p_cb->private_addr[1] = p->param_buf[1];
+ /* get the high bytes of the random address */
+ p_cb->private_addr[2] = p->param_buf[0];
+ p_cb->private_addr[1] = p->param_buf[1];
p_cb->private_addr[0] = p->param_buf[2];
/* mask off the 1st MSB */
p_cb->private_addr[0] &= 0xfe;
@@ -54,8 +54,8 @@ static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
/* start a periodical timer to refresh random addr */
btu_stop_timer(&p_cb->raddr_timer_ent);
- btu_start_timer (&p_cb->raddr_timer_ent, BTU_TTYPE_BLE_RANDOM_ADDR,
- BTM_BLE_PRIVATE_ADDR_INT);
+ btu_start_timer (&p_cb->raddr_timer_ent, BTU_TTYPE_BLE_RANDOM_ADDR,
+ BTM_BLE_PRIVATE_ADDR_INT);
/* if adv is active, restart adv with new private addr */
if (p_inq_cb->adv_mode == BTM_BLE_ADV_ENABLE)
@@ -63,12 +63,12 @@ static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
btsnd_hcic_ble_set_adv_enable (BTM_BLE_ADV_DISABLE);
btsnd_hcic_ble_write_adv_params (p_inq_cb->adv_interval_min,
- p_inq_cb->adv_interval_max,
- p_inq_cb->evt_type,
- p_inq_cb->own_addr_type,
- p_inq_cb->direct_bda.type,
+ p_inq_cb->adv_interval_max,
+ p_inq_cb->evt_type,
+ p_inq_cb->own_addr_type,
+ p_inq_cb->direct_bda.type,
p_inq_cb->direct_bda.bda,
- p_inq_cb->adv_chnl_map,
+ p_inq_cb->adv_chnl_map,
p_inq_cb->afp);
}
}
@@ -84,7 +84,7 @@ static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p)
**
** Description This function is called when random address has generate the
** random number base for low 3 byte bd address.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -97,8 +97,8 @@ static void btm_gen_resolve_paddr_low(tBTM_RAND_ENC *p)
BTM_TRACE_EVENT0 ("btm_gen_resolve_paddr_low");
if (p && p->param_buf)
{
- p_cb->private_addr[5] = p->param_buf[0];
- p_cb->private_addr[4] = p->param_buf[1];
+ p_cb->private_addr[5] = p->param_buf[0];
+ p_cb->private_addr[4] = p->param_buf[1];
p_cb->private_addr[3] = p->param_buf[2];
/* encrypt with ur IRK */
@@ -133,9 +133,9 @@ void btm_gen_resolvable_private_addr (void)
**
** Function btm_gen_non_resolve_paddr_cmpl
**
-** Description This is the callback function when non-resolvable private
+** Description This is the callback function when non-resolvable private
** function is generated and write to controller.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -157,7 +157,7 @@ static void btm_gen_non_resolve_paddr_cmpl(tBTM_RAND_ENC *p)
}
else
{
- BTM_TRACE_DEBUG0("btm_gen_non_resolvable_private_addr failed");
+ BTM_TRACE_DEBUG0("btm_gen_non_resolvable_private_addr failed");
}
}
/*******************************************************************************
@@ -165,7 +165,7 @@ static void btm_gen_non_resolve_paddr_cmpl(tBTM_RAND_ENC *p)
** Function btm_gen_non_resolvable_private_addr
**
** Description This function generate a non-resolvable private address.
-**
+**
**
** Returns void
**
@@ -188,7 +188,7 @@ void btm_gen_non_resolvable_private_addr (void)
**
** Description This function sends the random address resolving complete
** callback.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -211,7 +211,7 @@ static void btm_ble_resolve_address_cmpl(void)
**
** Description This function compares the X with random address 3 MSO bytes
** to find a match, if not match, continue for next record.
-**
+**
** Returns None.
**
*******************************************************************************/
@@ -243,8 +243,8 @@ static BOOLEAN btm_ble_proc_resolve_x(tSMP_ENC *p)
**
** Description This function match the random address to the appointed device
** record, starting from calculating IRK. If record index exceed
-** the maximum record number, matching failed and send callback.
-**
+** the maximum record number, matching failed and send callback.
+**
** Returns None.
**
*******************************************************************************/
@@ -272,8 +272,8 @@ static BOOLEAN btm_ble_match_random_bda(UINT16 rec_index)
if ((p_dev_rec->device_type == BT_DEVICE_TYPE_BLE) &&
(p_dev_rec->ble.key_type & BTM_LE_KEY_PID))
{
- /* generate X = E irk(R0, R1, R2) and R is random address 3 LSO */
- SMP_Encrypt(p_dev_rec->ble.keys.irk, BT_OCTET16_LEN,
+ /* generate X = E irk(R0, R1, R2) and R is random address 3 LSO */
+ SMP_Encrypt(p_dev_rec->ble.keys.irk, BT_OCTET16_LEN,
&rand[0], 3, &output);
return btm_ble_proc_resolve_x(&output);
}
@@ -296,13 +296,13 @@ static BOOLEAN btm_ble_match_random_bda(UINT16 rec_index)
** Function btm_ble_resolve_random_addr
**
** Description This function is called to resolve a random address.
-**
-** Returns pointer to the security record of the device whom a random
+**
+** Returns pointer to the security record of the device whom a random
** address is matched to.
**
*******************************************************************************/
void btm_ble_resolve_random_addr(BD_ADDR random_bda, tBTM_BLE_RESOLVE_CBACK * p_cback, void *p)
-{
+{
tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
BTM_TRACE_EVENT0 ("btm_ble_resolve_random_addr");
@@ -310,7 +310,7 @@ void btm_ble_resolve_random_addr(BD_ADDR random_bda, tBTM_BLE_RESOLVE_CBACK * p_
{
p_mgnt_cb->p = p;
p_mgnt_cb->busy = TRUE;
- p_mgnt_cb->index = 0;
+ p_mgnt_cb->index = 0;
p_mgnt_cb->p_resolve_cback = p_cback;
memcpy(p_mgnt_cb->random_bda, random_bda, BD_ADDR_LEN);
/* start to resolve random address */
@@ -342,7 +342,7 @@ tBLE_ADDR_TYPE btm_ble_map_bda_to_conn_bda(BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec = NULL;
BTM_TRACE_EVENT0 ("btm_ble_map_bda_to_conn_bda");
- if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
+ if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
p_dev_rec->device_type == BT_DEVICE_TYPE_BLE)
{
if (p_dev_rec->ble.ble_addr_type != BLE_ADDR_PUBLIC)
@@ -358,7 +358,7 @@ tBLE_ADDR_TYPE btm_ble_map_bda_to_conn_bda(BD_ADDR bd_addr)
**
** Function btm_ble_map_bda_to_pseudo_bda
**
-** Description This function map a BD address to a pseudo address when the
+** Description This function map a BD address to a pseudo address when the
** address given is a random address.
**
*******************************************************************************/
diff --git a/stack/btm/btm_ble_bgconn.c b/stack/btm/btm_ble_bgconn.c
index 84c8421..bf574ab 100644
--- a/stack/btm/btm_ble_bgconn.c
+++ b/stack/btm/btm_ble_bgconn.c
@@ -33,12 +33,12 @@ void btm_update_scanner_filter_policy(tBTM_BLE_SFP scan_policy)
{
tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var;
BTM_TRACE_EVENT0 ("btm_update_scanner_filter_policy");
- btm_cb.ble_ctr_cb.inq_var.sfp = scan_policy;
+ btm_cb.ble_ctr_cb.inq_var.sfp = scan_policy;
btsnd_hcic_ble_set_scan_params ((UINT8)((p_inq->scan_type == BTM_BLE_SCAN_MODE_NONE) ? BTM_BLE_SCAN_MODE_ACTI: p_inq->scan_type),
- (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
+ (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
(UINT16)(!p_inq->scan_window ? BTM_BLE_GAP_DISC_SCAN_WIN : p_inq->scan_window),
- BLE_ADDR_PUBLIC,
+ BLE_ADDR_PUBLIC,
scan_policy);
}
/*******************************************************************************
@@ -65,7 +65,7 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
tBTM_SEC_DEV_REC *p_dev_rec;
BD_ADDR dummy_bda = {0};
- BOOLEAN started = FALSE, suspend = FALSE;
+ BOOLEAN started = FALSE, suspend = FALSE;
if (btm_cb.btm_inq_vars.inq_active)
{
@@ -73,7 +73,7 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_
btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE);
}
- if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
+ if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL &&
p_dev_rec->device_type == BT_DEVICE_TYPE_BLE)
{
BTM_TRACE_DEBUG0("btm_update_dev_to_white_list 1");
@@ -87,7 +87,7 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_
if ( p_dev_rec->ble.ble_addr_type == BLE_ADDR_PUBLIC)
- {
+ {
if (to_add)
started = btsnd_hcic_ble_add_white_list (BLE_ADDR_PUBLIC, bd_addr);
else
@@ -152,7 +152,7 @@ void btm_ble_clear_white_list_complete(UINT8 *p_data, UINT16 evt_len)
UINT8 status;
BTM_TRACE_EVENT0 ("btm_ble_clear_white_list_complete");
STREAM_TO_UINT8 (status, p_data);
-
+
if (status == HCI_SUCCESS)
p_cb->num_empty_filter = p_cb->max_filter_entries;
@@ -281,7 +281,7 @@ BOOLEAN btm_update_bg_conn_list(BOOLEAN to_add, BD_ADDR bd_addr)
**
** Function btm_write_bg_conn_wl
**
-** Description This function write background connection device list into
+** Description This function write background connection device list into
** controller.
*******************************************************************************/
void btm_write_bg_conn_wl(void)
@@ -304,8 +304,8 @@ void btm_write_bg_conn_wl(void)
**
** Description This function is to start/stop auto connection procedure.
**
-** Parameters start: TRUE to start; FALSE to stop.
-**
+** Parameters start: TRUE to start; FALSE to stop.
+**
** Returns void
**
*******************************************************************************/
@@ -318,7 +318,7 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
scan_int = (p_cb->scan_int == BTM_BLE_CONN_PARAM_UNDEF) ? BTM_BLE_CONN_EST_SCAN_INT : p_cb->scan_int;
scan_win = (p_cb->scan_win == BTM_BLE_CONN_PARAM_UNDEF) ? BTM_BLE_CONN_EST_SCAN_WIND : p_cb->scan_win;
-
+
if (start)
{
if (!l2cb.is_ble_connecting &&
@@ -331,7 +331,7 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
0x01, /* UINT8 white_list */
BLE_ADDR_PUBLIC, /* UINT8 addr_type_peer */
dummy_bda, /* BD_ADDR bda_peer */
- BLE_ADDR_PUBLIC, /* UINT8 addr_type_own */
+ BLE_ADDR_PUBLIC, /* UINT8 addr_type_own */
BTM_BLE_CONN_INT_MIN_DEF, /* UINT16 conn_int_min */
BTM_BLE_CONN_INT_MAX_DEF, /* UINT16 conn_int_max */
BTM_BLE_CONN_SLAVE_LATENCY_DEF, /* UINT16 conn_latency */
@@ -349,7 +349,7 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
}
}
else
- exec = FALSE;
+ exec = FALSE;
}
else
{
@@ -370,10 +370,10 @@ BOOLEAN btm_ble_start_auto_conn(BOOLEAN start)
**
** Description This function is to start/stop selective connection procedure.
**
-** Parameters start: TRUE to start; FALSE to stop.
-** p_select_cback: callback function to return application
+** Parameters start: TRUE to start; FALSE to stop.
+** p_select_cback: callback function to return application
** selection.
-**
+**
** Returns BOOLEAN: selective connectino procedure is started.
**
*******************************************************************************/
@@ -388,7 +388,7 @@ BOOLEAN btm_ble_start_select_conn(BOOLEAN start,tBTM_BLE_SEL_CBACK *p_select_c
scan_win = (p_cb->scan_win == BTM_BLE_CONN_PARAM_UNDEF) ? BTM_BLE_CONN_EST_SCAN_WIND : p_cb->scan_win;
if (start)
- {
+ {
if (!btm_cb.btm_inq_vars.inq_active)
{
btm_cb.ble_ctr_cb.p_select_cback = p_select_cback;
@@ -408,7 +408,7 @@ BOOLEAN btm_ble_start_select_conn(BOOLEAN start,tBTM_BLE_SEL_CBACK *p_select_c
BTM_TRACE_ERROR0("peripheral device cannot initiate a selective connection");
return FALSE;
}
- else if (p_cb->bg_conn_dev_num > 0 && btm_ble_count_unconn_dev_in_whitelist() > 0 )
+ else if (p_cb->bg_conn_dev_num > 0 && btm_ble_count_unconn_dev_in_whitelist() > 0 )
{
if (!btsnd_hcic_ble_set_scan_enable(TRUE, TRUE)) /* duplicate filtering enabled */
@@ -451,10 +451,10 @@ BOOLEAN btm_ble_start_select_conn(BOOLEAN start,tBTM_BLE_SEL_CBACK *p_select_c
**
** Description This function is to start/stop selective connection procedure.
**
-** Parameters start: TRUE to start; FALSE to stop.
-** p_select_cback: callback function to return application
+** Parameters start: TRUE to start; FALSE to stop.
+** p_select_cback: callback function to return application
** selection.
-**
+**
** Returns BOOLEAN: selective connectino procedure is started.
**
*******************************************************************************/
@@ -478,7 +478,7 @@ void btm_ble_initiate_select_conn(BD_ADDR bda)
** procedure.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
@@ -501,7 +501,7 @@ void btm_ble_suspend_bg_sele_conn(void)
** procedure.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
@@ -520,7 +520,7 @@ void btm_ble_suspend_bg_conn(void)
**
** Function btm_ble_scan_param_idle
**
-** Description This function is to process the scan parameter idle timeout
+** Description This function is to process the scan parameter idle timeout
** timeout.
********************************************************************************/
void btm_ble_scan_param_idle(void)
@@ -535,7 +535,7 @@ void btm_ble_scan_param_idle(void)
** procedure.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
@@ -552,11 +552,11 @@ BOOLEAN btm_ble_resume_bg_conn(tBTM_BLE_SEL_CBACK *p_sele_callback, BOOLEAN def_
p_cb->scan_win = BTM_BLE_CONN_PARAM_UNDEF;
/* start scan param idle timer */
- btu_start_timer(&p_cb->scan_param_idle_timer,
- BTU_TTYPE_BLE_SCAN_PARAM_IDLE,
+ btu_start_timer(&p_cb->scan_param_idle_timer,
+ BTU_TTYPE_BLE_SCAN_PARAM_IDLE,
BTM_BLE_SCAN_PARAM_TOUT);
- }
-
+ }
+
if (p_cb->bg_conn_type == BTM_BLE_CONN_AUTO)
ret = btm_ble_start_auto_conn(TRUE);
@@ -575,7 +575,7 @@ BOOLEAN btm_ble_resume_bg_conn(tBTM_BLE_SEL_CBACK *p_sele_callback, BOOLEAN def_
if (ret)
p_cb->bg_conn_state = BLE_BG_CONN_ACTIVE;
-
+
}
return ret;
@@ -587,7 +587,7 @@ BOOLEAN btm_ble_resume_bg_conn(tBTM_BLE_SEL_CBACK *p_sele_callback, BOOLEAN def_
** Description This function is to update the bg connection status.
**
** Parameters none.
-**
+**
** Returns none.
**
*******************************************************************************/
diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c
index 9911cb5..9092d5d 100644
--- a/stack/btm/btm_ble_gap.c
+++ b/stack/btm/btm_ble_gap.c
@@ -27,9 +27,9 @@
#define BTM_BLE_NAME_CMPL 0x02
#define BTM_BLE_FILTER_TARGET_UNKNOWN 0xff
-#define BTM_BLE_POLICY_UNKNOWN 0xff
+#define BTM_BLE_POLICY_UNKNOWN 0xff
-#define BLE_RESOLVE_ADDR_MSB 0x40 /* most significant bit, bit7, bit6 is 01 to be resolvable random */
+#define BLE_RESOLVE_ADDR_MSB 0x40 /* most significant bit, bit7, bit6 is 01 to be resolvable random */
#define BLE_RESOLVE_ADDR_MASK 0xc0 /* bit 6, and bit7 */
#define BTM_BLE_IS_RESOLVE_BDA(x) ((x[0] & BLE_RESOLVE_ADDR_MASK) == BLE_RESOLVE_ADDR_MSB)
@@ -60,7 +60,7 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
** Description This function is called to reset ULP controller.
**
** Parameters None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -73,16 +73,16 @@ void BTM_BleReset(void)
**
** Function BTM_BleObserve
**
-** Description This procedure keep the device listening for advertising
-** events from a broadcast device.
+** Description This procedure keep the device listening for advertising
+** events from a broadcast device.
**
** Parameters start: start or stop observe.
** white_list: use white list in observer mode or not.
-**
+**
** Returns void
**
*******************************************************************************/
-tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
+tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
tBTM_INQ_RESULTS_CB *p_results_cb, tBTM_CMPL_CB *p_cmpl_cb)
{
tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var;
@@ -100,7 +100,7 @@ tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
/* allow config scanning type */
if (btsnd_hcic_ble_set_scan_params ((UINT8)((p_inq->scan_type == BTM_BLE_SCAN_MODE_NONE) ? BTM_BLE_SCAN_MODE_ACTI: p_inq->scan_type),
- (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
+ (UINT16)(!p_inq->scan_interval ? BTM_BLE_GAP_DISC_SCAN_INT : p_inq->scan_interval),
(UINT16)(!p_inq->scan_window ? BTM_BLE_GAP_DISC_SCAN_WIN : p_inq->scan_window),
BLE_ADDR_PUBLIC,
BTM_BLE_DEFAULT_SFP)) /* assume observe always not using white list */
@@ -115,7 +115,7 @@ tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
if (duration != 0)
{
/* start inquiry timer */
- btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
+ btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
}
}
}
@@ -132,10 +132,10 @@ tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
**
** Function BTM_BleBroadcast
**
-** Description This function is to start or stop broadcasting.
+** Description This function is to start or stop broadcasting.
**
** Parameters start: start or stop broadcasting.
-**
+**
** Returns status.
**
*******************************************************************************/
@@ -143,12 +143,12 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
{
tBTM_STATUS status = BTM_NO_RESOURCES;
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
- UINT8 evt_type = p_cb->scan_rsp ? BTM_BLE_DISCOVER_EVT: BTM_BLE_NON_CONNECT_EVT;
+ UINT8 evt_type = p_cb->scan_rsp ? BTM_BLE_DISCOVER_EVT: BTM_BLE_NON_CONNECT_EVT;
#ifdef BTM_BLE_PC_ADV_TEST_MODE
if (BTM_BLE_PC_ADV_TEST_MODE)
{
- evt_type = p_cb->scan_rsp ? BTM_BLE_CONNECT_EVT: BTM_BLE_NON_CONNECT_EVT;
+ evt_type = p_cb->scan_rsp ? BTM_BLE_CONNECT_EVT: BTM_BLE_NON_CONNECT_EVT;
}
#endif
@@ -156,11 +156,11 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
{
/* update adv params */
if (!btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min : BTM_BLE_GAP_ADV_INT),
- (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
- evt_type,
- p_cb->own_addr_type,
+ (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
+ evt_type,
+ p_cb->own_addr_type,
p_cb->direct_bda.type, p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
@@ -186,7 +186,7 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
else
{
status = BTM_WRONG_MODE;
- BTM_TRACE_ERROR2("Can not %s Broadcast, device %s in Broadcast mode",
+ BTM_TRACE_ERROR2("Can not %s Broadcast, device %s in Broadcast mode",
(start ? "Start" : "Stop"), (start ? "alerady" :"not"));
}
@@ -203,12 +203,12 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
**
** Function BTM_RegisterScanReqEvt
**
-** Description This function is called to register a scan request callback
+** Description This function is called to register a scan request callback
** on the advertiser.
**
** Parameters p_scan_req_cback: scan request callback. If NULL, remove the
-** registration.
-**
+** registration.
+**
** Returns void
**
*******************************************************************************/
@@ -226,11 +226,11 @@ void BTM_RegisterScanReqEvt(tBTM_BLE_SCAN_REQ_CBACK *p_scan_req_cback)
**
** Function BTM_BleConfigPrivacy
**
-** Description This function is called to enable or disable the privacy in
+** Description This function is called to enable or disable the privacy in
** the local device.
**
-** Parameters enable: TRUE to enable it; FALSE to disable it.
-**
+** Parameters enable: TRUE to enable it; FALSE to disable it.
+**
** Returns void
**
*******************************************************************************/
@@ -245,17 +245,17 @@ void BTM_BleConfigPrivacy(BOOLEAN enable)
**
** Function BTM_BleSetBgConnType
**
-** Description This function is called to set BLE connectable mode for a
+** Description This function is called to set BLE connectable mode for a
** peripheral device.
**
-** Parameters bg_conn_type: it can be auto connection, or selective connection.
+** Parameters bg_conn_type: it can be auto connection, or selective connection.
** p_select_cback: callback function when selective connection procedure
** is being used.
-**
+**
** Returns void
**
*******************************************************************************/
-BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
+BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
tBTM_BLE_SEL_CBACK *p_select_cback)
{
BOOLEAN started = TRUE;
@@ -275,7 +275,7 @@ BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
{
btm_ble_start_auto_conn(FALSE);
}
- started = btm_ble_start_select_conn(TRUE, p_select_cback);
+ started = btm_ble_start_select_conn(TRUE, p_select_cback);
break;
case BTM_BLE_CONN_NONE:
@@ -313,7 +313,7 @@ BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
**
** Parameters add_remove: TRUE to add; FALSE to remove.
** remote_bda: device address to add/remove.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -366,12 +366,12 @@ BOOLEAN BTM_BleUpdateBgConnDev(BOOLEAN add_remove, BD_ADDR remote_bda)
**
** Function BTM_BleSetConnMode
**
-** Description This function is called to set BLE connectable mode for a
+** Description This function is called to set BLE connectable mode for a
** peripheral device.
**
** Parameters directed: is directed connectable mode, or non-directed.
-** p_dir_bda: connectable direct initiator's LE device address
-**
+** p_dir_bda: connectable direct initiator's LE device address
+**
** Returns void
**
*******************************************************************************/
@@ -423,13 +423,13 @@ tBTM_STATUS BTM_BleSetConnMode(BOOLEAN directed, tBLE_BD_ADDR *p_dir_bda)
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
-**
+**
** Returns void
**
*******************************************************************************/
-tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
+tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
tBLE_BD_ADDR *p_dir_bda,
tBTM_BLE_ADV_CHNL_MAP chnl_map)
{
@@ -474,16 +474,16 @@ tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
else
/* update adv params */
if (!btsnd_hcic_ble_write_adv_params (p_cb->adv_interval_min,
- p_cb->adv_interval_max,
- p_cb->evt_type,
- p_cb->own_addr_type,
- p_cb->direct_bda.type,
+ p_cb->adv_interval_max,
+ p_cb->evt_type,
+ p_cb->own_addr_type,
+ p_cb->direct_bda.type,
p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
-
+
else if (!btsnd_hcic_ble_set_adv_enable (BTM_BLE_ADV_ENABLE))
{
p_cb->adv_mode = BTM_BLE_ADV_DISABLE;
@@ -504,9 +504,9 @@ tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -536,10 +536,10 @@ void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_max,
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
** scan_type: active scan or passive scan
-**
+**
** Returns void
**
*******************************************************************************/
@@ -548,7 +548,7 @@ void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_window, tBTM_BLE_SCA
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
BTM_TRACE_EVENT0 (" BTM_BleSetScanParams");
-
+
if (BTM_BLE_VALID_PRAM(scan_interval, BTM_BLE_SCAN_INT_MIN, BTM_BLE_SCAN_INT_MAX) &&
BTM_BLE_VALID_PRAM(scan_window, BTM_BLE_SCAN_WIN_MIN, BTM_BLE_SCAN_WIN_MAX) &&
(scan_mode == BTM_BLE_SCAN_MODE_ACTI || scan_mode == BTM_BLE_SCAN_MODE_PASS))
@@ -563,7 +563,7 @@ void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_window, tBTM_BLE_SCA
}
else
{
- BTM_TRACE_ERROR2("Illegal params: scan_interval = %d scan_window = %d",
+ BTM_TRACE_ERROR2("Illegal params: scan_interval = %d scan_window = %d",
scan_interval, scan_window);
}
@@ -576,14 +576,14 @@ void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_window, tBTM_BLE_SCA
** Description This function is called to write LE scan response.
**
** Parameters: p_scan_rsp: scan response information.
-**
+**
** Returns void
**
*******************************************************************************/
tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p_data)
{
tBTM_STATUS status = BTM_NO_RESOURCES;
- UINT8 rsp_data[BTM_BLE_AD_DATA_LEN],
+ UINT8 rsp_data[BTM_BLE_AD_DATA_LEN],
*p = rsp_data;
BTM_TRACE_EVENT0 (" BTM_BleWriteScanRsp");
@@ -592,7 +592,7 @@ tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
if (btsnd_hcic_ble_set_scan_rsp_data((UINT8)(p - rsp_data), rsp_data))
{
- status = BTM_SUCCESS;
+ status = BTM_SUCCESS;
if (p_data != NULL)
btm_cb.ble_ctr_cb.inq_var.scan_rsp = TRUE;
@@ -612,7 +612,7 @@ tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
** Description This function is called to write advertising data.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -638,7 +638,7 @@ tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
p_cb_data->data_mask &= ~mask;
- if (btsnd_hcic_ble_set_adv_data((UINT8)(p_cb_data->p_pad - p_cb_data->ad_data),
+ if (btsnd_hcic_ble_set_adv_data((UINT8)(p_cb_data->p_pad - p_cb_data->ad_data),
p_cb_data->ad_data))
return BTM_SUCCESS;
else
@@ -656,7 +656,7 @@ tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
** type - finding ADV data type
** p_length - return the length of ADV data not including type
**
-** Returns pointer of ADV data
+** Returns pointer of ADV data
**
*******************************************************************************/
UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length)
@@ -695,7 +695,7 @@ UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length)
static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_dst, tBTM_BLE_ADV_DATA *p_data)
{
UINT16 data_mask = *p_data_mask;
- UINT8 *p = *p_dst,
+ UINT8 *p = *p_dst,
*p_flag = NULL;
UINT16 len = BTM_BLE_AD_DATA_LEN, cp_len = 0;
UINT8 i = 0;
@@ -736,14 +736,14 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
cp_len = (UINT16)strlen(btm_cb.cfg.bd_name);
*p++ = cp_len + 1;
*p++ = BTM_BLE_AD_TYPE_NAME_CMPL;
- ARRAY_TO_STREAM(p, btm_cb.cfg.bd_name, cp_len);
+ ARRAY_TO_STREAM(p, btm_cb.cfg.bd_name, cp_len);
}
len -= (cp_len + 2);
data_mask &= ~BTM_BLE_AD_BIT_DEV_NAME;
}
/* manufacturer data */
- if (len > 2 && data_mask & BTM_BLE_AD_BIT_MANU &&
+ if (len > 2 && data_mask & BTM_BLE_AD_BIT_MANU &&
p_data && p_data->manu.len != 0 && p_data->manu.p_val)
{
if (p_data->manu.len > (len - 2))
@@ -777,13 +777,13 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
{
cp_len = (len - 2)/2;
*p ++ = 1 + cp_len * 2;
- *p++ = BTM_BLE_AD_TYPE_SRV_PART;
+ *p++ = BTM_BLE_AD_TYPE_SRV_PART;
}
else
{
cp_len = p_data->services.num_service;
*p++ = 1 + cp_len * 2;
- *p++ = BTM_BLE_AD_TYPE_SRV_CMPL;
+ *p++ = BTM_BLE_AD_TYPE_SRV_CMPL;
}
for (i = 0; i < cp_len; i ++)
{
@@ -820,7 +820,7 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
}
else
break;
- }
+ }
if (i == p_data->attr.num_attr)
data_mask &= ~BTM_BLE_AD_BIT_ATTR;
}
@@ -861,7 +861,7 @@ static UINT8 *btm_ble_build_adv_data(tBTM_BLE_AD_MASK *p_data_mask, UINT8 **p_ds
** Description This function is called to set BLE discoverable mode.
**
** Parameters: mode: discoverability mode.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -906,13 +906,13 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
{
BTM_TRACE_EVENT0 ("mode == BTM_BLE_NON_DISCOVERABLE ");
- if (p_cb->connectable_mode == BTM_BLE_NON_CONNECTABLE)
+ if (p_cb->connectable_mode == BTM_BLE_NON_CONNECTABLE)
{
p_cb->br_edr_supported_flag = 0;
BTM_TRACE_EVENT0 ("always disable adv in non-discoverable non-connectable mode if no scan rsp ");
if (!p_cb->scan_rsp )
- new_mode = BTM_BLE_ADV_DISABLE;
+ new_mode = BTM_BLE_ADV_DISABLE;
}
else
{
@@ -943,11 +943,11 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
/* update adv params */
if (!btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min : BTM_BLE_GAP_ADV_INT),
- (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
- evt_type,
- p_cb->own_addr_type,
+ (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
+ evt_type,
+ p_cb->own_addr_type,
p_cb->direct_bda.type, p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
@@ -969,8 +969,8 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
{
BTM_TRACE_EVENT1 ("start timer for limited disc mode duration=%d (30 secs)", BTM_BLE_GAP_LIM_TOUT);
/* start Tgap(lim_timeout) */
- btu_start_timer (&p_cb->inq_timer_ent, BTU_TTYPE_BLE_GAP_LIM_DISC,
- BTM_BLE_GAP_LIM_TOUT);
+ btu_start_timer (&p_cb->inq_timer_ent, BTU_TTYPE_BLE_GAP_LIM_DISC,
+ BTM_BLE_GAP_LIM_TOUT);
}
return status;
}
@@ -982,7 +982,7 @@ tBTM_STATUS btm_ble_set_discoverability(UINT16 combined_mode)
** Description This function is called to set BLE connectability mode.
**
** Parameters: mode: connectability mode.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -992,10 +992,10 @@ tBTM_STATUS btm_ble_set_connectability(UINT16 combined_mode)
UINT16 mode = (combined_mode & BTM_BLE_CONNECTABLE_MASK);
UINT8 cur_flag = 0;
UINT8 cur_br_edr_not_sup_flag;
- UINT8 new_flag;
+ UINT8 new_flag;
UINT8 new_mode = BTM_BLE_ADV_ENABLE;
UINT8 evt_type = (p_cb->scan_rsp) ? BTM_BLE_DISCOVER_EVT: BTM_BLE_NON_CONNECT_EVT;
- tBTM_STATUS status = BTM_SUCCESS;
+ tBTM_STATUS status = BTM_SUCCESS;
BTM_TRACE_EVENT2 ("btm_ble_set_connectability mode=0x%0x combined_mode=0x%x", mode, combined_mode);
@@ -1051,12 +1051,12 @@ tBTM_STATUS btm_ble_set_connectability(UINT16 combined_mode)
}
if (!btsnd_hcic_ble_write_adv_params ((UINT16)(p_cb->adv_interval_min ? p_cb->adv_interval_min : BTM_BLE_GAP_ADV_INT),
- (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
- evt_type,
- p_cb->own_addr_type,
- p_cb->direct_bda.type,
+ (UINT16)(p_cb->adv_interval_max ? p_cb->adv_interval_max : BTM_BLE_GAP_ADV_INT),
+ evt_type,
+ p_cb->own_addr_type,
+ p_cb->direct_bda.type,
p_cb->direct_bda.bda,
- p_cb->adv_chnl_map,
+ p_cb->adv_chnl_map,
p_cb->afp))
status = BTM_NO_RESOURCES;
else
@@ -1088,7 +1088,7 @@ tBTM_STATUS btm_ble_set_connectability(UINT16 combined_mode)
** p_results_cb - callback returning pointer to results (tBTM_INQ_RESULTS)
** p_cmpl_cb - callback indicating the end of an inquiry
**
-**
+**
**
** Returns BTM_CMD_STARTED if successfully started
** BTM_ILLEGAL_VALUE if a bad parameter is detected
@@ -1117,15 +1117,15 @@ tBTM_STATUS btm_ble_start_inquiry (UINT8 mode, UINT8 duration)
if (btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_ENABLE, BTM_BLE_DUPLICATE_DISABLE))
{
status = BTM_SUCCESS;
- p_inq->proc_mode = mode;
+ p_inq->proc_mode = mode;
if (duration != 0)
{
/* start inquiry timer */
- btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
+ btu_start_timer (&p_inq->inq_timer_ent, BTU_TTYPE_BLE_INQUIRY, duration);
}
}
-
+
return status;
}
@@ -1134,7 +1134,7 @@ tBTM_STATUS btm_ble_start_inquiry (UINT8 mode, UINT8 duration)
** Function btm_ble_read_remote_name_cmpl
**
** Description This function is called when BLE remote name is received.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1159,11 +1159,11 @@ void btm_ble_read_remote_name_cmpl(BOOLEAN status, BD_ADDR bda, UINT16 length, c
**
** Function btm_ble_read_remote_name
**
-** Description This function read remote LE device name using GATT read
+** Description This function read remote LE device name using GATT read
** procedure.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1205,7 +1205,7 @@ tBTM_STATUS btm_ble_read_remote_name(BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur, t
** Description This function cancel read remote LE device name.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1231,7 +1231,7 @@ BOOLEAN btm_ble_cancel_remote_name(BD_ADDR remote_bda)
** data.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1261,11 +1261,11 @@ static void btm_ble_update_adv_flag(UINT8 flag)
*p++ = 2;
*p++ = BTM_BLE_AD_TYPE_FLAG;
p_adv_data->p_flags = p;
- *p++ = flag;
+ *p++ = flag;
p_adv_data->p_pad = p;
}
- if (btsnd_hcic_ble_set_adv_data((UINT8)(p_adv_data->p_pad - p_adv_data->ad_data),
+ if (btsnd_hcic_ble_set_adv_data((UINT8)(p_adv_data->p_pad - p_adv_data->ad_data),
p_adv_data->ad_data))
p_adv_data->data_mask |= BTM_BLE_AD_BIT_FLAGS;
@@ -1281,12 +1281,12 @@ static void btm_ble_update_adv_flag(UINT8 flag)
** Returns pointer to entry, or NULL if not found
**
*******************************************************************************/
-static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
+static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
UINT8 len, tBTM_BLE_INQ_DATA *p_adv_data, UINT8 *p_buf)
{
UINT8 *p_cur = p_data;
UINT8 ad_len, ad_type, ad_flag;
- tBTM_BLE_ATTR *p_attr;
+ tBTM_BLE_ATTR *p_attr;
BTM_TRACE_EVENT0 (" btm_ble_parse_adv_data");
@@ -1312,7 +1312,7 @@ static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
BTM_BLE_NAME_SHORT: BTM_BLE_NAME_CMPL;
memcpy(p_info->remote_name, p_cur, ad_len -1);
p_info->remote_name[ad_len] = 0;
- p_adv_data->p_remote_name = p_info->remote_name;
+ p_adv_data->p_remote_name = p_info->remote_name;
p_info->remote_name_len = p_adv_data->remote_name_len = ad_len - 1;
BTM_TRACE_DEBUG1("BTM_BLE_AD_TYPE_NAME name = %s",p_adv_data->p_remote_name);
}
@@ -1375,7 +1375,7 @@ static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data,
**
** Function btm_ble_cache_adv_data
**
-** Description Update advertising cache data.
+** Description Update advertising cache data.
**
** Returns void
**
@@ -1421,7 +1421,7 @@ void btm_ble_cache_adv_data(tBTM_INQ_RESULTS *p_cur, UINT8 data_len, UINT8 *p, U
** Description check ADV flag to make sure device is discoverable and match
** the search condition
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1448,14 +1448,14 @@ BOOLEAN btm_ble_is_discoverable(BD_ADDR bda, UINT8 evt_type, UINT8 *p)
BTM_TRACE_DEBUG0("BD ADDR does not meet filter condition");
return FALSE;
}
-
+
/* scan response does not include the flag */
if (evt_type == BTM_BLE_SCAN_RSP_EVT)
return FALSE;
if (data_len > BTM_BLE_ADV_DATA_LEN_MAX)
{
- BTM_TRACE_WARNING1("ADV data too long %d. discard", data_len);
+ BTM_TRACE_WARNING1("ADV data too long %d. discard", data_len);
return FALSE;
}
@@ -1464,30 +1464,30 @@ BOOLEAN btm_ble_is_discoverable(BD_ADDR bda, UINT8 evt_type, UINT8 *p)
if ((p_flag = BTM_CheckAdvData(p, BTM_BLE_AD_TYPE_FLAG, &data_len)) != NULL)
{
flag = * p_flag;
-
+
if ((btm_cb.ble_ctr_cb.inq_var.proc_mode == BTM_BLE_GENERAL_INQUIRY) &&
(flag & (BTM_BLE_LIMIT_DISC_FLAG|BTM_BLE_GEN_DISC_FLAG)) != 0)
{
- BTM_TRACE_DEBUG0("Find Generable Discoverable device");
+ BTM_TRACE_DEBUG0("Find Generable Discoverable device");
is_discoverable = TRUE;
}
else if (btm_cb.ble_ctr_cb.inq_var.proc_mode == BTM_BLE_LIMITED_INQUIRY &&
(flag & BTM_BLE_LIMIT_DISC_FLAG) != 0)
{
- BTM_TRACE_DEBUG0("Find limited discoverable device");
+ BTM_TRACE_DEBUG0("Find limited discoverable device");
is_discoverable = TRUE;
}
-
+
}
}
-
+
if (!is_discoverable)
{
BTM_TRACE_ERROR1("discoverable flag not desired: %d", flag);
}
- return is_discoverable;
+ return is_discoverable;
}
/*******************************************************************************
**
@@ -1495,7 +1495,7 @@ BOOLEAN btm_ble_is_discoverable(BD_ADDR bda, UINT8 evt_type, UINT8 *p)
**
** Description Update adv packet information into inquiry result.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1515,7 +1515,7 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t
if (data_len > BTM_BLE_ADV_DATA_LEN_MAX)
{
- BTM_TRACE_WARNING1("EIR data too long %d. discard", data_len);
+ BTM_TRACE_WARNING1("EIR data too long %d. discard", data_len);
return FALSE;
}
btm_ble_cache_adv_data(p_cur, data_len, p, evt_type);
@@ -1557,12 +1557,12 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t
/* if BR/EDR not supported is not set, assume is a DUMO device */
if ((p_cur->flag & BTM_BLE_BREDR_NOT_SPT) == 0)
{
- BTM_TRACE_ERROR0("BR/EDR NOT support bit not set, treat as DUMO");
+ BTM_TRACE_ERROR0("BR/EDR NOT support bit not set, treat as DUMO");
p_cur->device_type |= BT_DEVICE_TYPE_DUMO;
}
else
{
- BTM_TRACE_DEBUG0("BR/EDR NOT SUPPORT bit set, LE only device");
+ BTM_TRACE_DEBUG0("BR/EDR NOT SUPPORT bit set, LE only device");
}
return to_report;
@@ -1575,7 +1575,7 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t
**
** Description send selection connection request callback.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1585,13 +1585,13 @@ void btm_send_sel_conn_callback(BD_ADDR remote_bda, UINT8 evt_type, UINT8 *p_dat
UINT8 data_len, len;
UINT8 *p_dev_name, remname[31] = {0};
- if (btm_cb.ble_ctr_cb.p_select_cback == NULL ||
+ if (btm_cb.ble_ctr_cb.p_select_cback == NULL ||
/* non-connectable device */
(evt_type != BTM_BLE_EVT_CONN_ADV && evt_type != BTM_BLE_EVT_CONN_DIR_ADV))
return;
STREAM_TO_UINT8 (data_len, p_data);
-
+
/* get the device name if exist in ADV data */
if (data_len != 0)
{
@@ -1615,7 +1615,7 @@ void btm_send_sel_conn_callback(BD_ADDR remote_bda, UINT8 evt_type, UINT8 *p_dat
**
** Function btm_ble_resolve_random_addr_cmpl
**
-** Description resolve random address complete callback.
+** Description resolve random address complete callback.
**
** Returns void
**
@@ -1648,17 +1648,17 @@ static void btm_ble_resolve_random_addr_cmpl(void * p_rec, void *p)
btm_ble_process_adv_pkt_cont(bda, addr_type, evt_type, pp);
return;
-}
+}
/*******************************************************************************
**
** Function btm_ble_process_adv_pkt
**
-** Description This function is called when adv packet report events are
-** received from the device. It updates the inquiry database.
+** Description This function is called when adv packet report events are
+** received from the device. It updates the inquiry database.
** If the inquiry database is full, the oldest entry is discarded.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1688,9 +1688,9 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
#endif
/* Only process the results if the inquiry is still active */
- if (!btm_cb.btm_inq_vars.inq_active &&
+ if (!btm_cb.btm_inq_vars.inq_active &&
(btm_cb.ble_ctr_cb.bg_conn_type != BTM_BLE_CONN_SELECTIVE ||
- /* or selective auto connection is active */
+ /* or selective auto connection is active */
btm_cb.ble_ctr_cb.p_select_cback == NULL))
return;
@@ -1709,10 +1709,10 @@ void btm_ble_process_adv_pkt (UINT8 *p_data)
**
** Function btm_ble_process_adv_pkt_cont
**
-** Description This function is called after random address resolution is
+** Description This function is called after random address resolution is
** done, and proceed to process adv packet.
**
-** Parameters
+** Parameters
**
** Returns void
**
@@ -1731,11 +1731,11 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
if (btm_inq_find_bdaddr(bda))
{
/* never been report as an LE device */
- if ((p_i &&
+ if ((p_i &&
(!(p_i->inq_info.results.device_type & BT_DEVICE_TYPE_BLE) ||
/* scan repsonse to be updated */
(!p_i->scan_rsp)))
- ||
+ ||
btm_cb.ble_ctr_cb.inq_var.proc_mode == BTM_BLE_OBSERVE)
{
BTM_TRACE_DEBUG0("update new BLE information ");
@@ -1761,7 +1761,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
{
if ((p_i = btm_inq_db_new (bda)) != NULL)
{
- p_inq->inq_cmpl_info.num_resp++;
+ p_inq->inq_cmpl_info.num_resp++;
BTM_TRACE_DEBUG0("adv pkt process: new record is added into inq db");
to_report = TRUE;
}
@@ -1776,7 +1776,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
}
else if (p_i->inq_count != p_inq->inq_counter) /* first time seen in this inquiry */
{
- p_inq->inq_cmpl_info.num_resp++;
+ p_inq->inq_cmpl_info.num_resp++;
}
/* update the LE device information in inquiry database */
@@ -1787,7 +1787,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* If the number of responses found and limited, issue a cancel inquiry */
- if (p_inq->inqparms.max_resps &&
+ if (p_inq->inqparms.max_resps &&
p_inq->inq_cmpl_info.num_resp == p_inq->inqparms.max_resps)
{
/* new device */
@@ -1795,7 +1795,7 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
(/* assume a DUMO device, BR/EDR inquiry is always active */
p_i && p_i->inq_info.results.device_type == BT_DEVICE_TYPE_BLE && p_i->scan_rsp))
{
- BTM_TRACE_WARNING0("INQ RES: Extra Response Received...cancelling inquiry..");
+ BTM_TRACE_WARNING0("INQ RES: Extra Response Received...cancelling inquiry..");
if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) )
btsnd_hcic_inq_cancel();
@@ -1813,11 +1813,11 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt
/* background connection in selective connection mode */
if (btm_cb.ble_ctr_cb.bg_conn_type == BTM_BLE_CONN_SELECTIVE)
{
- btm_send_sel_conn_callback(bda, evt_type, p, addr_type);
+ btm_send_sel_conn_callback(bda, evt_type, p, addr_type);
}
else if (p_inq_results_cb && to_report)
{
- BTM_TRACE_DEBUG0("BTMINQ LE: Found devices, send callback btm_inqrslt_cb");
+ BTM_TRACE_DEBUG0("BTMINQ LE: Found devices, send callback btm_inqrslt_cb");
if (p_inq->inq_active)
(p_inq_results_cb)((tBTM_INQ_RESULTS *) &p_i->inq_info.results, p_le_inq_cb->adv_data_cache);
@@ -1850,7 +1850,7 @@ void btm_ble_stop_scan(void)
btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE);
/* If we have a callback registered for inquiry complete, call it */
- BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
+ BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
p_inq->inq_cmpl_info.status, p_inq->inq_cmpl_info.num_resp);
btm_update_scanner_filter_policy(SP_ADV_ALL);
@@ -1863,7 +1863,7 @@ void btm_ble_stop_scan(void)
**
** Function btm_ble_stop_adv
**
-** Description Stop the BLE advertising.
+** Description Stop the BLE advertising.
**
** Returns void
**
@@ -1920,7 +1920,7 @@ void btm_ble_timeout(TIMER_LIST_ENT *p_tle)
**
** Function btm_ble_connected
**
-** Description This function is when a LE connection to the peer device is
+** Description This function is when a LE connection to the peer device is
** establsihed
**
** Returns void
diff --git a/stack/btm/btm_ble_int.h b/stack/btm/btm_ble_int.h
index 29d231f..b03e124 100644
--- a/stack/btm/btm_ble_int.h
+++ b/stack/btm/btm_ble_int.h
@@ -61,7 +61,7 @@
#define BTM_BLE_SEC_REQ_ACT_NONE 0
#define BTM_BLE_SEC_REQ_ACT_ENCRYPT 1 /* encrypt the link using current key or key refresh */
-#define BTM_BLE_SEC_REQ_ACT_PAIR 2
+#define BTM_BLE_SEC_REQ_ACT_PAIR 2
#define BTM_BLE_SEC_REQ_ACT_DISCARD 3 /* discard the sec request while encryption is started but not completed */
typedef UINT8 tBTM_BLE_SEC_REQ_ACT;
@@ -121,7 +121,7 @@ typedef struct
UINT8 max_bd_entries;
tBLE_BD_ADDR local_bda;
-
+
tBTM_BLE_LOCAL_ADV_DATA adv_data;
tBTM_BLE_ADV_CHNL_MAP adv_chnl_map;
@@ -180,19 +180,19 @@ typedef struct
#define BLE_BG_CONN_IDLE 0
#define BLE_BG_CONN_ACTIVE 1
#define BLE_BG_CONN_SUSPEND 2
-
+
UINT8 bg_conn_state;
/* random address management control block */
tBTM_LE_RANDOM_CB addr_mgnt_cb;
-
+
/* white list information */
UINT8 num_empty_filter; /* Number of entries in white list */
UINT8 max_filter_entries; /* Maximum number of entries that can be stored */
BOOLEAN enabled;
BOOLEAN privacy; /* privacy enabled or disabled */
-#ifdef BTM_BLE_PC_ADV_TEST_MODE
+#ifdef BTM_BLE_PC_ADV_TEST_MODE
tBTM_BLE_SCAN_REQ_CBACK *p_scan_req_cback;
#endif
diff --git a/stack/btm/btm_dev.c b/stack/btm/btm_dev.c
index f6e40dc..f163403 100644
--- a/stack/btm/btm_dev.c
+++ b/stack/btm/btm_dev.c
@@ -36,14 +36,14 @@ static tBTM_SEC_DEV_REC *btm_find_oldest_dev (void);
** dev_class - Device Class
** bd_name - Name of the peer device. NULL if unknown.
** features - Remote device's supported features. NULL if not known
-** trusted_mask - Bitwise OR of services that do not
+** trusted_mask - Bitwise OR of services that do not
** require authorization. (array of UINT32)
** link_key - Connection link key. NULL if unknown.
**
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BOOLEAN BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name,
+BOOLEAN BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name,
BD_FEATURES features, UINT32 trusted_mask[],
LINK_KEY link_key, UINT8 key_type, tBTM_IO_CAP io_cap)
{
@@ -178,7 +178,7 @@ char *BTM_SecReadDevName (BD_ADDR bd_addr)
**
** Function btm_sec_alloc_dev
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified handle
**
** Returns Pointer to the record or NULL
@@ -310,7 +310,7 @@ BOOLEAN btm_dev_support_switch (BD_ADDR bd_addr)
break;
}
}
-
+
/* If we don't know peer's capabilities, assume it supports Role-switch */
if (feature_empty)
{
@@ -327,7 +327,7 @@ BOOLEAN btm_dev_support_switch (BD_ADDR bd_addr)
**
** Function btm_find_dev_by_handle
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified handle
**
** Returns Pointer to the record or NULL
@@ -340,7 +340,7 @@ tBTM_SEC_DEV_REC *btm_find_dev_by_handle (UINT16 handle)
for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++, p_dev_rec++)
{
- if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
+ if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
&& (p_dev_rec->hci_handle == handle))
return(p_dev_rec);
}
@@ -351,7 +351,7 @@ tBTM_SEC_DEV_REC *btm_find_dev_by_handle (UINT16 handle)
**
** Function btm_find_dev
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified BD address
**
** Returns Pointer to the record or NULL
@@ -366,7 +366,7 @@ tBTM_SEC_DEV_REC *btm_find_dev (BD_ADDR bd_addr)
{
for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++, p_dev_rec++)
{
- if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
+ if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
&& (!memcmp (p_dev_rec->bd_addr, bd_addr, BD_ADDR_LEN)))
return(p_dev_rec);
}
@@ -378,7 +378,7 @@ tBTM_SEC_DEV_REC *btm_find_dev (BD_ADDR bd_addr)
**
** Function btm_find_or_alloc_dev
**
-** Description Look for the record in the device database for the record
+** Description Look for the record in the device database for the record
** with specified BD address
**
** Returns Pointer to the record or NULL
@@ -418,7 +418,7 @@ tBTM_SEC_DEV_REC *btm_find_oldest_dev (void)
/* First look for the non-paired devices for the oldest entry */
for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++, p_dev_rec++)
{
- if (((p_dev_rec->sec_flags & BTM_SEC_IN_USE) == 0)
+ if (((p_dev_rec->sec_flags & BTM_SEC_IN_USE) == 0)
|| ((p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN) != 0))
continue; /* Device is paired so skip it */
diff --git a/stack/btm/btm_devctl.c b/stack/btm/btm_devctl.c
index 4465f6c..f668caf 100644
--- a/stack/btm/btm_devctl.c
+++ b/stack/btm/btm_devctl.c
@@ -67,19 +67,19 @@ extern BOOLEAN BTA_PRM_CHECK_FW_VER(UINT8 *p);
#define BTM_AFTER_RESET_TIMEOUT 0
#endif
-/* Internal baseband so the parameters such as local features, version etc. are known
+/* Internal baseband so the parameters such as local features, version etc. are known
so there is no need to issue HCI commands and wait for responses at BTM initialization */
#ifndef BTM_INTERNAL_BB
#define BTM_INTERNAL_BB FALSE
#endif
-/* The local version information in the format specified in the HCI read local version
+/* The local version information in the format specified in the HCI read local version
response message */
#ifndef BTM_INTERNAL_LOCAL_VER
#define BTM_INTERNAL_LOCAL_VER {0x00, 0x01, 0x05, 0x81, 0x01, 0x30, 0x00, 0x40, 0x8D}
#endif
-/* The local features information in the format specified in the HCI read local features
+/* The local features information in the format specified in the HCI read local features
response message */
#ifndef BTM_INTERNAL_LOCAL_FEA
#define BTM_INTERNAL_LOCAL_FEA {0x00, 0xFF, 0xF9, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}
@@ -239,7 +239,7 @@ void btm_dev_absent (void)
** Function BTM_DeviceReset
**
** Description This function is called to reset the HCI. Callback function
-** if provided is called when startup of the device is
+** if provided is called when startup of the device is
** completed.
**
** Returns void
@@ -300,7 +300,7 @@ BOOLEAN BTM_IsDeviceUp (void)
*******************************************************************************/
tBTM_STATUS BTM_SetAfhChannels (UINT8 first, UINT8 last)
{
- BTM_TRACE_API4 ("BTM_SetAfhChannels first: %d (%d) last: %d (%d)",
+ BTM_TRACE_API4 ("BTM_SetAfhChannels first: %d (%d) last: %d (%d)",
first, btm_cb.first_disabled_channel, last,
btm_cb.last_disabled_channel);
@@ -377,9 +377,9 @@ void BTM_ContinueReset (void)
**
*******************************************************************************/
static void btm_dev_reset (void)
-{
+{
btm_cb.devcb.state = BTM_DEV_STATE_WAIT_RESET_CMPLT;
-
+
/* flush out the command complete queue and command transmit queue */
btu_hcif_flush_cmd_queue();
@@ -403,12 +403,12 @@ static void btm_dev_reset (void)
*******************************************************************************/
void btm_get_hci_buf_size (void)
{
-
+
btu_start_timer (&btm_cb.devcb.reset_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
/* Send a Read Buffer Size message to the Host Controller. */
btsnd_hcic_read_buffer_size ();
-
+
}
#if BLE_INCLUDED == TRUE
/*******************************************************************************
@@ -425,7 +425,7 @@ void btm_read_ble_wl_size(void)
BTM_TRACE_DEBUG0("btm_read_ble_wl_size ");
btu_start_timer (&btm_cb.devcb.reset_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
- /* Send a Read Buffer Size message to the Host Controller. */
+ /* Send a Read Buffer Size message to the Host Controller. */
btsnd_hcic_ble_read_white_list_size();
}
/*******************************************************************************
@@ -457,7 +457,7 @@ void btm_get_ble_buffer_size(void)
*******************************************************************************/
void btm_get_local_version (void)
{
-
+
btu_start_timer (&btm_cb.devcb.reset_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
/* Send a Read Local Version message to the Host Controller. */
@@ -467,7 +467,7 @@ void btm_get_local_version (void)
#if BTM_PWR_MGR_INCLUDED == TRUE
btm_pm_reset();
#endif
-
+
}
/*******************************************************************************
@@ -521,7 +521,7 @@ void btm_dev_timeout (TIMER_LIST_ENT *p_tle)
**
** Description This function is called when command complete for HCI_Reset
** is received. It does not make sense to send next command
-** because device is resetting after command complete is
+** because device is resetting after command complete is
** received. Just start timer and set required state.
**
** Returns void
@@ -641,7 +641,7 @@ void btm_after_reset_hold_complete (void)
**
** Function btm_read_hci_buf_size_complete
**
-** Description This function is called when command complete for
+** Description This function is called when command complete for
** get HCI buffer size is received. Start timer and send
** read local featues request
**
@@ -705,7 +705,7 @@ void btm_read_hci_buf_size_complete (UINT8 *p, UINT16 evt_len)
**
** Function btm_read_ble_buf_size_complete
**
-** Description This function is called when command complete for
+** Description This function is called when command complete for
** get HCI buffer size is received. Start timer and send
** read local featues request
**
@@ -791,7 +791,7 @@ void btm_read_local_version_complete (UINT8 *p, UINT16 evt_len)
STREAM_TO_UINT8 (status, p);
if (status == HCI_SUCCESS)
{
-
+
STREAM_TO_UINT8 (p_vi->hci_version, p);
STREAM_TO_UINT16 (p_vi->hci_revision, p);
STREAM_TO_UINT8 (p_vi->lmp_version, p);
@@ -847,7 +847,7 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
{
/* stop guard timer to avoid accidental timeout */
btu_stop_timer(&p_devcb->reset_timer);
-
+
p_devcb->state = BTM_DEV_STATE_READY;
/* Extract features and create "btm_acl_pkt_types_supported" flag
@@ -865,10 +865,10 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
BTM_ACL_PKT_TYPES_MASK_DM3);
if (HCI_5_SLOT_PACKETS_SUPPORTED(p_devcb->local_features))
- btm_cb.btm_acl_pkt_types_supported |= (BTM_ACL_PKT_TYPES_MASK_DH5 +
+ btm_cb.btm_acl_pkt_types_supported |= (BTM_ACL_PKT_TYPES_MASK_DH5 +
BTM_ACL_PKT_TYPES_MASK_DM5);
- /* _NO_X_DXX masks are reserved before ver 2.0.
+ /* _NO_X_DXX masks are reserved before ver 2.0.
Set them only for later versions of controller */
if (btm_cb.devcb.local_version.hci_version >= HCI_PROTO_VERSION_2_0)
{
@@ -902,7 +902,7 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
}
}
- BTM_TRACE_DEBUG1("Local supported ACL packet types: 0x%04x",
+ BTM_TRACE_DEBUG1("Local supported ACL packet types: 0x%04x",
btm_cb.btm_acl_pkt_types_supported);
/* Create (e)SCO supported packet types mask
@@ -960,7 +960,7 @@ void btm_read_local_features_complete (UINT8 *p, UINT16 evt_len)
}
#endif
- BTM_TRACE_DEBUG1("Local supported SCO packet types: 0x%04x",
+ BTM_TRACE_DEBUG1("Local supported SCO packet types: 0x%04x",
btm_cb.btm_sco_pkt_types_supported);
/* Create Default Policy Settings
@@ -1113,7 +1113,7 @@ tBTM_STATUS BTM_SetLocalDeviceName (char *p_name)
** Returns status of the operation
** If success, BTM_SUCCESS is returned and p_name points stored
** local device name
-** If BTM doesn't store local device name, BTM_NO_RESOURCES is
+** If BTM doesn't store local device name, BTM_NO_RESOURCES is
** is returned and p_name is set to NULL
**
*******************************************************************************/
@@ -1133,7 +1133,7 @@ tBTM_STATUS BTM_ReadLocalDeviceName (char **p_name)
**
** Function BTM_ReadLocalDeviceNameFromController
**
-** Description Get local device name from controller. Do not use cached
+** Description Get local device name from controller. Do not use cached
** name (used to get chip-id prior to btm reset complete).
**
** Returns BTM_CMD_STARTED if successful, otherwise an error
@@ -1145,12 +1145,12 @@ tBTM_STATUS BTM_ReadLocalDeviceNameFromController (tBTM_CMPL_CB *p_rln_cmpl_cbac
if (btm_cb.devcb.p_rln_cmpl_cb)
return(BTM_NO_RESOURCES);
- /* Save callback */
+ /* Save callback */
btm_cb.devcb.p_rln_cmpl_cb = p_rln_cmpl_cback;
-
+
btsnd_hcic_read_name();
btu_start_timer (&btm_cb.devcb.rln_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_DEV_REPLY_TIMEOUT);
-
+
return BTM_CMD_STARTED;
}
@@ -1288,7 +1288,7 @@ tBTM_STATUS BTM_SetDeviceClass (DEV_CLASS dev_class)
if (!btsnd_hcic_write_dev_class (dev_class))
return (BTM_NO_RESOURCES);
- return (BTM_SUCCESS);
+ return (BTM_SUCCESS);
}
@@ -1337,7 +1337,7 @@ UINT8 *BTM_ReadBrcmFeatures (void)
/*******************************************************************************
**
-** Function BTM_RegisterForDeviceStatusNotif
+** Function BTM_RegisterForDeviceStatusNotif
**
** Description This function is called to register for device status
** change notifications.
@@ -1359,7 +1359,7 @@ tBTM_DEV_STATUS_CB *BTM_RegisterForDeviceStatusNotif (tBTM_DEV_STATUS_CB *p_cb)
/*******************************************************************************
**
-** Function BTM_VendorSpecificCommand
+** Function BTM_VendorSpecificCommand
**
** Description Send a vendor specific HCI command to the controller.
**
@@ -1408,7 +1408,7 @@ tBTM_STATUS BTM_VendorSpecificCommand(UINT16 opcode, UINT8 param_len,
**
** Returns void
**
-*******************************************************************************/
+*******************************************************************************/
void btm_vsc_complete (UINT8 *p, UINT16 opcode, UINT16 evt_len,
tBTM_CMPL_CB *p_vsc_cplt_cback)
{
@@ -1487,9 +1487,9 @@ tBTM_STATUS BTM_RegisterForVSEvents (tBTM_VS_EVT_CB *p_cb, BOOLEAN is_register)
/*******************************************************************************
**
-** Function btm_vendor_specific_evt
+** Function btm_vendor_specific_evt
**
-** Description Process event HCI_VENDOR_SPECIFIC_EVT
+** Description Process event HCI_VENDOR_SPECIFIC_EVT
**
** Note: Some controllers do not send command complete, so
** the callback and busy flag are cleared here also.
@@ -1513,12 +1513,12 @@ void btm_vendor_specific_evt (UINT8 *p, UINT8 evt_len)
/*******************************************************************************
**
-** Function BTM_WritePageTimeout
+** Function BTM_WritePageTimeout
**
** Description Send HCI Write Page Timeout.
**
** Returns
-** BTM_SUCCESS Command sent.
+** BTM_SUCCESS Command sent.
** BTM_NO_RESOURCES If out of resources to send the command.
**
**
@@ -1536,13 +1536,13 @@ tBTM_STATUS BTM_WritePageTimeout(UINT16 timeout)
/*******************************************************************************
**
-** Function BTM_WriteVoiceSettings
+** Function BTM_WriteVoiceSettings
**
** Description Send HCI Write Voice Settings command.
** See hcidefs.h for settings bitmask values.
**
** Returns
-** BTM_SUCCESS Command sent.
+** BTM_SUCCESS Command sent.
** BTM_NO_RESOURCES If out of resources to send the command.
**
**
@@ -1560,22 +1560,22 @@ tBTM_STATUS BTM_WriteVoiceSettings(UINT16 settings)
/*******************************************************************************
**
-** Function BTM_EnableTestMode
+** Function BTM_EnableTestMode
**
** Description Send HCI the enable device under test command.
**
-** Note: Controller can only be taken out of this mode by
+** Note: Controller can only be taken out of this mode by
** resetting the controller.
**
** Returns
-** BTM_SUCCESS Command sent.
+** BTM_SUCCESS Command sent.
** BTM_NO_RESOURCES If out of resources to send the command.
**
**
*******************************************************************************/
tBTM_STATUS BTM_EnableTestMode(void)
{
- UINT8 cond;
+ UINT8 cond;
BTM_TRACE_EVENT0 ("BTM: BTM_EnableTestMode");
@@ -1591,23 +1591,23 @@ tBTM_STATUS BTM_EnableTestMode(void)
/* put device to connectable mode */
if (!BTM_SetConnectability(BTM_CONNECTABLE, BTM_DEFAULT_CONN_WINDOW,
- BTM_DEFAULT_CONN_INTERVAL) == BTM_SUCCESS)
+ BTM_DEFAULT_CONN_INTERVAL) == BTM_SUCCESS)
{
- return BTM_NO_RESOURCES;
+ return BTM_NO_RESOURCES;
}
/* put device to discoverable mode */
if (!BTM_SetDiscoverability(BTM_GENERAL_DISCOVERABLE, BTM_DEFAULT_DISC_WINDOW,
- BTM_DEFAULT_DISC_INTERVAL) == BTM_SUCCESS)
+ BTM_DEFAULT_DISC_INTERVAL) == BTM_SUCCESS)
{
- return BTM_NO_RESOURCES;
+ return BTM_NO_RESOURCES;
}
/* mask off all of event from controller */
if (!btsnd_hcic_set_event_mask(LOCAL_BR_EDR_CONTROLLER_ID,
(UINT8 *)"\x00\x00\x00\x00\x00\x00\x00\x00"))
{
- return BTM_NO_RESOURCES;
+ return BTM_NO_RESOURCES;
}
/* Send the HCI command */
@@ -1641,7 +1641,7 @@ UINT8 btm_get_hci_version (void)
** device from the NVRAM storage attached to the Bluetooth
** controller.
**
-** Parameters: bd_addr - Address of the device
+** Parameters: bd_addr - Address of the device
** p_cb - Call back function to be called to return
** the results
**
diff --git a/stack/btm/btm_inq.c b/stack/btm/btm_inq.c
index c028822..2339150 100644
--- a/stack/btm/btm_inq.c
+++ b/stack/btm/btm_inq.c
@@ -141,7 +141,7 @@ static UINT8 btm_convert_uuid_to_eir_service( UINT16 uuid16 );
#endif
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
static void btm_set_eir_uuid( UINT8 *p_eir, tBTM_INQ_RESULTS *p_results );
-static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
+static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
UINT8 *p_num_uuid, UINT8 *p_uuid_list_type );
static UINT16 btm_convert_uuid_to_uuid16( UINT8 *p_uuid, UINT8 uuid_size );
#endif
@@ -174,13 +174,13 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
BOOLEAN cod_limited;
BTM_TRACE_API0 ("BTM_SetDiscoverability");
-#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
- if (btm_ble_set_discoverability((UINT16)(inq_mode))
+#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
+ if (btm_ble_set_discoverability((UINT16)(inq_mode))
== BTM_SUCCESS)
{
btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_BLE_DISCOVERABLE_MASK);
btm_cb.btm_inq_vars.discoverable_mode |= (inq_mode & BTM_BLE_CONNECTABLE_MASK);
- }
+ }
inq_mode &= ~BTM_BLE_DISCOVERABLE_MASK;
#endif
@@ -216,7 +216,7 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
return (BTM_ILLEGAL_VALUE);
}
}
-
+
/* Set the IAC if needed */
if (inq_mode != BTM_NON_DISCOVERABLE)
{
@@ -225,9 +225,9 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
/* Use the GIAC and LIAC codes for limited discoverable mode */
memcpy (temp_lap[0], limited_inq_lap, LAP_LEN);
memcpy (temp_lap[1], general_inq_lap, LAP_LEN);
-
+
if (!btsnd_hcic_write_cur_iac_lap (2, (LAP * const) temp_lap))
- return (BTM_NO_RESOURCES); /* Cannot continue */
+ return (BTM_NO_RESOURCES); /* Cannot continue */
}
else
{
@@ -250,10 +250,10 @@ tBTM_STATUS BTM_SetDiscoverability (UINT16 inq_mode, UINT16 window, UINT16 inter
else
return (BTM_NO_RESOURCES);
}
-
+
if (btm_cb.btm_inq_vars.connectable_mode & BTM_CONNECTABLE_MASK)
scan_mode |= HCI_PAGE_SCAN_ENABLED;
-
+
if (btsnd_hcic_write_scan_enable (scan_mode))
{
btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_DISCOVERABLE_MASK);
@@ -470,21 +470,21 @@ tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms, UINT16 max_d
BTM_TRACE_API6 ("BTM_SetPeriodicInquiryMode: mode: %d, dur: %d, rsps: %d, flt: %d, min: %d, max: %d",
p_inqparms->mode, p_inqparms->duration, p_inqparms->max_resps,
p_inqparms->filter_cond_type, min_delay, max_delay);
-
+
/*** Make sure the device is ready ***/
if (!BTM_IsDeviceUp())
return (BTM_WRONG_MODE);
-
+
/* Only one active inquiry is allowed in this implementation.
Also do not allow an inquiry if the inquiry filter is being updated */
if (p_inq->inq_active || p_inq->inqfilt_active)
return (BTM_BUSY);
-
+
/* If illegal parameters return FALSE */
if (p_inqparms->mode != BTM_GENERAL_INQUIRY &&
p_inqparms->mode != BTM_LIMITED_INQUIRY)
return (BTM_ILLEGAL_VALUE);
-
+
/* Verify the parameters for this command */
if (p_inqparms->duration < BTM_MIN_INQUIRY_LEN ||
p_inqparms->duration > BTM_MAX_INQUIRY_LENGTH ||
@@ -497,7 +497,7 @@ tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms, UINT16 max_d
{
return (BTM_ILLEGAL_VALUE);
}
-
+
/* Save the inquiry parameters to be used upon the completion of setting/clearing the inquiry filter */
p_inq->inqparms = *p_inqparms;
p_inq->per_min_delay = min_delay;
@@ -528,16 +528,16 @@ tBTM_STATUS BTM_SetPeriodicInquiryMode (tBTM_INQ_PARMS *p_inqparms, UINT16 max_d
}
else /* The filter is not being used so simply clear it; the inquiry can start after this operation */
p_inq->state = BTM_INQ_SET_FILT_STATE;
-
+
/* Before beginning the inquiry the current filter must be cleared, so initiate the command */
if ((status = btm_set_inq_event_filter (p_inqparms->filter_cond_type, &p_inqparms->filter_cond)) != BTM_CMD_STARTED)
{
/* If set filter command is not succesful reset the state */
p_inq->p_inq_results_cb = NULL;
p_inq->state = BTM_INQ_INACTIVE_STATE;
-
+
}
-
+
#endif
return (status);
}
@@ -560,7 +560,7 @@ tBTM_STATUS BTM_CancelPeriodicInquiry(void)
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_STATUS status = BTM_SUCCESS;
BTM_TRACE_API0 ("BTM_CancelPeriodicInquiry called");
-
+
/*** Make sure the device is ready ***/
if (!BTM_IsDeviceUp())
return (BTM_WRONG_MODE);
@@ -582,7 +582,7 @@ tBTM_STATUS BTM_CancelPeriodicInquiry(void)
p_inq->inqfilt_active = FALSE;
p_inq->inq_counter++;
}
-
+
return (status);
}
@@ -607,14 +607,14 @@ tBTM_STATUS BTM_SetConnectability (UINT16 page_mode, UINT16 window, UINT16 inter
BTM_TRACE_API0 ("BTM_SetConnectability");
-#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
+#if (BLE_INCLUDED == TRUE && BLE_INCLUDED == TRUE)
if (btm_ble_set_connectability(page_mode) == BTM_SUCCESS)
{
p_inq->connectable_mode &= (~BTM_BLE_CONNECTABLE_MASK);
p_inq->connectable_mode |= (page_mode & BTM_BLE_CONNECTABLE_MASK);
}
page_mode &= ~BTM_BLE_CONNECTABLE_MASK;
-
+
#endif
/*** Check mode parameter ***/
@@ -664,7 +664,7 @@ tBTM_STATUS BTM_SetConnectability (UINT16 page_mode, UINT16 window, UINT16 inter
/* Keep the inquiry scan as previouosly set */
if (p_inq->discoverable_mode & BTM_DISCOVERABLE_MASK)
scan_mode |= HCI_INQUIRY_SCAN_ENABLED;
-
+
if (btsnd_hcic_write_scan_enable (scan_mode))
{
p_inq->connectable_mode &= (~BTM_CONNECTABLE_MASK);
@@ -819,7 +819,7 @@ tBTM_STATUS BTM_CancelInquiry(void)
*******************************************************************************/
tBTM_STATUS BTM_StartInquiry (tBTM_INQ_PARMS *p_inqparms, tBTM_INQ_RESULTS_CB *p_results_cb,
tBTM_CMPL_CB *p_cmpl_cb)
-{
+{
tBTM_STATUS status;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
@@ -854,7 +854,7 @@ tBTM_STATUS BTM_StartInquiry (tBTM_INQ_PARMS *p_inqparms, tBTM_INQ_RESULTS_CB *p
p_inq->p_inq_results_cb = p_results_cb;
p_inq->inq_cmpl_info.num_resp = 0; /* Clear the results counter */
p_inq->inq_active = (UINT8)(1 << (p_inqparms->mode & BTM_BR_INQUIRY_MASK));
-
+
BTM_TRACE_DEBUG1("BTM_StartInquiry: p_inq->inq_active = 0x%02x", p_inq->inq_active);
/* start LE inquiry here if requested */
@@ -939,11 +939,11 @@ tBTM_STATUS BTM_ReadRemoteDeviceName (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
tBTM_INQ_INFO *p_cur = NULL;
tINQ_DB_ENT *p_i;
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;
#endif
-
+
BTM_TRACE_API6 ("BTM_ReadRemoteDeviceName: bd addr [%02x%02x%02x%02x%02x%02x]",
remote_bda[0], remote_bda[1], remote_bda[2],
remote_bda[3], remote_bda[4], remote_bda[5]);
@@ -996,11 +996,11 @@ tBTM_STATUS BTM_CancelRemoteDeviceName (void)
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;
#endif
-
+
BTM_TRACE_API0 ("BTM_CancelRemoteDeviceName()");
/* Make sure there is not already one in progress */
- if (p_inq->remname_active)
+ if (p_inq->remname_active)
{
#if BLE_INCLUDED == TRUE
BTM_ReadDevInfo(p_inq->remname_bda, &dev_type, &addr_type);
@@ -1027,7 +1027,7 @@ tBTM_STATUS BTM_CancelRemoteDeviceName (void)
** Function BTM_InqFirstResult
**
** Description This function looks through the inquiry database for the first
-** used entrysince the LAST inquiry. This is used in conjunction
+** used entrysince the LAST inquiry. This is used in conjunction
** with BTM_InqNext by applications as a way to walk through the
** inquiry results database.
**
@@ -1067,18 +1067,18 @@ tBTM_INQ_INFO *BTM_InqNextResult (tBTM_INQ_INFO *p_cur)
tINQ_DB_ENT *p_ent;
UINT16 inx;
UINT32 cur_inq_count = btm_cb.btm_inq_vars.inq_counter - 1;
-
+
if (p_cur)
{
p_ent = (tINQ_DB_ENT *) ((UINT8 *)p_cur - offsetof (tINQ_DB_ENT, inq_info));
inx = (UINT16)((p_ent - btm_cb.btm_inq_vars.inq_db) + 1);
-
+
for (p_ent = &btm_cb.btm_inq_vars.inq_db[inx]; inx < BTM_INQ_DB_SIZE; inx++, p_ent++)
{
if (p_ent->in_use && p_ent->inq_count == cur_inq_count)
return (&p_ent->inq_info);
}
-
+
/* If here, more entries found */
return ((tBTM_INQ_INFO *)NULL);
}
@@ -1160,18 +1160,18 @@ tBTM_INQ_INFO *BTM_InqDbNext (tBTM_INQ_INFO *p_cur)
{
tINQ_DB_ENT *p_ent;
UINT16 inx;
-
+
if (p_cur)
{
p_ent = (tINQ_DB_ENT *) ((UINT8 *)p_cur - offsetof (tINQ_DB_ENT, inq_info));
inx = (UINT16)((p_ent - btm_cb.btm_inq_vars.inq_db) + 1);
-
+
for (p_ent = &btm_cb.btm_inq_vars.inq_db[inx]; inx < BTM_INQ_DB_SIZE; inx++, p_ent++)
{
if (p_ent->in_use)
return (&p_ent->inq_info);
}
-
+
/* If here, more entries found */
return ((tBTM_INQ_INFO *)NULL);
}
@@ -1199,7 +1199,7 @@ tBTM_STATUS BTM_ClearInqDb (BD_ADDR p_bda)
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
/* If an inquiry or remote name is in progress return busy */
- if (p_inq->inq_active != BTM_INQUIRY_INACTIVE ||
+ if (p_inq->inq_active != BTM_INQUIRY_INACTIVE ||
p_inq->inqfilt_active)
return (BTM_BUSY);
@@ -1257,7 +1257,7 @@ tBTM_STATUS BTM_InquiryRegisterForChanges (tBTM_INQ_DB_CHANGE_CB *p_cb)
**
** Function BTM_SetInquiryFilterCallback
**
-** Description Host can register to be asked whenever an inquiry result
+** Description Host can register to be asked whenever an inquiry result
** is received. If host does not like the device no name
** request is issued for the device
**
@@ -1274,7 +1274,7 @@ void BTM_SetInquiryFilterCallback (tBTM_FILTER_CB *p_callback)
** Function BTM_ReadInquiryRspTxPower
**
** Description This command will read the inquiry Transmit Power level used
-** to transmit the FHS and EIR data packets.
+** to transmit the FHS and EIR data packets.
** This can be used directly in the Tx Power Level EIR data type.
**
** Returns BTM_SUCCESS if successful
@@ -1303,11 +1303,11 @@ tBTM_STATUS BTM_ReadInquiryRspTxPower (tBTM_CMPL_CB *p_cb)
**
** Function BTM_WriteInquiryTxPower
**
-** Description This command is used to write the inquiry transmit power level
-** used to transmit the inquiry (ID) data packets. The Controller
+** Description This command is used to write the inquiry transmit power level
+** used to transmit the inquiry (ID) data packets. The Controller
** should use the supported TX power level closest to the Tx_Power
** parameter.
-**
+**
** Returns BTM_SUCCESS if successful
**
*******************************************************************************/
@@ -1321,7 +1321,7 @@ tBTM_STATUS BTM_WriteInquiryTxPower (INT8 tx_power)
}
else if (!btsnd_hcic_write_inq_tx_power(tx_power))
status = BTM_NO_RESOURCES;
-
+
return status;
}
/*********************************************************************************
@@ -1371,10 +1371,10 @@ void btm_inq_db_reset (void)
}
/* Cancel a remote name request if active, and notify the caller (if waiting) */
- if (p_inq->remname_active )
+ if (p_inq->remname_active )
{
btu_stop_timer (&p_inq->rmt_name_timer_ent);
- p_inq->remname_active = FALSE;
+ p_inq->remname_active = FALSE;
memset(p_inq->remname_bda, 0, BD_ADDR_LEN);
if (p_inq->p_remname_cmpl_cb)
@@ -1400,7 +1400,7 @@ void btm_inq_db_reset (void)
p_inq->state = BTM_INQ_INACTIVE_STATE;
p_inq->pending_filt_complete_event = 0;
- p_inq->p_inq_results_cb = NULL;
+ p_inq->p_inq_results_cb = NULL;
btm_clr_inq_db(NULL); /* Clear out all the entries in the database */
btm_clr_inq_result_flt();
@@ -1503,7 +1503,7 @@ void btm_clr_inq_db (BD_ADDR p_bda)
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tINQ_DB_ENT *p_ent = p_inq->inq_db;
UINT16 xx;
-
+
#if (BTM_INQ_DEBUG == TRUE)
BTM_TRACE_DEBUG2 ("btm_clr_inq_db: inq_active:0x%x state:%d",
btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.state);
@@ -1520,7 +1520,7 @@ void btm_clr_inq_db (BD_ADDR p_bda)
#if (BTM_INQ_GET_REMOTE_NAME == TRUE)
p_ent->inq_info.remote_name_state = BTM_INQ_RMT_NAME_EMPTY;
#endif
-
+
if (btm_cb.btm_inq_vars.p_inq_change_cb)
(*btm_cb.btm_inq_vars.p_inq_change_cb) (&p_ent->inq_info, FALSE);
}
@@ -1691,7 +1691,7 @@ tINQ_DB_ENT *btm_inq_db_new (BD_ADDR p_bda)
** (BTM_SetInqEventFilter). It is used internally as part of the
** inquiry processing.
**
-** Input Params:
+** Input Params:
** filter_cond_type - this is the type of inquiry filter to apply:
** BTM_FILTER_COND_DEVICE_CLASS,
** BTM_FILTER_COND_BD_ADDR, or
@@ -1741,7 +1741,7 @@ static tBTM_STATUS btm_set_inq_event_filter (UINT8 filter_cond_type,
case BTM_CLR_INQUIRY_FILTER:
condition_length = 0;
break;
-
+
default:
return (BTM_ILLEGAL_VALUE); /* Bad parameter was passed in */
}
@@ -1751,7 +1751,7 @@ static tBTM_STATUS btm_set_inq_event_filter (UINT8 filter_cond_type,
/* Filter the inquiry results for the specified condition type and value */
if (btsnd_hcic_set_event_filter(HCI_FILTER_INQUIRY_RESULT, filter_cond_type,
p_cond, condition_length))
-
+
return (BTM_CMD_STARTED);
else
return (BTM_NO_RESOURCES);
@@ -1775,7 +1775,7 @@ void btm_event_filter_complete (UINT8 *p)
tBTM_STATUS status;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_CMPL_CB *p_cb = p_inq->p_inqfilter_cmpl_cb;
-
+
#if (BTM_INQ_DEBUG == TRUE)
BTM_TRACE_DEBUG3 ("btm_event_filter_complete: inq_active:0x%x state:%d inqfilt_active:%d",
btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.state, btm_cb.btm_inq_vars.inqfilt_active);
@@ -1801,7 +1801,7 @@ void btm_event_filter_complete (UINT8 *p)
}
else
status = BTM_SUCCESS;
-
+
/* If the set filter was initiated externally (via BTM_SetInqEventFilter), call the
callback function to notify the initiator that it has completed */
if (p_inq->state == BTM_INQ_INACTIVE_STATE)
@@ -1947,7 +1947,7 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
tBTM_INQ_RESULTS *p_cur;
BOOLEAN is_new = TRUE;
BOOLEAN update = FALSE;
- INT8 i_rssi;
+ INT8 i_rssi;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_INQ_RESULTS_CB *p_inq_results_cb = p_inq->p_inq_results_cb;
UINT8 page_scan_rep_mode = 0;
@@ -1995,13 +1995,13 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
p_i = btm_inq_db_find (bda);
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
+#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* Only process the num_resp is smaller than max_resps.
If results are queued to BTU task while canceling inquiry,
or when more than one result is in this response, > max_resp
responses could be processed which can confuse some apps
*/
- if (p_inq->inqparms.max_resps &&
+ if (p_inq->inqparms.max_resps &&
p_inq->inq_cmpl_info.num_resp >= p_inq->inqparms.max_resps
#if BLE_INCLUDED == TRUE
/* new device response */
@@ -2027,7 +2027,7 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
i_rssi = (INT8)rssi;
/* If this new RSSI is higher than the last one */
- if(p_inq->inqparms.report_dup && (rssi != 0) &&
+ if(p_inq->inqparms.report_dup && (rssi != 0) &&
p_i && (i_rssi > p_i->inq_info.results.rssi || p_i->inq_info.results.rssi == 0
#if BLE_INCLUDED == TRUE
/* BR/EDR inquiry information update */
@@ -2117,11 +2117,11 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* If the number of responses found and not unlimited, issue a cancel inquiry */
if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) &&
- p_inq->inqparms.max_resps &&
+ p_inq->inqparms.max_resps &&
p_inq->inq_cmpl_info.num_resp == p_inq->inqparms.max_resps
#if BLE_INCLUDED == TRUE
/* BLE scanning is active and received adv */
- && ((((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) &&
+ && ((((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) &&
p_cur->device_type == BT_DEVICE_TYPE_DUMO && p_i->scan_rsp) ||
(p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) == 0)
#endif
@@ -2151,10 +2151,10 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
if( inq_res_mode == BTM_INQ_RESULT_EXTENDED )
{
- if((p_eir_data = BTM_CheckEirData( p, BTM_EIR_COMPLETE_LOCAL_NAME_TYPE,
+ if((p_eir_data = BTM_CheckEirData( p, BTM_EIR_COMPLETE_LOCAL_NAME_TYPE,
&remote_name_len )) == NULL)
{
- p_eir_data = BTM_CheckEirData( p, BTM_EIR_SHORTENED_LOCAL_NAME_TYPE,
+ p_eir_data = BTM_CheckEirData( p, BTM_EIR_SHORTENED_LOCAL_NAME_TYPE,
&remote_name_len );
}
@@ -2182,7 +2182,7 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode)
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
if( inq_res_mode == BTM_INQ_RESULT_EXTENDED )
{
- memset( p_cur->eir_uuid, 0,
+ memset( p_cur->eir_uuid, 0,
BTM_EIR_SERVICE_ARRAY_SIZE * (BTM_EIR_ARRAY_BITS/8));
/* set bit map of UUID list from received EIR */
btm_set_eir_uuid( p, p_cur );
@@ -2224,10 +2224,10 @@ void btm_sort_inq_result(void)
tINQ_DB_ENT *p_ent = btm_cb.btm_inq_vars.inq_db;
tINQ_DB_ENT *p_next = btm_cb.btm_inq_vars.inq_db+1;
int size;
-
+
num_resp = (btm_cb.btm_inq_vars.inq_cmpl_info.num_resp<BTM_INQ_DB_SIZE)?
btm_cb.btm_inq_vars.inq_cmpl_info.num_resp: BTM_INQ_DB_SIZE;
-
+
if((p_tmp = (tINQ_DB_ENT *)GKI_getbuf(sizeof(tINQ_DB_ENT))) != NULL)
{
size = sizeof(tINQ_DB_ENT);
@@ -2243,7 +2243,7 @@ void btm_sort_inq_result(void)
}
}
}
-
+
GKI_freebuf(p_tmp);
}
}
@@ -2265,7 +2265,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
{
tBTM_CMPL_CB *p_inq_cb = btm_cb.btm_inq_vars.p_inq_cmpl_cb;
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
-
+
#if (BTM_INQ_GET_REMOTE_NAME==TRUE)
tBTM_INQ_INFO *p_cur;
UINT8 tempstate;
@@ -2305,7 +2305,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
}
}
#endif
-
+
/* Notify caller that the inquiry has completed; (periodic inquiries do not send completion events */
if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) && p_inq->inqparms.mode == 0)
{
@@ -2315,7 +2315,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
p_inq->inq_counter++;
btm_clr_inq_result_flt();
-
+
if((p_inq->inq_cmpl_info.status == BTM_SUCCESS) && HCI_LMP_INQ_RSSI_SUPPORTED(btm_cb.devcb.local_features))
{
btm_sort_inq_result();
@@ -2327,7 +2327,7 @@ void btm_process_inq_complete (UINT8 status, UINT8 mode)
p_inq->p_inq_cmpl_cb = (tBTM_CMPL_CB *) NULL;
/* If we have a callback registered for inquiry complete, call it */
- BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
+ BTM_TRACE_DEBUG2 ("BTM Inq Compl Callback: status 0x%02x, num results %d",
p_inq->inq_cmpl_info.status, p_inq->inq_cmpl_info.num_resp);
if (p_inq_cb)
@@ -2385,13 +2385,13 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
{
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
BOOLEAN cmd_ok;
-
-
+
+
/*** Make sure the device is ready ***/
if (!BTM_IsDeviceUp())
return (BTM_WRONG_MODE);
-
-
+
+
if (origin == BTM_RMT_NAME_SEC)
{
cmd_ok = btsnd_hcic_rmt_name_req (remote_bda, HCI_PAGE_SCAN_REP_MODE_R1,
@@ -2404,12 +2404,12 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
/* Make sure there are no two remote name requests from external API in progress */
else if (origin == BTM_RMT_NAME_EXT)
{
- if (p_inq->remname_active)
- {
+ if (p_inq->remname_active)
+ {
return (BTM_BUSY);
}
else
- {
+ {
/* If there is no remote name request running,call the callback function and start timer */
p_inq->p_remname_cmpl_cb = p_cb;
memcpy(p_inq->remname_bda, remote_bda, BD_ADDR_LEN);
@@ -2442,7 +2442,7 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
}
/* If the inquire feature is on */
#if (BTM_INQ_GET_REMOTE_NAME==TRUE)
-
+
else if (origin == BTM_RMT_NAME_INQ)
{
/* If the database entry exists for the device, use its clock offset */
@@ -2464,16 +2464,16 @@ tBTM_STATUS btm_initiate_rem_name (BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur,
else
return BTM_NO_RESOURCES;
}
-#endif
+#endif
else
{
-
+
return BTM_ILLEGAL_VALUE;
-
+
}
-
+
}
/*******************************************************************************
@@ -2493,9 +2493,9 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tBTM_CMPL_CB *p_cb = p_inq->p_remname_cmpl_cb;
UINT8 *p_n1;
-
+
UINT16 temp_evt_len;
-
+
#if (BTM_INQ_GET_REMOTE_NAME==TRUE)
/*** These are only used if part of the Inquiry Process ***/
tBTM_CMPL_CB *p_inq_cb;
@@ -2503,12 +2503,12 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
UINT8 *p_n;
tBTM_INQ_INFO *p_cur;
#endif
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;
#endif
-
+
if (bda != NULL)
{
BTM_TRACE_EVENT6("BDA %02x:%02x:%02x:%02x:%02x:%02x",bda[0], bda[1],
@@ -2519,10 +2519,10 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
BTM_TRACE_EVENT6("Inquire BDA %02x:%02x:%02x:%02x:%02x:%02x",p_inq->remname_bda[0], p_inq->remname_bda[1],
p_inq->remname_bda[2], p_inq->remname_bda[3],
p_inq->remname_bda[4], p_inq->remname_bda[5]);
+
-
-
- /* If the inquire BDA and remote DBA are the same, then stop the timer and set the active to false */
+
+ /* If the inquire BDA and remote DBA are the same, then stop the timer and set the active to false */
if ((p_inq->remname_active ==TRUE)&&
(((bda != NULL) &&
(memcmp(bda, p_inq->remname_bda,BD_ADDR_LEN)==0)) || bda == NULL))
@@ -2543,7 +2543,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
/* inquiry complete callback is called. */
if ((hci_status == HCI_SUCCESS))
- {
+ {
/* Copy the name from the data stream into the return structure */
/* Note that even if it is not being returned, it is used as a */
/* temporary buffer. */
@@ -2557,9 +2557,9 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
*p_n1++ = *bdn++;
temp_evt_len--;
}
- }
-
-
+ }
+
+
/* If processing a stand alone remote name then report the error in the callback */
else
{
@@ -2572,7 +2572,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
p_inq->p_remname_cmpl_cb = NULL;
if (p_cb)
- (p_cb)((tBTM_REMOTE_DEV_NAME *)&rem_name);
+ (p_cb)((tBTM_REMOTE_DEV_NAME *)&rem_name);
}
@@ -2652,7 +2652,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
p_inq->state = BTM_INQ_INACTIVE_STATE;
p_inq->inq_active = BTM_INQUIRY_INACTIVE;
p_inq->p_inq_cmpl_cb = NULL;
-
+
/* If we have a callback registered for inquiry complete, call it */
if (p_inq_cb)
(p_inq_cb)((tBTM_INQUIRY_CMPL *) &p_inq->inq_cmpl_info);
@@ -2734,10 +2734,10 @@ void btm_read_linq_tx_power_complete(UINT8 *p)
**
** Description This function is called to write EIR data to controller.
**
-** Parameters p_buff - allocated HCI command buffer including extended
+** Parameters p_buff - allocated HCI command buffer including extended
** inquriry response
**
-** Returns BTM_SUCCESS - if successful
+** Returns BTM_SUCCESS - if successful
** BTM_MODE_UNSUPPORTED - if local device cannot support it
**
*******************************************************************************/
@@ -2771,7 +2771,7 @@ tBTM_STATUS BTM_WriteEIR( BT_HDR *p_buff )
** type - finding EIR data type
** p_length - return the length of EIR data not including type
**
-** Returns pointer of EIR data
+** Returns pointer of EIR data
**
*******************************************************************************/
UINT8 *BTM_CheckEirData( UINT8 *p_eir, UINT8 type, UINT8 *p_length )
@@ -2837,7 +2837,7 @@ static UINT8 btm_convert_uuid_to_eir_service( UINT16 uuid16 )
**
** Description This function is called to know if UUID in bit map of UUID.
**
-** Parameters p_eir_uuid - bit map of UUID list
+** Parameters p_eir_uuid - bit map of UUID list
** uuid16 - UUID 16-bit
**
** Returns TRUE - if found
@@ -2952,7 +2952,7 @@ void BTM_RemoveEirService( UINT32 *p_eir_uuid, UINT16 uuid16 )
** BTM_EIR_COMPLETE_16BITS_UUID_TYPE, otherwise
**
*******************************************************************************/
-UINT8 BTM_GetEirSupportedServices( UINT32 *p_eir_uuid, UINT8 **p,
+UINT8 BTM_GetEirSupportedServices( UINT32 *p_eir_uuid, UINT8 **p,
UINT8 max_num_uuid16, UINT8 *p_num_uuid16)
{
#if (BTM_EIR_SERVER_INCLUDED == TRUE)
@@ -3003,7 +3003,7 @@ UINT8 BTM_GetEirSupportedServices( UINT32 *p_eir_uuid, UINT8 **p,
** BTM_EIR_MORE_128BITS_UUID_TYPE
**
*******************************************************************************/
-UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
+UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
UINT8 *p_uuid_list, UINT8 max_num_uuid)
{
#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
@@ -3023,18 +3023,18 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
if( *p_num_uuid > max_num_uuid )
{
BTM_TRACE_WARNING2("BTM_GetEirUuidList number of uuid in EIR = %d, size of uuid list = %d",
- *p_num_uuid, max_num_uuid );
+ *p_num_uuid, max_num_uuid );
*p_num_uuid = max_num_uuid;
}
- BTM_TRACE_DEBUG2("BTM_GetEirUuidList type = %02X, number of uuid = %d", type, *p_num_uuid );
-
+ BTM_TRACE_DEBUG2("BTM_GetEirUuidList type = %02X, number of uuid = %d", type, *p_num_uuid );
+
if( uuid_size == LEN_UUID_16 )
{
for( yy = 0; yy < *p_num_uuid; yy++ )
{
STREAM_TO_UINT16(*(p_uuid16 + yy), p_uuid_data);
- BTM_TRACE_DEBUG1(" 0x%04X", *(p_uuid16 + yy));
+ BTM_TRACE_DEBUG1(" 0x%04X", *(p_uuid16 + yy));
}
}
else if( uuid_size == LEN_UUID_32 )
@@ -3042,7 +3042,7 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
for( yy = 0; yy < *p_num_uuid; yy++ )
{
STREAM_TO_UINT32(*(p_uuid32 + yy), p_uuid_data);
- BTM_TRACE_DEBUG1(" 0x%08X", *(p_uuid32 + yy));
+ BTM_TRACE_DEBUG1(" 0x%08X", *(p_uuid32 + yy));
}
}
else if( uuid_size == LEN_UUID_128 )
@@ -3052,7 +3052,7 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
STREAM_TO_ARRAY16(p_uuid_list + yy * LEN_UUID_128, p_uuid_data);
for( xx = 0; xx < LEN_UUID_128; xx++ )
sprintf(buff + xx*2, "%02X", *(p_uuid_list + yy * LEN_UUID_128 + xx));
- BTM_TRACE_DEBUG1(" 0x%s", buff);
+ BTM_TRACE_DEBUG1(" 0x%s", buff);
}
}
@@ -3077,10 +3077,10 @@ UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
** p_uuid_list_type - EIR data type
**
** Returns NULL - if UUID list with uuid_size is not found
-** beginning of UUID list in EIR - otherwise
+** beginning of UUID list in EIR - otherwise
**
*******************************************************************************/
-static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
+static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
UINT8 *p_num_uuid, UINT8 *p_uuid_list_type )
{
UINT8 *p_uuid_data;
@@ -3118,7 +3118,7 @@ static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
*p_uuid_list_type = complete_type;
}
- *p_num_uuid = uuid_len / uuid_size;
+ *p_num_uuid = uuid_len / uuid_size;
return p_uuid_data;
}
@@ -3132,7 +3132,7 @@ static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
** uuid_size - size of UUID
**
** Returns 0 - if UUID cannot be converted to UUID 16-bit
-** UUID 16-bit - otherwise
+** UUID 16-bit - otherwise
**
*******************************************************************************/
static UINT16 btm_convert_uuid_to_uuid16( UINT8 *p_uuid, UINT8 uuid_size )
@@ -3191,7 +3191,7 @@ static UINT16 btm_convert_uuid_to_uuid16( UINT8 *p_uuid, UINT8 uuid_size )
** Parameters p_eir - pointer of EIR significant part
** p_results - pointer of inquiry result
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void btm_set_eir_uuid( UINT8 *p_eir, tBTM_INQ_RESULTS *p_results )
@@ -3248,8 +3248,8 @@ void btm_set_eir_uuid( UINT8 *p_eir, tBTM_INQ_RESULTS *p_results )
}
}
- BTM_TRACE_DEBUG2("btm_set_eir_uuid eir_uuid=0x%08X %08X",
- p_results->eir_uuid[1], p_results->eir_uuid[0] );
+ BTM_TRACE_DEBUG2("btm_set_eir_uuid eir_uuid=0x%08X %08X",
+ p_results->eir_uuid[1], p_results->eir_uuid[0] );
}
#endif
diff --git a/stack/btm/btm_int.h b/stack/btm/btm_int.h
index 8d9d96a..e8fb57b 100644
--- a/stack/btm/btm_int.h
+++ b/stack/btm/btm_int.h
@@ -89,8 +89,8 @@ typedef struct
#define BTM_ACL_SWKEY_STATE_SWITCHING 3
#define BTM_ACL_SWKEY_STATE_ENCRYPTION_ON 4
#define BTM_ACL_SWKEY_STATE_IN_PROGRESS 5
- UINT8 switch_role_state;
- UINT8 change_key_state;
+ UINT8 switch_role_state;
+ UINT8 change_key_state;
#define BTM_ACL_ENCRYPT_STATE_IDLE 0
#define BTM_ACL_ENCRYPT_STATE_ENCRYPT_OFF 1 /* encryption turning off */
@@ -141,7 +141,7 @@ typedef struct
TIMER_LIST_ENT txpwer_timer;
tBTM_CMPL_CB *p_txpwer_cmpl_cb; /* Callback function to be called when */
/* read inq tx power function completes */
-
+
TIMER_LIST_ENT qossu_timer;
tBTM_CMPL_CB *p_qossu_cmpl_cb; /* Callback function to be called when */
/* qos setup function completes */
@@ -168,7 +168,7 @@ typedef struct
BT_OCTET16 er; /* BLE encryption key */
#if BTM_BLE_CONFORMANCE_TESTING == TRUE
- BOOLEAN no_disc_if_pair_fail;
+ BOOLEAN no_disc_if_pair_fail;
BOOLEAN enable_test_mac_val;
BT_OCTET8 test_mac;
BOOLEAN enable_test_local_sign_cntr;
@@ -302,7 +302,7 @@ typedef struct
typedef UINT8 *BTM_BD_NAME_PTR; /* Pointer to Device name */
-/* Security callback is called by this unit when security
+/* Security callback is called by this unit when security
** procedures are completed. Parameters are
** BD Address of remote
** Result of the operation
@@ -406,7 +406,7 @@ extern void btm_sco_chk_pend_rolechange (UINT16 hci_handle);
/*
** Define structure for Security Service Record.
-** A record exists for each service registered with the Security Manager
+** A record exists for each service registered with the Security Manager
*/
typedef struct
{
@@ -431,15 +431,15 @@ typedef struct
{
BT_OCTET16 irk; /* peer diverified identity root */
BT_OCTET16 ltk; /* peer long term key */
- BT_OCTET16 csrk; /* peer SRK peer device used to secured sign local data */
+ BT_OCTET16 csrk; /* peer SRK peer device used to secured sign local data */
BT_OCTET8 rand; /* random vector for LTK generation */
- UINT16 ediv; /* LTK diversifier of this slave device */
+ UINT16 ediv; /* LTK diversifier of this slave device */
UINT16 div; /* local DIV to generate local LTK=d1(ER,DIV,0) and CSRK=d1(ER,DIV,1) */
UINT8 sec_level; /* local pairing security level */
UINT8 key_size; /* key size of the LTK delivered to peer device */
- UINT8 srk_sec_level; /* security property of peer SRK for this device */
- UINT8 local_csrk_sec_level; /* security property of local CSRK for this device */
+ UINT8 srk_sec_level; /* security property of peer SRK for this device */
+ UINT8 local_csrk_sec_level; /* security property of local CSRK for this device */
UINT32 counter; /* peer sign counter for verifying rcv signed cmd */
UINT32 local_counter; /* local sign counter for sending signed write cmd*/
@@ -477,9 +477,9 @@ typedef struct
DEV_CLASS dev_class; /* DEV_CLASS of the device */
LINK_KEY link_key; /* Device link key */
-#define BTM_SEC_AUTHORIZED BTM_SEC_FLAG_AUTHORIZED
+#define BTM_SEC_AUTHORIZED BTM_SEC_FLAG_AUTHORIZED
#define BTM_SEC_AUTHENTICATED BTM_SEC_FLAG_AUTHENTICATED
-#define BTM_SEC_ENCRYPTED BTM_SEC_FLAG_ENCRYPTED
+#define BTM_SEC_ENCRYPTED BTM_SEC_FLAG_ENCRYPTED
#define BTM_SEC_NAME_KNOWN 0x08
#define BTM_SEC_LINK_KEY_KNOWN BTM_SEC_FLAG_LKEY_KNOWN
#define BTM_SEC_LINK_KEY_AUTHED 0x20
@@ -624,7 +624,7 @@ typedef struct
{
tBTM_PM_STATUS_CBACK *cback;/* to notify the registered party of mode change event */
UINT8 mask; /* registered request mask. 0, if this entry is not used */
-} tBTM_PM_RCB;
+} tBTM_PM_RCB;
#endif /* BTM_PWR_MGR_INCLUDED */
enum
@@ -755,7 +755,7 @@ typedef struct
tBTM_BLE_CB ble_ctr_cb;
UINT16 enc_handle;
- BT_OCTET8 enc_rand; /* received rand value from LTK request*/
+ BT_OCTET8 enc_rand; /* received rand value from LTK request*/
UINT16 ediv; /* received ediv value from LTK request */
UINT8 key_size;
#endif
@@ -777,7 +777,7 @@ typedef struct
*****************************************************/
#if BTM_SCO_INCLUDED == TRUE
tSCO_CB sco_cb;
-#endif
+#endif
/*****************************************************
** Security Management
@@ -802,7 +802,7 @@ typedef struct
BOOLEAN pin_type_changed; /* pin type changed during bonding */
BOOLEAN sec_req_pending; /* TRUE if a request is pending */
// btla-specific ++
-#ifdef PORCHE_PAIRING_CONFLICT
+#ifdef PORCHE_PAIRING_CONFLICT
UINT8 pin_code_len_saved; /* for legacy devices */
#endif
// btla-specific --
diff --git a/stack/btm/btm_pm.c b/stack/btm/btm_pm.c
index 7949c61..afe7275 100644
--- a/stack/btm/btm_pm.c
+++ b/stack/btm/btm_pm.c
@@ -83,7 +83,7 @@ static tBTM_STATUS btm_pm_snd_md_req( UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD
*/
#if BTM_PM_DEBUG == TRUE
-const char * btm_pm_state_str[] =
+const char * btm_pm_state_str[] =
{
"pm_active_state",
"pm_hold_state",
@@ -92,7 +92,7 @@ const char * btm_pm_state_str[] =
"pm_pend_state"
};
-const char * btm_pm_event_str[] =
+const char * btm_pm_event_str[] =
{
"pm_set_mode_event",
"pm_hci_sts_event",
@@ -100,7 +100,7 @@ const char * btm_pm_event_str[] =
"pm_update_event"
};
-const char * btm_pm_action_str[] =
+const char * btm_pm_action_str[] =
{
"pm_set_mode_action",
"pm_update_db_action",
@@ -222,7 +222,7 @@ tBTM_STATUS BTM_SetPowerMode (UINT8 pm_id, BD_ADDR remote_bda, tBTM_PM_PWR_MD *p
temp_pm_id = BTM_MAX_PM_RECORDS;
/* update mode database */
- if( ((pm_id != BTM_PM_SET_ONLY_ID) &&
+ if( ((pm_id != BTM_PM_SET_ONLY_ID) &&
(btm_cb.pm_reg_db[pm_id].mask & BTM_PM_REG_SET))
|| ((pm_id == BTM_PM_SET_ONLY_ID) && (btm_cb.pm_pend_link != MAX_L2CAP_LINKS)) )
{
@@ -252,7 +252,7 @@ tBTM_STATUS BTM_SetPowerMode (UINT8 pm_id, BD_ADDR remote_bda, tBTM_PM_PWR_MD *p
return BTM_CMD_STORED;
}
-
+
return btm_pm_snd_md_req(pm_id, acl_ind, p_mode);
}
@@ -560,7 +560,7 @@ static tBTM_PM_MODE btm_pm_get_set_mode(UINT8 pm_id, tBTM_PM_MCB *p_cb, tBTM_PM_
** Function btm_pm_snd_md_req
** Description get the resulting mode and send the resuest to host controller
** Returns tBTM_STATUS
-**, BOOLEAN *p_chg_ind
+**, BOOLEAN *p_chg_ind
*******************************************************************************/
static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *p_mode)
{
@@ -635,7 +635,7 @@ static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *
break;
case BTM_PM_MD_HOLD:
- if (btsnd_hcic_hold_mode (btm_cb.acl_db[link_ind].hci_handle,
+ if (btsnd_hcic_hold_mode (btm_cb.acl_db[link_ind].hci_handle,
md_res.max, md_res.min))
{
btm_cb.pm_pend_link = link_ind;
@@ -643,7 +643,7 @@ static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *
break;
case BTM_PM_MD_SNIFF:
- if (btsnd_hcic_sniff_mode (btm_cb.acl_db[link_ind].hci_handle,
+ if (btsnd_hcic_sniff_mode (btm_cb.acl_db[link_ind].hci_handle,
md_res.max, md_res.min, md_res.attempt,
md_res.timeout))
{
@@ -652,7 +652,7 @@ static tBTM_STATUS btm_pm_snd_md_req(UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *
break;
case BTM_PM_MD_PARK:
- if (btsnd_hcic_park_mode (btm_cb.acl_db[link_ind].hci_handle,
+ if (btsnd_hcic_park_mode (btm_cb.acl_db[link_ind].hci_handle,
md_res.max, md_res.min))
{
btm_cb.pm_pend_link = link_ind;
@@ -810,7 +810,7 @@ void btm_pm_proc_mode_change (UINT8 hci_status, UINT16 hci_handle, UINT8 mode, U
/* Mode changed from Sniff to Active while SCO is open. */
/* Packet types of active mode, not sniff mode, should be used for ACL when SCO is closed. */
p->restore_pkt_types = btm_cb.btm_acl_pkt_types_supported;
-
+
/* Exclude packet types not supported by the peer */
btm_acl_chk_peer_pkt_type_support (p, &p->restore_pkt_types);
}
diff --git a/stack/btm/btm_sco.c b/stack/btm/btm_sco.c
index d631480..394ac0a 100644
--- a/stack/btm/btm_sco.c
+++ b/stack/btm/btm_sco.c
@@ -80,7 +80,7 @@ void btm_sco_flush_sco_data(UINT16 sco_inx)
p = &btm_cb.sco_cb.sco_db[sco_inx];
while (p->xmit_data_q.p_first)
{
- if ((p_buf = (BT_HDR *)GKI_dequeue (&p->xmit_data_q)) != NULL)
+ if ((p_buf = (BT_HDR *)GKI_dequeue (&p->xmit_data_q)) != NULL)
GKI_freebuf (p_buf);
}
}
@@ -120,7 +120,7 @@ void btm_sco_init (void)
** the tx_bw, max_latency, content format, and packet_types are
** valid. The hci_status parameter should be
** ([0x0] to accept, [0x0d..0x0f] to reject)
-**
+**
** Returns void
**
*******************************************************************************/
@@ -190,7 +190,7 @@ static void btm_esco_conn_rsp (UINT16 sco_inx, UINT8 hci_status, BD_ADDR bda,
if (p_sco->esco.data.link_type == BTM_LINK_TYPE_SCO)
{
temp_pkt_types &= BTM_SCO_LINK_ONLY_MASK;
-
+
if (btm_cb.devcb.local_version.hci_version >= HCI_PROTO_VERSION_2_0)
{
temp_pkt_types |= BTM_SCO_EXCEPTION_PKTS_MASK;
@@ -242,7 +242,7 @@ void btm_sco_check_send_pkts (UINT16 sco_inx)
/* If there is data to send, send it now */
while (p_ccb->xmit_data_q.p_first != NULL)
- {
+ {
p_buf = NULL;
#if BTM_SCO_HCI_DEBUG
@@ -267,14 +267,14 @@ void btm_sco_check_send_pkts (UINT16 sco_inx)
void btm_route_sco_data(BT_HDR *p_msg)
{
#if BTM_SCO_HCI_INCLUDED == TRUE
- UINT16 sco_inx, handle;
+ UINT16 sco_inx, handle;
UINT8 *p = (UINT8 *)(p_msg + 1) + p_msg->offset;
UINT8 pkt_size = 0;
UINT8 pkt_status = 0;
/* Extract Packet_Status_Flag and handle */
STREAM_TO_UINT16 (handle, p);
- pkt_status = HCID_GET_EVENT(handle);
+ pkt_status = HCID_GET_EVENT(handle);
handle = HCID_GET_HANDLE (handle);
STREAM_TO_UINT8 (pkt_size, p);
@@ -285,8 +285,8 @@ void btm_route_sco_data(BT_HDR *p_msg)
if (!btm_cb.sco_cb.p_data_cb )
/* if no data callback registered, just free the buffer */
GKI_freebuf (p_msg);
- else
- {
+ else
+ {
(*btm_cb.sco_cb.p_data_cb)(sco_inx, p_msg, (tBTM_SCO_DATA_FLAG) pkt_status);
}
}
@@ -306,20 +306,20 @@ void btm_route_sco_data(BT_HDR *p_msg)
** Function BTM_WriteScoData
**
** Description This function write SCO data to a specified instance. The data
-** to be written p_buf needs to carry an offset of
-** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
+** to be written p_buf needs to carry an offset of
+** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
** exceed BTM_SCO_DATA_SIZE_MAX bytes, whose default value is set
-** to 60 and is configurable. Data longer than the maximum bytes
-** will be truncated.
+** to 60 and is configurable. Data longer than the maximum bytes
+** will be truncated.
**
** Returns BTM_SUCCESS: data write is successful
** BTM_ILLEGAL_VALUE: SCO data contains illegal offset value.
-** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
-** size.
+** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
+** size.
** BTM_NO_RESOURCES: no resources.
** BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
** routed via HCI.
-**
+**
**
*******************************************************************************/
tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
@@ -347,7 +347,7 @@ tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
p = (UINT8 *)(p_buf + 1) + p_buf->offset;
/* add HCI handle */
UINT16_TO_STREAM (p, p_ccb->hci_handle);
- /* only sent the first BTM_SCO_DATA_SIZE_MAX bytes data if more than max,
+ /* only sent the first BTM_SCO_DATA_SIZE_MAX bytes data if more than max,
and set warning status */
if (p_buf->len > BTM_SCO_DATA_SIZE_MAX)
{
@@ -359,7 +359,7 @@ tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
p_buf->len += HCI_SCO_PREAMBLE_SIZE;
GKI_enqueue (&p_ccb->xmit_data_q, p_buf);
-
+
btm_sco_check_send_pkts (sco_inx);
}
}
@@ -367,7 +367,7 @@ tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf)
{
GKI_freebuf(p_buf);
- BTM_TRACE_WARNING2 ("BTM_WriteScoData, invalid sco index: %d at state [%d]",
+ BTM_TRACE_WARNING2 ("BTM_WriteScoData, invalid sco index: %d at state [%d]",
sco_inx, btm_cb.sco_cb.sco_db[sco_inx].state);
status = BTM_UNKNOWN_ADDR;
}
@@ -441,7 +441,7 @@ static tBTM_STATUS btm_send_connect_request(UINT16 acl_handle,
p_setup->tx_bw, p_setup->rx_bw,
p_setup->max_latency, p_setup->voice_contfmt,
p_setup->retrans_effort, temp_pkt_types);
-
+
if (!btsnd_hcic_setup_esco_conn(acl_handle,
p_setup->tx_bw,
p_setup->rx_bw,
@@ -613,7 +613,7 @@ tBTM_STATUS BTM_CreateSco (BD_ADDR remote_bda, BOOLEAN is_orig, UINT16 pkt_types
/* Coverity: FALSE-POSITIVE error from Coverity tool. Please do NOT remove following comment. */
/* coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
-*/
+*/
pm.mode = BTM_PM_MD_ACTIVE;
BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, remote_bda, &pm);
p->state = SCO_ST_PEND_UNPARK;
@@ -682,7 +682,7 @@ tBTM_STATUS BTM_CreateSco (BD_ADDR remote_bda, BOOLEAN is_orig, UINT16 pkt_types
}
if( p->state != SCO_ST_PEND_UNPARK && p->state != SCO_ST_PEND_ROLECHANGE )
- {
+ {
if (is_orig)
{
BTM_TRACE_API2("BTM_CreateSco -> (e)SCO Link for ACL handle 0x%04x, Desired Type %d",
@@ -762,7 +762,7 @@ void btm_sco_chk_pend_rolechange (UINT16 hci_handle)
for (xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++)
{
- if ((p->state == SCO_ST_PEND_ROLECHANGE) &&
+ if ((p->state == SCO_ST_PEND_ROLECHANGE) &&
((acl_handle = BTM_GetHCIConnHandle (p->esco.data.bd_addr)) == hci_handle))
{
@@ -842,7 +842,7 @@ void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type)
}
/* TCS usage */
- if (btm_cb.sco_cb.app_sco_ind_cb)
+ if (btm_cb.sco_cb.app_sco_ind_cb)
{
/* Now, try to find an unused control block */
for (xx = 0, p = &btm_cb.sco_cb.sco_db[0]; xx < BTM_MAX_SCO_LINKS; xx++, p++)
@@ -858,8 +858,8 @@ void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type)
break;
}
}
- if( xx < BTM_MAX_SCO_LINKS)
- {
+ if( xx < BTM_MAX_SCO_LINKS)
+ {
btm_cb.sco_cb.app_sco_ind_cb(xx);
return;
}
@@ -976,7 +976,7 @@ void btm_sco_connected (UINT8 hci_status, BD_ADDR bda, UINT16 hci_handle,
** Description Look through all active SCO connection for a match based on the
** HCI handle.
**
-** Returns index to matched SCO connection CB, or BTM_MAX_SCO_LINKS if
+** Returns index to matched SCO connection CB, or BTM_MAX_SCO_LINKS if
** no match.
**
*******************************************************************************/
@@ -1070,7 +1070,7 @@ void btm_remove_sco_links (BD_ADDR bda)
** Function btm_sco_removed
**
** Description This function is called by BTIF when an SCO connection
-** is removed.
+** is removed.
**
** Returns void
**
@@ -1131,7 +1131,7 @@ void btm_sco_acl_removed (BD_ADDR bda)
if ((!bda) || (!memcmp (p->esco.data.bd_addr, bda, BD_ADDR_LEN) && p->rem_bd_known))
{
btm_sco_flush_sco_data(xx);
-
+
p->state = SCO_ST_UNUSED;
p->esco.p_esco_cback = NULL; /* Deregister eSCO callback */
(*p->p_disc_cb)(xx);
@@ -1388,13 +1388,13 @@ tBTM_STATUS BTM_SetEScoMode (tBTM_SCO_TYPE sco_mode, tBTM_ESCO_PARAMS *p_parms)
** Function BTM_RegForEScoEvts
**
** Description This function registers a SCO event callback with the
-** specified instance. It should be used to received
+** specified instance. It should be used to received
** connection indication events and change of link parameter
-** events.
+** events.
**
** Returns BTM_SUCCESS if the successful.
** BTM_ILLEGAL_VALUE if there is an illegal sco_inx
-** BTM_MODE_UNSUPPORTED if controller version is not BT1.2 or
+** BTM_MODE_UNSUPPORTED if controller version is not BT1.2 or
** later or does not support eSCO.
**
*******************************************************************************/
@@ -1440,7 +1440,7 @@ tBTM_STATUS BTM_ReadEScoLinkParms (UINT16 sco_inx, tBTM_ESCO_DATA *p_parms)
#if (BTM_MAX_SCO_LINKS>0)
BTM_TRACE_API1("BTM_ReadEScoLinkParms -> sco_inx 0x%04x", sco_inx);
- if (sco_inx < BTM_MAX_SCO_LINKS &&
+ if (sco_inx < BTM_MAX_SCO_LINKS &&
btm_cb.sco_cb.sco_db[sco_inx].state >= SCO_ST_CONNECTED)
{
*p_parms = btm_cb.sco_cb.sco_db[sco_inx].esco.data;
@@ -1477,12 +1477,12 @@ tBTM_STATUS BTM_ChangeEScoLinkParms (UINT16 sco_inx, tBTM_CHG_ESCO_PARAMS *p_par
tBTM_ESCO_PARAMS *p_setup;
tSCO_CONN *p_sco;
UINT16 temp_pkt_types;
-
+
/* Make sure sco handle is valid and on an active link */
- if (sco_inx >= BTM_MAX_SCO_LINKS ||
+ if (sco_inx >= BTM_MAX_SCO_LINKS ||
btm_cb.sco_cb.sco_db[sco_inx].state != SCO_ST_CONNECTED)
return (BTM_WRONG_MODE);
-
+
p_sco = &btm_cb.sco_cb.sco_db[sco_inx];
p_setup = &p_sco->esco.setup;
@@ -1490,9 +1490,9 @@ tBTM_STATUS BTM_ChangeEScoLinkParms (UINT16 sco_inx, tBTM_CHG_ESCO_PARAMS *p_par
if (p_sco->esco.data.link_type == BTM_LINK_TYPE_SCO ||
!btm_cb.sco_cb.esco_supported)
{
- p_setup->packet_types = p_parms->packet_types &
+ p_setup->packet_types = p_parms->packet_types &
(btm_cb.btm_sco_pkt_types_supported & BTM_SCO_LINK_ONLY_MASK);
-
+
BTM_TRACE_API2("BTM_ChangeEScoLinkParms -> SCO Link for handle 0x%04x, pkt 0x%04x",
p_sco->hci_handle, p_setup->packet_types);
@@ -1548,7 +1548,7 @@ tBTM_STATUS BTM_ChangeEScoLinkParms (UINT16 sco_inx, tBTM_CHG_ESCO_PARAMS *p_par
** the tx_bw, max_latency, content format, and packet_types are
** valid. The hci_status parameter should be
** ([0x0] to accept, [0x0d..0x0f] to reject)
-**
+**
**
** Returns void
**
@@ -1570,9 +1570,9 @@ void BTM_EScoConnRsp (UINT16 sco_inx, UINT8 hci_status, tBTM_ESCO_PARAMS *p_parm
**
** Function btm_read_def_esco_mode
**
-** Description This function copies the current default esco settings into
+** Description This function copies the current default esco settings into
** the return buffer.
-**
+**
** Returns tBTM_SCO_TYPE
**
*******************************************************************************/
@@ -1591,7 +1591,7 @@ tBTM_SCO_TYPE btm_read_def_esco_mode (tBTM_ESCO_PARAMS *p_parms)
** Function btm_esco_proc_conn_chg
**
** Description This function is called by BTIF when an SCO connection
-** is changed.
+** is changed.
**
** Returns void
**
@@ -1636,7 +1636,7 @@ void btm_esco_proc_conn_chg (UINT8 status, UINT16 handle, UINT8 tx_interval,
**
** Function btm_is_sco_active
**
-** Description This function is called to see if a SCO handle is already in
+** Description This function is called to see if a SCO handle is already in
** use.
**
** Returns BOOLEAN
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c
index a9199cf..5ef45b1 100644..100755
--- a/stack/btm/btm_sec.c
+++ b/stack/btm/btm_sec.c
@@ -68,8 +68,8 @@ BOOLEAN btm_sec_are_all_trusted(UINT32 p_mask[]);
static tBTM_STATUS btm_sec_send_hci_disconnect (tBTM_SEC_DEV_REC *p_dev_rec, UINT8 reason);
tBTM_SEC_DEV_REC *btm_sec_find_dev_by_sec_state (UINT8 state);
-static BOOLEAN btm_sec_set_security_level ( CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+static BOOLEAN btm_sec_set_security_level ( CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id);
/* TRUE - authenticated link key is possible */
@@ -126,8 +126,8 @@ BOOLEAN BTM_SecRegister (tBTM_APPL_INFO *p_cb_info)
}
#endif
-
-
+
+
btm_cb.api = *p_cb_info;
#if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE
BTM_TRACE_ERROR1 ("BTM_SecRegister: btm_cb.api.p_le_callback = 0x%x ", btm_cb.api.p_le_callback);
@@ -391,11 +391,11 @@ void BTM_SetPairableMode (BOOLEAN allow_pairing, BOOLEAN connect_only_paired)
** Description Register UCD service security level with Security Manager
**
** Parameters: is_originator - TRUE if originating the connection, FALSE if not
-** p_name - Name of the service relevant only if
+** p_name - Name of the service relevant only if
** authorization will show this name to user. ignored
** if BTM_SEC_SERVICE_NAME_LEN is 0.
** service_id - service ID for the service passed to authorization callback
-** sec_level - bit mask of the security features
+** sec_level - bit mask of the security features
** psm - L2CAP PSM
** mx_proto_id - protocol ID of multiplexing proto below
** mx_chan_id - channel ID of multiplexing proto below
@@ -403,8 +403,8 @@ void BTM_SetPairableMode (BOOLEAN allow_pairing, BOOLEAN connect_only_paired)
** Returns TRUE if registered OK, else FALSE
**
*******************************************************************************/
-BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id)
{
#if (L2CAP_UCD_INCLUDED == TRUE)
@@ -415,7 +415,7 @@ BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 serv
else
conn_type = CONNLESS_TERM;
- return(btm_sec_set_security_level (conn_type, p_name, service_id,
+ return(btm_sec_set_security_level (conn_type, p_name, service_id,
sec_level, psm, mx_proto_id, mx_chan_id));
#else
return FALSE;
@@ -429,11 +429,11 @@ BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 serv
** Description Register service security level with Security Manager
**
** Parameters: is_originator - TRUE if originating the connection, FALSE if not
-** p_name - Name of the service relevant only if
+** p_name - Name of the service relevant only if
** authorization will show this name to user. ignored
** if BTM_SEC_SERVICE_NAME_LEN is 0.
** service_id - service ID for the service passed to authorization callback
-** sec_level - bit mask of the security features
+** sec_level - bit mask of the security features
** psm - L2CAP PSM
** mx_proto_id - protocol ID of multiplexing proto below
** mx_chan_id - channel ID of multiplexing proto below
@@ -453,10 +453,10 @@ BOOLEAN BTM_SetSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service
else
conn_type = CONN_ORIENT_TERM;
- return(btm_sec_set_security_level (conn_type, p_name, service_id,
+ return(btm_sec_set_security_level (conn_type, p_name, service_id,
sec_level, psm, mx_proto_id, mx_chan_id));
#else
- return(btm_sec_set_security_level (is_originator, p_name, service_id,
+ return(btm_sec_set_security_level (is_originator, p_name, service_id,
sec_level, psm, mx_proto_id, mx_chan_id));
#endif
}
@@ -468,11 +468,11 @@ BOOLEAN BTM_SetSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service
** Description Register service security level with Security Manager
**
** Parameters: conn_type - TRUE if originating the connection, FALSE if not
-** p_name - Name of the service relevant only if
+** p_name - Name of the service relevant only if
** authorization will show this name to user. ignored
** if BTM_SEC_SERVICE_NAME_LEN is 0.
** service_id - service ID for the service passed to authorization callback
-** sec_level - bit mask of the security features
+** sec_level - bit mask of the security features
** psm - L2CAP PSM
** mx_proto_id - protocol ID of multiplexing proto below
** mx_chan_id - channel ID of multiplexing proto below
@@ -480,8 +480,8 @@ BOOLEAN BTM_SetSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service
** Returns TRUE if registered OK, else FALSE
**
*******************************************************************************/
-static BOOLEAN btm_sec_set_security_level (CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+static BOOLEAN btm_sec_set_security_level (CONNECTION_TYPE conn_type, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id)
{
tBTM_SEC_SERV_REC *p_srec;
@@ -766,9 +766,9 @@ UINT8 btm_sec_clr_service_by_psm (UINT16 psm)
**
** Function BTM_SecClrUCDService
**
-** Description
+** Description
**
-** Parameters Service ID - Id of the service to remove.
+** Parameters Service ID - Id of the service to remove.
** ('0' removes all service records )
**
** Returns Number of records that were cleared.
@@ -784,7 +784,7 @@ UINT8 BTM_SecClrUCDService (UINT8 service_id)
for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_srec++)
{
/* Delete services with specified name (if in use and not SDP) */
- if ((p_srec->security_flags & BTM_SEC_IN_USE) &&
+ if ((p_srec->security_flags & BTM_SEC_IN_USE) &&
(!service_id || (service_id == (UINT32)p_srec->service_id)))
{
BTM_TRACE_API2("BTM_UCD_SEC_CLR[%d]: id %d", i, service_id);
@@ -902,7 +902,7 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
p_dev_rec->sec_flags &= ~BTM_SEC_LINK_KEY_AUTHED;
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, HCI_ERR_AUTH_FAILURE);
}
return;
@@ -911,7 +911,7 @@ void BTM_PINCodeReply (BD_ADDR bd_addr, UINT8 res, UINT8 pin_len, UINT8 *p_pin,
btm_sec_change_pairing_state (BTM_PAIR_STATE_WAIT_AUTH_COMPLETE);
btm_cb.acl_disc_reason = HCI_SUCCESS;
-#ifdef PORCHE_PAIRING_CONFLICT
+#ifdef PORCHE_PAIRING_CONFLICT
BTM_TRACE_EVENT2("BTM_PINCodeReply(): Saving pin_len: %d btm_cb.pin_code_len: %d", pin_len, btm_cb.pin_code_len);
/* if this was not pre-fetched, save the PIN */
if (btm_cb.pin_code_len == 0)
@@ -1209,7 +1209,7 @@ tBTM_STATUS BTM_SecBondCancel (BD_ADDR bd_addr)
#if SMP_INCLUDED == TRUE
p = btm_bda_to_acl(bd_addr);
- if (p && p->is_le_link &&
+ if (p && p->is_le_link &&
(p_dev_rec->sec_state == BTM_SEC_STATE_AUTHENTICATING))
{
BTM_TRACE_DEBUG0 ("Cancel LE pairing");
@@ -1219,7 +1219,7 @@ tBTM_STATUS BTM_SecBondCancel (BD_ADDR bd_addr)
}
else
{
- return BTM_WRONG_MODE;
+ return BTM_WRONG_MODE;
}
}
@@ -1450,12 +1450,12 @@ static tBTM_STATUS btm_sec_send_hci_disconnect (tBTM_SEC_DEV_REC *p_dev_rec, UIN
#if BTM_DISC_DURING_RS == TRUE
/* If a Role Switch is in progress, delay the HCI Disconnect to avoid controller problem (4329B1) */
if (p_dev_rec->rs_disc_pending == BTM_SEC_RS_PENDING)
- {
+ {
BTM_TRACE_ERROR0("RS in progress - Set DISC Pending flag in btm_sec_send_hci_disconnect to delay disconnect");
p_dev_rec->rs_disc_pending = BTM_SEC_DISC_PENDING;
return BTM_SUCCESS;
}
-#endif
+#endif
/* Tear down the HCI link */
if (!btsnd_hcic_disconnect (p_dev_rec->hci_handle, reason))
{
@@ -2224,7 +2224,7 @@ tBTM_STATUS btm_sec_l2cap_access_req (BD_ADDR bd_addr, UINT16 psm, UINT16 handle
(p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED), (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED));
/* SM4, but we do not know for sure which level of security we need.
* as long as we have a link key, it's OK */
- if ((0 == (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED))
+ if ((0 == (p_dev_rec->sec_flags & BTM_SEC_AUTHENTICATED))
||(0 == (p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED)))
{
rc = BTM_DELAY_CHECK;
@@ -2885,7 +2885,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
{
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, status);
return;
}
@@ -2902,7 +2902,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
}
}
- /* BT 2.1 or carkit, bring up the connection to force the peer to request PIN.
+ /* BT 2.1 or carkit, bring up the connection to force the peer to request PIN.
** Else prefetch (btm_sec_check_prefetch_pin will do the prefetching if needed)
*/
if ((p_dev_rec->sm4 != BTM_SM4_KNOWN) || !btm_sec_check_prefetch_pin(p_dev_rec))
@@ -2920,7 +2920,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, HCI_ERR_MEMORY_FULL);
}
}
@@ -3222,8 +3222,8 @@ void btm_io_capabilities_rsp (UINT8 *p)
* Use the connecting device's CoD for the connection */
/* coverity[uninit_use_in_call]
Event uninit_use_in_call: Using uninitialized element of array "evt_data.bd_addr" in call to function "memcmp"
-FALSE-POSITIVE error from Coverity test-tool. evt_data.bd_addr is set at the beginning with: STREAM_TO_BDADDR (evt_data.bd_addr, p);
-*/
+FALSE-POSITIVE error from Coverity test-tool. evt_data.bd_addr is set at the beginning with: STREAM_TO_BDADDR (evt_data.bd_addr, p);
+*/
if (!memcmp (evt_data.bd_addr, btm_cb.connecting_bda, BD_ADDR_LEN))
memcpy (p_dev_rec->dev_class, btm_cb.connecting_dc, DEV_CLASS_LEN);
@@ -3683,7 +3683,7 @@ void btm_sec_auth_complete (UINT16 handle, UINT8 status)
&& (old_state != BTM_PAIR_STATE_IDLE) )
{
(*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr,
- p_dev_rec->dev_class,
+ p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, status);
}
return;
@@ -3943,7 +3943,7 @@ static void btm_sec_connect_after_reject_timeout (TIMER_LIST_ENT *p_tle)
btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, HCI_ERR_MEMORY_FULL);
}
}
@@ -4107,8 +4107,8 @@ void btm_sec_connected (UINT8 *bda, UINT16 handle, UINT8 status, UINT8 enc_mode)
/* We need to notify host that the key is not known any more */
if (btm_cb.api.p_auth_complete_callback)
{
- (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr,
- p_dev_rec->dev_class,
+ (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr,
+ p_dev_rec->dev_class,
p_dev_rec->sec_bd_name, status);
}
}
@@ -4326,7 +4326,7 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason)
return;
#if BTM_DISC_DURING_RS == TRUE
- BTM_TRACE_ERROR0("btm_sec_disconnected - Clearing Pending flag");
+ BTM_TRACE_ERROR0("btm_sec_disconnected - Clearing Pending flag");
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
#endif
@@ -4485,7 +4485,7 @@ void btm_sec_link_key_request (UINT8 *p_bda)
btsnd_hcic_link_key_req_reply (p_bda, p_dev_rec->link_key);
return;
}
-
+
/* Notify L2CAP to increase timeout */
l2c_pin_code_request (p_bda);
@@ -4654,7 +4654,7 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
if (btm_cb.pairing_state != BTM_PAIR_STATE_IDLE)
{
- if ( (memcmp (p_bda, btm_cb.pairing_bda, BD_ADDR_LEN) == 0) &&
+ if ( (memcmp (p_bda, btm_cb.pairing_bda, BD_ADDR_LEN) == 0) &&
(btm_cb.pairing_state == BTM_PAIR_STATE_WAIT_AUTH_COMPLETE) )
{
/* fake this out - porshe carkit issue - */
@@ -4727,7 +4727,7 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
BTM_TRACE_EVENT0 ("btm_sec_pin_code_request bonding sending reply");
btsnd_hcic_pin_code_req_reply (p_bda, btm_cb.pin_code_len, p_cb->pin_code);
-#ifdef PORCHE_PAIRING_CONFLICT
+#ifdef PORCHE_PAIRING_CONFLICT
btm_cb.pin_code_len_saved = btm_cb.pin_code_len;
#endif
@@ -5189,7 +5189,7 @@ static tBTM_SEC_SERV_REC *btm_sec_find_mx_serv (UINT8 is_originator, UINT16 psm,
for (i = 0; i < BTM_SEC_MAX_SERVICE_RECORDS; i++, p_serv_rec++)
{
if ((p_serv_rec->security_flags & BTM_SEC_IN_USE)
- && (p_serv_rec->psm == psm)
+ && (p_serv_rec->psm == psm)
&& (p_serv_rec->mx_proto_id == mx_proto_id)
&& (( is_originator && (p_serv_rec->orig_mx_chan_id == mx_chan_id))
|| (!is_originator && (p_serv_rec->term_mx_chan_id == mx_chan_id))))
@@ -5583,7 +5583,7 @@ void btm_sec_clear_ble_keys (tBTM_SEC_DEV_REC *p_dev_rec)
BOOLEAN btm_sec_is_a_bonded_dev (BD_ADDR bda)
{
- tBTM_SEC_DEV_REC *p_dev_rec= btm_find_dev (bda);
+ tBTM_SEC_DEV_REC *p_dev_rec= btm_find_dev (bda);
BOOLEAN is_bonded= FALSE;
#if (SMP_INCLUDED== TRUE)
@@ -5600,7 +5600,7 @@ BOOLEAN btm_sec_is_a_bonded_dev (BD_ADDR bda)
**
** Function btm_sec_find_bonded_dev
**
-** Description Find a bonded device starting from the specified index
+** Description Find a bonded device starting from the specified index
**
** Returns TRUE - found a bonded device
**
@@ -5610,7 +5610,7 @@ BOOLEAN btm_sec_find_bonded_dev (UINT8 start_idx, UINT8 *p_found_idx, tBTM_SEC_D
BOOLEAN found= FALSE;
#if (SMP_INCLUDED== TRUE)
- tBTM_SEC_DEV_REC *p_dev_rec;
+ tBTM_SEC_DEV_REC *p_dev_rec;
int i;
if (start_idx >= BTM_SEC_MAX_DEVICE_RECORDS)
{
@@ -5623,9 +5623,9 @@ BOOLEAN btm_sec_find_bonded_dev (UINT8 start_idx, UINT8 *p_found_idx, tBTM_SEC_D
{
if (p_dev_rec->ble.key_type || (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN))
{
- *p_found_idx = i;
+ *p_found_idx = i;
p_rec = p_dev_rec;
- break;
+ break;
}
}
BTM_TRACE_DEBUG1 ("btm_sec_find_bonded_dev=%d", found);
diff --git a/stack/btu/btu_hcif.c b/stack/btu/btu_hcif.c
index 5a972c0..1ee6b94 100644
--- a/stack/btu/btu_hcif.c
+++ b/stack/btu/btu_hcif.c
@@ -160,7 +160,7 @@ static void btu_hcif_store_cmd (UINT8 controller_id, BT_HDR *p_buf)
/* If vendor specific save the callback function */
if ((opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
#if BLE_INCLUDED == TRUE
- || (opcode == HCI_BLE_RAND )
+ || (opcode == HCI_BLE_RAND )
|| (opcode == HCI_BLE_ENCRYPT)
#endif
)
@@ -386,17 +386,17 @@ void btu_hcif_process_event (UINT8 controller_id, BT_HDR *p_msg)
case HCI_BLE_ADV_PKT_RPT_EVT: /* result of inquiry */
btu_ble_process_adv_pkt(p, hci_evt_len);
break;
- case HCI_BLE_CONN_COMPLETE_EVT:
+ case HCI_BLE_CONN_COMPLETE_EVT:
btu_ble_ll_conn_complete_evt(p, hci_evt_len);
break;
case HCI_BLE_LL_CONN_PARAM_UPD_EVT:
- btu_ble_ll_conn_param_upd_evt(p, hci_evt_len);
+ btu_ble_ll_conn_param_upd_evt(p, hci_evt_len);
break;
case HCI_BLE_READ_REMOTE_FEAT_CMPL_EVT:
- btu_ble_read_remote_feat_evt(p, hci_evt_len);
+ btu_ble_read_remote_feat_evt(p, hci_evt_len);
break;
case HCI_BLE_LTK_REQ_EVT: /* received only at slave device */
- btu_ble_proc_ltk_req(p, hci_evt_len);
+ btu_ble_proc_ltk_req(p, hci_evt_len);
break;
}
break;
@@ -437,7 +437,7 @@ void btu_hcif_send_cmd (UINT8 controller_id, BT_HDR *p_buf)
/* Allow for startup case, where no acks may be received */
if ( ((controller_id == LOCAL_BR_EDR_CONTROLLER_ID)
- && (p_hci_cmd_cb->cmd_window == 0)
+ && (p_hci_cmd_cb->cmd_window == 0)
&& (btm_cb.devcb.state == BTM_DEV_STATE_WAIT_RESET_CMPLT)) )
{
p_hci_cmd_cb->cmd_window = p_hci_cmd_cb->cmd_xmit_q.count + 1;
@@ -528,9 +528,9 @@ void btu_hcif_send_host_rdy_for_data(void)
/*******************************************************************************
**
-** Function btu_hcif_inquiry_comp_evt
+** Function btu_hcif_inquiry_comp_evt
**
-** Description Process event HCI_INQUIRY_COMP_EVT
+** Description Process event HCI_INQUIRY_COMP_EVT
**
** Returns void
**
@@ -548,9 +548,9 @@ static void btu_hcif_inquiry_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_inquiry_result_evt
+** Function btu_hcif_inquiry_result_evt
**
-** Description Process event HCI_INQUIRY_RESULT_EVT
+** Description Process event HCI_INQUIRY_RESULT_EVT
**
** Returns void
**
@@ -563,9 +563,9 @@ static void btu_hcif_inquiry_result_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_inquiry_rssi_result_evt
+** Function btu_hcif_inquiry_rssi_result_evt
**
-** Description Process event HCI_INQUIRY_RSSI_RESULT_EVT
+** Description Process event HCI_INQUIRY_RSSI_RESULT_EVT
**
** Returns void
**
@@ -578,9 +578,9 @@ static void btu_hcif_inquiry_rssi_result_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_extended_inquiry_result_evt
+** Function btu_hcif_extended_inquiry_result_evt
**
-** Description Process event HCI_EXTENDED_INQUIRY_RESULT_EVT
+** Description Process event HCI_EXTENDED_INQUIRY_RESULT_EVT
**
** Returns void
**
@@ -595,9 +595,9 @@ static void btu_hcif_extended_inquiry_result_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_connection_comp_evt
+** Function btu_hcif_connection_comp_evt
**
-** Description Process event HCI_CONNECTION_COMP_EVT
+** Description Process event HCI_CONNECTION_COMP_EVT
**
** Returns void
**
@@ -635,15 +635,15 @@ static void btu_hcif_connection_comp_evt (UINT8 *p, UINT16 evt_len)
memcpy (esco_data.bd_addr, bda, BD_ADDR_LEN);
btm_sco_connected (status, bda, handle, &esco_data);
}
-#endif /* BTM_SCO_INCLUDED */
+#endif /* BTM_SCO_INCLUDED */
}
/*******************************************************************************
**
-** Function btu_hcif_connection_request_evt
+** Function btu_hcif_connection_request_evt
**
-** Description Process event HCI_CONNECTION_REQUEST_EVT
+** Description Process event HCI_CONNECTION_REQUEST_EVT
**
** Returns void
**
@@ -675,9 +675,9 @@ static void btu_hcif_connection_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_disconnection_comp_evt
+** Function btu_hcif_disconnection_comp_evt
**
-** Description Process event HCI_DISCONNECTION_COMP_EVT
+** Description Process event HCI_DISCONNECTION_COMP_EVT
**
** Returns void
**
@@ -708,9 +708,9 @@ static void btu_hcif_disconnection_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_authentication_comp_evt
+** Function btu_hcif_authentication_comp_evt
**
-** Description Process event HCI_AUTHENTICATION_COMP_EVT
+** Description Process event HCI_AUTHENTICATION_COMP_EVT
**
** Returns void
**
@@ -729,9 +729,9 @@ static void btu_hcif_authentication_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_rmt_name_request_comp_evt
+** Function btu_hcif_rmt_name_request_comp_evt
**
-** Description Process event HCI_RMT_NAME_REQUEST_COMP_EVT
+** Description Process event HCI_RMT_NAME_REQUEST_COMP_EVT
**
** Returns void
**
@@ -754,9 +754,9 @@ static void btu_hcif_rmt_name_request_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_encryption_change_evt
+** Function btu_hcif_encryption_change_evt
**
-** Description Process event HCI_ENCRYPTION_CHANGE_EVT
+** Description Process event HCI_ENCRYPTION_CHANGE_EVT
**
** Returns void
**
@@ -778,9 +778,9 @@ static void btu_hcif_encryption_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_change_conn_link_key_evt
+** Function btu_hcif_change_conn_link_key_evt
**
-** Description Process event HCI_CHANGE_CONN_LINK_KEY_EVT
+** Description Process event HCI_CHANGE_CONN_LINK_KEY_EVT
**
** Returns void
**
@@ -799,9 +799,9 @@ static void btu_hcif_change_conn_link_key_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_master_link_key_comp_evt
+** Function btu_hcif_master_link_key_comp_evt
**
-** Description Process event HCI_MASTER_LINK_KEY_COMP_EVT
+** Description Process event HCI_MASTER_LINK_KEY_COMP_EVT
**
** Returns void
**
@@ -822,9 +822,9 @@ static void btu_hcif_master_link_key_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_rmt_features_comp_evt
+** Function btu_hcif_read_rmt_features_comp_evt
**
-** Description Process event HCI_READ_RMT_FEATURES_COMP_EVT
+** Description Process event HCI_READ_RMT_FEATURES_COMP_EVT
**
** Returns void
**
@@ -836,9 +836,9 @@ static void btu_hcif_read_rmt_features_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_rmt_ext_features_comp_evt
+** Function btu_hcif_read_rmt_ext_features_comp_evt
**
-** Description Process event HCI_READ_RMT_EXT_FEATURES_COMP_EVT
+** Description Process event HCI_READ_RMT_EXT_FEATURES_COMP_EVT
**
** Returns void
**
@@ -854,9 +854,9 @@ static void btu_hcif_read_rmt_ext_features_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_rmt_version_comp_evt
+** Function btu_hcif_read_rmt_version_comp_evt
**
-** Description Process event HCI_READ_RMT_VERSION_COMP_EVT
+** Description Process event HCI_READ_RMT_VERSION_COMP_EVT
**
** Returns void
**
@@ -869,9 +869,9 @@ static void btu_hcif_read_rmt_version_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_qos_setup_comp_evt
+** Function btu_hcif_qos_setup_comp_evt
**
-** Description Process event HCI_QOS_SETUP_COMP_EVT
+** Description Process event HCI_QOS_SETUP_COMP_EVT
**
** Returns void
**
@@ -897,9 +897,9 @@ static void btu_hcif_qos_setup_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_esco_connection_comp_evt
+** Function btu_hcif_esco_connection_comp_evt
**
-** Description Process event HCI_ESCO_CONNECTION_COMP_EVT
+** Description Process event HCI_ESCO_CONNECTION_COMP_EVT
**
** Returns void
**
@@ -931,9 +931,9 @@ static void btu_hcif_esco_connection_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_esco_connection_chg_evt
+** Function btu_hcif_esco_connection_chg_evt
**
-** Description Process event HCI_ESCO_CONNECTION_CHANGED_EVT
+** Description Process event HCI_ESCO_CONNECTION_CHANGED_EVT
**
** Returns void
**
@@ -964,9 +964,9 @@ static void btu_hcif_esco_connection_chg_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_hdl_command_complete
+** Function btu_hcif_hdl_command_complete
**
-** Description Handle command complete event
+** Description Handle command complete event
**
** Returns void
**
@@ -1057,11 +1057,11 @@ static void btu_hcif_hdl_command_complete (UINT16 opcode, UINT8 *p, UINT16 evt_l
btm_read_white_list_size_complete(p, evt_len);
break;
- case HCI_BLE_ADD_WHITE_LIST:
+ case HCI_BLE_ADD_WHITE_LIST:
btm_ble_add_2_white_list_complete(p, evt_len);
break;
- case HCI_BLE_CLEAR_WHITE_LIST:
+ case HCI_BLE_CLEAR_WHITE_LIST:
btm_ble_clear_white_list_complete(p, evt_len);
break;
@@ -1097,9 +1097,9 @@ static void btu_hcif_hdl_command_complete (UINT16 opcode, UINT8 *p, UINT16 evt_l
/*******************************************************************************
**
-** Function btu_hcif_command_complete_evt
+** Function btu_hcif_command_complete_evt
**
-** Description Process event HCI_COMMAND_COMPLETE_EVT
+** Description Process event HCI_COMMAND_COMPLETE_EVT
**
** Returns void
**
@@ -1128,7 +1128,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
{
/* dequeue and free stored command */
-/* always use cmd code check, when one cmd timeout waiting for cmd_cmpl,
+/* always use cmd code check, when one cmd timeout waiting for cmd_cmpl,
it'll cause the rest of the command goes in wrong order */
p_cmd = (BT_HDR *) GKI_getfirst (&p_hci_cmd_cb->cmd_cmpl_q);
@@ -1152,7 +1152,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
/* If command was a VSC, then extract command_complete callback */
if ((cc_opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
#if BLE_INCLUDED == TRUE
- || (cc_opcode == HCI_BLE_RAND )
+ || (cc_opcode == HCI_BLE_RAND )
|| (cc_opcode == HCI_BLE_ENCRYPT)
#endif
)
@@ -1173,7 +1173,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
#if (defined(BTU_CMD_CMPL_TOUT_DOUBLE_CHECK) && BTU_CMD_CMPL_TOUT_DOUBLE_CHECK == TRUE)
p_hci_cmd_cb->checked_hcisu = FALSE;
#endif
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
BTU_CMD_CMPL_TIMEOUT);
}
@@ -1196,7 +1196,7 @@ static void btu_hcif_command_complete_evt (UINT8 controller_id, UINT8 *p, UINT16
**
** Function btu_hcif_hdl_command_status
**
-** Description Handle a command status event
+** Description Handle a command status event
**
** Returns void
**
@@ -1281,7 +1281,7 @@ static void btu_hcif_hdl_command_status (UINT16 opcode, UINT8 status, UINT8 *p_c
btm_acl_role_changed(status, bd_addr, BTM_ROLE_UNDEFINED);
}
else
- btm_acl_role_changed(status, NULL, BTM_ROLE_UNDEFINED);
+ btm_acl_role_changed(status, NULL, BTM_ROLE_UNDEFINED);
l2c_link_role_changed (NULL, BTM_ROLE_UNDEFINED, HCI_ERR_COMMAND_DISALLOWED);
break;
@@ -1354,9 +1354,9 @@ static void btu_hcif_hdl_command_status (UINT16 opcode, UINT8 status, UINT8 *p_c
/*******************************************************************************
**
-** Function btu_hcif_command_status_evt
+** Function btu_hcif_command_status_evt
**
-** Description Process event HCI_COMMAND_STATUS_EVT
+** Description Process event HCI_COMMAND_STATUS_EVT
**
** Returns void
**
@@ -1413,7 +1413,7 @@ static void btu_hcif_command_status_evt (UINT8 controller_id, UINT8 *p, UINT16 e
#if (defined(BTU_CMD_CMPL_TOUT_DOUBLE_CHECK) && BTU_CMD_CMPL_TOUT_DOUBLE_CHECK == TRUE)
p_hci_cmd_cb->checked_hcisu = FALSE;
#endif
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
BTU_CMD_CMPL_TIMEOUT);
}
@@ -1439,7 +1439,7 @@ static void btu_hcif_command_status_evt (UINT8 controller_id, UINT8 *p, UINT16 e
/*******************************************************************************
**
-** Function btu_hcif_cmd_timeout
+** Function btu_hcif_cmd_timeout
**
** Description Handle a command timeout
**
@@ -1465,7 +1465,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
/* trigger HCISU to read any pending data in transport buffer */
GKI_send_event(HCISU_TASK, HCISU_EVT_MASK);
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
2); /* start short timer, if timer is set to 1 then it could expire before HCISU checks. */
@@ -1494,7 +1494,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
#if (defined(BTU_CMD_CMPL_TOUT_DOUBLE_CHECK) && BTU_CMD_CMPL_TOUT_DOUBLE_CHECK == TRUE)
p_hci_cmd_cb->checked_hcisu = FALSE;
#endif
- btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
+ btu_start_timer (&(p_hci_cmd_cb->cmd_cmpl_timer),
(UINT16)(BTU_TTYPE_BTU_CMD_CMPL + controller_id),
BTU_CMD_CMPL_TIMEOUT);
}
@@ -1519,7 +1519,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
ALOGE("#");
ALOGE("# WARNING : BTU HCI(id=%d) command timeout. opcode=0x%x", controller_id, opcode);
ALOGE("#");
- ALOGE("######################################################################");
+ ALOGE("######################################################################");
#else
BT_TRACE_2 (TRACE_LAYER_HCI, TRACE_TYPE_WARNING, "BTU HCI(id=%d) command timeout. opcode=0x%x", controller_id, opcode);
#endif
@@ -1553,7 +1553,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
default:
/* If vendor specific restore the callback function */
- if ((opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
+ if ((opcode & HCI_GRP_VENDOR_SPECIFIC) == HCI_GRP_VENDOR_SPECIFIC
#if BLE_INCLUDED == TRUE
|| (opcode == HCI_BLE_RAND ) ||
(opcode == HCI_BLE_ENCRYPT)
@@ -1573,7 +1573,7 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
event = HCI_ERR_UNSPECIFIED;
btu_hcif_hdl_command_complete (opcode, (UINT8 *)&event, 1, p_cplt_cback, controller_id);
// btla-specific --
- break;
+ break;
}
/* free stored command */
@@ -1588,9 +1588,9 @@ void btu_hcif_cmd_timeout (UINT8 controller_id)
/*******************************************************************************
**
-** Function btu_hcif_hardware_error_evt
+** Function btu_hcif_hardware_error_evt
**
-** Description Process event HCI_HARDWARE_ERROR_EVT
+** Description Process event HCI_HARDWARE_ERROR_EVT
**
** Returns void
**
@@ -1610,9 +1610,9 @@ static void btu_hcif_hardware_error_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_flush_occured_evt
+** Function btu_hcif_flush_occured_evt
**
-** Description Process event HCI_FLUSH_OCCURED_EVT
+** Description Process event HCI_FLUSH_OCCURED_EVT
**
** Returns void
**
@@ -1624,9 +1624,9 @@ static void btu_hcif_flush_occured_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_role_change_evt
+** Function btu_hcif_role_change_evt
**
-** Description Process event HCI_ROLE_CHANGE_EVT
+** Description Process event HCI_ROLE_CHANGE_EVT
**
** Returns void
**
@@ -1648,9 +1648,9 @@ static void btu_hcif_role_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_num_compl_data_pkts_evt
+** Function btu_hcif_num_compl_data_pkts_evt
**
-** Description Process event HCI_NUM_COMPL_DATA_PKTS_EVT
+** Description Process event HCI_NUM_COMPL_DATA_PKTS_EVT
**
** Returns void
**
@@ -1666,9 +1666,9 @@ static void btu_hcif_num_compl_data_pkts_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_mode_change_evt
+** Function btu_hcif_mode_change_evt
**
-** Description Process event HCI_MODE_CHANGE_EVT
+** Description Process event HCI_MODE_CHANGE_EVT
**
** Returns void
**
@@ -1701,9 +1701,9 @@ static void btu_hcif_mode_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_ssr_evt
+** Function btu_hcif_ssr_evt
**
-** Description Process event HCI_SNIFF_SUB_RATE_EVT
+** Description Process event HCI_SNIFF_SUB_RATE_EVT
**
** Returns void
**
@@ -1720,9 +1720,9 @@ static void btu_hcif_ssr_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_return_link_keys_evt
+** Function btu_hcif_return_link_keys_evt
**
-** Description Process event HCI_RETURN_LINK_KEYS_EVT
+** Description Process event HCI_RETURN_LINK_KEYS_EVT
**
** Returns void
**
@@ -1751,9 +1751,9 @@ static void btu_hcif_return_link_keys_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_pin_code_request_evt
+** Function btu_hcif_pin_code_request_evt
**
-** Description Process event HCI_PIN_CODE_REQUEST_EVT
+** Description Process event HCI_PIN_CODE_REQUEST_EVT
**
** Returns void
**
@@ -1774,9 +1774,9 @@ static void btu_hcif_pin_code_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_link_key_request_evt
+** Function btu_hcif_link_key_request_evt
**
-** Description Process event HCI_LINK_KEY_REQUEST_EVT
+** Description Process event HCI_LINK_KEY_REQUEST_EVT
**
** Returns void
**
@@ -1792,9 +1792,9 @@ static void btu_hcif_link_key_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_link_key_notification_evt
+** Function btu_hcif_link_key_notification_evt
**
-** Description Process event HCI_LINK_KEY_NOTIFICATION_EVT
+** Description Process event HCI_LINK_KEY_NOTIFICATION_EVT
**
** Returns void
**
@@ -1815,9 +1815,9 @@ static void btu_hcif_link_key_notification_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_loopback_command_evt
+** Function btu_hcif_loopback_command_evt
**
-** Description Process event HCI_LOOPBACK_COMMAND_EVT
+** Description Process event HCI_LOOPBACK_COMMAND_EVT
**
** Returns void
**
@@ -1829,9 +1829,9 @@ static void btu_hcif_loopback_command_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_data_buf_overflow_evt
+** Function btu_hcif_data_buf_overflow_evt
**
-** Description Process event HCI_DATA_BUF_OVERFLOW_EVT
+** Description Process event HCI_DATA_BUF_OVERFLOW_EVT
**
** Returns void
**
@@ -1843,9 +1843,9 @@ static void btu_hcif_data_buf_overflow_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_max_slots_changed_evt
+** Function btu_hcif_max_slots_changed_evt
**
-** Description Process event HCI_MAX_SLOTS_CHANGED_EVT
+** Description Process event HCI_MAX_SLOTS_CHANGED_EVT
**
** Returns void
**
@@ -1857,9 +1857,9 @@ static void btu_hcif_max_slots_changed_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_read_clock_off_comp_evt
+** Function btu_hcif_read_clock_off_comp_evt
**
-** Description Process event HCI_READ_CLOCK_OFF_COMP_EVT
+** Description Process event HCI_READ_CLOCK_OFF_COMP_EVT
**
** Returns void
**
@@ -1888,9 +1888,9 @@ static void btu_hcif_read_clock_off_comp_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_conn_pkt_type_change_evt
+** Function btu_hcif_conn_pkt_type_change_evt
**
-** Description Process event HCI_CONN_PKT_TYPE_CHANGE_EVT
+** Description Process event HCI_CONN_PKT_TYPE_CHANGE_EVT
**
** Returns void
**
@@ -1902,9 +1902,9 @@ static void btu_hcif_conn_pkt_type_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_qos_violation_evt
+** Function btu_hcif_qos_violation_evt
**
-** Description Process event HCI_QOS_VIOLATION_EVT
+** Description Process event HCI_QOS_VIOLATION_EVT
**
** Returns void
**
@@ -1924,9 +1924,9 @@ static void btu_hcif_qos_violation_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_page_scan_mode_change_evt
+** Function btu_hcif_page_scan_mode_change_evt
**
-** Description Process event HCI_PAGE_SCAN_MODE_CHANGE_EVT
+** Description Process event HCI_PAGE_SCAN_MODE_CHANGE_EVT
**
** Returns void
**
@@ -1938,9 +1938,9 @@ static void btu_hcif_page_scan_mode_change_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_page_scan_rep_mode_chng_evt
+** Function btu_hcif_page_scan_rep_mode_chng_evt
**
-** Description Process event HCI_PAGE_SCAN_REP_MODE_CHNG_EVT
+** Description Process event HCI_PAGE_SCAN_REP_MODE_CHNG_EVT
**
** Returns void
**
@@ -1955,9 +1955,9 @@ static void btu_hcif_page_scan_rep_mode_chng_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_host_support_evt
+** Function btu_hcif_host_support_evt
**
-** Description Process event HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT
+** Description Process event HCI_RMT_HOST_SUP_FEAT_NOTIFY_EVT
**
** Returns void
**
@@ -1969,9 +1969,9 @@ static void btu_hcif_host_support_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_io_cap_request_evt
+** Function btu_hcif_io_cap_request_evt
**
-** Description Process event HCI_IO_CAPABILITY_REQUEST_EVT
+** Description Process event HCI_IO_CAPABILITY_REQUEST_EVT
**
** Returns void
**
@@ -1984,9 +1984,9 @@ static void btu_hcif_io_cap_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_io_cap_response_evt
+** Function btu_hcif_io_cap_response_evt
**
-** Description Process event HCI_IO_CAPABILITY_RESPONSE_EVT
+** Description Process event HCI_IO_CAPABILITY_RESPONSE_EVT
**
** Returns void
**
@@ -1999,9 +1999,9 @@ static void btu_hcif_io_cap_response_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_user_conf_request_evt
+** Function btu_hcif_user_conf_request_evt
**
-** Description Process event HCI_USER_CONFIRMATION_REQUEST_EVT
+** Description Process event HCI_USER_CONFIRMATION_REQUEST_EVT
**
** Returns void
**
@@ -2014,9 +2014,9 @@ static void btu_hcif_user_conf_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_user_passkey_request_evt
+** Function btu_hcif_user_passkey_request_evt
**
-** Description Process event HCI_USER_PASSKEY_REQUEST_EVT
+** Description Process event HCI_USER_PASSKEY_REQUEST_EVT
**
** Returns void
**
@@ -2028,9 +2028,9 @@ static void btu_hcif_user_passkey_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_user_passkey_notif_evt
+** Function btu_hcif_user_passkey_notif_evt
**
-** Description Process event HCI_USER_PASSKEY_NOTIFY_EVT
+** Description Process event HCI_USER_PASSKEY_NOTIFY_EVT
**
** Returns void
**
@@ -2042,9 +2042,9 @@ static void btu_hcif_user_passkey_notif_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_keypress_notif_evt
+** Function btu_hcif_keypress_notif_evt
**
-** Description Process event HCI_KEYPRESS_NOTIFY_EVT
+** Description Process event HCI_KEYPRESS_NOTIFY_EVT
**
** Returns void
**
@@ -2056,9 +2056,9 @@ static void btu_hcif_keypress_notif_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_link_super_tout_evt
+** Function btu_hcif_link_super_tout_evt
**
-** Description Process event HCI_LINK_SUPER_TOUT_CHANGED_EVT
+** Description Process event HCI_LINK_SUPER_TOUT_CHANGED_EVT
**
** Returns void
**
@@ -2074,9 +2074,9 @@ static void btu_hcif_link_super_tout_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_rem_oob_request_evt
+** Function btu_hcif_rem_oob_request_evt
**
-** Description Process event HCI_REMOTE_OOB_DATA_REQUEST_EVT
+** Description Process event HCI_REMOTE_OOB_DATA_REQUEST_EVT
**
** Returns void
**
@@ -2090,9 +2090,9 @@ static void btu_hcif_rem_oob_request_evt (UINT8 *p, UINT16 evt_len)
/*******************************************************************************
**
-** Function btu_hcif_simple_pair_complete_evt
+** Function btu_hcif_simple_pair_complete_evt
**
-** Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
+** Description Process event HCI_SIMPLE_PAIRING_COMPLETE_EVT
**
** Returns void
**
@@ -2103,7 +2103,7 @@ static void btu_hcif_simple_pair_complete_evt (UINT8 *p, UINT16 evt_len)
}
/*******************************************************************************
**
-** Function btu_hcif_flush_cmd_queue
+** Function btu_hcif_flush_cmd_queue
**
** Description Flush the HCI command complete queue and transmit queue when
** needed.
@@ -2111,11 +2111,11 @@ static void btu_hcif_simple_pair_complete_evt (UINT8 *p, UINT16 evt_len)
** Returns void
**
*******************************************************************************/
-void btu_hcif_flush_cmd_queue(void)
-{
- BT_HDR *p_cmd;
+void btu_hcif_flush_cmd_queue(void)
+{
+ BT_HDR *p_cmd;
- btu_cb.hci_cmd_cb[0].cmd_window = 0;
+ btu_cb.hci_cmd_cb[0].cmd_window = 0;
while ((p_cmd = (BT_HDR *) GKI_dequeue (&btu_cb.hci_cmd_cb[0].cmd_cmpl_q)) != NULL)
{
GKI_freebuf (p_cmd);
@@ -2128,9 +2128,9 @@ void btu_hcif_flush_cmd_queue(void)
/*******************************************************************************
**
-** Function btu_hcif_enhanced_flush_complete_evt
+** Function btu_hcif_enhanced_flush_complete_evt
**
-** Description Process event HCI_ENHANCED_FLUSH_COMPLETE_EVT
+** Description Process event HCI_ENHANCED_FLUSH_COMPLETE_EVT
**
** Returns void
**
@@ -2192,7 +2192,7 @@ static void btu_ble_ll_conn_complete_evt ( UINT8 *p, UINT16 evt_len)
{
btm_ble_connected(bda, handle, HCI_ENCRYPT_MODE_DISABLED, role);
- l2cble_conn_comp (handle, role, bda, bda_type, conn_interval,
+ l2cble_conn_comp (handle, role, bda, bda_type, conn_interval,
conn_latency, conn_timeout);
}
else
@@ -2227,12 +2227,12 @@ static void btu_ble_read_remote_feat_evt (UINT8 *p, UINT16 evt_len)
static void btu_ble_proc_ltk_req (UINT8 *p, UINT16 evt_len)
{
- UINT16 ediv, handle;
+ UINT16 ediv, handle;
UINT8 *pp;
- STREAM_TO_UINT16(handle, p);
+ STREAM_TO_UINT16(handle, p);
pp = p + 8;
- STREAM_TO_UINT16(ediv, pp);
+ STREAM_TO_UINT16(ediv, pp);
#if SMP_INCLUDED == TRUE
btm_ble_ltk_request(handle, p, ediv);
#endif
diff --git a/stack/btu/btu_init.c b/stack/btu/btu_init.c
index f21aaa4..a153ed8 100644
--- a/stack/btu/btu_init.c
+++ b/stack/btu/btu_init.c
@@ -127,7 +127,7 @@ UINT16 BTU_BleAclPktSize(void)
**
** Function btu_uipc_rx_cback
**
-** Description
+** Description
**
**
** Returns void
@@ -135,9 +135,9 @@ UINT16 BTU_BleAclPktSize(void)
*******************************************************************************/
void btu_uipc_rx_cback(BT_HDR *p_msg)
{
- BT_TRACE_3 (TRACE_LAYER_BTM, TRACE_TYPE_DEBUG, "btu_uipc_rx_cback event 0x%x, len %d, offset %d",
+ BT_TRACE_3 (TRACE_LAYER_BTM, TRACE_TYPE_DEBUG, "btu_uipc_rx_cback event 0x%x, len %d, offset %d",
p_msg->event, p_msg->len, p_msg->offset);
GKI_send_msg(BTU_TASK, BTU_HCI_RCV_MBOX, p_msg);
-
+
}
diff --git a/stack/btu/btu_task.c b/stack/btu/btu_task.c
index 291e149..5753154 100644
--- a/stack/btu/btu_task.c
+++ b/stack/btu/btu_task.c
@@ -51,7 +51,7 @@
#include "bip_int.h"
#endif /* BIP */
-#if (BPP_SND_INCLUDED == TRUE || BPP_INCLUDED == TRUE)
+#if (BPP_SND_INCLUDED == TRUE || BPP_INCLUDED == TRUE)
#include "bpp_int.h"
#endif /* BPP */
@@ -114,7 +114,7 @@ extern void avdt_rcv_sync_info (BT_HDR *p_buf); /* this is for hci_test */
#endif
#ifdef __cplusplus
-extern "C"
+extern "C"
{
#endif
@@ -157,7 +157,7 @@ BTU_API UINT32 btu_task (UINT32 param)
/* wait an event that HCISU is ready */
GKI_wait(0xFFFF, 0);
#endif
- /* Initialize the mandatory core stack control blocks
+ /* Initialize the mandatory core stack control blocks
(BTU, BTM, L2CAP, and SDP)
*/
btu_init_core();
@@ -206,7 +206,7 @@ BTU_API UINT32 btu_task (UINT32 param)
#if BTM_SCO_INCLUDED == TRUE
btm_route_sco_data (p_msg);
break;
-#endif
+#endif
case BT_EVT_TO_BTU_HCI_EVT:
btu_hcif_process_event ((UINT8)(p_msg->event & BT_SUB_EVT_MASK), p_msg);
@@ -431,7 +431,7 @@ BTU_API UINT32 btu_task (UINT32 param)
case BTU_TTYPE_ATT_WAIT_FOR_RSP:
gatt_rsp_timeout(p_tle);
break;
-
+
case BTU_TTYPE_ATT_WAIT_FOR_IND_ACK:
gatt_ind_ack_timeout(p_tle);
break;
@@ -806,7 +806,7 @@ void btu_deregister_event_range (UINT16 range)
*******************************************************************************/
void btu_check_bt_sleep (void)
{
- if ((btu_cb.hci_cmd_cb[LOCAL_BR_EDR_CONTROLLER_ID].cmd_cmpl_q.count == 0)
+ if ((btu_cb.hci_cmd_cb[LOCAL_BR_EDR_CONTROLLER_ID].cmd_cmpl_q.count == 0)
&&(btu_cb.hci_cmd_cb[LOCAL_BR_EDR_CONTROLLER_ID].cmd_xmit_q.count == 0))
{
if (l2cb.controller_xmit_window == l2cb.num_lm_acl_bufs)
diff --git a/stack/gatt/att_protocol.c b/stack/gatt/att_protocol.c
index 2f3a196..f3c3a28 100644
--- a/stack/gatt/att_protocol.c
+++ b/stack/gatt/att_protocol.c
@@ -10,7 +10,7 @@
******************************************************************************/
#include "bt_target.h"
-
+
#if BLE_INCLUDED == TRUE
#include "gatt_int.h"
@@ -43,7 +43,7 @@ BT_HDR *attp_build_mtu_cmd(UINT8 op_code, UINT16 rx_mtu)
UINT16_TO_STREAM (p, rx_mtu);
p_buf->offset = L2CAP_MIN_OFFSET;
- p_buf->len = GATT_HDR_SIZE; /* opcode + 2 bytes mtu */
+ p_buf->len = GATT_HDR_SIZE; /* opcode + 2 bytes mtu */
}
return p_buf;
}
@@ -103,7 +103,7 @@ BT_HDR *attp_build_err_cmd(UINT8 cmd_code, UINT16 err_handle, UINT8 reason)
UINT8_TO_STREAM (p, GATT_RSP_ERROR);
UINT8_TO_STREAM (p, cmd_code);
UINT16_TO_STREAM(p, err_handle);
- UINT8_TO_STREAM (p, reason);
+ UINT8_TO_STREAM (p, reason);
p_buf->offset = L2CAP_MIN_OFFSET;
/* GATT_HDR_SIZE (1B ERR_RSP op code+ 2B handle) + 1B cmd_op_code + 1B status */
@@ -153,7 +153,7 @@ BT_HDR *attp_build_read_handles_cmd (UINT16 payload_size, tGATT_FIND_TYPE_VALUE
{
BT_HDR *p_buf = NULL;
UINT8 *p;
- UINT16 len = p_value_type->value_len;
+ UINT16 len = p_value_type->value_len;
if ((p_buf = (BT_HDR *)GKI_getbuf((UINT16)(sizeof(BT_HDR) + payload_size + L2CAP_MIN_OFFSET))) != NULL)
{
@@ -199,7 +199,7 @@ BT_HDR *attp_build_read_multi_cmd(UINT16 payload_size, UINT16 num_handle, UINT16
p_buf->len = 1;
UINT8_TO_STREAM (p, GATT_REQ_READ_MULTI);
-
+
for (i = 0; i < num_handle && p_buf->len + 2 <= payload_size; i ++)
{
UINT16_TO_STREAM (p, *(p_handle + i));
@@ -239,7 +239,7 @@ BT_HDR *attp_build_handle_cmd(UINT8 op_code, UINT16 handle, UINT16 offset)
{
UINT16_TO_STREAM (p, offset);
p_buf->len += 2;
- }
+ }
}
@@ -279,7 +279,7 @@ BT_HDR *attp_build_opcode_cmd(UINT8 op_code)
** Returns None.
**
*******************************************************************************/
-BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
+BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
UINT16 offset, UINT16 len, UINT8 *p_data)
{
BT_HDR *p_buf = NULL;
@@ -298,12 +298,12 @@ BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
p_pair_len = p;
pair_len = len + 2;
UINT8_TO_STREAM (p, pair_len);
- p_buf->len += 1;
+ p_buf->len += 1;
}
if (op_code != GATT_RSP_READ_BLOB && op_code != GATT_RSP_READ)
{
UINT16_TO_STREAM (p, handle);
- p_buf->len += 2;
+ p_buf->len += 2;
}
if (op_code == GATT_REQ_PREPARE_WRITE ||op_code == GATT_RSP_PREPARE_WRITE )
@@ -313,7 +313,7 @@ BT_HDR *attp_build_value_cmd (UINT16 payload_size, UINT8 op_code, UINT16 handle,
}
if (len > 0 && p_data != NULL)
- {
+ {
/* ensure data not exceed MTU size */
if (payload_size - p_buf->len < len)
{
@@ -351,7 +351,7 @@ BOOLEAN attp_send_msg_to_L2CAP(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP)
if (l2cap_ret == L2CAP_DW_FAILED)
{
- GATT_TRACE_ERROR1("ATT failed to pass msg:0x%0x to L2CAP",
+ GATT_TRACE_ERROR1("ATT failed to pass msg:0x%0x to L2CAP",
*((UINT8 *)(p_toL2CAP + 1) + p_toL2CAP->offset));
GKI_freebuf(p_toL2CAP);
return FALSE;
@@ -371,7 +371,7 @@ BOOLEAN attp_send_msg_to_L2CAP(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP)
*******************************************************************************/
BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg)
{
- BT_HDR *p_cmd = NULL;
+ BT_HDR *p_cmd = NULL;
UINT16 offset = 0;
switch (op_code)
@@ -388,14 +388,14 @@ BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg)
case GATT_RSP_READ:
case GATT_HANDLE_VALUE_NOTIF:
case GATT_HANDLE_VALUE_IND:
- p_cmd = attp_build_value_cmd(p_tcb->payload_size,
- op_code,
+ p_cmd = attp_build_value_cmd(p_tcb->payload_size,
+ op_code,
p_msg->attr_value.handle,
offset,
- p_msg->attr_value.len,
+ p_msg->attr_value.len,
p_msg->attr_value.value);
break;
-
+
case GATT_RSP_WRITE:
p_cmd = attp_build_opcode_cmd(op_code);
break;
@@ -427,14 +427,14 @@ BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg)
**
** Function attp_send_sr_msg
**
-** Description This function sends the server response or indication message
+** Description This function sends the server response or indication message
** to client.
**
** Parameter p_tcb: pointer to the connecton control block.
** p_msg: pointer to message parameters structure.
**
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
+**
**
*******************************************************************************/
tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg)
@@ -468,9 +468,9 @@ tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg)
UINT8 attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR *p_cmd)
{
UINT8 att_ret = GATT_SUCCESS;
-
+
if (p_tcb != NULL)
- {
+ {
cmd_code &= ~GATT_AUTH_SIGN_MASK;
if (p_tcb->pending_cl_req == p_tcb->next_slot_inq ||
@@ -501,7 +501,7 @@ UINT8 attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR
**
** Function attp_send_cl_msg
**
-** Description This function sends the client request or confirmation message
+** Description This function sends the client request or confirmation message
** to server.
**
** Parameter p_tcb: pointer to the connectino control block.
@@ -510,13 +510,13 @@ UINT8 attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR
** p_msg: pointer to message parameters structure.
**
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
-**
+**
**
*******************************************************************************/
tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code, tGATT_CL_MSG *p_msg)
{
tGATT_STATUS status = GATT_NO_RESOURCES;
- BT_HDR *p_cmd = NULL;
+ BT_HDR *p_cmd = NULL;
UINT16 offset = 0, handle;
if (p_tcb != NULL)
@@ -540,9 +540,9 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
GATT_HANDLE_IS_VALID (p_msg->browse.e_handle) &&
p_msg->browse.s_handle <= p_msg->browse.e_handle)
{
- p_cmd = attp_build_browse_cmd(op_code,
- p_msg->browse.s_handle,
- p_msg->browse.e_handle,
+ p_cmd = attp_build_browse_cmd(op_code,
+ p_msg->browse.s_handle,
+ p_msg->browse.e_handle,
p_msg->browse.uuid);
}
else
@@ -555,7 +555,7 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
case GATT_REQ_READ:
handle = (op_code == GATT_REQ_READ) ? p_msg->handle: p_msg->read_blob.handle;
/* handle checking */
- if (GATT_HANDLE_IS_VALID (handle))
+ if (GATT_HANDLE_IS_VALID (handle))
{
p_cmd = attp_build_handle_cmd(op_code, handle, offset);
}
@@ -575,7 +575,7 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
case GATT_SIGN_CMD_WRITE:
if (GATT_HANDLE_IS_VALID (p_msg->attr_value.handle))
{
- p_cmd = attp_build_value_cmd (p_tcb->payload_size,
+ p_cmd = attp_build_value_cmd (p_tcb->payload_size,
op_code, p_msg->attr_value.handle,
offset,
p_msg->attr_value.len,
@@ -589,14 +589,14 @@ tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
p_cmd = attp_build_exec_write_cmd(op_code, p_msg->exec_write);
break;
- case GATT_REQ_FIND_TYPE_VALUE:
- p_cmd = attp_build_read_handles_cmd(p_tcb->payload_size, &p_msg->find_type_value);
+ case GATT_REQ_FIND_TYPE_VALUE:
+ p_cmd = attp_build_read_handles_cmd(p_tcb->payload_size, &p_msg->find_type_value);
break;
case GATT_REQ_READ_MULTI:
- p_cmd = attp_build_read_multi_cmd(p_tcb->payload_size,
- p_msg->read_multi.num_handles,
- p_msg->read_multi.handles);
+ p_cmd = attp_build_read_multi_cmd(p_tcb->payload_size,
+ p_msg->read_multi.num_handles,
+ p_msg->read_multi.handles);
break;
default:
diff --git a/stack/gatt/gatt_api.c b/stack/gatt/gatt_api.c
index 2157277..c01d617 100644
--- a/stack/gatt/gatt_api.c
+++ b/stack/gatt/gatt_api.c
@@ -60,8 +60,8 @@ UINT8 GATT_SetTraceLevel (UINT8 new_level)
** Function GATTS_AddHandleRange
**
** Description This function add the allocated handles range for the specifed
-** application UUID, service UUID and service instance
-**
+** application UUID, service UUID and service instance
+**
** Parameter p_hndl_range: pointer to allocated handles information
**
** Returns TRUE if handle range is added sucessfully; otherwise FALSE.
@@ -76,7 +76,7 @@ BOOLEAN GATTS_AddHandleRange(tGATTS_HNDL_RANGE *p_hndl_range)
if ((p_buf = gatt_alloc_hdl_buffer()) != NULL)
{
p_buf->asgn_range = *p_hndl_range;
- status = gatt_add_an_item_to_list(&gatt_cb.hdl_list_info, p_buf);
+ status = gatt_add_an_item_to_list(&gatt_cb.hdl_list_info, p_buf);
}
return status;
}
@@ -87,7 +87,7 @@ BOOLEAN GATTS_AddHandleRange(tGATTS_HNDL_RANGE *p_hndl_range)
** Function GATTS_NVRegister
**
** Description Application manager calls this function to register for
-** NV save callback function. There can be one and only one
+** NV save callback function. There can be one and only one
** NV save callback function.
**
** Parameter p_cb_info : callback informaiton
@@ -138,11 +138,11 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
tBT_UUID *p_app_uuid128;
- GATT_TRACE_API0 ("GATTS_CreateService" );
+ GATT_TRACE_API0 ("GATTS_CreateService" );
if (p_reg == NULL)
{
- GATT_TRACE_ERROR1 ("Inavlid gatt_if=%d", gatt_if);
+ GATT_TRACE_ERROR1 ("Inavlid gatt_if=%d", gatt_if);
return(0);
}
@@ -151,7 +151,7 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
if ((p_list = gatt_find_hdl_buffer_by_app_id(p_app_uuid128, p_svc_uuid, svc_inst)) != NULL)
{
s_hdl = p_list->asgn_range.s_handle;
- GATT_TRACE_DEBUG0 ("Service already been created!!");
+ GATT_TRACE_DEBUG0 ("Service already been created!!");
}
else
{
@@ -183,14 +183,14 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
/* check for space */
if (num_handles > (0xFFFF - s_hdl + 1))
{
- GATT_TRACE_ERROR2 ("GATTS_ReserveHandles: no handles, s_hdl: %u needed: %u", s_hdl, num_handles);
+ GATT_TRACE_ERROR2 ("GATTS_ReserveHandles: no handles, s_hdl: %u needed: %u", s_hdl, num_handles);
return(0);
}
if ( (p_list = gatt_alloc_hdl_buffer()) == NULL)
{
/* No free entry */
- GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: no free handle blocks");
+ GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: no free handle blocks");
return(0);
}
@@ -211,7 +211,7 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
if ( (p_buf = gatt_add_pending_new_srv_start(&p_list->asgn_range)) == NULL)
{
/* No free entry */
- GATT_TRACE_ERROR0 ("gatt_add_pending_new_srv_start: no free blocks");
+ GATT_TRACE_ERROR0 ("gatt_add_pending_new_srv_start: no free blocks");
if (p_list)
{
@@ -221,13 +221,13 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
return(0);
}
- GATT_TRACE_DEBUG0 ("Add a new srv chg item");
+ GATT_TRACE_DEBUG0 ("Add a new srv chg item");
}
}
if (!gatts_init_service_db(&p_list->svc_db, *p_svc_uuid, is_pri, s_hdl , num_handles))
{
- GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: service DB initialization failed");
+ GATT_TRACE_ERROR0 ("GATTS_ReserveHandles: service DB initialization failed");
if (p_list)
{
gatt_remove_an_item_from_list(p_list_info, p_list);
@@ -239,11 +239,11 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
return(0);
}
- GATT_TRACE_DEBUG6 ("GATTS_CreateService(success): handles needed:%u s_hdl=%u e_hdl=%u %s[%x] is_primary=%d",
+ GATT_TRACE_DEBUG6 ("GATTS_CreateService(success): handles needed:%u s_hdl=%u e_hdl=%u %s[%x] is_primary=%d",
num_handles, p_list->asgn_range.s_handle , p_list->asgn_range.e_handle,
((p_list->asgn_range.svc_uuid.len == 2) ? "uuid16": "uuid128" ),
p_list->asgn_range.svc_uuid.uu.uuid16,
- p_list->asgn_range.is_primary);
+ p_list->asgn_range.is_primary);
return(s_hdl);
}
@@ -257,7 +257,7 @@ UINT16 GATTS_CreateService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid,
** Parameter service_handle : To which service this included service is added to.
** include_svc_handle : included service handle.
**
-** Returns included service attribute handle. If 0, add included service
+** Returns included service attribute handle. If 0, add included service
** fail.
**
*******************************************************************************/
@@ -277,8 +277,8 @@ UINT16 GATTS_AddIncludeService (UINT16 service_handle, UINT16 include_svc_handle
return 0;
}
- return gatts_add_included_service(&p_decl->svc_db,
- p_incl_decl->asgn_range.s_handle,
+ return gatts_add_included_service(&p_decl->svc_db,
+ p_incl_decl->asgn_range.s_handle,
p_incl_decl->asgn_range.e_handle,
p_incl_decl->asgn_range.svc_uuid);
}
@@ -314,34 +314,34 @@ UINT16 GATTS_AddCharacteristic (UINT16 service_handle, tBT_UUID *p_char_uuid,
((perm & GATT_WRITE_SIGNED_PERM) && !(property & GATT_CHAR_PROP_BIT_AUTH)) )
{
GATT_TRACE_DEBUG2("Invalid configuration property=0x%x perm=0x%x ", property, perm);
- return 0;
+ return 0;
}
- return gatts_add_characteristic(&p_decl->svc_db,
- perm,
+ return gatts_add_characteristic(&p_decl->svc_db,
+ perm,
property,
- p_char_uuid);
+ p_char_uuid);
}
/*******************************************************************************
**
** Function GATTS_AddCharDescriptor
**
-** Description This function is called to add a characteristic descriptor
-** into a service database. Add descriptor should follow add char
-** to which it belongs, and next add char should be done only
+** Description This function is called to add a characteristic descriptor
+** into a service database. Add descriptor should follow add char
+** to which it belongs, and next add char should be done only
** after all add descriptors for the previous char.
**
-** Parameter service_handle : To which service this characteristic descriptor
+** Parameter service_handle : To which service this characteristic descriptor
** is added to.
-** perm : Characteristic value declaration attribute
+** perm : Characteristic value declaration attribute
** permission.
** p_descr_uuid : Characteristic descriptor UUID
**
-** Returns Characteristic descriptor attribute handle. 0 if add
+** Returns Characteristic descriptor attribute handle. 0 if add
** characteristic descriptor failed.
**
*******************************************************************************/
-UINT16 GATTS_AddCharDescriptor (UINT16 service_handle,
+UINT16 GATTS_AddCharDescriptor (UINT16 service_handle,
tGATT_PERM perm,
tBT_UUID * p_descr_uuid)
{
@@ -352,15 +352,15 @@ UINT16 GATTS_AddCharDescriptor (UINT16 service_handle,
GATT_TRACE_DEBUG0("Service not created");
return 0;
}
- if (p_descr_uuid == NULL ||
+ if (p_descr_uuid == NULL ||
(p_descr_uuid->len != LEN_UUID_128 && p_descr_uuid->len != LEN_UUID_16))
{
GATT_TRACE_DEBUG0("Illegal parameter");
return 0;
}
- return gatts_add_char_descr(&p_decl->svc_db,
- perm,
+ return gatts_add_char_descr(&p_decl->svc_db,
+ perm,
p_descr_uuid);
}
@@ -387,26 +387,26 @@ BOOLEAN GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, UINT16 svc_
tGATT_REG *p_reg = gatt_get_regcb(gatt_if);
tBT_UUID *p_app_uuid128;
- GATT_TRACE_DEBUG0 ("GATTS_DeleteService");
+ GATT_TRACE_DEBUG0 ("GATTS_DeleteService");
if (p_reg == NULL)
{
- GATT_TRACE_ERROR0 ("Applicaiton not foud");
+ GATT_TRACE_ERROR0 ("Applicaiton not foud");
return(FALSE);
}
p_app_uuid128 = &p_reg->app_uuid128;
if ((p_list = gatt_find_hdl_buffer_by_app_id(p_app_uuid128, p_svc_uuid, svc_inst)) == NULL)
{
- GATT_TRACE_ERROR0 ("No Service found");
+ GATT_TRACE_ERROR0 ("No Service found");
return(FALSE);
}
- if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
- &p_list->asgn_range.svc_uuid,
+ if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
+ &p_list->asgn_range.svc_uuid,
p_list->asgn_range.svc_inst)) != NULL)
{
- GATT_TRACE_DEBUG0 ("Delete a new service changed item - the service has not yet started");
+ GATT_TRACE_DEBUG0 ("Delete a new service changed item - the service has not yet started");
GKI_freebuf (GKI_remove_from_queue (&gatt_cb.pending_new_srv_start_q, p_buf));
}
else
@@ -414,17 +414,17 @@ BOOLEAN GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, UINT16 svc_
gatt_proc_srv_chg();
}
- if ((i_sreg = gatt_sr_find_i_rcb_by_app_id (p_app_uuid128,
- p_svc_uuid,
+ if ((i_sreg = gatt_sr_find_i_rcb_by_app_id (p_app_uuid128,
+ p_svc_uuid,
svc_inst)) != GATT_MAX_SR_PROFILES)
{
GATTS_StopService(gatt_cb.sr_reg[i_sreg].s_hdl);
}
- GATT_TRACE_DEBUG2 ("released handles s_hdl=%u e_hdl=%u",
- p_list->asgn_range.s_handle , p_list->asgn_range.e_handle );
+ GATT_TRACE_DEBUG2 ("released handles s_hdl=%u e_hdl=%u",
+ p_list->asgn_range.s_handle , p_list->asgn_range.e_handle );
- if ( (p_list->asgn_range.s_handle >= gatt_cb.hdl_cfg.app_start_hdl)
+ if ( (p_list->asgn_range.s_handle >= gatt_cb.hdl_cfg.app_start_hdl)
&& gatt_cb.cb_info.p_nv_save_callback)
(*gatt_cb.cb_info.p_nv_save_callback)(FALSE, &p_list->asgn_range);
@@ -447,7 +447,7 @@ BOOLEAN GATTS_DeleteService (tGATT_IF gatt_if, tBT_UUID *p_svc_uuid, UINT16 svc_
** return GATT_SUCCESS if sucessfully started; otherwise error code.
**
*******************************************************************************/
-tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
+tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
tGATT_TRANSPORT sup_transport)
{
tGATT_SR_REG *p_sreg;
@@ -458,24 +458,24 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
tGATTS_PENDING_NEW_SRV_START *p_buf;
- GATT_TRACE_API0 ("GATTS_StartService");
+ GATT_TRACE_API0 ("GATTS_StartService");
if (p_reg == NULL)
{
/* Not found */
- GATT_TRACE_ERROR0 ("Applicaiton not found ");
+ GATT_TRACE_ERROR0 ("Applicaiton not found ");
return GATT_NOT_FOUND;
}
if ((p_list = gatt_find_hdl_buffer_by_handle(service_handle)) == NULL)
{
/* Not found */
- GATT_TRACE_ERROR0 ("no service found");
+ GATT_TRACE_ERROR0 ("no service found");
return GATT_NOT_FOUND;
}
- if (gatt_sr_find_i_rcb_by_app_id (&p_list->asgn_range.app_uuid128,
- &p_list->asgn_range.svc_uuid,
+ if (gatt_sr_find_i_rcb_by_app_id (&p_list->asgn_range.app_uuid128,
+ &p_list->asgn_range.svc_uuid,
p_list->asgn_range.svc_inst) != GATT_MAX_SR_PROFILES)
{
GATT_TRACE_ERROR0 ("Duplicate Service start - Service already started");
@@ -485,7 +485,7 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
/*this is a new application servoce start */
if ((i_sreg = gatt_sr_alloc_rcb(p_list)) == GATT_MAX_SR_PROFILES)
{
- GATT_TRACE_ERROR0 ("GATTS_StartService: no free server registration block");
+ GATT_TRACE_ERROR0 ("GATTS_StartService: no free server registration block");
return GATT_NO_RESOURCES;
}
@@ -495,7 +495,7 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
switch (sup_transport)
{
case GATT_TRANSPORT_BR_EDR:
- case GATT_TRANSPORT_LE_BR_EDR:
+ case GATT_TRANSPORT_LE_BR_EDR:
if (p_sreg->type == GATT_UUID_PRI_SERVICE)
{
p_uuid = gatts_get_service_uuid (p_sreg->p_db);
@@ -507,7 +507,7 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
break;
}
- gatts_update_srv_list_elem(i_sreg, p_sreg->s_hdl,
+ gatts_update_srv_list_elem(i_sreg, p_sreg->s_hdl,
p_list->asgn_range.is_primary);
gatt_add_a_srv_to_list(&gatt_cb.srv_list_info, &gatt_cb.srv_list[i_sreg]);
@@ -515,13 +515,13 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
GATT_TRACE_DEBUG1 ("allocated i_sreg=%d ",i_sreg);
GATT_TRACE_DEBUG5 ("s_hdl=%d e_hdl=%d type=0x%x svc_inst=%d sdp_hdl=0x%x",
- p_sreg->s_hdl,p_sreg->e_hdl,
+ p_sreg->s_hdl,p_sreg->e_hdl,
p_sreg->type, p_sreg->service_instance,
p_sreg->sdp_handle);
- if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
- &p_list->asgn_range.svc_uuid,
+ if ( (p_buf = gatt_sr_is_new_srv_chg(&p_list->asgn_range.app_uuid128,
+ &p_list->asgn_range.svc_uuid,
p_list->asgn_range.svc_inst)) != NULL)
{
gatt_proc_srv_chg();
@@ -536,10 +536,10 @@ tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
**
** Function GATTS_StopService
**
-** Description This function is called to stop a service
-**
-** Parameter service_handle : this is the start handle of a service
+** Description This function is called to stop a service
**
+** Parameter service_handle : this is the start handle of a service
+**
** Returns None.
**
*******************************************************************************/
@@ -569,7 +569,7 @@ void GATTS_StopService (UINT16 service_handle)
**
** Function GATTs_HandleValueIndication
**
-** Description This function sends a handle value indication to a client.
+** Description This function sends a handle value indication to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -592,7 +592,7 @@ tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_handle, U
tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
- GATT_TRACE_API0 ("GATTS_HandleValueIndication");
+ GATT_TRACE_API0 ("GATTS_HandleValueIndication");
if ( (p_reg == NULL) || (p_tcb == NULL))
{
GATT_TRACE_ERROR1 ("GATTS_HandleValueIndication Unknown conn_id: %u ", conn_id);
@@ -608,10 +608,10 @@ tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_handle, U
{
if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle))
{
- GATT_TRACE_DEBUG0 ("Add a pending indication");
+ GATT_TRACE_DEBUG0 ("Add a pending indication");
if ((p_buf = gatt_add_pending_ind(p_tcb, &indication)) !=NULL)
{
- cmd_status = GATT_SUCCESS;
+ cmd_status = GATT_SUCCESS;
}
else
{
@@ -640,7 +640,7 @@ tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, UINT16 attr_handle, U
**
** Function GATTS_HandleValueNotification
**
-** Description This function sends a handle value notification to a client.
+** Description This function sends a handle value notification to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -696,7 +696,7 @@ tGATT_STATUS GATTS_HandleValueNotification (UINT16 conn_id, UINT16 attr_handle,
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
**
*******************************************************************************/
-tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
+tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tGATT_STATUS status, tGATTS_RSP *p_msg)
{
tGATT_STATUS cmd_sent = GATT_ILLEGAL_PARAMETER;
@@ -705,7 +705,7 @@ tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tGATT_REG *p_reg = gatt_get_regcb(gatt_if);
tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
- GATT_TRACE_API3 ("GATTS_SendRsp: conn_id: %u trans_id: %u Status: 0x%04x",
+ GATT_TRACE_API3 ("GATTS_SendRsp: conn_id: %u trans_id: %u Status: 0x%04x",
conn_id, trans_id, status);
if ( (p_reg == NULL) || (p_tcb == NULL))
@@ -722,7 +722,7 @@ tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
return(GATT_WRONG_STATE);
}
/* Process App response */
- cmd_sent = gatt_sr_process_app_rsp (p_tcb, gatt_if, trans_id, p_tcb->sr_cmd.op_code, status, p_msg);
+ cmd_sent = gatt_sr_process_app_rsp (p_tcb, gatt_if, trans_id, p_tcb->sr_cmd.op_code, status, p_msg);
return cmd_sent;
}
@@ -740,14 +740,14 @@ tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
/*******************************************************************************
**
-** Function GATTC_ConfigureMTU
+** Function GATTC_ConfigureMTU
**
** Description This function is called to configure the ATT MTU size.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** mtu - attribute MTU size..
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)
@@ -781,7 +781,7 @@ tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)
p_clcb->p_tcb->payload_size = mtu;
p_clcb->operation = GATTC_OPTYPE_CONFIG;
- ret = attp_send_cl_msg (p_clcb->p_tcb, p_clcb->clcb_idx, GATT_REQ_MTU, (tGATT_CL_MSG *)&mtu);
+ ret = attp_send_cl_msg (p_clcb->p_tcb, p_clcb->clcb_idx, GATT_REQ_MTU, (tGATT_CL_MSG *)&mtu);
}
return ret;
@@ -789,18 +789,18 @@ tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)
/*******************************************************************************
**
-** Function GATTC_Discover
+** Function GATTC_Discover
**
** Description This function is called to do a discovery procedure on ATT server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** disc_type:discovery type.
** p_param: parameters of discovery requirement.
**
-** Returns GATT_SUCCESS if command received/sent successfully.
+** Returns GATT_SUCCESS if command received/sent successfully.
**
*******************************************************************************/
-tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
+tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
tGATT_DISC_PARAM *p_param)
{
tGATT_STATUS status = GATT_SUCCESS;
@@ -830,10 +830,10 @@ tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
if ((p_clcb = gatt_clcb_alloc(conn_id)) != NULL )
{
- if (!GATT_HANDLE_IS_VALID(p_param->s_handle) ||
+ if (!GATT_HANDLE_IS_VALID(p_param->s_handle) ||
!GATT_HANDLE_IS_VALID(p_param->e_handle) ||
/* search by type does not have a valid UUID param */
- (disc_type == GATT_DISC_SRVC_BY_UUID &&
+ (disc_type == GATT_DISC_SRVC_BY_UUID &&
p_param->service.len == 0))
{
return GATT_ILLEGAL_PARAMETER;
@@ -856,16 +856,16 @@ tGATT_STATUS GATTC_Discover (UINT16 conn_id, tGATT_DISC_TYPE disc_type,
/*******************************************************************************
**
-** Function GATTC_Read
+** Function GATTC_Read
**
** Description This function is called to read the value of an attribute from
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute read type.
** p_read - read operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM *p_read)
@@ -910,7 +910,7 @@ tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM
break;
case GATT_READ_MULTIPLE:
p_clcb->s_handle = 0;
- /* copy multiple handles in CB */
+ /* copy multiple handles in CB */
p_read_multi = (tGATT_READ_MULTI *)GKI_getbuf(sizeof(tGATT_READ_MULTI));
p_clcb->p_attr_buf = (UINT8*)p_read_multi;
memcpy (p_read_multi, &p_read->read_multiple, sizeof(tGATT_READ_MULTI));
@@ -944,16 +944,16 @@ tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM
/*******************************************************************************
**
-** Function GATTC_Write
+** Function GATTC_Write
**
** Description This function is called to write the value of an attribute to
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute write type.
** p_write - write operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_write)
@@ -1019,15 +1019,15 @@ tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_
/*******************************************************************************
**
-** Function GATTC_ExecuteWrite
+** Function GATTC_ExecuteWrite
**
** Description This function is called to send an Execute write request to
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** is_execute - to execute or cancel the prepare write requet(s)
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
@@ -1058,7 +1058,7 @@ tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
{
p_clcb->operation = GATTC_OPTYPE_EXE_WRITE;
flag = is_execute ? GATT_PREP_WRITE_EXEC : GATT_PREP_WRITE_CANCEL;
- gatt_send_queue_write_cancel (p_clcb->p_tcb, p_clcb, flag);
+ gatt_send_queue_write_cancel (p_clcb->p_tcb, p_clcb, flag);
}
else
{
@@ -1070,21 +1070,21 @@ tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute)
/*******************************************************************************
**
-** Function GATTC_SendHandleValueConfirm
+** Function GATTC_SendHandleValueConfirm
**
** Description This function is called to send a handle value confirmation
** as response to a handle value notification from server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** handle: the handle of the attribute confirmation.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
tGATT_STATUS GATTC_SendHandleValueConfirm (UINT16 conn_id, UINT16 handle)
{
tGATT_STATUS ret = GATT_ILLEGAL_PARAMETER;
- tGATT_TCB *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id));
+ tGATT_TCB *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id));
GATT_TRACE_API2 ("GATTC_SendHandleValueConfirm conn_id=%d handle=0x%x", conn_id, handle);
@@ -1124,7 +1124,7 @@ tGATT_STATUS GATTC_SendHandleValueConfirm (UINT16 conn_id, UINT16 handle)
**
** Function GATT_SetIdleTimeout
**
-** Description This function (common to both client and server) sets the idle
+** Description This function (common to both client and server) sets the idle
** timeout for a tansport connection
**
** Parameter bd_addr: target device bd address.
@@ -1150,7 +1150,7 @@ void GATT_SetIdleTimeout (BD_ADDR bd_addr, UINT16 idle_tout)
}
}
- GATT_TRACE_API2 ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
+ GATT_TRACE_API2 ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
idle_tout, status);
}
@@ -1159,7 +1159,7 @@ void GATT_SetIdleTimeout (BD_ADDR bd_addr, UINT16 idle_tout)
**
** Function GATT_Register
**
-** Description This function is called to register an application
+** Description This function is called to register an application
** with GATT
**
** Parameter p_app_uuid128: Application UUID
@@ -1210,11 +1210,11 @@ tGATT_IF GATT_Register (tBT_UUID *p_app_uuid128, tGATT_CBACK *p_cb_info)
**
** Function GATT_Deregister
**
-** Description This function deregistered the application from GATT.
+** Description This function deregistered the application from GATT.
**
** Parameters gatt_if: applicaiton interface.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
void GATT_Deregister (tGATT_IF gatt_if)
@@ -1267,7 +1267,7 @@ void GATT_Deregister (tGATT_IF gatt_if)
for (j = 0, p_clcb= &gatt_cb.clcb[j]; j < GATT_CL_MAX_LCB; j++, p_clcb++)
{
- if (p_clcb->in_use &&
+ if (p_clcb->in_use &&
(p_clcb->p_reg->gatt_if == gatt_if) &&
(p_clcb->p_tcb->tcb_idx == p_tcb->tcb_idx))
{
@@ -1315,8 +1315,8 @@ void GATT_StartIf (tGATT_IF gatt_if)
p_tcb = gatt_find_tcb_by_addr(bda);
if (p_reg->app_cb.p_conn_cb)
{
- conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
- (*p_reg->app_cb.p_conn_cb)(gatt_if, bda, conn_id, TRUE, 0);
+ conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
+ (*p_reg->app_cb.p_conn_cb)(gatt_if, bda, conn_id, TRUE, 0);
}
start_idx = ++found_idx;
}
@@ -1330,7 +1330,7 @@ void GATT_StartIf (tGATT_IF gatt_if)
**
** Description This function initiate a connecttion to a ATT server.
**
-** Parameters gatt_if: applicaiton interface
+** Parameters gatt_if: applicaiton interface
** bd_addr: peer device address.
** is_direct: is a direct conenection or a background auto connection
**
@@ -1366,7 +1366,7 @@ BOOLEAN GATT_Connect (tGATT_IF gatt_if, BD_ADDR bd_addr, BOOLEAN is_direct){
** Description This function initiate a connecttion to a ATT server.
**
** Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
-** typically used for direct connection cancellation.
+** typically used for direct connection cancellation.
** bd_addr: peer device address.
**
** Returns TRUE if connection started; FALSE if connection start failure.
@@ -1398,7 +1398,7 @@ BOOLEAN GATT_CancelConnect (tGATT_IF gatt_if, BD_ADDR bd_addr, BOOLEAN is_direct
{
while (status && gatt_find_app_hold_link(p_tcb, start_idx, &found_idx, &temp_gatt_if))
{
- status = gatt_cancel_open(temp_gatt_if, bd_addr);
+ status = gatt_cancel_open(temp_gatt_if, bd_addr);
start_idx = ++found_idx;
}
}
@@ -1443,7 +1443,7 @@ BOOLEAN GATT_CancelConnect (tGATT_IF gatt_if, BD_ADDR bd_addr, BOOLEAN is_direct
**
** Description This function disconnect a logic channel.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
**
** Returns GATT_SUCCESS if disconnected.
**
@@ -1480,7 +1480,7 @@ tGATT_STATUS GATT_Disconnect (UINT16 conn_id)
** interface
**
** Parameters conn_id: connection id (input)
-** p_gatt_if: applicaiton interface (output)
+** p_gatt_if: applicaiton interface (output)
** bd_addr: peer device address. (output)
**
** Returns TRUE the ligical link information is found for conn_id
@@ -1499,8 +1499,8 @@ BOOLEAN GATT_GetConnectionInfor(UINT16 conn_id, tGATT_IF *p_gatt_if, BD_ADDR bd_
if (p_tcb && p_reg )
{
- memcpy(bd_addr, p_tcb->peer_bda, BD_ADDR_LEN);
- *p_gatt_if = gatt_if;
+ memcpy(bd_addr, p_tcb->peer_bda, BD_ADDR_LEN);
+ *p_gatt_if = gatt_if;
status = TRUE;
}
return status;
@@ -1514,11 +1514,11 @@ BOOLEAN GATT_GetConnectionInfor(UINT16 conn_id, tGATT_IF *p_gatt_if, BD_ADDR bd_
** Description This function find the conn_id if the logical link for BD address
** and applciation interface is connected
**
-** Parameters gatt_if: applicaiton interface (input)
+** Parameters gatt_if: applicaiton interface (input)
** bd_addr: peer device address. (input)
** p_conn_id: connection id (output)
**
-** Returns TRUE the ligical link is connected
+** Returns TRUE the ligical link is connected
**
*******************************************************************************/
BOOLEAN GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr, UINT16 *p_conn_id)
diff --git a/stack/gatt/gatt_attr.c b/stack/gatt/gatt_attr.c
index fdd2984..d8b417f 100644
--- a/stack/gatt/gatt_attr.c
+++ b/stack/gatt/gatt_attr.c
@@ -28,7 +28,7 @@
static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, UINT8 op_code, tGATTS_DATA *p_data);
static void gatt_profile_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id, BOOLEAN connected, tGATT_DISCONN_REASON reason);
-static tGATT_CBACK gatt_profile_cback =
+static tGATT_CBACK gatt_profile_cback =
{
gatt_profile_connect_cback,
NULL,
@@ -144,14 +144,14 @@ BOOLEAN gatt_profile_clcb_dealloc (UINT16 conn_id)
**
** Function gatt_profile_request_cback
**
-** Description GATT profile attribute access request callback.
+** Description GATT profile attribute access request callback.
**
** Returns void.
**
*******************************************************************************/
-static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type,
+static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type,
tGATTS_DATA *p_data)
-{
+{
UINT8 status = GATT_INVALID_PDU;
tGATTS_RSP rsp_msg ;
BOOLEAN ignore = FALSE;
@@ -165,7 +165,7 @@ static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_
break;
case GATTS_REQ_TYPE_WRITE:
- status = GATT_WRITE_NOT_PERMIT;
+ status = GATT_WRITE_NOT_PERMIT;
break;
case GATTS_REQ_TYPE_WRITE_EXEC:
@@ -198,11 +198,11 @@ static void gatt_profile_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_
** Returns void
**
*******************************************************************************/
-static void gatt_profile_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
+static void gatt_profile_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
BOOLEAN connected, tGATT_DISCONN_REASON reason)
{
- GATT_TRACE_EVENT5 ("gatt_profile_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
- (bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
+ GATT_TRACE_EVENT5 ("gatt_profile_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
+ (bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
(bda[4]<<8)+bda[5], connected, conn_id, reason);
if (connected)
@@ -243,21 +243,21 @@ void gatt_profile_db_init (void)
GATT_StartIf(gatt_cb.gatt_if);
service_handle = GATTS_CreateService (gatt_cb.gatt_if , &uuid, 0, GATTP_MAX_ATTR_NUM, TRUE);
- /* add Service Changed characteristic
+ /* add Service Changed characteristic
*/
- uuid.uu.uuid16 = gatt_cb.gattp_attr.uuid = GATT_UUID_GATT_SRV_CHGD;
+ uuid.uu.uuid16 = gatt_cb.gattp_attr.uuid = GATT_UUID_GATT_SRV_CHGD;
gatt_cb.gattp_attr.service_change = 0;
- gatt_cb.gattp_attr.handle =
+ gatt_cb.gattp_attr.handle =
gatt_cb.handle_of_h_r = GATTS_AddCharacteristic(service_handle, &uuid, 0, GATT_CHAR_PROP_BIT_INDICATE);
- GATT_TRACE_DEBUG1 ("gatt_profile_db_init: handle of service changed%d",
+ GATT_TRACE_DEBUG1 ("gatt_profile_db_init: handle of service changed%d",
gatt_cb.handle_of_h_r );
- /* start service
+ /* start service
*/
status = GATTS_StartService (gatt_cb.gatt_if, service_handle, GATT_TRANSPORT_LE_BR_EDR);
- GATT_TRACE_DEBUG2 ("gatt_profile_db_init: gatt_if=%d start status%d",
+ GATT_TRACE_DEBUG2 ("gatt_profile_db_init: gatt_if=%d start status%d",
gatt_cb.gatt_if, status);
}
diff --git a/stack/gatt/gatt_auth.c b/stack/gatt/gatt_auth.c
index 9ac5e8a..b7fa13f 100644
--- a/stack/gatt/gatt_auth.c
+++ b/stack/gatt/gatt_auth.c
@@ -49,13 +49,13 @@ static BOOLEAN gatt_sign_data (tGATT_CLCB *p_clcb)
p_attr->len = payload_size - GATT_AUTH_SIGN_LEN - 3;
p_signature = p_attr->value + p_attr->len;
- if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda,
- p_data,
+ if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda,
+ p_data,
(UINT16)(p_attr->len + 3), /* 3 = 2 byte handle + opcode */
p_signature))
{
- p_attr->len += BTM_BLE_AUTH_SIGN_LEN;
- gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN);
+ p_attr->len += BTM_BLE_AUTH_SIGN_LEN;
+ gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN);
gatt_act_write(p_clcb);
}
else
@@ -73,17 +73,17 @@ static BOOLEAN gatt_sign_data (tGATT_CLCB *p_clcb)
**
** Function gatt_verify_signature
**
-** Description This function start to verify the sign data when receiving
+** Description This function start to verify the sign data when receiving
** the data from peer device.
**
-** Returns
+** Returns
**
*******************************************************************************/
void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf)
{
UINT16 cmd_len;
UINT8 op_code;
- UINT8 *p, *p_orig = (UINT8 *)(p_buf + 1) + p_buf->offset;
+ UINT8 *p, *p_orig = (UINT8 *)(p_buf + 1) + p_buf->offset;
UINT32 counter;
cmd_len = p_buf->len - GATT_AUTH_SIGN_LEN + 4;
@@ -137,7 +137,7 @@ void gatt_sec_check_complete(BOOLEAN sec_check_ok, tGATT_CLCB *p_clcb)
**
** Description link encryption complete callback.
**
-** Returns
+** Returns
**
*******************************************************************************/
void gatt_enc_cmpl_cback(BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS result)
@@ -149,7 +149,7 @@ void gatt_enc_cmpl_cback(BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS result)
GATT_TRACE_DEBUG0("gatt_enc_cmpl_cback");
if ((p_tcb = gatt_find_tcb_by_addr(bd_addr)) != NULL)
{
- gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
+ gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
if (result == BTM_SUCCESS)
{
@@ -271,8 +271,8 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
/* now check link needs to be encrypted or not if the link key upgrade is not required */
if (act == GATT_SEC_OK)
{
- if (is_le_link &&
- (p_clcb->operation == GATTC_OPTYPE_WRITE) &&
+ if (is_le_link &&
+ (p_clcb->operation == GATTC_OPTYPE_WRITE) &&
(p_clcb->op_subtype == GATT_WRITE_NO_RSP))
{
/* this is a write command request
@@ -282,7 +282,7 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
btm_ble_get_enc_key_type(p_tcb->peer_bda, &key_type);
if ( (key_type & BTM_LE_KEY_LCSRK) &&
- ((auth_req == GATT_AUTH_REQ_SIGNED_NO_MITM) ||
+ ((auth_req == GATT_AUTH_REQ_SIGNED_NO_MITM) ||
(auth_req == GATT_AUTH_REQ_SIGNED_MITM)))
{
act = GATT_SEC_SIGN_DATA;
@@ -314,7 +314,7 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
** Function gatt_get_link_encrypt_status
**
** Description This routine get the encryption status of the specified link
-**
+**
**
** Returns tGATT_STATUS link encryption status
**
@@ -322,7 +322,7 @@ tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB *p_clcb )
tGATT_STATUS gatt_get_link_encrypt_status(tGATT_TCB *p_tcb)
{
tGATT_STATUS encrypt_status = GATT_NOT_ENCRYPTED;
- UINT8 sec_flag=0;
+ UINT8 sec_flag=0;
BTM_GetSecurityFlags(p_tcb->peer_bda, &sec_flag);
@@ -400,8 +400,8 @@ BOOLEAN gatt_security_check_start(tGATT_CLCB *p_clcb)
case GATT_SEC_ENCRYPT_NO_MITM:
case GATT_SEC_ENCRYPT_MITM:
GATT_TRACE_DEBUG0("gatt_security_check_start: Encrypt now or key upgreade first");
- gatt_convert_sec_action(p_tcb->sec_act, &btm_ble_sec_act);
- gatt_set_ch_state(p_tcb, GATT_CH_W4_SEC_COMP);
+ gatt_convert_sec_action(p_tcb->sec_act, &btm_ble_sec_act);
+ gatt_set_ch_state(p_tcb, GATT_CH_W4_SEC_COMP);
p_tcb->p_clcb = p_clcb; /* keep the clcb pointer in CCB */
btm_status = BTM_SetEncryption(p_tcb->peer_bda, gatt_enc_cmpl_cback, &btm_ble_sec_act);
if ( (btm_status != BTM_SUCCESS) && (btm_status != BTM_CMD_STARTED))
@@ -419,7 +419,7 @@ BOOLEAN gatt_security_check_start(tGATT_CLCB *p_clcb)
if (status == FALSE)
{
gatt_set_sec_act(p_tcb, GATT_SEC_NONE);
- gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
+ gatt_set_ch_state(p_tcb, GATT_CH_OPEN);
}
}
else
diff --git a/stack/gatt/gatt_cl.c b/stack/gatt/gatt_cl.c
index ca6d2e1..9853694 100644
--- a/stack/gatt/gatt_cl.c
+++ b/stack/gatt/gatt_cl.c
@@ -25,17 +25,17 @@
*********************************************************************************/
void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb);
-UINT8 disc_type_to_att_opcode[GATT_DISC_MAX] =
+UINT8 disc_type_to_att_opcode[GATT_DISC_MAX] =
{
0,
- GATT_REQ_READ_BY_GRP_TYPE, /* GATT_DISC_SRVC_ALL = 1, */
- GATT_REQ_FIND_TYPE_VALUE, /* GATT_DISC_SRVC_BY_UUID, */
- GATT_REQ_READ_BY_TYPE, /* GATT_DISC_INC_SRVC, */
- GATT_REQ_READ_BY_TYPE, /* GATT_DISC_CHAR, */
- GATT_REQ_FIND_INFO /* GATT_DISC_CHAR_DSCPT, */
+ GATT_REQ_READ_BY_GRP_TYPE, /* GATT_DISC_SRVC_ALL = 1, */
+ GATT_REQ_FIND_TYPE_VALUE, /* GATT_DISC_SRVC_BY_UUID, */
+ GATT_REQ_READ_BY_TYPE, /* GATT_DISC_INC_SRVC, */
+ GATT_REQ_READ_BY_TYPE, /* GATT_DISC_CHAR, */
+ GATT_REQ_FIND_INFO /* GATT_DISC_CHAR_DSCPT, */
};
-UINT16 disc_type_to_uuid[GATT_DISC_MAX] =
+UINT16 disc_type_to_uuid[GATT_DISC_MAX] =
{
0, /* reserved */
GATT_UUID_PRI_SERVICE, /* <service> DISC_SRVC_ALL */
@@ -50,7 +50,7 @@ UINT16 disc_type_to_uuid[GATT_DISC_MAX] =
**
** Function gatt_act_discovery
**
-** Description GATT discovery operation.
+** Description GATT discovery operation.
**
** Returns void.
**
@@ -96,7 +96,7 @@ void gatt_act_discovery(tGATT_CLCB *p_clcb)
**
** Function gatt_act_read
**
-** Description GATT read operation.
+** Description GATT read operation.
**
** Returns void.
**
@@ -165,7 +165,7 @@ void gatt_act_read (tGATT_CLCB *p_clcb, UINT16 offset)
msg.handle = p_clcb->s_handle;
p_clcb->op_subtype &= ~ 0x90;
break;
-
+
default:
GATT_TRACE_ERROR1("Unknown read type: %d", p_clcb->op_subtype);
break;
@@ -174,7 +174,7 @@ void gatt_act_read (tGATT_CLCB *p_clcb, UINT16 offset)
if ( op_code == 0 ||
(rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, op_code, &msg)) != GATT_SUCCESS)
{
- gatt_end_operation(p_clcb, rt, NULL);
+ gatt_end_operation(p_clcb, rt, NULL);
}
}
@@ -182,7 +182,7 @@ void gatt_act_read (tGATT_CLCB *p_clcb, UINT16 offset)
**
** Function gatt_act_write
**
-** Description GATT write operation.
+** Description GATT write operation.
**
** Returns void.
**
@@ -198,14 +198,14 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
switch (p_clcb->op_subtype)
{
case GATT_WRITE_NO_RSP:
- p_clcb->s_handle = p_attr->handle;
+ p_clcb->s_handle = p_attr->handle;
op_code = (p_tcb->sec_act & GATT_SEC_SIGN_DATA) ? GATT_SIGN_CMD_WRITE : GATT_CMD_WRITE;
- rt = gatt_send_write_msg(p_tcb,
- p_clcb->clcb_idx,
- op_code,
- p_attr->handle,
- p_attr->len,
- 0,
+ rt = gatt_send_write_msg(p_tcb,
+ p_clcb->clcb_idx,
+ op_code,
+ p_attr->handle,
+ p_attr->len,
+ 0,
p_attr->value);
break;
@@ -214,12 +214,12 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
{
p_clcb->s_handle = p_attr->handle;
- rt = gatt_send_write_msg(p_tcb,
- p_clcb->clcb_idx,
- GATT_REQ_WRITE,
- p_attr->handle,
- p_attr->len,
- 0,
+ rt = gatt_send_write_msg(p_tcb,
+ p_clcb->clcb_idx,
+ GATT_REQ_WRITE,
+ p_attr->handle,
+ p_attr->len,
+ 0,
p_attr->value);
}
else /* prepare write for long attribute */
@@ -228,8 +228,8 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
}
break;
- case GATT_WRITE_PREPARE:
- gatt_send_prepare_write(p_tcb, p_clcb);
+ case GATT_WRITE_PREPARE:
+ gatt_send_prepare_write(p_tcb, p_clcb);
break;
default:
@@ -241,12 +241,12 @@ void gatt_act_write (tGATT_CLCB *p_clcb)
else
rt = GATT_INTERNAL_ERROR;
- if ((rt != GATT_SUCCESS && rt != GATT_CMD_STARTED)
+ if ((rt != GATT_SUCCESS && rt != GATT_CMD_STARTED)
|| (rt != GATT_CMD_STARTED && p_clcb->op_subtype == GATT_WRITE_NO_RSP))
{
if (rt != GATT_SUCCESS)
{
- GATT_TRACE_ERROR1("gatt_act_write() failed op_code=0x%x", op_code);
+ GATT_TRACE_ERROR1("gatt_act_write() failed op_code=0x%x", op_code);
}
gatt_end_operation(p_clcb, rt, NULL);
}
@@ -311,7 +311,7 @@ BOOLEAN gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, t
}
if (exec)
{
- gatt_send_queue_write_cancel (p_tcb, p_clcb, flag);
+ gatt_send_queue_write_cancel (p_tcb, p_clcb, flag);
return TRUE;
}
return FALSE;
@@ -326,7 +326,7 @@ BOOLEAN gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, t
**
*******************************************************************************/
void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
-{
+{
tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf;
UINT16 to_send, offset;
UINT8 rt = GATT_SUCCESS;
@@ -343,15 +343,15 @@ void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
offset = p_attr->offset;
if (type == GATT_WRITE_PREPARE)
{
- offset += p_clcb->start_offset;
+ offset += p_clcb->start_offset;
}
GATT_TRACE_DEBUG2("offset =0x%x len=%d", offset, to_send );
- rt = gatt_send_write_msg(p_tcb,
- p_clcb->clcb_idx,
- GATT_REQ_PREPARE_WRITE,
- p_attr->handle,
+ rt = gatt_send_write_msg(p_tcb,
+ p_clcb->clcb_idx,
+ GATT_REQ_PREPARE_WRITE,
+ p_attr->handle,
to_send, /* length */
offset, /* used as offset */
p_attr->value + p_attr->offset); /* data */
@@ -377,43 +377,43 @@ void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
*******************************************************************************/
void gatt_proc_disc_read_by_type_rsp(tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data)
{
- /*
+ /*
tGATT_TCB *p_tcb = p_clcb->p_tcb;
tGATT_DISCOVERY_DB *p_db = p_clcb->p_disc_db;
tGATT_DISC_REC *p_rec;
tGATT_STATUS status = GATT_INTERNAL_ERROR;
-
-
+
+
if ((p_rec = gatt_add_record(p_clcb->p_disc_db)) != NULL)
{
p_rec->handle = handle;
p_rec->type = p_db->uuid_filter;
p_rec->attr_len = len;
-
- // copy the attibute value into DB
+
+ // copy the attibute value into DB
p_rec->p_value = p_db->p_free_mem;
memcpy(p_rec->p_value, p_value, len);
p_db->p_free_mem += len;
p_db->mem_free -= len;
-
+
if (handle < p_clcb->e_handle)
{
// send another request
- if (gatt_act_send_browse(p_tcb, p_clcb->conn_id,
- GATT_REQ_READ_BY_TYPE,
- (UINT16)(handle + 1), // starting handle
- p_clcb->e_handle, // end handle
+ if (gatt_act_send_browse(p_tcb, p_clcb->conn_id,
+ GATT_REQ_READ_BY_TYPE,
+ (UINT16)(handle + 1), // starting handle
+ p_clcb->e_handle, // end handle
p_clcb->p_disc_db->uuid_filter) // uuid filter /
- == GATT_SUCCESS)
+ == GATT_SUCCESS)
{
- status = GATT_SUCCESS;
+ status = GATT_SUCCESS;
}
}
}
else
status = GATT_DB_FULL;
-
- if (status != GATT_SUCCESS) // DB full
+
+ if (status != GATT_SUCCESS) // DB full
{
gatt_end_operation(p_clcb, status, NULL);
}*/
@@ -465,14 +465,14 @@ void gatt_process_find_type_value_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UIN
**
** Function gatt_process_read_info_rsp
**
-** Description This function is called to handle the read information
+** Description This function is called to handle the read information
** response.
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_DISC_RES result;
@@ -482,7 +482,7 @@ void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_c
if (p_clcb->operation != GATTC_OPTYPE_DISCOVERY || p_clcb->op_subtype != GATT_DISC_CHAR_DSCPT)
return;
- STREAM_TO_UINT8(type, p);
+ STREAM_TO_UINT8(type, p);
len -= 1;
if (type == GATT_INFO_TYPE_PAIR_16)
@@ -522,7 +522,7 @@ void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_c
** Returns void.
**
*******************************************************************************/
-void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode,
+void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode,
UINT16 handle, UINT8 reason)
{
tGATT_STATUS status = (tGATT_STATUS) reason;
@@ -553,13 +553,13 @@ void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode
**
** Function gatt_process_error_rsp
**
-** Description This function is called to handle the error response
+** Description This function is called to handle the error response
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
UINT8 opcode, reason, * p= p_data;
@@ -567,9 +567,9 @@ void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf;
GATT_TRACE_DEBUG0("gatt_process_error_rsp ");
- STREAM_TO_UINT8(opcode, p);
- STREAM_TO_UINT16(handle, p);
- STREAM_TO_UINT8(reason, p);
+ STREAM_TO_UINT8(opcode, p);
+ STREAM_TO_UINT16(handle, p);
+ STREAM_TO_UINT8(reason, p);
if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY)
{
@@ -603,13 +603,13 @@ void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
**
** Function gatt_process_prep_write_rsp
**
-** Description This function is called to handle the read response
+** Description This function is called to handle the read response
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_VALUE value = {0};
@@ -617,7 +617,7 @@ void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op
GATT_TRACE_ERROR2("value resp op_code = %s len = %d", gatt_dbg_op_name(op_code), len);
- STREAM_TO_UINT16 (value.handle, p);
+ STREAM_TO_UINT16 (value.handle, p);
STREAM_TO_UINT16 (value.offset, p);
value.len = len - 4;
@@ -650,14 +650,14 @@ void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op
** Returns void
**
*******************************************************************************/
-void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
+void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_VALUE value = {0};
tGATT_REG *p_reg;
UINT16 conn_id;
tGATT_STATUS encrypt_status;
- UINT8 *p= p_data, i,
+ UINT8 *p= p_data, i,
event = (op_code == GATT_HANDLE_VALUE_NOTIF) ? GATTC_OPTYPE_NOTIFICATION : GATTC_OPTYPE_INDICATION;
GATT_TRACE_DEBUG0("gatt_process_notification ");
@@ -715,7 +715,7 @@ void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
encrypt_status = gatt_get_link_encrypt_status(p_tcb);
(*p_reg->app_cb.p_cmpl_cb) (conn_id, event, encrypt_status, (tGATT_CL_COMPLETE *)&value);
}
- }
+ }
}
@@ -748,7 +748,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
{
/* this is an error case that server's response containing a value length which is larger than MTU-2
or value_len > message total length -1 */
- GATT_TRACE_ERROR4("gatt_process_read_by_type_rsp: Discard response op_code=%d vale_len=%d > (MTU-2=%d or msg_len-1=%d)",
+ GATT_TRACE_ERROR4("gatt_process_read_by_type_rsp: Discard response op_code=%d vale_len=%d > (MTU-2=%d or msg_len-1=%d)",
op_code, value_len, (p_tcb->payload_size - 2), (len-1));
gatt_end_operation(p_clcb, GATT_ERROR, NULL);
return;
@@ -773,13 +773,13 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
memset(&result, 0, sizeof(tGATT_DISC_RES));
memset(&record_value, 0, sizeof(tGATT_DISC_VALUE));
- result.handle = handle;
+ result.handle = handle;
result.type.len = 2;
result.type.uu.uuid16 = disc_type_to_uuid[p_clcb->op_subtype];
/* discover all services */
if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY &&
- p_clcb->op_subtype == GATT_DISC_SRVC_ALL &&
+ p_clcb->op_subtype == GATT_DISC_SRVC_ALL &&
op_code == GATT_RSP_READ_BY_GRP_TYPE)
{
STREAM_TO_UINT16(handle, p);
@@ -804,7 +804,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
{
STREAM_TO_UINT16(record_value.incl_service.s_handle, p);
STREAM_TO_UINT16(record_value.incl_service.e_handle, p);
-
+
if (!GATT_HANDLE_IS_VALID(record_value.incl_service.s_handle) ||
!GATT_HANDLE_IS_VALID(record_value.incl_service.e_handle))
{
@@ -822,7 +822,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
p_clcb->s_handle = record_value.incl_service.s_handle;
p_clcb->read_uuid128.wait_for_read_rsp = TRUE;
p_clcb->read_uuid128.next_disc_start_hdl = handle + 1;
- memcpy(&p_clcb->read_uuid128.result, &result, sizeof(result));
+ memcpy(&p_clcb->read_uuid128.result, &result, sizeof(result));
memcpy(&p_clcb->read_uuid128.result.value, &record_value, sizeof (result.value));
p_clcb->op_subtype |= 0x90;
gatt_act_read(p_clcb, 0);
@@ -846,15 +846,15 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
if (!p_clcb->p_attr_buf)
p_clcb->p_attr_buf = (UINT8 *)GKI_getbuf(GATT_MAX_ATTR_LEN);
if (p_clcb->p_attr_buf && p_clcb->counter <= GATT_MAX_ATTR_LEN)
- {
+ {
memcpy(p_clcb->p_attr_buf, p, p_clcb->counter);
- gatt_act_read(p_clcb, p_clcb->counter);
+ gatt_act_read(p_clcb, p_clcb->counter);
}
else
gatt_end_operation(p_clcb, GATT_INTERNAL_ERROR, (void *)p);
}
else
- {
+ {
gatt_end_operation(p_clcb, GATT_SUCCESS, (void *)p);
}
return;
@@ -870,7 +870,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
}
gatt_parse_uuid_from_cmd(&record_value.dclr_value.char_uuid, (UINT16)(value_len - 3), &p);
- /* UUID not matching */
+ /* UUID not matching */
if (!gatt_uuid_compare(record_value.dclr_value.char_uuid, p_clcb->uuid))
{
len -= (value_len + 2);
@@ -879,7 +879,7 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
else if (p_clcb->operation == GATTC_OPTYPE_READ)
/* UUID match for read characteristic value */
{
- /* only read the first matching UUID characteristic value, and
+ /* only read the first matching UUID characteristic value, and
discard the rest results */
p_clcb->s_handle = record_value.dclr_value.val_handle;
p_clcb->op_subtype |= 0x80;
@@ -914,13 +914,13 @@ void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8
**
** Function gatt_process_read_rsp
**
-** Description This function is called to handle the read BLOB response
+** Description This function is called to handle the read BLOB response
**
**
** Returns void
**
*******************************************************************************/
-void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
+void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
UINT16 offset = p_clcb->counter;
@@ -948,7 +948,7 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
p_clcb->counter += len;
- memcpy(p_clcb->p_attr_buf + offset, p, len);
+ memcpy(p_clcb->p_attr_buf + offset, p, len);
/* send next request if needed */
@@ -957,7 +957,7 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
{
GATT_TRACE_DEBUG3("full pkt issue read blob for remianing bytes old offset=%d len=%d new offset=%d",
offset, len, p_clcb->counter);
- gatt_act_read(p_clcb, p_clcb->counter);
+ gatt_act_read(p_clcb, p_clcb->counter);
}
else /* end of request, send callback */
{
@@ -981,12 +981,12 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
p_clcb->read_uuid128.wait_for_read_rsp = FALSE;
if (len == LEN_UUID_128)
{
-
- memcpy(p_clcb->read_uuid128.result.value.incl_service.service_type.uu.uuid128, p, len);
+
+ memcpy(p_clcb->read_uuid128.result.value.incl_service.service_type.uu.uuid128, p, len);
p_clcb->read_uuid128.result.value.incl_service.service_type.len = LEN_UUID_128;
if ( p_clcb->p_reg->app_cb.p_disc_res_cb)
(*p_clcb->p_reg->app_cb.p_disc_res_cb)(p_clcb->conn_id, p_clcb->op_subtype, &p_clcb->read_uuid128.result);
- gatt_act_discovery(p_clcb) ;
+ gatt_act_discovery(p_clcb) ;
}
else
{
@@ -1002,7 +1002,7 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
**
** Function gatt_process_handle_rsp
**
-** Description This function is called to handle the write response
+** Description This function is called to handle the write response
**
**
** Returns void
@@ -1013,7 +1013,7 @@ void gatt_process_handle_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code
UINT16 handle;
UINT8 * p= p_data;
- STREAM_TO_UINT16(handle, p);
+ STREAM_TO_UINT16(handle, p);
len -= 2;
if (op_code == GATT_RSP_WRITE)
@@ -1074,7 +1074,7 @@ BOOLEAN gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb)
tGATT_CMD_Q *p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
BOOLEAN sent = FALSE;
- while (!sent &&
+ while (!sent &&
p_tcb->pending_cl_req != p_tcb->next_slot_inq &&
p_cmd->to_send && p_cmd->p_cmd != NULL)
{
@@ -1095,22 +1095,22 @@ BOOLEAN gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb)
p_tcb->pending_cl_req ++;
p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
}
- }
- return sent;
+ }
+ return sent;
}
/*******************************************************************************
**
** Function gatt_client_handle_server_rsp
**
-** Description This function is called to handle the server response to
+** Description This function is called to handle the server response to
** client.
**
**
** Returns void
**
*******************************************************************************/
-void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
+void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
tGATT_CLCB *p_clcb = NULL;
@@ -1180,18 +1180,18 @@ void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
gatt_process_prep_write_rsp(p_tcb, p_clcb, op_code, len, p_data);
break;
- case GATT_RSP_EXEC_WRITE:
+ case GATT_RSP_EXEC_WRITE:
gatt_end_operation(p_clcb, p_clcb->status, NULL);
break;
case GATT_HANDLE_VALUE_NOTIF:
- case GATT_HANDLE_VALUE_IND:
+ case GATT_HANDLE_VALUE_IND:
gatt_process_notification(p_tcb, op_code, len, p_data);
break;
default:
GATT_TRACE_ERROR1("Unknown opcode = %d", op_code);
- break;
+ break;
}
}
diff --git a/stack/gatt/gatt_db.c b/stack/gatt/gatt_db.c
index 7aac9b7..68982bd 100644
--- a/stack/gatt/gatt_db.c
+++ b/stack/gatt/gatt_db.c
@@ -29,22 +29,22 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr);
static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 len);
static void gatts_db_add_service_declaration(tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is_pri);
-static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
+static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 handle, UINT16 offset, UINT32 trans_id);
/*******************************************************************************
**
-** Function gatts_init_service_db
+** Function gatts_init_service_db
**
** Description This function initialize a memory space to be a service database.
**
** Parameter p_db: database pointer.
** len: size of the memory space.
**
-** Returns Status of te operation.
+** Returns Status of te operation.
**
*******************************************************************************/
-BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is_pri,
+BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is_pri,
UINT16 s_hdl, UINT16 num_handle)
{
if (!allocate_svc_db_buf(p_db))
@@ -53,7 +53,7 @@ BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is
return FALSE;
}
- GATT_TRACE_DEBUG0("gatts_init_service_db");
+ GATT_TRACE_DEBUG0("gatts_init_service_db");
GATT_TRACE_DEBUG2("s_hdl = %d num_handle = %d", s_hdl, num_handle );
/* update service database information */
@@ -67,14 +67,14 @@ BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOLEAN is
/*******************************************************************************
**
-** Function gatts_init_service_db
+** Function gatts_init_service_db
**
** Description This function initialize a memory space to be a service database.
**
** Parameter p_db: database pointer.
** len: size of the memory space.
**
-** Returns Status of te operation.
+** Returns Status of te operation.
**
*******************************************************************************/
tBT_UUID * gatts_get_service_uuid (tGATT_SVC_DB *p_db)
@@ -93,15 +93,15 @@ tBT_UUID * gatts_get_service_uuid (tGATT_SVC_DB *p_db)
/*******************************************************************************
**
-** Function gatts_check_attr_readability
+** Function gatts_check_attr_readability
**
** Description check attribute readability
**
-** Returns status of operation.
+** Returns status of operation.
**
*******************************************************************************/
-static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
- UINT16 offset,
+static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
+ UINT16 offset,
BOOLEAN read_long,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size)
@@ -142,7 +142,7 @@ static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
if ( (perm & GATT_READ_ENCRYPTED_REQUIRED) && (sec_flag & GATT_SEC_FLAG_ENCRYPTED) && (key_size < min_key_size))
{
GATT_TRACE_ERROR0( "GATT_INSUF_KEY_SIZE");
- return GATT_INSUF_KEY_SIZE;
+ return GATT_INSUF_KEY_SIZE;
}
@@ -171,7 +171,7 @@ static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
/*******************************************************************************
**
-** Function read_attr_value
+** Function read_attr_value
**
** Description Utility function to read an attribute value.
**
@@ -181,15 +181,15 @@ static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr,
** p_len: output parameter to carry out the attribute length.
** read_long: this is a read blob request.
** mtu: MTU
-** sec_flag: current link security status.
-** key_size: encryption key size.
+** sec_flag: current link security status.
+** key_size: encryption key size.
**
-** Returns status of operation.
+** Returns status of operation.
**
*******************************************************************************/
-static tGATT_STATUS read_attr_value (void *p_attr,
- UINT16 offset,
- UINT8 **p_data,
+static tGATT_STATUS read_attr_value (void *p_attr,
+ UINT16 offset,
+ UINT8 **p_data,
BOOLEAN read_long,
UINT16 mtu,
UINT16 *p_len,
@@ -204,7 +204,7 @@ static tGATT_STATUS read_attr_value (void *p_attr,
GATT_TRACE_DEBUG5("read_attr_value uuid=0x%04x perm=0x%0x sec_flag=0x%x offset=%d read_long=%d",
p_attr16->uuid,
- p_attr16->permission,
+ p_attr16->permission,
sec_flag,
offset,
read_long);
@@ -282,7 +282,7 @@ static tGATT_STATUS read_attr_value (void *p_attr,
/*******************************************************************************
**
-** Function gatts_db_read_attr_value_by_type
+** Function gatts_db_read_attr_value_by_type
**
** Description Query attribute value by attribute type.
**
@@ -292,20 +292,20 @@ static tGATT_STATUS read_attr_value (void *p_attr,
** e_handle: ending handle of the range we are looking for.
** type: Attribute type.
** mtu: MTU.
-** sec_flag: current link security status.
-** key_size: encryption key size.
+** sec_flag: current link security status.
+** key_size: encryption key size.
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
-tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
+tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
tGATT_SVC_DB *p_db,
UINT8 op_code,
- BT_HDR *p_rsp,
- UINT16 s_handle,
- UINT16 e_handle,
- tBT_UUID type,
- UINT16 *p_len,
+ BT_HDR *p_rsp,
+ UINT16 s_handle,
+ UINT16 e_handle,
+ tBT_UUID type,
+ UINT16 *p_len,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size,
UINT32 trans_id,
@@ -344,7 +344,7 @@ tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
UINT16_TO_STREAM (p, p_attr->handle);
- status = read_attr_value ((void *)p_attr, 0, &p, FALSE, (UINT16)(*p_len -2), &len, sec_flag, key_size);
+ status = read_attr_value ((void *)p_attr, 0, &p, FALSE, (UINT16)(*p_len -2), &len, sec_flag, key_size);
if (status == GATT_PENDING)
{
@@ -385,22 +385,22 @@ tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb,
/*******************************************************************************
**
-** Function gatts_add_included_service
+** Function gatts_add_included_service
**
** Description This function adds an included service into a database.
**
** Parameter p_db: database pointer.
** inc_srvc_type: included service type.
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
-UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle,
+UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle,
tBT_UUID service)
{
tGATT_ATTR16 *p_attr;
- GATT_TRACE_DEBUG3("gatts_add_included_service: s_hdl = 0x%04x e_hdl = 0x%04x uuid = 0x%04x",
+ GATT_TRACE_DEBUG3("gatts_add_included_service: s_hdl = 0x%04x e_hdl = 0x%04x uuid = 0x%04x",
s_handle, e_handle, service.uu.uuid16);
if (service.len == 0 || s_handle == 0 || e_handle == 0)
@@ -430,7 +430,7 @@ UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e
/*******************************************************************************
**
-** Function gatts_add_characteristic
+** Function gatts_add_characteristic
**
** Description This function add a characteristics and its descriptor into
** a servce identified by the service database pointer.
@@ -440,11 +440,11 @@ UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e
** property: property of the characteristic.
** p_char: characteristic value information.
**
-** Returns Status of te operation.
+** Returns Status of te operation.
**
*******************************************************************************/
-UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
- tGATT_CHAR_PROP property,
+UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
+ tGATT_CHAR_PROP property,
tBT_UUID * p_char_uuid)
{
tGATT_ATTR16 *p_char_decl, *p_char_val;
@@ -456,7 +456,7 @@ UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
{
if (!copy_extra_byte_in_db(p_db, (void **)&p_char_decl->p_value, sizeof(tGATT_CHAR_DECL)))
{
- deallocate_attr_in_db(p_db, p_char_decl);
+ deallocate_attr_in_db(p_db, p_char_decl);
return 0;
}
@@ -464,7 +464,7 @@ UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
if (p_char_val == NULL)
{
- deallocate_attr_in_db(p_db, p_char_decl);
+ deallocate_attr_in_db(p_db, p_char_decl);
return 0;
}
@@ -481,11 +481,11 @@ UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm,
/*******************************************************************************
**
-** Function gatt_convertchar_descr_type
+** Function gatt_convertchar_descr_type
**
** Description This function convert a char descript UUID into descriptor type.
**
-** Returns descriptor type.
+** Returns descriptor type.
**
*******************************************************************************/
UINT8 gatt_convertchar_descr_type(tBT_UUID *p_descr_uuid)
@@ -525,7 +525,7 @@ UINT8 gatt_convertchar_descr_type(tBT_UUID *p_descr_uuid)
/*******************************************************************************
**
-** Function gatts_add_char_descr
+** Function gatts_add_char_descr
**
** Description This function add a characteristics descriptor.
**
@@ -534,10 +534,10 @@ UINT8 gatt_convertchar_descr_type(tBT_UUID *p_descr_uuid)
** char_dscp_tpye: the characteristic descriptor masks.
** p_dscp_params: characteristic descriptors values.
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
-UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
+UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
tBT_UUID * p_descr_uuid)
{
tGATT_ATTR16 *p_char_dscptr;
@@ -546,10 +546,10 @@ UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
GATT_TRACE_DEBUG1("gatts_add_char_descr uuid=0x%04x", p_descr_uuid->uu.uuid16);
/* Add characteristic descriptors */
- if ((p_char_dscptr = (tGATT_ATTR16 *)allocate_attr_in_db(p_db,
- uuid16,
- p_descr_uuid->uu.uuid128,
- perm))
+ if ((p_char_dscptr = (tGATT_ATTR16 *)allocate_attr_in_db(p_db,
+ uuid16,
+ p_descr_uuid->uu.uuid128,
+ perm))
== NULL)
{
GATT_TRACE_DEBUG0("gatts_add_char_descr Fail for adding char descriptors.");
@@ -566,7 +566,7 @@ UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
/*******************************************************************************/
/*******************************************************************************
**
-** Function gatts_read_attr_value_by_handle
+** Function gatts_read_attr_value_by_handle
**
** Description Query attribute value by attribute handle.
**
@@ -577,17 +577,17 @@ UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm,
** p_len: output parameter as attribute length read.
** read_long: this is a read blob request.
** mtu: MTU.
-** sec_flag: current link security status.
-** key_size: encryption key size
+** sec_flag: current link security status.
+** key_size: encryption key size
**
-** Returns Status of operation.
+** Returns Status of operation.
**
*******************************************************************************/
tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
- tGATT_SVC_DB *p_db,
- UINT8 op_code,
- UINT16 handle, UINT16 offset,
- UINT8 *p_value, UINT16 *p_len,
+ tGATT_SVC_DB *p_db,
+ UINT8 op_code,
+ UINT16 handle, UINT16 offset,
+ UINT8 *p_value, UINT16 *p_len,
UINT16 mtu,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size,
@@ -605,8 +605,8 @@ tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
{
if (p_attr->handle == handle)
{
- status = read_attr_value (p_attr, offset, &pp,
- (BOOLEAN)(op_code == GATT_REQ_READ_BLOB),
+ status = read_attr_value (p_attr, offset, &pp,
+ (BOOLEAN)(op_code == GATT_REQ_READ_BLOB),
mtu, p_len, sec_flag, key_size);
if (status == GATT_PENDING)
@@ -624,7 +624,7 @@ tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
/*******************************************************************************
**
-** Function gatts_read_attr_perm_check
+** Function gatts_read_attr_perm_check
**
** Description Check attribute readability.
**
@@ -635,15 +635,15 @@ tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,
** p_len: output parameter as attribute length read.
** read_long: this is a read blob request.
** mtu: MTU.
-** sec_flag: current link security status.
-** key_size: encryption key size
+** sec_flag: current link security status.
+** key_size: encryption key size
**
-** Returns Status of operation.
+** Returns Status of operation.
**
*******************************************************************************/
-tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
- BOOLEAN is_long,
- UINT16 handle,
+tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
+ BOOLEAN is_long,
+ UINT16 handle,
tGATT_SEC_FLAG sec_flag,
UINT8 key_size)
{
@@ -658,8 +658,8 @@ tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
{
if (p_attr->handle == handle)
{
- status = gatts_check_attr_readability (p_attr, 0,
- is_long,
+ status = gatts_check_attr_readability (p_attr, 0,
+ is_long,
sec_flag, key_size);
break;
}
@@ -671,7 +671,7 @@ tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
}
/*******************************************************************************
**
-** Function gatts_write_attr_perm_check
+** Function gatts_write_attr_perm_check
**
** Description Write attribute value into database.
**
@@ -681,14 +681,14 @@ tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db,
** offset: Write offset if write op code is write blob.
** p_data: Attribute value to write.
** len: attribute data length.
-** sec_flag: current link security status.
-** key_size: encryption key size
+** sec_flag: current link security status.
+** key_size: encryption key size
**
-** Returns Status of the operation.
+** Returns Status of the operation.
**
*******************************************************************************/
tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
- UINT16 handle, UINT16 offset, UINT8 *p_data,
+ UINT16 handle, UINT16 offset, UINT8 *p_data,
UINT16 len, tGATT_SEC_FLAG sec_flag, UINT8 key_size)
{
tGATT_STATUS status = GATT_NOT_FOUND;
@@ -697,7 +697,7 @@ tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
tGATT_PERM perm;
UINT16 min_key_size;
- GATT_TRACE_DEBUG6( "gatts_write_attr_perm_check op_code=0x%0x handle=0x%04x offset=%d len=%d sec_flag=0x%0x key_size=%d",
+ GATT_TRACE_DEBUG6( "gatts_write_attr_perm_check op_code=0x%0x handle=0x%04x offset=%d len=%d sec_flag=0x%0x key_size=%d",
op_code, handle, offset, len, sec_flag, key_size);
if (p_db != NULL)
@@ -714,7 +714,7 @@ tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
{
min_key_size +=6;
}
- GATT_TRACE_DEBUG2( "gatts_write_attr_perm_check p_attr->permission =0x%04x min_key_size==0x%04x",
+ GATT_TRACE_DEBUG2( "gatts_write_attr_perm_check p_attr->permission =0x%04x min_key_size==0x%04x",
p_attr->permission,
min_key_size);
@@ -836,9 +836,9 @@ tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,
/*******************************************************************************
**
-** Function allocate_attr_in_db
+** Function allocate_attr_in_db
**
-** Description Allocate a memory space for a new attribute, and link this
+** Description Allocate a memory space for a new attribute, and link this
** attribute into the database attribute list.
**
**
@@ -865,7 +865,7 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
if (p_db->end_handle <= p_db->next_handle)
{
GATT_TRACE_DEBUG2("handle space full. handle_max = %d next_handle = %d",
- p_db->end_handle, p_db->next_handle);
+ p_db->end_handle, p_db->next_handle);
return NULL;
}
@@ -878,8 +878,8 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
}
}
- p_attr16 = (tGATT_ATTR16 *) p_db->p_free_mem;
- p_attr128 = (tGATT_ATTR128 *) p_db->p_free_mem;
+ p_attr16 = (tGATT_ATTR16 *) p_db->p_free_mem;
+ p_attr128 = (tGATT_ATTR128 *) p_db->p_free_mem;
memset(p_attr16, 0, len);
@@ -901,7 +901,7 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
p_attr16->permission = perm;
p_attr16->p_next = NULL;
- /* link the attribute record into the end of DB */
+ /* link the attribute record into the end of DB */
if (p_db->p_attr_list == NULL)
p_db->p_attr_list = p_attr16;
else
@@ -916,13 +916,13 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
if (p_attr16->uuid_type == GATT_ATTR_UUID_TYPE_16)
{
- GATT_TRACE_DEBUG3("=====> handle = [0x%04x] uuid = [0x%04x] perm=0x%02x ",
+ GATT_TRACE_DEBUG3("=====> handle = [0x%04x] uuid = [0x%04x] perm=0x%02x ",
p_attr16->handle, p_attr16->uuid, p_attr16->permission);
}
else
{
- GATT_TRACE_DEBUG4("=====> handle = [0x%04x] uuid128 = [0x%02x:0x%02x] perm=0x%02x ",
- p_attr128->handle, p_attr128->uuid[0],p_attr128->uuid[1],
+ GATT_TRACE_DEBUG4("=====> handle = [0x%04x] uuid128 = [0x%02x:0x%02x] perm=0x%02x ",
+ p_attr128->handle, p_attr128->uuid[0],p_attr128->uuid[1],
p_attr128->permission);
}
return(void *)p_attr16;
@@ -930,9 +930,9 @@ static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, UINT16 uuid16, UINT8 *uuid1
/*******************************************************************************
**
-** Function deallocate_attr_in_db
+** Function deallocate_attr_in_db
**
-** Description Free an attribute within the database.
+** Description Free an attribute within the database.
**
** Parameter p_db: database pointer.
** p_attr: pointer to the attribute record to be freed.
@@ -951,7 +951,7 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr)
p_cur = (tGATT_ATTR16 *) p_db->p_attr_list;
p_next = (tGATT_ATTR16 *) p_cur->p_next;
- for (; p_cur != NULL && p_next != NULL;
+ for (; p_cur != NULL && p_next != NULL;
p_cur = p_next, p_next = (tGATT_ATTR16 *)p_next->p_next)
{
if (p_next == p_attr)
@@ -974,7 +974,7 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr)
/*******************************************************************************
**
-** Function copy_extra_byte_in_db
+** Function copy_extra_byte_in_db
**
** Description Utility function to allocate extra bytes memory in DB and copy
** the value from a source place.
@@ -985,7 +985,7 @@ static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr)
** p_src: source data pointer.
** len: data length to be copied.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 len)
@@ -1003,7 +1003,7 @@ static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 le
p = p_db->p_free_mem;
p_db->p_free_mem += len;
- p_db->mem_free -= len;
+ p_db->mem_free -= len;
memset((void *)p, 0, len);
*p_dst = (void *)p;
@@ -1012,11 +1012,11 @@ static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 le
/*******************************************************************************
**
-** Function allocate_svc_db_buf
+** Function allocate_svc_db_buf
**
** Description Utility function to allocate extra buffer for service database.
**
-** Returns TRUE if allocation succeed, otherwise FALSE.
+** Returns TRUE if allocation succeed, otherwise FALSE.
**
*******************************************************************************/
static BOOLEAN allocate_svc_db_buf(tGATT_SVC_DB *p_db)
@@ -1043,14 +1043,14 @@ static BOOLEAN allocate_svc_db_buf(tGATT_SVC_DB *p_db)
/*******************************************************************************
**
-** Function gatts_send_app_read_request
+** Function gatts_send_app_read_request
**
** Description Send application read request callback
**
-** Returns status of operation.
+** Returns status of operation.
**
*******************************************************************************/
-static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
+static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 handle, UINT16 offset, UINT32 trans_id)
{
tGATTS_DATA sr_data;
@@ -1064,7 +1064,7 @@ static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
if (trans_id == 0)
{
- trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, handle);
+ trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, handle);
gatt_sr_update_cback_cnt(p_tcb, p_sreg->gatt_if, TRUE, TRUE);
}
@@ -1076,7 +1076,7 @@ static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
sr_data.read_req.is_long = (BOOLEAN)(op_code == GATT_REQ_READ_BLOB);
sr_data.read_req.offset = offset;
- gatt_sr_send_req_callback(conn_id,
+ gatt_sr_send_req_callback(conn_id,
trans_id, GATTS_REQ_TYPE_READ, &sr_data);
return(tGATT_STATUS) GATT_PENDING;
}
@@ -1087,7 +1087,7 @@ static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
/*******************************************************************************
**
-** Function gatts_db_add_service_declaration
+** Function gatts_db_add_service_declaration
**
** Description Update a service database service declaration record.
**
@@ -1102,7 +1102,7 @@ static void gatts_db_add_service_declaration(tGATT_SVC_DB *p_db, tBT_UUID servic
tGATT_ATTR16 *p_attr;
UINT16 service_type = is_pri ? GATT_UUID_PRI_SERVICE: GATT_UUID_SEC_SERVICE;
- GATT_TRACE_DEBUG0( "add_service_declaration");
+ GATT_TRACE_DEBUG0( "add_service_declaration");
/* add service declration record */
if ((p_attr = (tGATT_ATTR16 *)(allocate_attr_in_db(p_db, service_type, NULL, GATT_PERM_READ))) != NULL)
diff --git a/stack/gatt/gatt_int.h b/stack/gatt/gatt_int.h
index 850d1c9..7c7fb89 100644
--- a/stack/gatt/gatt_int.h
+++ b/stack/gatt/gatt_int.h
@@ -25,11 +25,11 @@
#include <string.h>
-#define GATT_CREATE_CONN_ID(tcb_idx, gatt_if) ((UINT16) ((((UINT8)(tcb_idx) ) << 8) | ((UINT8) (gatt_if))))
-#define GATT_GET_TCB_IDX(conn_id) ((UINT8) (((UINT16) (conn_id)) >> 8))
-#define GATT_GET_GATT_IF(conn_id) ((tGATT_IF)((UINT8) (conn_id)))
+#define GATT_CREATE_CONN_ID(tcb_idx, gatt_if) ((UINT16) ((((UINT8)(tcb_idx) ) << 8) | ((UINT8) (gatt_if))))
+#define GATT_GET_TCB_IDX(conn_id) ((UINT8) (((UINT16) (conn_id)) >> 8))
+#define GATT_GET_GATT_IF(conn_id) ((tGATT_IF)((UINT8) (conn_id)))
-#define GATT_GET_SR_REG_PTR(index) (&gatt_cb.sr_reg[(UINT8) (index)]);
+#define GATT_GET_SR_REG_PTR(index) (&gatt_cb.sr_reg[(UINT8) (index)]);
#define GATT_TRANS_ID_MAX 0x0fffffff /* 4 MSB is reserved */
/* security action for GATT write and read request */
@@ -37,7 +37,7 @@
#define GATT_SEC_OK 1
#define GATT_SEC_ENCRYPT 2 /* encrypt the link with current key */
#define GATT_SEC_ENCRYPT_NO_MITM 3 /* unauthenticated encryption or better */
-#define GATT_SEC_ENCRYPT_MITM 4 /* authenticated encryption */
+#define GATT_SEC_ENCRYPT_MITM 4 /* authenticated encryption */
#define GATT_SEC_SIGN_DATA 5 /* compute the signature for the write cmd */
typedef UINT8 tGATT_SEC_ACTION;
@@ -86,7 +86,7 @@ typedef UINT8 tGATT_SEC_ACTION;
#define GATT_SEC_FLAG_ENCRYPTED BTM_SEC_FLAG_ENCRYPTED
typedef UINT8 tGATT_SEC_FLAG;
-/* Find Information Response Type
+/* Find Information Response Type
*/
#define GATT_INFO_TYPE_PAIR_16 0x01
#define GATT_INFO_TYPE_PAIR_128 0x02
@@ -101,18 +101,18 @@ typedef struct
UINT8 value[GATT_MAX_MTU_SIZE]; /* pointer to the attribute value to be found */
} tGATT_FIND_TYPE_VALUE;
-/* client request message to ATT protocol
+/* client request message to ATT protocol
*/
typedef union
{
tGATT_READ_BY_TYPE browse; /* read by type request */
tGATT_FIND_TYPE_VALUE find_type_value;/* find by type value */
- tGATT_READ_MULTI read_multi; /* read multiple request */
+ tGATT_READ_MULTI read_multi; /* read multiple request */
tGATT_READ_PARTIAL read_blob; /* read blob */
tGATT_VALUE attr_value; /* write request */
/* prepare write */
/* write blob */
- UINT16 handle; /* read, handle value confirmation */
+ UINT16 handle; /* read, handle value confirmation */
UINT16 mtu;
tGATT_EXEC_FLAG exec_write; /* execute write */
}tGATT_CL_MSG;
@@ -125,7 +125,7 @@ typedef struct
UINT8 reason;
}tGATT_ERROR;
-/* server response message to ATT protocol
+/* server response message to ATT protocol
*/
typedef union
{
@@ -139,15 +139,15 @@ typedef union
/* Characteristic declaration attribute value
*/
-typedef struct
+typedef struct
{
tGATT_CHAR_PROP property;
UINT16 char_val_handle;
} tGATT_CHAR_DECL;
-/* attribute value maintained in the server database
+/* attribute value maintained in the server database
*/
-typedef union
+typedef union
{
tBT_UUID uuid; /* service declaration */
tGATT_CHAR_DECL char_decl; /* characteristic declaration */
@@ -155,7 +155,7 @@ typedef union
} tGATT_ATTR_VALUE;
-/* Attribute UUID type
+/* Attribute UUID type
*/
#define GATT_ATTR_UUID_TYPE_16 0
#define GATT_ATTR_UUID_TYPE_128 1
@@ -165,7 +165,7 @@ typedef UINT8 tGATT_ATTR_UUID_TYPE;
*/
typedef struct
{
- void *p_next; /* pointer to the next attribute,
+ void *p_next; /* pointer to the next attribute,
either tGATT_ATTR16 or tGATT_ATTR128 */
tGATT_ATTR_VALUE *p_value;
tGATT_ATTR_UUID_TYPE uuid_type;
@@ -178,7 +178,7 @@ typedef struct
*/
typedef struct
{
- void *p_next; /* pointer to the next attribute,
+ void *p_next; /* pointer to the next attribute,
either tGATT_ATTR16 or tGATT_ATTR128 */
tGATT_ATTR_VALUE *p_value;
tGATT_ATTR_UUID_TYPE uuid_type;
@@ -191,7 +191,7 @@ typedef struct
*/
typedef struct
{
- void *p_attr_list; /* pointer to the first attribute,
+ void *p_attr_list; /* pointer to the first attribute,
either tGATT_ATTR16 or tGATT_ATTR128 */
UINT8 *p_free_mem; /* Pointer to free memory */
BUFFER_Q svc_buffer; /* buffer queue used for service database */
@@ -203,7 +203,7 @@ typedef struct
/* Data Structure used for GATT server */
/* A GATT registration record consists of a handle, and 1 or more attributes */
/* A service registration information record consists of beginning and ending */
-/* attribute handle, service UUID and a set of GATT server callback. */
+/* attribute handle, service UUID and a set of GATT server callback. */
typedef struct
{
tGATT_SVC_DB *p_db; /* pointer to the service database */
@@ -215,7 +215,7 @@ typedef struct
UINT16 s_hdl; /* service starting handle */
UINT16 e_hdl; /* service ending handle */
tGATT_IF gatt_if; /* this service is belong to which application */
- BOOLEAN in_use;
+ BOOLEAN in_use;
} tGATT_SR_REG;
@@ -227,7 +227,7 @@ typedef struct
typedef struct
{
tBT_UUID app_uuid128;
- tGATT_CBACK app_cb;
+ tGATT_CBACK app_cb;
tGATT_IF gatt_if; /* one based */
BOOLEAN in_use;
} tGATT_REG;
@@ -325,8 +325,8 @@ typedef struct
typedef struct
{
- void *p_clcb; /* which clcb is doing encryption */
- tGATT_SEC_ACTION sec_act;
+ void *p_clcb; /* which clcb is doing encryption */
+ tGATT_SEC_ACTION sec_act;
BD_ADDR peer_bda;
UINT32 trans_id;
@@ -342,14 +342,14 @@ typedef struct
/* server response data */
tGATT_SR_CMD sr_cmd;
UINT16 indicate_handle;
- BUFFER_Q pending_ind_q;
+ BUFFER_Q pending_ind_q;
TIMER_LIST_ENT conf_timer_ent; /* peer confirm to indication timer */
UINT8 prep_cnt[GATT_MAX_APPS];
- UINT8 ind_count;
+ UINT8 ind_count;
- tGATT_CMD_Q cl_cmd_q[GATT_CL_MAX_LCB];
+ tGATT_CMD_Q cl_cmd_q[GATT_CL_MAX_LCB];
TIMER_LIST_ENT rsp_timer_ent; /* peer response timer */
TIMER_LIST_ENT ind_ack_timer_ent; /* local app confirm to indication timer */
UINT8 pending_cl_req;
@@ -368,7 +368,7 @@ typedef struct
} tGATT_READ_INC_UUID128;
typedef struct
{
- tGATT_TCB *p_tcb; /* associated TCB of this CLCB */
+ tGATT_TCB *p_tcb; /* associated TCB of this CLCB */
tGATT_REG *p_reg; /* owner of this CLCB */
UINT8 sccb_idx;
UINT8 *p_attr_buf; /* attribute buffer for read multiple, prepare write */
@@ -378,14 +378,14 @@ typedef struct
UINT16 s_handle; /* starting handle of the active request */
UINT16 e_handle; /* ending handle of the active request */
UINT16 counter; /* used as offset, attribute length, num of prepare write */
- UINT16 start_offset;
+ UINT16 start_offset;
tGATT_AUTH_REQ auth_req; /* authentication requirement */
UINT8 operation; /* one logic channel can have one operation active */
UINT8 op_subtype; /* operation subtype */
UINT8 status; /* operation status */
BOOLEAN first_read_blob_after_read;
tGATT_READ_INC_UUID128 read_uuid128;
- BOOLEAN in_use;
+ BOOLEAN in_use;
} tGATT_CLCB;
#define GATT_SIGN_WRITE 1
@@ -409,7 +409,7 @@ typedef struct
typedef struct
{
UINT16 clcb_idx;
- BOOLEAN in_use;
+ BOOLEAN in_use;
} tGATT_SCCB;
typedef struct
@@ -421,7 +421,7 @@ typedef struct
typedef struct
{
- tGATT_IF gatt_if[GATT_MAX_APPS];
+ tGATT_IF gatt_if[GATT_MAX_APPS];
BD_ADDR remote_bda;
BOOLEAN in_use;
}tGATT_BG_CONN_DEV;
@@ -451,7 +451,7 @@ typedef struct
BUFFER_Q srv_chg_clt_q; /* service change clients queue */
BUFFER_Q pending_new_srv_start_q; /* pending new service start queue */
- tGATT_REG cl_rcb[GATT_MAX_APPS];
+ tGATT_REG cl_rcb[GATT_MAX_APPS];
tGATT_CLCB clcb[GATT_CL_MAX_LCB]; /* connection link control block*/
tGATT_SCCB sccb[GATT_MAX_SCCB]; /* sign complete callback function GATT_MAX_SCCB <= GATT_CL_MAX_LCB */
UINT8 trace_level;
@@ -494,7 +494,7 @@ GATT_API extern tGATT_CB *gatt_cb_ptr;
GATT_API extern void gatt_set_err_rsp(BOOLEAN enable, UINT8 req_op_code, UINT8 err_status);
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
@@ -587,11 +587,11 @@ extern UINT8 gatt_sr_find_i_rcb_by_handle(UINT16 handle);
extern UINT8 gatt_sr_find_i_rcb_by_app_id(tBT_UUID *p_app_uuid128, tBT_UUID *p_svc_uuid, UINT16 svc_inst);
extern UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list);
extern tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if, UINT32 trans_id, UINT8 op_code, tGATT_STATUS status, tGATTS_RSP *p_msg);
-extern void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
+extern void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data);
-extern void gatt_sr_send_req_callback(UINT16 conn_id, UINT32 trans_id,
+extern void gatt_sr_send_req_callback(UINT16 conn_id, UINT32 trans_id,
UINT8 op_code, tGATTS_DATA *p_req_data);
-extern UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle);
+extern UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle);
extern BOOLEAN gatt_cancel_open(tGATT_IF gatt_if, BD_ADDR bda);
/* */
@@ -628,11 +628,11 @@ extern void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_
extern void gatt_act_discovery(tGATT_CLCB *p_clcb);
extern void gatt_act_read(tGATT_CLCB *p_clcb, UINT16 offset);
extern void gatt_act_write(tGATT_CLCB *p_clcb);
-extern UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle, UINT16 e_handle,
+extern UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle, UINT16 e_handle,
tBT_UUID uuid);
extern tGATT_CLCB *gatt_cmd_dequeue(tGATT_TCB *p_tcb, UINT8 *p_opcode);
extern BOOLEAN gatt_cmd_enq(tGATT_TCB *p_tcb, UINT16 clcb_idx, BOOLEAN to_send, UINT8 op_code, BT_HDR *p_buf);
-extern void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
+extern void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data);
extern void gatt_send_queue_write_cancel (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_EXEC_FLAG flag);
@@ -649,11 +649,11 @@ extern BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID service, BOOL
extern UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle, tBT_UUID service);
extern UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm, tGATT_CHAR_PROP property, tBT_UUID *p_char_uuid);
extern UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm, tBT_UUID *p_dscp_uuid);
-extern tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, tGATT_SVC_DB *p_db, UINT8 op_code, BT_HDR *p_rsp, UINT16 s_handle,
+extern tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, tGATT_SVC_DB *p_db, UINT8 op_code, BT_HDR *p_rsp, UINT16 s_handle,
UINT16 e_handle, tBT_UUID type, UINT16 *p_len, tGATT_SEC_FLAG sec_flag, UINT8 key_size,UINT32 trans_id, UINT16 *p_cur_handle);
-extern tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,tGATT_SVC_DB *p_db, UINT8 op_code, UINT16 handle, UINT16 offset,
+extern tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,tGATT_SVC_DB *p_db, UINT8 op_code, UINT16 handle, UINT16 offset,
UINT8 *p_value, UINT16 *p_len, UINT16 mtu,tGATT_SEC_FLAG sec_flag,UINT8 key_size,UINT32 trans_id);
-extern tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,UINT16 handle, UINT16 offset, UINT8 *p_data,
+extern tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,UINT16 handle, UINT16 offset, UINT8 *p_data,
UINT16 len, tGATT_SEC_FLAG sec_flag, UINT8 key_size);
extern tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db, BOOLEAN is_long, UINT16 handle, tGATT_SEC_FLAG sec_flag,UINT8 key_size);
extern void gatts_update_srv_list_elem(UINT8 i_sreg, UINT16 handle, BOOLEAN is_primary);
diff --git a/stack/gatt/gatt_main.c b/stack/gatt/gatt_main.c
index f233c4c..396367a 100644
--- a/stack/gatt/gatt_main.c
+++ b/stack/gatt/gatt_main.c
@@ -37,7 +37,7 @@ static void gatt_l2cif_disconnect_cfm_cback (UINT16 l2cap_cid, UINT16 result);
static void gatt_l2cif_data_ind_cback (UINT16 l2cap_cid, BT_HDR *p_msg);
static void gatt_send_conn_cback (BOOLEAN is_bg_conn, tGATT_TCB *p_tcb);
-static const tL2CAP_APPL_INFO dyn_info =
+static const tL2CAP_APPL_INFO dyn_info =
{
gatt_l2cif_connect_ind_cback,
gatt_l2cif_connect_cfm_cback,
@@ -57,7 +57,7 @@ tGATT_CB gatt_cb;
/*******************************************************************************
**
-** Function gatt_init
+** Function gatt_init
**
** Description This function is enable the GATT profile on the device.
** It clears out the control blocks, and registers with L2CAP.
@@ -103,9 +103,9 @@ void gatt_init (void)
BTM_SetSecurityLevel(TRUE, "", BTM_SEC_SERVICE_ATT, BTM_SEC_NONE, BT_PSM_ATT, 0, 0);
BTM_SetSecurityLevel(FALSE, "", BTM_SEC_SERVICE_ATT, BTM_SEC_NONE, BT_PSM_ATT, 0, 0);
- gatt_cb.hdl_cfg.gatt_start_hdl = GATT_GATT_START_HANDLE;
- gatt_cb.hdl_cfg.gap_start_hdl = GATT_GAP_START_HANDLE;
- gatt_cb.hdl_cfg.app_start_hdl = GATT_APP_START_HANDLE;
+ gatt_cb.hdl_cfg.gatt_start_hdl = GATT_GATT_START_HANDLE;
+ gatt_cb.hdl_cfg.gap_start_hdl = GATT_GAP_START_HANDLE;
+ gatt_cb.hdl_cfg.app_start_hdl = GATT_APP_START_HANDLE;
gatt_profile_db_init();
}
@@ -118,7 +118,7 @@ void gatt_init (void)
**
** Description This function is called to initiate a connection to a peer device.
**
-** Parameter rem_bda: remote device address to connect to.
+** Parameter rem_bda: remote device address to connect to.
**
** Returns TRUE if connection is started, otherwise return FALSE.
**
@@ -153,9 +153,9 @@ BOOLEAN gatt_connect (BD_ADDR rem_bda, tGATT_TCB *p_tcb)
**
** Description This function is called to disconnect to an ATT device.
**
-** Parameter rem_bda: remote device address to disconnect from.
+** Parameter rem_bda: remote device address to disconnect from.
**
-** Returns TRUE: if connection found and to be disconnected; otherwise
+** Returns TRUE: if connection found and to be disconnected; otherwise
** return FALSE.
**
*******************************************************************************/
@@ -208,7 +208,7 @@ BOOLEAN gatt_disconnect (BD_ADDR rem_bda)
void gatt_update_app_hold_link_status (tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add)
{
UINT8 i;
- BOOLEAN found=FALSE;
+ BOOLEAN found=FALSE;
if (p_tcb == NULL)
{
@@ -259,13 +259,13 @@ void gatt_update_app_hold_link_status (tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLE
*******************************************************************************/
void gatt_update_app_use_link_flag (tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add, BOOLEAN check_acl_link)
{
- GATT_TRACE_DEBUG2("gatt_update_app_use_link_flag is_add=%d chk_link=%d",
+ GATT_TRACE_DEBUG2("gatt_update_app_use_link_flag is_add=%d chk_link=%d",
is_add, check_acl_link);
gatt_update_app_hold_link_status(gatt_if, p_tcb, is_add);
if (check_acl_link &&
- p_tcb &&
+ p_tcb &&
(BTM_GetHCIConnHandle(p_tcb->peer_bda) != GATT_INVALID_ACL_HANDLE))
{
if (is_add)
@@ -320,7 +320,7 @@ BOOLEAN gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr)
if (!gatt_connect(bd_addr, p_tcb))
{
GATT_TRACE_ERROR0("gatt_connect failed");
- memset(p_tcb, 0, sizeof(tGATT_TCB));
+ memset(p_tcb, 0, sizeof(tGATT_TCB));
}
else
ret = TRUE;
@@ -336,7 +336,7 @@ BOOLEAN gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr)
{
gatt_update_app_use_link_flag(p_reg->gatt_if, p_tcb, TRUE, FALSE);
}
-
+
return ret;
}
@@ -345,7 +345,7 @@ BOOLEAN gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr)
** Function gatt_le_connect_cback
**
** Description This callback function is called by L2CAP to indicate that
-** the ATT fixed channel for LE is
+** the ATT fixed channel for LE is
** connected (conn = TRUE)/disconnected (conn = FALSE).
**
*******************************************************************************/
@@ -360,7 +360,7 @@ static void gatt_le_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 re
GATT_TRACE_DEBUG3 ("GATT ATT protocol channel with BDA: %08x%04x is %s",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5], (connected) ? "connected" : "disconnected");
@@ -376,7 +376,7 @@ static void gatt_le_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 re
if (connected)
{
- GATT_TRACE_DEBUG1("connected is TRUE reason=%d",reason );
+ GATT_TRACE_DEBUG1("connected is TRUE reason=%d",reason );
/* BR/EDR lik, ignore this callback */
if (reason == 0)
return;
@@ -477,7 +477,7 @@ static void gatt_le_data_ind (BD_ADDR bd_addr, BT_HDR *p_buf)
**
** Description This function handles an inbound connection indication
** from L2CAP. This is the case where we are acting as a
-** server.
+** server.
**
** Returns void
**
@@ -509,7 +509,7 @@ static void gatt_l2cif_connect_ind_cback (BD_ADDR bd_addr, UINT16 lcid, UINT16
}
/* Send L2CAP connect rsp */
- L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
+ L2CA_ConnectRsp(bd_addr, id, lcid, result, 0);
/* if result ok, proceed with connection */
if (result == L2CAP_CONN_OK)
@@ -531,7 +531,7 @@ static void gatt_l2cif_connect_ind_cback (BD_ADDR bd_addr, UINT16 lcid, UINT16
** Function gatt_l2c_connect_cfm_cback
**
** Description This is the L2CAP connect confirm callback function.
-**
+**
**
** Returns void
**
@@ -583,7 +583,7 @@ void gatt_l2cif_connect_cfm_cback(UINT16 lcid, UINT16 result)
** Function gatt_l2cif_config_cfm_cback
**
** Description This is the L2CAP config confirm callback function.
-**
+**
**
** Returns void
**
@@ -639,7 +639,7 @@ void gatt_l2cif_config_cfm_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function gatt_l2cif_config_ind_cback
**
** Description This is the L2CAP config indication callback function.
-**
+**
**
** Returns void
**
@@ -694,7 +694,7 @@ void gatt_l2cif_config_ind_cback(UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
** Function gatt_l2cif_disconnect_ind_cback
**
** Description This is the L2CAP disconnect indication callback function.
-**
+**
**
** Returns void
**
@@ -728,7 +728,7 @@ void gatt_l2cif_disconnect_ind_cback(UINT16 lcid, BOOLEAN ack_needed)
** Function gatt_l2cif_disconnect_cfm_cback
**
** Description This is the L2CAP disconnect confirm callback function.
-**
+**
**
** Returns void
**
@@ -757,7 +757,7 @@ void gatt_l2cif_disconnect_cfm_cback(UINT16 lcid, UINT16 result)
** Function gatt_l2cif_data_ind_cback
**
** Description This is the L2CAP data indication callback function.
-**
+**
**
** Returns void
**
@@ -782,14 +782,14 @@ void gatt_l2cif_data_ind_cback(UINT16 lcid, BT_HDR *p_buf)
** Function gatt_send_conn_cback
**
** Description Callback used to notify layer above about a connection.
-**
+**
**
** Returns void
**
*******************************************************************************/
static void gatt_send_conn_cback(BOOLEAN is_bg_conn, tGATT_TCB *p_tcb)
{
- UINT8 i;
+ UINT8 i;
tGATT_REG *p_reg;
tGATT_BG_CONN_DEV *p_bg_dev=NULL;
UINT16 conn_id;
@@ -807,7 +807,7 @@ static void gatt_send_conn_cback(BOOLEAN is_bg_conn, tGATT_TCB *p_tcb)
if (p_reg->app_cb.p_conn_cb)
{
- conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
+ conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
(*p_reg->app_cb.p_conn_cb)(p_reg->gatt_if, p_tcb->peer_bda, conn_id, TRUE, 0);
}
}
@@ -854,7 +854,7 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
if (pseudo_op_code < GATT_OP_CODE_MAX)
{
if (op_code == GATT_SIGN_CMD_WRITE)
- {
+ {
gatt_verify_signature(p_tcb, p_buf);
return;
}
@@ -870,12 +870,12 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
else
{
GATT_TRACE_ERROR1 ("ATT - Rcvd L2CAP data, unknown cmd: 0x%x", op_code);
- }
+ }
}
else
{
GATT_TRACE_ERROR0 ("invalid data length, ignore");
- }
+ }
GKI_freebuf (p_buf);
}
@@ -885,7 +885,7 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
** Function gatt_add_a_bonded_dev_for_srv_chg
**
** Description Add a bonded dev to the service changed client list
-**
+**
** Returns void
**
*******************************************************************************/
@@ -938,8 +938,8 @@ void gatt_send_srv_chg_ind (BD_ADDR peer_bda)
}
else
{
- GATT_TRACE_ERROR2("Unable to find conn_id for %08x%04x ",
- (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
+ GATT_TRACE_ERROR2("Unable to find conn_id for %08x%04x ",
+ (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
(peer_bda[4]<<8)+peer_bda[5] );
}
}
@@ -957,7 +957,7 @@ void gatt_send_srv_chg_ind (BD_ADDR peer_bda)
*******************************************************************************/
void gatt_chk_srv_chg(tGATTS_SRV_CHG *p_srv_chg_clt)
{
- GATT_TRACE_DEBUG1("gatt_chk_srv_chg srv_changed=%d", p_srv_chg_clt->srv_changed );
+ GATT_TRACE_DEBUG1("gatt_chk_srv_chg srv_changed=%d", p_srv_chg_clt->srv_changed );
if (p_srv_chg_clt->srv_changed)
{
@@ -997,10 +997,10 @@ void gatt_init_srv_chg (void)
{
GATT_TRACE_DEBUG1("gatt_init_srv_chg num_srv_chg_clt_clients=%d", rsp.num_clients);
num_clients = rsp.num_clients;
- i = 1; /* use one based index */
+ i = 1; /* use one based index */
while ((i <= num_clients) && status)
{
- req.client_read_index = i;
+ req.client_read_index = i;
if ((status = (*gatt_cb.cb_info.p_srv_chg_callback)(GATTS_SRV_CHG_CMD_READ_CLENT, &req, &rsp)))
{
memcpy(&srv_chg_clt, &rsp.srv_chg ,sizeof(tGATTS_SRV_CHG));
@@ -1036,7 +1036,7 @@ void gatt_proc_srv_chg (void)
BOOLEAN srv_chg_ind_pending=FALSE;
tGATT_TCB *p_tcb;
- GATT_TRACE_DEBUG0 ("gatt_proc_srv_chg");
+ GATT_TRACE_DEBUG0 ("gatt_proc_srv_chg");
if (gatt_cb.cb_info.p_srv_chg_callback && gatt_cb.handle_of_h_r)
{
@@ -1053,7 +1053,7 @@ void gatt_proc_srv_chg (void)
}
else
{
- GATT_TRACE_DEBUG0 ("discard srv chg - already has one in the queue");
+ GATT_TRACE_DEBUG0 ("discard srv chg - already has one in the queue");
}
start_idx = ++found_idx;
}
diff --git a/stack/gatt/gatt_sr.c b/stack/gatt/gatt_sr.c
index a4b3b90..9da6c34 100644
--- a/stack/gatt/gatt_sr.c
+++ b/stack/gatt/gatt_sr.c
@@ -11,7 +11,7 @@
#include "bt_target.h"
#if BLE_INCLUDED == TRUE
-#include <string.h>
+#include <string.h>
#include "gatt_int.h"
#include "l2c_api.h"
@@ -20,7 +20,7 @@
**
** Function gatt_sr_enqueue_cmd
**
-** Description This function enqueue the request from client which needs a
+** Description This function enqueue the request from client which needs a
** application response, and update the transaction ID.
**
** Returns void
@@ -31,11 +31,11 @@ UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle)
tGATT_SR_CMD *p_cmd = &p_tcb->sr_cmd;
UINT32 trans_id = 0;
- if ( (p_cmd->op_code == 0) ||
+ if ( (p_cmd->op_code == 0) ||
(op_code == GATT_HANDLE_VALUE_CONF)) /* no pending request */
{
- if (op_code == GATT_CMD_WRITE ||
- op_code == GATT_SIGN_CMD_WRITE ||
+ if (op_code == GATT_CMD_WRITE ||
+ op_code == GATT_SIGN_CMD_WRITE ||
op_code == GATT_REQ_MTU ||
op_code == GATT_HANDLE_VALUE_CONF)
{
@@ -43,7 +43,7 @@ UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle)
}
else
{
- p_cmd->trans_id = ++p_tcb->trans_id;
+ p_cmd->trans_id = ++p_tcb->trans_id;
p_cmd->op_code = op_code;
p_cmd->handle = handle;
p_cmd->status = GATT_NOT_FOUND;
@@ -91,7 +91,7 @@ void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb)
while (p_tcb->sr_cmd.multi_rsp_q.p_first)
GKI_freebuf (GKI_dequeue (&p_tcb->sr_cmd.multi_rsp_q));
- memset( &p_tcb->sr_cmd, 0, sizeof(tGATT_SR_CMD));
+ memset( &p_tcb->sr_cmd, 0, sizeof(tGATT_SR_CMD));
}
/*******************************************************************************
@@ -127,7 +127,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
p_cmd->status = status;
if (status == GATT_SUCCESS)
{
- GATT_TRACE_DEBUG2 ("Multi read count=%d num_hdls=%d",
+ GATT_TRACE_DEBUG2 ("Multi read count=%d num_hdls=%d",
p_cmd->multi_rsp_q.count, p_cmd->multi_req.num_handles);
/* Wait till we get all the responses */
if (p_cmd->multi_rsp_q.count == p_cmd->multi_req.num_handles)
@@ -168,7 +168,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
{
/* just send the partial response for the overflow case */
len = p_rsp->attr_value.len - (total_len - mtu);
- is_overflow = TRUE;
+ is_overflow = TRUE;
GATT_TRACE_DEBUG2 ("multi read overflow available len=%d val_len=%d", len, p_rsp->attr_value.len );
}
else
@@ -185,7 +185,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
}
else
{
- p_cmd->status = GATT_NOT_FOUND;
+ p_cmd->status = GATT_NOT_FOUND;
break;
}
@@ -195,7 +195,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
}
else
{
- p_cmd->status = GATT_NOT_FOUND;
+ p_cmd->status = GATT_NOT_FOUND;
break;
}
@@ -235,7 +235,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
**
** Function gatt_sr_process_app_rsp
**
-** Description This function checks whether the response message from application
+** Description This function checks whether the response message from application
** match any pending request or not.
**
** Returns void
@@ -267,7 +267,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
p_tcb->sr_cmd.status = status;
- if (gatt_sr_is_cback_cnt_zero(p_tcb)
+ if (gatt_sr_is_cback_cnt_zero(p_tcb)
&& status == GATT_SUCCESS)
{
if (p_tcb->sr_cmd.p_rsp_msg == NULL)
@@ -280,7 +280,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
}
}
}
- if (gatt_sr_is_cback_cnt_zero(p_tcb))
+ if (gatt_sr_is_cback_cnt_zero(p_tcb))
{
if ( (p_tcb->sr_cmd.status == GATT_SUCCESS) && (p_tcb->sr_cmd.p_rsp_msg) )
{
@@ -289,7 +289,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
}
else
{
- ret_code = gatt_send_error_rsp (p_tcb, status, op_code, p_tcb->sr_cmd.handle, FALSE);
+ ret_code = gatt_send_error_rsp (p_tcb, status, op_code, p_tcb->sr_cmd.handle, FALSE);
}
gatt_dequeue_sr_cmd(p_tcb);
@@ -304,7 +304,7 @@ tGATT_STATUS gatt_sr_process_app_rsp (tGATT_TCB *p_tcb, tGATT_IF gatt_if,
**
** Function gatt_process_exec_write_req
**
-** Description This function is called to process the execute write request
+** Description This function is called to process the execute write request
** from client.
**
** Returns void
@@ -322,12 +322,12 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
/* mask the flag */
flag &= GATT_PREP_WRITE_EXEC;
-
+
/* no prep write is queued */
if (!gatt_sr_is_prep_cnt_zero(p_tcb))
{
- trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, 0);
+ trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, 0);
gatt_sr_copy_prep_cnt_to_cback_cnt(p_tcb);
for (i=0; i<GATT_MAX_APPS; i++)
@@ -336,9 +336,9 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
{
gatt_if = (tGATT_IF) (i+1);
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
- gatt_sr_send_req_callback(conn_id,
- trans_id,
- GATTS_REQ_TYPE_WRITE_EXEC,
+ gatt_sr_send_req_callback(conn_id,
+ trans_id,
+ GATTS_REQ_TYPE_WRITE_EXEC,
(tGATTS_DATA *)&flag);
p_tcb->prep_cnt[i]= 0;
}
@@ -360,7 +360,7 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
**
** Function gatt_process_read_multi_req
**
-** Description This function is called to process the read multiple request
+** Description This function is called to process the read multiple request
** from client.
**
** Returns void
@@ -375,12 +375,12 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
UINT8 sec_flag, key_size;
tGATTS_RSP *p_msg;
- GATT_TRACE_DEBUG0("gatt_process_read_multi_req" );
+ GATT_TRACE_DEBUG0("gatt_process_read_multi_req" );
p_tcb->sr_cmd.multi_req.num_handles = 0;
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
#if GATT_CONFORMANCE_TESTING == TRUE
@@ -407,9 +407,9 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
/* check read permission */
if ((err = gatts_read_attr_perm_check( gatt_cb.sr_reg[i_rcb].p_db,
FALSE,
- handle,
+ handle,
sec_flag,
- key_size))
+ key_size))
!= GATT_SUCCESS)
{
GATT_TRACE_DEBUG1("read permission denied : 0x%02x", err);
@@ -424,7 +424,7 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
}
ll -= 2;
}
-
+
if (ll != 0)
{
GATT_TRACE_ERROR0("max attribute handle reached in ReadMultiple Request.");
@@ -452,21 +452,21 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
err = gatts_read_attr_value_by_handle(p_tcb,
gatt_cb.sr_reg[i_rcb].p_db,
op_code,
- handle,
- 0,
- p_msg->attr_value.value,
+ handle,
+ 0,
+ p_msg->attr_value.value,
&p_msg->attr_value.len,
- GATT_MAX_ATTR_LEN,
+ GATT_MAX_ATTR_LEN,
sec_flag,
key_size,
- trans_id);
+ trans_id);
if (err == GATT_SUCCESS)
{
gatt_sr_process_app_rsp(p_tcb, gatt_cb.sr_reg[i_rcb].gatt_if ,trans_id, op_code, GATT_SUCCESS, p_msg);
}
/* either not using or done using the buffer, release it now */
- GKI_freebuf(p_msg);
+ GKI_freebuf(p_msg);
}
else
{
@@ -495,8 +495,8 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
** Returns void
**
*******************************************************************************/
-static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_tcb,
- UINT8 op_code, UINT16 s_hdl,
+static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_tcb,
+ UINT8 op_code, UINT16 s_hdl,
UINT16 e_hdl, UINT8 *p_data, tBT_UUID value)
{
tGATT_STATUS status = GATT_NOT_FOUND;
@@ -512,7 +512,7 @@ static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_
while (p_srv)
{
- p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
+ p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
if (p_rcb->in_use &&
p_rcb->s_hdl >= s_hdl &&
@@ -561,7 +561,7 @@ static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_
gatt_build_uuid_to_stream(&p, *p_uuid);
status = GATT_SUCCESS;
- p_msg->len += p_msg->offset;
+ p_msg->len += p_msg->offset;
}
}
else
@@ -585,7 +585,7 @@ static tGATT_STATUS gatt_build_primary_service_rsp (BT_HDR *p_msg, tGATT_TCB *p_
** FALSE: packet full, or format mismatch.
**
*******************************************************************************/
-static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg, UINT16 *p_len,
+static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg, UINT16 *p_len,
UINT16 s_hdl, UINT16 e_hdl)
{
tGATT_STATUS status = GATT_NOT_FOUND;
@@ -621,7 +621,7 @@ static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg,
UINT16_TO_STREAM(p, p_attr->handle);
UINT16_TO_STREAM(p, p_attr->uuid);
}
- else if (p_msg->offset == GATT_INFO_TYPE_PAIR_128 &&
+ else if (p_msg->offset == GATT_INFO_TYPE_PAIR_128 &&
p_attr->uuid_type == GATT_ATTR_UUID_TYPE_128 )
{
UINT16_TO_STREAM(p, p_attr->handle);
@@ -661,7 +661,7 @@ static tGATT_STATUS gatt_build_find_info_rsp(tGATT_SR_REG *p_rcb, BT_HDR *p_msg,
** Returns void
**
*******************************************************************************/
-static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
+static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
UINT8 **p_data, tBT_UUID *p_uuid_filter,
UINT16 *p_s_hdl, UINT16 *p_e_hdl)
{
@@ -682,7 +682,7 @@ static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
reason = GATT_INVALID_HANDLE;
}
/* for these PDUs, uuid filter must present */
- else if (op_code == GATT_REQ_READ_BY_GRP_TYPE ||
+ else if (op_code == GATT_REQ_READ_BY_GRP_TYPE ||
op_code == GATT_REQ_FIND_TYPE_VALUE ||
op_code == GATT_REQ_READ_BY_TYPE)
{
@@ -717,7 +717,7 @@ static tGATT_STATUS gatts_validate_packet_format(UINT8 op_code, UINT16 *p_len,
**
** Function gatts_process_primary_service_req
**
-** Description process ReadByGroupType/ReadByTypeValue request, for discover
+** Description process ReadByGroupType/ReadByTypeValue request, for discover
** all primary services or discover primary service by UUID request.
**
** Returns void
@@ -769,7 +769,7 @@ void gatts_process_primary_service_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 l
/* we do not support ReadByTypeValue with any non-primamry_service type */
reason = GATT_NOT_FOUND;
GATT_TRACE_DEBUG1("unexpected ReadByTypeValue type: 0x%04x", uuid.uu.uuid16);
- }
+ }
}
}
@@ -787,7 +787,7 @@ void gatts_process_primary_service_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 l
**
** Function gatts_process_find_info
**
-** Description process find information request, for discover character
+** Description process find information request, for discover character
** descriptors.
**
** Returns void
@@ -827,7 +827,7 @@ static void gatts_process_find_info(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
while (p_srv)
{
- p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
+ p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
if (p_rcb->in_use &&
!(p_rcb->s_hdl > e_hdl ||
@@ -873,7 +873,7 @@ static void gatts_process_mtu_req (tGATT_TCB *p_tcb, UINT16 len, UINT8 *p_data)
UINT16 mtu = 0;
UINT8 *p = p_data, i;
BT_HDR *p_buf;
- UINT16 conn_id;
+ UINT16 conn_id;
STREAM_TO_UINT16 (mtu, p);
@@ -902,7 +902,7 @@ static void gatts_process_mtu_req (tGATT_TCB *p_tcb, UINT16 len, UINT8 *p_data)
if (gatt_cb.cl_rcb[i].in_use )
{
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_cb.cl_rcb[i].gatt_if);
- gatt_sr_send_req_callback(conn_id, 0, GATTS_REQ_TYPE_MTU,
+ gatt_sr_send_req_callback(conn_id, 0, GATTS_REQ_TYPE_MTU,
(tGATTS_DATA *)&p_tcb->payload_size);
}
}
@@ -918,7 +918,7 @@ static void gatts_process_mtu_req (tGATT_TCB *p_tcb, UINT16 len, UINT8 *p_data)
** Description process Read By type request.
** This PDU can be used to perform:
** - read characteristic value
-** - read characteristic descriptor value
+** - read characteristic descriptor value
** - discover characteristic
** - discover characteristic by UUID
** - relationship discovery
@@ -931,7 +931,7 @@ void gatts_process_read_by_type_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
tBT_UUID uuid;
tGATT_SR_REG *p_rcb;
UINT16 msg_len = (UINT16)(sizeof(BT_HDR) + p_tcb->payload_size + L2CAP_MIN_OFFSET),
- buf_len,
+ buf_len,
s_hdl, e_hdl, err_hdl = 0;
BT_HDR *p_msg = NULL;
tGATT_STATUS reason, ret;
@@ -977,23 +977,23 @@ void gatts_process_read_by_type_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
while (p_srv)
{
- p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
+ p_rcb = GATT_GET_SR_REG_PTR(p_srv->i_sreg);
if (p_rcb->in_use &&
!(p_rcb->s_hdl > e_hdl ||
p_rcb->e_hdl < s_hdl))
{
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
- ret = gatts_db_read_attr_value_by_type(p_tcb,
- p_rcb->p_db,
+ ret = gatts_db_read_attr_value_by_type(p_tcb,
+ p_rcb->p_db,
op_code,
- p_msg,
- s_hdl,
- e_hdl,
+ p_msg,
+ s_hdl,
+ e_hdl,
uuid,
&buf_len,
sec_flag,
@@ -1036,7 +1036,7 @@ void gatts_process_read_by_type_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len,
**
** Function gatts_process_write_req
**
-** Description This function is called to process the write request
+** Description This function is called to process the write request
** from client.
**
** Returns void
@@ -1065,7 +1065,7 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
if (op_code == GATT_SIGN_CMD_WRITE)
{
GATT_TRACE_DEBUG0("Write CMD with data sigining" );
- len -= GATT_AUTH_SIGN_LEN;
+ len -= GATT_AUTH_SIGN_LEN;
}
/* fall through */
case GATT_CMD_WRITE:
@@ -1078,18 +1078,18 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
break;
}
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
status = gatts_write_attr_perm_check (gatt_cb.sr_reg[i_rcb].p_db,
op_code,
- handle,
- sr_data.write_req.offset,
- p,
- len,
- sec_flag,
+ handle,
+ sr_data.write_req.offset,
+ p,
+ len,
+ sec_flag,
key_size);
if (status == GATT_SUCCESS)
@@ -1099,10 +1099,10 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
p_sreg = &gatt_cb.sr_reg[i_rcb];
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_sreg->gatt_if);
gatt_sr_send_req_callback(conn_id,
- trans_id,
- GATTS_REQ_TYPE_WRITE,
+ trans_id,
+ GATTS_REQ_TYPE_WRITE,
&sr_data);
-
+
status = GATT_PENDING;
}
else
@@ -1125,13 +1125,13 @@ void gatts_process_write_req (tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle,
**
** Function gatts_process_read_req
**
-** Description This function is called to process the read request
+** Description This function is called to process the read request
** from client.
**
** Returns void
**
*******************************************************************************/
-static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8 op_code,
+static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8 op_code,
UINT16 handle, UINT16 len, UINT8 *p_data)
{
UINT16 buf_len = (UINT16)(sizeof(BT_HDR) + p_tcb->payload_size + L2CAP_MIN_OFFSET);
@@ -1157,22 +1157,22 @@ static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8
p_msg->len = 1;
buf_len = p_tcb->payload_size - 1;
- gatt_sr_get_sec_info(p_tcb->peer_bda,
- (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
- &sec_flag,
+ gatt_sr_get_sec_info(p_tcb->peer_bda,
+ (BOOLEAN)(p_tcb->att_lcid == L2CAP_ATT_CID),
+ &sec_flag,
&key_size);
reason = gatts_read_attr_value_by_handle(p_tcb,
p_rcb->p_db,
op_code,
- handle,
- offset,
- p,
+ handle,
+ offset,
+ p,
&value_len,
- buf_len,
+ buf_len,
sec_flag,
key_size,
- 0);
+ 0);
p_msg->len += value_len;
}
@@ -1194,13 +1194,13 @@ static void gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8
**
** Function gatts_process_attribute_req
**
-** Description This function is called to process the per attribute handle request
+** Description This function is called to process the per attribute handle request
** from client.
**
** Returns void
**
*******************************************************************************/
-void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
+void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
UINT16 handle;
@@ -1237,13 +1237,13 @@ void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
{
switch (op_code)
{
- case GATT_REQ_READ: /* read char/char descriptor value */
+ case GATT_REQ_READ: /* read char/char descriptor value */
case GATT_REQ_READ_BLOB:
gatts_process_read_req(p_tcb, p_rcb, op_code, handle, len, p);
break;
case GATT_REQ_WRITE: /* write char/char descriptor value */
- case GATT_CMD_WRITE:
+ case GATT_CMD_WRITE:
case GATT_SIGN_CMD_WRITE:
case GATT_REQ_PREPARE_WRITE:
gatts_process_write_req(p_tcb, i, handle, op_code, len, p);
@@ -1269,13 +1269,13 @@ void gatts_process_attribute_req (tGATT_TCB *p_tcb, UINT8 op_code,
**
** Function gatts_proc_srv_chg_ind_ack
**
-** Description This function process the service changed indicaiton ACK
+** Description This function process the service changed indicaiton ACK
**
** Returns void
**
*******************************************************************************/
static void gatts_proc_srv_chg_ind_ack(tGATT_TCB *p_tcb )
-{
+{
tGATTS_SRV_CHG_REQ req;
tGATTS_SRV_CHG *p_buf = NULL;
@@ -1320,7 +1320,7 @@ static void gatts_chk_pending_ind(tGATT_TCB *p_tcb )
**
** Function gatts_proc_ind_ack
**
-** Description This function process the Indication ack
+** Description This function process the Indication ack
**
** Returns TRUE continue to process the indication ack by the aaplication
** if the ACk is not a Service Changed Indication Ack
@@ -1375,7 +1375,7 @@ void gatts_process_value_conf(tGATT_TCB *p_tcb, UINT8 op_code)
{
trans_id = gatt_sr_enqueue_cmd(p_tcb, op_code, handle);
conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_rcb->gatt_if);
- gatt_sr_send_req_callback(conn_id,
+ gatt_sr_send_req_callback(conn_id,
trans_id, GATTS_REQ_TYPE_CONF, (tGATTS_DATA *)&handle);
}
}
@@ -1391,14 +1391,14 @@ void gatts_process_value_conf(tGATT_TCB *p_tcb, UINT8 op_code)
**
** Function gatt_server_handle_client_req
**
-** Description This function is called to handle the client requests to
+** Description This function is called to handle the client requests to
** server.
**
**
** Returns void
**
*******************************************************************************/
-void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
+void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
UINT16 len, UINT8 *p_data)
{
/* there is pending command, discard this one */
@@ -1411,11 +1411,11 @@ void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
{
GATT_TRACE_ERROR2("server receive invalid PDU size:%d pdu size:%d", len + 1, p_tcb->payload_size );
/* for invalid request expecting response, send it now */
- if (op_code != GATT_CMD_WRITE &&
- op_code != GATT_SIGN_CMD_WRITE &&
+ if (op_code != GATT_CMD_WRITE &&
+ op_code != GATT_SIGN_CMD_WRITE &&
op_code != GATT_HANDLE_VALUE_CONF)
{
- gatt_send_error_rsp (p_tcb, GATT_INVALID_PDU, op_code, 0, FALSE);
+ gatt_send_error_rsp (p_tcb, GATT_INVALID_PDU, op_code, 0, FALSE);
}
/* otherwise, ignore the pkt */
}
@@ -1438,10 +1438,10 @@ void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
break;
- case GATT_REQ_READ: /* read char/char descriptor value */
+ case GATT_REQ_READ: /* read char/char descriptor value */
case GATT_REQ_READ_BLOB:
case GATT_REQ_WRITE: /* write char/char descriptor value */
- case GATT_CMD_WRITE:
+ case GATT_CMD_WRITE:
case GATT_SIGN_CMD_WRITE:
case GATT_REQ_PREPARE_WRITE:
gatts_process_attribute_req (p_tcb, op_code, len, p_data);
@@ -1464,7 +1464,7 @@ void gatt_server_handle_client_req (tGATT_TCB *p_tcb, UINT8 op_code,
break;
default:
- break;
+ break;
}
}
}
diff --git a/stack/gatt/gatt_utils.c b/stack/gatt/gatt_utils.c
index abb60c9..ca72f9d 100644
--- a/stack/gatt/gatt_utils.c
+++ b/stack/gatt/gatt_utils.c
@@ -28,39 +28,39 @@
const char * const op_code_name[] =
{
- "UNKNOWN",
- "ATT_RSP_ERROR",
- "ATT_REQ_MTU",
- "ATT_RSP_MTU",
- "ATT_REQ_READ_INFO",
- "ATT_RSP_READ_INFO",
- "ATT_REQ_FIND_TYPE_VALUE",
- "ATT_RSP_FIND_TYPE_VALUE",
- "ATT_REQ_READ_BY_TYPE",
- "ATT_RSP_READ_BY_TYPE",
- "ATT_REQ_READ",
- "ATT_RSP_READ",
- "ATT_REQ_READ_BLOB",
- "ATT_RSP_READ_BLOB",
- "GATT_REQ_READ_MULTI",
- "GATT_RSP_READ_MULTI",
+ "UNKNOWN",
+ "ATT_RSP_ERROR",
+ "ATT_REQ_MTU",
+ "ATT_RSP_MTU",
+ "ATT_REQ_READ_INFO",
+ "ATT_RSP_READ_INFO",
+ "ATT_REQ_FIND_TYPE_VALUE",
+ "ATT_RSP_FIND_TYPE_VALUE",
+ "ATT_REQ_READ_BY_TYPE",
+ "ATT_RSP_READ_BY_TYPE",
+ "ATT_REQ_READ",
+ "ATT_RSP_READ",
+ "ATT_REQ_READ_BLOB",
+ "ATT_RSP_READ_BLOB",
+ "GATT_REQ_READ_MULTI",
+ "GATT_RSP_READ_MULTI",
"GATT_REQ_READ_BY_GRP_TYPE",
"GATT_RSP_READ_BY_GRP_TYPE",
- "ATT_REQ_WRITE",
- "ATT_RSP_WRITE",
- "ATT_CMD_WRITE",
- "ATT_SIGN_CMD_WRITE",
- "ATT_REQ_PREPARE_WRITE",
- "ATT_RSP_PREPARE_WRITE",
- "ATT_REQ_EXEC_WRITE",
- "ATT_RSP_EXEC_WRITE",
- "Reserved",
- "ATT_HANDLE_VALUE_NOTIF",
- "Reserved",
- "ATT_HANDLE_VALUE_IND",
- "ATT_HANDLE_VALUE_CONF",
- "ATT_OP_CODE_MAX"
-};
+ "ATT_REQ_WRITE",
+ "ATT_RSP_WRITE",
+ "ATT_CMD_WRITE",
+ "ATT_SIGN_CMD_WRITE",
+ "ATT_REQ_PREPARE_WRITE",
+ "ATT_RSP_PREPARE_WRITE",
+ "ATT_REQ_EXEC_WRITE",
+ "ATT_RSP_EXEC_WRITE",
+ "Reserved",
+ "ATT_HANDLE_VALUE_NOTIF",
+ "Reserved",
+ "ATT_HANDLE_VALUE_IND",
+ "ATT_HANDLE_VALUE_CONF",
+ "ATT_OP_CODE_MAX"
+};
static const UINT8 base_uuid[LEN_UUID_128] = {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
@@ -70,9 +70,9 @@ static const UINT8 base_uuid[LEN_UUID_128] = {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x0
**
** Function gatt_free_pending_ind
**
-** Description Free all pending indications
+** Description Free all pending indications
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_free_pending_ind(tGATT_TCB *p_tcb)
@@ -87,9 +87,9 @@ void gatt_free_pending_ind(tGATT_TCB *p_tcb)
**
** Function gatt_delete_dev_from_srv_chg_clt_list
**
-** Description Delete a device from the service changed client lit
+** Description Delete a device from the service changed client lit
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr)
@@ -97,7 +97,7 @@ void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr)
tGATTS_SRV_CHG *p_buf;
tGATTS_SRV_CHG_REQ req;
- GATT_TRACE_DEBUG0 ("gatt_delete_dev_from_srv_chg_clt_list");
+ GATT_TRACE_DEBUG0 ("gatt_delete_dev_from_srv_chg_clt_list");
if ((p_buf = gatt_is_bda_in_the_srv_chg_clt_list(bd_addr)) != NULL)
{
if (gatt_cb.cb_info.p_srv_chg_callback)
@@ -115,9 +115,9 @@ void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr)
**
** Function gatt_set_srv_chg
**
-** Description Set the service changed flag to TRUE
+** Description Set the service changed flag to TRUE
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_set_srv_chg(void)
@@ -125,13 +125,13 @@ void gatt_set_srv_chg(void)
tGATTS_SRV_CHG *p_buf = (tGATTS_SRV_CHG *)GKI_getfirst(&gatt_cb.srv_chg_clt_q);
tGATTS_SRV_CHG_REQ req;
- GATT_TRACE_DEBUG0 ("gatt_set_srv_chg");
+ GATT_TRACE_DEBUG0 ("gatt_set_srv_chg");
while (p_buf)
{
- GATT_TRACE_DEBUG0 ("found a srv_chg clt");
+ GATT_TRACE_DEBUG0 ("found a srv_chg clt");
if (!p_buf->srv_changed)
{
- GATT_TRACE_DEBUG0 ("set srv_changed to TRUE");
+ GATT_TRACE_DEBUG0 ("set srv_changed to TRUE");
p_buf->srv_changed= TRUE;
memcpy(&req.srv_chg, p_buf, sizeof(tGATTS_SRV_CHG));
if (gatt_cb.cb_info.p_srv_chg_callback)
@@ -145,9 +145,9 @@ void gatt_set_srv_chg(void)
**
** Function gatt_sr_is_new_srv_chg
**
-** Description Find the app id in on the new service changed list
+** Description Find the app id in on the new service changed list
**
-** Returns Pointer to the found new service changed item othwerwise NULL
+** Returns Pointer to the found new service changed item othwerwise NULL
**
*******************************************************************************/
tGATTS_PENDING_NEW_SRV_START *gatt_sr_is_new_srv_chg(tBT_UUID *p_app_uuid128, tBT_UUID *p_svc_uuid, UINT16 svc_inst)
@@ -166,28 +166,28 @@ tGATTS_PENDING_NEW_SRV_START *gatt_sr_is_new_srv_chg(tBT_UUID *p_app_uuid128, tB
break;
}
p_buf = (tGATTS_PENDING_NEW_SRV_START *)GKI_getnext(p_buf);
- }
+ }
- return p_buf;
+ return p_buf;
}
/*******************************************************************************
**
-** Function gatt_add_pending_ind
+** Function gatt_add_pending_ind
**
** Description Add a pending indication
-**
-** Returns Pointer to the current pending indication buffer, NULL no buffer available
+**
+** Returns Pointer to the current pending indication buffer, NULL no buffer available
**
*******************************************************************************/
tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB *p_tcb, tGATT_VALUE *p_ind)
{
tGATT_VALUE *p_buf;
- GATT_TRACE_DEBUG0 ("gatt_add_pending_ind");
+ GATT_TRACE_DEBUG0 ("gatt_add_pending_ind");
if ((p_buf = (tGATT_VALUE *)GKI_getbuf((UINT16)sizeof(tGATT_VALUE))) != NULL)
{
- GATT_TRACE_DEBUG0 ("enqueue a pending indication");
+ GATT_TRACE_DEBUG0 ("enqueue a pending indication");
memcpy(p_buf, p_ind, sizeof(tGATT_VALUE));
GKI_enqueue (&p_tcb->pending_ind_q, p_buf);
}
@@ -197,22 +197,22 @@ tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB *p_tcb, tGATT_VALUE *p_ind)
/*******************************************************************************
**
-** Function gatt_add_pending_new_srv_start
+** Function gatt_add_pending_new_srv_start
**
** Description Add a pending new srv start to the new service start queue
-**
-** Returns Pointer to the new service start buffer, NULL no buffer available
+**
+** Returns Pointer to the new service start buffer, NULL no buffer available
**
*******************************************************************************/
tGATTS_PENDING_NEW_SRV_START *gatt_add_pending_new_srv_start(tGATTS_HNDL_RANGE *p_new_srv_start)
{
tGATTS_PENDING_NEW_SRV_START *p_buf;
- GATT_TRACE_DEBUG0 ("gatt_add_pending_new_srv_start");
+ GATT_TRACE_DEBUG0 ("gatt_add_pending_new_srv_start");
if ((p_buf = (tGATTS_PENDING_NEW_SRV_START *)GKI_getbuf((UINT16)sizeof(tGATTS_PENDING_NEW_SRV_START))) != NULL)
{
- GATT_TRACE_DEBUG0 ("enqueue a new pending new srv start");
- p_buf->p_new_srv_start = p_new_srv_start;
+ GATT_TRACE_DEBUG0 ("enqueue a new pending new srv start");
+ p_buf->p_new_srv_start = p_new_srv_start;
GKI_enqueue (&gatt_cb.pending_new_srv_start_q, p_buf);
}
return p_buf;
@@ -221,20 +221,20 @@ tGATTS_PENDING_NEW_SRV_START *gatt_add_pending_new_srv_start(tGATTS_HNDL_RANGE *
/*******************************************************************************
**
-** Function gatt_add_srv_chg_clt
+** Function gatt_add_srv_chg_clt
**
** Description Add a service chnage client to the service change client queue
-**
-** Returns Pointer to the service change client buffer; Null no buffer available
+**
+** Returns Pointer to the service change client buffer; Null no buffer available
**
*******************************************************************************/
tGATTS_SRV_CHG *gatt_add_srv_chg_clt(tGATTS_SRV_CHG *p_srv_chg)
{
tGATTS_SRV_CHG *p_buf;
- GATT_TRACE_DEBUG0 ("gatt_add_srv_chg_clt");
+ GATT_TRACE_DEBUG0 ("gatt_add_srv_chg_clt");
if ((p_buf = (tGATTS_SRV_CHG *)GKI_getbuf((UINT16)sizeof(tGATTS_SRV_CHG))) != NULL)
{
- GATT_TRACE_DEBUG0 ("enqueue a srv chg client");
+ GATT_TRACE_DEBUG0 ("enqueue a srv chg client");
memcpy(p_buf, p_srv_chg, sizeof(tGATTS_SRV_CHG));
GKI_enqueue (&gatt_cb.srv_chg_clt_q, p_buf);
}
@@ -245,11 +245,11 @@ tGATTS_SRV_CHG *gatt_add_srv_chg_clt(tGATTS_SRV_CHG *p_srv_chg)
/*******************************************************************************
**
-** Function gatt_alloc_hdl_buffer
+** Function gatt_alloc_hdl_buffer
**
** Description Allocate a handle buufer
-**
-** Returns Pointer to the allocated buffer, NULL no buffer available
+**
+** Returns Pointer to the allocated buffer, NULL no buffer available
**
*******************************************************************************/
tGATT_HDL_LIST_ELEM *gatt_alloc_hdl_buffer(void)
@@ -273,11 +273,11 @@ tGATT_HDL_LIST_ELEM *gatt_alloc_hdl_buffer(void)
/*******************************************************************************
**
-** Function gatt_find_hdl_buffer_by_handle
+** Function gatt_find_hdl_buffer_by_handle
**
** Description Find handle range buffer by service handle.
-**
-** Returns Pointer to the buffer, NULL no buffer available
+**
+** Returns Pointer to the buffer, NULL no buffer available
**
*******************************************************************************/
tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_handle(UINT16 handle)
@@ -299,14 +299,14 @@ tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_handle(UINT16 handle)
}
/*******************************************************************************
**
-** Function gatt_find_hdl_buffer_by_app_id
+** Function gatt_find_hdl_buffer_by_app_id
**
** Description Find handle range buffer by app ID, service and service instance ID.
-**
-** Returns Pointer to the buffer, NULL no buffer available
+**
+** Returns Pointer to the buffer, NULL no buffer available
**
*******************************************************************************/
-tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
+tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
tBT_UUID *p_svc_uuid,
UINT16 svc_inst)
{
@@ -321,7 +321,7 @@ tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
&& gatt_uuid_compare (*p_svc_uuid, p_list->asgn_range.svc_uuid)
&& (svc_inst == p_list->asgn_range.svc_inst) )
{
- GATT_TRACE_DEBUG0 ("Already allocated handles for this service before!!");
+ GATT_TRACE_DEBUG0 ("Already allocated handles for this service before!!");
return(p_list);
}
p_list = p_list->p_next;
@@ -330,11 +330,11 @@ tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_app_id (tBT_UUID *p_app_uuid128,
}
/*******************************************************************************
**
-** Function gatt_free_hdl_buffer
+** Function gatt_free_hdl_buffer
**
** Description free a handle buffer
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void gatt_free_hdl_buffer(tGATT_HDL_LIST_ELEM *p)
@@ -349,12 +349,12 @@ void gatt_free_hdl_buffer(tGATT_HDL_LIST_ELEM *p)
}
/*******************************************************************************
**
-** Function gatt_free_srvc_db_buffer_app_id
+** Function gatt_free_srvc_db_buffer_app_id
**
** Description free the service attribute database buffers by the owner of the
** service app ID.
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void gatt_free_srvc_db_buffer_app_id(tBT_UUID *p_app_id)
@@ -376,11 +376,11 @@ void gatt_free_srvc_db_buffer_app_id(tBT_UUID *p_app_id)
}
/*******************************************************************************
**
-** Function gatt_is_last_attribute
+** Function gatt_is_last_attribute
**
** Description Check this is the last attribute of the specified value or not
-**
-** Returns TRUE - yes this is the last attribute
+**
+** Returns TRUE - yes this is the last attribute
**
*******************************************************************************/
BOOLEAN gatt_is_last_attribute(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_start, tBT_UUID value)
@@ -413,11 +413,11 @@ BOOLEAN gatt_is_last_attribute(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
/*******************************************************************************
**
-** Function gatt_update_last_pri_srv_info
+** Function gatt_update_last_pri_srv_info
**
** Description Update the the last primary info for the service list info
-**
-** Returns None
+**
+** Returns None
**
*******************************************************************************/
void gatt_update_last_pri_srv_info(tGATT_SRV_LIST_INFO *p_list)
@@ -438,11 +438,11 @@ void gatt_update_last_pri_srv_info(tGATT_SRV_LIST_INFO *p_list)
}
/*******************************************************************************
**
-** Function gatts_update_srv_list_elem
+** Function gatts_update_srv_list_elem
**
** Description update an element in the service list.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
void gatts_update_srv_list_elem(UINT8 i_sreg, UINT16 handle, BOOLEAN is_primary)
@@ -456,12 +456,12 @@ void gatts_update_srv_list_elem(UINT8 i_sreg, UINT16 handle, BOOLEAN is_primary)
}
/*******************************************************************************
**
-** Function gatt_add_a_srv_to_list
+** Function gatt_add_a_srv_to_list
**
-** Description add an service to the list in ascending
+** Description add an service to the list in ascending
** order of the start handle
**
-** Returns BOOLEAN TRUE-if add is successful
+** Returns BOOLEAN TRUE-if add is successful
**
*******************************************************************************/
BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_new)
@@ -478,7 +478,7 @@ BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
{
/* this is an empty list */
p_list->p_first =
- p_list->p_last = p_new;
+ p_list->p_last = p_new;
p_new->p_next =
p_new->p_prev = NULL;
}
@@ -507,7 +507,7 @@ BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
p_new->p_prev = p_old->p_prev;
p_new->p_next = p_old;
- p_old->p_prev = p_new;
+ p_old->p_prev = p_new;
break;
}
}
@@ -523,11 +523,11 @@ BOOLEAN gatt_add_a_srv_to_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM
/*******************************************************************************
**
-** Function gatt_remove_a_srv_from_list
+** Function gatt_remove_a_srv_from_list
**
-** Description Remove a service from the list
+** Description Remove a service from the list
**
-** Returns BOOLEAN TRUE-if remove is successful
+** Returns BOOLEAN TRUE-if remove is successful
**
*******************************************************************************/
BOOLEAN gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_ELEM *p_remove)
@@ -547,7 +547,7 @@ BOOLEAN gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_
else if (p_remove->p_next == NULL)
{
p_list->p_last = p_remove->p_prev;
- p_remove->p_prev->p_next = NULL;
+ p_remove->p_prev->p_next = NULL;
}
else
{
@@ -562,12 +562,12 @@ BOOLEAN gatt_remove_a_srv_from_list(tGATT_SRV_LIST_INFO *p_list, tGATT_SRV_LIST_
/*******************************************************************************
**
-** Function gatt_add_an_item_to_list
+** Function gatt_add_an_item_to_list
**
-** Description add an service handle range to the list in decending
+** Description add an service handle range to the list in decending
** order of the start handle
**
-** Returns BOOLEAN TRUE-if add is successful
+** Returns BOOLEAN TRUE-if add is successful
**
*******************************************************************************/
BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_new)
@@ -583,7 +583,7 @@ BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELE
{
/* this is an empty list */
p_list->p_first =
- p_list->p_last = p_new;
+ p_list->p_last = p_new;
p_new->p_next =
p_new->p_prev = NULL;
}
@@ -613,7 +613,7 @@ BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELE
p_new->p_next = p_old;
- p_old->p_prev = p_new;
+ p_old->p_prev = p_new;
break;
}
}
@@ -627,11 +627,11 @@ BOOLEAN gatt_add_an_item_to_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELE
/*******************************************************************************
**
-** Function gatt_remove_an_item_from_list
+** Function gatt_remove_an_item_from_list
**
-** Description Remove an service handle range from the list
+** Description Remove an service handle range from the list
**
-** Returns BOOLEAN TRUE-if remove is successful
+** Returns BOOLEAN TRUE-if remove is successful
**
*******************************************************************************/
BOOLEAN gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIST_ELEM *p_remove)
@@ -651,7 +651,7 @@ BOOLEAN gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIS
else if (p_remove->p_next == NULL)
{
p_list->p_last = p_remove->p_prev;
- p_remove->p_prev->p_next = NULL;
+ p_remove->p_prev->p_next = NULL;
}
else
{
@@ -667,7 +667,7 @@ BOOLEAN gatt_remove_an_item_from_list(tGATT_HDL_LIST_INFO *p_list, tGATT_HDL_LIS
**
** Function gatt_find_the_connected_bda
**
-** Description This function find the connected bda
+** Description This function find the connected bda
**
** Returns TRUE if found
**
@@ -691,7 +691,7 @@ BOOLEAN gatt_find_the_connected_bda(UINT8 start_idx, BD_ADDR bda, UINT8 *p_found
}
}
GATT_TRACE_DEBUG2("gatt_find_the_connected_bda found=%d found_idx=%d", found, i);
- return found;
+ return found;
}
@@ -731,7 +731,7 @@ BOOLEAN gatt_is_srv_chg_ind_pending (tGATT_TCB *p_tcb)
}
GATT_TRACE_DEBUG1("srv_chg_ind_pending = %d", srv_chg_ind_pending);
- return srv_chg_ind_pending;
+ return srv_chg_ind_pending;
}
@@ -759,9 +759,9 @@ tGATTS_SRV_CHG *gatt_is_bda_in_the_srv_chg_clt_list (BD_ADDR bda)
break;
}
p_buf = (tGATTS_SRV_CHG *)GKI_getnext(p_buf);
- }
+ }
- return p_buf;
+ return p_buf;
}
@@ -769,7 +769,7 @@ tGATTS_SRV_CHG *gatt_is_bda_in_the_srv_chg_clt_list (BD_ADDR bda)
**
** Function gatt_is_bda_connected
**
-** Description
+** Description
**
** Returns GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
**
@@ -788,7 +788,7 @@ BOOLEAN gatt_is_bda_connected(BD_ADDR bda)
break;
}
}
- return connected;
+ return connected;
}
/*******************************************************************************
@@ -812,7 +812,7 @@ UINT8 gatt_find_i_tcb_by_addr(BD_ADDR bda)
break;
}
}
- return j;
+ return j;
}
@@ -832,7 +832,7 @@ tGATT_TCB * gatt_get_tcb_by_idx(UINT8 tcb_idx)
if ( (tcb_idx < GATT_MAX_PHY_CHANNEL) && gatt_cb.tcb[tcb_idx].in_use)
p_tcb = &gatt_cb.tcb[tcb_idx];
- return p_tcb;
+ return p_tcb;
}
/*******************************************************************************
@@ -852,7 +852,7 @@ tGATT_TCB * gatt_find_tcb_by_addr(BD_ADDR bda)
if ((i = gatt_find_i_tcb_by_addr(bda)) != GATT_INDEX_INVALID)
p_tcb = &gatt_cb.tcb[i];
- return p_tcb;
+ return p_tcb;
}
/*******************************************************************************
**
@@ -875,7 +875,7 @@ UINT8 gatt_find_i_tcb_free(void)
break;
}
}
- return j;
+ return j;
}
/*******************************************************************************
**
@@ -888,7 +888,7 @@ UINT8 gatt_find_i_tcb_free(void)
*******************************************************************************/
tGATT_TCB * gatt_allocate_tcb_by_bdaddr(BD_ADDR bda)
{
- UINT8 i = 0;
+ UINT8 i = 0;
BOOLEAN allocated = FALSE;
tGATT_TCB *p_tcb = NULL;
@@ -1087,8 +1087,8 @@ BOOLEAN gatt_parse_uuid_from_cmd(tBT_UUID *p_uuid_rec, UINT16 uuid_size, UINT8 *
void gatt_start_rsp_timer(tGATT_TCB *p_tcb)
{
p_tcb->rsp_timer_ent.param = (TIMER_PARAM_TYPE)p_tcb;
- btu_start_timer (&p_tcb->rsp_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
- GATT_WAIT_FOR_RSP_TOUT);
+ btu_start_timer (&p_tcb->rsp_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
+ GATT_WAIT_FOR_RSP_TOUT);
}
/*******************************************************************************
**
@@ -1102,8 +1102,8 @@ void gatt_start_rsp_timer(tGATT_TCB *p_tcb)
void gatt_start_conf_timer(tGATT_TCB *p_tcb)
{
p_tcb->conf_timer_ent.param = (TIMER_PARAM_TYPE)p_tcb;
- btu_start_timer (&p_tcb->conf_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
- GATT_WAIT_FOR_RSP_TOUT);
+ btu_start_timer (&p_tcb->conf_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
+ GATT_WAIT_FOR_RSP_TOUT);
}
/*******************************************************************************
**
@@ -1118,7 +1118,7 @@ void gatt_start_ind_ack_timer(tGATT_TCB *p_tcb)
{
p_tcb->ind_ack_timer_ent.param = (TIMER_PARAM_TYPE)p_tcb;
/* start notification cache timer */
- btu_start_timer (&p_tcb->ind_ack_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_IND_ACK,
+ btu_start_timer (&p_tcb->ind_ack_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_IND_ACK,
GATT_WAIT_FOR_RSP_TOUT);
}
@@ -1204,12 +1204,12 @@ UINT8 gatt_sr_find_i_rcb_by_app_id(tBT_UUID *p_app_uuid128, tBT_UUID *p_svc_uuid
p_this_uuid = gatts_get_service_uuid (p_sreg->p_db);
if (p_this_uuid &&
- gatt_uuid_compare (*p_app_uuid128, p_sreg->app_uuid ) &&
- gatt_uuid_compare (*p_svc_uuid, *p_this_uuid) &&
+ gatt_uuid_compare (*p_app_uuid128, p_sreg->app_uuid ) &&
+ gatt_uuid_compare (*p_svc_uuid, *p_this_uuid) &&
(svc_inst == p_sreg->service_instance))
{
GATT_TRACE_ERROR0 ("Active Service Found ");
- gatt_dbg_display_uuid(*p_svc_uuid);
+ gatt_dbg_display_uuid(*p_svc_uuid);
break;
}
@@ -1242,7 +1242,7 @@ UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list )
memcpy (&p_sreg->app_uuid, &p_list->asgn_range.app_uuid128, sizeof(tBT_UUID));
p_sreg->service_instance = p_list->asgn_range.svc_inst;
- p_sreg->type = p_list->asgn_range.is_primary ? GATT_UUID_PRI_SERVICE: GATT_UUID_SEC_SERVICE;
+ p_sreg->type = p_list->asgn_range.is_primary ? GATT_UUID_PRI_SERVICE: GATT_UUID_SEC_SERVICE;
p_sreg->s_hdl = p_list->asgn_range.s_handle;
p_sreg->e_hdl = p_list->asgn_range.e_handle;
//p_sreg->sr_cb = *p_cback;
@@ -1261,7 +1261,7 @@ UINT8 gatt_sr_alloc_rcb(tGATT_HDL_LIST_ELEM *p_list )
**
** Description Get the security flag and key size information for the peer
** device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -1280,14 +1280,14 @@ void gatt_sr_get_sec_info(BD_ADDR rem_bda, BOOLEAN le_conn, UINT8 *p_sec_flag, U
**
** Function gatt_sr_send_req_callback
**
-** Description
-**
+** Description
+**
**
** Returns void
**
*******************************************************************************/
-void gatt_sr_send_req_callback(UINT16 conn_id,
- UINT32 trans_id,
+void gatt_sr_send_req_callback(UINT16 conn_id,
+ UINT32 trans_id,
tGATTS_REQ_TYPE type, tGATTS_DATA *p_data)
{
tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id);
@@ -1299,10 +1299,10 @@ void gatt_sr_send_req_callback(UINT16 conn_id,
return;
}
- if ( p_reg->in_use &&
+ if ( p_reg->in_use &&
p_reg->app_cb.p_req_cb)
{
- (*p_reg->app_cb.p_req_cb)(conn_id, trans_id, type, p_data);
+ (*p_reg->app_cb.p_req_cb)(conn_id, trans_id, type, p_data);
}
else
{
@@ -1320,14 +1320,14 @@ void gatt_sr_send_req_callback(UINT16 conn_id,
** Returns void
**
*******************************************************************************/
-tGATT_STATUS gatt_send_error_rsp (tGATT_TCB *p_tcb, UINT8 err_code, UINT8 op_code,
+tGATT_STATUS gatt_send_error_rsp (tGATT_TCB *p_tcb, UINT8 err_code, UINT8 op_code,
UINT16 handle, BOOLEAN deq)
{
tGATT_ERROR error;
tGATT_STATUS status;
BT_HDR *p_buf;
- error.cmd_code = op_code;
+ error.cmd_code = op_code;
error.reason = err_code;
error.handle =handle;
@@ -1390,7 +1390,7 @@ UINT32 gatt_add_sdp_record (tBT_UUID *p_uuid, UINT16 start_hdl, UINT16 end_hdl)
proto_elem_list[0].protocol_uuid = UUID_PROTOCOL_L2CAP;
proto_elem_list[0].num_params = 1;
proto_elem_list[0].params[0] = BT_PSM_ATT;
- proto_elem_list[1].protocol_uuid = UUID_PROTOCOL_ATT;
+ proto_elem_list[1].protocol_uuid = UUID_PROTOCOL_ATT;
proto_elem_list[1].num_params = 2;
proto_elem_list[1].params[0] = start_hdl;
proto_elem_list[1].params[1] = end_hdl;
@@ -1455,7 +1455,7 @@ tGATT_REG *gatt_get_regcb (tGATT_IF gatt_if)
**
** Function gatt_is_clcb_allocated
**
-** Description The function check clcb for conn_id is allocated or not
+** Description The function check clcb for conn_id is allocated or not
**
** Returns True already allocated
**
@@ -1471,7 +1471,7 @@ BOOLEAN gatt_is_clcb_allocated (UINT16 conn_id)
if (gatt_cb.clcb[i].in_use && (gatt_cb.clcb[i].conn_id == conn_id))
{
is_allocated = TRUE;
- break;
+ break;
}
}
@@ -1536,7 +1536,7 @@ void gatt_clcb_dealloc (tGATT_CLCB *p_clcb)
**
** Function gatt_find_tcb_by_cid
**
-** Description The function searches for an empty entry
+** Description The function searches for an empty entry
** in registration info table for GATT client
**
** Returns NULL if not found. Otherwise pointer to the rcb.
@@ -1743,7 +1743,7 @@ void gatt_sr_reset_prep_cnt(tGATT_TCB *p_tcb )
**
** Function gatt_sr_update_cback_cnt
**
-** Description Update the teh applicaiton callback count
+** Description Update the teh applicaiton callback count
**
** Returns None
**
@@ -1778,9 +1778,9 @@ void gatt_sr_update_cback_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc
**
** Function gatt_sr_update_prep_cnt
**
-** Description Update the teh prepare write request count
+** Description Update the teh prepare write request count
**
-** Returns None
+** Returns None
**
*******************************************************************************/
void gatt_sr_update_prep_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc, BOOLEAN is_reset_first)
@@ -1788,7 +1788,7 @@ void gatt_sr_update_prep_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc,
UINT8 idx = ((UINT8) gatt_if) - 1 ;
GATT_TRACE_DEBUG4("gatt_sr_update_prep_cnt tcb idx=%d gatt_if=%d is_inc=%d is_reset_first=%d",
- p_tcb->tcb_idx, gatt_if, is_inc, is_reset_first);
+ p_tcb->tcb_idx, gatt_if, is_inc, is_reset_first);
if (p_tcb)
{
@@ -1936,8 +1936,8 @@ tGATT_CLCB * gatt_cmd_dequeue(tGATT_TCB *p_tcb, UINT8 *p_op_code)
** Returns status code
**
*******************************************************************************/
-UINT8 gatt_send_write_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
- UINT16 handle, UINT16 len,
+UINT8 gatt_send_write_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
+ UINT16 handle, UINT16 len,
UINT16 offset, UINT8 *p_data)
{
tGATT_CL_MSG msg;
@@ -1962,7 +1962,7 @@ UINT8 gatt_send_write_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code,
** Returns status code
**
*******************************************************************************/
-UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle,
+UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle,
UINT16 e_handle, tBT_UUID uuid)
{
tGATT_CL_MSG msg;
@@ -1994,7 +1994,7 @@ void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
UINT16 conn_id;
UINT8 operation;
- GATT_TRACE_DEBUG3 ("gatt_end_operation status=%d op=%d subtype=%d",
+ GATT_TRACE_DEBUG3 ("gatt_end_operation status=%d op=%d subtype=%d",
status, p_clcb->operation, p_clcb->op_subtype);
if (p_cmpl_cb != NULL && p_clcb->operation != 0)
@@ -2050,7 +2050,7 @@ void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
else if (p_cmpl_cb && op)
(*p_cmpl_cb)(conn_id, op, status, &cb_data);
else
- GATT_TRACE_WARNING3 ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
+ GATT_TRACE_WARNING3 ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
operation, p_disc_cmpl_cb, p_cmpl_cb);
}
@@ -2102,7 +2102,7 @@ void gatt_cleanup_upon_disc(BD_ADDR bda, UINT16 reason)
p_reg = &gatt_cb.cl_rcb[i];
if (p_reg->in_use && p_reg->app_cb.p_conn_cb)
{
- conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
+ conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
GATT_TRACE_DEBUG3 ("found p_reg tcb_idx=%d gatt_if=%d conn_id=0x%x", p_tcb->tcb_idx, p_reg->gatt_if, conn_id);
(*p_reg->app_cb.p_conn_cb)(p_reg->gatt_if, bda, conn_id, FALSE, reason);
}
@@ -2162,12 +2162,12 @@ void gatt_dbg_display_uuid(tBT_UUID bt_uuid)
}
else if (bt_uuid.len == LEN_UUID_128)
{
- x += sprintf(&str_buf[x], "0x%02x%02x%02x%02x%02x%02x%02x%02x",
+ x += sprintf(&str_buf[x], "0x%02x%02x%02x%02x%02x%02x%02x%02x",
bt_uuid.uu.uuid128[15], bt_uuid.uu.uuid128[14],
bt_uuid.uu.uuid128[13], bt_uuid.uu.uuid128[12],
bt_uuid.uu.uuid128[11], bt_uuid.uu.uuid128[10],
bt_uuid.uu.uuid128[9], bt_uuid.uu.uuid128[8]);
- sprintf(&str_buf[x], "%02x%02x%02x%02x%02x%02x%02x%02x",
+ sprintf(&str_buf[x], "%02x%02x%02x%02x%02x%02x%02x%02x",
bt_uuid.uu.uuid128[7], bt_uuid.uu.uuid128[6],
bt_uuid.uu.uuid128[5], bt_uuid.uu.uuid128[4],
bt_uuid.uu.uuid128[3], bt_uuid.uu.uuid128[2],
@@ -2403,8 +2403,8 @@ BOOLEAN gatt_remove_bg_dev_from_list(tGATT_IF gatt_if, BD_ADDR bd_addr)
p_dev->gatt_if[i] = 0;
for (j = i + 1; j < GATT_MAX_APPS; j ++)
- p_dev->gatt_if[j - 1] = p_dev->gatt_if[j];
-
+ p_dev->gatt_if[j - 1] = p_dev->gatt_if[j];
+
if (p_dev->gatt_if[0] == 0)
{
ret = BTM_BleUpdateBgConnDev(FALSE, p_dev->remote_bda);
@@ -2444,7 +2444,7 @@ void gatt_deregister_bgdev_list(tGATT_IF gatt_if)
else if (p_dev_list->gatt_if[j] == gatt_if)
{
for (k = j + 1; k < GATT_MAX_APPS; k ++)
- p_dev_list->gatt_if[k - 1] = p_dev_list->gatt_if[k];
+ p_dev_list->gatt_if[k - 1] = p_dev_list->gatt_if[k];
if (p_dev_list->gatt_if[0] == 0)
{
@@ -2477,7 +2477,7 @@ void gatt_reset_bgdev_list(void)
**
** Function gatt_update_auto_connect_dev
**
-** Description This function add or remove a device for background connection
+** Description This function add or remove a device for background connection
** procedure.
**
** Parameters gatt_if: Application ID.
diff --git a/stack/hcic/hciblecmds.c b/stack/hcic/hciblecmds.c
index 7be3520..d491ca4 100644
--- a/stack/hcic/hciblecmds.c
+++ b/stack/hcic/hciblecmds.c
@@ -148,7 +148,7 @@ BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_bda)
return (TRUE);
}
-BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
+BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
UINT8 adv_type, UINT8 addr_type_own,
UINT8 addr_type_dir, BD_ADDR direct_bda,
UINT8 channel_map, UINT8 adv_filter_policy)
@@ -252,7 +252,7 @@ BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 *p_scan_rsp)
if (p_scan_rsp != NULL && data_len > 0)
{
- if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP )
+ if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP )
data_len = HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP;
UINT8_TO_STREAM (pp, data_len);
@@ -286,8 +286,8 @@ BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable)
btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p);
return (TRUE);
}
-BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
- UINT16 scan_int, UINT16 scan_win,
+BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
+ UINT16 scan_int, UINT16 scan_win,
UINT8 addr_type_own, UINT8 scan_filter_policy)
{
BT_HDR *p;
@@ -338,11 +338,11 @@ BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate)
}
/* link layer connection management commands */
-BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
- UINT8 init_filter_policy,
- UINT8 addr_type_peer, BD_ADDR bda_peer,
+BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
+ UINT8 init_filter_policy,
+ UINT8 addr_type_peer, BD_ADDR bda_peer,
UINT8 addr_type_own,
- UINT16 conn_int_min, UINT16 conn_int_max,
+ UINT16 conn_int_min, UINT16 conn_int_max,
UINT16 conn_latency, UINT16 conn_timeout,
UINT16 min_ce_len, UINT16 max_ce_len)
{
@@ -486,7 +486,7 @@ BOOLEAN btsnd_hcic_ble_remove_from_white_list (UINT8 addr_type, BD_ADDR bda)
return (TRUE);
}
-BOOLEAN btsnd_hcic_ble_upd_ll_conn_params (UINT16 handle,
+BOOLEAN btsnd_hcic_ble_upd_ll_conn_params (UINT16 handle,
UINT16 conn_int_min, UINT16 conn_int_max,
UINT16 conn_latency, UINT16 conn_timeout,
UINT16 min_ce_len, UINT16 max_ce_len)
@@ -585,14 +585,14 @@ BOOLEAN btsnd_hcic_ble_read_remote_feat (UINT16 handle)
}
/* security management commands */
-BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
void *p_cmd_cplt_cback)
{
BT_HDR *p;
UINT8 *pp;
- if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
+ if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
HCIC_PARAM_SIZE_BLE_ENCRYPT)) == NULL)
return (FALSE);
@@ -603,7 +603,7 @@ BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
*((void **)pp) = p_cmd_cplt_cback; /* Store command complete callback in buffer */
pp += sizeof(void *); /* Skip over callback pointer */
-
+
UINT16_TO_STREAM (pp, HCI_BLE_ENCRYPT);
UINT8_TO_STREAM (pp, HCIC_PARAM_SIZE_BLE_ENCRYPT);
@@ -612,7 +612,7 @@ BOOLEAN btsnd_hcic_ble_encrypt (UINT8 *key, UINT8 key_len,
if (key_len > HCIC_BLE_ENCRYT_KEY_SIZE) key_len = HCIC_BLE_ENCRYT_KEY_SIZE;
if (pt_len > HCIC_BLE_ENCRYT_KEY_SIZE) pt_len = HCIC_BLE_ENCRYT_KEY_SIZE;
-
+
ARRAY_TO_STREAM (pp, key, key_len);
pp += (HCIC_BLE_ENCRYT_KEY_SIZE - key_len);
ARRAY_TO_STREAM (pp, plain_text, pt_len);
@@ -626,7 +626,7 @@ BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback)
BT_HDR *p;
UINT8 *pp;
- if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
+ if ((p = HCI_GET_CMD_BUF(sizeof(BT_HDR) + sizeof (void *) +
HCIC_PARAM_SIZE_BLE_RAND)) == NULL)
return (FALSE);
diff --git a/stack/hcic/hcicmds.c b/stack/hcic/hcicmds.c
index 2a5299e..edc98a2 100644
--- a/stack/hcic/hcicmds.c
+++ b/stack/hcic/hcicmds.c
@@ -71,7 +71,7 @@ BOOLEAN btsnd_hcic_inq_cancel(void)
return (TRUE);
}
-BOOLEAN btsnd_hcic_per_inq_mode (UINT16 max_period, UINT16 min_period,
+BOOLEAN btsnd_hcic_per_inq_mode (UINT16 max_period, UINT16 min_period,
const LAP inq_lap, UINT8 duration, UINT8 response_cnt)
{
BT_HDR *p;
@@ -325,7 +325,7 @@ BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr)
return (TRUE);
}
-BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, UINT8 pin_code_len,
+BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, UINT8 pin_code_len,
PIN_CODE pin_code)
{
BT_HDR *p;
@@ -348,7 +348,7 @@ BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, UINT8 pin_code_len,
for (i = 0; i < pin_code_len; i++)
*pp++ = *pin_code++;
-
+
for (; i < PIN_CODE_LEN; i++)
*pp++ = 0;
@@ -793,7 +793,7 @@ BOOLEAN btsnd_hcic_sniff_mode (UINT16 handle, UINT16 max_sniff_period,
}
BOOLEAN btsnd_hcic_exit_sniff_mode (UINT16 handle)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -840,7 +840,7 @@ BOOLEAN btsnd_hcic_park_mode (UINT16 handle, UINT16 beacon_max_interval,
}
BOOLEAN btsnd_hcic_exit_park_mode (UINT16 handle)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -864,7 +864,7 @@ BOOLEAN btsnd_hcic_exit_park_mode (UINT16 handle)
BOOLEAN btsnd_hcic_qos_setup (UINT16 handle, UINT8 flags, UINT8 service_type,
UINT32 token_rate, UINT32 peak, UINT32 latency,
UINT32 delay_var)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -1025,7 +1025,7 @@ BOOLEAN btsnd_hcic_flow_specification(UINT16 handle, UINT8 flags, UINT8 flow_dir
UINT8 service_type, UINT32 token_rate,
UINT32 token_bucket_size, UINT32 peak,
UINT32 latency)
-{
+{
BT_HDR *p;
UINT8 *pp;
@@ -1287,7 +1287,7 @@ BOOLEAN btsnd_hcic_read_stored_key (BD_ADDR bd_addr, BOOLEAN read_all_flag)
BOOLEAN btsnd_hcic_write_stored_key (UINT8 num_keys, BD_ADDR *bd_addr,
LINK_KEY *link_key)
-{
+{
BT_HDR *p;
UINT8 *pp;
int j;
@@ -1981,7 +1981,7 @@ BOOLEAN btsnd_hcic_set_host_flow_ctrl (UINT8 value)
return (TRUE);
}
-BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len, UINT8 sco_len,
+BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len, UINT8 sco_len,
UINT16 acl_num, UINT16 sco_num)
{
BT_HDR *p;
@@ -2237,9 +2237,9 @@ BOOLEAN btsnd_hcic_write_page_scan_mode (UINT8 mode)
*******************************************/
#if BTM_SSR_INCLUDED == TRUE
-BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
+BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
UINT16 min_remote_lat, UINT16 min_local_lat)
-{
+{
BT_HDR *p;
UINT8 *pp;
diff --git a/stack/hid/hid_conn.h b/stack/hid/hid_conn.h
index 436b8d9..41eeaaf 100644
--- a/stack/hid/hid_conn.h
+++ b/stack/hid/hid_conn.h
@@ -51,6 +51,6 @@ typedef struct hid_conn
#define HID_NOSEC_CHN 2
#define HIDD_SEC_CHN 3
-#define HIDD_NOSEC_CHN 4
+#define HIDD_NOSEC_CHN 4
#endif
diff --git a/stack/hid/hidh_api.c b/stack/hid/hidh_api.c
index e0314f4..268b405 100644
--- a/stack/hid/hidh_api.c
+++ b/stack/hid/hidh_api.c
@@ -134,31 +134,31 @@ static void hidh_search_callback (UINT16 sdp_result)
attr_mask |= HID_VIRTUAL_CABLE;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_RECONNECT_INITIATE)) != NULL) &&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_RECONNECT_INITIATE)) != NULL) &&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_RECONN_INIT;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_NORMALLY_CONNECTABLE)) != NULL) &&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_NORMALLY_CONNECTABLE)) != NULL) &&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_NORMALLY_CONNECTABLE;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SDP_DISABLE)) != NULL)&&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SDP_DISABLE)) != NULL)&&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_SDP_DISABLE;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_BATTERY_POWER)) != NULL)&&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_BATTERY_POWER)) != NULL)&&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_BATTERY_POWER;
}
- if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_REMOTE_WAKE)) != NULL)&&
+ if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_REMOTE_WAKE)) != NULL)&&
(p_attr->attr_value.v.u8) )
{
attr_mask |= HID_REMOTE_WAKE;
@@ -169,33 +169,33 @@ static void hidh_search_callback (UINT16 sdp_result)
hidh_get_str_attr( p_rec, ATTR_ID_PROVIDER_NAME, HID_MAX_PROV_NAME_LEN, p_nvi->prov_name );
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_DEVICE_RELNUM)) != NULL))
- {
+ {
p_nvi->rel_num = p_attr->attr_value.v.u16;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_COUNTRY_CODE)) != NULL))
- {
+ {
p_nvi->ctry_code = p_attr->attr_value.v.u8;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_DEVICE_SUBCLASS)) != NULL))
- {
+ {
p_nvi->sub_class = p_attr->attr_value.v.u8;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_PARSER_VERSION)) != NULL))
- {
+ {
p_nvi->hpars_ver = p_attr->attr_value.v.u16;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_LINK_SUPERVISION_TO)) != NULL))
- {
+ {
attr_mask |= HID_SUP_TOUT_AVLBL;
p_nvi->sup_timeout = p_attr->attr_value.v.u16;
}
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SSR_HOST_MAX_LAT)) != NULL))
- {
+ {
attr_mask |= HID_SSR_MAX_LATENCY;
p_nvi->ssr_max_latency = p_attr->attr_value.v.u16;
}
@@ -203,7 +203,7 @@ static void hidh_search_callback (UINT16 sdp_result)
p_nvi->ssr_max_latency = HID_SSR_PARAM_INVALID;
if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_SSR_HOST_MIN_TOUT)) != NULL))
- {
+ {
attr_mask |= HID_SSR_MIN_TOUT;
p_nvi->ssr_min_tout = p_attr->attr_value.v.u16;
}
@@ -304,7 +304,7 @@ tHID_STATUS HID_HostDeregister(void)
{
HID_HostRemoveDev( i ) ;
}
-
+
hidh_conn_dereg();
hh_cb.reg_flag = FALSE;
@@ -421,11 +421,11 @@ tHID_STATUS HID_HostOpenDev ( UINT8 dev_handle )
**
** report_id: is only used on GET_REPORT transaction if is specified.
** only valid when it's a non-zero value.
-**
+**
** Returns void
**
*******************************************************************************/
-tHID_STATUS HID_HostWriteDev( UINT8 dev_handle, UINT8 t_type,
+tHID_STATUS HID_HostWriteDev( UINT8 dev_handle, UINT8 t_type,
UINT8 param, UINT16 data, UINT8 report_id, BT_HDR *pbuf )
{
tHID_STATUS status = HID_SUCCESS;
@@ -455,7 +455,7 @@ tHID_STATUS HID_HostWriteDev( UINT8 dev_handle, UINT8 t_type,
}
else
status = hidh_conn_snd_data( dev_handle, t_type, param, data, report_id, pbuf ) ;
-
+
return status;
}
@@ -488,42 +488,42 @@ tHID_STATUS HID_HostCloseDev( UINT8 dev_handle )
tHID_STATUS HID_HostSetSecurityLevel( char serv_name[], UINT8 sec_lvl )
{
- if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
+ if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
sec_lvl, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_SEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 1 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
+ if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_SEC_CTRL,
sec_lvl, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_SEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 2 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
+ if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
BTM_SEC_NONE, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_NOSEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 3 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
+ if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_NOSEC_CTRL,
BTM_SEC_NONE, HID_PSM_CONTROL, BTM_SEC_PROTO_HID, HID_NOSEC_CHN))
{
HIDH_TRACE_ERROR0 ("Security Registration 4 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_INTR,
+ if (!BTM_SetSecurityLevel (TRUE, serv_name, BTM_SEC_SERVICE_HID_INTR,
BTM_SEC_NONE, HID_PSM_INTERRUPT, BTM_SEC_PROTO_HID, 0))
{
HIDH_TRACE_ERROR0 ("Security Registration 5 failed");
return (HID_ERR_NO_RESOURCES);
}
- if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_INTR,
+ if (!BTM_SetSecurityLevel (FALSE, serv_name, BTM_SEC_SERVICE_HID_INTR,
BTM_SEC_NONE, HID_PSM_INTERRUPT, BTM_SEC_PROTO_HID, 0))
{
HIDH_TRACE_ERROR0 ("Security Registration 6 failed");
diff --git a/stack/hid/hidh_conn.c b/stack/hid/hidh_conn.c
index 2664dcf..29c4025 100644
--- a/stack/hid/hidh_conn.c
+++ b/stack/hid/hidh_conn.c
@@ -46,7 +46,7 @@ static void hidh_l2cif_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg);
static void hidh_l2cif_disconnect_cfm (UINT16 l2cap_cid, UINT16 result);
static void hidh_l2cif_cong_ind (UINT16 l2cap_cid, BOOLEAN congested);
-static const tL2CAP_APPL_INFO hst_reg_info =
+static const tL2CAP_APPL_INFO hst_reg_info =
{
hidh_l2cif_connect_ind,
hidh_l2cif_connect_cfm,
@@ -159,18 +159,18 @@ void hidh_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
p_dev->conn.conn_state = HID_CONN_STATE_CONNECTING_INTR;
/* Send response to the L2CAP layer. */
- L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_OK, L2CAP_CONN_OK);
/* Send a Configuration Request. */
L2CA_ConfigReq (p_dev->conn.ctrl_cid, &hh_cb.l2cap_cfg);
-
+
}
/* security check fail */
- else if (res != BTM_SUCCESS)
+ else if (res != BTM_SUCCESS)
{
p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
p_dev->conn.conn_state = HID_CONN_STATE_UNUSED;
- L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (p_dev->addr, p_dev->conn.ctrl_id, p_dev->conn.ctrl_cid, L2CAP_CONN_SECURITY_BLOCK, L2CAP_CONN_OK);
}
}
@@ -180,7 +180,7 @@ void hidh_sec_check_complete_term (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
**
** Description This function handles an inbound connection indication
** from L2CAP. This is the case where we are acting as a
-** server.
+** server.
**
** Returns void
**
@@ -190,7 +190,7 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
tHID_CONN *p_hcon;
BOOLEAN bAccept = TRUE;
int i;
- tHID_HOST_DEV_CTB *p_dev;
+ tHID_HOST_DEV_CTB *p_dev;
HIDH_TRACE_EVENT2 ("HID - Rcvd L2CAP conn ind, PSM: 0x%04x CID 0x%x", psm, l2cap_cid);
@@ -228,7 +228,7 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
#if defined(HID_HOST_ACPT_NEW_CONN) && (HID_HOST_ACPT_NEW_CONN == TRUE)
p_hcon->ctrl_cid = p_hcon->intr_cid = 0;
p_hcon->conn_state = HID_CONN_STATE_UNUSED;
-#else
+#else
if (p_hcon->conn_state != HID_CONN_STATE_UNUSED)
{
HIDH_TRACE_WARNING1 ("HID - Rcvd CTL L2CAP conn ind, wrong state: %d", p_hcon->conn_state);
@@ -251,12 +251,12 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL; /* In case disconnection occurs before security is completed, then set CLOSE_EVT reason code to 'connection failure' */
p_hcon->conn_state = HID_CONN_STATE_SECURITY;
- if(btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
- FALSE, BTM_SEC_PROTO_HID,
+ if(btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
+ FALSE, BTM_SEC_PROTO_HID,
(p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
&hidh_sec_check_complete_term, p_dev) == BTM_CMD_STARTED)
{
- L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
+ L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_PENDING, L2CAP_CONN_OK);
}
return;
@@ -267,7 +267,7 @@ static void hidh_l2cif_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 p
p_hcon->intr_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, &hh_cb.l2cap_cfg);
@@ -342,12 +342,12 @@ void hidh_sec_check_complete_orig (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
hidh_conn_retry (dhandle);
return;
}
- else
+ else
cb_res = HID_L2CAP_CONN_FAIL | HCI_ERR_PAGE_TIMEOUT ;
}
#endif
p_dev->conn.disc_reason = HID_ERR_AUTH_FAILED; /* Save reason for disconnecting */
- hidh_conn_disconnect(dhandle);
+ hidh_conn_disconnect(dhandle);
}
}
@@ -368,7 +368,7 @@ static void hidh_l2cif_connect_cfm (UINT16 l2cap_cid, UINT16 result)
UINT8 dhandle;
tHID_CONN *p_hcon = NULL;
UINT32 reason;
- tHID_HOST_DEV_CTB *p_dev = NULL;
+ tHID_HOST_DEV_CTB *p_dev = NULL;
/* Find CCB based on CID, and verify we are in a state to accept this message */
if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES )
@@ -397,7 +397,7 @@ static void hidh_l2cif_connect_cfm (UINT16 l2cap_cid, UINT16 result)
#if (HID_HOST_MAX_CONN_RETRY > 0)
if( (hh_cb.devices[dhandle].conn_tries <= HID_HOST_MAX_CONN_RETRY) &&
- (result == HCI_ERR_CONNECTION_TOUT || result == HCI_ERR_UNSPECIFIED ||
+ (result == HCI_ERR_CONNECTION_TOUT || result == HCI_ERR_UNSPECIFIED ||
result == HCI_ERR_PAGE_TIMEOUT) )
{
hidh_conn_retry(dhandle);
@@ -417,8 +417,8 @@ static void hidh_l2cif_connect_cfm (UINT16 l2cap_cid, UINT16 result)
p_hcon->conn_state = HID_CONN_STATE_SECURITY;
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL; /* In case disconnection occurs before security is completed, then set CLOSE_EVT reason code to "connection failure" */
- btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
- TRUE, BTM_SEC_PROTO_HID,
+ btm_sec_mx_access_request (p_dev->addr, HID_PSM_CONTROL,
+ TRUE, BTM_SEC_PROTO_HID,
(p_dev->attr_mask & HID_SEC_REQUIRED) ? HID_SEC_CHN : HID_NOSEC_CHN,
&hidh_sec_check_complete_orig, p_dev);
}
@@ -448,7 +448,7 @@ static void hidh_l2cif_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
UINT8 dhandle;
tHID_CONN *p_hcon = NULL;
- tHID_HOST_DEV_CTB *p_dev;
+ tHID_HOST_DEV_CTB *p_dev;
/* Find CCB based on CID */
if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES )
@@ -597,7 +597,7 @@ static void hidh_l2cif_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
disc_res = btm_get_acl_disc_reason_code();
#if (HID_HOST_MAX_CONN_RETRY > 0)
- if( (disc_res == HCI_ERR_CONNECTION_TOUT || disc_res == HCI_ERR_UNSPECIFIED) &&
+ if( (disc_res == HCI_ERR_CONNECTION_TOUT || disc_res == HCI_ERR_UNSPECIFIED) &&
(!(hh_cb.devices[dhandle].attr_mask & HID_RECONN_INIT)) &&
(hh_cb.devices[dhandle].attr_mask & HID_NORMALLY_CONNECTABLE))
{
@@ -612,7 +612,7 @@ static void hidh_l2cif_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
hid_close_evt_reason = p_hcon->disc_reason;
/* If we got baseband sent HCI_DISCONNECT_COMPLETE_EVT due to security failure, then set reason to HID_ERR_AUTH_FAILED */
- if ((disc_res == HCI_ERR_AUTH_FAILURE) ||
+ if ((disc_res == HCI_ERR_AUTH_FAILURE) ||
(disc_res == HCI_ERR_KEY_MISSING) ||
(disc_res == HCI_ERR_HOST_REJECT_SECURITY) ||
(disc_res == HCI_ERR_PAIRING_NOT_ALLOWED) ||
@@ -775,13 +775,13 @@ static void hidh_l2cif_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)
case HID_TRANS_DATA:
- evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
+ evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
HID_HDEV_EVT_INTR_DATA : HID_HDEV_EVT_CTRL_DATA;
hh_cb.callback(dhandle, evt, rep_type, p_msg);
break;
case HID_TRANS_DATAC:
- evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
+ evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ?
HID_HDEV_EVT_INTR_DATC : HID_HDEV_EVT_CTRL_DATC;
hh_cb.callback(dhandle, evt, rep_type, p_msg);
break;
@@ -802,7 +802,7 @@ static void hidh_l2cif_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)
** Returns tHID_STATUS
**
*******************************************************************************/
-tHID_STATUS hidh_conn_snd_data (UINT8 dhandle, UINT8 trans_type, UINT8 param,
+tHID_STATUS hidh_conn_snd_data (UINT8 dhandle, UINT8 trans_type, UINT8 param,
UINT16 data, UINT8 report_id, BT_HDR *buf)
{
tHID_CONN *p_hcon = &hh_cb.devices[dhandle].conn;
diff --git a/stack/hid/hidh_int.h b/stack/hid/hidh_int.h
index 6be1337..8e1a8a2 100644
--- a/stack/hid/hidh_int.h
+++ b/stack/hid/hidh_int.h
@@ -28,7 +28,7 @@ typedef struct per_device_ctb
UINT16 attr_mask; /* 0x01- virtual_cable; 0x02- normally_connectable; 0x03- reconn_initiate;
0x04- sdp_disable; */
UINT8 state; /* Device state if in HOST-KNOWN mode */
- UINT8 conn_substate;
+ UINT8 conn_substate;
UINT8 conn_tries; /* Remembers to the number of connection attempts while CONNECTING */
tHID_CONN conn; /* L2CAP channel info */
@@ -43,7 +43,7 @@ typedef struct host_ctb
#define MAX_SERVICE_DB_SIZE 4000
BOOLEAN sdp_busy;
- tHID_HOST_SDP_CALLBACK *sdp_cback;
+ tHID_HOST_SDP_CALLBACK *sdp_cback;
tSDP_DISCOVERY_DB *p_sdp_db;
tHID_DEV_SDP_INFO sdp_rec;
BOOLEAN reg_flag;
diff --git a/stack/include/a2d_api.h b/stack/include/a2d_api.h
index 32122dd..6bb7f0b 100644
--- a/stack/include/a2d_api.h
+++ b/stack/include/a2d_api.h
@@ -44,7 +44,7 @@
#define A2D_INVALID_PARAMS 0x0C /* bad parameters */
#define A2D_WRONG_CODEC 0x0D /* wrong codec info */
#define A2D_BAD_CODEC_TYPE 0xC1 /* Media Codec Type is not valid */
-#define A2D_NS_CODEC_TYPE 0xC2 /* Media Codec Type is not supported */
+#define A2D_NS_CODEC_TYPE 0xC2 /* Media Codec Type is not supported */
#define A2D_BAD_SAMP_FREQ 0xC3 /* Sampling Frequency is not valid or multiple values have been selected */
#define A2D_NS_SAMP_FREQ 0xC4 /* Sampling Frequency is not supported */
#define A2D_BAD_CH_MODE 0xC5 /* Channel Mode is not valid or multiple values have been selected */
@@ -67,7 +67,7 @@
#define A2D_BAD_OBJ_TYPE 0xD6 /* Either 1) Object type is not valid (b3-b0) or 2) None or multiple values have been selected for Object Type */
#define A2D_NS_OBJ_TYPE 0xD7 /* Object type is not supported */
#define A2D_BAD_CHANNEL 0xD8 /* None or multiple values have been selected for Channels */
-#define A2D_NS_CHANNEL 0xD9 /* Channels is not supported */
+#define A2D_NS_CHANNEL 0xD9 /* Channels is not supported */
#define A2D_BAD_BLOCK_LEN 0xDD /* None or multiple values have been selected for Block Length */
#define A2D_BAD_CP_TYPE 0xE0 /* The requested CP Type is not supported. */
#define A2D_BAD_CP_FORMAT 0xE1 /* The format of Content Protection Service Capability/Content Protection Scheme Dependent Data is not correct. */
@@ -175,7 +175,7 @@ A2D_API extern tA2D_STATUS A2D_AddRecord(UINT16 service_uuid, char *p_service_na
**
** p_db: Pointer to the information to initialize
** the discovery database.
-**
+**
** p_cback: Pointer to the A2D_FindService()
** callback function.
**
diff --git a/stack/include/avct_api.h b/stack/include/avct_api.h
index b244570..b4e819b 100644
--- a/stack/include/avct_api.h
+++ b/stack/include/avct_api.h
@@ -120,7 +120,7 @@ extern "C"
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVCTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -136,7 +136,7 @@ AVCT_API extern void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask);
** application in the system. Before this function can be
** called, all connections must be removed with
** AVCT_RemoveConn().
-**
+**
**
** Returns void
**
@@ -152,9 +152,9 @@ AVCT_API extern void AVCT_Deregister(void);
** the p_cc->role parameter. When this function is called to
** create an initiator connection, an AVCTP connection to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -170,7 +170,7 @@ AVCT_API extern UINT16 AVCT_CreateConn(UINT8 *p_handle, tAVCT_CC *p_cc,
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -186,9 +186,9 @@ AVCT_API extern UINT16 AVCT_RemoveConn(UINT8 handle);
** the p_cc->role parameter. When this function is called to
** create an initiator connection, an AVCTP connection to
** the peer device is initiated if one does not already exist.
-** If an acceptor connection is created, the connection waits
+** If an acceptor connection is created, the connection waits
** passively for an incoming AVCTP connection from a peer device.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -203,7 +203,7 @@ AVCT_API extern UINT16 AVCT_CreateBrowse(UINT8 handle, UINT8 role);
** the application is no longer using a connection. If this
** is the last connection to a peer the L2CAP channel for AVCTP
** will be closed.
-**
+**
**
** Returns AVCT_SUCCESS if successful, otherwise error.
**
@@ -214,7 +214,7 @@ AVCT_API extern UINT16 AVCT_RemoveBrowse(UINT8 handle);
**
** Function AVCT_GetBrowseMtu
**
-** Description Get the peer_mtu for the AVCTP Browse channel of the given
+** Description Get the peer_mtu for the AVCTP Browse channel of the given
** connection.
**
** Returns the peer browsing channel MTU.
@@ -226,7 +226,7 @@ AVCT_API extern UINT16 AVCT_GetBrowseMtu (UINT8 handle);
**
** Function AVCT_GetPeerMtu
**
-** Description Get the peer_mtu for the AVCTP channel of the given
+** Description Get the peer_mtu for the AVCTP channel of the given
** connection.
**
** Returns the peer MTU size.
diff --git a/stack/include/avdt_api.h b/stack/include/avdt_api.h
index 6995430..317386e 100644
--- a/stack/include/avdt_api.h
+++ b/stack/include/avdt_api.h
@@ -57,7 +57,7 @@
/* The marker bit is used by the application to mark significant events such
** as frame boundaries in the data stream. This constant is used to check or
** set the marker bit in the m_pt parameter of an AVDT_WriteReq()
-** or AVDT_DATA_IND_EVT.
+** or AVDT_DATA_IND_EVT.
*/
#define AVDT_MARKER_SET 0x80
@@ -273,7 +273,7 @@ typedef struct {
} tAVDT_EVT_HDR;
/* This data structure is associated with the AVDT_GETCAP_CFM_EVT,
-** AVDT_RECONFIG_IND_EVT, and AVDT_RECONFIG_CFM_EVT.
+** AVDT_RECONFIG_IND_EVT, and AVDT_RECONFIG_CFM_EVT.
*/
typedef struct {
tAVDT_EVT_HDR hdr; /* Event header */
@@ -365,7 +365,7 @@ typedef void (tAVDT_MEDIA_CBACK)(UINT8 handle, UINT8 *p_payload, UINT32 payload_
#if AVDT_REPORTING == TRUE
/* This is the report callback function. It is executed when AVDTP has a reporting
-** packet ready for the application. This function is required for streams
+** packet ready for the application. This function is required for streams
** created with AVDT_PSC_REPORT.
*/
typedef void (tAVDT_REPORT_CBACK)(UINT8 handle, AVDT_REPORT_TYPE type,
@@ -412,7 +412,7 @@ extern "C"
** prepares the protocol stack for its use. This function
** must be called once by the system or platform using AVDTP
** before the other functions of the API an be used.
-**
+**
**
** Returns void
**
@@ -427,7 +427,7 @@ AVDT_API extern void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback);
** It is called when AVDTP is no longer being used by any
** application in the system. Before this function can be
** called, all streams must be removed with AVDT_RemoveStream().
-**
+**
**
** Returns void
**
@@ -443,7 +443,7 @@ AVDT_API extern void AVDT_Deregister(void);
** this endpoint and an endpoint on a peer device. In
** addition, a peer device can discover, get the capabilities,
** and connect to this endpoint.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -459,7 +459,7 @@ AVDT_API extern UINT16 AVDT_CreateStream(UINT8 *p_handle, tAVDT_CS *p_cs);
** If this function is called when the endpoint is connected
** the connection is closed and then the stream endpoint
** is removed.
-**
+**
**
** Returns AVDT_SUCCESS if successful, otherwise error.
**
@@ -476,7 +476,7 @@ AVDT_API extern UINT16 AVDT_RemoveStream(UINT8 handle);
** that AVDTP discovery is unrelated to SDP discovery).
** This function can be called at any time regardless of whether
** there is an AVDTP connection to the peer device.
-**
+**
** When discovery is complete, an AVDT_DISCOVER_CFM_EVT
** is sent to the application via its callback function.
** The application must not call AVDT_GetCapReq() or
@@ -505,7 +505,7 @@ AVDT_API extern UINT16 AVDT_DiscoverReq(BD_ADDR bd_addr, tAVDT_SEP_INFO *p_sep_i
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -532,7 +532,7 @@ AVDT_API extern UINT16 AVDT_GetCapReq(BD_ADDR bd_addr, UINT8 seid, tAVDT_CFG *p_
** capabilities of a stream endpoint on the peer device.
** This function can be called at any time regardless of
** whether there is an AVDTP connection to the peer device.
-**
+**
** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is
** sent to the application via its callback function. The
** application must not call AVDT_GetCapReq() or
@@ -832,10 +832,10 @@ AVDT_API extern UINT16 AVDT_WriteDataReq(UINT8 handle, UINT8 *p_data, UINT32 dat
** buffer if argument p_buf is NULL. This function can only
** be called if the stream is a SNK.
**
-** AVDTP uses this buffer to reassemble fragmented media packets.
+** AVDTP uses this buffer to reassemble fragmented media packets.
** When AVDTP receives a complete media packet, it calls the
** p_media_cback assigned by AVDT_CreateStream().
-** This function can be called during callback to assign a
+** This function can be called during callback to assign a
** different buffer for next media packet or can leave the current
** buffer for next packet.
**
@@ -848,11 +848,11 @@ AVDT_API extern UINT16 AVDT_SetMediaBuf(UINT8 handle, UINT8 *p_buf, UINT32 buf_l
**
** Function AVDT_SendReport
**
-** Description
-**
+** Description
+**
**
**
-** Returns
+** Returns
**
*******************************************************************************/
AVDT_API extern UINT16 AVDT_SendReport(UINT8 handle, AVDT_REPORT_TYPE type,
diff --git a/stack/include/avdtc_api.h b/stack/include/avdtc_api.h
index 444bafd..3b43221 100644
--- a/stack/include/avdtc_api.h
+++ b/stack/include/avdtc_api.h
@@ -3,9 +3,9 @@
** Name: avdt_capi.h
**
** Description: This interface file contains the interface AVDTP
-** conformance API. These additional API functions and
-** callback events are provided for conformance testing
-** purposes only. They are not intended to be used by
+** conformance API. These additional API functions and
+** callback events are provided for conformance testing
+** purposes only. They are not intended to be used by
** an application.
**
** Copyright (c) 2002-2009, Broadcom Corp., All Rights Reserved.
@@ -60,7 +60,7 @@ extern "C"
** Description This function is called to begin using the conformance API.
** It must be called after AVDT_Register() and before any
** other API or conformance API functions are called.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -71,7 +71,7 @@ AVDT_API extern void AVDTC_Init(tAVDTC_CTRL_CBACK *p_cback);
** Function AVDTC_DiscoverRsp
**
** Description Send a discover response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -82,7 +82,7 @@ AVDT_API extern void AVDTC_DiscoverRsp(BD_ADDR bd_addr, UINT8 label,
**
** Function AVDTC_GetCapRsp
**
-** Description Send a get capabilities response.
+** Description Send a get capabilities response.
**
** Returns void
**
@@ -93,7 +93,7 @@ AVDT_API extern void AVDTC_GetCapRsp(BD_ADDR bd_addr, UINT8 label, tAVDT_CFG *p_
**
** Function AVDTC_GetAllCapRsp
**
-** Description Send a get all capabilities response.
+** Description Send a get all capabilities response.
**
** Returns void
**
@@ -116,7 +116,7 @@ AVDT_API extern void AVDTC_GetConfigReq(UINT8 handle);
** Function AVDTC_GetConfigRsp
**
** Description Send a get configuration response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -127,7 +127,7 @@ AVDT_API extern void AVDTC_GetConfigRsp(UINT8 handle, UINT8 label, tAVDT_CFG *p_
** Function AVDTC_OpenReq
**
** Description Send an open request.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -149,7 +149,7 @@ AVDT_API extern void AVDTC_OpenRsp(UINT8 handle, UINT8 label);
** Function AVDTC_StartRsp
**
** Description Send a start response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -160,7 +160,7 @@ AVDT_API extern void AVDTC_StartRsp(UINT8 *p_handles, UINT8 num_handles, UINT8 l
** Function AVDTC_CloseRsp
**
** Description Send a close response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -182,7 +182,7 @@ AVDT_API extern void AVDTC_SuspendRsp(UINT8 *p_handles, UINT8 num_handles, UINT8
** Function AVDTC_AbortReq
**
** Description Send an abort request.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -193,7 +193,7 @@ AVDT_API extern void AVDTC_AbortReq(UINT8 handle);
** Function AVDTC_AbortRsp
**
** Description Send an abort response.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -208,7 +208,7 @@ AVDT_API extern void AVDTC_AbortRsp(UINT8 handle, UINT8 label);
** Returns void
**
*******************************************************************************/
-AVDT_API extern void AVDTC_Rej(UINT8 handle, BD_ADDR bd_addr, UINT8 cmd, UINT8 label,
+AVDT_API extern void AVDTC_Rej(UINT8 handle, BD_ADDR bd_addr, UINT8 cmd, UINT8 label,
UINT8 err_code, UINT8 err_param);
#ifdef __cplusplus
diff --git a/stack/include/avrc_api.h b/stack/include/avrc_api.h
index cdffd73..d7e8ee4 100644
--- a/stack/include/avrc_api.h
+++ b/stack/include/avrc_api.h
@@ -48,7 +48,7 @@
* This event can result from a call to AVRC_Close() or when the peer closes
* the connection. It is also sent when a connection attempted through
* AVRC_Open() fails. */
-#define AVRC_CLOSE_IND_EVT 1
+#define AVRC_CLOSE_IND_EVT 1
/* AVRC_CONG_IND_EVT event indicates that AVCTP is congested and cannot send
* any more messages. */
@@ -56,8 +56,8 @@
/* AVRC_UNCONG_IND_EVT event indicates that AVCTP is uncongested and ready to
* send messages. */
-#define AVRC_UNCONG_IND_EVT 3
-
+#define AVRC_UNCONG_IND_EVT 3
+
/* AVRC_BROWSE_OPEN_IND_EVT event is sent when the browse channel is successfully opened.
* This eventis sent in response to an AVRC_Open() or AVRC_OpenBrowse() . */
#define AVRC_BROWSE_OPEN_IND_EVT 4
@@ -66,7 +66,7 @@
* This event can result from a call to AVRC_Close(), AVRC_CloseBrowse() or when the peer closes
* the connection. It is also sent when a connection attempted through
* AVRC_OpenBrowse() fails. */
-#define AVRC_BROWSE_CLOSE_IND_EVT 5
+#define AVRC_BROWSE_CLOSE_IND_EVT 5
/* AVRC_BROWSE_CONG_IND_EVT event indicates that AVCTP browse channel is congested and cannot send
* any more messages. */
@@ -74,7 +74,7 @@
/* AVRC_BROWSE_UNCONG_IND_EVT event indicates that AVCTP browse channel is uncongested and ready to
* send messages. */
-#define AVRC_BROWSE_UNCONG_IND_EVT 7
+#define AVRC_BROWSE_UNCONG_IND_EVT 7
/* Supported categories */
#define AVRC_SUPF_CT_CAT1 0x0001 /* Category 1 */
@@ -123,7 +123,7 @@ typedef struct
* to remain after the callback function exits. */
typedef void (tAVRC_FIND_CBACK) (UINT16 status);
-
+
/* This is the control callback function. This function passes events
* listed in Table 20 to the application. */
typedef void (tAVRC_CTRL_CBACK) (UINT8 handle, UINT8 event, UINT16 result,
@@ -161,7 +161,7 @@ extern "C"
** Function AVRC_AddRecord
**
** Description This function is called to build an AVRCP SDP record.
-** Prior to calling this function the application must
+** Prior to calling this function the application must
** call SDP_CreateRecord() to create an SDP record.
**
** Input Parameters:
@@ -197,7 +197,7 @@ AVRC_API extern UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name,
** Description This function is called by the application to perform service
** discovery and retrieve AVRCP SDP record information from a
** peer device. Information is returned for the first service
-** record found on the server that matches the service UUID.
+** record found on the server that matches the service UUID.
** The callback function will be executed when service discovery
** is complete. There can only be one outstanding call to
** AVRC_FindService() at a time; the application must wait for
@@ -215,7 +215,7 @@ AVRC_API extern UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name,
** bd_addr: BD address of the peer device.
**
** p_db: SDP discovery database parameters.
-**
+**
** p_cback: Pointer to the callback function.
**
** Output Parameters:
@@ -234,13 +234,13 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
**
** Function AVRC_Open
**
-** Description This function is called to open a connection to AVCTP.
+** Description This function is called to open a connection to AVCTP.
** The connection can be either an initiator or acceptor, as
-** determined by the p_ccb->stream parameter.
+** determined by the p_ccb->stream parameter.
** The connection can be a target, a controller or for both role,
-** as determined by the p_ccb->control parameter.
+** as determined by the p_ccb->control parameter.
** By definition, a target connection is an acceptor connection
-** that waits for an incoming AVCTP connection from the peer.
+** that waits for an incoming AVCTP connection from the peer.
** The connection remains available to the application until
** the application closes it by calling AVRC_Close(). The
** application does not need to reopen the connection after an
@@ -252,7 +252,7 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
** p_ccb->p_ctrl_cback: Pointer to control callback function.
**
** p_ccb->p_msg_cback: Pointer to message callback function.
-**
+**
** p_ccb->conn: AVCTP connection role. This is set to
** AVCTP_INT for initiator connections and AVCTP_ACP
** for acceptor connections.
@@ -267,7 +267,7 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr,
** connections it can be set to NULL.
**
** Output Parameters:
-** p_handle: Pointer to handle. This parameter is only
+** p_handle: Pointer to handle. This parameter is only
** valid if AVRC_SUCCESS is returned.
**
** Returns AVRC_SUCCESS if successful.
@@ -302,9 +302,9 @@ AVRC_API extern UINT16 AVRC_Close(UINT8 handle);
**
** Function AVRC_OpenBrowse
**
-** Description This function is called to open a browsing connection to AVCTP.
+** Description This function is called to open a browsing connection to AVCTP.
** The connection can be either an initiator or acceptor, as
-** determined by the conn_role.
+** determined by the conn_role.
** The handle is returned by a previous call to AVRC_Open.
**
** Returns AVRC_SUCCESS if successful.
@@ -334,10 +334,10 @@ AVRC_API extern UINT16 AVRC_CloseBrowse(UINT8 handle);
**
** Description This function is used to send the AVRCP byte stream in p_pkt
** down to AVCTP.
-**
+**
** It is expected that p_pkt->offset is at least AVCT_MSG_OFFSET
** p_pkt->layer_specific is AVCT_DATA_CTRL or AVCT_DATA_BROWSE
-** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSING
+** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSING
** The above BT_HDR settings are set by the AVRC_Bld* functions.
**
** Returns AVRC_SUCCESS if successful.
@@ -411,7 +411,7 @@ AVRC_API extern UINT16 AVRC_SubCmd(UINT8 handle, UINT8 label, UINT8 page);
**
** label: Transaction label.
**
-** p_msg: Pointer to PASS THROUGH message structure.
+** p_msg: Pointer to PASS THROUGH message structure.
**
** Output Parameters:
** None.
@@ -427,7 +427,7 @@ AVRC_API extern UINT16 AVRC_PassCmd(UINT8 handle, UINT8 label, tAVRC_MSG_PASS *p
** Function AVRC_PassRsp
**
** Description Send a PASS THROUGH response to the peer device. This
-** function can only be called for target role connections.
+** function can only be called for target role connections.
** This function must be called when a PASS THROUGH command
** message is received from the peer through the
** tAVRC_MSG_CBACK callback function.
@@ -568,7 +568,7 @@ AVRC_API extern tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p
**
** Function AVRC_BldCommand
**
-** Description This function builds the given AVRCP command to the given
+** Description This function builds the given AVRCP command to the given
** GKI buffer
**
** Returns AVRC_STS_NO_ERROR, if the command is built successfully
@@ -581,7 +581,7 @@ AVRC_API extern tAVRC_STS AVRC_BldCommand( tAVRC_COMMAND *p_cmd, BT_HDR **pp_pkt
**
** Function AVRC_BldResponse
**
-** Description This function builds the given AVRCP response to the given
+** Description This function builds the given AVRCP response to the given
** GKI buffer
**
** Returns AVRC_STS_NO_ERROR, if the response is built successfully
@@ -607,10 +607,10 @@ AVRC_API extern BOOLEAN AVRC_IsValidAvcType(UINT8 pdu_id, UINT8 avc_type);
** Function AVRC_IsValidPlayerAttr
**
** Description Check if the given attrib value is a valid one
-**
+**
**
** Returns returns TRUE if it is valid
-**
+**
*******************************************************************************/
AVRC_API extern BOOLEAN AVRC_IsValidPlayerAttr(UINT8 attr);
diff --git a/stack/include/avrc_defs.h b/stack/include/avrc_defs.h
index 6d538cb..3f82948 100644
--- a/stack/include/avrc_defs.h
+++ b/stack/include/avrc_defs.h
@@ -164,7 +164,7 @@
** Metadata transfer definitions
*****************************************************************************/
-/* Define the Metadata Packet types
+/* Define the Metadata Packet types
*/
#define AVRC_PKT_SINGLE 0
#define AVRC_PKT_START 1
@@ -190,15 +190,15 @@
#define AVRC_PDU_ABORT_CONTINUATION_RSP 0x41
/* added in 1.4 */
#define AVRC_PDU_SET_ABSOLUTE_VOLUME 0x50
-#define AVRC_PDU_SET_ADDRESSED_PLAYER 0x60
-#define AVRC_PDU_SET_BROWSED_PLAYER 0x70
-#define AVRC_PDU_GET_FOLDER_ITEMS 0x71
-#define AVRC_PDU_CHANGE_PATH 0x72
-#define AVRC_PDU_GET_ITEM_ATTRIBUTES 0x73
-#define AVRC_PDU_PLAY_ITEM 0x74
-#define AVRC_PDU_SEARCH 0x80
-#define AVRC_PDU_ADD_TO_NOW_PLAYING 0x90
-#define AVRC_PDU_GENERAL_REJECT 0xA0
+#define AVRC_PDU_SET_ADDRESSED_PLAYER 0x60
+#define AVRC_PDU_SET_BROWSED_PLAYER 0x70
+#define AVRC_PDU_GET_FOLDER_ITEMS 0x71
+#define AVRC_PDU_CHANGE_PATH 0x72
+#define AVRC_PDU_GET_ITEM_ATTRIBUTES 0x73
+#define AVRC_PDU_PLAY_ITEM 0x74
+#define AVRC_PDU_SEARCH 0x80
+#define AVRC_PDU_ADD_TO_NOW_PLAYING 0x90
+#define AVRC_PDU_GENERAL_REJECT 0xA0
/* Define the vendor unique id carried in the pass through data
*/
@@ -346,7 +346,7 @@ typedef UINT8 tAVRC_SYSTEMSTATE;
#define AVRC_ITEM_MEDIA 0x03
#define AVRC_SCOPE_PLAYER_LIST 0x00 /* Media Player Item - Contains all available media players */
-#define AVRC_SCOPE_FILE_SYSTEM 0x01 /* Folder Item, Media Element Item
+#define AVRC_SCOPE_FILE_SYSTEM 0x01 /* Folder Item, Media Element Item
- The virtual filesystem containing the media content of the browsed player */
#define AVRC_SCOPE_SEARCH 0x02 /* Media Element Item The results of a search operation on the browsed player */
#define AVRC_SCOPE_NOW_PLAYING 0x03 /* Media Element Item The Now Playing list (or queue) of the addressed player */
@@ -381,7 +381,7 @@ typedef UINT8 tAVRC_SYSTEMSTATE;
#define AVRC_DIR_UP 0x00 /* Folder Up */
#define AVRC_DIR_DOWN 0x01 /* Folder Down */
-
+
#define AVRC_UID_SIZE 8
typedef UINT8 tAVRC_UID[AVRC_UID_SIZE];
@@ -741,7 +741,7 @@ typedef UINT8 tAVRC_UID[AVRC_UID_SIZE];
/*
This structure contains the header parameters of an AV/C message.
*/
-typedef struct
+typedef struct
{
UINT8 ctype; /* Command type. */
UINT8 subunit_type; /* Subunit type. */
@@ -766,7 +766,7 @@ typedef struct
tAVRC_HDR hdr; /* Message header. */
UINT8 subunit_type[AVRC_SUB_TYPE_LEN];
/* Array containing subunit type values. */
- BOOLEAN panel; /* TRUE if the panel subunit type is in the
+ BOOLEAN panel; /* TRUE if the panel subunit type is in the
* subunit_type array, FALSE otherwise. */
UINT8 page; /* Specifies which part of the subunit type table is
* returned. For AVRCP it is typically zero.
@@ -826,7 +826,7 @@ typedef union
#define AVRC_IS_VALID_CAP_ID(a) (((a == AVRC_CAP_COMPANY_ID) || (a == AVRC_CAP_EVENTS_SUPPORTED)) ? TRUE : FALSE)
#define AVRC_IS_VALID_EVENT_ID(a) (((a >= AVRC_EVT_PLAY_STATUS_CHANGE) && \
- (a <= AVRC_EVT_APP_SETTING_CHANGE)) ? TRUE : FALSE)
+ (a <= AVRC_EVT_APP_SETTING_CHANGE)) ? TRUE : FALSE)
#define AVRC_IS_VALID_ATTRIBUTE(a) (((((a > 0) && a <= AVRC_PLAYER_SETTING_SCAN)) || \
((a >= AVRC_PLAYER_SETTING_LOW_MENU_EXT) && \
@@ -834,7 +834,7 @@ typedef union
#define AVRC_IS_VALID_MEDIA_ATTRIBUTE(a) ((a >= AVRC_MEDIA_ATTR_ID_TITLE) && \
- (a <= AVRC_MEDIA_ATTR_ID_PLAYING_TIME) ? TRUE : FALSE)
+ (a <= AVRC_MEDIA_ATTR_ID_PLAYING_TIME) ? TRUE : FALSE)
#define AVRC_IS_VALID_BATTERY_STATUS(a) ((a <= AVRC_BATTERY_STATUS_FULL_CHARGE) ? TRUE : FALSE)
@@ -902,13 +902,13 @@ typedef UINT8 tAVRC_FEATURE_MASK[AVRC_FEATURE_MASK_SIZE];
typedef struct
{
- UINT16 player_id; /* A unique identifier for this media player.*/
- UINT8 major_type; /* Use AVRC_MJ_TYPE_AUDIO, AVRC_MJ_TYPE_VIDEO, AVRC_MJ_TYPE_BC_AUDIO, or AVRC_MJ_TYPE_BC_VIDEO.*/
- UINT32 sub_type; /* Use AVRC_SUB_TYPE_NONE, AVRC_SUB_TYPE_AUDIO_BOOK, or AVRC_SUB_TYPE_PODCAST*/
+ UINT16 player_id; /* A unique identifier for this media player.*/
+ UINT8 major_type; /* Use AVRC_MJ_TYPE_AUDIO, AVRC_MJ_TYPE_VIDEO, AVRC_MJ_TYPE_BC_AUDIO, or AVRC_MJ_TYPE_BC_VIDEO.*/
+ UINT32 sub_type; /* Use AVRC_SUB_TYPE_NONE, AVRC_SUB_TYPE_AUDIO_BOOK, or AVRC_SUB_TYPE_PODCAST*/
UINT8 play_status; /* Use AVRC_PLAYSTATE_STOPPED, AVRC_PLAYSTATE_PLAYING, AVRC_PLAYSTATE_PAUSED, AVRC_PLAYSTATE_FWD_SEEK,
- AVRC_PLAYSTATE_REV_SEEK, or AVRC_PLAYSTATE_ERROR*/
- tAVRC_FEATURE_MASK features; /* Supported feature bit mask*/
- tAVRC_FULL_NAME name; /* The player name, name length and character set id.*/
+ AVRC_PLAYSTATE_REV_SEEK, or AVRC_PLAYSTATE_ERROR*/
+ tAVRC_FEATURE_MASK features; /* Supported feature bit mask*/
+ tAVRC_FULL_NAME name; /* The player name, name length and character set id.*/
} tAVRC_ITEM_PLAYER;
typedef struct
@@ -916,7 +916,7 @@ typedef struct
tAVRC_UID uid; /* The uid of this folder */
UINT8 type; /* Use AVRC_FOLDER_TYPE_MIXED, AVRC_FOLDER_TYPE_TITLES,
AVRC_FOLDER_TYPE_ALNUMS, AVRC_FOLDER_TYPE_ARTISTS, AVRC_FOLDER_TYPE_GENRES,
- AVRC_FOLDER_TYPE_PLAYLISTS, or AVRC_FOLDER_TYPE_YEARS.*/
+ AVRC_FOLDER_TYPE_PLAYLISTS, or AVRC_FOLDER_TYPE_YEARS.*/
BOOLEAN playable; /* TRUE, if the folder can be played. */
tAVRC_FULL_NAME name; /* The folder name, name length and character set id. */
} tAVRC_ITEM_FOLDER;
@@ -985,7 +985,7 @@ typedef struct
UINT8 opcode; /* Op Code (assigned by AVRC_BldCommand according to pdu) */
UINT8 num_val;
tAVRC_APP_SETTING *p_vals;
-} tAVRC_SET_APP_VALUE_CMD;
+} tAVRC_SET_APP_VALUE_CMD;
/* GetAppAttrTxt */
typedef struct
@@ -1045,7 +1045,7 @@ typedef struct
UINT8 opcode; /* Op Code (assigned by AVRC_BldCommand according to pdu) */
UINT8 event_id;
UINT32 param;
-} tAVRC_REG_NOTIF_CMD;
+} tAVRC_REG_NOTIF_CMD;
/* SetAddrPlayer */
typedef struct
@@ -1227,7 +1227,7 @@ typedef struct
UINT8 opcode; /* Op Code (copied from avrc_cmd.opcode by AVRC_BldResponse user. invalid one to generate according to pdu) */
UINT8 num_val;
tAVRC_APP_SETTING *p_vals;
-} tAVRC_GET_CUR_APP_VALUE_RSP;
+} tAVRC_GET_CUR_APP_VALUE_RSP;
/* GetAppAttrTxt */
typedef struct
@@ -1292,7 +1292,7 @@ typedef union
UINT8 volume;
} tAVRC_NOTIF_RSP_PARAM;
-/* RegNotify */
+/* RegNotify */
typedef struct
{
UINT8 pdu;
diff --git a/stack/include/bnep_api.h b/stack/include/bnep_api.h
index 1c5dd90..4ac9abb 100644
--- a/stack/include/bnep_api.h
+++ b/stack/include/bnep_api.h
@@ -19,7 +19,7 @@
*****************************************************************************/
/* Define the minimum offset needed in a GKI buffer for
-** sending BNEP packets. Note, we are currently not sending
+** sending BNEP packets. Note, we are currently not sending
** extension headers, but may in the future, so allow
** space for them
*/
@@ -53,7 +53,7 @@ enum
BNEP_IGNORE_CMD, /* To ignore the rcvd command */
BNEP_TX_FLOW_ON, /* tx data flow enabled */
BNEP_TX_FLOW_OFF /* tx data flow disabled */
-
+
}; typedef UINT8 tBNEP_RESULT;
@@ -223,7 +223,7 @@ extern "C" {
** 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
@@ -239,7 +239,7 @@ BNEP_API extern tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info);
** its callbacks.
**
** Parameters: void
-**
+**
**
** Returns void
**
@@ -273,7 +273,7 @@ BNEP_API extern 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/include/bt_types.h b/stack/include/bt_types.h
index 258826d..801b153 100644
--- a/stack/include/bt_types.h
+++ b/stack/include/bt_types.h
@@ -29,7 +29,7 @@
** that global events MUST be one of these events defined below.
**
** The convention used is the the event name contains the layer that the
-** event is going to.
+** event is going to.
*/
#define BT_EVT_MASK 0xFF00
#define BT_SUB_EVT_MASK 0x00FF
@@ -149,7 +149,7 @@
/* BPP Events */
#define BT_EVT_TO_BPP_PR_CMDS 0x6100 /* Printer Events */
-#define BT_EVT_TO_BPP_SND_CMDS 0x6200 /* BPP Sender Events */
+#define BT_EVT_TO_BPP_SND_CMDS 0x6200 /* BPP Sender Events */
/* BIP Events */
#define BT_EVT_TO_BIP_CMDS 0x6300
@@ -205,7 +205,7 @@ typedef struct
#define BT_PSM_BNEP 0x000F
#define BT_PSM_HIDC 0x0011
#define BT_PSM_HIDI 0x0013
-#define BT_PSM_UPNP 0x0015
+#define BT_PSM_UPNP 0x0015
#define BT_PSM_AVCTP 0x0017
#define BT_PSM_AVDTP 0x0019
#define BT_PSM_AVCTP_13 0x001B /* Advanced Control - Browsing */
@@ -353,7 +353,7 @@ typedef struct {
UINT32 token_bucket_size; /* bytes */
UINT32 peak_bandwidth; /* bytes/second */
UINT32 latency; /* microseconds */
- UINT32 delay_variation; /* microseconds */
+ UINT32 delay_variation; /* microseconds */
} FLOW_SPEC;
/* Values for service_type */
@@ -459,8 +459,8 @@ typedef struct
*/
/* Structure to hold connection stats */
-#ifndef BT_CONN_STATS_DEFINED
-#define BT_CONN_STATS_DEFINED
+#ifndef BT_CONN_STATS_DEFINED
+#define BT_CONN_STATS_DEFINED
/* These bits are used in the bIsConnected field */
#define BT_CONNECTED_USING_BREDR 1
@@ -563,11 +563,11 @@ typedef UINT8 tBT_DEVICE_TYPE;
#define TRACE_LAYER_BNEP 0x001b0000
#define TRACE_LAYER_PAN 0x001c0000
#define TRACE_LAYER_HFP 0x001d0000
-#define TRACE_LAYER_HID 0x001e0000
-#define TRACE_LAYER_BIP 0x001f0000
-#define TRACE_LAYER_AVP 0x00200000
-#define TRACE_LAYER_A2D 0x00210000
-#define TRACE_LAYER_SAP 0x00220000
+#define TRACE_LAYER_HID 0x001e0000
+#define TRACE_LAYER_BIP 0x001f0000
+#define TRACE_LAYER_AVP 0x00200000
+#define TRACE_LAYER_A2D 0x00210000
+#define TRACE_LAYER_SAP 0x00220000
#define TRACE_LAYER_AMP 0x00230000
#define TRACE_LAYER_MCA 0x00240000
#define TRACE_LAYER_ATT 0x00250000
@@ -627,7 +627,7 @@ typedef UINT8 tBT_DEVICE_TYPE;
#define TRACE_TYPE_CMD_TX 0x0000000b
#define TRACE_TYPE_EVT_TX 0x0000000c
#define TRACE_TYPE_ACL_TX 0x0000000d
-#define TRACE_TYPE_CMD_RX 0x0000000e
+#define TRACE_TYPE_CMD_RX 0x0000000e
#define TRACE_TYPE_EVT_RX 0x0000000f
#define TRACE_TYPE_ACL_RX 0x00000010
#define TRACE_TYPE_TARGET_TRACE 0x00000011
@@ -676,7 +676,7 @@ typedef UINT8 tBT_DEVICE_TYPE;
/* Define PSMs HID uses */
#define HID_PSM_CONTROL 0x0011
#define HID_PSM_INTERRUPT 0x0013
-
+
/* Define a function for logging */
typedef void (BT_LOG_FUNC) (int trace_type, const char *fmt_str, ...);
diff --git a/stack/include/btm_api.h b/stack/include/btm_api.h
index 613436b..76b6e03 100644
--- a/stack/include/btm_api.h
+++ b/stack/include/btm_api.h
@@ -452,7 +452,7 @@ enum
/* BTM_EIR_UUID_SERVCLASS_HDP_PROFILE */
BTM_EIR_UUID_SERVCLASS_MESSAGE_ACCESS,
BTM_EIR_UUID_SERVCLASS_MESSAGE_NOTIFICATION,
- BTM_EIR_UUID_SERVCLASS_HDP_SOURCE,
+ BTM_EIR_UUID_SERVCLASS_HDP_SOURCE,
BTM_EIR_UUID_SERVCLASS_HDP_SINK,
BTM_EIR_MAX_SERVICES
};
@@ -494,7 +494,7 @@ typedef UINT8 tBTM_EIR_SEARCH_RESULT;
#if BLE_INCLUDED == TRUE
#define BTM_BLE_SEC_NONE 0
#define BTM_BLE_SEC_ENCRYPT 1 /* encrypt the link using current key */
-#define BTM_BLE_SEC_ENCRYPT_NO_MITM 2
+#define BTM_BLE_SEC_ENCRYPT_NO_MITM 2
#define BTM_BLE_SEC_ENCRYPT_MITM 3
typedef UINT8 tBTM_BLE_SEC_ACT;
#endif
@@ -630,7 +630,7 @@ typedef struct
typedef struct
{
- UINT8 pcm_intf_rate; /* PCM interface rate: 0: 128kbps, 1: 256 kbps;
+ UINT8 pcm_intf_rate; /* PCM interface rate: 0: 128kbps, 1: 256 kbps;
2:512 bps; 3: 1024kbps; 4: 2048kbps */
UINT8 frame_type; /* frame type: 0: short; 1: long */
UINT8 sync_mode; /* sync mode: 0: slave; 1: master */
@@ -908,7 +908,7 @@ typedef UINT8 tBTM_SCO_TYPE;
/*******************
-** SCO Routing Path
+** SCO Routing Path
********************/
#define BTM_SCO_ROUTE_PCM HCI_BRCM_SCO_ROUTE_PCM
#define BTM_SCO_ROUTE_HCI HCI_BRCM_SCO_ROUTE_HCI
@@ -916,7 +916,7 @@ typedef UINT8 tBTM_SCO_ROUTE_TYPE;
/*******************
-** SCO Codec Types
+** SCO Codec Types
********************/
#define BTM_SCO_CODEC_NONE 0x0000
#define BTM_SCO_CODEC_CVSD 0x0001
@@ -924,7 +924,7 @@ typedef UINT8 tBTM_SCO_ROUTE_TYPE;
typedef UINT16 tBTM_SCO_CODEC_TYPE;
/*******************
-** SCO Voice Settings
+** SCO Voice Settings
********************/
#define BTM_VOICE_SETTING_CVSD ((UINT16) (HCI_INP_CODING_LINEAR | \
HCI_INP_DATA_FMT_2S_COMPLEMENT | \
@@ -937,7 +937,7 @@ typedef UINT16 tBTM_SCO_CODEC_TYPE;
HCI_AIR_CODING_FORMAT_TRANSPNT))
/*******************
-** SCO Data Status
+** SCO Data Status
********************/
enum
{
@@ -945,7 +945,7 @@ enum
BTM_SCO_DATA_PAR_ERR,
BTM_SCO_DATA_NONE,
BTM_SCO_DATA_PAR_LOST
-};
+};
typedef UINT8 tBTM_SCO_DATA_FLAG;
/***************************
@@ -1494,7 +1494,7 @@ typedef union
tBTM_SP_LOC_OOB loc_oob; /* BTM_SP_LOC_OOB_EVT */
tBTM_SP_RMT_OOB rmt_oob; /* BTM_SP_RMT_OOB_EVT */
tBTM_SP_COMPLT complt; /* BTM_SP_COMPLT_EVT */
- tBTM_SP_UPGRADE upgrade; /* BTM_SP_UPGRADE_EVT */
+ tBTM_SP_UPGRADE upgrade; /* BTM_SP_UPGRADE_EVT */
} tBTM_SP_EVT_DATA;
/* Simple Pairing Events. Called by the stack when Simple Pairing related
@@ -1519,7 +1519,7 @@ typedef void (tBTM_SEC_CBACK) (BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS re
*/
typedef void (tBTM_BOND_CANCEL_CMPL_CALLBACK) (tBTM_STATUS result);
-/* LE related event and data structure
+/* LE related event and data structure
*/
enum
{
@@ -1541,7 +1541,7 @@ typedef UINT8 tBTM_LE_EVT;
#define BTM_LE_KEY_LCSRK (SMP_SEC_KEY_TYPE_CSRK << 3) /* local CSRK has been deliver to peer */
typedef UINT8 tBTM_LE_KEY_TYPE;
-#define BTM_LE_AUTH_REQ_NO_BOND SMP_AUTH_NO_BOND /* 0 */
+#define BTM_LE_AUTH_REQ_NO_BOND SMP_AUTH_NO_BOND /* 0 */
#define BTM_LE_AUTH_REQ_BOND SMP_AUTH_GEN_BOND /* 1 << 0 */
#define BTM_LE_AUTH_REQ_MITM SMP_AUTH_YN_BIT /* 1 << 2 */
typedef UINT8 tBTM_LE_AUTH_REQ;
@@ -1549,9 +1549,9 @@ typedef UINT8 tBTM_LE_AUTH_REQ;
#define BTM_LE_AUTH_REQ_MASK SMP_AUTH_MASK /* 0x03*/
/* LE security level */
-#define BTM_LE_SEC_NONE SMP_SEC_NONE
-#define BTM_LE_SEC_UNAUTHENTICATE SMP_SEC_UNAUTHENTICATE
-#define BTM_LE_SEC_AUTHENTICATED SMP_SEC_AUTHENTICATED
+#define BTM_LE_SEC_NONE SMP_SEC_NONE
+#define BTM_LE_SEC_UNAUTHENTICATE SMP_SEC_UNAUTHENTICATE
+#define BTM_LE_SEC_AUTHENTICATED SMP_SEC_AUTHENTICATED
typedef UINT8 tBTM_LE_SEC;
@@ -1643,7 +1643,7 @@ typedef UINT8 (tBTM_LE_CALLBACK) (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_DA
#define BTM_BLE_KEY_TYPE_ID 1
#define BTM_BLE_KEY_TYPE_ER 2
-#define BTM_BLE_KEY_TYPE_COUNTER 3 //tobe obsolete
+#define BTM_BLE_KEY_TYPE_COUNTER 3 //tobe obsolete
typedef struct
{
@@ -1679,7 +1679,7 @@ typedef struct
tBTM_ABORT_CALLBACK *p_abort_callback;
tBTM_BOND_CANCEL_CMPL_CALLBACK *p_bond_cancel_cmpl_callback;
tBTM_SP_CALLBACK *p_sp_callback;
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
#if SMP_INCLUDED == TRUE
tBTM_LE_CALLBACK *p_le_callback;
#endif
@@ -2066,7 +2066,7 @@ extern "C" {
**
** Function BTM_ReadLocalDeviceNameFromController
**
-** Description Get local device name from controller. Do not use cached
+** Description Get local device name from controller. Do not use cached
** name (used to get chip-id prior to btm reset complete).
**
** Returns BTM_CMD_STARTED if successful, otherwise an error
@@ -2747,7 +2747,7 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
** Function BTM_ReadInquiryRspTxPower
**
** Description This command will read the inquiry Transmit Power level used
-** to transmit the FHS and EIR data packets.
+** to transmit the FHS and EIR data packets.
** This can be used directly in the Tx Power Level EIR data type.
**
** Returns BTM_SUCCESS if successful
@@ -2759,8 +2759,8 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
**
** Function BTM_WriteInquiryTxPower
**
-** Description This command is used to write the inquiry transmit power level
-** used to transmit the inquiry (ID) data packets. The Controller
+** Description This command is used to write the inquiry transmit power level
+** used to transmit the inquiry (ID) data packets. The Controller
** should use the supported TX power level closest to the Tx_Power
** parameter.
**
@@ -3127,8 +3127,8 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
**
** Function BTM_ReadTxPower
**
-** Description This function is called to read the current connection
-** TX power of the connection. The TX power level results
+** Description This function is called to read the current connection
+** TX power of the connection. The TX power level results
** are returned in the callback.
** (tBTM_RSSI_RESULTS)
**
@@ -3379,7 +3379,7 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
** WBS codec for the upcoming eSCO connection.
**
** Returns BTM_SUCCESS.
-**
+**
**
*******************************************************************************/
BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
@@ -3649,8 +3649,8 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** Returns TRUE if registered OK, else FALSE
**
*******************************************************************************/
- BTM_API extern BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
- UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
+ BTM_API extern BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id,
+ UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id,
UINT32 mx_chan_id);
/*******************************************************************************
@@ -3684,7 +3684,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Function BTM_SecClrUCDService
**
-** Description
+** Description
**
** Parameters Service ID - Id of the service to remove. ('0' removes all service
** records.
@@ -3966,7 +3966,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Function BTM_ReadOobData
**
-** Description This function is called to parse the OOB data payload
+** Description This function is called to parse the OOB data payload
** received over OOB (non-Bluetooth) link
**
** Parameters: p_data - the location for OOB data
@@ -4343,7 +4343,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** main stack (running on phone baseband) to embedded light stack
** (running on Multimedia or Bluetooth Controller chip)
**
-** Parameters
+** Parameters
** p_sync_callback: callback function for event notification
** Returns
**
@@ -4373,10 +4373,10 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** Function BTM_IpcSendBuf
**
** Description For Dual-Stack support. Called to send ipc messages from
-** full stack to lite stack and vice-versa. This API is
+** full stack to lite stack and vice-versa. This API is
** typically called by bta layers e.g. bta_av_sync.
**
-**
+**
** Parameters p_buf: Pointer to the buffer to be passed in the IPC message
**
** Returns void
@@ -4455,7 +4455,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Parameter codec_type: codec_type to be used for sco connection.
** role: master or slave role
-** sample_rate: sampling rate
+** sample_rate: sampling rate
** clock_rate:clock rate 128K to 2048K
**
**
@@ -4472,14 +4472,14 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
**
** Function BTM_ConfigScoPath
**
-** Description This function enable/disable SCO over HCI and registers SCO
-** data callback if SCO over HCI is enabled.
+** Description This function enable/disable SCO over HCI and registers SCO
+** data callback if SCO over HCI is enabled.
**
** Parameter path: SCO or HCI
-** p_sco_data_cb: callback function or SCO data if path is set
+** p_sco_data_cb: callback function or SCO data if path is set
** to transport.
** p_pcm_param: pointer to the PCM interface parameter. If a NULL
-** pointer is used, PCM parameter maintained in
+** pointer is used, PCM parameter maintained in
** the control block will be used; otherwise update
** control block value.
** err_data_rpt: Lisbon feature to enable the erronous data report
@@ -4489,10 +4489,10 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** BTM_NO_RESOURCES: no rsource to start the command.
** BTM_ILLEGAL_VALUE: invalid callback function pointer.
** BTM_CMD_STARTED :Command sent. Waiting for command cmpl event.
-**
+**
**
*******************************************************************************/
- BTM_API extern tBTM_STATUS BTM_ConfigScoPath (tBTM_SCO_ROUTE_TYPE path,
+ BTM_API extern tBTM_STATUS BTM_ConfigScoPath (tBTM_SCO_ROUTE_TYPE path,
tBTM_SCO_DATA_CB *p_sco_data_cb,
tBTM_SCO_PCM_PARAM *p_pcm_param,
BOOLEAN err_data_rpt);
@@ -4502,20 +4502,20 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type);
** Function BTM_WriteScoData
**
** Description This function write SCO data to a specified instance. The data
-** to be written p_buf needs to carry an offset of
-** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
+** to be written p_buf needs to carry an offset of
+** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not
** exceed BTM_SCO_DATA_SIZE_MAX bytes, whose default value is set
-** to 60 and is configurable. Data longer than the maximum bytes
-** will be truncated.
+** to 60 and is configurable. Data longer than the maximum bytes
+** will be truncated.
**
** Returns BTM_SUCCESS: data write is successful
** BTM_ILLEGAL_VALUE: SCO data contains illegal offset value.
-** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
-** size.
+** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet
+** size.
** BTM_NO_RESOURCES: no resources.
** BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not
** routed via HCI.
-**
+**
**
*******************************************************************************/
BTM_API extern tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf);
diff --git a/stack/include/btm_ble_api.h b/stack/include/btm_ble_api.h
index 44e3d87..4bcd797 100644
--- a/stack/include/btm_ble_api.h
+++ b/stack/include/btm_ble_api.h
@@ -29,7 +29,7 @@ typedef UINT8 tBTM_BLE_SCAN_MODE;
typedef UINT8 tBTM_BLE_ADV_CHNL_MAP;
/*d efault advertising channel map */
-#ifndef BTM_BLE_DEFAULT_ADV_CHNL_MAP
+#ifndef BTM_BLE_DEFAULT_ADV_CHNL_MAP
#define BTM_BLE_DEFAULT_ADV_CHNL_MAP (BTM_BLE_ADV_CHNL_37| BTM_BLE_ADV_CHNL_38| BTM_BLE_ADV_CHNL_39)
#endif
@@ -71,7 +71,7 @@ typedef UINT8 tBTM_BLE_SFP;
#define BTM_BLE_CONN_SUP_TOUT_MAX 0x0C80
#define BTM_BLE_CONN_PARAM_UNDEF 0xffff /* use this value when a specific value not to be overwritten */
-/* default connection parameters if not configured, use GAP recommend value for auto/selective connection */
+/* default connection parameters if not configured, use GAP recommend value for auto/selective connection */
/* default scan interval */
#ifndef BTM_BLE_CONN_EST_SCAN_INT
#define BTM_BLE_CONN_EST_SCAN_INT 96 /* 312.5 ms = 500 *0.625 */
@@ -103,7 +103,7 @@ typedef UINT8 tBTM_BLE_SFP;
#endif
/* default supervision timeout */
#ifndef BTM_BLE_CONN_TIMEOUT_DEF
-#define BTM_BLE_CONN_TIMEOUT_DEF 2000
+#define BTM_BLE_CONN_TIMEOUT_DEF 2000
#endif
#define BTM_CMAC_TLEN_SIZE 8 /* 64 bits */
@@ -136,7 +136,7 @@ typedef struct
{
UINT8 adv_int_min;
UINT8 adv_int_max;
- tBTM_BLE_CHNL_MAP chnl_map;
+ tBTM_BLE_CHNL_MAP chnl_map;
}tBTM_BLE_ADV_PARAMS;
@@ -187,7 +187,7 @@ typedef struct
typedef struct
{
UINT8 num_service;
- BOOLEAN list_cmpl;
+ BOOLEAN list_cmpl;
UINT16 *p_uuid;
}tBTM_BLE_SERVICE;
@@ -203,7 +203,7 @@ typedef struct
#define BTM_BLE_NUM_AD_ATTR_MAX 10
#endif
/* attribute list contained in adv data */
-typedef struct
+typedef struct
{
UINT8 num_attr;
tBTM_BLE_ATTR attr_list[BTM_BLE_NUM_AD_ATTR_MAX];
@@ -215,7 +215,7 @@ typedef struct
UINT8 *p_val;
}tBTM_BLE_MANU;
-typedef struct
+typedef struct
{
UINT8 adv_type;
UINT8 len;
@@ -244,7 +244,7 @@ typedef struct
typedef struct
{
UINT8 conn_mode;
- tBTM_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */
+ tBTM_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */
UINT8 flag;
UINT8 tx_power_level;
UINT8 remote_name_len;
@@ -292,15 +292,15 @@ extern "C" {
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name,
+BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name,
tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type);
/*******************************************************************************
**
** Function BTM_SecAddBleKey
**
-** Description Add/modify LE device information. This function will be
-** normally called during host startup to restore all required
+** Description Add/modify LE device information. This function will be
+** normally called during host startup to restore all required
** information stored in the NVRAM.
**
** Parameters: bd_addr - BD address of the peer
@@ -310,7 +310,7 @@ BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name,
** Returns TRUE if added OK, else FALSE
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key,
+BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key,
tBTM_LE_KEY_TYPE key_type);
/*******************************************************************************
@@ -320,11 +320,11 @@ BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_l
** Description This function is called to set advertising parameters.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
+BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max,
tBLE_BD_ADDR *p_dir_bda, tBTM_BLE_ADV_CHNL_MAP chnl_map);
/*******************************************************************************
@@ -334,11 +334,11 @@ BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_in
** Description This function is called to write advertising data.
**
** Parameters: None.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask,
+BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask,
tBTM_BLE_ADV_DATA *p_data);
/*******************************************************************************
@@ -349,9 +349,9 @@ BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask,
**
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
-** p_dir_bda: connectable direct initiator's LE device address
+** p_dir_bda: connectable direct initiator's LE device address
** chnl_map: advertising channel map.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -368,7 +368,7 @@ BTM_API extern void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_m
** Parameters adv_int_min: minimum advertising interval
** adv_int_max: maximum advertising interval
** scan_type: scan mode.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -382,11 +382,11 @@ BTM_API extern void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_windo
** Description This function is called to write LE scan response.
**
** Parameters: p_scan_rsp: scan response.
-**
+**
** Returns status
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask,
+BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask,
tBTM_BLE_ADV_DATA *p_data);
/*******************************************************************************
@@ -396,7 +396,7 @@ BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask,
** Description This function is called to reset ULP controller.
**
** Parameters None.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -406,15 +406,15 @@ BTM_API extern void BTM_BleReset(void);
**
** Function BTM_BleObserve
**
-** Description This procedure keep the device listening for advertising
-** events from a broadcast device.
+** Description This procedure keep the device listening for advertising
+** events from a broadcast device.
**
** Parameters start: start or stop observe.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
+BTM_API extern tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration,
tBTM_INQ_RESULTS_CB *p_results_cb, tBTM_CMPL_CB *p_cmpl_cb);
@@ -463,8 +463,8 @@ BTM_API extern void BTM_GetDeviceDHK (BT_OCTET16 dhk);
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation BTM_SUCCESS if success.
-** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation BTM_SUCCESS if success.
+** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -479,7 +479,7 @@ BTM_API extern void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res);
** passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which passkey was requested
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** passkey - numeric value in the range of
** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
**
@@ -494,7 +494,7 @@ BTM_API extern void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 pass
** SMP in response to BTM_LE_OOB_REQ_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
@@ -510,14 +510,14 @@ BTM_API extern void BTM_BleOobDataReply(BD_ADDR bd_addr, UINT8 res, UINT8 len, U
**
** Parameter bd_addr: target device the data to be signed for.
** p_text: singing data
-** len: length of the signing data
-** signature: output parameter where data signature is going to
-** be stored.
+** len: length of the signing data
+** signature: output parameter where data signature is going to
+** be stored.
**
** Returns TRUE if signing sucessul, otherwise FALSE.
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
+BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
BLE_SIGNATURE signature);
/*******************************************************************************
@@ -528,14 +528,14 @@ BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UIN
**
** Parameter bd_addr: target device the data to be signed for.
** p_orig: original data before signature.
-** len: length of the signing data
+** len: length of the signing data
** counter: counter used when doing data signing
-** p_comp: signature to be compared against.
+** p_comp: signature to be compared against.
** Returns TRUE if signature verified correctly; otherwise FALSE.
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig,
+BTM_API extern BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig,
UINT16 len, UINT32 counter,
UINT8 *p_comp);
@@ -583,17 +583,17 @@ BTM_API extern void BTM_BleLoadLocalKeys(UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_
**
** Function BTM_BleSetBgConnType
**
-** Description This function is called to set BLE background connection
+** Description This function is called to set BLE background connection
** procedure type. It can be auto connection, or selective connection.
**
-** Parameters conn_type: it can be auto connection, or selective connection.
+** Parameters conn_type: it can be auto connection, or selective connection.
** p_select_cback: callback function when selective connection procedure
** is being used.
-**
+**
** Returns void
**
*******************************************************************************/
-BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
+BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
tBTM_BLE_SEL_CBACK *p_select_cback);
/*******************************************************************************
@@ -607,7 +607,7 @@ BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
**
** Parameters add_remove: TRUE to add; FALSE to remove.
** remote_bda: device address to add/remove.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -620,7 +620,7 @@ BTM_API extern BOOLEAN BTM_BleUpdateBgConnDev(BOOLEAN add_remove, BD_ADDR remo
**
** Description Set a peripheral's preferred connection parameters. When
** any of the value does not want to be updated while others
-** do, use BTM_BLE_CONN_PARAM_UNDEF for the ones want to
+** do, use BTM_BLE_CONN_PARAM_UNDEF for the ones want to
** leave untouched.
**
** Parameters: bd_addr - BD address of the peripheral
@@ -660,7 +660,7 @@ BTM_API extern void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan
** type - finding ADV data type
** p_length - return the length of ADV data not including type
**
-** Returns pointer of ADV data
+** Returns pointer of ADV data
**
*******************************************************************************/
BTM_API extern UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length);
@@ -669,25 +669,25 @@ BTM_API extern UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_leng
**
** Function BTM_ReadDevInfo
**
-** Description This function is called to read the device/address type
-** of BD address.
+** Description This function is called to read the device/address type
+** of BD address.
**
** Parameter remote_bda: remote device address
** p_dev_type: output parameter to read the device type.
** p_addr_type: output parameter to read the address type.
**
*******************************************************************************/
-BTM_API extern void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type,
+BTM_API extern void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type,
tBLE_ADDR_TYPE *p_addr_type);
/*******************************************************************************
**
** Function BTM_BleBroadcast
**
-** Description This function is to start or stop broadcasting.
+** Description This function is to start or stop broadcasting.
**
** Parameters start: start or stop broadcasting.
-**
+**
** Returns status.
**
*******************************************************************************/
@@ -697,12 +697,12 @@ BTM_API extern tBTM_STATUS BTM_BleBroadcast(BOOLEAN start);
**
** Function BTM_RegisterScanReqEvt
**
-** Description This function is called to register a scan request callback
+** Description This function is called to register a scan request callback
** on the advertiser.
**
** Parameters p_scan_req_cback: scan request callback. If NULL, remove the
-** registration.
-**
+** registration.
+**
** Returns void
**
*******************************************************************************/
diff --git a/stack/include/btu.h b/stack/include/btu.h
index 8897ca6..6a3b68f 100644
--- a/stack/include/btu.h
+++ b/stack/include/btu.h
@@ -133,8 +133,8 @@ typedef void (*tBTU_EVENT_CALLBACK)(BT_HDR *p_hdr);
/* BTU internal timer for BLE activity */
#define BTU_TTYPE_BLE_INQUIRY 99
#define BTU_TTYPE_BLE_GAP_LIM_DISC 100
-#define BTU_TTYPE_ATT_WAIT_FOR_RSP 101
-#define BTU_TTYPE_SMP_PAIRING_CMD 102
+#define BTU_TTYPE_ATT_WAIT_FOR_RSP 101
+#define BTU_TTYPE_SMP_PAIRING_CMD 102
#define BTU_TTYPE_BLE_RANDOM_ADDR 103
#define BTU_TTYPE_ATT_WAIT_FOR_APP_RSP 104
#define BTU_TTYPE_ATT_WAIT_FOR_IND_ACK 105
@@ -246,7 +246,7 @@ BTU_API extern const BD_ADDR BT_BD_ANY;
/* Functions provided by btu_task.c
************************************
*/
-BTU_API extern void btu_start_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
+BTU_API extern void btu_start_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
BTU_API extern void btu_stop_timer (TIMER_LIST_ENT *p_tle);
BTU_API extern void btu_register_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout, tBTU_TIMER_CALLBACK timer_cb);
BTU_API extern void btu_deregister_timer(TIMER_LIST_ENT *p_tle);
@@ -257,13 +257,13 @@ BTU_API extern void btu_register_event_range (UINT16 range, tBTU_EVENT_CALLBACK
BTU_API extern void btu_deregister_event_range (UINT16 range);
BTU_API extern void btu_uipc_rx_cback(BT_HDR *p_msg);
-BTU_API extern void btu_hcif_flush_cmd_queue(void);
+BTU_API extern void btu_hcif_flush_cmd_queue(void);
/*
** Quick Timer
*/
#if defined(QUICK_TIMER_TICKS_PER_SEC) && (QUICK_TIMER_TICKS_PER_SEC > 0)
-#define QUICK_TIMER_TICKS (GKI_SECS_TO_TICKS (1)/QUICK_TIMER_TICKS_PER_SEC)
-BTU_API extern void btu_start_quick_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
+#define QUICK_TIMER_TICKS (GKI_SECS_TO_TICKS (1)/QUICK_TIMER_TICKS_PER_SEC)
+BTU_API extern void btu_start_quick_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout);
BTU_API extern void btu_stop_quick_timer (TIMER_LIST_ENT *p_tle);
BTU_API extern void btu_process_quick_timer_evt (void);
BTU_API extern void process_quick_timer_evt (TIMER_LIST_Q *p_tlq);
diff --git a/stack/include/gatt_api.h b/stack/include/gatt_api.h
index c2db201..1c64d1b 100644
--- a/stack/include/gatt_api.h
+++ b/stack/include/gatt_api.h
@@ -12,7 +12,7 @@
#define GATT_API_H
#include "bt_target.h"
-#include "gattdefs.h"
+#include "gattdefs.h"
/*****************************************************************************
** Constants
@@ -24,7 +24,7 @@
#define GATT_WRITE_NOT_PERMIT 0x0003
#define GATT_INVALID_PDU 0x0004
#define GATT_INSUF_AUTHENTICATION 0x0005
-#define GATT_REQ_NOT_SUPPORTED 0x0006
+#define GATT_REQ_NOT_SUPPORTED 0x0006
#define GATT_INVALID_OFFSET 0x0007
#define GATT_INSUF_AUTHORIZATION 0x0008
#define GATT_PREPARE_Q_FULL 0x0009
@@ -51,7 +51,7 @@
#define GATT_MORE 0x008a
#define GATT_INVALID_CFG 0x008b
#define GATT_SERVICE_STARTED 0x008c
-#define GATT_ENCRYPED_MITM GATT_SUCCESS
+#define GATT_ENCRYPED_MITM GATT_SUCCESS
#define GATT_ENCRYPED_NO_MITM 0x008d
#define GATT_NOT_ENCRYPTED 0x008e
@@ -62,30 +62,30 @@ typedef UINT8 tGATT_STATUS;
#define GATT_RSP_ERROR 0x01
#define GATT_REQ_MTU 0x02
#define GATT_RSP_MTU 0x03
-#define GATT_REQ_FIND_INFO 0x04
-#define GATT_RSP_FIND_INFO 0x05
+#define GATT_REQ_FIND_INFO 0x04
+#define GATT_RSP_FIND_INFO 0x05
#define GATT_REQ_FIND_TYPE_VALUE 0x06
#define GATT_RSP_FIND_TYPE_VALUE 0x07
-#define GATT_REQ_READ_BY_TYPE 0x08
-#define GATT_RSP_READ_BY_TYPE 0x09
-#define GATT_REQ_READ 0x0A
-#define GATT_RSP_READ 0x0B
-#define GATT_REQ_READ_BLOB 0x0C
-#define GATT_RSP_READ_BLOB 0x0D
-#define GATT_REQ_READ_MULTI 0x0E
-#define GATT_RSP_READ_MULTI 0x0F
-#define GATT_REQ_READ_BY_GRP_TYPE 0x10
-#define GATT_RSP_READ_BY_GRP_TYPE 0x11
+#define GATT_REQ_READ_BY_TYPE 0x08
+#define GATT_RSP_READ_BY_TYPE 0x09
+#define GATT_REQ_READ 0x0A
+#define GATT_RSP_READ 0x0B
+#define GATT_REQ_READ_BLOB 0x0C
+#define GATT_RSP_READ_BLOB 0x0D
+#define GATT_REQ_READ_MULTI 0x0E
+#define GATT_RSP_READ_MULTI 0x0F
+#define GATT_REQ_READ_BY_GRP_TYPE 0x10
+#define GATT_RSP_READ_BY_GRP_TYPE 0x11
#define GATT_REQ_WRITE 0x12 /* 0001-0010 (write)*/
-#define GATT_RSP_WRITE 0x13
-#define GATT_CMD_WRITE 0x52 /* changed in V4.0 01001-0010(write cmd)*/
-#define GATT_REQ_PREPARE_WRITE 0x16
-#define GATT_RSP_PREPARE_WRITE 0x17
-#define GATT_REQ_EXEC_WRITE 0x18
-#define GATT_RSP_EXEC_WRITE 0x19
-#define GATT_HANDLE_VALUE_NOTIF 0x1B
-#define GATT_HANDLE_VALUE_IND 0x1D
-#define GATT_HANDLE_VALUE_CONF 0x1E
+#define GATT_RSP_WRITE 0x13
+#define GATT_CMD_WRITE 0x52 /* changed in V4.0 01001-0010(write cmd)*/
+#define GATT_REQ_PREPARE_WRITE 0x16
+#define GATT_RSP_PREPARE_WRITE 0x17
+#define GATT_REQ_EXEC_WRITE 0x18
+#define GATT_RSP_EXEC_WRITE 0x19
+#define GATT_HANDLE_VALUE_NOTIF 0x1B
+#define GATT_HANDLE_VALUE_IND 0x1D
+#define GATT_HANDLE_VALUE_CONF 0x1E
#define GATT_SIGN_CMD_WRITE 0xD2 /* changed in V4.0 1101-0010 (signed write) see write cmd above*/
#define GATT_OP_CODE_MAX GATT_HANDLE_VALUE_CONF + 1 /* 0x1E = 30 + 1 = 31*/
@@ -102,16 +102,16 @@ typedef UINT8 tGATT_STATUS;
#define GATT_CONN_CANCEL L2CAP_CONN_CANCEL /* 0x0100 L2CAP connection cancelled */
typedef UINT16 tGATT_DISCONN_REASON;
-/* MAX GATT MTU size
+/* MAX GATT MTU size
*/
-#ifndef GATT_MAX_MTU_SIZE
+#ifndef GATT_MAX_MTU_SIZE
#define GATT_MAX_MTU_SIZE 517
#endif
-/* max legth of an attribute value
+/* max legth of an attribute value
*/
-#ifndef GATT_MAX_ATTR_LEN
- #define GATT_MAX_ATTR_LEN 600
+#ifndef GATT_MAX_ATTR_LEN
+ #define GATT_MAX_ATTR_LEN 600
#endif
/* default GATT MTU size over LE link
@@ -122,17 +122,17 @@ typedef UINT16 tGATT_DISCONN_REASON;
*/
#define GATT_INVALID_CONN_ID 0xFFFF
-#ifndef GATT_CL_MAX_LCB
+#ifndef GATT_CL_MAX_LCB
#define GATT_CL_MAX_LCB 22
#endif
-#ifndef GATT_MAX_SCCB
+#ifndef GATT_MAX_SCCB
#define GATT_MAX_SCCB 10
#endif
-/* GATT notification caching timer, default to be three seconds
+/* GATT notification caching timer, default to be three seconds
*/
#ifndef GATTC_NOTIF_TIMEOUT
#define GATTC_NOTIF_TIMEOUT 3
@@ -144,7 +144,7 @@ typedef UINT16 tGATT_DISCONN_REASON;
/* Attribute permissions
*/
-#define GATT_PERM_READ (1 << 0) /* bit 0 */
+#define GATT_PERM_READ (1 << 0) /* bit 0 */
#define GATT_PERM_READ_ENCRYPTED (1 << 1) /* bit 1 */
#define GATT_PERM_READ_ENC_MITM (1 << 2) /* bit 2 */
#define GATT_PERM_WRITE (1 << 4) /* bit 4 */
@@ -154,7 +154,7 @@ typedef UINT16 tGATT_DISCONN_REASON;
#define GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 */
typedef UINT16 tGATT_PERM;
-#define GATT_ENCRYPT_KEY_SIZE_MASK (0xF000) /* the MS nibble of tGATT_PERM; key size 7=0; size 16=9 */
+#define GATT_ENCRYPT_KEY_SIZE_MASK (0xF000) /* the MS nibble of tGATT_PERM; key size 7=0; size 16=9 */
#define GATT_READ_ALLOWED (GATT_PERM_READ | GATT_PERM_READ_ENCRYPTED | GATT_PERM_READ_ENC_MITM)
#define GATT_READ_AUTH_REQUIRED (GATT_PERM_READ_ENC_MITM)
@@ -223,7 +223,7 @@ enum
};
typedef UINT8 tGATT_FORMAT;
-/* Characteristic Presentation Format Descriptor value
+/* Characteristic Presentation Format Descriptor value
*/
typedef struct
{
@@ -258,15 +258,15 @@ typedef struct
#define GATT_CHAR_BIT_WRITE_AUX 0x0002 /* permits writes to the characteristic descriptor */
-/* characteristic descriptor: client configuration value
+/* characteristic descriptor: client configuration value
*/
-#define GATT_CLT_CONFIG_NONE 0x0000
+#define GATT_CLT_CONFIG_NONE 0x0000
#define GATT_CLT_CONFIG_NOTIFICATION 0x0001
#define GATT_CLT_CONFIG_INDICATION 0x0002
typedef UINT16 tGATT_CLT_CHAR_CONFIG;
-/* characteristic descriptor: server configuration value
+/* characteristic descriptor: server configuration value
*/
#define GATT_SVR_CONFIG_NONE 0x0000
#define GATT_SVR_CONFIG_BROADCAST 0x0001
@@ -283,10 +283,10 @@ typedef UINT16 tGATT_SVR_CHAR_CONFIG;
#define GATT_AUTH_REQ_NO_MITM 1 /* unauthenticated encryption */
#define GATT_AUTH_REQ_MITM 2 /* authenticated encryption */
#define GATT_AUTH_REQ_SIGNED_NO_MITM 3
-#define GATT_AUTH_REQ_SIGNED_MITM 4
+#define GATT_AUTH_REQ_SIGNED_MITM 4
typedef UINT8 tGATT_AUTH_REQ;
-/* Attribute Value structure
+/* Attribute Value structure
*/
typedef struct
{
@@ -314,7 +314,7 @@ enum
{
GATT_TRANSPORT_LE,
GATT_TRANSPORT_BR_EDR,
- GATT_TRANSPORT_LE_BR_EDR
+ GATT_TRANSPORT_LE_BR_EDR
};
typedef UINT8 tGATT_TRANSPORT;
@@ -349,7 +349,7 @@ typedef union
tGATT_WRITE_REQ write_req; /* write */
/* prepare write */
/* write blob */
- UINT16 handle; /* handle value confirmation */
+ UINT16 handle; /* handle value confirmation */
UINT16 mtu; /* MTU exchange request */
tGATT_EXEC_FLAG exec_write; /* execute write */
} tGATTS_DATA;
@@ -368,7 +368,7 @@ typedef UINT8 tGATTS_REQ_TYPE;
-/* Client Used Data Structure
+/* Client Used Data Structure
*/
/* definition of different discovery types */
enum
@@ -404,7 +404,7 @@ enum
};
typedef UINT8 tGATT_READ_TYPE;
-/* Read By Type Request (GATT_READ_BY_TYPE) Data
+/* Read By Type Request (GATT_READ_BY_TYPE) Data
*/
typedef struct
{
@@ -414,7 +414,7 @@ typedef struct
tBT_UUID uuid;
} tGATT_READ_BY_TYPE;
-/* GATT_READ_MULTIPLE request data
+/* GATT_READ_MULTIPLE request data
*/
#define GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */
typedef struct
@@ -428,18 +428,18 @@ typedef struct
typedef struct
{
tGATT_AUTH_REQ auth_req;
- UINT16 handle;
+ UINT16 handle;
} tGATT_READ_BY_HANDLE;
/* READ_BT_HANDLE_Request data */
typedef struct
{
tGATT_AUTH_REQ auth_req;
- UINT16 handle;
+ UINT16 handle;
UINT16 offset;
} tGATT_READ_PARTIAL;
-/* Read Request Data
+/* Read Request Data
*/
typedef union
{
@@ -475,12 +475,12 @@ typedef union
#define GATTC_OPTYPE_READ 2
#define GATTC_OPTYPE_WRITE 3
#define GATTC_OPTYPE_EXE_WRITE 4
-#define GATTC_OPTYPE_CONFIG 5
+#define GATTC_OPTYPE_CONFIG 5
#define GATTC_OPTYPE_NOTIFICATION 6
#define GATTC_OPTYPE_INDICATION 7
typedef UINT8 tGATTC_OPTYPE;
-/* characteristic declaration
+/* characteristic declaration
*/
typedef struct
{
@@ -489,8 +489,8 @@ typedef struct
tBT_UUID char_uuid; /* characteristic UUID type */
} tGATT_CHAR_DCLR_VAL;
-/* primary service group data
-*/
+/* primary service group data
+*/
typedef struct
{
UINT16 e_handle; /* ending handle of the group */
@@ -498,7 +498,7 @@ typedef struct
} tGATT_GROUP_VALUE;
-/* included service attribute value
+/* included service attribute value
*/
typedef struct
{
@@ -510,17 +510,17 @@ typedef struct
typedef union
{
tGATT_INCL_SRVC incl_service; /* include service value */
- tGATT_GROUP_VALUE group_value; /* Service UUID type.
- This field is used with GATT_DISC_SRVC_ALL
+ tGATT_GROUP_VALUE group_value; /* Service UUID type.
+ This field is used with GATT_DISC_SRVC_ALL
type of discovery result callback. */
- UINT16 handle; /* When used with GATT_DISC_SRVC_BY_UUID type
- discovery result, it is the ending handle of a
- known service to be discovered. When used with
- GATT_DISC_INC_SRVC type discovery result,
+ UINT16 handle; /* When used with GATT_DISC_SRVC_BY_UUID type
+ discovery result, it is the ending handle of a
+ known service to be discovered. When used with
+ GATT_DISC_INC_SRVC type discovery result,
it is the included service starting handle.*/
- tGATT_CHAR_DCLR_VAL dclr_value; /* Characteristic declaration value.
+ tGATT_CHAR_DCLR_VAL dclr_value; /* Characteristic declaration value.
This field is used with GATT_DISC_CHAR type discovery.*/
} tGATT_DISC_VALUE;
@@ -538,7 +538,7 @@ typedef UINT8 tGATT_IF;
#define GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP 0 /* start a idle timer for this duration when no application
need to use the link */
-#define GATT_LINK_NO_IDLE_TIMEOUT 0xFFFF
+#define GATT_LINK_NO_IDLE_TIMEOUT 0xFFFF
#define GATT_INVALID_ACL_HANDLE 0xFFFF
/* discover result callback function */
@@ -567,9 +567,9 @@ typedef struct
{
tGATT_CONN_CBACK *p_conn_cb;
tGATT_CMPL_CBACK *p_cmpl_cb;
- tGATT_DISC_RES_CB *p_disc_res_cb;
- tGATT_DISC_CMPL_CB *p_disc_cmpl_cb;
- tGATT_REQ_CBACK *p_req_cb;
+ tGATT_DISC_RES_CB *p_disc_res_cb;
+ tGATT_DISC_CMPL_CB *p_disc_cmpl_cb;
+ tGATT_REQ_CBACK *p_req_cb;
} tGATT_CBACK;
/*********************** Start Handle Management Definitions **********************
@@ -580,7 +580,7 @@ typedef struct
{
tBT_UUID app_uuid128;
tBT_UUID svc_uuid;
- UINT16 svc_inst;
+ UINT16 svc_inst;
UINT16 s_handle;
UINT16 e_handle;
BOOLEAN is_primary; /* primary service or secondary */
@@ -595,7 +595,7 @@ typedef struct
#define GATTS_SRV_CHG_CMD_READ_CLENT 5
typedef UINT8 tGATTS_SRV_CHG_CMD;
-typedef struct
+typedef struct
{
BD_ADDR bda;
BOOLEAN srv_changed;
@@ -616,7 +616,7 @@ typedef union
-typedef struct
+typedef struct
{
tGATTS_HNDL_RANGE *p_new_srv_start;
} tGATTS_PENDING_NEW_SRV_START;
@@ -666,8 +666,8 @@ extern "C"
** Function GATTS_AddHandleRange
**
** Description This function add the allocated handles range for the specifed
-** application UUID, service UUID and service instance
-**
+** application UUID, service UUID and service instance
+**
** Parameter p_hndl_range: pointer to allocated handles information
**
** Returns TRUE if handle range is added sucessfully; otherwise FALSE.
@@ -681,7 +681,7 @@ extern "C"
** Function GATTS_NVRegister
**
** Description Application manager calls this function to register for
-** NV save callback function. There can be one and only one
+** NV save callback function. There can be one and only one
** NV save callback function.
**
** Parameter p_cb_info : callback informaiton
@@ -722,11 +722,11 @@ extern "C"
** Parameter service_handle : To which service this included service is added to.
** include_svc_handle : included service handle.
**
-** Returns included service attribute handle. If 0, add included service
+** Returns included service attribute handle. If 0, add included service
** fail.
**
*******************************************************************************/
- GATT_API extern UINT16 GATTS_AddIncludeService (UINT16 service_handle,
+ GATT_API extern UINT16 GATTS_AddIncludeService (UINT16 service_handle,
UINT16 include_svc_handle);
@@ -744,7 +744,7 @@ extern "C"
** perm : Characteristic value declaration attribute permission.
** property : Characteristic Properties
**
-** Returns Characteristic value declaration attribute handle. 0 if add
+** Returns Characteristic value declaration attribute handle. 0 if add
** characteristic failed.
**
*******************************************************************************/
@@ -755,18 +755,18 @@ extern "C"
**
** Function GATTS_AddCharDescriptor
**
-** Description This function is called to add a characteristic descriptor
-** into a service database. Add descriptor should follow add char
-** to which it belongs, and next add char should be done only
+** Description This function is called to add a characteristic descriptor
+** into a service database. Add descriptor should follow add char
+** to which it belongs, and next add char should be done only
** after all add descriptors for the previous char.
**
-** Parameter service_handle : To which service this characteristic descriptor
+** Parameter service_handle : To which service this characteristic descriptor
** is added to.
-** perm : Characteristic value declaration attribute
+** perm : Characteristic value declaration attribute
** permission.
** p_descr_uuid : Characteristic descriptor UUID.
**
-** Returns Characteristic descriptor attribute handle. 0 if add
+** Returns Characteristic descriptor attribute handle. 0 if add
** characteristic descriptor failed.
**
*******************************************************************************/
@@ -801,7 +801,7 @@ extern "C"
** return GATT_SUCCESS if sucessfully started; otherwise error code.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
+ GATT_API extern tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle,
tGATT_TRANSPORT sup_transport);
@@ -809,10 +809,10 @@ extern "C"
**
** Function GATTS_StopService
**
-** Description This function is called to stop a service
-**
-** Parameter service_handle : this is the start handle of a service
+** Description This function is called to stop a service
**
+** Parameter service_handle : this is the start handle of a service
+**
** Returns None.
**
*******************************************************************************/
@@ -823,7 +823,7 @@ extern "C"
**
** Function GATTs_HandleValueIndication
**
-** Description This function sends a handle value indication to a client.
+** Description This function sends a handle value indication to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -833,15 +833,15 @@ extern "C"
** Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error code.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id,
- UINT16 attr_handle,
+ GATT_API extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id,
+ UINT16 attr_handle,
UINT16 val_len, UINT8 *p_val);
/*******************************************************************************
**
** Function GATTS_HandleValueNotification
**
-** Description This function sends a handle value notification to a client.
+** Description This function sends a handle value notification to a client.
**
** Parameter conn_id: connection identifier.
** attr_handle: Attribute handle of this handle value indication.
@@ -869,7 +869,7 @@ extern "C"
** Returns GATT_SUCCESS if sucessfully sent; otherwise error code.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
+ GATT_API extern tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id,
tGATT_STATUS status, tGATTS_RSP *p_msg);
@@ -879,96 +879,96 @@ extern "C"
/*******************************************************************************
**
-** Function GATTC_ConfigureMTU
+** Function GATTC_ConfigureMTU
**
** Description This function is called to configure the ATT MTU size for
** a connection on an LE transport.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** mtu - attribute MTU size..
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
GATT_API extern tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu);
/*******************************************************************************
**
-** Function GATTC_Discover
+** Function GATTC_Discover
**
** Description This function is called to do a discovery procedure on ATT server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** disc_type:discovery type.
** p_param: parameters of discovery requirement.
**
-** Returns GATT_SUCCESS if command received/sent successfully.
+** Returns GATT_SUCCESS if command received/sent successfully.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTC_Discover (UINT16 conn_id,
- tGATT_DISC_TYPE disc_type,
+ GATT_API extern tGATT_STATUS GATTC_Discover (UINT16 conn_id,
+ tGATT_DISC_TYPE disc_type,
tGATT_DISC_PARAM *p_param );
/*******************************************************************************
**
-** Function GATTC_Read
+** Function GATTC_Read
**
** Description This function is called to read the value of an attribute from
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute read type.
** p_read - read operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type,
+ GATT_API extern tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type,
tGATT_READ_PARAM *p_read);
/*******************************************************************************
**
-** Function GATTC_Write
+** Function GATTC_Write
**
** Description This function is called to read the value of an attribute from
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** type - attribute write type.
** p_write - write operation parameters.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
- GATT_API extern tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type,
+ GATT_API extern tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type,
tGATT_VALUE *p_write);
/*******************************************************************************
**
-** Function GATTC_ExecuteWrite
+** Function GATTC_ExecuteWrite
**
** Description This function is called to send an Execute write request to
** the server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** is_execute - to execute or cancel the prepare write requet(s)
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
GATT_API extern tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute);
/*******************************************************************************
**
-** Function GATTC_SendHandleValueConfirm
+** Function GATTC_SendHandleValueConfirm
**
** Description This function is called to send a handle value confirmation
** as response to a handle value notification from server.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
** handle: the handle of the attribute confirmation.
**
-** Returns GATT_SUCCESS if command started successfully.
+** Returns GATT_SUCCESS if command started successfully.
**
*******************************************************************************/
GATT_API extern tGATT_STATUS GATTC_SendHandleValueConfirm (UINT16 conn_id, UINT16 handle);
@@ -978,7 +978,7 @@ extern "C"
**
** Function GATT_SetIdleTimeout
**
-** Description This function (common to both client and server) sets the idle
+** Description This function (common to both client and server) sets the idle
** timeout for a tansport connection
**
** Parameter bd_addr: target device bd address.
@@ -994,7 +994,7 @@ extern "C"
**
** Function GATT_Register
**
-** Description This function is called to register an application
+** Description This function is called to register an application
** with GATT
**
** Parameter p_app_uuid128: Application UUID
@@ -1009,11 +1009,11 @@ extern "C"
**
** Function GATT_Deregister
**
-** Description This function deregistered the application from GATT.
+** Description This function deregistered the application from GATT.
**
** Parameters gatt_if: applicaiton interface.
**
-** Returns None.
+** Returns None.
**
*******************************************************************************/
GATT_API extern void GATT_Deregister (tGATT_IF gatt_if);
@@ -1039,7 +1039,7 @@ extern "C"
**
** Description This function initiate a connecttion to a ATT server.
**
-** Parameters gatt_if: applicaiton interface
+** Parameters gatt_if: applicaiton interface
** bd_addr: peer device address.
** is_direct: is a direct conenection or a background auto connection
**
@@ -1056,7 +1056,7 @@ extern "C"
** Description This function initiate a cancel connecttion to a ATT server.
**
** Parameters gatt_if: client interface. If 0 used as unconditionally disconnect,
-** typically used for direct connection cancellation.
+** typically used for direct connection cancellation.
** bd_addr: peer device address.
** is_direct: is a direct conenection or a background auto connection
**
@@ -1071,7 +1071,7 @@ extern "C"
**
** Description This function disconnect a logic channel.
**
-** Parameters conn_id: connection identifier.
+** Parameters conn_id: connection identifier.
**
** Returns GATT_SUCCESS if disconnected.
**
@@ -1088,7 +1088,7 @@ extern "C"
** interface
**
** Parameters conn_id: connection id (input)
-** p_gatt_if: applicaiton interface (output)
+** p_gatt_if: applicaiton interface (output)
** bd_addr: peer device address. (output)
**
** Returns TRUE the ligical link information is found for conn_id
@@ -1104,17 +1104,17 @@ extern "C"
** Description This function find the conn_id if the logical link for BD address
** and applciation interface is connected
**
-** Parameters gatt_if: applicaiton interface (input)
+** Parameters gatt_if: applicaiton interface (input)
** bd_addr: peer device address. (input)
** p_conn_id: connection id (output)
**
-** Returns TRUE the ligical link is connected
+** Returns TRUE the ligical link is connected
**
*******************************************************************************/
GATT_API extern BOOLEAN GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr, UINT16 *p_conn_id);
#ifdef __cplusplus
-
+
}
#endif
diff --git a/stack/include/gattdefs.h b/stack/include/gattdefs.h
index b7c1375..def3270 100644
--- a/stack/include/gattdefs.h
+++ b/stack/include/gattdefs.h
@@ -64,10 +64,10 @@
#define GATT_UUID_RINGER_SETTING 0x2A41 /* ringer setting */
/* Glucose Service */
-#define GATT_UUID_GM_MEASUREMENT 0x2A18
-#define GATT_UUID_GM_CONTEXT 0x2A34
-#define GATT_UUID_GM_CONTROL_POINT 0x2A52
-#define GATT_UUID_GM_FEATURE 0x2A51
+#define GATT_UUID_GM_MEASUREMENT 0x2A18
+#define GATT_UUID_GM_CONTEXT 0x2A34
+#define GATT_UUID_GM_CONTROL_POINT 0x2A52
+#define GATT_UUID_GM_FEATURE 0x2A51
/* device infor characteristic */
#define GATT_UUID_SYSTEM_ID 0x2A23
diff --git a/stack/include/goep_fs.h b/stack/include/goep_fs.h
index dd2b198..095449a 100644
--- a/stack/include/goep_fs.h
+++ b/stack/include/goep_fs.h
@@ -125,7 +125,7 @@ typedef struct
**
** Callback Function: tGOEP_OPEN_CBACK
**
-** Description This function is executed by OBX profiles to open
+** Description This function is executed by OBX profiles to open
** a file for reading or writing.
**
** Parameters p_path - Fully qualified path and file name.
@@ -134,7 +134,7 @@ typedef struct
** event_id - code that must be passed to the call-in function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, a file descriptor (tGOEP_FD),
** file size (UINT32), and an status code (tGOEP_STATUS)
** are returned in GOEP_OpenRsp().
@@ -151,7 +151,7 @@ typedef void (tGOEP_OPEN_CBACK) (const UINT8 *p_name, UINT16 flags, UINT32 size,
** is no longer in use.
**
** Returns void
-**
+**
*******************************************************************************/
typedef void (tGOEP_CLOSE_CBACK) (tGOEP_FD fd, UINT8 app_id);
@@ -159,11 +159,11 @@ typedef void (tGOEP_CLOSE_CBACK) (tGOEP_FD fd, UINT8 app_id);
**
** Callback Function: tGOEP_READ_CBACK
**
-** Description This function is executed by OBX profiles to read in data from the
+** Description This function is executed by OBX profiles to read in data from the
** previously opened file.
**
** Returns void
-**
+**
** Note: Upon completion of the request, GOEP_ReadRsp() is
** called with the buffer of data, along with the number
** of bytes read into the buffer, and a status. The
@@ -179,11 +179,11 @@ typedef void (tGOEP_READ_CBACK) (tGOEP_FD fd, void *p_data, INT16 size,
**
** Callback Function: tGOEP_WRITE_CBACK
**
-** Description This function is executed by OBX profiles to write the data to the
+** Description This function is executed by OBX profiles to write the data to the
** previously opened file.
**
** Returns void
-**
+**
** Note: Upon completion of the request, GOEP_WriteRsp() is
** called with the file descriptor and the status. The
** call-in function should only be called when ALL requested
@@ -198,11 +198,11 @@ typedef void (tGOEP_WRITE_CBACK) (tGOEP_FD fd, const void *p_data, INT16 size,
** Callback Function: tGOEP_SEEK_CBACK
**
** Description This function is executed by OBX profiles to Move a file pointer
-** of a previously opened file to the specified location for the
+** of a previously opened file to the specified location for the
** next read or write operation.
**
** Returns void
-**
+**
*******************************************************************************/
typedef void (tGOEP_SEEK_CBACK) (tGOEP_FD fd, INT32 offset, INT16 origin, UINT8 app_id);
@@ -223,7 +223,7 @@ typedef void (tGOEP_SEEK_CBACK) (tGOEP_FD fd, INT32 offset, INT16 origin, UINT8
** event_id - event that must be passed into the call-in function.
**
** Returns void
-**
+**
** Note: Upon completion of the request, GOEP_DirentryRsp() is
** filled in entry and the status.
** GOEP_OK is returned when p_entry is valid,
@@ -246,7 +246,7 @@ typedef void (tGOEP_DIRENTRY_CBACK) (const char *p_path, BOOLEAN first_item,
** [GOEP_OK if it exists]
** [GOEP_EACCES if permissions are wrong]
** [GOEP_FAIL if it does not exist]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_ACCESS_CBACK) (const char *p_path, UINT16 mode,
BOOLEAN *p_is_dir, UINT8 app_id);
@@ -264,7 +264,7 @@ typedef tGOEP_STATUS (tGOEP_ACCESS_CBACK) (const char *p_path, UINT16 mode,
** Returns (tGOEP_STATUS) status of the call.
** [GOEP_OK if successful]
** [GOEP_FAIL if unsuccessful]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_MKDIR_CBACK) (const char *p_path, UINT8 app_id);
@@ -282,7 +282,7 @@ typedef tGOEP_STATUS (tGOEP_MKDIR_CBACK) (const char *p_path, UINT8 app_id);
** [GOEP_EACCES if read-only]
** [GOEP_ENOTEMPTY if directory is not empty]
** [GOEP_FAIL otherwise]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_RMDIR_CBACK) (const char *p_path, UINT8 app_id);
@@ -299,7 +299,7 @@ typedef tGOEP_STATUS (tGOEP_RMDIR_CBACK) (const char *p_path, UINT8 app_id);
** [GOEP_OK if successful]
** [GOEP_EACCES if read-only]
** [GOEP_FAIL otherwise]
-**
+**
*******************************************************************************/
typedef tGOEP_STATUS (tGOEP_UNLINK_CBACK) (const char *p_path, UINT8 app_id);
@@ -374,7 +374,7 @@ GOEP_API extern void GOEP_WriteRsp (tGOEP_FD fd, tGOEP_STATUS status, UINT16 eve
** GOEP_FAIL if any errors have occurred.
** event_id - event id as given in the tGOEP_DIRENTRY_CBACK function.
**
-** Returns void
+** Returns void
**
*******************************************************************************/
GOEP_API extern void GOEP_DirentryRsp(tGOEP_STATUS status, UINT16 event_id);
diff --git a/stack/include/hcidefs.h b/stack/include/hcidefs.h
index 839ec32..c2ee429 100644
--- a/stack/include/hcidefs.h
+++ b/stack/include/hcidefs.h
@@ -22,7 +22,7 @@
#define HCI_PROTO_VERSION_2_1 0x04 /* Version for BT spec 2.1 [Lisbon] */
#define HCI_PROTO_VERSION_3_0 0x05 /* Version for BT spec 3.0 */
#define HCI_PROTO_REVISION 0x000C /* Current implementation version */
-/*
+/*
** Definitions for HCI groups
*/
#define HCI_GRP_LINK_CONTROL_CMDS (0x01 << 10) /* 0x0400 */
@@ -205,7 +205,7 @@
#define HCI_SHORT_RANGE_MODE (0x006B | HCI_GRP_HOST_CONT_BASEBAND_CMDS) /* 802.11 only */
#define HCI_CONT_BASEBAND_CMDS_FIRST HCI_SET_EVENT_MASK
-#define HCI_CONT_BASEBAND_CMDS_LAST HCI_SHORT_RANGE_MODE
+#define HCI_CONT_BASEBAND_CMDS_LAST HCI_SHORT_RANGE_MODE
/* Commands of HCI_GRP_INFORMATIONAL_PARAMS group */
@@ -250,7 +250,7 @@
#define HCI_AMP_TEST_END (0x0008 | HCI_GRP_TESTING_CMDS)
#define HCI_AMP_TEST (0x0009 | HCI_GRP_TESTING_CMDS)
-#define HCI_TESTING_CMDS_FIRST HCI_READ_LOOPBACK_MODE
+#define HCI_TESTING_CMDS_FIRST HCI_READ_LOOPBACK_MODE
#define HCI_TESTING_CMDS_LAST HCI_AMP_TEST
#define HCI_VENDOR_CMDS_FIRST 0x0001
@@ -377,18 +377,18 @@
/* ULP HCI Event */
#define HCI_BLE_EVENT 0x03E
/* ULP Event sub code */
-#define HCI_BLE_CONN_COMPLETE_EVT 0x01
-#define HCI_BLE_ADV_PKT_RPT_EVT 0x02
-#define HCI_BLE_LL_CONN_PARAM_UPD_EVT 0x03
+#define HCI_BLE_CONN_COMPLETE_EVT 0x01
+#define HCI_BLE_ADV_PKT_RPT_EVT 0x02
+#define HCI_BLE_LL_CONN_PARAM_UPD_EVT 0x03
#define HCI_BLE_READ_REMOTE_FEAT_CMPL_EVT 0x04
#define HCI_BLE_LTK_REQ_EVT 0x05
-#define HCI_EVENT_RSP_FIRST HCI_INQUIRY_COMP_EVT
+#define HCI_EVENT_RSP_FIRST HCI_INQUIRY_COMP_EVT
#define HCI_EVENT_RSP_LAST HCI_AMP_STATUS_CHANGE_EVT
#define HCI_VENDOR_SPECIFIC_EVT 0xFF /* Vendor specific events */
#define HCI_NAP_TRACE_EVT 0xFF /* was define 0xFE, 0xFD, change to 0xFF
- because conflict w/ TCI_EVT and per
+ because conflict w/ TCI_EVT and per
specification compliant */
@@ -435,7 +435,7 @@
#define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23
#define HCI_ERR_LMP_PDU_NOT_ALLOWED 0x24
#define HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE 0x25
-#define HCI_ERR_UNIT_KEY_USED 0x26
+#define HCI_ERR_UNIT_KEY_USED 0x26
#define HCI_ERR_QOS_NOT_SUPPORTED 0x27
#define HCI_ERR_INSTANT_PASSED 0x28
#define HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29
@@ -555,7 +555,7 @@
*/
-/*
+/*
** Definitions for packet type masks (BT1.2 and BT2.0 definitions)
*/
#define HCI_PKT_TYPES_MASK_NO_2_DH1 0x0002
@@ -581,7 +581,7 @@
&& ((t) != 0))
-
+
/* Packet type should not be invalid and at least one should be specified */
@@ -604,7 +604,7 @@
| HCI_PKT_TYPES_MASK_DM5 \
| HCI_PKT_TYPES_MASK_DH5)) != 0))
-/*
+/*
** Definitions for eSCO packet type masks (BT1.2 and BT2.0 definitions)
*/
#define HCI_ESCO_PKT_TYPES_MASK_HV1 0x0001
@@ -637,14 +637,14 @@
| HCI_ESCO_PKT_TYPES_MASK_EV5)) == 0)) \
&& ((t) != 0))
-/*
+/*
** Define parameters to allow role switch during create connection
*/
#define HCI_CR_CONN_NOT_ALLOW_SWITCH 0x00
#define HCI_CR_CONN_ALLOW_SWITCH 0x01
-/*
-** Hold Mode command destination
+/*
+** Hold Mode command destination
*/
#define HOLD_MODE_DEST_LOCAL_DEVICE 0x00
#define HOLD_MODE_DEST_RMT_DEVICE 0x01
@@ -880,10 +880,10 @@
#define HCI_CVSD_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_CVSD)
#define HCI_U_LAW_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_U_LAW)
#define HCI_A_LAW_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_A_LAW)
-#define HCI_TRANSPNT_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_TRANSPNT)
+#define HCI_TRANSPNT_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_TRANSPNT)
/* Retransmit timer definitions in 0.625 */
-#define HCI_MAX_AUTO_FLUSH_TOUT 0x07FF
+#define HCI_MAX_AUTO_FLUSH_TOUT 0x07FF
#define HCI_DEFAULT_AUTO_FLUSH_TOUT 0 /* No auto flush */
/* Broadcast retransmitions */
@@ -1002,7 +1002,7 @@ typedef struct
#define HCI_BRCM_ACL_PRIORITY_HIGH 0xFF
#define HCI_BRCM_SET_ACL_PRIORITY (0x0057 | HCI_GRP_VENDOR_SPECIFIC)
-/* Define values for LMP Test Control parameters
+/* Define values for LMP Test Control parameters
** Test Scenario, Hopping Mode, Power Control Mode
*/
#define LMP_TESTCTL_TESTSC_PAUSE 0
@@ -1028,12 +1028,12 @@ typedef struct
#define LMP_TESTCTL_POWCTL_ADAPTIVE 1
-/*
+/*
** Define company IDs (from Bluetooth Assigned Numbers v1.1, section 2.2)
*/
#define LMP_COMPID_ERICSSON 0
#define LMP_COMPID_NOKIA 1
-#define LMP_COMPID_INTEL 2
+#define LMP_COMPID_INTEL 2
#define LMP_COMPID_IBM 3
#define LMP_COMPID_TOSHIBA 4
#define LMP_COMPID_3COM 5
@@ -1121,9 +1121,9 @@ typedef struct
#define LMP_COMPID_HARMON_INTL_IND 87
#define LMP_COMPID_VIZIO 88
#define LMP_COMPID_NORDIC SEMI 89
-#define LMP_COMPID_EM MICRO 90
+#define LMP_COMPID_EM MICRO 90
#define LMP_COMPID_RALINK TECH 91
-#define LMP_COMPID_BELKIN INC 92
+#define LMP_COMPID_BELKIN INC 92
#define LMP_COMPID_REALTEK SEMI 93
#define LMP_COMPID_STONESTREET ONE 94
#define LMP_COMPID_WICENTRIC 95
@@ -1131,7 +1131,7 @@ typedef struct
#define LMP_COMPID_RDA MICRO 97
#define LMP_COMPID_GIBSON GUITARS 98
#define LMP_COMPID_MICOMMAND INC 99
-#define LMP_COMPID_BAND XI 100
+#define LMP_COMPID_BAND XI 100
#define LMP_COMPID_HP COMPANY 101
#define LMP_COMPID_9SOLUTIONS OY 102
#define LMP_COMPID_GN NETCOM 103
@@ -1140,8 +1140,8 @@ typedef struct
#define LMP_COMPID_MINDTREE LTD 106
#define LMP_COMPID_POLAR ELECTRO 107
#define LMP_COMPID_BEAUTIFUL ENTERPRISE 108
-#define LMP_COMPID_BRIARTEK 109
-#define LMP_COMPID_SUMMIT DATA COMM 110
+#define LMP_COMPID_BRIARTEK 109
+#define LMP_COMPID_SUMMIT DATA COMM 110
#define LMP_COMPID_SOUND ID 111
#define LMP_COMPID_MONSTER LLC 112
#define LMP_COMPID_CONNECTBLU 113
@@ -1196,7 +1196,7 @@ typedef struct
#define HCI_EDR3_DH3_PACKET_SIZE 552
#define HCI_EDR3_DH5_PACKET_SIZE 1021
-/*
+/*
** Features encoding - page 0
*/
#define HCI_NUM_FEATURE_BYTES 8
@@ -1434,14 +1434,14 @@ typedef struct
#define HCI_FEATURE_EXTENDED_OFF 7
#define HCI_LMP_EXTENDED_SUPPORTED(x) ((x)[HCI_FEATURE_EXTENDED_OFF] & HCI_FEATURE_EXTENDED_MASK)
-/*
+/*
** Features encoding - page 1
*/
#define HCI_EXT_FEATURE_SSP_HOST_MASK 0x01
#define HCI_EXT_FEATURE_SSP_HOST_OFF 0
#define HCI_SSP_HOST_SUPPORTED(x) ((x)[HCI_EXT_FEATURE_SSP_HOST_OFF] & HCI_EXT_FEATURE_SSP_HOST_MASK)
-/*
+/*
** Local Supported Commands encoding
*/
#define HCI_NUM_SUPP_COMMANDS_BYTES 64
@@ -2161,15 +2161,15 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator
#define LM_HOLD_MODE (0x00DC | HCI_GRP_VENDOR_SPECIFIC)
#define LM_EXIT_PARK_MODE (0x00DD | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_SCO_LINK_REQUEST (0x00E0 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_SCO_CHANGE (0x00E4 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_SCO_REMOVE (0x00E8 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_MAX_SLOTS (0x00F1 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_SCO_LINK_REQUEST (0x00E0 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_SCO_CHANGE (0x00E4 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_SCO_REMOVE (0x00E8 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_MAX_SLOTS (0x00F1 | HCI_GRP_VENDOR_SPECIFIC)
#define LM_MAX_SLOTS_REQUEST (0x00F2 | HCI_GRP_VENDOR_SPECIFIC)
#ifdef INCLUDE_OPTIONAL_PAGING_SCHEME
-#define LM_OPTIONAL_PAGE_REQUEST (0x00F3 | HCI_GRP_VENDOR_SPECIFIC)
-#define LM_OPTIONAL_PAGESCAN_REQUEST (0x00F4 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_OPTIONAL_PAGE_REQUEST (0x00F3 | HCI_GRP_VENDOR_SPECIFIC)
+#define LM_OPTIONAL_PAGESCAN_REQUEST (0x00F4 | HCI_GRP_VENDOR_SPECIFIC)
#endif
#define LM_SETUP_COMPLETE (0x00FF | HCI_GRP_VENDOR_SPECIFIC)
@@ -2194,7 +2194,7 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator
#define LM_HIST_HCI_UPDATA (0x0110 | HCI_GRP_VENDOR_SPECIFIC)
#define LM_HIST_HCI_DNDATA (0x0111 | HCI_GRP_VENDOR_SPECIFIC)
-#define HCI_ENTER_TEST_MODE (0x0300 | HCI_GRP_VENDOR_SPECIFIC)
+#define HCI_ENTER_TEST_MODE (0x0300 | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_LMP_TEST_CNTRL (0x0301 | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_DEBUG_LC_CMD_MIN (0x0300 | HCI_GRP_VENDOR_SPECIFIC)
#define HCI_DEBUG_LC_CMD_MAX (0x03FF | HCI_GRP_VENDOR_SPECIFIC)
@@ -2223,4 +2223,4 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator
#endif
-
+
diff --git a/stack/include/hcimsgs.h b/stack/include/hcimsgs.h
index 556aca8..5cfdcc2 100644
--- a/stack/include/hcimsgs.h
+++ b/stack/include/hcimsgs.h
@@ -23,7 +23,7 @@ extern "C" {
#endif
/* Message by message.... */
-
+
#define HCIC_GET_UINT8(p, off) (UINT8)(*((UINT8 *)((p) + 1) + p->offset + 3 + (off)))
#define HCIC_GET_UINT16(p, off) (UINT16)((*((UINT8 *)((p) + 1) + p->offset + 3 + (off)) + \
@@ -77,7 +77,7 @@ HCI_API extern BOOLEAN btsnd_hcic_inquiry(const LAP inq_lap, UINT8 duration,
#define HCIC_INQ_DUR_OFF 3
#define HCIC_INQ_RSP_CNT_OFF 4
/* Inquiry */
-
+
/* Inquiry Cancel */
HCI_API extern BOOLEAN btsnd_hcic_inq_cancel(void);
@@ -104,7 +104,7 @@ HCI_API extern BOOLEAN btsnd_hcic_exit_per_inq(void);
/* Create Connection */
HCI_API extern BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types,
UINT8 page_scan_rep_mode,
- UINT8 page_scan_mode,
+ UINT8 page_scan_mode,
UINT16 clock_offset,
UINT8 allow_switch);
@@ -184,7 +184,7 @@ HCI_API extern BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr);
/* PIN Code Request Reply */
HCI_API extern BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr,
- UINT8 pin_code_len,
+ UINT8 pin_code_len,
PIN_CODE pin_code);
#define HCIC_PARAM_SIZE_PIN_CODE_REQ_REPLY 23
@@ -406,7 +406,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_policy_set(UINT16 handle, UINT16 setting
/* Write Policy Settings */
/* Read Default Policy Settings */
-HCI_API extern BOOLEAN btsnd_hcic_read_def_policy_set(void);
+HCI_API extern BOOLEAN btsnd_hcic_read_def_policy_set(void);
#define HCIC_PARAM_SIZE_READ_DEF_POLICY_SET 0
/* Read Default Policy Settings */
@@ -464,7 +464,7 @@ HCI_API extern BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat,
/* Extended Inquiry Response */
#if (BTM_EIR_SERVER_INCLUDED == TRUE)
-HCI_API extern void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req);
+HCI_API extern void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req);
#define HCIC_PARAM_SIZE_EXT_INQ_RESP 241
@@ -478,7 +478,7 @@ HCI_API extern BOOLEAN btsnd_hcic_read_ext_inquiry_response(void); /* Read Ext
#endif
/* Write Simple Pairing Mode */
/**** Simple Pairing Commands ****/
-HCI_API extern BOOLEAN btsnd_hcic_write_simple_pairing_mode(UINT8 mode);
+HCI_API extern BOOLEAN btsnd_hcic_write_simple_pairing_mode(UINT8 mode);
#define HCIC_PARAM_SIZE_W_SIMP_PAIR 1
@@ -490,7 +490,7 @@ HCI_API extern BOOLEAN btsnd_hcic_read_simple_pairing_mode (void);
#define HCIC_PARAM_SIZE_R_SIMP_PAIR 0
/* Write Simple Pairing Debug Mode */
-HCI_API extern BOOLEAN btsnd_hcic_write_simp_pair_debug_mode(UINT8 debug_mode);
+HCI_API extern BOOLEAN btsnd_hcic_write_simp_pair_debug_mode(UINT8 debug_mode);
#define HCIC_PARAM_SIZE_SIMP_PAIR_DBUG 1
@@ -506,7 +506,7 @@ HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capab
#define HCI_IO_CAPABILITY_OFF 6
#define HCI_IO_CAP_OOB_DATA_OFF 7
#define HCI_IO_CAP_AUTH_REQ_OFF 8
-
+
/* IO Capabilities Req Neg Reply */
HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 err_code);
@@ -514,7 +514,7 @@ HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 e
#define HCI_IO_CAP_NR_BD_ADDR_OFF 0
#define HCI_IO_CAP_NR_ERR_CODE 6
-
+
/* Read Local OOB Data */
HCI_API extern BOOLEAN btsnd_hcic_read_local_oob_data (void);
@@ -527,21 +527,21 @@ HCI_API extern BOOLEAN btsnd_hcic_user_conf_reply (BD_ADDR bd_addr, BOOLEAN is_y
#define HCI_USER_CONF_BD_ADDR_OFF 0
-
+
HCI_API extern BOOLEAN btsnd_hcic_user_passkey_reply (BD_ADDR bd_addr, UINT32 value);
#define HCIC_PARAM_SIZE_U_PKEY_REPLY 10
#define HCI_USER_PASSKEY_BD_ADDR_OFF 0
#define HCI_USER_PASSKEY_VALUE_OFF 6
-
+
HCI_API extern BOOLEAN btsnd_hcic_user_passkey_neg_reply (BD_ADDR bd_addr);
#define HCIC_PARAM_SIZE_U_PKEY_NEG_REPLY 6
#define HCI_USER_PASSKEY_NEG_BD_ADDR_OFF 0
-
+
/* Remote OOB Data Request Reply */
HCI_API extern BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c,
UINT8 *p_r);
@@ -551,32 +551,32 @@ HCI_API extern BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c,
#define HCI_REM_OOB_DATA_BD_ADDR_OFF 0
#define HCI_REM_OOB_DATA_C_OFF 6
#define HCI_REM_OOB_DATA_R_OFF 22
-
+
/* Remote OOB Data Request Negative Reply */
HCI_API extern BOOLEAN btsnd_hcic_rem_oob_neg_reply (BD_ADDR bd_addr);
#define HCIC_PARAM_SIZE_REM_OOB_NEG_REPLY 6
#define HCI_REM_OOB_DATA_NEG_BD_ADDR_OFF 0
-
+
/* Read Tx Power Level */
HCI_API extern BOOLEAN btsnd_hcic_read_inq_tx_power (void);
#define HCIC_PARAM_SIZE_R_TX_POWER 0
/* Write Tx Power Level */
-HCI_API extern BOOLEAN btsnd_hcic_write_inq_tx_power (INT8 level);
+HCI_API extern BOOLEAN btsnd_hcic_write_inq_tx_power (INT8 level);
#define HCIC_PARAM_SIZE_W_TX_POWER 1
#define HCIC_WRITE_TX_POWER_LEVEL_OFF 0
- /* Read Default Erroneous Data Reporting */
+ /* Read Default Erroneous Data Reporting */
HCI_API extern BOOLEAN btsnd_hcic_read_default_erroneous_data_rpt (void);
#define HCIC_PARAM_SIZE_R_ERR_DATA_RPT 0
/* Write Default Erroneous Data Reporting */
-HCI_API extern BOOLEAN btsnd_hcic_write_default_erroneous_data_rpt (UINT8 level);
+HCI_API extern BOOLEAN btsnd_hcic_write_default_erroneous_data_rpt (UINT8 level);
#define HCIC_PARAM_SIZE_W_ERR_DATA_RPT 1
@@ -729,7 +729,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_pagescan_cfg(UINT16 interval,
HCI_API extern BOOLEAN btsnd_hcic_read_inqscan_cfg(void); /* Read Inquiry Scan Activity */
/* Write Inquiry Scan Activity */
-HCI_API extern BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window);
+HCI_API extern BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window);
#define HCIC_PARAM_SIZE_WRITE_INQSCAN_CFG 4
@@ -786,7 +786,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_sco_flow_enable(UINT8 flag);
/* Set Host Buffer Size */
HCI_API extern BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len,
- UINT8 sco_len,
+ UINT8 sco_len,
UINT16 acl_num,
UINT16 sco_num);
@@ -797,7 +797,7 @@ HCI_API extern BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len,
#define HCI_HOST_BUF_SIZE_ACL_NUM_OFF 3
#define HCI_HOST_BUF_SIZE_SCO_NUM_OFF 5
-
+
HCI_API extern BOOLEAN btsnd_hcic_host_num_xmitted_pkts (UINT8 num_handles,
UINT16 *handle,
UINT16 *num_pkts); /* Set Host Buffer Size */
@@ -889,7 +889,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_afh_channel_assessment_mode (UINT8 mode)
HCI_API extern BOOLEAN btsnd_hcic_set_afh_host_channel_class (UINT8 *p_afhchannelmap);
HCI_API extern BOOLEAN btsnd_hcic_read_afh_channel_assessment_mode(void);
HCI_API extern BOOLEAN btsnd_hcic_read_afh_channel_map (UINT16 handle);
-HCI_API extern BOOLEAN btsnd_hcic_nop(void); /* NOP */
+HCI_API extern BOOLEAN btsnd_hcic_nop(void); /* NOP */
/* Send HCI Data */
HCI_API extern void btsnd_hcic_data (BT_HDR *p_buf, UINT16 len, UINT16 handle, UINT8 boundary, UINT8 broadcast);
@@ -935,13 +935,13 @@ HCI_API extern void btsnd_hcie_inq_comp(void *buffer, UINT8 status);
#define HCIE_PARAM_SIZE_INQ_COMP 1
/* Inquiry Response Event */
-HCI_API extern void btsnd_hcie_inq_res(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
- UINT8 *page_scan_rep_mode, UINT8 *page_scan_per_mode,
- UINT8 *page_scan_mode, UINT8 **dev_class,
+HCI_API extern void btsnd_hcie_inq_res(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
+ UINT8 *page_scan_rep_mode, UINT8 *page_scan_per_mode,
+ UINT8 *page_scan_mode, UINT8 **dev_class,
UINT16 *clock_offset);
/* Connection Complete Event */
-HCI_API extern void btsnd_hcie_connection_comp(void *buffer, UINT8 status, UINT16 handle,
+HCI_API extern void btsnd_hcie_connection_comp(void *buffer, UINT8 status, UINT16 handle,
BD_ADDR bd_addr, UINT8 link_type, UINT8 encr_mode);
#define HCIE_PARAM_SIZE_CONNECTION_COMP 11
@@ -1029,16 +1029,16 @@ HCI_API extern void btsnd_hcie_read_rmt_version (void *buffer, UINT8 status, UIN
/* QOS setup complete */
-HCI_API extern void btsnd_hcie_qos_setup_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
- UINT8 service_type, UINT32 token_rate, UINT32 peak,
+HCI_API extern void btsnd_hcie_qos_setup_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
+ UINT8 service_type, UINT32 token_rate, UINT32 peak,
UINT32 latency, UINT32 delay_var);
#define HCIE_PARAM_SIZE_QOS_SETUP_COMP 21
/* Flow Specification complete */
-HCI_API extern void btsnd_hcie_flow_spec_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
- UINT8 flow_direction, UINT8 service_type, UINT32 token_rate, UINT32 token_bucket_size,
+HCI_API extern void btsnd_hcie_flow_spec_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags,
+ UINT8 flow_direction, UINT8 service_type, UINT32 token_rate, UINT32 token_bucket_size,
UINT32 peak, UINT32 latency);
#define HCIE_PARAM_SIZE_FLOW_SPEC_COMP 22
@@ -1057,20 +1057,20 @@ HCI_API extern void btsnd_hcie_cmd_comp_params (void *buffer, UINT8 max_host_cmd
/* Command Complete Event with 1-byte param */
-HCI_API extern void btsnd_hcie_cmd_comp_param1(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
+HCI_API extern void btsnd_hcie_cmd_comp_param1(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
UINT8 status, UINT8 param1);
#define HCIE_PARAM_SIZE_CMD_COMP_PARAM1 5
/* Command Complete Event with 2-byte param */
-HCI_API extern void btsnd_hcie_cmd_comp_param2(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
+HCI_API extern void btsnd_hcie_cmd_comp_param2(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
UINT8 status, UINT16 param2);
#define HCIE_PARAM_SIZE_CMD_COMP_PARAM2 6
/* Command Complete Event with BD-addr as param */
-HCI_API extern void btsnd_hcie_cmd_comp_bd_addr(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
+HCI_API extern void btsnd_hcie_cmd_comp_bd_addr(void *buffer, UINT8 max_host_cmds, UINT16 opcode,
UINT8 status, BD_ADDR bd_addr);
#define HCIE_PARAM_SIZE_CMD_COMP_BD_ADDR 10
@@ -1107,7 +1107,7 @@ HCI_API extern void btsnd_hcie_num_compl_pkts (void *buffer, UINT8 num_handles,
/* Mode Change Event */
-HCI_API extern void btsnd_hcie_mode_change (void *buffer, UINT8 status, UINT16 handle,
+HCI_API extern void btsnd_hcie_mode_change (void *buffer, UINT8 status, UINT16 handle,
UINT8 mode, UINT16 interval);
#define HCIE_PARAM_SIZE_MODE_CHANGE 6
@@ -1165,7 +1165,7 @@ HCI_API extern void btsnd_hcie_max_slots_change(void *buffer, UINT16 handle, UIN
/* Read Clock Offset Complet Event */
-HCI_API extern void btsnd_hcie_read_clock_off_comp(void *buffer, UINT8 status, UINT16 handle,
+HCI_API extern void btsnd_hcie_read_clock_off_comp(void *buffer, UINT8 status, UINT16 handle,
UINT16 clock_offset);
#define HCIE_PARAM_SIZE_READ_CLOCK_OFF_COMP 5
@@ -1199,7 +1199,7 @@ HCI_API extern void btsnd_hcie_pagescan_rep_mode_chng (void *buffer, BD_ADDR bd_
/* Sniff Sub Rate Event */
-HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16 handle, UINT16 max_tx_lat, UINT16 max_rx_lat,
+HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16 handle, UINT16 max_tx_lat, UINT16 max_rx_lat,
UINT16 min_remote_timeout, UINT16 min_local_timeout);
#define HCIE_PARAM_SIZE_SNIFF_SUB_RATE 11
@@ -1207,8 +1207,8 @@ HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16
/* Extended Inquiry Result Event */
-HCI_API extern void btsnd_hcie_ext_inquiry_result(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
- UINT8 *page_scan_rep_mode, UINT8 *reserved,
+HCI_API extern void btsnd_hcie_ext_inquiry_result(void *buffer, UINT8 num_resp, UINT8 **bd_addr,
+ UINT8 *page_scan_rep_mode, UINT8 *reserved,
UINT8 **dev_class, UINT16 *clock_offset, UINT8 *rssi, UINT8 *p_data);
@@ -1257,7 +1257,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_set_local_used_feat (UINT8 feat_set[8]);
HCI_API extern BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_addr);
-HCI_API extern BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
+HCI_API extern BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max,
UINT8 adv_type, UINT8 addr_type_own,
UINT8 addr_type_dir, BD_ADDR direct_bda,
UINT8 channel_map, UINT8 adv_filter_policy);
@@ -1270,13 +1270,13 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 *
HCI_API extern BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable);
-HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
- UINT16 scan_int, UINT16 scan_win,
+HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type,
+ UINT16 scan_int, UINT16 scan_win,
UINT8 addr_type, UINT8 scan_filter_policy);
HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate);
-HCI_API extern BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
+HCI_API extern BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
UINT8 init_filter_policy, UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 addr_type_own,
UINT16 conn_int_min, UINT16 conn_int_max, UINT16 conn_latency, UINT16 conn_timeout,
UINT16 min_ce_len, UINT16 max_ce_len);
@@ -1304,7 +1304,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_encrypt (UINT8* key, UINT8 key_len, UINT8*
HCI_API extern BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback);
-HCI_API extern BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle,
+HCI_API extern BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle,
UINT8 rand[HCIC_BLE_RAND_DI_SIZE],
UINT16 ediv, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]);
@@ -1314,7 +1314,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_ltk_req_neg_reply (UINT16 handle);
HCI_API extern BOOLEAN btsnd_hcic_ble_read_supported_states (void);
-
+
#endif /* BLE_INCLUDED */
#ifdef __cplusplus
diff --git a/stack/include/hiddefs.h b/stack/include/hiddefs.h
index 3e13017..7d8e75a 100644
--- a/stack/include/hiddefs.h
+++ b/stack/include/hiddefs.h
@@ -100,7 +100,7 @@ typedef UINT8 tHID_STATUS;
*/
/* Buffer size in two bytes after Report ID */
-#define HID_PAR_GET_REP_BUFSIZE_FOLLOWS (0x08)
+#define HID_PAR_GET_REP_BUFSIZE_FOLLOWS (0x08)
/* Parameters for Protocol Type
@@ -137,7 +137,7 @@ typedef struct sdp_info
UINT8 ctry_code; /*Country Code.*/
UINT16 sup_timeout;/* Supervisory Timeout */
- tHID_DEV_DSCP_INFO dscp_info; /* Descriptor list and Report list to be set in the SDP record.
+ tHID_DEV_DSCP_INFO dscp_info; /* Descriptor list and Report list to be set in the SDP record.
This parameter is used if HID_DEV_USE_GLB_SDP_REC is set to FALSE.*/
tSDP_DISC_REC *p_sdp_layer_rec;
} tHID_DEV_SDP_INFO;
diff --git a/stack/include/hidh_api.h b/stack/include/hidh_api.h
index 5845f66..bc3f8c8 100644
--- a/stack/include/hidh_api.h
+++ b/stack/include/hidh_api.h
@@ -42,15 +42,15 @@ enum {
*****************************************************************************/
typedef void (tHID_HOST_SDP_CALLBACK) (UINT16 result, UINT16 attr_mask,
- tHID_DEV_SDP_INFO *sdp_rec );
+ tHID_DEV_SDP_INFO *sdp_rec );
/* HID-HOST returns the events in the following table to the application via tHID_HOST_DEV_CALLBACK
-HID_HDEV_EVT_OPEN Connected to device with Interrupt and Control Channels in OPEN state.
+HID_HDEV_EVT_OPEN Connected to device with Interrupt and Control Channels in OPEN state.
Data = NA
HID_HDEV_EVT_CLOSE Connection with device is closed. Data=reason code.
-HID_HDEV_EVT_RETRYING Lost connection is being re-connected.
+HID_HDEV_EVT_RETRYING Lost connection is being re-connected.
Data=Retrial number
-HID_HDEV_EVT_IN_REPORT Device sent an input report Data=Report Type pdata= pointer to BT_HDR
+HID_HDEV_EVT_IN_REPORT Device sent an input report Data=Report Type pdata= pointer to BT_HDR
(GKI buffer having report data.)
HID_HDEV_EVT_HANDSHAKE Device sent SET_REPORT Data=Result-code pdata=NA.
HID_HDEV_EVT_VC_UNPLUG Device sent Virtual Unplug Data=NA. pdata=NA.
@@ -69,7 +69,7 @@ enum
HID_HDEV_EVT_VC_UNPLUG
};
typedef void (tHID_HOST_DEV_CALLBACK) (UINT8 dev_handle,
- UINT8 event, /* Event from HID-DEVICE. */
+ UINT8 event, /* Event from HID-DEVICE. */
UINT32 data, /* Integer data corresponding to the event.*/
BT_HDR *p_buf ); /* Pointer data corresponding to the event. */
diff --git a/stack/include/l2c_api.h b/stack/include/l2c_api.h
index b04f480..fbd45d8 100644
--- a/stack/include/l2c_api.h
+++ b/stack/include/l2c_api.h
@@ -75,18 +75,18 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
/* length of the HCI header block */
/* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) */
-#define L2CAP_MULTI_AV_HCI_HDR_LEN 8
+#define L2CAP_MULTI_AV_HCI_HDR_LEN 8
/* length of padding for 4 bytes align */
#define L2CAP_MULTI_AV_PADDING_LEN 2
/* length of the HCI header block with padding for FCR */
/* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) + padding(2) */
-#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10
+#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10
/* length of the L2CAP header block */
/* HCI header(4) + L2CAP header(4) + padding(4) or control word(2) + FCS(2) */
-#define L2CAP_MULTI_AV_L2C_HDR_LEN 12
+#define L2CAP_MULTI_AV_L2C_HDR_LEN 12
/* definition used for L2CA_SetDesireRole */
#define L2CAP_ROLE_SLAVE HCI_ROLE_SLAVE
@@ -107,7 +107,7 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
/* Validity check for PSM. PSM values must be odd. Also, all PSM values must
** be assigned such that the least significant bit of the most sigificant
** octet equals zero.
-*/
+*/
#define L2C_INVALID_PSM(psm) (((psm) & 0x0101) != 0x0001)
#define L2C_IS_VALID_PSM(psm) (((psm) & 0x0101) == 0x0001)
@@ -261,7 +261,7 @@ typedef void (tL2CA_ECHO_DATA_CB) (BD_ADDR, UINT16, UINT8 *);
typedef void (tL2CA_CONGESTION_STATUS_CB) (UINT16, BOOLEAN);
/* Callback prototype for number of packets completed events.
-** This callback notifies the application when Number of Completed Packets
+** This callback notifies the application when Number of Completed Packets
** event has been received.
** This callback is originally designed for 3DG devices.
** The parameter is:
@@ -366,7 +366,7 @@ L2C_API extern void L2CA_Deregister (UINT16 psm);
** Description Other layers call this function to find an unused PSM for L2CAP
** services.
**
-** Returns PSM to use.
+** Returns PSM to use.
**
*******************************************************************************/
L2C_API extern UINT16 L2CA_AllocatePSM(void);
@@ -427,7 +427,7 @@ L2C_API extern UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr,
** Returns TRUE for success, FALSE for failure
**
*******************************************************************************/
-L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
+L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
UINT16 result, UINT16 status,
tL2CAP_ERTM_INFO *p_ertm_info);
@@ -469,7 +469,7 @@ L2C_API extern BOOLEAN L2CA_DisconnectReq (UINT16 cid);
**
** Function L2CA_DisconnectRsp
**
-** Description Higher layers call this function to acknowledge the
+** Description Higher layers call this function to acknowledge the
** disconnection of a channel.
**
** Returns void
@@ -536,18 +536,18 @@ L2C_API extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout,
** Function L2CA_SetIdleTimeoutByBdAddr
**
** Description Higher layers call this function to set the idle timeout for
-** a connection. The "idle timeout" is the amount of time that
-** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** a connection. The "idle timeout" is the amount of time that
+** a connection can remain up with no L2CAP channels on it.
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This timeout applies to all logical channels active on the
+** NOTE This timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
L2C_API extern BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout);
@@ -690,21 +690,21 @@ typedef void (tL2CA_RESERVE_CMPL_CBACK) (void);
**
** Function L2CA_SetFlushTimeout
**
-** Description This function set the automatic flush time out in Baseband
+** Description This function set the automatic flush time out in Baseband
** for ACL-U packets.
** BdAddr : the remote BD address of ACL link. If it is BT_DB_ANY
** then the flush time out will be applied to all ACL link.
** FlushTimeout: flush time out in ms
-** 0x0000 : No automatic flush
-** L2CAP_NO_RETRANSMISSION : No retransmission
-** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
+** 0x0000 : No automatic flush
+** L2CAP_NO_RETRANSMISSION : No retransmission
+** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
** <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
** Otherwise, return FALSE.
-** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
+** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This flush timeout applies to all logical channels active on the
+** NOTE This flush timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
L2C_API extern BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout);
@@ -730,7 +730,7 @@ L2C_API extern UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags)
**
** Function L2CA_SetChnlFlushability
**
-** Description Higher layers call this function to set a channels
+** Description Higher layers call this function to set a channels
** flushability flags
**
** Returns TRUE if CID found, else FALSE
@@ -854,7 +854,7 @@ L2C_API extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm );
** Parameters: PSM
** BD_ADDR of remote device
** info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
-** L2CAP_UCD_INFO_TYPE_MTU
+** L2CAP_UCD_INFO_TYPE_MTU
**
**
** Return value: TRUE if successs
@@ -870,7 +870,7 @@ L2C_API extern BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 inf
**
** Parameters: PSM
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
** flags : L2CAP_FLUSHABLE_CH_BASED
** L2CAP_FLUSHABLE_PKT
** L2CAP_NON_FLUSHABLE_PKT
@@ -975,7 +975,7 @@ L2C_API extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr)
**
** Parameters: Fixed CID
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
**
** Return value L2CAP_DW_SUCCESS, if data accepted
** L2CAP_DW_FAILED, if error
@@ -1005,11 +1005,11 @@ L2C_API extern BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda);
** Description Higher layers call this function to set the idle timeout for
** a fixed channel. The "idle timeout" is the amount of time that
** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
@@ -1032,7 +1032,7 @@ L2C_API extern BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_c
** Returns TRUE if successful
**
*******************************************************************************/
-L2C_API extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
+L2C_API extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
tL2CAP_CFG_INFO **pp_our_cfg, tL2CAP_CH_CFG_BITS *p_our_cfg_bits,
tL2CAP_CFG_INFO **pp_peer_cfg, tL2CAP_CH_CFG_BITS *p_peer_cfg_bits);
diff --git a/stack/include/l2cdefs.h b/stack/include/l2cdefs.h
index eded75a..b2740cd 100644
--- a/stack/include/l2cdefs.h
+++ b/stack/include/l2cdefs.h
@@ -203,7 +203,7 @@
#define L2CAP_INFO_RESP_RESULT_SUCCESS 0
#define L2CAP_INFO_RESP_RESULT_NOT_SUPPORTED 1
-/* Define the info-type fields of information request & response
+/* Define the info-type fields of information request & response
*/
#define L2CAP_CONNLESS_MTU_INFO_TYPE 0x0001
#define L2CAP_EXTENDED_FEATURES_INFO_TYPE 0x0002 /* Used in Information Req/Response */
@@ -249,7 +249,7 @@
#define L2CAP_MAX_HEADER_FCS (L2CAP_PKT_OVERHEAD + L2CAP_EXT_CONTROL_OVERHEAD + L2CAP_SDU_LEN_OVERHEAD + L2CAP_FCS_LEN)
/* length(2), channel(2), control(4), SDU length(2) FCS(2) */
/* Part of L2CAP_MIN_OFFSET that is not part of L2CAP
-*/
+*/
#define L2CAP_OFFSET_WO_L2HDR (L2CAP_MIN_OFFSET-(L2CAP_PKT_OVERHEAD+L2CAP_FCR_OVERHEAD))
/* SAR bits in the control word
diff --git a/stack/include/mca_api.h b/stack/include/mca_api.h
index 568cb0e..4ac2c89 100644
--- a/stack/include/mca_api.h
+++ b/stack/include/mca_api.h
@@ -2,7 +2,7 @@
**
** Name: mca_api.h
**
-** Description: This interface file contains the interface to the
+** Description: This interface file contains the interface to the
** Multi-Channel Adaptation Protocol (MCAP).
**
** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
@@ -72,7 +72,7 @@ typedef UINT8 tMCA_DEP; /* the handle for MCA_CreateDep. This is also the lo
typedef UINT16 tMCA_DL; /* the handle for the data channel. This is reported at MCA_OPEN_CFM_EVT or MCA_OPEN_IND_EVT */
/* This is the data callback function. It is executed when MCAP has a data
-** packet ready for the application.
+** packet ready for the application.
*/
typedef void (tMCA_DATA_CBACK)(tMCA_DL mdl, BT_HDR *p_pkt);
@@ -195,7 +195,7 @@ typedef union {
} tMCA_CTRL;
/* This is the control callback function. This function passes control events
-** to the application.
+** to the application.
*/
typedef void (tMCA_CTRL_CBACK)(tMCA_HANDLE handle, tMCA_CL mcl, UINT8 event,
tMCA_CTRL *p_data);
@@ -244,7 +244,7 @@ MCA_API extern 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.
**
*******************************************************************************/
@@ -270,7 +270,7 @@ MCA_API extern 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.
**
@@ -296,7 +296,7 @@ MCA_API extern 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.
@@ -317,7 +317,7 @@ MCA_API extern 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.
@@ -334,7 +334,7 @@ MCA_API extern 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
** When the data channel is open successfully, a MCA_OPEN_CFM_EVT
** is reported. This data channel is identified as tMCA_DL.
@@ -452,7 +452,7 @@ MCA_API extern 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/include/mca_defs.h b/stack/include/mca_defs.h
index 8561621..aebf315 100644
--- a/stack/include/mca_defs.h
+++ b/stack/include/mca_defs.h
@@ -4,7 +4,7 @@
**
** Description: This contains constants definitions and other information
** from the MCAP specification.
-**
+**
**
** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved.
** WIDCOMM Bluetooth Core. Proprietary and confidential.
diff --git a/stack/include/obx_api.h b/stack/include/obx_api.h
index e05b6a9..ab6cae6 100644
--- a/stack/include/obx_api.h
+++ b/stack/include/obx_api.h
@@ -99,7 +99,7 @@ typedef UINT8 tOBX_SETPATH_FLAG;
/* Authentication Challenge Options */
#define OBX_AO_NONE 0x00 /* If this is used in OBX_StartServer and the authenticate
- * flag is TRUE, the optional Challenge Information (tag 0x01)
+ * flag is TRUE, the optional Challenge Information (tag 0x01)
* will not be sent. */
#define OBX_AO_USR_ID 0x01 /* Set this bit to make the client respond with the user ID. */
typedef UINT8 tOBX_AUTH_OPT;
@@ -243,26 +243,26 @@ enum
{
OBX_NULL_DISP,
/* server events */
- OBX_CONNECT_REQ_DISP,
- OBX_SESSION_REQ_DISP,
+ OBX_CONNECT_REQ_DISP,
+ OBX_SESSION_REQ_DISP,
OBX_DISCONNECT_REQ_DISP,
- OBX_PUT_REQ_DISP,
+ OBX_PUT_REQ_DISP,
OBX_GET_REQ_DISP,
- OBX_SETPATH_REQ_DISP,
+ OBX_SETPATH_REQ_DISP,
OBX_ABORT_REQ_DISP,
- OBX_ACTION_REQ_DISP,
+ OBX_ACTION_REQ_DISP,
/* client events */
- OBX_CONNECT_RSP_DISP,
- OBX_SESSION_RSP_DISP,
+ OBX_CONNECT_RSP_DISP,
+ OBX_SESSION_RSP_DISP,
OBX_DISCONNECT_RSP_DISP,
OBX_PUT_RSP_DISP,
OBX_GET_RSP_DISP,
OBX_SETPATH_RSP_DISP,
OBX_ABORT_RSP_DISP,
- OBX_ACTION_RSP_DISP,
+ OBX_ACTION_RSP_DISP,
/* common events */
- OBX_CLOSE_IND_DISP,
- OBX_TIMEOUT_DISP,
+ OBX_CLOSE_IND_DISP,
+ OBX_TIMEOUT_DISP,
OBX_PASSWORD_DISP
};
#define OBX_DISP_IS_RECV 0x80
@@ -410,8 +410,8 @@ typedef UINT8 tOBX_RSP_CODE;
#define OBX_USERID_RSP_TAG 1
#define OBX_NONCE_RSP_TAG 2
-typedef struct
-{
+typedef struct
+{
UINT8 tag;
UINT8 len;
UINT8 *p_array;
@@ -466,7 +466,7 @@ extern "C"
** Function OBX_Init
**
** Description This function is called to initialize the control block for this
-** layer. It must be called before accessing any other of its API
+** layer. It must be called before accessing any other of its API
** functions. It is typically called once during the start up of
** the stack.
**
@@ -552,7 +552,7 @@ OBX_API extern tOBX_STATUS OBX_AddSuspendedSession(tOBX_HANDLE shandle, BD_ADDR
**
** Function OBX_ConnectRsp
**
-** Description This function is called to send the response to a Connect
+** Description This function is called to send the response to a Connect
** Request from an OBEX client.
**
** Returns OBX_SUCCESS, if successful.
@@ -566,20 +566,20 @@ OBX_API extern tOBX_STATUS OBX_ConnectRsp(tOBX_HANDLE shandle, UINT8 rsp_code, B
** Function OBX_SessionRsp
**
** Description This function is called to respond to a request to create a reliable session.
-**
+**
**
** Returns OBX_SUCCESS, if successful.
** OBX_BAD_HANDLE, if the handle is not valid.
**
*******************************************************************************/
-OBX_API extern tOBX_STATUS OBX_SessionRsp(tOBX_HANDLE shandle, UINT8 rsp_code,
+OBX_API extern tOBX_STATUS OBX_SessionRsp(tOBX_HANDLE shandle, UINT8 rsp_code,
UINT8 ssn, UINT32 offset, BT_HDR *p_pkt);
/*******************************************************************************
**
** Function OBX_SetPathRsp
**
-** Description This function is called to send the response to a Set Path
+** Description This function is called to send the response to a Set Path
** Request from an OBEX client.
**
** Returns OBX_SUCCESS, if successful.
@@ -685,7 +685,7 @@ OBX_API extern UINT16 OBX_GetPeerAddr(tOBX_HANDLE shandle, BD_ADDR bd_addr);
** Function OBX_GetPortHandle
**
** Description This function is called to get the RFCOMM port handle for the obex connection.
-**
+**
**
** Returns OBX_SUCCESS, if successful.
** OBX_NO_RESOURCES, if no existing connection.
@@ -835,7 +835,7 @@ OBX_API extern tOBX_STATUS OBX_DisconnectReq(tOBX_HANDLE handle, BT_HDR *p_pkt);
** Function OBX_ActionReq
**
** Description This function sends a Action request to the connected server.
-** The Name Header and DestName Header must be in p_pkt for
+** The Name Header and DestName Header must be in p_pkt for
** the Copy and Move Object action.
** The Name header and Permission Header must be in p_pkt for
** the Set Object Permission action.
@@ -989,7 +989,7 @@ OBX_API extern BOOLEAN OBX_AddAsciiDescrHdr(BT_HDR *p_pkt, char *p_descr);
** Function OBX_AddTargetHdr
**
** Description This function is called to add an OBEX Target header to an OBEX
-** packet. This header is most commonly used in Connect packets.
+** packet. This header is most commonly used in Connect packets.
**
** NOTE: The target header must be the first header in an OBEX message.
**
@@ -1047,7 +1047,7 @@ OBX_API extern UINT8 *OBX_AddBodyStart(BT_HDR *p_pkt, UINT16 *p_len);
** Description This function is called to add the HI and the length of HV of an
** OBEX body header to an OBEX packet. If end is TRUE, HI is
** OBX_HI_BODY_END. If FALSE, HI is OBX_HI_BODY. It is assumed that
-** the actual value of the body has been copied into the OBEX packet.
+** the actual value of the body has been copied into the OBEX packet.
**
** Returns void
**
@@ -1231,7 +1231,7 @@ OBX_API extern UINT8 * OBX_CheckHdr(BT_HDR *p_pkt, UINT8 id);
**
** Function OBX_ReadNumHdrs
**
-** Description This function is called to check the number of headers in the
+** Description This function is called to check the number of headers in the
** given OBEX packet
**
** Returns number of headers.
@@ -1256,7 +1256,7 @@ OBX_API extern UINT16 OBX_ReadHdrLen(BT_HDR *p_pkt, UINT8 id);
**
** Function OBX_ReadNameHdr
**
-** Description This function is called to get the Name Header in the given
+** Description This function is called to get the Name Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1280,7 +1280,7 @@ OBX_API extern void OBX_WcharToChar (char *a_str, UINT16* w_str, UINT16 a_size)
**
** Function OBX_ReadAsciiNameHdr
**
-** Description This function is called to get the Name Header in the given
+** Description This function is called to get the Name Header in the given
** OBEX packet. If Name header exists in the given OBEX packet,
** it is converted to ASCII format and copied into p_name.
**
@@ -1294,7 +1294,7 @@ OBX_API extern BOOLEAN OBX_ReadAsciiNameHdr(BT_HDR *p_pkt, char *p_name, UINT16
**
** Function OBX_ReadTypeHdr
**
-** Description This function is called to get the Type Header in the given
+** Description This function is called to get the Type Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1307,7 +1307,7 @@ OBX_API extern BOOLEAN OBX_ReadTypeHdr(BT_HDR *p_pkt, UINT8 **p_type, UINT16 *p_
**
** Function OBX_ReadLengthHdr
**
-** Description This function is called to get the Length Header in the given
+** Description This function is called to get the Length Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1320,7 +1320,7 @@ OBX_API extern BOOLEAN OBX_ReadLengthHdr(BT_HDR *p_pkt, UINT32 *p_len);
**
** Function OBX_ReadTimeHdr
**
-** Description This function is called to get the Time Header in the given
+** Description This function is called to get the Time Header in the given
** OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1468,7 +1468,7 @@ OBX_API extern BOOLEAN OBX_ReadPermissionHdr(BT_HDR *p_pkt, UINT8 *p_user, UINT8
**
** Function OBX_Read1ByteHdr
**
-** Description This function is called to get the UINT8 HV of the given HI
+** Description This function is called to get the UINT8 HV of the given HI
** in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1481,7 +1481,7 @@ OBX_API extern BOOLEAN OBX_Read1ByteHdr(BT_HDR *p_pkt, UINT8 id, UINT8 *p_data);
**
** Function OBX_Read4ByteHdr
**
-** Description This function is called to get the UINT32 HV of the given HI
+** Description This function is called to get the UINT32 HV of the given HI
** in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1533,7 +1533,7 @@ OBX_API extern BOOLEAN OBX_ReadTriplet(BT_HDR *p_pkt, UINT8 id, tOBX_TRIPLET *p_
**
** Function OBX_ReadActionIdHdr
**
-** Description This function is called to get the HV of the Action ID header
+** Description This function is called to get the HV of the Action ID header
** in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1546,7 +1546,7 @@ OBX_API extern BOOLEAN OBX_ReadActionIdHdr(BT_HDR *p_pkt, UINT8 *p_data);
**
** Function OBX_ReadChallenge
**
-** Description This function is called to read the Realm and options of the
+** Description This function is called to read the Realm and options of the
** Authentication Challenge Header in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1561,7 +1561,7 @@ OBX_API extern BOOLEAN OBX_ReadChallenge(BT_HDR *p_pkt, tOBX_CHARSET *p_charset,
**
** Function OBX_ReadAuthParams
**
-** Description This function is called to read the User ID of the
+** Description This function is called to read the User ID of the
** Authentication Response Header in the given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
@@ -1639,7 +1639,7 @@ OBX_API extern BOOLEAN OBX_AddUtf8DestNameHdr(BT_HDR *p_pkt, UINT8 *p_dest);
**
** Function OBX_ReadUtf8NameHdr
**
-** Description This function is called to get the Name Header in the given
+** Description This function is called to get the Name Header in the given
** OBEX packet. If Name header exists in the given OBEX packet,
** it is converted to UTF8 format and copied into p_name.
**
@@ -1669,7 +1669,7 @@ OBX_API extern BOOLEAN OBX_ReadUtf8DescrHdr(BT_HDR *p_pkt, UINT8 *p_descr, UINT1
** Function OBX_ReadUtf8DestNameHdr
**
** Description This function is called to get the DestName Header in the
-** given OBEX packet.
+** given OBEX packet.
**
** Returns TRUE, if the header is in the OBEX packet.
** FALSE, otherwise.
diff --git a/stack/include/pan_api.h b/stack/include/pan_api.h
index f387077..9af03de 100644
--- a/stack/include/pan_api.h
+++ b/stack/include/pan_api.h
@@ -18,7 +18,7 @@
*****************************************************************************/
/* Define the minimum offset needed in a GKI buffer for
-** sending PAN packets. Note, we are currently not sending
+** sending PAN packets. Note, we are currently not sending
** extension headers, but may in the future, so allow
** space for them
*/
@@ -81,7 +81,7 @@ typedef UINT8 tPAN_RESULT;
** to the application. The second parameter TRUE means
** to create the bridge and FALSE means to remove it.
*/
-typedef void (tPAN_CONN_STATE_CB) (UINT16 handle, BD_ADDR bd_addr, tPAN_RESULT state, BOOLEAN is_role_change,
+typedef void (tPAN_CONN_STATE_CB) (UINT16 handle, BD_ADDR bd_addr, tPAN_RESULT state, BOOLEAN is_role_change,
UINT8 src_role, UINT8 dst_role);
@@ -218,7 +218,7 @@ extern "C"
** should set the PAN role explicitly.
**
** Parameters: p_register - contains all callback function pointers
-**
+**
**
** Returns none
**
@@ -259,7 +259,7 @@ PAN_API extern void PAN_Deregister (void);
** p_gn_name - Service name for GN role
** p_nap_name - Service name for NAP role
** Can be NULL if user wants it to be default
-**
+**
** Returns PAN_SUCCESS - if the role is set successfully
** PAN_FAILURE - if the role is not valid
**
@@ -274,7 +274,7 @@ PAN_API extern tPAN_RESULT PAN_SetRole (UINT8 role,
**
** Function PAN_Connect
**
-** Description This function is called by the application to initiate a
+** Description This function is called by the application to initiate a
** connection to the remote device
**
** Parameters: rem_bda - BD Addr of the remote device
@@ -284,7 +284,7 @@ PAN_API extern tPAN_RESULT PAN_SetRole (UINT8 role,
** PAN_ROLE_GN_SERVER is for GN role
** PAN_ROLE_NAP_SERVER is for NAP role
** *handle - Pointer for returning Handle to the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is initiated successfully
** PAN_NO_RESOURCES - resources are not sufficent
** PAN_FAILURE - if the connection cannot be initiated
@@ -299,10 +299,10 @@ PAN_API extern tPAN_RESULT PAN_Connect (BD_ADDR rem_bda, UINT8 src_role, UINT8 d
**
** Function PAN_Disconnect
**
-** Description This is used to disconnect the connection
+** Description This is used to disconnect the connection
**
** Parameters: handle - handle for the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is closed successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in disconnecting
@@ -327,7 +327,7 @@ PAN_API extern tPAN_RESULT PAN_Disconnect (UINT16 handle);
** p_data - pointer to the data
** len - length of the data
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -357,7 +357,7 @@ PAN_API extern tPAN_RESULT PAN_Write (UINT16 handle,
** protocol - protocol of the ethernet packet like IP or ARP
** p_buf - pointer to the data buffer
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -380,7 +380,7 @@ PAN_API extern tPAN_RESULT PAN_WriteBuf (UINT16 handle,
** num_filters - number of protocol filter ranges
** start - array of starting protocol numbers
** end - array of ending protocol numbers
-**
+**
**
** Returns PAN_SUCCESS if protocol filters are set successfully
** PAN_FAILURE if connection not found or error in setting
@@ -403,7 +403,7 @@ PAN_API extern tPAN_RESULT PAN_SetProtocolFilters (UINT16 handle,
** multicast address ranges
** p_end_array - Pointer to sequence of ends of all
** multicast address ranges
-**
+**
**
** Returns PAN_SUCCESS if multicast filters are set successfully
** PAN_FAILURE if connection not found or error in setting
diff --git a/stack/include/rfcdefs.h b/stack/include/rfcdefs.h
index 98ab965..4dacda1 100644
--- a/stack/include/rfcdefs.h
+++ b/stack/include/rfcdefs.h
@@ -16,7 +16,7 @@
#define PORT_MAX_RFC_PORTS 31
/*
-** If nothing is negotiated MTU should be 127
+** If nothing is negotiated MTU should be 127
*/
#define RFCOMM_DEFAULT_MTU 127
@@ -86,10 +86,10 @@
}
#define RFCOMM_FRAME_IS_CMD(initiator, cr) \
- (( (initiator) && !(cr)) || (!(initiator) && (cr)))
+ (( (initiator) && !(cr)) || (!(initiator) && (cr)))
#define RFCOMM_FRAME_IS_RSP(initiator, cr) \
- (( (initiator) && (cr)) || (!(initiator) && !(cr)))
+ (( (initiator) && (cr)) || (!(initiator) && !(cr)))
#define RFCOMM_CR(initiator, is_command) \
(( ( (initiator) && (is_command)) \
@@ -129,9 +129,9 @@
#define RFCOMM_MSC_RTR 0x08 /* Ready to receive*/
#define RFCOMM_MSC_IC 0x40 /* Incomming call indicator*/
#define RFCOMM_MSC_DV 0x80 /* Data Valid*/
-
-#define RFCOMM_MSC_SHIFT_BREAK 4
-#define RFCOMM_MSC_BREAK_MASK 0xF0
+
+#define RFCOMM_MSC_SHIFT_BREAK 4
+#define RFCOMM_MSC_BREAK_MASK 0xF0
#define RFCOMM_MSC_BREAK_PRESENT_MASK 0x02
#define RFCOMM_BAUD_RATE_2400 0x00
@@ -143,26 +143,26 @@
#define RFCOMM_BAUD_RATE_57600 0x06
#define RFCOMM_BAUD_RATE_115200 0x07
#define RFCOMM_BAUD_RATE_230400 0x08
-
+
#define RFCOMM_5_BITS 0x00
#define RFCOMM_6_BITS 0x01
#define RFCOMM_7_BITS 0x02
#define RFCOMM_8_BITS 0x03
-
+
#define RFCOMM_RPN_BITS_MASK 0x03
#define RFCOMM_RPN_BITS_SHIFT 0
-
+
#define RFCOMM_ONESTOPBIT 0x00
#define RFCOMM_ONE5STOPBITS 0x01
-
+
#define RFCOMM_RPN_STOP_BITS_MASK 0x01
#define RFCOMM_RPN_STOP_BITS_SHIFT 2
-
+
#define RFCOMM_PARITY_NO 0x00
#define RFCOMM_PARITY_YES 0x01
#define RFCOMM_RPN_PARITY_MASK 0x01
#define RFCOMM_RPN_PARITY_SHIFT 3
-
+
#define RFCOMM_ODD_PARITY 0x00
#define RFCOMM_EVEN_PARITY 0x01
#define RFCOMM_MARK_PARITY 0x02
diff --git a/stack/include/sdpdefs.h b/stack/include/sdpdefs.h
index 886808c..6ef2972 100644
--- a/stack/include/sdpdefs.h
+++ b/stack/include/sdpdefs.h
@@ -164,7 +164,7 @@
#define UUID_PROTOCOL_MCAP_CTRL 0x001E
#define UUID_PROTOCOL_MCAP_DATA 0x001F
#define UUID_PROTOCOL_L2CAP 0x0100
-#define UUID_PROTOCOL_ATT 0x0007
+#define UUID_PROTOCOL_ATT 0x0007
/* Define common 16-bit service class UUIDs
*/
@@ -240,8 +240,8 @@
#define UUID_SERVCLASS_MESSAGE_ACCESS 0X1132 /* Message Access Service UUID */
#define UUID_SERVCLASS_MESSAGE_NOTIFICATION 0X1133 /* Message Notification Service UUID */
-#define UUID_SERVCLASS_GAP_SERVER 0x1800
-#define UUID_SERVCLASS_GATT_SERVER 0x1801
+#define UUID_SERVCLASS_GAP_SERVER 0x1800
+#define UUID_SERVCLASS_GATT_SERVER 0x1801
#define UUID_SERVCLASS_IMMEDIATE_ALERT 0x1802 /* immediate alert */
#define UUID_SERVCLASS_LINKLOSS 0x1803 /* Link Loss Alert */
#define UUID_SERVCLASS_TX_POWER 0x1804 /* TX power */
diff --git a/stack/include/smp_api.h b/stack/include/smp_api.h
index 1fd7c18..f04ff92 100644
--- a/stack/include/smp_api.h
+++ b/stack/include/smp_api.h
@@ -81,25 +81,25 @@ enum
typedef UINT8 tSMP_OOB_FLAG;
#define SMP_AUTH_NO_BOND 0x00
-#define SMP_AUTH_GEN_BOND 0x01 //todo sdh change GEN_BOND to BOND
+#define SMP_AUTH_GEN_BOND 0x01 //todo sdh change GEN_BOND to BOND
/* SMP Authentication requirement */
#define SMP_AUTH_YN_BIT (1 << 2)
#define SMP_AUTH_MASK (SMP_AUTH_GEN_BOND|SMP_AUTH_YN_BIT)
-#define SMP_AUTH_BOND SMP_AUTH_GEN_BOND
+#define SMP_AUTH_BOND SMP_AUTH_GEN_BOND
#define SMP_AUTH_NB_ENC_ONLY 0x00 //(SMP_AUTH_MASK | BTM_AUTH_SP_NO) /* no MITM, No Bonding, Encryptino only */
-#define SMP_AUTH_NB_IOCAP (SMP_AUTH_NO_BOND | SMP_AUTH_YN_BIT) /* MITM, No Bonding, Use IO Capability
- to detrermine authenticaion procedure */
+#define SMP_AUTH_NB_IOCAP (SMP_AUTH_NO_BOND | SMP_AUTH_YN_BIT) /* MITM, No Bonding, Use IO Capability
+ to detrermine authenticaion procedure */
#define SMP_AUTH_GB_ENC_ONLY (SMP_AUTH_GEN_BOND ) /* no MITM, General Bonding, Encryptino only */
-#define SMP_AUTH_GB_IOCAP (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT) /* MITM, General Bonding, Use IO Capability
+#define SMP_AUTH_GB_IOCAP (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT) /* MITM, General Bonding, Use IO Capability
to detrermine authenticaion procedure */
typedef UINT8 tSMP_AUTH_REQ;
#define SMP_SEC_NONE 0
-#define SMP_SEC_UNAUTHENTICATE (1 << 0)
+#define SMP_SEC_UNAUTHENTICATE (1 << 0)
#define SMP_SEC_AUTHENTICATED (1 << 2)
typedef UINT8 tSMP_SEC_LEVEL;
@@ -120,7 +120,7 @@ typedef struct
tSMP_AUTH_REQ auth_req; /* Authentication required (for local device) */
UINT8 max_key_size; /* max encryption key size */
tSMP_KEYS init_keys; /* initiator keys to be distributed */
- tSMP_KEYS resp_keys; /* responder keys */
+ tSMP_KEYS resp_keys; /* responder keys */
} tSMP_IO_REQ;
typedef struct
@@ -228,8 +228,8 @@ extern "C"
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation SMP_SUCCESS if success.
-** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation SMP_SUCCESS if success.
+** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -244,7 +244,7 @@ extern "C"
** Passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which PIN was requested
-** res - result of the operation BTM_SUCCESS if success
+** res - result of the operation BTM_SUCCESS if success
** passkey - numeric value in the range of
** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
**
@@ -259,11 +259,11 @@ extern "C"
** Simple Pairing in response to BTM_SP_RMT_OOB_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
- SMP_API extern void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len,
+ SMP_API extern void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len,
UINT8 *p_data);
/*******************************************************************************
@@ -272,18 +272,18 @@ extern "C"
**
** Description This function is called to encrypt the data with the specified
** key
-**
+**
** Parameters: key - Pointer to key key[0] conatins the MSB
** key_len - key length
** plain_text - Pointer to data to be encrypted
** plain_text[0] conatins the MSB
** pt_len - plain text length
** p_out - pointer to the encrypted outputs
-**
-** Returns Boolean - TRUE: encryption is successful
+**
+** Returns Boolean - TRUE: encryption is successful
*******************************************************************************/
- SMP_API extern BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+ SMP_API extern BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out);
#ifdef __cplusplus
diff --git a/stack/include/uipc_msg.h b/stack/include/uipc_msg.h
index 14f4391..0091687 100644
--- a/stack/include/uipc_msg.h
+++ b/stack/include/uipc_msg.h
@@ -26,7 +26,7 @@
********************************/
/* tUIPC_STATUS codes*/
-enum
+enum
{
UIPC_STATUS_SUCCESS,
UIPC_STATUS_FAIL
@@ -107,7 +107,7 @@ typedef struct t_uipc_log_msg
#define SLIP_SYNC_SUCCESS 0
#define SLIP_SYNC_FAILURE 1
-typedef struct
+typedef struct
{
UINT8 op_code;
UINT8 status;
@@ -152,7 +152,7 @@ typedef struct t_l2c_stream_info
typedef struct t_l2c_sync_to_lite_req
{
- UINT8 op_code; /* L2C_SYNC_TO_LITE_REQ */
+ UINT8 op_code; /* L2C_SYNC_TO_LITE_REQ */
UINT16 light_xmit_quota; /* Total quota for light stack */
UINT16 acl_data_size; /* Max ACL data size across HCI transport */
UINT16 non_flushable_pbf; /* L2CAP_PKT_START_NON_FLUSHABLE if controller supports */
@@ -387,8 +387,8 @@ typedef UINT16 tAUDIO_CODEC_TYPE;
#define CODEC_INFO_SBC_SUBBAND_8 0x01
/* MPEG audio version ID */
-#define CODEC_INFO_MP25_ID 0x00
-#define CODEC_INFO_RESERVE 0x01
+#define CODEC_INFO_MP25_ID 0x00
+#define CODEC_INFO_RESERVE 0x01
#define CODEC_INFO_MP2_ID 0x02
#define CODEC_INFO_MP3_ID 0x03
@@ -564,10 +564,10 @@ typedef struct
typedef struct
{
- UINT16 sampling_freq;
+ UINT16 sampling_freq;
UINT8 channel_mode; /* 0x02:mono, 0x01:dual */
UINT32 bitrate; /* 0 - 320K */
- UINT32 sbr_profile; /* 1: ON, 0: OFF */
+ UINT32 sbr_profile; /* 1: ON, 0: OFF */
} tCODEC_INFO_AAC;
typedef union
@@ -686,7 +686,7 @@ typedef struct
tAUDIO_ROUTE_SF src_sf;
tAUDIO_ROUTE_OUT out;
tAUDIO_ROUTE_SF out_codec_sf;
- tAUDIO_ROUTE_SF out_i2s_sf;
+ tAUDIO_ROUTE_SF out_i2s_sf;
tAUDIO_ROUTE_EQ eq_mode;
} tAUDIO_ROUTE_CONFIG_REQ;
@@ -720,13 +720,13 @@ typedef struct
UINT32 audio_l_g2; /* IIR biquad filter left ch gain 2 */
UINT32 audio_l_g3; /* IIR biquad filter left ch gain 3 */
UINT32 audio_l_g4; /* IIR biquad filter left ch gain 4 */
- UINT32 audio_l_gl; /* IIR biquad filter left ch global gain */
+ UINT32 audio_l_gl; /* IIR biquad filter left ch global gain */
UINT32 audio_r_g0; /* IIR biquad filter left ch gain 0 */
UINT32 audio_r_g1; /* IIR biquad filter left ch gain 1 */
UINT32 audio_r_g2; /* IIR biquad filter left ch gain 2 */
UINT32 audio_r_g3; /* IIR biquad filter left ch gain 3 */
UINT32 audio_r_g4; /* IIR biquad filter left ch gain 4 */
- UINT32 audio_r_gl; /* IIR biquad filter left ch global gain */
+ UINT32 audio_r_gl; /* IIR biquad filter left ch global gain */
} tEQ_GAIN_CONFIG;
typedef struct
@@ -734,7 +734,7 @@ typedef struct
UINT8 opcode; /* AUDIO_MIX_CONFIG_REQ */
tAUDIO_ROUTE_MIX mix_src;
tAUDIO_ROUTE_SF mix_src_sf;
- tMIX_SCALE_CONFIG mix_scale;
+ tMIX_SCALE_CONFIG mix_scale;
tCHIRP_CONFIG chirp_config;
} tAUDIO_MIX_CONFIG_REQ;
@@ -771,7 +771,7 @@ typedef struct
typedef struct
{
UINT8 opcode; /* AUDIO_SCALE_CONFIG_REQ */
- tMIX_SCALE_CONFIG mix_scale;
+ tMIX_SCALE_CONFIG mix_scale;
} tAUDIO_SCALE_CONFIG_REQ;
typedef UINT8 tBTA_AV_DUAL_STACK_EVT;
diff --git a/stack/include/wcassert.h b/stack/include/wcassert.h
index e0a22a3..459081f 100644
--- a/stack/include/wcassert.h
+++ b/stack/include/wcassert.h
@@ -8,17 +8,17 @@
** development / debugging to do precondition and postcondition
** checks for routines.
**
-** The macros are enabled when _DEBUG is defined.
-** Note:
-** None.
+** The macros are enabled when _DEBUG is defined.
+** Note:
+** None.
**
-** Revision History:
-** 10/23/99 Stephen Lee Create
+** Revision History:
+** 10/23/99 Stephen Lee Create
**
-** Copyright (c) 1999-2004 WIDCOMM Inc., All Rights Reserved.
+** Copyright (c) 1999-2004 WIDCOMM Inc., All Rights Reserved.
**
*******************************************************************************/
-
+
#ifdef _DEBUG
diff --git a/stack/l2cap/l2c_api.c b/stack/l2cap/l2c_api.c
index 8800df4..476ded1 100644
--- a/stack/l2cap/l2c_api.c
+++ b/stack/l2cap/l2c_api.c
@@ -31,7 +31,7 @@
** services.
**
** Returns PSM to use or zero if error. Typically, the PSM returned
-** is the same as was passed in, but for an outgoing-only
+** is the same as was passed in, but for an outgoing-only
** connection to a dynamic PSM, a "virtual" PSM is returned
** and should be used in the calls to L2CA_ConnectReq(),
** L2CA_ErtmConnectReq() and L2CA_Deregister()
@@ -150,7 +150,7 @@ void L2CA_Deregister (UINT16 psm)
** Description Other layers call this function to find an unused PSM for L2CAP
** services.
**
-** Returns PSM to use.
+** Returns PSM to use.
**
*******************************************************************************/
UINT16 L2CA_AllocatePSM(void)
@@ -221,8 +221,8 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
tL2C_RCB *p_rcb;
L2CAP_TRACE_API6 ("L2CA_ErtmConnectReq() PSM: 0x%04x BDA: %08x%04x p_ertm_info: 0x%08x allowed:0x%x preferred:%d", psm,
- (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
- (p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info,
+ (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
+ (p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info,
(p_ertm_info) ? p_ertm_info->allowed_modes : 0, (p_ertm_info) ? p_ertm_info->preferred_mode : 0);
/* Fail if we have not established communications with the controller */
@@ -341,9 +341,9 @@ BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 re
tL2C_LCB *p_lcb;
tL2C_CCB *p_ccb;
- L2CAP_TRACE_API6 ("L2CA_ErtmConnectRsp() CID: 0x%04x Result: %d Status: %d BDA: %08x%04x p_ertm_info:0x%08x",
+ L2CAP_TRACE_API6 ("L2CA_ErtmConnectRsp() CID: 0x%04x Result: %d Status: %d BDA: %08x%04x p_ertm_info:0x%08x",
lcid, result, status,
- (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
+ (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
(p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info);
/* First, find the link control block */
@@ -424,7 +424,7 @@ BOOLEAN L2CA_ConfigReq (UINT16 cid, tL2CAP_CFG_INFO *p_cfg)
{
tL2C_CCB *p_ccb;
- L2CAP_TRACE_API5 ("L2CA_ConfigReq() CID 0x%04x: fcr_present:%d (mode %d) mtu_present:%d (%d)",
+ L2CAP_TRACE_API5 ("L2CA_ConfigReq() CID 0x%04x: fcr_present:%d (mode %d) mtu_present:%d (%d)",
cid, p_cfg->fcr_present, p_cfg->fcr.mode, p_cfg->mtu_present, p_cfg->mtu);
/* Find the channel control block. We don't know the link it is on. */
@@ -475,7 +475,7 @@ BOOLEAN L2CA_ConfigRsp (UINT16 cid, tL2CAP_CFG_INFO *p_cfg)
{
tL2C_CCB *p_ccb;
- L2CAP_TRACE_API6 ("L2CA_ConfigRsp() CID: 0x%04x Result: %d MTU present:%d Flush TO:%d FCR:%d FCS:%d",
+ L2CAP_TRACE_API6 ("L2CA_ConfigRsp() CID: 0x%04x Result: %d MTU present:%d Flush TO:%d FCR:%d FCS:%d",
cid, p_cfg->result, p_cfg->mtu_present, p_cfg->flush_to_present, p_cfg->fcr_present, p_cfg->fcs_present);
/* Find the channel control block. We don't know the link it is on. */
@@ -537,7 +537,7 @@ BOOLEAN L2CA_DisconnectReq (UINT16 cid)
**
** Function L2CA_DisconnectRsp
**
-** Description Higher layers call this function to acknowledge the
+** Description Higher layers call this function to acknowledge the
** disconnection of a channel.
**
** Returns void
@@ -663,7 +663,7 @@ BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_cal
L2CAP_TRACE_ERROR0 ("L2CA_Echo ERROR : link not established");
return FALSE;
}
-
+
if (p_lcb->link_state != LST_CONNECTED)
{
L2CAP_TRACE_ERROR0 ("L2CA_Echo ERROR : link is not connected");
@@ -679,7 +679,7 @@ BOOLEAN L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_cal
l2cu_send_peer_echo_req (p_lcb, pp, p_data->len);
return (TRUE);
-
+
}
/*******************************************************************************
@@ -735,18 +735,18 @@ BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, BOOLEAN is_global)
** Function L2CA_SetIdleTimeoutByBdAddr
**
** Description Higher layers call this function to set the idle timeout for
-** a connection. The "idle timeout" is the amount of time that
-** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** a connection. The "idle timeout" is the amount of time that
+** a connection can remain up with no L2CAP channels on it.
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This timeout applies to all logical channels active on the
+** NOTE This timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout)
@@ -908,7 +908,7 @@ UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr)
BOOLEAN L2CA_SetAclPriority (BD_ADDR bd_addr, UINT8 priority)
{
L2CAP_TRACE_API6 ("L2CA_SetAclPriority() bdaddr: %02x%02x%02x%02x%04x, priority:%d",
- bd_addr[0], bd_addr[1], bd_addr[2],
+ bd_addr[0], bd_addr[1], bd_addr[2],
bd_addr[3], (bd_addr[4] << 8) + bd_addr[5], priority);
return (l2cu_set_acl_priority(bd_addr, priority, FALSE));
@@ -1056,21 +1056,21 @@ BOOLEAN L2CA_SetChnlDataRate (UINT16 cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_
**
** Function L2CA_SetFlushTimeout
**
-** Description This function set the automatic flush time out in Baseband
+** Description This function set the automatic flush time out in Baseband
** for ACL-U packets.
** BdAddr : the remote BD address of ACL link. If it is BT_DB_ANY
** then the flush time out will be applied to all ACL link.
** FlushTimeout: flush time out in ms
-** 0x0000 : No automatic flush
-** L2CAP_NO_RETRANSMISSION : No retransmission
-** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
+** 0x0000 : No automatic flush
+** L2CAP_NO_RETRANSMISSION : No retransmission
+** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5)
** <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot).
** Otherwise, return FALSE.
-** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
+** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
**
** Returns TRUE if command succeeded, FALSE if failed
**
-** NOTE This flush timeout applies to all logical channels active on the
+** NOTE This flush timeout applies to all logical channels active on the
** ACL link.
*******************************************************************************/
BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
@@ -1094,7 +1094,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
hci_flush_to = flush_tout;
}
/* no automatic flush (infinite timeout) */
- else if (flush_tout == L2CAP_NO_AUTOMATIC_FLUSH)
+ else if (flush_tout == L2CAP_NO_AUTOMATIC_FLUSH)
{
hci_flush_to = 0x0000;
}
@@ -1125,7 +1125,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
{
p_lcb->link_flush_tout = flush_tout;
- L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
+ L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
flush_tout, bd_addr[3], bd_addr[4], bd_addr[5]);
if (!btsnd_hcic_write_auto_flush_tout (p_lcb->handle, hci_flush_to))
@@ -1134,7 +1134,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
}
else
{
- L2CAP_TRACE_WARNING3 ("WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;%02x%02x%02x]",
+ L2CAP_TRACE_WARNING3 ("WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;%02x%02x%02x]",
bd_addr[3], bd_addr[4], bd_addr[5]);
return (FALSE);
}
@@ -1152,8 +1152,8 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
{
p_lcb->link_flush_tout = flush_tout;
- L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
- flush_tout, p_lcb->remote_bd_addr[3],
+ L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
+ flush_tout, p_lcb->remote_bd_addr[3],
p_lcb->remote_bd_addr[4], p_lcb->remote_bd_addr[5]);
if (!btsnd_hcic_write_auto_flush_tout(p_lcb->handle, hci_flush_to))
@@ -1185,14 +1185,14 @@ BOOLEAN L2CA_GetPeerFeatures (BD_ADDR bd_addr, UINT32 *p_ext_feat, UINT8 *p_chnl
/* We must already have a link to the remote */
if ((p_lcb = l2cu_find_lcb_by_bd_addr (bd_addr)) == NULL)
{
- L2CAP_TRACE_WARNING2 ("L2CA_GetPeerFeatures() No BDA: %08x%04x",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ L2CAP_TRACE_WARNING2 ("L2CA_GetPeerFeatures() No BDA: %08x%04x",
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5]);
return (FALSE);
}
- L2CAP_TRACE_API4 ("L2CA_GetPeerFeatures() BDA: %08x%04x ExtFea: 0x%08x Chnl_Mask[0]: 0x%02x",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
+ L2CAP_TRACE_API4 ("L2CA_GetPeerFeatures() BDA: %08x%04x ExtFea: 0x%08x Chnl_Mask[0]: 0x%02x",
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5], p_lcb->peer_ext_fea, p_lcb->peer_chnl_mask[0]);
*p_ext_feat = p_lcb->peer_ext_fea;
@@ -1218,7 +1218,7 @@ BOOLEAN L2CA_GetBDAddrbyHandle (UINT16 handle, BD_ADDR bd_addr)
{
tL2C_LCB *p_lcb = NULL;
BOOLEAN found_dev = FALSE;
-
+
p_lcb = l2cu_find_lcb_by_handle (handle);
if (p_lcb)
{
@@ -1299,7 +1299,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
UINT16 reason;
#endif
- L2CAP_TRACE_API3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x", fixed_cid,
+ L2CAP_TRACE_API3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
/* Check CID is valid and registered */
@@ -1322,7 +1322,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
{
if (!(p_lcb->peer_chnl_mask[0] & (1 << fixed_cid)))
{
- L2CAP_TRACE_EVENT3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x not supported", fixed_cid,
+ L2CAP_TRACE_EVENT3 ("L2CA_ConnectFixedChnl() CID: 0x%04x BDA: %08x%04x not supported", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
return (FALSE);
}
@@ -1368,7 +1368,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
**
** Parameters: Fixed CID
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
**
** Return value L2CAP_DW_SUCCESS, if data accepted
** L2CAP_DW_FAILED, if error
@@ -1378,7 +1378,7 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
{
tL2C_LCB *p_lcb;
- L2CAP_TRACE_API3 ("L2CA_SendFixedChnlData() CID: 0x%04x BDA: %08x%04x", fixed_cid,
+ L2CAP_TRACE_API3 ("L2CA_SendFixedChnlData() CID: 0x%04x BDA: %08x%04x", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
/* Check CID is valid and registered */
@@ -1464,7 +1464,7 @@ BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda);
if ( ((p_lcb) == NULL) || (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]) )
{
- L2CAP_TRACE_WARNING3 ("L2CA_RemoveFixedChnl() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
+ L2CAP_TRACE_WARNING3 ("L2CA_RemoveFixedChnl() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
return (FALSE);
}
@@ -1489,11 +1489,11 @@ BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
** Description Higher layers call this function to set the idle timeout for
** a fixed channel. The "idle timeout" is the amount of time that
** a connection can remain up with no L2CAP channels on it.
-** A timeout of zero means that the connection will be torn
-** down immediately when the last channel is removed.
-** A timeout of 0xFFFF means no timeout. Values are in seconds.
-** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
-** then the idle timeouts for all active l2cap links will be
+** A timeout of zero means that the connection will be torn
+** down immediately when the last channel is removed.
+** A timeout of 0xFFFF means no timeout. Values are in seconds.
+** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY,
+** then the idle timeouts for all active l2cap links will be
** changed.
**
** Returns TRUE if command succeeded, FALSE if failed
@@ -1507,7 +1507,7 @@ BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_cid, UINT16 idle
p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda);
if ( ((p_lcb) == NULL) || (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]) )
{
- L2CAP_TRACE_WARNING3 ("L2CA_SetFixedChannelTout() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
+ L2CAP_TRACE_WARNING3 ("L2CA_SetFixedChannelTout() CID: 0x%04x BDA: %08x%04x not connected", fixed_cid,
(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
return (FALSE);
}
@@ -1538,7 +1538,7 @@ BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_cid, UINT16 idle
** Returns TRUE if successful
**
*******************************************************************************/
-BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
+BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
tL2CAP_CFG_INFO **pp_our_cfg, tL2CAP_CH_CFG_BITS *p_our_cfg_bits,
tL2CAP_CFG_INFO **pp_peer_cfg, tL2CAP_CH_CFG_BITS *p_peer_cfg_bits)
{
@@ -1628,7 +1628,7 @@ UINT8 L2CA_DataWrite (UINT16 cid, BT_HDR *p_data)
**
** Function L2CA_SetChnlFlushability
**
-** Description Higher layers call this function to set a channels
+** Description Higher layers call this function to set a channels
** flushability flags
**
** Returns TRUE if CID found, else FALSE
@@ -1673,7 +1673,7 @@ BOOLEAN L2CA_SetChnlFlushability (UINT16 cid, BOOLEAN is_flushable)
*******************************************************************************/
UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags)
{
- L2CAP_TRACE_API3 ("L2CA_DataWriteEx() CID: 0x%04x Len: %d Flags:0x%04X",
+ L2CAP_TRACE_API3 ("L2CA_DataWriteEx() CID: 0x%04x Len: %d Flags:0x%04X",
cid, p_data->len, flags);
return l2c_data_write (cid, p_data, flags);
}
diff --git a/stack/l2cap/l2c_ble.c b/stack/l2cap/l2c_ble.c
index 8c686f9..8c69dee 100644
--- a/stack/l2cap/l2c_ble.c
+++ b/stack/l2cap/l2c_ble.c
@@ -63,7 +63,7 @@ BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda)
btm_ble_update_bg_state();
btm_ble_resume_bg_conn(NULL, TRUE);
- return(TRUE);
+ return(TRUE);
}
else
return(FALSE);
@@ -163,19 +163,19 @@ BOOLEAN L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, BOOLEAN enable)
p_lcb->upd_disabled = UPD_ENABLED;
}
}
- else
+ else
{
- /* application requests to disable parameters update. If parameters are already updated, lets set them
+ /* application requests to disable parameters update. If parameters are already updated, lets set them
up to what has been requested during connection establishement */
if (p_lcb->upd_disabled == UPD_UPDATED)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev (rem_bda);
- btsnd_hcic_ble_upd_ll_conn_params (p_lcb->handle,
+ btsnd_hcic_ble_upd_ll_conn_params (p_lcb->handle,
(UINT16)((p_dev_rec->conn_params.min_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.min_conn_int : L2CAP_LE_INT_MIN),
(UINT16)((p_dev_rec->conn_params.max_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.max_conn_int : L2CAP_LE_INT_MAX),
- (UINT16)((p_dev_rec->conn_params.slave_latency != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.slave_latency : 0),
- (UINT16) ((p_dev_rec->conn_params.supervision_tout != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.supervision_tout : L2CAP_LE_TIMEOUT_MAX),
+ (UINT16)((p_dev_rec->conn_params.slave_latency != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.slave_latency : 0),
+ (UINT16) ((p_dev_rec->conn_params.supervision_tout != BTM_BLE_CONN_PARAM_UNDEF) ? p_dev_rec->conn_params.supervision_tout : L2CAP_LE_TIMEOUT_MAX),
0, 0);
}
p_lcb->upd_disabled = UPD_DISABLED;
@@ -295,21 +295,21 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
(p_dev_rec->conn_params.slave_latency <= L2CAP_LE_LATENCY_MAX ) &&
(p_dev_rec->conn_params.supervision_tout >= L2CAP_LE_TIMEOUT_MIN) &&
(p_dev_rec->conn_params.supervision_tout <= L2CAP_LE_TIMEOUT_MAX) &&
- ((conn_interval < p_dev_rec->conn_params.min_conn_int &&
- p_dev_rec->conn_params.min_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ||
- (conn_interval > p_dev_rec->conn_params.max_conn_int) ||
- (conn_latency > p_dev_rec->conn_params.slave_latency) ||
+ ((conn_interval < p_dev_rec->conn_params.min_conn_int &&
+ p_dev_rec->conn_params.min_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ||
+ (conn_interval > p_dev_rec->conn_params.max_conn_int) ||
+ (conn_latency > p_dev_rec->conn_params.slave_latency) ||
(conn_timeout > p_dev_rec->conn_params.supervision_tout)))
{
L2CAP_TRACE_ERROR5 ("upd_ll_conn_params: HANDLE=%d min_conn_int=%d max_conn_int=%d slave_latency=%d supervision_tout=%d",
handle, p_dev_rec->conn_params.min_conn_int, p_dev_rec->conn_params.max_conn_int,
p_dev_rec->conn_params.slave_latency, p_dev_rec->conn_params.supervision_tout);
- btsnd_hcic_ble_upd_ll_conn_params (handle,
- p_dev_rec->conn_params.min_conn_int,
+ btsnd_hcic_ble_upd_ll_conn_params (handle,
+ p_dev_rec->conn_params.min_conn_int,
p_dev_rec->conn_params.max_conn_int,
- p_dev_rec->conn_params.slave_latency,
- p_dev_rec->conn_params.supervision_tout,
+ p_dev_rec->conn_params.slave_latency,
+ p_dev_rec->conn_params.supervision_tout,
0, 0);
}
@@ -318,7 +318,7 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
if (p_lcb->p_echo_rsp_cb)
{
- L2CAP_TRACE_ERROR0 ("l2cu_send_peer_echo_req");
+ L2CAP_TRACE_ERROR0 ("l2cu_send_peer_echo_req");
l2cu_send_peer_echo_req (p_lcb, NULL, 0);
}
@@ -399,7 +399,7 @@ void l2cble_advertiser_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE typ
** Returns void
**
*******************************************************************************/
-void l2cble_conn_comp(UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
+void l2cble_conn_comp(UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
UINT16 conn_interval, UINT16 conn_latency, UINT16 conn_timeout)
{
if (role == HCI_ROLE_MASTER)
@@ -415,7 +415,7 @@ void l2cble_conn_comp(UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE typ
**
** Function l2cble_process_sig_cmd
**
-** Description This function is called when a signalling packet is received
+** Description This function is called when a signalling packet is received
** on the BLE signalling CID
**
** Returns void
@@ -464,7 +464,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
{
if (min_interval < L2CAP_LE_INT_MIN || min_interval > L2CAP_LE_INT_MAX ||
max_interval < L2CAP_LE_INT_MIN || max_interval > L2CAP_LE_INT_MAX ||
- latency > L2CAP_LE_LATENCY_MAX ||
+ latency > L2CAP_LE_LATENCY_MAX ||
/*(timeout >= max_interval && latency > (timeout * 10/(max_interval * 1.25) - 1)) ||*/
timeout < L2CAP_LE_TIMEOUT_MIN || timeout > L2CAP_LE_TIMEOUT_MAX ||
max_interval < min_interval)
@@ -514,7 +514,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
**
** Function l2cble_create_conn
**
-** Description This function initiates an acl connection via HCI
+** Description This function initiates an acl connection via HCI
**
** Returns TRUE if successful, FALSE if connection not started.
**
diff --git a/stack/l2cap/l2c_csm.c b/stack/l2cap/l2c_csm.c
index 67de4f4..216f45b 100644
--- a/stack/l2cap/l2c_csm.c
+++ b/stack/l2cap/l2c_csm.c
@@ -154,13 +154,13 @@ static void l2c_csm_closed (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
case L2CEVT_LP_CONNECT_CFM: /* Link came up */
p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP;
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb);
break;
case L2CEVT_LP_CONNECT_CFM_NEG: /* Link failed */
/* Disconnect unless ACL collision and upper layer wants to handle it */
- if (p_ci->status != HCI_ERR_CONNECTION_EXISTS
+ if (p_ci->status != HCI_ERR_CONNECTION_EXISTS
|| !btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr))
{
L2CAP_TRACE_API2 ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x Status: %d", p_ccb->local_cid, p_ci->status);
@@ -182,9 +182,9 @@ static void l2c_csm_closed (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
Event uninit_use_in_call: Using uninitialized value "settings" (field "settings".timeout uninitialized) in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.max" in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.min" in call to function "BTM_SetPowerMode"
-// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
-// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
-*/
+// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
+// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
+*/
BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, &settings);
}
#else
@@ -192,7 +192,7 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
#endif
/* If sec access does not result in started SEC_COM or COMP_NEG are already processed */
- if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED)
p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP;
break;
@@ -239,9 +239,9 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
Event uninit_use_in_call: Using uninitialized value "settings" (field "settings".timeout uninitialized) in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.max" in call to function "BTM_SetPowerMode" [details]
Event uninit_use_in_call: Using uninitialized value "settings.min" in call to function "BTM_SetPowerMode"
-// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
-// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
-*/
+// FALSE-POSITIVE error from Coverity test-tool. Please do NOT remove following comment.
+// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode the other data members of tBTM_PM_PWR_MD are ignored
+*/
BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, &settings);
}
#else
@@ -249,7 +249,7 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
#endif
p_ccb->chnl_state = CST_TERM_W4_SEC_COMP;
- if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, FALSE, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED)
{
/* started the security process, tell the peer to set a longer timer */
@@ -319,7 +319,7 @@ static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
case L2CEVT_SEC_RE_SEND_CMD: /* BTM has enough info to proceed */
case L2CEVT_LP_CONNECT_CFM: /* Link came up */
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb);
break;
@@ -426,11 +426,11 @@ static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
else
{
/*
- ** L2CAP Connect Response will be sent out by 3 sec timer expiration
- ** because Bluesoleil doesn't respond to L2CAP Information Request.
- ** Bluesoleil seems to disconnect ACL link as failure case, because
- ** it takes too long (4~7secs) to get response.
- ** product version : Bluesoleil 2.1.1.0 EDR Release 060123
+ ** L2CAP Connect Response will be sent out by 3 sec timer expiration
+ ** because Bluesoleil doesn't respond to L2CAP Information Request.
+ ** Bluesoleil seems to disconnect ACL link as failure case, because
+ ** it takes too long (4~7secs) to get response.
+ ** product version : Bluesoleil 2.1.1.0 EDR Release 060123
** stack version : 05.04.11.20060119
*/
@@ -480,7 +480,7 @@ static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
break;
case L2CEVT_SEC_RE_SEND_CMD: /* BTM has enough info to proceed */
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm,
p_ccb->p_lcb->handle, FALSE, &l2c_link_sec_comp, p_ccb);
break;
}
@@ -736,7 +736,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
if (p_cfg->result != L2CAP_CFG_PENDING)
{
/* TBD: When config options grow beyong minimum MTU (48 bytes)
- * logic needs to be added to handle responses with
+ * logic needs to be added to handle responses with
* continuation bit set in flags field.
* 1. Send additional config request out until C-bit is cleared in response
*/
@@ -1007,7 +1007,7 @@ static void l2c_csm_open (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
BTM_CancelSniffMode (p_ccb->p_lcb->remote_bd_addr);
#endif
// btla-specific --
-
+
p_ccb->chnl_state = CST_W4_L2CA_DISCONNECT_RSP;
btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_DISCONNECT_TOUT);
L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x Conf Needed", p_ccb->local_cid);
diff --git a/stack/l2cap/l2c_fcr.c b/stack/l2cap/l2c_fcr.c
index c8126be..25a9b3f 100644
--- a/stack/l2cap/l2c_fcr.c
+++ b/stack/l2cap/l2c_fcr.c
@@ -107,7 +107,7 @@ unsigned short l2c_fcr_updcrc(unsigned short icrc, unsigned char *icp, int icnt)
register unsigned char *cp = icp;
register int cnt = icnt;
- while (cnt--)
+ while (cnt--)
{
crc = ((crc >> 8) & 0xff) ^ crctab[(crc & 0xff) ^ *cp++];
}
@@ -254,14 +254,14 @@ void l2c_fcr_cleanup (tL2C_CCB *p_ccb)
if (p_str)
{
sprintf(p_str, "Sent Pkts:%08u Bytes:%10u(%06u/sec) RR:%08u REJ:%08u RNR:%08u SREJ:%08u",
- p_ccb->fcrb.ertm_pkt_counts[0], p_ccb->fcrb.ertm_byte_counts[0],
+ p_ccb->fcrb.ertm_pkt_counts[0], p_ccb->fcrb.ertm_byte_counts[0],
(dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[0] * 100) / (dur / 10) : 0),
p_ccb->fcrb.s_frames_sent[0], p_ccb->fcrb.s_frames_sent[1], p_ccb->fcrb.s_frames_sent[2], p_ccb->fcrb.s_frames_sent[3]);
BT_TRACE_1(TRACE_CTRL_GENERAL | TRACE_LAYER_GKI | TRACE_ORG_GKI , TRACE_TYPE_GENERIC, "%s", p_str);
sprintf(p_str, "Rcvd Pkts:%08u Bytes:%10u(%06u/sec) RR:%08u REJ:%08u RNR:%08u SREJ:%08u",
- p_ccb->fcrb.ertm_pkt_counts[1], p_ccb->fcrb.ertm_byte_counts[1],
+ p_ccb->fcrb.ertm_pkt_counts[1], p_ccb->fcrb.ertm_byte_counts[1],
(dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[1] * 100) / (dur / 10) : 0),
p_ccb->fcrb.s_frames_rcvd[0], p_ccb->fcrb.s_frames_rcvd[1], p_ccb->fcrb.s_frames_rcvd[2], p_ccb->fcrb.s_frames_rcvd[3]);
@@ -280,7 +280,7 @@ void l2c_fcr_cleanup (tL2C_CCB *p_ccb)
continue;
}
- sprintf(p_str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
+ sprintf(p_str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
i, p_ccb->fcrb.throughput[i],
p_ccb->fcrb.ack_delay_avg[i], p_ccb->fcrb.ack_delay_min[i], p_ccb->fcrb.ack_delay_max[i],
p_ccb->fcrb.ack_q_count_avg[i], p_ccb->fcrb.ack_q_count_min[i], p_ccb->fcrb.ack_q_count_max[i] );
@@ -297,7 +297,7 @@ void l2c_fcr_cleanup (tL2C_CCB *p_ccb)
ack_q_count_avg /= (L2CAP_ERTM_STATS_NUM_AVG - 1);
BT_TRACE_3(TRACE_CTRL_GENERAL | TRACE_LAYER_GKI | TRACE_ORG_GKI , TRACE_TYPE_GENERIC,
- "throughput_avg: %8u (kbytes/sec), ack_delay_avg: %8u ms, ack_q_count_avg: %8u",
+ "throughput_avg: %8u (kbytes/sec), ack_delay_avg: %8u ms, ack_q_count_avg: %8u",
throughput_avg, ack_delay_avg, ack_q_count_avg );
GKI_freebuf(p_str);
@@ -853,7 +853,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
void l2c_fcr_proc_tout (tL2C_CCB *p_ccb)
{
L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_tout: CID: 0x%04x num_tries: %u (max: %u) wait_ack: %u ack_q_count: %u",
- p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
+ p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
#if (L2CAP_ERTM_STATS == TRUE)
@@ -888,7 +888,7 @@ void l2c_fcr_proc_tout (tL2C_CCB *p_ccb)
*******************************************************************************/
void l2c_fcr_proc_ack_tout (tL2C_CCB *p_ccb)
{
- L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_ack_tout: CID: 0x%04x State: %u Wack:%u Rq:%d Acked:%d", p_ccb->local_cid,
+ L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_ack_tout: CID: 0x%04x State: %u Wack:%u Rq:%d Acked:%d", p_ccb->local_cid,
p_ccb->chnl_state, p_ccb->fcrb.wait_ack, p_ccb->fcrb.next_seq_expected, p_ccb->fcrb.last_ack_sent);
if ( (p_ccb->chnl_state == CST_OPEN) && (!p_ccb->fcrb.wait_ack)
@@ -1232,7 +1232,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
/* Seq number is the next expected. Clear possible reject exception in case it occured */
p_fcrb->rej_sent = p_fcrb->srej_sent = FALSE;
- /* Adjust the next_seq, so that if the upper layer sends more data in the callback
+ /* Adjust the next_seq, so that if the upper layer sends more data in the callback
context, the received frame is acked by an I-frame. */
p_fcrb->next_seq_expected = (tx_seq + 1) & L2CAP_FCR_SEQ_MODULO;
@@ -1259,7 +1259,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
/* If it is the first I frame we did not ack, start ack timer */
if (!p_ccb->fcrb.ack_timer.in_use)
{
- btu_start_quick_timer (&p_ccb->fcrb.ack_timer, BTU_TTYPE_L2CAP_FCR_ACK,
+ btu_start_quick_timer (&p_ccb->fcrb.ack_timer, BTU_TTYPE_L2CAP_FCR_ACK,
(L2CAP_FCR_ACK_TOUT*QUICK_TIMER_TICKS_PER_SEC)/1000);
}
}
@@ -1475,7 +1475,7 @@ static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_wo
{
#if (L2CAP_NUM_FIXED_CHNLS > 0)
if (p_ccb->local_cid < L2CAP_BASE_APPL_CID)
- (*l2cb.fixed_reg[p_ccb->local_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_ccb->p_lcb->remote_bd_addr, p_buf);
+ (*l2cb.fixed_reg[p_ccb->local_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_ccb->p_lcb->remote_bd_addr, p_buf);
else
#endif
l2c_csm_execute (p_ccb, L2CEVT_L2CAP_DATA, p_buf);
@@ -1506,7 +1506,7 @@ static BOOLEAN retransmit_i_frames (tL2C_CCB *p_ccb, UINT8 tx_seq)
&& (p_ccb->fcrb.num_tries >= p_ccb->peer_cfg.fcr.max_transmit) )
{
L2CAP_TRACE_EVENT5 ("Max Tries Exceeded: (last_acq: %d CID: 0x%04x num_tries: %u (max: %u) ack_q_count: %u",
- p_ccb->fcrb.last_rx_ack, p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
+ p_ccb->fcrb.last_rx_ack, p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
p_ccb->fcrb.waiting_for_ack_q.count);
l2cu_disconnect_chnl (p_ccb);
@@ -1667,7 +1667,7 @@ BT_HDR *l2c_fcr_get_next_xmit_sdu_seg (tL2C_CCB *p_ccb, UINT16 max_packet_length
mid_seg = TRUE;
/* Get a new buffer and copy the data that can be sent in a PDU */
- p_xmit = l2c_fcr_clone_buf (p_buf, L2CAP_MIN_OFFSET + L2CAP_SDU_LEN_OFFSET,
+ p_xmit = l2c_fcr_clone_buf (p_buf, L2CAP_MIN_OFFSET + L2CAP_SDU_LEN_OFFSET,
max_pdu, p_ccb->ertm_info.fcr_tx_pool_id);
if (p_xmit != NULL)
@@ -1834,7 +1834,7 @@ UINT8 l2c_fcr_chk_chan_modes (tL2C_CCB *p_ccb)
**
** Function l2c_fcr_adj_our_req_options
**
-** Description Validates and sets up the FCR options passed in from
+** Description Validates and sets up the FCR options passed in from
** L2CA_ConfigReq based on remote device's features.
**
** Returns TRUE if no errors, Otherwise FALSE
@@ -1951,7 +1951,7 @@ BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
**
** Function l2c_fcr_adj_monitor_retran_timeout
**
-** Description Overrides monitor/retrans timer value based on controller
+** Description Overrides monitor/retrans timer value based on controller
**
** Returns None
**
@@ -1962,7 +1962,7 @@ void l2c_fcr_adj_monitor_retran_timeout (tL2C_CCB *p_ccb)
if (p_ccb->out_cfg_fcr_present)
{
/*
- ** if we requestd ERTM or accepted ERTM
+ ** if we requestd ERTM or accepted ERTM
** We may accept ERTM even if we didn't request ERTM, in case of requesting STREAM
*/
if ((p_ccb->our_cfg.fcr.mode == L2CAP_FCR_ERTM_MODE)
@@ -1986,7 +1986,7 @@ void l2c_fcr_adj_monitor_retran_timeout (tL2C_CCB *p_ccb)
**
** Function l2c_fcr_adj_our_rsp_options
**
-** Description Overrides any neccesary FCR options passed in from
+** Description Overrides any neccesary FCR options passed in from
** L2CA_ConfigRsp based on our FCR options.
** Only makes adjustments if channel is in ERTM mode.
**
@@ -2012,7 +2012,7 @@ void l2c_fcr_adj_our_rsp_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_ccb->peer_cfg.fcr.tx_win_sz = p_ccb->our_cfg.fcr.tx_win_sz;
}
// btla-specific --
-
+
p_cfg->fcr.mode = p_ccb->peer_cfg.fcr.mode;
p_cfg->fcr.tx_win_sz = p_ccb->peer_cfg.fcr.tx_win_sz;
p_cfg->fcr.max_transmit = p_ccb->peer_cfg.fcr.max_transmit;
@@ -2027,7 +2027,7 @@ void l2c_fcr_adj_our_rsp_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
** Function l2c_fcr_renegotiate_chan
**
** Description Called upon unsuccessful peer response to config request.
-** If the error is because of the channel mode, it will try
+** If the error is because of the channel mode, it will try
** to resend using another supported optional channel.
**
** Returns TRUE if resent configuration, False if channel matches or
@@ -2106,7 +2106,7 @@ BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_cfg->mtu = L2CAP_MTU_SIZE;
}
}
-
+
l2cu_process_our_cfg_req (p_ccb, &p_ccb->our_cfg);
l2cu_send_peer_config_req (p_ccb, &p_ccb->our_cfg);
btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_CFG_TIMEOUT);
@@ -2146,7 +2146,7 @@ UINT8 l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_ccb->p_lcb->w4_info_rsp = FALSE; /* Handles T61x SonyEricsson Bug in Info Request */
L2CAP_TRACE_EVENT5 ("l2c_fcr_process_peer_cfg_req() CFG fcr_present:%d fcr.mode:%d CCB FCR mode:%d preferred: %u allowed:%u",
- p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode, p_ccb->ertm_info.preferred_mode,
+ p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode, p_ccb->ertm_info.preferred_mode,
p_ccb->ertm_info.allowed_modes);
/* If Peer wants basic, we are done (accept it or disconnect) */
@@ -2181,10 +2181,10 @@ UINT8 l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
p_cfg->fcr.max_transmit = p_cfg->fcr.tx_win_sz = 0;
p_cfg->fcr.rtrans_tout = p_cfg->fcr.mon_tout = p_cfg->fcr.mps = 0;
p_ccb->our_cfg.fcr.rtrans_tout = p_ccb->our_cfg.fcr.mon_tout = p_ccb->our_cfg.fcr.mps = 0;
- fcr_ok = L2CAP_PEER_CFG_UNACCEPTABLE;
+ fcr_ok = L2CAP_PEER_CFG_UNACCEPTABLE;
}
- /* Only other valid case is if they want ERTM and we wanted STM which should be
+ /* Only other valid case is if they want ERTM and we wanted STM which should be
accepted if we support it; otherwise the channel should be disconnected */
else if ( (p_cfg->fcr.mode != L2CAP_FCR_ERTM_MODE)
|| !(p_ccb->ertm_info.allowed_modes & L2CAP_FCR_CHAN_OPT_ERTM) )
@@ -2669,7 +2669,7 @@ static void l2c_fcr_collect_ack_delay (tL2C_CCB *p_ccb, UINT8 num_bufs_acked)
p_ccb->fcrb.throughput_start = timestamp;
- sprintf(str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
+ sprintf(str, "[%02u] throughput: %5u, ack_delay avg:%3u, min:%3u, max:%3u, ack_q_count avg:%3u, min:%3u, max:%3u",
index, p_ccb->fcrb.throughput[index],
p_ccb->fcrb.ack_delay_avg[index], p_ccb->fcrb.ack_delay_min[index], p_ccb->fcrb.ack_delay_max[index],
p_ccb->fcrb.ack_q_count_avg[index], p_ccb->fcrb.ack_q_count_min[index], p_ccb->fcrb.ack_q_count_max[index] );
@@ -2678,12 +2678,12 @@ static void l2c_fcr_collect_ack_delay (tL2C_CCB *p_ccb, UINT8 num_bufs_acked)
index = (index + 1) % L2CAP_ERTM_STATS_NUM_AVG;
p_ccb->fcrb.ack_delay_avg_index = index;
-
+
p_ccb->fcrb.ack_q_count_max[index] = 0;
p_ccb->fcrb.ack_q_count_min[index] = 0xFFFFFFFF;
p_ccb->fcrb.ack_q_count_avg[index] = 0;
-
+
p_ccb->fcrb.ack_delay_max[index] = 0;
p_ccb->fcrb.ack_delay_min[index] = 0xFFFFFFFF;
p_ccb->fcrb.ack_delay_avg[index] = 0;
diff --git a/stack/l2cap/l2c_int.h b/stack/l2cap/l2c_int.h
index dcbe8dc..0630e12 100644
--- a/stack/l2cap/l2c_int.h
+++ b/stack/l2cap/l2c_int.h
@@ -293,7 +293,7 @@ typedef struct t_l2c_ccb
UINT8 flags;
tL2CAP_CFG_INFO our_cfg; /* Our saved configuration options */
- tL2CAP_CH_CFG_BITS peer_cfg_bits; /* Store what peer wants to configure */
+ tL2CAP_CH_CFG_BITS peer_cfg_bits; /* Store what peer wants to configure */
tL2CAP_CFG_INFO peer_cfg; /* Peer's saved configuration options */
BUFFER_Q xmit_hold_q; /* Transmit data hold queue */
@@ -332,7 +332,7 @@ typedef struct t_l2c_ccb
/***********************************************************************
** Define a queue of linked CCBs.
*/
-typedef struct
+typedef struct
{
tL2C_CCB *p_first_ccb; /* The first channel in this queue */
tL2C_CCB *p_last_ccb; /* The last channel in this queue */
@@ -745,7 +745,7 @@ extern void l2c_fcr_stop_timer (tL2C_CCB *p_ccb);
#if (BLE_INCLUDED == TRUE)
extern BOOLEAN l2cble_create_conn (tL2C_LCB *p_lcb);
extern void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len);
-extern void l2cble_conn_comp (UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
+extern void l2cble_conn_comp (UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
UINT16 conn_interval, UINT16 conn_latency, UINT16 conn_timeout);
#endif
diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c
index 8da26be..2183888 100644
--- a/stack/l2cap/l2c_link.c
+++ b/stack/l2cap/l2c_link.c
@@ -389,7 +389,7 @@ BOOLEAN l2c_link_hci_disc_comp (UINT16 handle, UINT8 reason)
/* If waiting for disconnect and reconnect is pending start the reconnect now
race condition where layer above issued connect request on link that was
- disconnecting
+ disconnecting
*/
if (p_lcb->ccb_queue.p_first_ccb != NULL)
{
@@ -481,12 +481,12 @@ void l2c_link_timeout (tL2C_LCB *p_lcb)
UINT16 timeout;
tBTM_STATUS rc;
- L2CAP_TRACE_EVENT3 ("L2CAP - l2c_link_timeout() link state %d first CCB %p is_bonding:%d",
+ L2CAP_TRACE_EVENT3 ("L2CAP - l2c_link_timeout() link state %d first CCB %p is_bonding:%d",
p_lcb->link_state, p_lcb->ccb_queue.p_first_ccb, p_lcb->is_bonding);
/* If link was connecting or disconnecting, clear all channels and drop the LCB */
if ((p_lcb->link_state == LST_CONNECTING_WAIT_SWITCH) ||
- (p_lcb->link_state == LST_CONNECTING) ||
+ (p_lcb->link_state == LST_CONNECTING) ||
(p_lcb->link_state == LST_CONNECT_HOLDING) ||
(p_lcb->link_state == LST_DISCONNECTING))
{
@@ -503,7 +503,7 @@ void l2c_link_timeout (tL2C_LCB *p_lcb)
p_ccb = pn;
}
#if (BLE_INCLUDED == TRUE)
- if (p_lcb->link_state == LST_CONNECTING &&
+ if (p_lcb->link_state == LST_CONNECTING &&
l2cb.is_ble_connecting == TRUE)
{
L2CA_CancelBleConnectReq(l2cb.ble_connecting_bda);
@@ -661,7 +661,7 @@ void l2c_link_adjust_allocation (void)
UINT16 hi_quota, low_quota;
UINT16 num_lowpri_links = 0;
UINT16 num_hipri_links = 0;
- UINT16 controller_xmit_quota = l2cb.num_lm_acl_bufs;
+ UINT16 controller_xmit_quota = l2cb.num_lm_acl_bufs;
UINT16 high_pri_link_quota = L2CAP_HIGH_PRI_MIN_XMIT_QUOTA_A;
/* If no links active, nothing to do. */
@@ -758,8 +758,8 @@ void l2c_link_adjust_allocation (void)
/* There is a special case where we have readjusted the link quotas and */
/* this link may have sent anything but some other link sent packets so */
/* so we may need a timer to kick off this link's transmissions. */
- if ( (p_lcb->link_state == LST_CONNECTED)
- && (p_lcb->link_xmit_data_q.count)
+ if ( (p_lcb->link_state == LST_CONNECTED)
+ && (p_lcb->link_xmit_data_q.count)
&& (p_lcb->sent_not_acked < p_lcb->link_xmit_quota) )
btu_start_timer (&p_lcb->timer_entry, BTU_TTYPE_L2CAP_LINK, L2CAP_LINK_FLOW_CONTROL_TOUT);
}
@@ -803,7 +803,7 @@ void l2c_link_adjust_chnl_allocation (void)
/* channel required higher data rate will get more buffer quota */
for (xx = 0; xx < MAX_L2CAP_CHANNELS; xx++)
{
- p_ccb = l2cb.ccb_pool + xx;
+ p_ccb = l2cb.ccb_pool + xx;
if (!p_ccb->in_use)
continue;
@@ -844,7 +844,7 @@ void l2c_link_adjust_chnl_allocation (void)
else
quota_per_weighted_chnls[xx] = 1;
- L2CAP_TRACE_DEBUG5 ("POOL ID:%d, GKI_poolcount = %d, reserved_buff = %d, weighted_chnls = %d, quota_per_weighted_chnls = %d",
+ L2CAP_TRACE_DEBUG5 ("POOL ID:%d, GKI_poolcount = %d, reserved_buff = %d, weighted_chnls = %d, quota_per_weighted_chnls = %d",
xx, GKI_poolcount(xx), reserved_buff[xx], weighted_chnls[xx], quota_per_weighted_chnls[xx] );
}
else
@@ -855,7 +855,7 @@ void l2c_link_adjust_chnl_allocation (void)
/* assign buffer quota to each channel based on its data rate requirement */
for (xx = 0; xx < MAX_L2CAP_CHANNELS; xx++)
{
- p_ccb = l2cb.ccb_pool + xx;
+ p_ccb = l2cb.ccb_pool + xx;
if (!p_ccb->in_use)
continue;
@@ -1046,14 +1046,14 @@ BOOLEAN l2c_link_check_power_mode (tL2C_LCB *p_lcb)
{
L2CAP_TRACE_DEBUG1 ("LCB(0x%x) is in park mode", p_lcb->handle);
// Coverity:
-// FALSE-POSITIVE error from Coverity test tool. Please do NOT remove following comment.
+// FALSE-POSITIVE error from Coverity test tool. Please do NOT remove following comment.
// coverity[uninit_use_in_call] False-positive: setting the mode to BTM_PM_MD_ACTIVE only uses settings.mode
the other data members of tBTM_PM_PWR_MD are ignored
memset((void*)&pm, 0, sizeof(pm));
pm.mode = BTM_PM_MD_ACTIVE;
BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, p_lcb->remote_bd_addr, &pm);
- btu_start_timer (&p_lcb->timer_entry,
+ btu_start_timer (&p_lcb->timer_entry,
BTU_TTYPE_L2CAP_LINK, L2CAP_WAIT_UNPARK_TOUT);
return TRUE;
}
@@ -1062,7 +1062,7 @@ BOOLEAN l2c_link_check_power_mode (tL2C_LCB *p_lcb)
{
L2CAP_TRACE_DEBUG1 ("LCB(0x%x) is in PM pending state", p_lcb->handle);
- btu_start_timer (&p_lcb->timer_entry,
+ btu_start_timer (&p_lcb->timer_entry,
BTU_TTYPE_L2CAP_LINK, L2CAP_WAIT_UNPARK_TOUT);
return TRUE;
}
@@ -1126,11 +1126,11 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf)
for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_lcb++)
{
/* If controller window is full, nothing to do */
- if ( (l2cb.controller_xmit_window == 0
+ if ( (l2cb.controller_xmit_window == 0
#if (BLE_INCLUDED == TRUE)
- && !p_lcb->is_ble_link
+ && !p_lcb->is_ble_link
#endif
- )
+ )
#if (BLE_INCLUDED == TRUE)
|| (p_lcb->is_ble_link && l2cb.controller_le_xmit_window == 0 )
#endif
@@ -1188,7 +1188,7 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf)
/* See if we can send anything from the link queue */
#if (BLE_INCLUDED == TRUE)
while ( ((l2cb.controller_xmit_window != 0 && !p_lcb->is_ble_link) ||
- (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
+ (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
&& (p_lcb->sent_not_acked < p_lcb->link_xmit_quota))
#else
while ( (l2cb.controller_xmit_window != 0)
@@ -1207,7 +1207,7 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf)
/* See if we can send anything for any channel */
#if (BLE_INCLUDED == TRUE)
while ( ((l2cb.controller_xmit_window != 0 && !p_lcb->is_ble_link) ||
- (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
+ (l2cb.controller_le_xmit_window != 0 && p_lcb->is_ble_link))
&& (p_lcb->sent_not_acked < p_lcb->link_xmit_quota))
#else
while ((l2cb.controller_xmit_window != 0) && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota))
@@ -1256,7 +1256,7 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
p_lcb->sent_not_acked++;
p_buf->layer_specific = 0;
-
+
#if (BLE_INCLUDED == TRUE)
if (p_lcb->is_ble_link)
{
@@ -1342,8 +1342,8 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
if (p_lcb->is_ble_link)
{
L2CAP_TRACE_DEBUG6 ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
- l2cb.controller_le_xmit_window,
- p_lcb->handle,
+ l2cb.controller_le_xmit_window,
+ p_lcb->handle,
p_lcb->link_xmit_quota, p_lcb->sent_not_acked,
l2cb.round_robin_quota, l2cb.round_robin_unacked);
}
@@ -1351,8 +1351,8 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
#endif
{
L2CAP_TRACE_DEBUG6 ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
- l2cb.controller_xmit_window,
- p_lcb->handle,
+ l2cb.controller_xmit_window,
+ p_lcb->handle,
p_lcb->link_xmit_quota, p_lcb->sent_not_acked,
l2cb.round_robin_quota, l2cb.round_robin_unacked);
}
@@ -1403,7 +1403,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
#endif
{
- /* Maintain the total window to the controller */
+ /* Maintain the total window to the controller */
l2cb.controller_xmit_window += num_sent;
}
@@ -1428,7 +1428,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
l2c_link_check_send_pkts (p_lcb, NULL, NULL);
/* If we were doing round-robin for low priority links, check 'em */
- if ( (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH)
+ if ( (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH)
&& (l2cb.check_round_robin)
&& (l2cb.round_robin_unacked < l2cb.round_robin_quota) )
{
@@ -1443,7 +1443,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
if (p_lcb->is_ble_link)
{
L2CAP_TRACE_DEBUG5 ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
- l2cb.controller_le_xmit_window,
+ l2cb.controller_le_xmit_window,
p_lcb->handle, p_lcb->sent_not_acked,
l2cb.check_round_robin, l2cb.round_robin_unacked);
}
@@ -1451,7 +1451,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
#endif
{
L2CAP_TRACE_DEBUG5 ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
- l2cb.controller_xmit_window,
+ l2cb.controller_xmit_window,
p_lcb->handle, p_lcb->sent_not_acked,
l2cb.check_round_robin, l2cb.round_robin_unacked);
@@ -1462,13 +1462,13 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
#if (BLE_INCLUDED == TRUE)
L2CAP_TRACE_DEBUG5 ("TotalWin=%d LE_Win: %d, Handle=0x%x, RRCheck=%d, RRUnack=%d",
l2cb.controller_xmit_window,
- l2cb.controller_le_xmit_window,
- handle,
+ l2cb.controller_le_xmit_window,
+ handle,
l2cb.check_round_robin, l2cb.round_robin_unacked);
#else
L2CAP_TRACE_DEBUG4 ("TotalWin=%d Handle=0x%x RRCheck=%d RRUnack=%d",
- l2cb.controller_xmit_window,
- handle,
+ l2cb.controller_xmit_window,
+ handle,
l2cb.check_round_robin, l2cb.round_robin_unacked);
#endif
}
@@ -1508,7 +1508,7 @@ BT_HDR *l2cap_link_chk_pkt_start (BT_HDR *p_cur_buf)
tL2C_LCB *p_lcb;
BT_HDR * p_return_buf; /* CR419: To avoid returning from too many places */
-
+
if (p_cur_buf)
{
p = (UINT8 *)(p_cur_buf + 1) + p_cur_buf->offset;
@@ -1579,7 +1579,7 @@ BT_HDR *l2cap_link_chk_pkt_start (BT_HDR *p_cur_buf)
+ p_cur_buf->offset
+ HCI_DATA_PREAMBLE_SIZE;
UINT8 * p1 = (UINT8 *)(p_return_buf + 1)
- + p_return_buf->offset
+ + p_return_buf->offset
+ p_return_buf->len;
/* Copy data from new buffer into base buffer then update the data */
diff --git a/stack/l2cap/l2c_main.c b/stack/l2cap/l2c_main.c
index a60140c..17b9df1 100644
--- a/stack/l2cap/l2c_main.c
+++ b/stack/l2cap/l2c_main.c
@@ -43,7 +43,7 @@ extern void tcs_proc_bcst_msg( BD_ADDR addr, BT_HDR *p_msg ) ;
**
** Function l2c_bcst_msg
**
-** Description
+** Description
**
** Returns void
**
@@ -251,7 +251,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
}
#endif
#if (L2CAP_NUM_FIXED_CHNLS > 0)
- else if ((rcv_cid >= L2CAP_FIRST_FIXED_CHNL) && (rcv_cid <= L2CAP_LAST_FIXED_CHNL) &&
+ else if ((rcv_cid >= L2CAP_FIRST_FIXED_CHNL) && (rcv_cid <= L2CAP_LAST_FIXED_CHNL) &&
(l2cb.fixed_reg[rcv_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb != NULL) )
{
/* If no CCB for this channel, allocate one */
@@ -262,7 +262,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_BASIC_MODE)
l2c_fcr_proc_pdu (p_ccb, p_msg);
else
- (*l2cb.fixed_reg[rcv_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_lcb->remote_bd_addr, p_msg);
+ (*l2cb.fixed_reg[rcv_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb)(p_lcb->remote_bd_addr, p_msg);
}
else
GKI_freebuf (p_msg);
@@ -457,7 +457,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
p_cfg_start = p;
- cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
+ cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
cfg_info.fcr_present = cfg_info.fcs_present = FALSE;
while (p < p_cfg_end)
@@ -559,7 +559,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
STREAM_TO_UINT16 (cfg_info.flags, p);
STREAM_TO_UINT16 (cfg_info.result, p);
- cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
+ cfg_info.flush_to_present = cfg_info.mtu_present = cfg_info.qos_present =
cfg_info.fcr_present = cfg_info.fcs_present = FALSE;
while (p < p_cfg_end)
@@ -688,7 +688,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
l2cu_send_peer_echo_rsp (p_lcb, id, NULL, 0);
#endif
break;
-
+
case L2CAP_CMD_ECHO_RSP:
#if (L2CAP_ENHANCED_FEATURES != 0)
l2cu_check_feature_rsp (p_lcb, id, p, cmd_len);
@@ -722,7 +722,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
p_lcb->info_rx_bits |= (1 << info_type);
- if ( (info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
+ if ( (info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
&& (result == L2CAP_INFO_RESP_RESULT_SUCCESS) )
{
STREAM_TO_UINT32( p_lcb->peer_ext_fea, p );
@@ -783,7 +783,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
** Function l2c_process_held_packets
**
** Description This function processes any L2CAP packets that arrived before
-** the HCI connection complete arrived. It is a work around for
+** the HCI connection complete arrived. It is a work around for
** badly behaved controllers.
**
** Returns void
@@ -946,9 +946,9 @@ UINT8 l2c_data_write (UINT16 cid, BT_HDR *p_data, UINT16 flags)
return (L2CAP_DW_FAILED);
}
-#ifndef TESTER /* Tester may send any amount of data. otherwise sending message
+#ifndef TESTER /* Tester may send any amount of data. otherwise sending message
bigger than mtu size of peer is a violation of protocol */
- if (p_data->len > p_ccb->peer_cfg.mtu)
+ if (p_data->len > p_ccb->peer_cfg.mtu)
{
L2CAP_TRACE_WARNING1 ("L2CAP - CID: 0x%04x cannot send message bigger than peer's mtu size", cid);
GKI_freebuf (p_data);
diff --git a/stack/l2cap/l2c_ucd.c b/stack/l2cap/l2c_ucd.c
index 03e55af..375988e 100644
--- a/stack/l2cap/l2c_ucd.c
+++ b/stack/l2cap/l2c_ucd.c
@@ -125,7 +125,7 @@ static void l2c_ucd_congestion_status_cback (BD_ADDR rem_bda, BOOLEAN is_congest
{
L2CAP_TRACE_DEBUG4 ("L2CAP - Calling UCDCongestionStatus_Cb (%d), PSM=0x%04x, BDA: %08x%04x,",
is_congested, p_rcb->psm,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
p_rcb->ucd.cb_info.pL2CA_UCD_Congestion_Status_Cb ( rem_bda, is_congested );
@@ -305,7 +305,7 @@ BOOLEAN L2CA_UcdDeregister ( UINT16 psm )
** Parameters: PSM
** BD_ADDR of remote device
** info_type : L2CAP_UCD_INFO_TYPE_RECEPTION
-** L2CAP_UCD_INFO_TYPE_MTU
+** L2CAP_UCD_INFO_TYPE_MTU
**
**
** Return value: TRUE if successs
@@ -318,7 +318,7 @@ BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type )
tL2C_RCB *p_rcb;
L2CAP_TRACE_API4 ("L2CA_UcdDiscover() PSM: 0x%04x BDA: %08x%04x, InfoType=0x%02x", psm,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5], info_type);
/* Fail if the PSM is not registered */
@@ -368,7 +368,7 @@ BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type )
**
** Parameters: PSM
** BD Address of remote
-** Pointer to buffer of type BT_HDR
+** Pointer to buffer of type BT_HDR
** flags : L2CAP_FLUSHABLE_CH_BASED
** L2CAP_FLUSHABLE_PKT
** L2CAP_NON_FLUSHABLE_PKT
@@ -385,7 +385,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
UINT8 *p;
L2CAP_TRACE_API3 ("L2CA_UcdDataWrite() PSM: 0x%04x BDA: %08x%04x", psm,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
/* Fail if the PSM is not registered */
@@ -436,7 +436,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
if (p_ccb->cong_sent)
{
L2CAP_TRACE_ERROR3 ("L2CAP - Handle: 0x%04x UCD cannot be sent, already congested count: %u buff_quota: %u",
- p_lcb->handle,
+ p_lcb->handle,
(p_ccb->xmit_hold_q.count + p_lcb->ucd_out_sec_pending_q.count),
p_ccb->buff_quota);
@@ -473,7 +473,7 @@ BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout )
tL2C_CCB *p_ccb;
L2CAP_TRACE_API3 ("L2CA_UcdSetIdleTimeout() Timeout: 0x%04x BDA: %08x%04x", timeout,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
/* First, see if we already have a link to the remote */
@@ -506,7 +506,7 @@ BOOLEAN L2CA_UCDSetTxPriority ( BD_ADDR rem_bda, tL2CAP_CHNL_PRIORITY priority )
tL2C_CCB *p_ccb;
L2CAP_TRACE_API3 ("L2CA_UCDSetTxPriority() priority: 0x%02x BDA: %08x%04x", priority,
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
if ((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda)) == NULL)
@@ -545,8 +545,8 @@ static BOOLEAN l2c_ucd_connect ( BD_ADDR rem_bda )
tL2C_CCB *p_ccb;
tL2C_RCB *p_rcb;
- L2CAP_TRACE_DEBUG2 ("l2c_ucd_connect() BDA: %08x%04x",
- (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
+ L2CAP_TRACE_DEBUG2 ("l2c_ucd_connect() BDA: %08x%04x",
+ (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
(rem_bda[4]<<8)+rem_bda[5]);
/* Fail if we have not established communications with the controller */
@@ -674,8 +674,8 @@ BOOLEAN l2c_ucd_check_pending_info_req(tL2C_CCB *p_ccb)
l2cu_release_ccb (p_ccb);
}
- p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
- L2CAP_UCD_INFO_TYPE_RECEPTION,
+ p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
+ L2CAP_UCD_INFO_TYPE_RECEPTION,
p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_UCD_RECEPTION);
}
else
@@ -694,8 +694,8 @@ BOOLEAN l2c_ucd_check_pending_info_req(tL2C_CCB *p_ccb)
/* if this information is available */
if ( p_ccb->p_lcb->info_rx_bits & (1 << L2CAP_CONNLESS_MTU_INFO_TYPE))
{
- p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
- L2CAP_UCD_INFO_TYPE_MTU,
+ p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Discover_Cb (p_ccb->p_lcb->remote_bd_addr,
+ L2CAP_UCD_INFO_TYPE_MTU,
p_ccb->p_lcb->ucd_mtu);
}
else
@@ -750,7 +750,7 @@ BOOLEAN l2c_ucd_check_pending_out_sec_q(tL2C_CCB *p_ccb)
STREAM_TO_UINT16(psm, p)
p_ccb->chnl_state = CST_ORIG_W4_SEC_COMP;
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
p_ccb->p_lcb->handle, CONNLESS_ORIG, &l2c_link_sec_comp, p_ccb);
return (TRUE);
@@ -827,7 +827,7 @@ BOOLEAN l2c_ucd_check_pending_in_sec_q(tL2C_CCB *p_ccb)
STREAM_TO_UINT16(psm, p)
p_ccb->chnl_state = CST_TERM_W4_SEC_COMP;
- btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
+ btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, psm,
p_ccb->p_lcb->handle, CONNLESS_TERM, &l2c_link_sec_comp, p_ccb);
return (TRUE);
@@ -989,7 +989,7 @@ BOOLEAN l2c_ucd_process_event(tL2C_CCB *p_ccb, UINT16 event, void *p_data)
break;
}
break;
-
+
case CST_ORIG_W4_SEC_COMP:
switch (event)
{
@@ -1045,7 +1045,7 @@ BOOLEAN l2c_ucd_process_event(tL2C_CCB *p_ccb, UINT16 event, void *p_data)
}
break;
-
+
case CST_TERM_W4_SEC_COMP:
switch (event)
{
diff --git a/stack/l2cap/l2c_utils.c b/stack/l2cap/l2c_utils.c
index 698e336..80d092e 100644
--- a/stack/l2cap/l2c_utils.c
+++ b/stack/l2cap/l2c_utils.c
@@ -85,8 +85,8 @@ void l2cu_update_lcb_4_bonding (BD_ADDR p_bd_addr, BOOLEAN is_bonding)
if (p_lcb)
{
- L2CAP_TRACE_DEBUG3 ("l2cu_update_lcb_4_bonding BDA: %08x%04x is_bonding: %d",
- (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
+ L2CAP_TRACE_DEBUG3 ("l2cu_update_lcb_4_bonding BDA: %08x%04x is_bonding: %d",
+ (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
(p_bd_addr[4]<<8)+p_bd_addr[5], is_bonding);
p_lcb->is_bonding = is_bonding;
}
@@ -340,7 +340,7 @@ void l2cu_send_peer_cmd_reject (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id,
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, reason);
@@ -376,14 +376,14 @@ void l2cu_send_peer_connect_req (tL2C_CCB *p_ccb)
p_ccb->local_id = p_ccb->p_lcb->id;
- if ((p_buf = l2cu_build_header (p_ccb->p_lcb, L2CAP_CONN_REQ_LEN, L2CAP_CMD_CONN_REQ,
+ if ((p_buf = l2cu_build_header (p_ccb->p_lcb, L2CAP_CONN_REQ_LEN, L2CAP_CMD_CONN_REQ,
p_ccb->local_id)) == NULL)
{
L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for conn_req");
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, p_ccb->p_rcb->real_psm);
@@ -423,7 +423,7 @@ void l2cu_send_peer_connect_rsp (tL2C_CCB *p_ccb, UINT16 result, UINT16 status)
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, p_ccb->local_cid);
@@ -509,7 +509,7 @@ void l2cu_send_peer_config_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, p_ccb->remote_cid);
@@ -739,7 +739,7 @@ void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len,
p_data += cfg_len + L2CAP_CFG_OPTION_OVERHEAD;
break;
- /* unknown options; copy into rsp if not hints */
+ /* unknown options; copy into rsp if not hints */
default:
/* sanity check option length */
if ((cfg_len + L2CAP_CFG_OPTION_OVERHEAD) <= data_len)
@@ -800,7 +800,7 @@ void l2cu_send_peer_disc_req (tL2C_CCB *p_ccb)
UINT16_TO_STREAM (p, p_ccb->remote_cid);
UINT16_TO_STREAM (p, p_ccb->local_cid);
- /* Move all queued data packets to the LCB. In FCR mode, assume the higher
+ /* Move all queued data packets to the LCB. In FCR mode, assume the higher
layer checks that all buffers are sent before disconnecting.
*/
if (p_ccb->peer_cfg.fcr.mode == L2CAP_FCR_BASIC_MODE)
@@ -831,7 +831,7 @@ void l2cu_send_peer_disc_req (tL2C_CCB *p_ccb)
** Returns void
**
*******************************************************************************/
-void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid,
+void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid,
UINT16 remote_cid)
{
BT_HDR *p_buf;
@@ -905,9 +905,9 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
UINT16 maxlen;
/* Don't return data if it does not fit in ACL and L2CAP MTU */
- maxlen = (GKI_get_pool_bufsize(L2CAP_CMD_POOL_ID) > btu_cb.hcit_acl_pkt_size) ?
+ maxlen = (GKI_get_pool_bufsize(L2CAP_CMD_POOL_ID) > btu_cb.hcit_acl_pkt_size) ?
btu_cb.hcit_acl_data_size : (UINT16)GKI_get_pool_bufsize(L2CAP_CMD_POOL_ID);
- maxlen -= (UINT16)(BT_HDR_SIZE + HCI_DATA_PREAMBLE_SIZE + L2CAP_PKT_OVERHEAD +
+ maxlen -= (UINT16)(BT_HDR_SIZE + HCI_DATA_PREAMBLE_SIZE + L2CAP_PKT_OVERHEAD +
L2CAP_CMD_OVERHEAD + L2CAP_ECHO_RSP_LEN);
if (data_len > maxlen)
@@ -919,7 +919,7 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
if (data_len)
@@ -935,7 +935,7 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
** Function l2cu_send_peer_info_req
**
** Description Build and send an L2CAP "info request" message
-** to the peer.
+** to the peer.
** Returns void
**
*******************************************************************************/
@@ -956,7 +956,7 @@ void l2cu_send_peer_info_req (tL2C_LCB *p_lcb, UINT16 info_type)
L2CAP_TRACE_EVENT1 ("l2cu_send_peer_info_req: type 0x%04x", info_type);
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, info_type);
@@ -988,7 +988,7 @@ void l2cu_send_peer_info_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 info_type
if ((info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
&& (l2cb.test_info_resp & (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE |
L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_EXT_FLOW_SPEC |
- L2CAP_EXTFEA_FIXED_CHNLS | L2CAP_EXTFEA_EXT_WINDOW |
+ L2CAP_EXTFEA_FIXED_CHNLS | L2CAP_EXTFEA_EXT_WINDOW |
L2CAP_EXTFEA_UCD_RECEPTION )) )
#else
if ((info_type == L2CAP_EXTENDED_FEATURES_INFO_TYPE)
@@ -1034,7 +1034,7 @@ void l2cu_send_peer_info_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 info_type
if (p_lcb->is_ble_link)
{
/* optional data are not added for now */
- UINT32_TO_STREAM (p, L2CAP_BLE_EXTFEA_MASK);
+ UINT32_TO_STREAM (p, L2CAP_BLE_EXTFEA_MASK);
}
else
#endif
@@ -1110,7 +1110,7 @@ void l2cu_enqueue_ccb (tL2C_CCB *p_ccb)
return;
}
- L2CAP_TRACE_DEBUG2 ("l2cu_enqueue_ccb CID: 0x%04x priority: %d",
+ L2CAP_TRACE_DEBUG2 ("l2cu_enqueue_ccb CID: 0x%04x priority: %d",
p_ccb->local_cid, p_ccb->ccb_priority);
/* If the queue is empty, we go at the front */
@@ -1264,7 +1264,7 @@ void l2cu_dequeue_ccb (tL2C_CCB *p_ccb)
**
** Function l2cu_change_pri_ccb
**
-** Description
+** Description
**
** Returns -
**
@@ -1408,7 +1408,7 @@ tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid)
// btla-specific ++
/* CSP408639 Fix: When L2CAP send amp move channel request or receive
- * L2CEVT_AMP_MOVE_REQ do following sequence. Send channel move
+ * L2CEVT_AMP_MOVE_REQ do following sequence. Send channel move
* request -> Stop retrans/monitor timer -> Change channel state to CST_AMP_MOVING. */
if (p_ccb->fcrb.mon_retrans_timer.in_use)
btu_stop_quick_timer (&p_ccb->fcrb.mon_retrans_timer);
@@ -1544,8 +1544,8 @@ void l2cu_release_ccb (tL2C_CCB *p_ccb)
l2c_fcr_cleanup (p_ccb);
/* Channel may not be assigned to any LCB if it was just pre-reserved */
- if ( (p_lcb) &&
- ( (p_ccb->local_cid >= L2CAP_BASE_APPL_CID)
+ if ( (p_lcb) &&
+ ( (p_ccb->local_cid >= L2CAP_BASE_APPL_CID)
#if (L2CAP_UCD_INCLUDED == TRUE)
||(p_ccb->local_cid == L2CAP_CONNECTIONLESS_CID)
#endif
@@ -1597,7 +1597,7 @@ void l2cu_release_ccb (tL2C_CCB *p_ccb)
** Function l2cu_find_ccb_by_remote_cid
**
** Description Look through all active CCBs on a link for a match based
-** on the remote CID.
+** on the remote CID.
**
** Returns pointer to matched CCB, or NULL if no match
**
@@ -1760,7 +1760,7 @@ UINT8 l2cu_process_peer_cfg_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
if (!p_cfg->fcr_present)
p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE;
- /* Save the MTU that our peer can receive */
+ /* Save the MTU that our peer can receive */
if (p_cfg->mtu_present)
{
/* Make sure MTU is at least the minimum */
@@ -1902,7 +1902,7 @@ void l2cu_process_peer_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
else
p_ccb->fcrb.max_held_acks = p_ccb->our_cfg.fcr.tx_win_sz / 3;
- L2CAP_TRACE_DEBUG3 ("l2cu_process_peer_cfg_rsp(): peer tx_win_sz: %d, our tx_win_sz: %d, max_held_acks: %d",
+ L2CAP_TRACE_DEBUG3 ("l2cu_process_peer_cfg_rsp(): peer tx_win_sz: %d, our tx_win_sz: %d, max_held_acks: %d",
p_cfg->fcr.tx_win_sz, p_ccb->our_cfg.fcr.tx_win_sz, p_ccb->fcrb.max_held_acks);
}
}
@@ -2027,7 +2027,7 @@ void l2cu_process_our_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
**
** Function l2cu_device_reset
**
-** Description This function is called when reset of the device is
+** Description This function is called when reset of the device is
** completed. For all active connection simulate HCI_DISC
**
** Returns void
@@ -2055,7 +2055,7 @@ extern UINT16 tcs_wug_get_clk_offset( BD_ADDR addr ) ;
**
** Function l2cu_create_conn
**
-** Description This function initiates an acl connection via HCI
+** Description This function initiates an acl connection via HCI
**
** Returns TRUE if successful, FALSE if gki get buffer fails.
**
@@ -2107,7 +2107,7 @@ BOOLEAN l2cu_create_conn (tL2C_LCB *p_lcb)
if (is_sco_active == TRUE)
continue; /* No Master Slave switch not allowed when SCO Active */
#endif
-
+
if (HCI_SWITCH_SUPPORTED(btm_cb.devcb.local_features))
{
/* mark this lcb waiting for switch to be completed and
@@ -2135,7 +2135,7 @@ BOOLEAN l2cu_create_conn (tL2C_LCB *p_lcb)
**
** Description Gets the number of high priority channels.
**
-** Returns
+** Returns
**
*******************************************************************************/
UINT8 l2cu_get_num_hi_priority (void)
@@ -2159,7 +2159,7 @@ UINT8 l2cu_get_num_hi_priority (void)
**
** Function l2cu_create_conn_after_switch
**
-** Description This function initiates an acl connection via HCI
+** Description This function initiates an acl connection via HCI
** If switch required to create connection it is already done.
**
** Returns TRUE if successful, FALSE if gki get buffer fails.
@@ -2280,7 +2280,7 @@ tL2C_LCB *l2cu_find_lcb_by_state (tL2C_LINK_STATE state)
** Function l2cu_lcb_disconnecting
**
** Description On each active lcb, check if the lcb is in disconnecting
-** state, or if there are no ccb's on the lcb (implying
+** state, or if there are no ccb's on the lcb (implying
idle timeout is running), or if last ccb on the link
is in disconnecting state.
**
@@ -2437,9 +2437,9 @@ BOOLEAN l2cu_check_feature_req (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16
UINT8 pe_type, pe_len;
if ((data_len <= 4)
- || (p_data[0] != 'R')
+ || (p_data[0] != 'R')
|| (p_data[1] != 'Q')
- || (p_data[data_len - 2] != 'r')
+ || (p_data[data_len - 2] != 'r')
|| (p_data[data_len - 1] != 'q')
|| (id != L2CAP_FEATURE_REQ_ID))
return (FALSE);
@@ -2494,9 +2494,9 @@ void l2cu_check_feature_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 da
UINT8 *p_end = p_data + data_len - 2;
if ((data_len <= 4)
- || (p_data[0] != 'R')
+ || (p_data[0] != 'R')
|| (p_data[1] != 'S')
- || (p_data[data_len - 2] != 'r')
+ || (p_data[data_len - 2] != 'r')
|| (p_data[data_len - 1] != 's')
|| (id != L2CAP_FEATURE_RSP_ID))
{
@@ -2608,7 +2608,7 @@ void l2cu_resubmit_pending_sec_req (BD_ADDR p_bda)
**
** Function l2cu_set_info_rsp_mask
**
-** Description This function allows the script wrapper to change the
+** Description This function allows the script wrapper to change the
** info resp mask for conformance testing.
**
** Returns pointer to CCB, or NULL if none
@@ -2649,8 +2649,8 @@ void l2cu_adjust_out_mps (tL2C_CCB *p_ccb)
/* We try to negotiate MTU that each packet can be split into whole
number of max packets. For example if link is 1.2 max packet size is 339 bytes.
At first calculate how many whole packets it is. MAX L2CAP is 1691 + 4 overhead.
- 1695, that will be 5 Dh5 packets. Now maximum L2CAP packet is
- 5 * 339 = 1695. Minus 4 bytes L2CAP header 1691.
+ 1695, that will be 5 Dh5 packets. Now maximum L2CAP packet is
+ 5 * 339 = 1695. Minus 4 bytes L2CAP header 1691.
For EDR 2.0 packet size is 1027. So we better send RFCOMM packet as 1 3DH5 packet
1 * 1027 = 1027. Minus 4 bytes L2CAP header 1023. */
@@ -2763,7 +2763,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
{
p_lcb->link_state = LST_DISCONNECTING;
timeout = L2CAP_LINK_DISCONNECT_TOUT;
- }
+ }
else if (rc == BTM_SUCCESS)
{
/* BTM SEC will make sure that link is release (probably after pairing is done) */
@@ -2775,7 +2775,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
{
p_lcb->link_state = LST_DISCONNECTING;
timeout = L2CAP_LINK_DISCONNECT_TOUT;
- }
+ }
else
{
/* probably no buffer to send disconnect */
@@ -2807,7 +2807,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
void l2cu_process_fixed_chnl_resp (tL2C_LCB *p_lcb)
{
int xx;
-#if BLE_INCLUDED == TRUE
+#if BLE_INCLUDED == TRUE
UINT16 reason = (p_lcb->is_ble_link ) ? 1 : 0;
#else
UINT16 reason =0;
@@ -2862,7 +2862,7 @@ void l2cu_send_peer_ble_par_req (tL2C_LCB *p_lcb, UINT16 min_int, UINT16 max_int
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, min_int);
@@ -2894,7 +2894,7 @@ void l2cu_send_peer_ble_par_rsp (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id)
return;
}
- p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
+ p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE +
L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
UINT16_TO_STREAM (p, reason);
@@ -3031,7 +3031,7 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
return NULL;
}
- L2CAP_TRACE_DEBUG3("RR scan pri=%d, lcid=0x%04x, q_cout=%d",
+ L2CAP_TRACE_DEBUG3("RR scan pri=%d, lcid=0x%04x, q_cout=%d",
p_ccb->ccb_priority, p_ccb->local_cid, p_ccb->xmit_hold_q.count );
/* store the next serving channel */
@@ -3095,9 +3095,9 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
if (p_serve_ccb)
{
- L2CAP_TRACE_DEBUG3("RR service pri=%d, quota=%d, lcid=0x%04x",
- p_serve_ccb->ccb_priority,
- p_lcb->rr_serv[p_serve_ccb->ccb_priority].quota,
+ L2CAP_TRACE_DEBUG3("RR service pri=%d, quota=%d, lcid=0x%04x",
+ p_serve_ccb->ccb_priority,
+ p_lcb->rr_serv[p_serve_ccb->ccb_priority].quota,
p_serve_ccb->local_cid );
}
@@ -3110,7 +3110,7 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
**
** Function l2cu_get_next_channel
**
-** Description get the next channel to send on a link bassed on priority
+** Description get the next channel to send on a link bassed on priority
** scheduling.
**
** Returns pointer to CCB or NULL
@@ -3120,7 +3120,7 @@ static tL2C_CCB *l2cu_get_next_channel(tL2C_LCB *p_lcb)
{
tL2C_CCB *p_ccb;
- /* Get the first CCB with data to send.
+ /* Get the first CCB with data to send.
*/
for (p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; p_ccb = p_ccb->p_next_ccb)
{
@@ -3373,7 +3373,7 @@ void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
{
L2CAP_TRACE_DEBUG3 ("L2CAP - Calling CongestionStatus_Cb (TRUE),CID:0x%04x,XmitQ:%u,Quota:%u",
p_ccb->local_cid, q_count, p_ccb->buff_quota);
-
+
(*p_ccb->p_rcb->api.pL2CA_CongestionStatus_Cb)(p_ccb->local_cid, TRUE);
}
#if (L2CAP_UCD_INCLUDED == TRUE)
diff --git a/stack/mcap/mca_api.c b/stack/mcap/mca_api.c
index 1a0a58f..c4cf7a3 100644
--- a/stack/mcap/mca_api.c
+++ b/stack/mcap/mca_api.c
@@ -2,7 +2,7 @@
**
** Name: mca_api.c
**
-** Description: This is the API implementation file for the
+** Description: This is the API implementation file for the
** Multi-Channel Adaptation Protocol (MCAP).
**
** Copyright (c) 2009-2011, Broadcom Corp., All Rights Reserved.
@@ -27,7 +27,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 +101,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 +196,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 +307,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 +367,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 +397,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 +853,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 9ec4f5f..d074172 100644
--- a/stack/mcap/mca_cact.c
+++ b/stack/mcap/mca_cact.c
@@ -88,7 +88,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 +231,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 +294,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 +311,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 +387,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 +432,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 +533,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 c36c2fb..411ee6a 100644
--- a/stack/mcap/mca_csm.c
+++ b/stack/mcap/mca_csm.c
@@ -144,7 +144,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 +164,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 +181,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 +199,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 +234,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 +273,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 +311,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 +326,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 0a5f780..5ace8fa 100644
--- a/stack/mcap/mca_dact.c
+++ b/stack/mcap/mca_dact.c
@@ -37,8 +37,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 +136,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_l2c.c b/stack/mcap/mca_l2c.c
index 046e6ae..a776568 100644
--- a/stack/mcap/mca_l2c.c
+++ b/stack/mcap/mca_l2c.c
@@ -58,8 +58,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 +83,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 +94,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 +103,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 +190,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 +211,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 +253,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 +278,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 +325,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 +348,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 +390,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 +443,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 +476,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 +501,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 +522,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/pan/pan_api.c b/stack/pan/pan_api.c
index 2f86305..3cc6dec 100644
--- a/stack/pan/pan_api.c
+++ b/stack/pan/pan_api.c
@@ -32,7 +32,7 @@
** should set the PAN role explicitly.
**
** Parameters: p_register - contains all callback function pointers
-**
+**
**
** Returns none
**
@@ -70,7 +70,7 @@ void PAN_Register (tPAN_REGISTER *p_register)
** and close all active connections
**
** Parameters: none
-**
+**
**
** Returns none
**
@@ -112,7 +112,7 @@ void PAN_Deregister (void)
** p_gn_name - Service name for GN role
** p_nap_name - Service name for NAP role
** Can be NULL if user wants it to be default
-**
+**
** Returns PAN_SUCCESS - if the role is set successfully
** PAN_FAILURE - if the role is not valid
**
@@ -261,7 +261,7 @@ tPAN_RESULT PAN_SetRole (UINT8 role,
**
** Function PAN_Connect
**
-** Description This function is called by the application to initiate a
+** Description This function is called by the application to initiate a
** connection to the remote device
**
** Parameters: rem_bda - BD Addr of the remote device
@@ -271,7 +271,7 @@ tPAN_RESULT PAN_SetRole (UINT8 role,
** PAN_ROLE_GN_SERVER is for GN role
** PAN_ROLE_NAP_SERVER is for NAP role
** *handle - Pointer for returning Handle to the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is initiated successfully
** PAN_NO_RESOURCES - resources are not sufficent
** PAN_FAILURE - if the connection cannot be initiated
@@ -429,10 +429,10 @@ tPAN_RESULT PAN_Connect (BD_ADDR rem_bda, UINT8 src_role, UINT8 dst_role, UINT16
**
** Function PAN_Disconnect
**
-** Description This is used to disconnect the connection
+** Description This is used to disconnect the connection
**
** Parameters: handle - handle for the connection
-**
+**
** Returns PAN_SUCCESS - if the connection is closed successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in disconnecting
@@ -489,7 +489,7 @@ tPAN_RESULT PAN_Disconnect (UINT16 handle)
** p_data - pointer to the data
** len - length of the data
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -598,7 +598,7 @@ tPAN_RESULT PAN_Write (UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protocol,
** protocol - protocol of the ethernet packet like IP or ARP
** p_buf - pointer to the data buffer
** ext - to indicate that extension headers present
-**
+**
** Returns PAN_SUCCESS - if the data is sent successfully
** PAN_FAILURE - if the connection is not found or
** there is an error in sending data
@@ -707,7 +707,7 @@ tPAN_RESULT PAN_WriteBuf (UINT16 handle, BD_ADDR dst, BD_ADDR src, UINT16 protoc
** num_filters - number of protocol filter ranges
** start - array of starting protocol numbers
** end - array of ending protocol numbers
-**
+**
**
** Returns PAN_SUCCESS if protocol filters are set successfully
** PAN_FAILURE if connection not found or error in setting
@@ -756,7 +756,7 @@ tPAN_RESULT PAN_SetProtocolFilters (UINT16 handle,
** num_filters - number of multicast filter ranges
** start - array of starting multicast filter addresses
** end - array of ending multicast filter addresses
-**
+**
**
** Returns PAN_SUCCESS if multicast filters are set successfully
** PAN_FAILURE if connection not found or error in setting
@@ -822,7 +822,7 @@ UINT8 PAN_SetTraceLevel (UINT8 new_level)
** Description This function initializes the PAN module variables
**
** Parameters: none
-**
+**
** Returns none
**
*******************************************************************************/
diff --git a/stack/pan/pan_main.c b/stack/pan/pan_main.c
index 9b03775..36d7a8c 100644
--- a/stack/pan/pan_main.c
+++ b/stack/pan/pan_main.c
@@ -37,7 +37,7 @@ UINT8 constant_pan_uuid[UUID_CONSTANT_PART] = {0, 0, 0x10, 0, 0x80, 0x00, 0x00,
** Description This function registers PAN profile with BNEP
**
** Parameters: none
-**
+**
** Returns none
**
*******************************************************************************/
@@ -73,7 +73,7 @@ void pan_register_with_bnep (void)
** remote_uuid - UUID of the source role (peer device role)
** local_uuid - UUID of the destination role (local device role)
** is_role_change - Flag to indicate that it is a role change
-**
+**
** Returns none
**
*******************************************************************************/
diff --git a/stack/pan/pan_utils.c b/stack/pan/pan_utils.c
index c1fb390..33cd151 100644
--- a/stack/pan/pan_utils.c
+++ b/stack/pan/pan_utils.c
@@ -40,9 +40,9 @@ static const UINT8 pan_proto_elem_data[] = {
**
** Function pan_register_with_sdp
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p_desc)
@@ -73,7 +73,7 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
#if 0
availability = 0xFF;
SDP_AddAttribute (sdp_handle, ATTR_ID_SERVICE_AVAILABILITY, UINT_DESC_TYPE, 1, &availability);
-#endif
+#endif
// btla-specific --
/* Language base */
@@ -91,7 +91,7 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
(UINT8) (strlen(p_desc) + 1), (UINT8 *)p_desc);
/* Security description */
- if (sec_mask)
+ if (sec_mask)
{
UINT16_TO_BE_FIELD(&security, 0x0001);
}
@@ -115,9 +115,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
SDP_AddAttribute (sdp_handle, ATTR_ID_MAX_NET_ACCESS_RATE, UINT_DESC_TYPE, 4, array);
/* Register with Security Manager for the specific security level */
- if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
+ if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_NAP))
- || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
+ || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_NAP,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_NAP)))
{
PAN_TRACE_ERROR0 ("PAN Security Registration failed for PANU");
@@ -127,9 +127,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
#if (defined (PAN_SUPPORTS_ROLE_GN) && PAN_SUPPORTS_ROLE_GN == TRUE)
if (uuid == UUID_SERVCLASS_GN)
{
- if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_GN,
+ if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_GN,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_GN))
- || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_GN,
+ || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_GN,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_GN)))
{
PAN_TRACE_ERROR0 ("PAN Security Registration failed for GN");
@@ -139,9 +139,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
#if (defined (PAN_SUPPORTS_ROLE_PANU) && PAN_SUPPORTS_ROLE_PANU == TRUE)
if (uuid == UUID_SERVCLASS_PANU)
{
- if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
+ if ((!BTM_SetSecurityLevel (TRUE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_PANU))
- || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
+ || (!BTM_SetSecurityLevel (FALSE, p_name, BTM_SEC_SERVICE_BNEP_PANU,
sec_mask, BT_PSM_BNEP, BTM_SEC_PROTO_BNEP, UUID_SERVCLASS_PANU)))
{
PAN_TRACE_ERROR0 ("PAN Security Registration failed for PANU");
@@ -162,9 +162,9 @@ UINT32 pan_register_with_sdp (UINT16 uuid, UINT8 sec_mask, char *p_name, char *p
**
** Function pan_allocate_pcb
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
tPAN_CONN *pan_allocate_pcb (BD_ADDR p_bda, UINT16 handle)
@@ -203,9 +203,9 @@ tPAN_CONN *pan_allocate_pcb (BD_ADDR p_bda, UINT16 handle)
**
** Function pan_get_pcb_by_handle
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
tPAN_CONN *pan_get_pcb_by_handle (UINT16 handle)
@@ -227,9 +227,9 @@ tPAN_CONN *pan_get_pcb_by_handle (UINT16 handle)
**
** Function pan_get_pcb_by_addr
**
-** Description
+** Description
**
-** Returns
+** Returns
**
*******************************************************************************/
tPAN_CONN *pan_get_pcb_by_addr (BD_ADDR p_bda)
@@ -261,7 +261,7 @@ tPAN_CONN *pan_get_pcb_by_addr (BD_ADDR p_bda)
**
** Function pan_close_all_connections
**
-** Description
+** Description
**
** Returns void
**
diff --git a/stack/rfcomm/port_rfc.c b/stack/rfcomm/port_rfc.c
index d5ad359..ef84fef 100644
--- a/stack/rfcomm/port_rfc.c
+++ b/stack/rfcomm/port_rfc.c
@@ -20,7 +20,7 @@
#include "port_int.h"
#include "rfc_int.h"
-/*
+/*
** Local function definitions
*/
UINT32 port_rfc_send_tx_data (tPORT *p_port);
@@ -85,7 +85,7 @@ int port_open_continue (tPORT *p_port)
**
** Function port_start_control
**
-** Description This function is called in the BTU_TASK context to
+** Description This function is called in the BTU_TASK context to
** send control information
**
** Returns void
@@ -106,7 +106,7 @@ void port_start_control (tPORT *p_port)
**
** Function port_start_par_neg
**
-** Description This function is called in the BTU_TASK context to
+** Description This function is called in the BTU_TASK context to
** send configuration information
**
** Returns void
@@ -127,7 +127,7 @@ void port_start_par_neg (tPORT *p_port)
**
** Function port_start_close
**
-** Description This function is called in the BTU_TASK context to
+** Description This function is called in the BTU_TASK context to
** release DLC
**
** Returns void
@@ -240,7 +240,7 @@ void PORT_StartCnf (tRFC_MCB *p_mcb, UINT16 result)
** Function PORT_StartInd
**
** Description This function is called from the RFCOMM layer when
-** some peer device wants to establish a multiplexer
+** some peer device wants to establish a multiplexer
** connection. Check if there are any ports open with this
** or not assigned multiplexer.
**
@@ -292,9 +292,9 @@ void PORT_ParNegInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
{
/* If the port cannot be opened, send a DM. Per Errata 1205 */
rfc_send_dm(p_mcb, dlci, FALSE);
- /* check if this is the last port open, some headsets have
+ /* check if this is the last port open, some headsets have
problem, they don't disconnect if we send DM */
- rfc_check_mcb_active( p_mcb );
+ rfc_check_mcb_active( p_mcb );
RFCOMM_TRACE_EVENT0( "PORT_ParNegInd: port not found" );
return;
}
@@ -315,7 +315,7 @@ void PORT_ParNegInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
/* use that. Otherwise both must want credit based, so use that. If flow is */
/* already defined for this mux, we respond with that value. */
if (p_mcb->flow == PORT_FC_UNDEFINED)
- {
+ {
if ((PORT_FC_DEFAULT == PORT_FC_TS710) || (cl == RFCOMM_PN_CONV_LAYER_TYPE_1))
{
p_mcb->flow = PORT_FC_TS710;
@@ -376,11 +376,11 @@ void PORT_ParNegCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
if (!p_port)
return;
- /* Flow control mechanism not set yet. Negotiate flow control mechanism. */
+ /* Flow control mechanism not set yet. Negotiate flow control mechanism. */
if (p_mcb->flow == PORT_FC_UNDEFINED)
{
/* Our stack is configured for TS07.10 and they responded with credit-based. */
- /* This is illegal-- negotiation fails. */
+ /* This is illegal-- negotiation fails. */
if ((PORT_FC_DEFAULT == PORT_FC_TS710) && (cl == RFCOMM_PN_CONV_LAYER_CBFC_R))
{
rfc_send_disc (p_mcb, p_port->dlci);
@@ -420,10 +420,10 @@ void PORT_ParNegCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
** Function PORT_DlcEstablishInd
**
** Description This function is called from the RFCOMM layer when peer
-** device wants to establish a new DLC. If this is not the
-** first message in the establishment procedure port_handle
+** device wants to establish a new DLC. If this is not the
+** first message in the establishment procedure port_handle
** has a handle to the port control block otherwise the control
-** block should be found based on the muliplexer channel and
+** block should be found based on the muliplexer channel and
** dlci. The block should be allocated allocated before
** meaning that application already made open.
**
@@ -473,7 +473,7 @@ void PORT_DlcEstablishInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
**
** Description This function is called from the RFCOMM layer when peer
** acknowledges establish procedure (SABME/UA). Send reply
-** to the user and set state to OPENED if result was
+** to the user and set state to OPENED if result was
** successfull.
**
*******************************************************************************/
@@ -509,7 +509,7 @@ void PORT_DlcEstablishCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 resul
p_port->state = PORT_STATE_OPENED;
/* RPN is required only if we want to tell DTE how the port should be opened */
- if ((p_port->uuid == UUID_SERVCLASS_DIALUP_NETWORKING)
+ if ((p_port->uuid == UUID_SERVCLASS_DIALUP_NETWORKING)
|| (p_port->uuid == UUID_SERVCLASS_FAX))
RFCOMM_PortNegReq (p_port->rfc.p_mcb, p_port->dlci, NULL);
else
@@ -523,8 +523,8 @@ void PORT_DlcEstablishCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 resul
**
** Description This function is called from the RFCOMM layer when peer
** device wants to set parameters of the port. As per the spec
-** this message has to be sent before the first data packet
-** and can be sent before establish. The block should be
+** this message has to be sent before the first data packet
+** and can be sent before establish. The block should be
** allocated before meaning that application already made open.
**
*******************************************************************************/
@@ -763,7 +763,7 @@ void PORT_CloseInd (tRFC_MCB *p_mcb)
p_port = &rfc_cb.port.port[0];
for (i = 0; i < MAX_RFC_PORTS; i++, p_port++)
{
- if (p_port->rfc.p_mcb == p_mcb)
+ if (p_port->rfc.p_mcb == p_mcb)
{
port_rfc_closed (p_port, PORT_PEER_CONNECTION_FAILED);
}
@@ -775,7 +775,7 @@ void PORT_CloseInd (tRFC_MCB *p_mcb)
**
** Function Port_TimeOutCloseMux
**
-** Description This function is called when RFCOMM timesout on a command
+** Description This function is called when RFCOMM timesout on a command
** as a result multiplexer connection is closed.
**
*******************************************************************************/
@@ -789,7 +789,7 @@ void Port_TimeOutCloseMux (tRFC_MCB *p_mcb)
p_port = &rfc_cb.port.port[0];
for (i = 0; i < MAX_RFC_PORTS; i++, p_port++)
{
- if (p_port->rfc.p_mcb == p_mcb)
+ if (p_port->rfc.p_mcb == p_mcb)
{
port_rfc_closed (p_port, PORT_PEER_TIMEOUT);
}
@@ -802,7 +802,7 @@ void Port_TimeOutCloseMux (tRFC_MCB *p_mcb)
** Function PORT_DataInd
**
** Description This function is called from the RFCOMM layer when data
-** buffer is received from the peer.
+** buffer is received from the peer.
**
*******************************************************************************/
void PORT_DataInd (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf)
@@ -901,7 +901,7 @@ void PORT_DataInd (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf)
**
** Function PORT_FlowInd
**
-** Description This function is called from the RFCOMM layer on the flow
+** Description This function is called from the RFCOMM layer on the flow
** control signal change. Propagate change to the user.
**
*******************************************************************************/
@@ -931,13 +931,13 @@ void PORT_FlowInd (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN enable_data)
if (dlci == 0)
{
p_port = &rfc_cb.port.port[i];
- if (!p_port->in_use
+ if (!p_port->in_use
|| (p_port->rfc.p_mcb != p_mcb)
|| (p_port->rfc.state != RFC_STATE_OPENED))
continue;
}
events = 0;
-
+
/* Check if flow of data is still enabled */
events |= port_flow_control_user (p_port);
@@ -988,14 +988,14 @@ UINT32 port_rfc_send_tx_data (tPORT *p_port)
RFCOMM_TRACE_DEBUG1 ("Sending RFCOMM_DataReq tx.queue_size=%d", p_port->tx.queue_size);
RFCOMM_DataReq (p_port->rfc.p_mcb, p_port->dlci, p_buf);
-
+
events |= PORT_EV_TXCHAR;
if (p_port->tx.queue_size == 0)
{
events |= PORT_EV_TXEMPTY;
break;
- }
+ }
}
/* queue is empty-- all data sent */
else
@@ -1083,9 +1083,9 @@ void port_rfc_closed (tPORT *p_port, UINT8 res)
** Function port_get_credits
**
** Description Set initial values for credits.
-** Adjust max number of rx credits based on negotiated MTU.
-** Check max allowed num of bytes, max allowed num buffers,
-** should be less then 255
+** Adjust max number of rx credits based on negotiated MTU.
+** Check max allowed num of bytes, max allowed num buffers,
+** should be less then 255
**
*******************************************************************************/
void port_get_credits (tPORT *p_port, UINT8 k)
diff --git a/stack/rfcomm/port_utils.c b/stack/rfcomm/port_utils.c
index b764798..3de9ec0 100644
--- a/stack/rfcomm/port_utils.c
+++ b/stack/rfcomm/port_utils.c
@@ -27,7 +27,7 @@
#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
-static const tPORT_STATE default_port_pars =
+static const tPORT_STATE default_port_pars =
{
PORT_BAUD_RATE_9600,
PORT_8_BITS,
@@ -48,7 +48,7 @@ static const tPORT_STATE default_port_pars =
**
** Description Look through the Port Control Blocks for a free one. Note
** that one server can open several ports with the same SCN
-** if it can support simulteneous requests from different
+** if it can support simulteneous requests from different
** clients.
**
** Returns Pointer to the PORT or NULL if not found
@@ -126,7 +126,7 @@ void port_set_defaults (tPORT *p_port)
** Function port_select_mtu
**
** Description Select MTU which will best serve connection from our
-** point of view.
+** point of view.
** If our device is 1.2 or lower we calculate how many DH5s
** fit into 1 RFCOMM buffer.
**
@@ -152,7 +152,7 @@ void port_select_mtu (tPORT *p_port)
/* We try to negotiate MTU that each packet can be split into whole
number of max packets. For example if link is 1.2 max packet size is 339 bytes.
At first calculate how many whole packets it is. MAX L2CAP is 1691 + 4 overhead.
- 1695, that will be 5 Dh5 packets. Now maximum RFCOMM packet is
+ 1695, that will be 5 Dh5 packets. Now maximum RFCOMM packet is
5 * 339 = 1695. Minus 4 bytes L2CAP header 1691. Minus RFCOMM 6 bytes header overhead 1685
For EDR 2.0 packet size is 1027. So we better send RFCOMM packet as 1 3DH5 packet
@@ -182,7 +182,7 @@ void port_select_mtu (tPORT *p_port)
p_port->rx_buf_critical = (PORT_RX_CRITICAL_WM / p_port->mtu);
if( p_port->rx_buf_critical > PORT_RX_BUF_CRITICAL_WM )
p_port->rx_buf_critical = PORT_RX_BUF_CRITICAL_WM;
- RFCOMM_TRACE_DEBUG3 ("port_select_mtu credit_rx_max %d, credit_rx_low %d, rx_buf_critical %d",
+ RFCOMM_TRACE_DEBUG3 ("port_select_mtu credit_rx_max %d, credit_rx_low %d, rx_buf_critical %d",
p_port->credit_rx_max, p_port->credit_rx_low, p_port->rx_buf_critical);
}
@@ -191,7 +191,7 @@ void port_select_mtu (tPORT *p_port)
**
** Function port_release_port
**
-** Description Release port infor control block.
+** Description Release port infor control block.
**
** Returns Pointer to the PORT or NULL if not found
**
@@ -238,7 +238,7 @@ void port_release_port (tPORT *p_port)
mask = p_port->ev_mask;
p_port_cb = p_port->p_callback;
user_port_pars = p_port->user_port_pars;
-
+
port_set_defaults(p_port);
/* restore */
p_port->ev_mask = mask;
@@ -292,7 +292,7 @@ tRFC_MCB *port_find_mcb (BD_ADDR bd_addr)
**
** Function port_find_mcb_dlci_port
**
-** Description Find port on the multiplexer channel based on DLCI. If
+** Description Find port on the multiplexer channel based on DLCI. If
** this port with DLCI not found try to use even DLCI. This
** is for the case when client is establishing connection on
** none-initiator MCB.
@@ -303,7 +303,7 @@ tRFC_MCB *port_find_mcb (BD_ADDR bd_addr)
tPORT *port_find_mcb_dlci_port (tRFC_MCB *p_mcb, UINT8 dlci)
{
UINT8 inx;
-
+
if (!p_mcb)
return (NULL);
@@ -369,7 +369,7 @@ tPORT *port_find_port (UINT8 dlci, BD_ADDR bd_addr)
for (i = 0; i < MAX_RFC_PORTS; i++)
{
p_port = &rfc_cb.port.port[i];
- if (p_port->in_use
+ if (p_port->in_use
&& (p_port->dlci == dlci)
&& !memcmp (p_port->bd_addr, bd_addr, BD_ADDR_LEN))
{
@@ -385,7 +385,7 @@ tPORT *port_find_port (UINT8 dlci, BD_ADDR bd_addr)
** Function port_flow_control_user
**
** Description Check the current user flow control and if necessary return
-** events to be send to the user based on the user's specified
+** events to be send to the user based on the user's specified
** flow control type.
**
** Returns event mask to be returned to the application
@@ -398,7 +398,7 @@ UINT32 port_flow_control_user (tPORT *p_port)
/* Flow control to the user can be caused by flow controlling by the peer */
/* (FlowInd, or flow control by the peer RFCOMM (Fcon) or internally if */
/* tx_queue is full */
- BOOLEAN fc = p_port->tx.peer_fc
+ BOOLEAN fc = p_port->tx.peer_fc
|| !p_port->rfc.p_mcb
|| !p_port->rfc.p_mcb->peer_ready
|| (p_port->tx.queue_size > PORT_TX_HIGH_WM)
@@ -497,7 +497,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
/* If credit count is less than low credit watermark, and user */
/* did not force flow control, send a credit update */
/* There might be a special case when we just adjusted rx_max */
- if ((p_port->credit_rx <= p_port->credit_rx_low)
+ if ((p_port->credit_rx <= p_port->credit_rx_low)
&& !p_port->rx.user_fc
&& (p_port->credit_rx_max > p_port->credit_rx))
{
@@ -505,7 +505,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
(UINT8) (p_port->credit_rx_max - p_port->credit_rx));
p_port->credit_rx = p_port->credit_rx_max;
-
+
p_port->rx.peer_fc = FALSE;
}
}
@@ -525,14 +525,14 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
}
}
/* else using TS 07.10 flow control */
- else
+ else
{
/* if want to enable flow from peer */
if (enable)
{
/* If rfcomm suspended traffic from the peer based on the rx_queue_size */
/* check if it can be resumed now */
- if (p_port->rx.peer_fc
+ if (p_port->rx.peer_fc
&& (p_port->rx.queue_size < PORT_RX_LOW_WM)
&& (p_port->rx.queue.count < PORT_RX_BUF_LOW_WM))
{
@@ -554,7 +554,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
}
/* Check the size of the rx queue. If it exceeds certain */
/* level and flow control has not been sent to the peer do it now */
- else if ( ((p_port->rx.queue_size > PORT_RX_HIGH_WM)
+ else if ( ((p_port->rx.queue_size > PORT_RX_HIGH_WM)
|| (p_port->rx.queue.count > PORT_RX_BUF_HIGH_WM))
&& !p_port->rx.peer_fc)
{
@@ -562,7 +562,7 @@ void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count)
p_port->rx.peer_fc = TRUE;
RFCOMM_FlowReq (p_port->rfc.p_mcb, p_port->dlci, FALSE);
- }
+ }
}
}
}
diff --git a/stack/rfcomm/rfc_int.h b/stack/rfcomm/rfc_int.h
index 23c72ce..fcafdf0 100644
--- a/stack/rfcomm/rfc_int.h
+++ b/stack/rfcomm/rfc_int.h
@@ -14,7 +14,7 @@
#include "l2c_api.h"
#include "port_int.h"
-/*
+/*
** Define RFCOMM result codes
*/
#define RFCOMM_SUCCESS 0
@@ -26,9 +26,9 @@
#define RFCOMM_SECURITY_ERR 112
/*
-** Define max and min RFCOMM MTU (N1)
+** Define max and min RFCOMM MTU (N1)
*/
-#define RFCOMM_MIN_MTU 23
+#define RFCOMM_MIN_MTU 23
#define RFCOMM_MAX_MTU 32767
extern void RFCOMM_StartReq (tRFC_MCB *p_mcb);
@@ -59,7 +59,7 @@ extern void RFCOMM_ControlRsp (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars);
extern void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 line_status);
/*
-** Define logical struct used for sending and decoding MX frames
+** Define logical struct used for sending and decoding MX frames
*/
typedef struct
{
@@ -88,14 +88,14 @@ typedef struct
UINT8 *p_data;
UINT16 data_len;
} test;
- struct
+ struct
{
UINT8 dlci;
UINT8 signals;
UINT8 break_present;
UINT8 break_duration;
} msc;
- struct
+ struct
{
UINT8 ea;
UINT8 cr;
@@ -141,7 +141,7 @@ typedef struct
#define RFC_MX_STATE_DISC_WAIT_UA 6
/*
-** Define port states
+** Define port states
*/
#define RFC_STATE_CLOSED 0
#define RFC_STATE_SABME_WAIT_UA 1
@@ -150,8 +150,8 @@ typedef struct
#define RFC_STATE_OPENED 4
#define RFC_STATE_DISC_WAIT_UA 5
-/*
-** Events that can be received by multiplexer as well as port state machines
+/*
+** Events that can be received by multiplexer as well as port state machines
*/
#define RFC_EVENT_SABME 0
#define RFC_EVENT_UA 1
@@ -195,7 +195,7 @@ typedef struct
#define RFC_T2_TIMEOUT 20 /* timeout to wait for Mx UIH */
// btla-specific --
#define RFC_DISC_TIMEOUT 3 /* If something goes wrong and we send DISC we should not wait for min */
-#define RFC_CLOSE_TIMEOUT 10
+#define RFC_CLOSE_TIMEOUT 10
#define RFCOMM_CONN_TIMEOUT 120 /* first connection to be established on Mx */
@@ -269,7 +269,7 @@ extern "C" {
extern void rfc_mx_sm_execute (tRFC_MCB *p_mcb, UINT16 event, void *p_data);
-/*
+/*
** Functions provided by the rfc_port_fsm.c
*/
extern void rfc_port_sm_execute (tPORT *p_port, UINT16 event, void *p_data);
@@ -285,7 +285,7 @@ extern void rfc_process_fcon (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command);
extern void rfc_process_fcoff (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command);
extern void rfc_process_l2cap_congestion (tRFC_MCB *p_mcb, BOOLEAN is_congested);
-/*
+/*
** Functions provided by the rfc_utils.c
*/
tRFC_MCB *rfc_alloc_multiplexer_channel (BD_ADDR bd_addr, BOOLEAN is_initiator);
@@ -306,7 +306,7 @@ extern void rfc_inc_credit (tPORT *p_port, UINT8 credit);
extern void rfc_dec_credit (tPORT *p_port);
extern void rfc_check_send_cmd(tRFC_MCB *p_mcb, BT_HDR *p_buf);
-/*
+/*
** Functions provided by the rfc_ts_frames.c
*/
extern void rfc_send_sabme (tRFC_MCB *p_rfc_mcb, UINT8 dlci);
@@ -316,10 +316,10 @@ extern void rfc_send_disc (tRFC_MCB *p_rfc_mcb, UINT8 dlci);
extern void rfc_send_pn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, UINT16 mtu,
UINT8 cl, UINT8 k);
extern void rfc_send_test (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command, BT_HDR *p_buf);
-extern void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+extern void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_CTRL *p_pars);
extern void rfc_send_rls (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, UINT8 status);
-extern void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+extern void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_STATE *p_pars, UINT16 mask);
extern void rfc_send_fcon (tRFC_MCB *p_mcb, BOOLEAN is_command);
extern void rfc_send_fcoff (tRFC_MCB *p_mcb, BOOLEAN is_command);
@@ -328,7 +328,7 @@ extern void rfc_send_credit(tRFC_MCB *p_mcb, UINT8 dlci, UINT8 credit);
extern void rfc_process_mx_message (tRFC_MCB *p_rfc_mcb, BT_HDR *p_buf);
extern UINT8 rfc_parse_data (tRFC_MCB *p_rfc_mcb, MX_FRAME *p_frame, BT_HDR *p_buf);
-/*
+/*
** Functions provided by the rfc_disp.c
*/
diff --git a/stack/rfcomm/rfc_l2cap_if.c b/stack/rfcomm/rfc_l2cap_if.c
index ec888e0..fb10d07 100644
--- a/stack/rfcomm/rfc_l2cap_if.c
+++ b/stack/rfcomm/rfc_l2cap_if.c
@@ -20,7 +20,7 @@
#include "rfc_int.h"
-/*
+/*
** Define Callback functions to be called by L2CAP
*/
static void RFCOMM_ConnectInd (BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id);
@@ -66,7 +66,7 @@ void rfcomm_l2cap_if_init (void)
**
** Function RFCOMM_ConnectInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConnectInd received. Allocate multiplexer control block
** and dispatch the event to it.
**
@@ -120,7 +120,7 @@ void RFCOMM_ConnectInd (BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id)
**
** Function RFCOMM_ConnectCnf
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConnectCnf received. Save L2CAP handle and dispatch
** event to the FSM.
**
@@ -192,7 +192,7 @@ void RFCOMM_ConnectCnf (UINT16 lcid, UINT16 result)
**
** Function RFCOMM_ConfigInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConfigInd received. Save parameters in the control
** block and dispatch event to the FSM.
**
@@ -215,7 +215,7 @@ void RFCOMM_ConfigInd (UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
**
** Function RFCOMM_ConfigCnf
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_ConfigCnf received. Save L2CAP handle and dispatch
** event to the FSM.
**
@@ -238,7 +238,7 @@ void RFCOMM_ConfigCnf (UINT16 lcid, tL2CAP_CFG_INFO *p_cfg)
**
** Function RFCOMM_QoSViolationInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_QoSViolationIndInd received. Dispatch event to the FSM.
**
*******************************************************************************/
@@ -251,7 +251,7 @@ void RFCOMM_QoSViolationInd (BD_ADDR bd_addr)
**
** Function RFCOMM_DisconnectInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** L2CA_DisconnectInd received. Dispatch event to the FSM.
**
*******************************************************************************/
@@ -278,8 +278,8 @@ void RFCOMM_DisconnectInd (UINT16 lcid, BOOLEAN is_conf_needed)
**
** Function RFCOMM_BufDataInd
**
-** Description This is a callback function called by L2CAP when
-** data RFCOMM frame is received. Parse the frames, check
+** Description This is a callback function called by L2CAP when
+** data RFCOMM frame is received. Parse the frames, check
** the checksum and dispatch event to multiplexer or port
** state machine depending on the frame destination.
**
@@ -352,7 +352,7 @@ void RFCOMM_BufDataInd (UINT16 lcid, BT_HDR *p_buf)
rfc_port_sm_execute (p_port, event, p_buf);
else
GKI_freebuf (p_buf);
-
+
if (rfc_cb.rfc.rx_frame.credit != 0)
rfc_inc_credit (p_port, rfc_cb.rfc.rx_frame.credit);
@@ -366,7 +366,7 @@ void RFCOMM_BufDataInd (UINT16 lcid, BT_HDR *p_buf)
**
** Function RFCOMM_CongestionStatusInd
**
-** Description This is a callback function called by L2CAP when
+** Description This is a callback function called by L2CAP when
** data RFCOMM L2CAP congestion status changes
**
*******************************************************************************/
diff --git a/stack/rfcomm/rfc_mx_fsm.c b/stack/rfcomm/rfc_mx_fsm.c
index 6a9b49d..2f267a7 100644
--- a/stack/rfcomm/rfc_mx_fsm.c
+++ b/stack/rfcomm/rfc_mx_fsm.c
@@ -158,8 +158,8 @@ void rfc_mx_sm_state_idle (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_wait_conn_cnf
**
-** Description This function handles events when the multiplexer is
-** waiting for Connection Confirm from L2CAP.
+** Description This function handles events when the multiplexer is
+** waiting for Connection Confirm from L2CAP.
**
** Returns void
**
@@ -276,7 +276,7 @@ void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
p_mcb->state = RFC_MX_STATE_IDLE;
L2CA_DisconnectReq (p_mcb->lcid);
- PORT_StartCnf (p_mcb, RFCOMM_ERROR);
+ PORT_StartCnf (p_mcb, RFCOMM_ERROR);
return;
}
RFCOMM_TRACE_EVENT2 ("RFCOMM MX ignored - evt:%d in state:%d", event, p_mcb->state);
@@ -287,7 +287,7 @@ void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_sabme_wait_ua
**
-** Description This function handles events when the multiplexer sent
+** Description This function handles events when the multiplexer sent
** SABME and is waiting for UA reply.
**
** Returns void
@@ -338,7 +338,7 @@ void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
p_mcb->state = RFC_MX_STATE_IDLE;
L2CA_DisconnectReq (p_mcb->lcid);
- PORT_StartCnf (p_mcb, RFCOMM_ERROR);
+ PORT_StartCnf (p_mcb, RFCOMM_ERROR);
return;
}
RFCOMM_TRACE_EVENT2 ("RFCOMM MX ignored - evt:%d in state:%d", event, p_mcb->state);
@@ -348,7 +348,7 @@ void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_wait_sabme
**
-** Description This function handles events when the multiplexer is
+** Description This function handles events when the multiplexer is
** waiting for SABME on the acceptor side after configuration
**
** Returns void
@@ -382,7 +382,7 @@ void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
else
{
rfc_timer_stop (p_mcb);
- PORT_StartInd (p_mcb);
+ PORT_StartInd (p_mcb);
}
return;
@@ -415,7 +415,7 @@ void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_connected
**
-** Description This function handles events when the multiplexer is
+** Description This function handles events when the multiplexer is
** in the CONNECTED state
**
** Returns void
@@ -459,7 +459,7 @@ void rfc_mx_sm_state_connected (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_sm_state_disc_wait_ua
**
-** Description This function handles events when the multiplexer sent
+** Description This function handles events when the multiplexer sent
** DISC and is waiting for UA reply.
**
** Returns void
@@ -537,8 +537,8 @@ void rfc_mx_sm_state_disc_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data)
**
** Function rfc_mx_send_config_req
**
-** Description This function handles L2CA_ConnectInd message from the
-** L2CAP. Accept connection.
+** Description This function handles L2CA_ConnectInd message from the
+** L2CAP. Accept connection.
**
*******************************************************************************/
static void rfc_mx_send_config_req (tRFC_MCB *p_mcb)
@@ -568,8 +568,8 @@ static void rfc_mx_send_config_req (tRFC_MCB *p_mcb)
**
** Function rfc_mx_conf_cnf
**
-** Description This function handles L2CA_ConfigCnf message from the
-** L2CAP. If result is not success tell upper layer that
+** Description This function handles L2CA_ConfigCnf message from the
+** L2CAP. If result is not success tell upper layer that
** start has not been accepted. If initiator send SABME
** on DLCI 0. T1 is still running.
**
@@ -611,7 +611,7 @@ static void rfc_mx_conf_cnf (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg)
**
** Function rfc_mx_conf_ind
**
-** Description This function handles L2CA_ConfigInd message from the
+** Description This function handles L2CA_ConfigInd message from the
** L2CAP. Send the L2CA_ConfigRsp message.
**
*******************************************************************************/
diff --git a/stack/rfcomm/rfc_port_fsm.c b/stack/rfcomm/rfc_port_fsm.c
index d0c6b12..2d34edb 100644
--- a/stack/rfcomm/rfc_port_fsm.c
+++ b/stack/rfcomm/rfc_port_fsm.c
@@ -86,7 +86,7 @@ void rfc_port_sm_execute (tPORT *p_port, UINT16 event, void *p_data)
** Function rfc_port_sm_state_closed
**
** Description This function handles events when the port is in
-** CLOSED state. This state exists when port is
+** CLOSED state. This state exists when port is
** being initially established.
**
** Returns void
@@ -98,7 +98,7 @@ void rfc_port_sm_state_closed (tPORT *p_port, UINT16 event, void *p_data)
{
case RFC_EVENT_OPEN:
p_port->rfc.state = RFC_STATE_ORIG_WAIT_SEC_CHECK;
- btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, TRUE,
+ btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, TRUE,
BTM_SEC_PROTO_RFCOMM, (UINT32)(p_port->dlci / 2),
&rfc_sec_check_complete, p_port);
return;
@@ -119,7 +119,7 @@ void rfc_port_sm_state_closed (tPORT *p_port, UINT16 event, void *p_data)
/* Open will be continued after security checks are passed */
p_port->rfc.state = RFC_STATE_TERM_WAIT_SEC_CHECK;
- btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, FALSE,
+ btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, FALSE,
BTM_SEC_PROTO_RFCOMM, (UINT32)(p_port->dlci / 2),
&rfc_sec_check_complete, p_port);
return;
@@ -187,18 +187,18 @@ void rfc_port_sm_sabme_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
case RFC_EVENT_UA:
rfc_port_timer_stop (p_port);
p_port->rfc.state = RFC_STATE_OPENED;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_SUCCESS);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_SUCCESS);
return;
case RFC_EVENT_DM:
p_port->rfc.p_mcb->is_disc_initiator = TRUE;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
rfc_port_closed (p_port);
return;
case RFC_EVENT_DISC:
rfc_send_ua (p_port->rfc.p_mcb, p_port->dlci);
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
rfc_port_closed (p_port);
return;
@@ -213,7 +213,7 @@ void rfc_port_sm_sabme_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
case RFC_EVENT_TIMEOUT:
p_port->rfc.state = RFC_STATE_CLOSED;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_ERROR);
return;
}
RFCOMM_TRACE_WARNING1 ("Port state sabme_wait_ua Event ignored %d", event);
@@ -224,7 +224,7 @@ void rfc_port_sm_sabme_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
**
** Function rfc_port_sm_term_wait_sec_check
**
-** Description This function handles events for the port in the
+** Description This function handles events for the port in the
** WAIT_SEC_CHECK state. SABME has been received from the
** peer and Security Manager verifes BD_ADDR, before we can
** send ESTABLISH_IND to the Port entity
@@ -250,7 +250,7 @@ void rfc_port_sm_term_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
}
else
{
- PORT_DlcEstablishInd (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu);
+ PORT_DlcEstablishInd (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu);
}
return;
@@ -278,7 +278,7 @@ void rfc_port_sm_term_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
p_port->rfc.state = RFC_STATE_CLOSED;
rfc_send_ua (p_port->rfc.p_mcb, p_port->dlci);
- PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
+ PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
return;
case RFC_EVENT_UIH:
@@ -306,7 +306,7 @@ void rfc_port_sm_term_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
**
** Function rfc_port_sm_orig_wait_sec_check
**
-** Description This function handles events for the port in the
+** Description This function handles events for the port in the
** ORIG_WAIT_SEC_CHECK state. RFCOMM is waiting for Security
** manager to finish before sending SABME to the peer
**
@@ -321,7 +321,7 @@ void rfc_port_sm_orig_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data)
if (*((UINT8 *)p_data) != BTM_SUCCESS)
{
p_port->rfc.p_mcb->is_disc_initiator = TRUE;
- PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, 0, RFCOMM_SECURITY_ERR);
+ PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, 0, RFCOMM_SECURITY_ERR);
rfc_port_closed (p_port);
return;
}
@@ -410,7 +410,7 @@ void rfc_port_sm_opened (tPORT *p_port, UINT16 event, void *p_data)
return;
case RFC_EVENT_DM:
- PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
+ PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
rfc_port_closed (p_port);
return;
@@ -424,7 +424,7 @@ void rfc_port_sm_opened (tPORT *p_port, UINT16 event, void *p_data)
rfc_port_timer_start (p_port, RFC_DISC_TIMEOUT);
}
else
- PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
+ PORT_DlcReleaseInd (p_port->rfc.p_mcb, p_port->dlci);
return;
case RFC_EVENT_UIH:
@@ -463,10 +463,10 @@ void rfc_port_sm_disc_wait_ua (tPORT *p_port, UINT16 event, void *p_data)
rfc_port_closed (p_port);
return;
- case RFC_EVENT_DATA:
- GKI_freebuf (p_data);
- return;
-
+ case RFC_EVENT_DATA:
+ GKI_freebuf (p_data);
+ return;
+
case RFC_EVENT_UA:
p_port->rfc.p_mcb->is_disc_initiator = TRUE;
/* Case falls through */
@@ -549,7 +549,7 @@ void rfc_process_pn (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
rfc_port_timer_stop (p_port);
PORT_ParNegCnf (p_mcb, dlci, p_frame->u.pn.mtu,
- p_frame->u.pn.conv_layer, p_frame->u.pn.k);
+ p_frame->u.pn.conv_layer, p_frame->u.pn.k);
}
@@ -557,17 +557,17 @@ void rfc_process_pn (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
**
** Function rfc_process_rpn
**
-** Description This function handles Remote DLC parameter negotiation
-** command/response. Pass command to the user.
+** Description This function handles Remote DLC parameter negotiation
+** command/response. Pass command to the user.
**
*******************************************************************************/
-void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
+void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
BOOLEAN is_request, MX_FRAME *p_frame)
{
tPORT_STATE port_pars;
tPORT *p_port;
- if ((p_port = port_find_mcb_dlci_port (p_mcb, p_frame->dlci)) == NULL)
+ if ((p_port = port_find_mcb_dlci_port (p_mcb, p_frame->dlci)) == NULL)
{
/* This is the first command on the port */
if (is_command)
@@ -575,7 +575,7 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
memset(&port_pars, 0, sizeof(tPORT_STATE));
rfc_set_port_state(&port_pars, p_frame);
-
+
PORT_PortNegInd(p_mcb, p_frame->dlci, &port_pars, p_frame->u.rpn.param_mask);
}
return;
@@ -626,7 +626,7 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
p_port->peer_port_pars.fc_type = (RFCOMM_FC_RTR_ON_INPUT | RFCOMM_FC_RTR_ON_OUTPUT);
p_port->rfc.expected_rsp |= RFC_RSP_RPN;
- rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
+ rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT);
rfc_port_timer_start (p_port, RFC_T2_TIMEOUT) ;
return;
@@ -636,9 +636,9 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
p_port->rfc.expected_rsp &= ~RFC_RSP_RPN;
/* Check if all suggested parameters were accepted */
- if (((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT)) ==
+ if (((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT)) ==
(RFCOMM_RPN_PM_RTR_ON_INPUT | RFCOMM_RPN_PM_RTR_ON_OUTPUT))
- || ((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT)) ==
+ || ((p_frame->u.rpn.param_mask & (RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT)) ==
(RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT)))
{
PORT_PortNegCnf (p_mcb, p_port->dlci, &port_pars, RFCOMM_SUCCESS);
@@ -655,7 +655,7 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
p_port->rfc.expected_rsp |= RFC_RSP_RPN;
- rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
+ rfc_send_rpn (p_mcb, p_frame->dlci, TRUE, &p_port->peer_port_pars,
RFCOMM_RPN_PM_RTC_ON_INPUT | RFCOMM_RPN_PM_RTC_ON_OUTPUT);
rfc_port_timer_start (p_port, RFC_T2_TIMEOUT) ;
return;
@@ -674,8 +674,8 @@ void rfc_process_rpn (tRFC_MCB *p_mcb, BOOLEAN is_command,
**
** Function rfc_process_msc
**
-** Description This function handles Modem Status Command.
-** Pass command to the user.
+** Description This function handles Modem Status Command.
+** Pass command to the user.
**
*******************************************************************************/
void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
@@ -686,7 +686,7 @@ void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
BOOLEAN new_peer_fc = FALSE;
p_port = port_find_mcb_dlci_port (p_mcb, p_frame->dlci);
- if (p_port == NULL)
+ if (p_port == NULL)
return;
pars.modem_signal = 0;
@@ -704,8 +704,8 @@ void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
pars.modem_signal |= MODEM_SIGNAL_DCD;
pars.fc = ((modem_signals & RFCOMM_MSC_FC) == RFCOMM_MSC_FC);
-
- pars.break_signal = (p_frame->u.msc.break_present) ?
+
+ pars.break_signal = (p_frame->u.msc.break_present) ?
p_frame->u.msc.break_duration : 0;
pars.discard_buffers = 0;
pars.break_signal_seq = RFCOMM_CTRL_BREAK_IN_SEQ; /* this is default */
@@ -745,8 +745,8 @@ void rfc_process_msc (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
**
** Function rfc_process_rls
**
-** Description This function handles Remote Line Status command.
-** Pass command to the user.
+** Description This function handles Remote Line Status command.
+** Pass command to the user.
**
*******************************************************************************/
void rfc_process_rls (tRFC_MCB *p_mcb, BOOLEAN is_command, MX_FRAME *p_frame)
@@ -790,7 +790,7 @@ void rfc_process_nsc (tRFC_MCB *p_mcb, MX_FRAME *p_frame)
** Function rfc_process_test
**
** Description This function handles Test frame. If this is a command
-** reply to it. Otherwise pass response to the user.
+** reply to it. Otherwise pass response to the user.
**
*******************************************************************************/
void rfc_process_test_rsp (tRFC_MCB *p_mcb, BT_HDR *p_buf)
@@ -803,8 +803,8 @@ void rfc_process_test_rsp (tRFC_MCB *p_mcb, BT_HDR *p_buf)
**
** Function rfc_process_fcon
**
-** Description This function handles FCON frame. The peer entity is able
-** to receive new information
+** Description This function handles FCON frame. The peer entity is able
+** to receive new information
**
*******************************************************************************/
void rfc_process_fcon (tRFC_MCB *p_mcb, BOOLEAN is_command)
@@ -824,8 +824,8 @@ void rfc_process_fcon (tRFC_MCB *p_mcb, BOOLEAN is_command)
**
** Function rfc_process_fcoff
**
-** Description This function handles FCOFF frame. The peer entity is unable
-** to receive new information
+** Description This function handles FCOFF frame. The peer entity is unable
+** to receive new information
**
*******************************************************************************/
void rfc_process_fcoff (tRFC_MCB *p_mcb, BOOLEAN is_command)
diff --git a/stack/rfcomm/rfc_port_if.c b/stack/rfcomm/rfc_port_if.c
index c9159f5..03fb339 100644
--- a/stack/rfcomm/rfc_port_if.c
+++ b/stack/rfcomm/rfc_port_if.c
@@ -44,7 +44,7 @@ void RFCOMM_StartReq (tRFC_MCB *p_mcb)
** Function RFCOMM_StartRsp
**
** Description This function handles Start Response from the upper layer.
-** Save upper layer handle and result of the Start Indication
+** Save upper layer handle and result of the Start Indication
** in the control block and dispatch event to the FSM.
**
*******************************************************************************/
@@ -58,18 +58,18 @@ void RFCOMM_StartRsp (tRFC_MCB *p_mcb, UINT16 result)
**
** Function RFCOMM_DlcEstablishReq
**
-** Description This function is called by the user app to establish
+** Description This function is called by the user app to establish
** connection with the specific dlci on a specific bd device.
-** It will allocate RFCOMM connection control block if not
-** allocated before and dispatch open event to the state
+** It will allocate RFCOMM connection control block if not
+** allocated before and dispatch open event to the state
** machine.
**
*******************************************************************************/
void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
-
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
{
PORT_DlcEstablishCnf (p_mcb, dlci, 0, RFCOMM_ERROR);
return;
@@ -90,7 +90,7 @@ void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 result)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
-
+
if ((p_mcb->state != RFC_MX_STATE_CONNECTED) && (result == RFCOMM_SUCCESS))
{
PORT_DlcReleaseInd (p_mcb, dlci);
@@ -108,7 +108,7 @@ void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 res
** Description This function is called by the user app to start
** DLC parameter negotiation. Port emulation can send this
** request before actually establishing the DLC. In this
-** case the function will allocate RFCOMM connection control
+** case the function will allocate RFCOMM connection control
** block.
**
*******************************************************************************/
@@ -119,7 +119,7 @@ void RFCOMM_ParNegReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
UINT8 cl;
UINT8 k;
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
{
p_port->error = PORT_PAR_NEG_FAILED;
return;
@@ -157,7 +157,7 @@ void RFCOMM_ParNegReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
** Function RFCOMM_ParNegRsp
**
** Description This function is called by the user app to acknowledge
-** DLC parameter negotiation.
+** DLC parameter negotiation.
**
*******************************************************************************/
void RFCOMM_ParNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
@@ -175,17 +175,17 @@ void RFCOMM_ParNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8
** Function RFCOMM_PortNegReq
**
** Description This function is called by the user app to start
-** Remote Port parameter negotiation. Port emulation can
-** send this request before actually establishing the DLC.
-** In this case the function will allocate RFCOMM connection
+** Remote Port parameter negotiation. Port emulation can
+** send this request before actually establishing the DLC.
+** In this case the function will allocate RFCOMM connection
** control block.
**
*******************************************************************************/
void RFCOMM_PortNegReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
-
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
{
PORT_PortNegCnf (p_mcb, dlci, NULL, RFCOMM_ERROR);
return;
@@ -208,13 +208,13 @@ void RFCOMM_PortNegReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars)
** Function RFCOMM_PortNegRsp
**
** Description This function is called by the user app to acknowledge
-** Port parameters negotiation.
+** Port parameters negotiation.
**
*******************************************************************************/
-void RFCOMM_PortNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars,
+void RFCOMM_PortNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars,
UINT16 param_mask)
{
- if (p_mcb->state != RFC_MX_STATE_CONNECTED)
+ if (p_mcb->state != RFC_MX_STATE_CONNECTED)
return;
rfc_send_rpn (p_mcb, dlci, FALSE, p_pars, param_mask);
@@ -233,7 +233,7 @@ void RFCOMM_ControlReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
- if ((p_port->state != PORT_STATE_OPENED)
+ if ((p_port->state != PORT_STATE_OPENED)
|| (p_port->rfc.state != RFC_STATE_OPENED))
return;
@@ -251,7 +251,7 @@ void RFCOMM_ControlReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars)
**
** Function RFCOMM_FlowReq
**
-** Description This function is called by the port entity when flow
+** Description This function is called by the port entity when flow
** control state has changed. Enable flag passed shows if
** port can accept more data.
**
@@ -260,14 +260,14 @@ void RFCOMM_FlowReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 enable)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
- if ((p_port->state != PORT_STATE_OPENED)
+ if ((p_port->state != PORT_STATE_OPENED)
|| (p_port->rfc.state != RFC_STATE_OPENED))
return;
p_port->local_ctrl.fc = !enable;
p_port->rfc.expected_rsp |= RFC_RSP_MSC;
-
+
rfc_send_msc (p_mcb, dlci, TRUE, &p_port->local_ctrl);
rfc_port_timer_start (p_port, RFC_T2_TIMEOUT) ;
@@ -286,7 +286,7 @@ void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 status)
{
tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
- if ((p_port->state != PORT_STATE_OPENED)
+ if ((p_port->state != PORT_STATE_OPENED)
|| (p_port->rfc.state != RFC_STATE_OPENED))
return;
@@ -301,7 +301,7 @@ void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 status)
**
** Function RFCOMM_DlcReleaseReq
**
-** Description This function is called by the PORT unit to close DLC
+** Description This function is called by the PORT unit to close DLC
**
*******************************************************************************/
void RFCOMM_DlcReleaseReq (tRFC_MCB *p_mcb, UINT8 dlci)
diff --git a/stack/rfcomm/rfc_ts_frames.c b/stack/rfcomm/rfc_ts_frames.c
index ec5385d..ad9aaef 100644
--- a/stack/rfcomm/rfc_ts_frames.c
+++ b/stack/rfcomm/rfc_ts_frames.c
@@ -168,7 +168,7 @@ void rfc_send_buf_uih (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf)
if (credits)
p_buf->offset--;
-
+
p_data = (UINT8 *)(p_buf + 1) + p_buf->offset;
/* UIH frame, command, PF = 0, dlci */
@@ -316,7 +316,7 @@ void rfc_send_fcoff (tRFC_MCB *p_mcb, BOOLEAN is_command)
** Description This function sends Modem Status Command Frame.
**
*******************************************************************************/
-void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_CTRL *p_pars)
{
BT_HDR *p_buf;
@@ -343,13 +343,13 @@ void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
*p_data++ = RFCOMM_EA | (len << 1);
*p_data++ = RFCOMM_EA | RFCOMM_CR_MASK | (dlci << RFCOMM_SHIFT_DLCI);
- *p_data++ = RFCOMM_EA |
+ *p_data++ = RFCOMM_EA |
((p_pars->fc) ? RFCOMM_MSC_FC : 0) |
((signals & MODEM_SIGNAL_DTRDSR) ? RFCOMM_MSC_RTC : 0) |
((signals & MODEM_SIGNAL_RTSCTS) ? RFCOMM_MSC_RTR : 0) |
((signals & MODEM_SIGNAL_RI) ? RFCOMM_MSC_IC : 0) |
((signals & MODEM_SIGNAL_DCD) ? RFCOMM_MSC_DV : 0);
-
+
if (break_duration)
{
*p_data++ = RFCOMM_EA | RFCOMM_MSC_BREAK_PRESENT_MASK |
@@ -415,8 +415,8 @@ void rfc_send_nsc (tRFC_MCB *p_mcb)
*p_data++ = RFCOMM_EA | RFCOMM_I_CR(FALSE) | RFCOMM_MX_NSC;
*p_data++ = RFCOMM_EA | (RFCOMM_MX_NSC_LEN << 1);
- *p_data++ = rfc_cb.rfc.rx_frame.ea |
- (rfc_cb.rfc.rx_frame.cr << RFCOMM_SHIFT_CR) |
+ *p_data++ = rfc_cb.rfc.rx_frame.ea |
+ (rfc_cb.rfc.rx_frame.cr << RFCOMM_SHIFT_CR) |
rfc_cb.rfc.rx_frame.type;
/* Total length is sizeof NSC data + mx header 2 */
@@ -433,7 +433,7 @@ void rfc_send_nsc (tRFC_MCB *p_mcb)
** Description This function sends Remote Port Negotiation Command
**
*******************************************************************************/
-void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
+void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
tPORT_STATE *p_pars, UINT16 mask)
{
BT_HDR *p_buf;
@@ -605,8 +605,8 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
switch (p_frame->type)
{
case RFCOMM_SABME:
- if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
- || !p_frame->pf || len || !RFCOMM_VALID_DLCI (p_frame->dlci)
+ if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
+ || !p_frame->pf || len || !RFCOMM_VALID_DLCI (p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad SABME");
@@ -616,7 +616,7 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_SABME);
case RFCOMM_UA:
- if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
+ if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
|| !p_frame->pf || len || !RFCOMM_VALID_DLCI (p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
@@ -627,8 +627,8 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_UA);
case RFCOMM_DM:
- if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
- || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
+ if (RFCOMM_FRAME_IS_CMD(p_mcb->is_initiator, p_frame->cr)
+ || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad DM");
@@ -638,8 +638,8 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_DM);
case RFCOMM_DISC:
- if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
- || !p_frame->pf || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
+ if (RFCOMM_FRAME_IS_RSP(p_mcb->is_initiator, p_frame->cr)
+ || !p_frame->pf || len || !RFCOMM_VALID_DLCI(p_frame->dlci)
|| !rfc_check_fcs (RFCOMM_CTRL_FRAME_LEN, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad DISC");
@@ -649,11 +649,11 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
return (RFC_EVENT_DISC);
case RFCOMM_UIH:
- if (!RFCOMM_VALID_DLCI(p_frame->dlci))
+ if (!RFCOMM_VALID_DLCI(p_frame->dlci))
{
RFCOMM_TRACE_ERROR0 ("Bad UIH - invalid DLCI");
return (RFC_EVENT_BAD_FRAME);
- }
+ }
else if (!rfc_check_fcs (2, p_start, fcs))
{
RFCOMM_TRACE_ERROR0 ("Bad UIH - FCS");
@@ -665,7 +665,7 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
RFCOMM_TRACE_ERROR0 ("Bad UIH - response");
return (RFC_EVENT_UIH);
}
- else
+ else
return (RFC_EVENT_UIH);
}
@@ -677,7 +677,7 @@ UINT8 rfc_parse_data (tRFC_MCB *p_mcb, MX_FRAME *p_frame, BT_HDR *p_buf)
**
** Function rfc_process_mx_message
**
-** Description This function processes UIH frames received on the
+** Description This function processes UIH frames received on the
** multiplexer control channel.
**
*******************************************************************************/
@@ -708,7 +708,7 @@ void rfc_process_mx_message (tRFC_MCB *p_mcb, BT_HDR *p_buf)
mx_len = *p_data++ >> RFCOMM_SHIFT_LENGTH1;
length--;
-
+
if (!ea)
{
mx_len += *p_data++ << RFCOMM_SHIFT_LENGTH2;
@@ -833,7 +833,7 @@ void rfc_process_mx_message (tRFC_MCB *p_mcb, BT_HDR *p_buf)
if ((length != RFCOMM_MX_RPN_REQ_LEN) && (length != RFCOMM_MX_RPN_LEN))
break;
- ea = *p_data & RFCOMM_EA;
+ ea = *p_data & RFCOMM_EA;
cr = (*p_data & RFCOMM_CR_MASK) >> RFCOMM_SHIFT_CR;
p_rx_frame->dlci = *p_data++ >> RFCOMM_SHIFT_DLCI;
@@ -868,7 +868,7 @@ void rfc_process_mx_message (tRFC_MCB *p_mcb, BT_HDR *p_buf)
if (length != RFCOMM_MX_RLS_LEN)
break;
- ea = *p_data & RFCOMM_EA;
+ ea = *p_data & RFCOMM_EA;
cr = (*p_data & RFCOMM_CR_MASK) >> RFCOMM_SHIFT_CR;
p_rx_frame->dlci = *p_data++ >> RFCOMM_SHIFT_DLCI;
diff --git a/stack/rfcomm/rfc_utils.c b/stack/rfcomm/rfc_utils.c
index e3f194d..9395891 100644
--- a/stack/rfcomm/rfc_utils.c
+++ b/stack/rfcomm/rfc_utils.c
@@ -29,7 +29,7 @@
** Description Reversed CRC Table , 8-bit, poly=0x07
** (GSM 07.10 TS 101 369 V6.3.0)
*******************************************************************************/
-static const UINT8 rfc_crctable[] =
+static const UINT8 rfc_crctable[] =
{
0x00, 0x91, 0xE3, 0x72, 0x07, 0x96, 0xE4, 0x75, 0x0E, 0x9F, 0xED, 0x7C, 0x09, 0x98, 0xEA, 0x7B,
0x1C, 0x8D, 0xFF, 0x6E, 0x1B, 0x8A, 0xF8, 0x69, 0x12, 0x83, 0xF1, 0x60, 0x15, 0x84, 0xF6, 0x67,
@@ -57,7 +57,7 @@ static const UINT8 rfc_crctable[] =
**
** Function rfc_calc_fcs
**
-** Description This function calculate FCS for the RFCOMM frame
+** Description This function calculate FCS for the RFCOMM frame
** (GSM 07.10 TS 101 369 V6.3.0)
**
** Input len - number of bytes in the message
@@ -82,7 +82,7 @@ UINT8 rfc_calc_fcs (UINT16 len, UINT8 *p)
**
** Function rfc_check_fcs
**
-** Description This function checks FCS for the RFCOMM frame
+** Description This function checks FCS for the RFCOMM frame
** (GSM 07.10 TS 101 369 V6.3.0)
**
** Input len - number of bytes in the message
@@ -192,7 +192,7 @@ void rfc_release_multiplexer_channel (tRFC_MCB *p_mcb)
void rfc_timer_start (tRFC_MCB *p_mcb, UINT16 timeout)
{
TIMER_LIST_ENT *p_tle = &p_mcb->tle;
-
+
RFCOMM_TRACE_EVENT1 ("rfc_timer_start - timeout:%d", timeout);
p_tle->param = (UINT32)p_mcb;
@@ -205,7 +205,7 @@ void rfc_timer_start (tRFC_MCB *p_mcb, UINT16 timeout)
**
** Function rfc_timer_stop
**
-** Description Stop RFC Timer
+** Description Stop RFC Timer
**
*******************************************************************************/
void rfc_timer_stop (tRFC_MCB *p_mcb)
@@ -239,7 +239,7 @@ void rfc_port_timer_start (tPORT *p_port, UINT16 timeout)
**
** Function rfc_port_timer_stop
**
-** Description Stop RFC Timer
+** Description Stop RFC Timer
**
*******************************************************************************/
void rfc_port_timer_stop (tPORT *p_port)
@@ -315,8 +315,8 @@ void rfcomm_process_timeout (TIMER_LIST_ENT *p_tle)
**
** Function rfc_sec_check_complete
**
-** 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
**
@@ -326,7 +326,7 @@ void rfc_sec_check_complete (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
tPORT *p_port = (tPORT *)p_ref_data;
/* Verify that PORT is still waiting for Security to complete */
- if (!p_port->in_use
+ if (!p_port->in_use
|| ((p_port->rfc.state != RFC_STATE_ORIG_WAIT_SEC_CHECK)
&& (p_port->rfc.state != RFC_STATE_TERM_WAIT_SEC_CHECK)))
return;
@@ -340,18 +340,18 @@ void rfc_sec_check_complete (BD_ADDR bd_addr, void *p_ref_data, UINT8 res)
** Function rfc_port_closed
**
** Description The function is called when port is released based on the
-** event received from the lower layer, typically L2CAP
+** event received from the lower layer, typically L2CAP
** connection down, DISC, or DM frame.
**
** Returns void
**
*******************************************************************************/
void rfc_port_closed (tPORT *p_port)
-{
+{
tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
RFCOMM_TRACE_DEBUG0 ("rfc_port_closed");
-
+
rfc_port_timer_stop (p_port);
p_port->rfc.state = RFC_STATE_CLOSED;
@@ -385,7 +385,7 @@ void rfc_inc_credit (tPORT *p_port, UINT8 credit)
if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT)
{
p_port->credit_tx += credit;
-
+
RFCOMM_TRACE_EVENT1 ("rfc_inc_credit:%d", p_port->credit_tx);
if (p_port->tx.peer_fc == TRUE)
@@ -410,7 +410,7 @@ void rfc_dec_credit (tPORT *p_port)
{
if (p_port->credit_tx > 0)
p_port->credit_tx--;
-
+
if (p_port->credit_tx == 0)
p_port->tx.peer_fc = TRUE;
}
diff --git a/stack/sdp/sdp_api.c b/stack/sdp/sdp_api.c
index ef662f6..ef662f6 100644..100755
--- a/stack/sdp/sdp_api.c
+++ b/stack/sdp/sdp_api.c
diff --git a/stack/sdp/sdp_db.c b/stack/sdp/sdp_db.c
index e52e69c..e9a35fc 100644
--- a/stack/sdp/sdp_db.c
+++ b/stack/sdp/sdp_db.c
@@ -212,7 +212,7 @@ static int sdp_compose_proto_list( UINT8 *p, UINT16 num_elem,
/* First, build the protocol list. This consists of a set of data element
** sequences, one for each layer. Each layer sequence consists of layer's
- ** UUID and optional parameters
+ ** UUID and optional parameters
*/
for (xx = 0; xx < num_elem; xx++, p_elem_list++)
{
diff --git a/stack/sdp/sdp_discovery.c b/stack/sdp/sdp_discovery.c
index 30ea277..1092584 100644
--- a/stack/sdp/sdp_discovery.c
+++ b/stack/sdp/sdp_discovery.c
@@ -372,7 +372,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, UINT16 len, BOOLEAN offset)
UINT8 * p_temp;
UINT8 type;
UINT32 delta_len = 0;
-
+
#if (SDP_DEBUG_RAW == TRUE)
UINT8 num_array[SDP_MAX_LIST_BYTE_COUNT];
UINT32 i;
@@ -395,7 +395,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, UINT16 len, BOOLEAN offset)
type = *p++;
p = sdpu_get_len_from_type (p, type, &list_len);
}
- if(list_len && list_len < cpy_len )
+ if(list_len && list_len < cpy_len )
{
cpy_len = list_len;
}
@@ -1003,7 +1003,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
else
{
/* coverity[overrun-local] */
- /*
+ /*
Event overrun-local: Overrun of static array "p_attr->attr_value.v.array" of size 4 at position 15 with index variable "ijk"
False-positive: SDP uses scratch buffer to hold the attribute value.
The actual size of tSDP_DISC_ATVAL does not matter.
diff --git a/stack/sdp/sdp_server.c b/stack/sdp/sdp_server.c
index 463ec7e..3640dc2 100644
--- a/stack/sdp/sdp_server.c
+++ b/stack/sdp/sdp_server.c
@@ -217,7 +217,7 @@ static void process_service_search (tCONN_CB *p_ccb, UINT16 trans_num,
/* Calculate how many handles will fit in one PDU */
cur_handles = (UINT16)((p_ccb->rem_mtu_size - SDP_MAX_SERVICE_RSPHDR_LEN) / 4);
-
+
if (rem_handles <= cur_handles)
cur_handles = rem_handles;
else /* Continuation is set */
@@ -405,7 +405,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
/* if there is a partial attribute pending to be sent */
if (p_ccb->cont_info.attr_offset)
{
- p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, rem_len,
+ p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, rem_len,
&p_ccb->cont_info.attr_offset);
/* If the partial attrib could not been fully added yet */
diff --git a/stack/sdp/sdp_utils.c b/stack/sdp/sdp_utils.c
index bba3e60..d98a30c 100644
--- a/stack/sdp/sdp_utils.c
+++ b/stack/sdp/sdp_utils.c
@@ -256,7 +256,7 @@ UINT8 *sdpu_build_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr)
return (p_out);
}
-
+
/* Now, store the attribute value */
switch (p_attr->len)
{
@@ -347,7 +347,7 @@ void sdpu_build_n_send_error (tCONN_CB *p_ccb, UINT16 trans_num, UINT16 error_co
** Function sdpu_extract_uid_seq
**
** Description This function extracts a UUID sequence from the passed input
-** buffer, and puts it into the passed output list.
+** buffer, and puts it into the passed output list.
**
** Returns Pointer to next byte in the input buffer after the sequence.
**
@@ -461,7 +461,7 @@ UINT8 *sdpu_extract_uid_seq (UINT8 *p, UINT16 param_len, tSDP_UUID_SEQ *p_seq)
** Function sdpu_extract_attr_seq
**
** Description This function extracts an attribute sequence from the passed
-** input buffer, and puts it into the passed output list.
+** input buffer, and puts it into the passed output list.
**
** Returns Pointer to next byte in the input buffer after the sequence.
**
@@ -772,7 +772,7 @@ BOOLEAN sdpu_compare_uuid_with_attr (tBT_UUID *p_btuuid, tSDP_DISC_ATTR *p_attr)
Event overrun-buffer-arg: Overrun of static array "&p_attr->attr_value.v.array" of size 4 bytes by passing it to a function which indexes it with argument "16U" at byte position 15
FALSE-POSITIVE error from Coverity test tool. Please do NOT remove following comment.
False-positive: SDP uses scratch buffer to hold the attribute value.
- The actual size of tSDP_DISC_ATVAL does not matter.
+ The actual size of tSDP_DISC_ATVAL does not matter.
If the array size in tSDP_DISC_ATVAL is increase, we would increase the system RAM usage unnecessarily
*/
else if (!memcmp (p_btuuid->uu.uuid128, p_attr->attr_value.v.array, MAX_UUID_SIZE))
@@ -820,7 +820,7 @@ void sdpu_sort_attr_list( UINT16 num_attr, tSDP_DISCOVERY_DB *p_db )
}
else
i++;
- }
+ }
}
@@ -946,7 +946,7 @@ UINT16 sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE *p_attr)
len += p_attr->len;
return len;
}
-
+
/* Now, the attribute value */
switch (p_attr->len)
{
@@ -1010,7 +1010,7 @@ UINT8 *sdpu_build_partial_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr, UI
** Description This function converts UUID-16 to UUID-128 by including the base UUID
**
** uuid16: 2-byte UUID
-** p_uuid128: Expanded 128-bit UUID
+** p_uuid128: Expanded 128-bit UUID
**
** Returns None
**
diff --git a/stack/smp/aes.c b/stack/smp/aes.c
index 1028d5b..5b3fefa 100644
--- a/stack/smp/aes.c
+++ b/stack/smp/aes.c
@@ -231,7 +231,7 @@ static uint_8t hibit(const uint_8t x)
static uint_8t gf_inv(const uint_8t x)
{ uint_8t p1 = x, p2 = BPOLY, n1 = hibit(x), n2 = 0x80, v1 = 1, v2 = 0;
- if(x < 2)
+ if(x < 2)
return x;
for( ; ; )
@@ -239,20 +239,20 @@ static uint_8t gf_inv(const uint_8t x)
if(n1)
while(n2 >= n1) /* divide polynomial p2 by p1 */
{
- n2 /= n1; /* shift smaller polynomial left */
+ n2 /= n1; /* shift smaller polynomial left */
p2 ^= (p1 * n2) & 0xff; /* and remove from larger one */
- v2 ^= (v1 * n2); /* shift accumulated value and */
+ v2 ^= (v1 * n2); /* shift accumulated value and */
n2 = hibit(p2); /* add into result */
}
else
return v1;
- if(n2) /* repeat with values swapped */
+ if(n2) /* repeat with values swapped */
while(n1 >= n2)
{
- n1 /= n2;
- p1 ^= p2 * n1;
- v1 ^= v2 * n1;
+ n1 /= n2;
+ p1 ^= p2 * n1;
+ v1 ^= v2 * n1;
n1 = hibit(p1);
}
else
@@ -262,13 +262,13 @@ static uint_8t gf_inv(const uint_8t x)
/* The forward and inverse affine transformations used in the S-box */
uint_8t fwd_affine(const uint_8t x)
-{
+{
#if defined( HAVE_UINT_32T )
uint_32t w = x;
w ^= (w << 1) ^ (w << 2) ^ (w << 3) ^ (w << 4);
return 0x63 ^ ((w ^ (w >> 8)) & 0xff);
#else
- return 0x63 ^ x ^ (x << 1) ^ (x << 2) ^ (x << 3) ^ (x << 4)
+ return 0x63 ^ x ^ (x << 1) ^ (x << 2) ^ (x << 3) ^ (x << 4)
^ (x >> 7) ^ (x >> 6) ^ (x >> 5) ^ (x >> 4);
#endif
}
@@ -280,7 +280,7 @@ uint_8t inv_affine(const uint_8t x)
w = (w << 1) ^ (w << 3) ^ (w << 6);
return 0x05 ^ ((w ^ (w >> 8)) & 0xff);
#else
- return 0x05 ^ (x << 1) ^ (x << 3) ^ (x << 6)
+ return 0x05 ^ (x << 1) ^ (x << 3) ^ (x << 6)
^ (x >> 7) ^ (x >> 5) ^ (x >> 2);
#endif
}
@@ -502,19 +502,19 @@ return_type aes_set_key( const unsigned char key[], length_type keylen, aes_cont
switch( keylen )
{
case 16:
- case 128:
- keylen = 16;
+ case 128:
+ keylen = 16;
break;
case 24:
- case 192:
- keylen = 24;
+ case 192:
+ keylen = 24;
break;
case 32:
- case 256:
- keylen = 32;
+ case 256:
+ keylen = 32;
break;
- default:
- ctx->rnd = 0;
+ default:
+ ctx->rnd = 0;
return (return_type)-1;
}
block_copy_nn(ctx->ksch, key, keylen);
@@ -640,10 +640,10 @@ return_type aes_decrypt( const unsigned char in[N_BLOCK], unsigned char out[N_BL
return_type aes_cbc_decrypt( const unsigned char *in, unsigned char *out,
int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1] )
-{
+{
while(n_block--)
{ uint_8t tmp[N_BLOCK];
-
+
memcpy(tmp, in, N_BLOCK);
if(aes_decrypt(in, out, ctx) != EXIT_SUCCESS)
return EXIT_FAILURE;
diff --git a/stack/smp/smp_act.c b/stack/smp/smp_act.c
index 0948153..af4bd2e 100644
--- a/stack/smp/smp_act.c
+++ b/stack/smp/smp_act.c
@@ -36,7 +36,7 @@ const UINT8 smp_association_table[2][SMP_IO_CAP_MAX][SMP_IO_CAP_MAX] =
/* display only */ /*SMP_CAP_IO = 1 */ /* keyboard only */ /* No InputOutput */ /* keyboard display */
};
-const tSMP_ACT smp_distribute_act [] =
+const tSMP_ACT smp_distribute_act [] =
{
smp_generate_ltk,
smp_send_id_info,
@@ -84,7 +84,7 @@ void smp_send_app_cback(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
cb_data.io_req.auth_req = p_cb->peer_auth_req;
cb_data.io_req.oob_data = SMP_OOB_NONE;
cb_data.io_req.io_cap = SMP_DEFAULT_IO_CAPS;
- cb_data.io_req.max_key_size = SMP_MAX_ENC_KEY_SIZE;
+ cb_data.io_req.max_key_size = SMP_MAX_ENC_KEY_SIZE;
cb_data.io_req.init_keys = p_cb->loc_i_key ;
cb_data.io_req.resp_keys = p_cb->loc_r_key ;
@@ -118,7 +118,7 @@ void smp_send_app_cback(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
/*******************************************************************************
** Function smp_send_pair_fail
-** Description pairing failure to peer device if needed.
+** Description pairing failure to peer device if needed.
*******************************************************************************/
void smp_send_pair_fail(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
@@ -145,7 +145,7 @@ void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
/* erase all keys when master sends pairing req*/
if (p_dev_rec)
btm_sec_clear_ble_keys(p_dev_rec);
- /* do not manipulate the key, let app decide,
+ /* do not manipulate the key, let app decide,
leave out to BTM to mandate key distribution for bonding case */
smp_send_cmd(SMP_OPCODE_PAIRING_REQ, p_cb);
}
@@ -191,7 +191,7 @@ void smp_send_init(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
#endif
- smp_send_cmd(SMP_OPCODE_INIT, p_cb);
+ smp_send_cmd(SMP_OPCODE_INIT, p_cb);
}
/*******************************************************************************
** Function smp_send_enc_info
@@ -204,8 +204,8 @@ void smp_send_enc_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
SMP_TRACE_DEBUG1 ("smp_send_enc_info p_cb->loc_enc_size = %d", p_cb->loc_enc_size);
smp_update_key_mask (p_cb, SMP_SEC_KEY_TYPE_ENC, FALSE);
- smp_send_cmd(SMP_OPCODE_ENCRYPT_INFO, p_cb);
- smp_send_cmd(SMP_OPCODE_MASTER_ID, p_cb);
+ smp_send_cmd(SMP_OPCODE_ENCRYPT_INFO, p_cb);
+ smp_send_cmd(SMP_OPCODE_MASTER_ID, p_cb);
/* save the DIV and key size information when acting as slave device */
le_key.div = p_cb->div;
@@ -226,8 +226,8 @@ void smp_send_id_info(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
SMP_TRACE_DEBUG0 ("smp_send_id_info ");
smp_update_key_mask (p_cb, SMP_SEC_KEY_TYPE_ID, FALSE);
- smp_send_cmd(SMP_OPCODE_IDENTITY_INFO, p_cb);
- smp_send_cmd(SMP_OPCODE_ID_ADDR, p_cb);
+ smp_send_cmd(SMP_OPCODE_IDENTITY_INFO, p_cb);
+ smp_send_cmd(SMP_OPCODE_ID_ADDR, p_cb);
SMP_TRACE_WARNING0( "smp_send_id_info");
@@ -377,7 +377,7 @@ void smp_proc_pair_cmd(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
if (p_cb->peer_enc_size < SMP_MIN_ENC_KEY_SIZE)
{
smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
- }
+ }
else if (p_cb->role == HCI_ROLE_SLAVE)
{
if (!(p_cb->flags & SMP_PAIR_FLAGS_WE_STARTED_DD))
@@ -410,7 +410,7 @@ void smp_proc_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
p_cb->flags |= SMP_PAIR_FLAGS_CMD_CONFIRM;
-}
+}
/*******************************************************************************
** Function smp_proc_init
@@ -536,14 +536,14 @@ void smp_proc_compare(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
p_cb->loc_i_key = p_cb->peer_i_key;
p_cb->loc_r_key = p_cb->peer_r_key;
- smp_sm_event(p_cb, SMP_ENC_REQ_EVT, NULL);
+ smp_sm_event(p_cb, SMP_ENC_REQ_EVT, NULL);
}
}
else
{
reason = p_cb->failure = SMP_CONFIRM_VALUE_ERR;
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
}
}
/*******************************************************************************
@@ -581,7 +581,7 @@ void smp_start_enc(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
if (p_data != NULL)
cmd = btm_ble_start_encrypt(p_cb->pairing_bda, TRUE, p_data->key.p_data);
else
- cmd = btm_ble_start_encrypt(p_cb->pairing_bda, FALSE, NULL);
+ cmd = btm_ble_start_encrypt(p_cb->pairing_bda, FALSE, NULL);
if (!cmd)
smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &reason);
@@ -644,7 +644,7 @@ void smp_check_auth_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
UINT8 enc_enable = *(UINT8 *)p_data;
UINT8 reason = enc_enable ? SMP_SUCCESS : SMP_ENC_FAIL;
- SMP_TRACE_DEBUG3 ("smp_check_auth_req enc_enable=%d i_keys=0x%x r_keys=0x%x (i-initiator r-responder)",
+ SMP_TRACE_DEBUG3 ("smp_check_auth_req enc_enable=%d i_keys=0x%x r_keys=0x%x (i-initiator r-responder)",
enc_enable, p_cb->loc_i_key, p_cb->loc_r_key);
if (enc_enable == 1)
{
@@ -701,7 +701,7 @@ void smp_key_pick_key(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
void smp_key_distribution(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
UINT8 reason = SMP_SUCCESS;
- SMP_TRACE_DEBUG3 ("smp_key_distribution role=%d (0-master) r_keys=0x%x i_keys=0x%x",
+ SMP_TRACE_DEBUG3 ("smp_key_distribution role=%d (0-master) r_keys=0x%x i_keys=0x%x",
p_cb->role, p_cb->loc_r_key, p_cb->loc_i_key);
if (p_cb->role == HCI_ROLE_SLAVE||
@@ -720,7 +720,7 @@ void smp_key_distribution(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
/*******************************************************************************
** Function smp_decide_asso_model
** Description This function is called to compare both sides' io capability
-** oob data flag and authentication request, and decide the
+** oob data flag and authentication request, and decide the
** association model to use for the authentication.
*******************************************************************************/
void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
@@ -728,11 +728,11 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
UINT8 failure = SMP_UNKNOWN_IO_CAP;
tSMP_ASSO_MODEL model = SMP_MODEL_MAX;
UINT8 int_evt = 0;
- tSMP_KEY key;
- tSMP_INT_DATA *p;
+ tSMP_KEY key;
+ tSMP_INT_DATA *p;
SMP_TRACE_DEBUG3 ("smp_decide_asso_model p_cb->peer_io_caps = %d p_cb->loc_io_caps = %d \
- p_cb->peer_auth_req = %02x",
+ p_cb->peer_auth_req = %02x",
p_cb->peer_io_caps, p_cb->loc_io_caps, p_cb->peer_auth_req);
/* OOB data present on both devices, use OOB association model */
@@ -741,7 +741,7 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
model = SMP_MODEL_OOB;
}
/* no MITM required, ignore IO cap, use encryption only */
- else if (SMP_NO_MITM_REQUIRED (p_cb->peer_auth_req) &&
+ else if (SMP_NO_MITM_REQUIRED (p_cb->peer_auth_req) &&
SMP_NO_MITM_REQUIRED(p_cb->loc_auth_req))
{
model = SMP_MODEL_ENC_ONLY;
@@ -787,7 +787,7 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
else if (model == SMP_MODEL_ENC_ONLY) /* TK = 0, go calculate Confirm */
{
if (p_cb->role == HCI_ROLE_MASTER &&
- ((p_cb->peer_auth_req & SMP_AUTH_YN_BIT) != 0) &&
+ ((p_cb->peer_auth_req & SMP_AUTH_YN_BIT) != 0) &&
((p_cb->loc_auth_req & SMP_AUTH_YN_BIT) == 0))
{
SMP_TRACE_ERROR0("IO capability does not meet authentication requirement");
@@ -804,7 +804,7 @@ void smp_decide_asso_model(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
key.p_data = p_cb->tk;
p = (tSMP_INT_DATA *)&key;
- memset(p_cb->tk, 0, BT_OCTET16_LEN);
+ memset(p_cb->tk, 0, BT_OCTET16_LEN);
/* TK, ready */
int_evt = SMP_KEY_READY_EVT;
}
@@ -840,7 +840,7 @@ void smp_proc_io_rsp(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
/*******************************************************************************
** Function smp_pairing_cmpl
-** Description This function is called to send the pairing complete callback
+** Description This function is called to send the pairing complete callback
** and remove the connection if needed.
*******************************************************************************/
void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
@@ -848,7 +848,7 @@ void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
SMP_TRACE_DEBUG0 ("smp_pairing_cmpl ");
- if ((p_cb->status == SMP_SUCCESS) ||
+ if ((p_cb->status == SMP_SUCCESS) ||
(p_cb->status <= SMP_REPEATED_ATTEMPTS && p_cb->status != SMP_SUCCESS))
{
smp_sm_event(p_cb, SMP_RELEASE_DELAY_EVT, p_data);
@@ -862,7 +862,7 @@ void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
}
/*******************************************************************************
** Function smp_pair_terminate
-** Description This function is called to send the pairing complete callback
+** Description This function is called to send the pairing complete callback
** and remove the connection if needed.
*******************************************************************************/
void smp_pair_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
@@ -892,8 +892,8 @@ void smp_idle_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Description This function is called when link is encrypted and notified to
** slave device. Proceed to to send LTK, DIV and ER to master if
** bonding the devices.
-**
-**
+**
+**
** Returns void
**
*******************************************************************************/
@@ -913,26 +913,26 @@ void smp_link_encrypted(BD_ADDR bda, UINT8 encr_enable)
btm_ble_update_sec_key_size(bda, p_cb->loc_enc_size);
}
- smp_sm_event(&smp_cb, SMP_ENCRYPTED_EVT, &encr_enable);
+ smp_sm_event(&smp_cb, SMP_ENCRYPTED_EVT, &encr_enable);
}
}
/*******************************************************************************
**
** Function smp_proc_ltk_request
**
-** Description This function is called when LTK request is received from
+** Description This function is called when LTK request is received from
** controller.
-**
+**
** Returns void
**
*******************************************************************************/
BOOLEAN smp_proc_ltk_request(BD_ADDR bda)
{
SMP_TRACE_DEBUG1 ("smp_proc_ltk_request state = %d", smp_cb.state);
- if ( smp_cb.state == SMP_ST_ENC_PENDING &&
+ if ( smp_cb.state == SMP_ST_ENC_PENDING &&
!memcmp(bda, smp_cb.pairing_bda, BD_ADDR_LEN))
{
- smp_sm_event(&smp_cb, SMP_ENC_REQ_EVT, NULL);
+ smp_sm_event(&smp_cb, SMP_ENC_REQ_EVT, NULL);
return TRUE;
}
diff --git a/stack/smp/smp_api.c b/stack/smp/smp_api.c
index 753e65e..e0c37e0 100644
--- a/stack/smp/smp_api.c
+++ b/stack/smp/smp_api.c
@@ -44,7 +44,7 @@ void SMP_Init(void)
smp_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
#endif
- smp_l2cap_if_init();
+ smp_l2cap_if_init();
}
@@ -104,7 +104,7 @@ BOOLEAN SMP_Register (tSMP_CALLBACK *p_cback)
**
** Function SMP_Pair
**
-** Description This function call to perform a SMP pairing with peer device.
+** Description This function call to perform a SMP pairing with peer device.
** Device support one SMP pairing at one time.
**
** Parameters bd_addr - peer device bd address.
@@ -127,7 +127,7 @@ tSMP_STATUS SMP_Pair (BD_ADDR bd_addr)
{
p_cb->flags = SMP_PAIR_FLAGS_WE_STARTED_DD;
- memcpy (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN);
+ memcpy (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN);
if (!L2CA_ConnectFixedChnl (L2CAP_SMP_CID, bd_addr))
{
@@ -145,7 +145,7 @@ tSMP_STATUS SMP_Pair (BD_ADDR bd_addr)
**
** Function SMP_PairCancel
**
-** Description This function call to cancel a SMP pairing with peer device.
+** Description This function call to cancel a SMP pairing with peer device.
**
** Parameters bd_addr - peer device bd address.
**
@@ -159,7 +159,7 @@ BOOLEAN SMP_PairCancel (BD_ADDR bd_addr)
BOOLEAN status = FALSE;
BTM_TRACE_EVENT2 ("SMP_CancelPair state=%d flag=0x%x ", p_cb->state, p_cb->flags);
- if ( (p_cb->state != SMP_ST_IDLE) &&
+ if ( (p_cb->state != SMP_ST_IDLE) &&
(!memcmp (p_cb->pairing_bda, bd_addr, BD_ADDR_LEN)) )
{
p_cb->is_pair_cancel = TRUE;
@@ -177,8 +177,8 @@ BOOLEAN SMP_PairCancel (BD_ADDR bd_addr)
** Description This function is called to grant security process.
**
** Parameters bd_addr - peer device bd address.
-** res - result of the operation SMP_SUCCESS if success.
-** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
+** res - result of the operation SMP_SUCCESS if success.
+** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts.
**
** Returns None
**
@@ -191,7 +191,7 @@ void SMP_SecurityGrant(BD_ADDR bd_addr, UINT8 res)
memcmp (smp_cb.pairing_bda, bd_addr, BD_ADDR_LEN))
return;
- smp_sm_event(&smp_cb, SMP_API_SEC_GRANT_EVT, &res);
+ smp_sm_event(&smp_cb, SMP_API_SEC_GRANT_EVT, &res);
}
/*******************************************************************************
@@ -202,7 +202,7 @@ void SMP_SecurityGrant(BD_ADDR bd_addr, UINT8 res)
** passkey request to the application.
**
** Parameters: bd_addr - Address of the device for which passkey was requested
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** passkey - numeric value in the range of
** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
**
@@ -259,7 +259,7 @@ void SMP_PasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey)
** SMP in response to SMP_OOB_REQ_EVT
**
** Parameters: bd_addr - Address of the peer device
-** res - result of the operation SMP_SUCCESS if success
+** res - result of the operation SMP_SUCCESS if success
** p_data - simple pairing Randomizer C.
**
*******************************************************************************/
@@ -300,18 +300,18 @@ void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len, UINT8 *p_data
**
** Description This function is called to encrypt the data with the specified
** key
-**
+**
** Parameters: key - Pointer to key key[0] conatins the MSB
** key_len - key length
** plain_text - Pointer to data to be encrypted
** plain_text[0] conatins the MSB
** pt_len - plain text length
** p_out - output of the encrypted texts
-**
-** Returns Boolean - request is successful
+**
+** Returns Boolean - request is successful
*******************************************************************************/
-BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out)
{
diff --git a/stack/smp/smp_cmac.c b/stack/smp/smp_cmac.c
index d31930b..d72c3b5 100644
--- a/stack/smp/smp_cmac.c
+++ b/stack/smp/smp_cmac.c
@@ -26,7 +26,7 @@ typedef struct
UINT16 len;
UINT16 round;
}tCMAC_CB;
-
+
tCMAC_CB cmac_cb;
/* Rb for AES-128 as block cipher, LSB as [0] */
@@ -45,8 +45,8 @@ void print128(BT_OCTET16 x, const UINT8 *key_name)
for (i = 0; i < 4; i ++)
{
- SMP_TRACE_WARNING4("%02x %02x %02x %02x",
- p[BT_OCTET16_LEN - i*4 -1], p[BT_OCTET16_LEN - i*4 -2],
+ SMP_TRACE_WARNING4("%02x %02x %02x %02x",
+ p[BT_OCTET16_LEN - i*4 -1], p[BT_OCTET16_LEN - i*4 -2],
p[BT_OCTET16_LEN - i*4 -3], p[BT_OCTET16_LEN - i*4 -4]);
}
#endif
@@ -56,11 +56,11 @@ void print128(BT_OCTET16 x, const UINT8 *key_name)
**
** Function padding
**
-** Description utility function to padding the given text to be a 128 bits
+** Description utility function to padding the given text to be a 128 bits
** data. The parameter dest is input and output parameter, it
** must point to a BT_OCTET16_LEN memory space; where include
** length bytes valid data.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -76,7 +76,7 @@ static void padding ( BT_OCTET16 dest, UINT8 length )
** Function leftshift_onebit
**
** Description utility function to left shift one bit for a 128 bits value.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -98,12 +98,12 @@ static void leftshift_onebit(UINT8 *input, UINT8 *output)
** Function cmac_aes_cleanup
**
** Description clean up function for AES_CMAC algorithm.
-**
+**
** Returns void
**
*******************************************************************************/
static void cmac_aes_cleanup(void)
-{
+{
if (cmac_cb.text != NULL)
{
GKI_freebuf(cmac_cb.text);
@@ -116,7 +116,7 @@ static void cmac_aes_cleanup(void)
** Function cmac_aes_k_calculate
**
** Description This function is the calculation of block cipher using AES-128.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -138,7 +138,7 @@ static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 t
err = 1;
break;
}
-
+
memcpy(x, output.param_buf, BT_OCTET16_LEN);
i ++;
}
@@ -149,9 +149,9 @@ static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 t
memcpy(p_signature, p_mac, tlen);
SMP_TRACE_DEBUG2("tlen = %d p_mac = %d", tlen, p_mac);
- SMP_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
+ SMP_TRACE_DEBUG4("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
*p_mac, *(p_mac + 1), *(p_mac + 2), *(p_mac + 3));
- SMP_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
+ SMP_TRACE_DEBUG4("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",
*(p_mac + 4), *(p_mac + 5), *(p_mac + 6), *(p_mac + 7));
return TRUE;
@@ -166,7 +166,7 @@ static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 t
**
** Description This function proceeed to prepare the last block of message
** Mn depending on the size of the message.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -197,7 +197,7 @@ static void cmac_prepare_last_block (BT_OCTET16 k1, BT_OCTET16 k2)
** Function cmac_subkey_cont
**
** Description This is the callback function when CIPHk(0[128]) is completed.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -242,9 +242,9 @@ static void cmac_subkey_cont(tSMP_ENC *p)
** Function cmac_generate_subkey
**
** Description This is the function to generate the two subkeys.
-**
+**
** Parameters key - CMAC key, expect SRK when used by SMP.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -269,13 +269,13 @@ static BOOLEAN cmac_generate_subkey(BT_OCTET16 key)
** Function AES_CMAC
**
** Description This is the AES-CMAC Generation Function with tlen implemented.
-**
+**
** Parameters key - CMAC key in little endian order, expect SRK when used by SMP.
** input - text to be signed in little endian byte order.
** length - length of the input in byte.
** tlen - lenth of mac desired
** p_signature - data pointer to where signed data to be stored, tlen long.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -288,7 +288,7 @@ BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length,
SMP_TRACE_EVENT0 ("AES_CMAC ");
- if (n == 0) n = 1;
+ if (n == 0) n = 1;
len = n * BT_OCTET16_LEN;
SMP_TRACE_WARNING1("AES128_CMAC started, allocate buffer size = %d", len);
@@ -314,7 +314,7 @@ BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length,
/* start calculation */
ret = cmac_aes_k_calculate(key, p_signature, tlen);
}
- /* clean up */
+ /* clean up */
cmac_aes_cleanup();
}
else
@@ -322,7 +322,7 @@ BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length,
ret = FALSE;
SMP_TRACE_ERROR0("No resources");
}
-
+
return ret;
}
diff --git a/stack/smp/smp_int.h b/stack/smp/smp_int.h
index d9042d2..4ca9563 100644
--- a/stack/smp/smp_int.h
+++ b/stack/smp/smp_int.h
@@ -55,7 +55,7 @@ typedef UINT8 tSMP_ASSO_MODEL;
#define SMP_SIGN_INFO_EVT SMP_OPCODE_SIGN_INFO
#define SMP_SECURITY_REQ_EVT SMP_OPCODE_SEC_REQ
-#define SMP_SELF_DEF_EVT SMP_SECURITY_REQ_EVT
+#define SMP_SELF_DEF_EVT SMP_SECURITY_REQ_EVT
#define SMP_KEY_READY_EVT (SMP_SELF_DEF_EVT + 1)
#define SMP_ENCRYPTED_EVT (SMP_SELF_DEF_EVT + 2)
#define SMP_L2CAP_CONN_EVT (SMP_SELF_DEF_EVT + 3)
@@ -81,7 +81,7 @@ enum
SMP_ST_IDLE,
SMP_ST_WAIT_APP_RSP,
SMP_ST_SEC_REQ_PENDING,
- SMP_ST_PAIR_REQ_RSP,
+ SMP_ST_PAIR_REQ_RSP,
SMP_ST_WAIT_CONFIRM,
SMP_ST_CONFIRM,
SMP_ST_RAND,
@@ -128,8 +128,8 @@ typedef union
}tSMP_INT_DATA;
/* internal status mask */
-#define SMP_PAIR_FLAGS_WE_STARTED_DD (1)
-#define SMP_PAIR_FLAGS_PEER_STARTED_DD (1 << 1)
+#define SMP_PAIR_FLAGS_WE_STARTED_DD (1)
+#define SMP_PAIR_FLAGS_PEER_STARTED_DD (1 << 1)
#define SMP_PAIR_FLAGS_CMD_CONFIRM (1 << SMP_OPCODE_CONFIRM) /* 1 << 3 */
#define SMP_PAIR_FLAG_ENC_AFTER_PAIR (1 << 4)
@@ -215,7 +215,7 @@ extern "C"
#define smp_cb (*smp_cb_ptr)
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
@@ -224,15 +224,15 @@ SMP_API extern void smp_init (void);
#if SMP_CONFORMANCE_TESTING == TRUE
/* Used only for conformance testing */
-SMP_API extern void smp_set_test_confirm_value (BOOLEAN enable, UINT8 *p_c_value);
-SMP_API extern void smp_set_test_rand_value (BOOLEAN enable, UINT8 *p_c_value);
-SMP_API extern void smp_set_test_pair_fail_status (BOOLEAN enable, UINT8 status);
-SMP_API extern void smp_remove_fixed_channel_disable (BOOLEAN disable);
+SMP_API extern void smp_set_test_confirm_value (BOOLEAN enable, UINT8 *p_c_value);
+SMP_API extern void smp_set_test_rand_value (BOOLEAN enable, UINT8 *p_c_value);
+SMP_API extern void smp_set_test_pair_fail_status (BOOLEAN enable, UINT8 status);
+SMP_API extern void smp_remove_fixed_channel_disable (BOOLEAN disable);
#endif
/* smp main */
extern void smp_sm_event(tSMP_CB *p_cb, tSMP_EVENT event, void *p_data);
-extern void smp_proc_sec_request(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
+extern void smp_proc_sec_request(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
extern void smp_send_pair_req(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
extern void smp_send_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
extern void smp_send_pair_fail(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
@@ -282,8 +282,8 @@ extern void smp_convert_string_to_tk(BT_OCTET16 tk, UINT32 passkey);
extern void smp_mask_enc_key(UINT8 loc_enc_size, UINT8 * p_data);
extern void smp_rsp_timeout(TIMER_LIST_ENT *p_tle);
extern void smp_xor_128(BT_OCTET16 a, BT_OCTET16 b);
-extern BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+extern BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out);
/* smp key */
extern void smp_generate_confirm (tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
diff --git a/stack/smp/smp_keys.c b/stack/smp/smp_keys.c
index 9139c9c..a7c8496 100644
--- a/stack/smp/smp_keys.c
+++ b/stack/smp/smp_keys.c
@@ -26,7 +26,7 @@
#include "aes.h"
#ifndef SMP_MAX_ENC_REPEAT
#define SMP_MAX_ENC_REPEAT 3
- #endif
+ #endif
static void smp_rand_back(tBTM_RAND_ENC *p);
static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data);
@@ -46,7 +46,7 @@ static const tSMP_ACT smp_encrypt_action[] =
smp_generate_stk, /* SMP_GEN_STK*/
smp_genenrate_ltk_cont, /* SMP_GEN_LTK */
smp_generate_ltk, /* SMP_GEN_DIV_LTK */
- smp_generate_rand_vector, /* SMP_GEN_RAND_V */
+ smp_generate_rand_vector, /* SMP_GEN_RAND_V */
smp_generate_y, /* SMP_GEN_EDIV */
smp_generate_passkey, /* SMP_GEN_TK */
smp_generate_confirm, /* SMP_GEN_SRAND_MRAND */
@@ -78,19 +78,19 @@ static void smp_debug_print_nbyte_little_endian (UINT8 *p, const UINT8 *key_name
** Function smp_encrypt_data
**
** Description This function is called to generate passkey.
-**
+**
** Returns void
**
*******************************************************************************/
-BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
- UINT8 *plain_text, UINT8 pt_len,
+BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
+ UINT8 *plain_text, UINT8 pt_len,
tSMP_ENC *p_out)
{
aes_context ctx;
UINT8 *p_start = NULL;
UINT8 *p = NULL;
UINT8 *p_rev_data = NULL; /* input data in big endilan format */
- UINT8 *p_rev_key = NULL; /* input key in big endilan format */
+ UINT8 *p_rev_key = NULL; /* input key in big endilan format */
UINT8 *p_rev_output = NULL; /* encrypted output in big endilan format */
SMP_TRACE_DEBUG0 ("smp_encrypt_data");
@@ -117,19 +117,19 @@ BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
p_rev_key = p; /* start at byte 32 */
REVERSE_ARRAY_TO_STREAM (p, key, SMP_ENCRYT_KEY_SIZE); /* byte 32 to byte 47 */
- smp_debug_print_nbyte_little_endian(key, (const UINT8 *)"Key", SMP_ENCRYT_KEY_SIZE);
- smp_debug_print_nbyte_little_endian(p_start, (const UINT8 *)"Plain text", SMP_ENCRYT_DATA_SIZE);
+ smp_debug_print_nbyte_little_endian(key, (const UINT8 *)"Key", SMP_ENCRYT_KEY_SIZE);
+ smp_debug_print_nbyte_little_endian(p_start, (const UINT8 *)"Plain text", SMP_ENCRYT_DATA_SIZE);
p_rev_output = p;
aes_set_key(p_rev_key, SMP_ENCRYT_KEY_SIZE, &ctx);
aes_encrypt(p_rev_data, p, &ctx); /* outputs in byte 48 to byte 63 */
p = p_out->param_buf;
- REVERSE_ARRAY_TO_STREAM (p, p_rev_output, SMP_ENCRYT_DATA_SIZE);
- smp_debug_print_nbyte_little_endian(p_out->param_buf, (const UINT8 *)"Encrypted text", SMP_ENCRYT_KEY_SIZE);
+ REVERSE_ARRAY_TO_STREAM (p, p_rev_output, SMP_ENCRYT_DATA_SIZE);
+ smp_debug_print_nbyte_little_endian(p_out->param_buf, (const UINT8 *)"Encrypted text", SMP_ENCRYT_KEY_SIZE);
p_out->param_len = SMP_ENCRYT_KEY_SIZE;
p_out->status = HCI_SUCCESS;
- p_out->opcode = HCI_BLE_ENCRYPT;
+ p_out->opcode = HCI_BLE_ENCRYPT;
GKI_freebuf(p_start);
@@ -142,7 +142,7 @@ BOOLEAN smp_encrypt_data (UINT8 *key, UINT8 key_len,
** Function smp_generate_passkey
**
** Description This function is called to generate passkey.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -160,7 +160,7 @@ void smp_generate_passkey(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Function smp_proc_passkey
**
** Description This function is called to process a passkey.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -178,7 +178,7 @@ void smp_proc_passkey(tSMP_CB *p_cb , tBTM_RAND_ENC *p)
/* truncate by maximum value */
while (passkey > BTM_MAX_PASSKEY_VAL)
passkey >>= 1;
- SMP_TRACE_ERROR1("Passkey generated = %d", passkey);
+ SMP_TRACE_ERROR1("Passkey generated = %d", passkey);
/* save the TK */
memset(p_cb->tk, 0, BT_OCTET16_LEN);
@@ -192,7 +192,7 @@ void smp_proc_passkey(tSMP_CB *p_cb , tBTM_RAND_ENC *p)
(*p_cb->p_callback)(SMP_PASSKEY_NOTIF_EVT, p_cb->pairing_bda, (tSMP_EVT_DATA *)&passkey);
}
- smp_sm_event(p_cb, SMP_KEY_READY_EVT, (tSMP_INT_DATA *)&key);
+ smp_sm_event(p_cb, SMP_KEY_READY_EVT, (tSMP_INT_DATA *)&key);
}
@@ -200,8 +200,8 @@ void smp_proc_passkey(tSMP_CB *p_cb , tBTM_RAND_ENC *p)
**
** Function smp_generate_stk
**
-** Description This function is called to generate STK calculated by running
-** AES with the TK value as key and a concatenation of the random
+** Description This function is called to generate STK calculated by running
+** AES with the TK value as key and a concatenation of the random
** values.
**
** Returns void
@@ -231,8 +231,8 @@ void smp_generate_stk (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
/* generate STK = Etk(rand|rrand)*/
if (!SMP_Encrypt( p_cb->tk, BT_OCTET16_LEN, ptext, BT_OCTET16_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_generate_stk failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_stk failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -246,7 +246,7 @@ void smp_generate_stk (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to start the second pairing phase by
** start generating initializer random number.
-**
+**
**
** Returns void
**
@@ -265,12 +265,12 @@ void smp_generate_confirm (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to generate another 64 bits random for
** MRand or Srand.
-**
+**
** Returns void
**
*******************************************************************************/
void smp_genenrate_rand_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
-{
+{
SMP_TRACE_DEBUG0 ("smp_genenrate_rand_cont ");
p_cb->rand_enc_proc = SMP_GEN_SRAND_MRAND_CONT;
/* generate 64 MSB of MRand or SRand */
@@ -284,7 +284,7 @@ void smp_genenrate_rand_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to calculate LTK, starting with DIV
** generation.
-**
+**
**
** Returns void
**
@@ -317,7 +317,7 @@ void smp_generate_ltk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Function smp_compute_csrk
**
** Description This function is called to calculate CSRK
-**
+**
**
** Returns void
**
@@ -339,12 +339,12 @@ void smp_compute_csrk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
if (!SMP_Encrypt(er, BT_OCTET16_LEN, buffer, 4, &output))
{
- SMP_TRACE_ERROR0("smp_generate_csrk failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_csrk failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
- memcpy((void *)p_cb->csrk, output.param_buf, BT_OCTET16_LEN);
+ memcpy((void *)p_cb->csrk, output.param_buf, BT_OCTET16_LEN);
smp_send_csrk_info(p_cb, NULL);
}
}
@@ -355,7 +355,7 @@ void smp_compute_csrk(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called to calculate LTK, starting with DIV
** generation.
-**
+**
**
** Returns void
**
@@ -406,7 +406,7 @@ void smp_concatenate_local( tSMP_CB *p_cb, UINT8 **p_data, UINT8 op_code)
*******************************************************************************/
void smp_concatenate_peer( tSMP_CB *p_cb, UINT8 **p_data, UINT8 op_code)
{
- UINT8 *p = *p_data;
+ UINT8 *p = *p_data;
SMP_TRACE_DEBUG0 ("smp_concatenate_peer ");
UINT8_TO_STREAM(p, op_code);
@@ -423,9 +423,9 @@ void smp_concatenate_peer( tSMP_CB *p_cb, UINT8 **p_data, UINT8 op_code)
**
** Function smp_gen_p1_4_confirm
**
-** Description Generate Confirm/Compare Step1:
+** Description Generate Confirm/Compare Step1:
** p1 = pres || preq || rat' || iat'
-**
+**
** Returns void
**
*******************************************************************************/
@@ -474,9 +474,9 @@ void smp_gen_p1_4_confirm( tSMP_CB *p_cb, BT_OCTET16 p1)
**
** Function smp_gen_p2_4_confirm
**
-** Description Generate Confirm/Compare Step2:
+** Description Generate Confirm/Compare Step2:
** p2 = padding || ia || ra
-**
+**
** Returns void
**
*******************************************************************************/
@@ -511,7 +511,7 @@ void smp_gen_p2_4_confirm( tSMP_CB *p_cb, BT_OCTET16 p2)
** Function smp_calculate_comfirm
**
** Description This function is called to calculate Confirm value.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -533,8 +533,8 @@ void smp_calculate_comfirm (tSMP_CB *p_cb, BT_OCTET16 rand, BD_ADDR bda)
/* calculate e(k, r XOR p1), where k = TK */
if (!SMP_Encrypt(p_cb->tk, BT_OCTET16_LEN, p1, BT_OCTET16_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_generate_csrk failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_csrk failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -547,7 +547,7 @@ void smp_calculate_comfirm (tSMP_CB *p_cb, BT_OCTET16 rand, BD_ADDR bda)
**
** Description This function is called when SConfirm/MConfirm is generated
** proceed to send the Confirm request/response to peer device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -572,8 +572,8 @@ static void smp_calculate_comfirm_cont(tSMP_CB *p_cb, tSMP_ENC *p)
/* calculate: Confirm = E(k, p1' XOR p2) */
if (!SMP_Encrypt(p_cb->tk, BT_OCTET16_LEN, p2, BT_OCTET16_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_calculate_comfirm_cont failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_calculate_comfirm_cont failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -595,12 +595,12 @@ static void smp_calculate_comfirm_cont(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Description This function is called when a 48 bits random number is generated
** as SRand or MRand, continue to calculate Sconfirm or MConfirm.
-**
+**
** Returns void
**
*******************************************************************************/
static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
-{
+{
SMP_TRACE_DEBUG0 ("smp_genenrate_confirm ");
p_cb->rand_enc_proc = SMP_GEN_CONFIRM;
@@ -615,12 +615,12 @@ static void smp_genenrate_confirm(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Description This function is called to generate SConfirm for Slave device,
** or MSlave for Master device. This function can be also used for
** generating Compare number for confirm value check.
-**
+**
** Returns void
**
*******************************************************************************/
void smp_generate_compare (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
-{
+{
SMP_TRACE_DEBUG0 ("smp_generate_compare ");
p_cb->rand_enc_proc = SMP_GEN_COMPARE;
@@ -634,7 +634,7 @@ void smp_generate_compare (tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
**
** Description This function is called when SConfirm/MConfirm is generated
** proceed to send the Confirm request/response to peer device.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -659,7 +659,7 @@ static void smp_process_confirm(tSMP_CB *p_cb, tSMP_ENC *p)
#if (SMP_DEBUG == TRUE)
SMP_TRACE_DEBUG0("Confirm Generated");
smp_debug_print_nbyte_little_endian ((UINT8 *)p_cb->confirm, (const UINT8 *)"Confirm", 16);
-#endif
+#endif
key.key_type = SMP_KEY_TYPE_CFM;
key.p_data = p->param_buf;
@@ -670,9 +670,9 @@ static void smp_process_confirm(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Function smp_process_compare
**
-** Description This function is called when Compare is generated using the
+** Description This function is called when Compare is generated using the
** RRand and local BDA, TK information.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -697,7 +697,7 @@ static void smp_process_compare(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Description This function is called when STK is generated
** proceed to send the encrypt the link using STK.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -722,7 +722,7 @@ static void smp_process_stk(tSMP_CB *p_cb, tSMP_ENC *p)
** Function smp_genenrate_ltk_cont
**
** Description This function is to calculate LTK = d1(ER, DIV, 0)= e(ER, DIV)
-**
+**
** Returns void
**
*******************************************************************************/
@@ -736,17 +736,17 @@ static void smp_genenrate_ltk_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
BTM_GetDeviceEncRoot(er);
/* LTK = d1(ER, DIV, 0)= e(ER, DIV)*/
- if (!SMP_Encrypt(er, BT_OCTET16_LEN, (UINT8 *)&p_cb->div,
+ if (!SMP_Encrypt(er, BT_OCTET16_LEN, (UINT8 *)&p_cb->div,
sizeof(UINT16), &output))
{
- SMP_TRACE_ERROR0("smp_genenrate_ltk_cont failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_genenrate_ltk_cont failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
/* mask the LTK */
smp_mask_enc_key(p_cb->loc_enc_size, output.param_buf);
- memcpy((void *)p_cb->ltk, output.param_buf, BT_OCTET16_LEN);
+ memcpy((void *)p_cb->ltk, output.param_buf, BT_OCTET16_LEN);
smp_generate_rand_vector(p_cb, NULL);
}
@@ -757,12 +757,12 @@ static void smp_genenrate_ltk_cont(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
** Function smp_generate_y
**
** Description This function is to proceed generate Y = E(DHK, Rand)
-**
+**
** Returns void
**
*******************************************************************************/
static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
-{
+{
BT_OCTET16 dhk;
tSMP_ENC output;
tSMP_STATUS status = SMP_PAIR_FAIL_UNKNOWN;
@@ -771,11 +771,11 @@ static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
SMP_TRACE_DEBUG0 ("smp_generate_y ");
BTM_GetDeviceDHK(dhk);
- if (!SMP_Encrypt(dhk, BT_OCTET16_LEN, p_cb->enc_rand,
+ if (!SMP_Encrypt(dhk, BT_OCTET16_LEN, p_cb->enc_rand,
BT_OCTET8_LEN, &output))
{
- SMP_TRACE_ERROR0("smp_generate_y failed");
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
+ SMP_TRACE_ERROR0("smp_generate_y failed");
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &status);
}
else
{
@@ -788,7 +788,7 @@ static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p)
**
** Description This function is called when LTK is generated, send state machine
** event to SMP.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -807,7 +807,7 @@ static void smp_generate_rand_vector (tSMP_CB *p_cb, tSMP_INT_DATA *p)
** Function smp_genenrate_smp_process_edivltk_cont
**
** Description This function is to calculate EDIV = Y xor DIV
-**
+**
** Returns void
**
*******************************************************************************/
@@ -836,12 +836,12 @@ static void smp_process_ediv(tSMP_CB *p_cb, tSMP_ENC *p)
**
** Description This function is to process the rand command finished,
** process the random/encrypted number for further action.
-**
+**
** Returns void
**
*******************************************************************************/
static void smp_rand_back(tBTM_RAND_ENC *p)
-{
+{
tSMP_CB *p_cb = &smp_cb;
UINT8 *pp = p->param_buf;
UINT8 failure = SMP_PAIR_FAIL_UNKNOWN;
@@ -852,7 +852,7 @@ static void smp_rand_back(tBTM_RAND_ENC *p)
{
switch (state)
{
-
+
case SMP_GEN_SRAND_MRAND:
memcpy((void *)p_cb->rand, p->param_buf, p->param_len);
smp_genenrate_rand_cont(p_cb, NULL);
@@ -889,7 +889,7 @@ static void smp_rand_back(tBTM_RAND_ENC *p)
SMP_TRACE_ERROR1("smp_rand_back Key generation failed: (%d)", p_cb->rand_enc_proc);
- smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &failure);
+ smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &failure);
}
#endif
diff --git a/stack/smp/smp_l2c.c b/stack/smp/smp_l2c.c
index 36e6ee7..0356612 100644
--- a/stack/smp/smp_l2c.c
+++ b/stack/smp/smp_l2c.c
@@ -46,7 +46,7 @@ void smp_l2cap_if_init (void)
fixed_reg.pL2CA_FixedConn_Cb = smp_connect_cback;
fixed_reg.pL2CA_FixedData_Cb = smp_data_ind;
fixed_reg.default_idle_tout = 60; /* set 60 seconds timeout, 0xffff default idle timeout */
-
+
/* Now, register with L2CAP */
L2CA_RegisterFixedChannel (L2CAP_SMP_CID, &fixed_reg);
}
@@ -55,8 +55,8 @@ void smp_l2cap_if_init (void)
**
** Function smp_connect_cback
**
-** Description This callback function is called by L2CAP to indicate that
-** SMP channel is
+** Description This callback function is called by L2CAP to indicate that
+** SMP channel is
** connected (conn = TRUE)/disconnected (conn = FALSE).
**
*******************************************************************************/
@@ -70,7 +70,7 @@ static void smp_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason
if (memcmp(bd_addr, p_cb->pairing_bda, BD_ADDR_LEN) == 0)
{
SMP_TRACE_EVENT3 ("smp_connect_cback() for pairing BDA: %08x%04x Event: %s",
- (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8) + bd_addr[3],
+ (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8) + bd_addr[3],
(bd_addr[4]<<8)+bd_addr[5], (connected) ? "connected" : "disconnected");
if (connected)
@@ -80,13 +80,13 @@ static void smp_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason
p_cb->connect_initialized = TRUE;
/* initiating connection established */
p_cb->role = L2CA_GetBleConnRole(bd_addr);
-
+
/* initialize local i/r key to be default keys */
p_cb->loc_r_key = p_cb->loc_i_key = SMP_SEC_DEFAULT_KEY;
p_cb->loc_auth_req = p_cb->peer_auth_req = SMP_DEFAULT_AUTH_REQ;
p_cb->cb_evt = SMP_IO_CAP_REQ_EVT;
smp_sm_event(p_cb, SMP_L2CAP_CONN_EVT, NULL);
-
+
BTM_ReadConnectionAddr(p_cb->local_bda);
}
}
@@ -105,7 +105,7 @@ static void smp_connect_cback (BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason
**
** Description This function is called when data is received from L2CAP on
** SMP channel.
-**
+**
**
** Returns void
**
@@ -120,7 +120,7 @@ static void smp_data_ind (BD_ADDR bd_addr, BT_HDR *p_buf)
SMP_TRACE_EVENT0 ("Got smp_data_ind");
STREAM_TO_UINT8(cmd, p);
-
+
/* reject the pairing request if there is an on-going SMP pairing */
if (SMP_OPCODE_PAIRING_REQ == cmd || SMP_OPCODE_SEC_REQ == cmd)
@@ -138,10 +138,10 @@ static void smp_data_ind (BD_ADDR bd_addr, BT_HDR *p_buf)
}
if (memcmp(&bd_addr[0], p_cb->pairing_bda, BD_ADDR_LEN) == 0)
- {
+ {
btu_stop_timer (&p_cb->rsp_timer_ent);
smp_sm_event(p_cb, cmd, p);
- }
+ }
GKI_freebuf (p_buf);
}
diff --git a/stack/smp/smp_main.c b/stack/smp/smp_main.c
index 91d0989..1b67011 100644
--- a/stack/smp/smp_main.c
+++ b/stack/smp/smp_main.c
@@ -17,12 +17,12 @@
#include "smp_int.h"
-const char * const smp_state_name [] =
+const char * const smp_state_name [] =
{
"SMP_ST_IDLE",
"SMP_ST_WAIT_APP_RSP",
"SMP_ST_SEC_REQ_PENDING",
- "SMP_ST_PAIR_REQ_RSP",
+ "SMP_ST_PAIR_REQ_RSP",
"SMP_ST_WAIT_CONFIRM",
"SMP_ST_CONFIRM",
"SMP_ST_RAND",
@@ -31,29 +31,29 @@ const char * const smp_state_name [] =
"SMP_ST_RELEASE_DELAY",
"SMP_ST_MAX"
};
-const char * const smp_event_name [] =
+const char * const smp_event_name [] =
{
- "PAIRING_REQ_EVT",
- "PAIRING_RSP_EVT",
- "CONFIRM_EVT",
- "RAND_EVT",
- "PAIRING_FAILED_EVT",
- "ENC_INFO_EVT",
+ "PAIRING_REQ_EVT",
+ "PAIRING_RSP_EVT",
+ "CONFIRM_EVT",
+ "RAND_EVT",
+ "PAIRING_FAILED_EVT",
+ "ENC_INFO_EVT",
"MASTER_ID_EVT",
"ID_INFO_EVT",
"ID_ADDR_EVT",
"SIGN_INFO_EVT",
- "SECURITY_REQ_EVT",
- "KEY_READY_EVT",
- "ENCRYPTED_EVT",
- "L2CAP_CONN_EVT",
- "L2CAP_DISCONN_EVT",
- "API_IO_RSP_EVT",
- "API_SEC_GRANT_EVT",
- "TK_REQ_EVT",
- "AUTH_CMPL_EVT",
- "ENC_REQ_EVT",
- "BOND_REQ_EVT",
+ "SECURITY_REQ_EVT",
+ "KEY_READY_EVT",
+ "ENCRYPTED_EVT",
+ "L2CAP_CONN_EVT",
+ "L2CAP_DISCONN_EVT",
+ "API_IO_RSP_EVT",
+ "API_SEC_GRANT_EVT",
+ "TK_REQ_EVT",
+ "AUTH_CMPL_EVT",
+ "ENC_REQ_EVT",
+ "BOND_REQ_EVT",
"DISCARD_SEC_REQ_EVT",
"RELEASE_DELAY_EVT",
"RELEASE_DELAY_TOUT_EVT",
@@ -109,9 +109,9 @@ enum
SMP_SM_NO_ACTION
};
-static const tSMP_ACT smp_sm_action[] =
+static const tSMP_ACT smp_sm_action[] =
{
- smp_proc_sec_req,
+ smp_proc_sec_req,
smp_send_pair_req,
smp_send_pair_rsp,
smp_send_confirm,
@@ -194,11 +194,11 @@ static const UINT8 smp_ma_idle_table[][SMP_SM_NUM_COLS] = {
static const UINT8 smp_ma_wait_app_rsp_table[][SMP_SM_NUM_COLS] = {
/* Event Action Next State */
-/* SEC_GRANT */ { SMP_PROC_SEC_GRANT, SMP_SEND_APP_CBACK, SMP_ST_WAIT_APP_RSP},
+/* SEC_GRANT */ { SMP_PROC_SEC_GRANT, SMP_SEND_APP_CBACK, SMP_ST_WAIT_APP_RSP},
/* IO_RSP */ { SMP_SEND_PAIR_REQ, SMP_SM_NO_ACTION, SMP_ST_PAIR_REQ_RSP},
-/* KEY_READY */ { SMP_GENERATE_CONFIRM, SMP_SM_NO_ACTION, SMP_ST_WAIT_CONFIRM},/* TK ready */
-/* ENC_REQ */ { SMP_START_ENC, SMP_SM_NO_ACTION, SMP_ST_ENC_PENDING},/* start enc mode setup */
-/* DISCARD_SEC_REQ */ { SMP_PROC_DISCARD, SMP_SM_NO_ACTION, SMP_ST_IDLE}
+/* KEY_READY */ { SMP_GENERATE_CONFIRM, SMP_SM_NO_ACTION, SMP_ST_WAIT_CONFIRM},/* TK ready */
+/* ENC_REQ */ { SMP_START_ENC, SMP_SM_NO_ACTION, SMP_ST_ENC_PENDING},/* start enc mode setup */
+/* DISCARD_SEC_REQ */ { SMP_PROC_DISCARD, SMP_SM_NO_ACTION, SMP_ST_IDLE}
};
static const UINT8 smp_ma_pair_req_rsp_table [][SMP_SM_NUM_COLS] = {
@@ -250,7 +250,7 @@ static const UINT8 smp_ma_rel_delay_table[][SMP_SM_NUM_COLS] = {
/************ SMP Slave FSM State/Event Indirection Table **************/
static const UINT8 smp_sl_entry_map[][SMP_ST_MAX] =
{
-/* state name: Idle Wait SecReq Pair Wait Confirm Init Enc Bond Rel
+/* state name: Idle Wait SecReq Pair Wait Confirm Init Enc Bond Rel
AppRsp Pend ReqRsp Cfm Pend Pend Delay */
/* PAIR_REQ */ { 2, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
/* PAIR_RSP */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -380,20 +380,20 @@ void smp_set_state(tSMP_STATE state)
{
if (state < SMP_ST_MAX)
{
- SMP_TRACE_DEBUG4( "State change: %s(%d) ==> %s(%d)",
+ SMP_TRACE_DEBUG4( "State change: %s(%d) ==> %s(%d)",
smp_get_state_name(smp_cb.state), smp_cb.state,
- smp_get_state_name(state), state );
+ smp_get_state_name(state), state );
smp_cb.state = state;
}
else
{
- SMP_TRACE_DEBUG1("smp_set_state invalid state =%d", state );
+ SMP_TRACE_DEBUG1("smp_set_state invalid state =%d", state );
}
}
/*******************************************************************************
** Function smp_get_state
-** Returns The smp state
+** Returns The smp state
*******************************************************************************/
tSMP_STATE smp_get_state(void)
{
@@ -406,11 +406,11 @@ tSMP_STATE smp_get_state(void)
** Function smp_sm_event
**
** Description Handle events to the state machine. It looks up the entry
-** in the smp_entry_table array.
-** If it is a valid entry, it gets the state table.Set the next state,
-** if not NULL state.Execute the action function according to the
-** state table. If the state returned by action function is not NULL
-** state, adjust the new state to the returned state.If (api_evt != MAX),
+** in the smp_entry_table array.
+** If it is a valid entry, it gets the state table.Set the next state,
+** if not NULL state.Execute the action function according to the
+** state table. If the state returned by action function is not NULL
+** state, adjust the new state to the returned state.If (api_evt != MAX),
** call callback function.
**
** Returns void.
@@ -431,7 +431,7 @@ void smp_sm_event(tSMP_CB *p_cb, tSMP_EVENT event, void *p_data)
}
SMP_TRACE_DEBUG5( "SMP Role: %s State: [%s (%d)], Event: [%s (%d)]",\
- (p_cb->role == 0x01) ?"Slave" : "Master", smp_get_state_name( p_cb->state),
+ (p_cb->role == 0x01) ?"Slave" : "Master", smp_get_state_name( p_cb->state),
p_cb->state, smp_get_event_name(event), event) ;
/* look up the state table for the current state */
@@ -450,7 +450,7 @@ void smp_sm_event(tSMP_CB *p_cb, tSMP_EVENT event, void *p_data)
}
else
{
- SMP_TRACE_DEBUG4( "Ignore event [%s (%d)] in state [%s (%d)]",
+ SMP_TRACE_DEBUG4( "Ignore event [%s (%d)] in state [%s (%d)]",
smp_get_event_name(event), event, smp_get_state_name(curr_state), curr_state);
return;
}
@@ -489,7 +489,7 @@ const char * smp_get_state_name(tSMP_STATE state)
if (state < SMP_ST_MAX)
{
- p_str = smp_state_name[state];
+ p_str = smp_state_name[state];
}
return p_str;
}
diff --git a/stack/smp/smp_utils.c b/stack/smp/smp_utils.c
index 5065823..91e7057 100644
--- a/stack/smp/smp_utils.c
+++ b/stack/smp/smp_utils.c
@@ -475,7 +475,7 @@ void smp_mask_enc_key(UINT8 loc_enc_size, UINT8 * p_data)
**
** Description utility function to do an biteise exclusive-OR of two bit
** strings of the length of BT_OCTET16_LEN.
-**
+**
** Returns void
**
*******************************************************************************/
@@ -628,7 +628,7 @@ void smp_set_test_rand_value(BOOLEAN enable, UINT8 *p_c_val)
**
** Function smp_set_test_pair_fail_status
**
-** Description This function is called to set the test fairing fair status
+** Description This function is called to set the test fairing fair status
**
** Returns void
**