Skip to content

Commit f858000

Browse files
authored
Merge pull request #13039 from pan-/fix-legacy-payload-update
BLE: remove limitation in the Cordio to update adv payload
2 parents 2466411 + 2bbc8a0 commit f858000

File tree

1 file changed

+7
-10
lines changed
  • features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/dm

1 file changed

+7
-10
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/dm/dm_adv_leg.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,14 @@ void dmAdvActSetData(dmAdvMsg_t *pMsg)
140140

141141
DM_TRACE_INFO1("dmAdvActSetData: state: %d", dmAdvCb.advState[DM_ADV_HANDLE_DEFAULT]);
142142

143-
if (dmAdvCb.advState[DM_ADV_HANDLE_DEFAULT] == DM_ADV_STATE_IDLE)
143+
/* set new data in HCI */
144+
if (pMsg->apiSetData.location == DM_DATA_LOC_ADV)
144145
{
145-
/* set new data in HCI */
146-
if (pMsg->apiSetData.location == DM_DATA_LOC_ADV)
147-
{
148-
HciLeSetAdvDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
149-
}
150-
else
151-
{
152-
HciLeSetScanRespDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
153-
}
146+
HciLeSetAdvDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
147+
}
148+
else
149+
{
150+
HciLeSetScanRespDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
154151
}
155152
}
156153

0 commit comments

Comments
 (0)