Bluetooth: controller: Remove redundant flags for advertising set

There's not need to mark advertising set as created by either legacy
or advertising command since this is determined by current so-called
HCI advertising mode which determines whether host uses legacy or
extended advertising commands.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This commit is contained in:
Andrzej Kaczmarek 2020-06-30 14:43:02 +02:00 committed by Carles Cufí
commit c6db3c275a
7 changed files with 27 additions and 40 deletions

View file

@ -15,6 +15,7 @@
#include "util/memq.h"
#include "pdu.h"
#include "ll.h"
#include "lll.h"
#include "lll_adv.h"
@ -52,14 +53,10 @@ uint8_t *ll_addr_get(uint8_t addr_type, uint8_t *bdaddr)
uint8_t ll_addr_set(uint8_t addr_type, uint8_t const *const bdaddr)
{
if (IS_ENABLED(CONFIG_BT_BROADCASTER)) {
uint32_t status = ull_adv_is_enabled(0);
#if defined(CONFIG_BT_CTLR_ADV_EXT)
if ((status & (ULL_ADV_ENABLED_BITMASK_ENABLED |
ULL_ADV_ENABLED_BITMASK_EXTENDED)) ==
ULL_ADV_ENABLED_BITMASK_ENABLED) {
if (ull_adv_is_enabled(0) && !ll_adv_cmds_is_ext()) {
#else /* !CONFIG_BT_CTLR_ADV_EXT */
if (status) {
if (ull_adv_is_enabled(0)) {
#endif /* !CONFIG_BT_CTLR_ADV_EXT */
return BT_HCI_ERR_CMD_DISALLOWED;
}