Bluetooth: host: Skip feature testing when legacy adv is disabled

Skip feature testing of controller features when legacy advertising
commands are not supported. For combined builds or builds where the
capability of the controller is known it is not required to have runtime
check of controller extended advertising support.

This gives the following size reduction for hci_core.c:

Without legacy support
hci_core.c  19980     7.75%
total      257679

With legacy support
hci_core.c  21816     8.41%
total      259519

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2020-03-23 17:17:44 +01:00 committed by Johan Hedberg
commit 0e3586c375

View file

@ -46,6 +46,11 @@
#include "crypto.h" #include "crypto.h"
#include "settings.h" #include "settings.h"
#if !defined(CONFIG_BT_EXT_ADV_LEGACY_SUPPORT)
#undef BT_FEAT_LE_EXT_ADV
#define BT_FEAT_LE_EXT_ADV(feat) 1
#endif
/* Peripheral timeout to initialize Connection Parameter Update procedure */ /* Peripheral timeout to initialize Connection Parameter Update procedure */
#define CONN_UPDATE_TIMEOUT K_MSEC(CONFIG_BT_CONN_PARAM_UPDATE_TIMEOUT) #define CONN_UPDATE_TIMEOUT K_MSEC(CONFIG_BT_CONN_PARAM_UPDATE_TIMEOUT)
#define RPA_TIMEOUT K_SECONDS(CONFIG_BT_RPA_TIMEOUT) #define RPA_TIMEOUT K_SECONDS(CONFIG_BT_RPA_TIMEOUT)