BLE: remove limitation in the Cordio to update adv payload

Nothing in the Bluetooth standard prevents update of advertising payload while advertising is active.
This limitation wasn't present in previous version of the stack and is not present for extended advertising.
pull/13039/head
Vincent Coubard 2020-05-29 17:48:22 +01:00
parent c7759fe505
commit 2bbc8a0bae
1 changed files with 7 additions and 10 deletions

View File

@ -140,17 +140,14 @@ void dmAdvActSetData(dmAdvMsg_t *pMsg)
DM_TRACE_INFO1("dmAdvActSetData: state: %d", dmAdvCb.advState[DM_ADV_HANDLE_DEFAULT]);
if (dmAdvCb.advState[DM_ADV_HANDLE_DEFAULT] == DM_ADV_STATE_IDLE)
/* set new data in HCI */
if (pMsg->apiSetData.location == DM_DATA_LOC_ADV)
{
/* set new data in HCI */
if (pMsg->apiSetData.location == DM_DATA_LOC_ADV)
{
HciLeSetAdvDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
}
else
{
HciLeSetScanRespDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
}
HciLeSetAdvDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
}
else
{
HciLeSetScanRespDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
}
}