Skip to content

Commit 71ed27e

Browse files
pan-Cruz Monrreal II
authored andcommitted
BLE: Fix the number of advertising sets supported
The number of advertising sets supported is the minimum of advertising sets supported beween the host and the controller.
1 parent 744ef59 commit 71ed27e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioPalGap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ uint16_t Gap::get_maximum_advertising_data_length()
923923

924924
uint8_t Gap::get_max_number_of_advertising_sets()
925925
{
926-
return HciGetNumSupAdvSets();
926+
return std::min(HciGetNumSupAdvSets(), (uint8_t) DM_NUM_ADV_SETS);
927927
}
928928

929929
ble_error_t Gap::remove_advertising_set(advertising_handle_t advertising_handle)

0 commit comments

Comments
 (0)