Bluetooth: controller: Fix error code on invalid adv set handle
Proper error code should be returned if advertising set with given handle does not exist instead of generic "invalid parameters" one. Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This commit is contained in:
parent
5f8dd00a6a
commit
c088b02872
2 changed files with 5 additions and 5 deletions
|
@ -57,7 +57,7 @@ uint8_t ll_adv_aux_random_addr_set(uint8_t handle, uint8_t const *const addr)
|
|||
|
||||
adv = ull_adv_is_created_get(handle);
|
||||
if (!adv) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
return BT_HCI_ERR_UNKNOWN_ADV_IDENTIFIER;
|
||||
}
|
||||
|
||||
/* TODO: Fail if connectable advertising is enabled */
|
||||
|
@ -117,7 +117,7 @@ uint8_t ll_adv_aux_ad_data_set(uint8_t handle, uint8_t op, uint8_t frag_pref, ui
|
|||
/* Get the advertising set instance */
|
||||
adv = ull_adv_is_created_get(handle);
|
||||
if (!adv) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
return BT_HCI_ERR_UNKNOWN_ADV_IDENTIFIER;
|
||||
}
|
||||
|
||||
lll = &adv->lll;
|
||||
|
@ -517,7 +517,7 @@ uint8_t ll_adv_aux_sr_data_set(uint8_t handle, uint8_t op, uint8_t frag_pref, ui
|
|||
/* Get the advertising set instance */
|
||||
adv = ull_adv_is_created_get(handle);
|
||||
if (!adv) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
return BT_HCI_ERR_UNKNOWN_ADV_IDENTIFIER;
|
||||
}
|
||||
|
||||
lll = &adv->lll;
|
||||
|
|
|
@ -67,7 +67,7 @@ uint8_t ll_adv_sync_param_set(uint8_t handle, uint16_t interval, uint16_t flags)
|
|||
|
||||
adv = ull_adv_is_created_get(handle);
|
||||
if (!adv) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
return BT_HCI_ERR_UNKNOWN_ADV_IDENTIFIER;
|
||||
}
|
||||
|
||||
lll_sync = adv->lll.sync;
|
||||
|
@ -532,7 +532,7 @@ uint8_t ll_adv_sync_enable(uint8_t handle, uint8_t enable)
|
|||
|
||||
adv = ull_adv_is_created_get(handle);
|
||||
if (!adv) {
|
||||
return BT_HCI_ERR_CMD_DISALLOWED;
|
||||
return BT_HCI_ERR_UNKNOWN_ADV_IDENTIFIER;
|
||||
}
|
||||
|
||||
lll_sync = adv->lll.sync;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue