BLE: Set host default version to 5.1

Disable 5.2 event handling if not enabled.
pull/13811/head
Vincent Coubard 2020-10-27 14:36:59 +00:00
parent 87ea47f211
commit ad37f560c2
2 changed files with 13 additions and 25 deletions

View File

@ -217,7 +217,7 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] =
hciEvtParseLeConnCteReqEnableCmdCmpl,
hciEvtParseLeConnCteRspEnableCmdCmpl,
hciEvtParseLeReadAntennaInfoCmdCmpl,
#if 0
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
hciEvtParseLeCisEst,
hciEvtParseLeCisReq,
hciEvtParseDisconnectCmpl,
@ -236,26 +236,7 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] =
hciEvtParseLeBigSyncLost,
hciEvtParseLeBigTermSyncCmpl,
hciEvtParseLeBigInfoAdvRpt
#else
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
#endif
#endif // HCI_VER_BT_CORE_SPEC_5_2
};
/* HCI event structure length table, indexed by internal callback event value */
@ -329,6 +310,7 @@ static const uint8_t hciEvtCbackLen[] =
sizeof(hciLeConnCteReqEnableCmdCmplEvt_t),
sizeof(hciLeConnCteRspEnableCmdCmplEvt_t),
sizeof(hciLeReadAntennaInfoCmdCmplEvt_t),
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
sizeof(HciLeCisEstEvt_t),
sizeof(HciLeCisReqEvt_t),
sizeof(hciDisconnectCmplEvt_t),
@ -347,6 +329,7 @@ static const uint8_t hciEvtCbackLen[] =
sizeof(HciLeBigSyncLostEvt_t),
sizeof(HciLeBigTermSyncCmplEvt_t),
sizeof(HciLeBigInfoAdvRptEvt_t)
#endif
};
/* Global event statistics. */
@ -2604,7 +2587,7 @@ void hciEvtProcessCmdCmpl(uint8_t *p, uint8_t len)
cbackEvt = HCI_LE_PER_ADV_SET_INFO_TRSF_CMD_CMPL_CBACK_EVT;
break;
#if 0
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
case HCI_OPCODE_LE_SET_CIG_PARAMS:
cbackEvt = HCI_LE_SET_CIG_PARAMS_CMD_CMPL_CBACK_EVT;
break;
@ -2874,7 +2857,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
cbackEvt = HCI_LE_CTE_REQ_FAILED_CBACK_EVT;
break;
#if 0
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
case HCI_LE_CIS_EST_EVT:
/* if CIS connection created successfully */
if (*pEvt == HCI_SUCCESS)
@ -2924,7 +2907,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
/* if disconnect is for CIS connection */
BYTES_TO_UINT16(handle, (pEvt + 1));
#if 0
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
if (hciCoreCisByHandle(handle) != NULL)
{
cbackEvt = HCI_CIS_DISCONNECT_CMPL_CBACK_EVT;
@ -3018,7 +3001,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
BYTES_TO_UINT16(handle, (pEvt + 1));
hciCoreConnClose(handle);
}
#if 0
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
else if (cbackEvt == HCI_CIS_DISCONNECT_CMPL_CBACK_EVT)
{
BYTES_TO_UINT16(handle, (pEvt + 1));

View File

@ -1421,6 +1421,11 @@ extern "C" {
#define HCI_VER_BT_CORE_SPEC_5_2 0x0B /*!< Bluetooth core specification 5.2 */
/**@}*/
#ifndef HCI_VER_BT
#define HCI_VER_BT HCI_VER_BT_CORE_SPEC_5_1
#endif
/** \name Parameter lengths
*
*/