Skip to content

Commit fbd7ace

Browse files
HaavardReikartben
authored andcommitted
Bluetooth: Host: Remove deprecated device name API
Removes the BT_LE_ADV_OPT_USE_NAME and BT_LE_ADV_OPT_FORCE_NAME_IN_AD advertiser options and related flags, macros and functions. The application now needs to include the device name explicitly. The API was deprecated in #71700 Signed-off-by: Håvard Reierstad <[email protected]>
1 parent 8522f51 commit fbd7ace

File tree

3 files changed

+6
-257
lines changed

3 files changed

+6
-257
lines changed

include/zephyr/bluetooth/bluetooth.h

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -783,32 +783,6 @@ enum bt_le_adv_opt {
783783
*/
784784
BT_LE_ADV_OPT_USE_IDENTITY = BIT(2),
785785

786-
/**
787-
* @deprecated This option will be removed in the near future, see
788-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
789-
*
790-
* @brief Advertise using GAP device name.
791-
*
792-
* Include the GAP device name automatically when advertising.
793-
* By default the GAP device name is put at the end of the scan
794-
* response data.
795-
* When advertising using @ref BT_LE_ADV_OPT_EXT_ADV and not
796-
* @ref BT_LE_ADV_OPT_SCANNABLE then it will be put at the end of the
797-
* advertising data.
798-
* If the GAP device name does not fit into advertising data it will be
799-
* converted to a shortened name if possible.
800-
* @ref BT_LE_ADV_OPT_FORCE_NAME_IN_AD can be used to force the device
801-
* name to appear in the advertising data of an advert with scan
802-
* response data.
803-
*
804-
* The application can set the device name itself by including the
805-
* following in the advertising data.
806-
* @code
807-
* BT_DATA(BT_DATA_NAME_COMPLETE, name, sizeof(name) - 1)
808-
* @endcode
809-
*/
810-
BT_LE_ADV_OPT_USE_NAME = BIT(3),
811-
812786
/**
813787
* @brief Low duty cycle directed advertising.
814788
*
@@ -931,19 +905,6 @@ enum bt_le_adv_opt {
931905
/** Disable advertising on channel index 39. */
932906
BT_LE_ADV_OPT_DISABLE_CHAN_39 = BIT(17),
933907

934-
/**
935-
* @deprecated This option will be removed in the near future, see
936-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
937-
*
938-
* @brief Put GAP device name into advert data
939-
*
940-
* Will place the GAP device name into the advertising data rather than
941-
* the scan response data.
942-
*
943-
* @note Requires @ref BT_LE_ADV_OPT_USE_NAME
944-
*/
945-
BT_LE_ADV_OPT_FORCE_NAME_IN_AD = BIT(18),
946-
947908
/**
948909
* @brief Advertise using a Non-Resolvable Private Address.
949910
*
@@ -1271,27 +1232,6 @@ struct bt_le_per_adv_param {
12711232

12721233
#define BT_LE_ADV_CONN_ONE_TIME BT_LE_ADV_CONN_FAST_2 __DEPRECATED_MACRO
12731234

1274-
/**
1275-
* @deprecated This macro will be removed in the near future, see
1276-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
1277-
*/
1278-
#define BT_LE_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
1279-
BT_LE_ADV_OPT_USE_NAME, \
1280-
BT_GAP_ADV_FAST_INT_MIN_2, \
1281-
BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1282-
__DEPRECATED_MACRO
1283-
1284-
/**
1285-
* @deprecated This macro will be removed in the near future, see
1286-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
1287-
*/
1288-
#define BT_LE_ADV_CONN_NAME_AD BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
1289-
BT_LE_ADV_OPT_USE_NAME | \
1290-
BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \
1291-
BT_GAP_ADV_FAST_INT_MIN_2, \
1292-
BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1293-
__DEPRECATED_MACRO
1294-
12951235
#define BT_LE_ADV_CONN_DIR_LOW_DUTY(_peer) \
12961236
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_DIR_MODE_LOW_DUTY, \
12971237
BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, _peer)
@@ -1300,17 +1240,6 @@ struct bt_le_per_adv_param {
13001240
#define BT_LE_ADV_NCONN BT_LE_ADV_PARAM(0, BT_GAP_ADV_FAST_INT_MIN_2, \
13011241
BT_GAP_ADV_FAST_INT_MAX_2, NULL)
13021242

1303-
/**
1304-
* @deprecated This macro will be removed in the near future, see
1305-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
1306-
*
1307-
* Non-connectable advertising with @ref BT_LE_ADV_OPT_USE_NAME
1308-
*/
1309-
#define BT_LE_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_NAME, \
1310-
BT_GAP_ADV_FAST_INT_MIN_2, \
1311-
BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1312-
__DEPRECATED_MACRO
1313-
13141243
/** Non-connectable advertising with @ref BT_LE_ADV_OPT_USE_IDENTITY */
13151244
#define BT_LE_ADV_NCONN_IDENTITY BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_IDENTITY, \
13161245
BT_GAP_ADV_FAST_INT_MIN_2, \
@@ -1322,59 +1251,18 @@ struct bt_le_per_adv_param {
13221251
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, \
13231252
BT_GAP_ADV_FAST_INT_MAX_2, NULL)
13241253

1325-
/**
1326-
* @deprecated This macro will be removed in the near future, see
1327-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
1328-
*
1329-
* Connectable extended advertising with @ref BT_LE_ADV_OPT_USE_NAME
1330-
*/
1331-
#define BT_LE_EXT_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1332-
BT_LE_ADV_OPT_CONNECTABLE | \
1333-
BT_LE_ADV_OPT_USE_NAME, \
1334-
BT_GAP_ADV_FAST_INT_MIN_2, \
1335-
BT_GAP_ADV_FAST_INT_MAX_2, \
1336-
NULL) \
1337-
__DEPRECATED_MACRO
1338-
13391254
/** Scannable extended advertising */
13401255
#define BT_LE_EXT_ADV_SCAN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
13411256
BT_LE_ADV_OPT_SCANNABLE, \
13421257
BT_GAP_ADV_FAST_INT_MIN_2, \
13431258
BT_GAP_ADV_FAST_INT_MAX_2, \
13441259
NULL)
13451260

1346-
/**
1347-
* @deprecated This macro will be removed in the near future, see
1348-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
1349-
*
1350-
* Scannable extended advertising with @ref BT_LE_ADV_OPT_USE_NAME
1351-
*/
1352-
#define BT_LE_EXT_ADV_SCAN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1353-
BT_LE_ADV_OPT_SCANNABLE | \
1354-
BT_LE_ADV_OPT_USE_NAME, \
1355-
BT_GAP_ADV_FAST_INT_MIN_2, \
1356-
BT_GAP_ADV_FAST_INT_MAX_2, \
1357-
NULL) \
1358-
__DEPRECATED_MACRO
1359-
13601261
/** Non-connectable extended advertising with private address */
13611262
#define BT_LE_EXT_ADV_NCONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV, \
13621263
BT_GAP_ADV_FAST_INT_MIN_2, \
13631264
BT_GAP_ADV_FAST_INT_MAX_2, NULL)
13641265

1365-
/**
1366-
* @deprecated This macro will be removed in the near future, see
1367-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
1368-
*
1369-
* Non-connectable extended advertising with @ref BT_LE_ADV_OPT_USE_NAME
1370-
*/
1371-
#define BT_LE_EXT_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
1372-
BT_LE_ADV_OPT_USE_NAME, \
1373-
BT_GAP_ADV_FAST_INT_MIN_2, \
1374-
BT_GAP_ADV_FAST_INT_MAX_2, \
1375-
NULL) \
1376-
__DEPRECATED_MACRO
1377-
13781266
/** Non-connectable extended advertising with @ref BT_LE_ADV_OPT_USE_IDENTITY */
13791267
#define BT_LE_EXT_ADV_NCONN_IDENTITY \
13801268
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | \
@@ -1389,20 +1277,6 @@ struct bt_le_per_adv_param {
13891277
BT_GAP_ADV_FAST_INT_MAX_2, \
13901278
NULL)
13911279

1392-
/**
1393-
* @deprecated This macro will be removed in the near future, see
1394-
* https://github.com/zephyrproject-rtos/zephyr/issues/71686
1395-
*
1396-
* Non-connectable extended advertising on coded PHY with
1397-
* @ref BT_LE_ADV_OPT_USE_NAME
1398-
*/
1399-
#define BT_LE_EXT_ADV_CODED_NCONN_NAME \
1400-
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED | \
1401-
BT_LE_ADV_OPT_USE_NAME, \
1402-
BT_GAP_ADV_FAST_INT_MIN_2, \
1403-
BT_GAP_ADV_FAST_INT_MAX_2, NULL) \
1404-
__DEPRECATED_MACRO
1405-
14061280
/** Non-connectable extended advertising on coded PHY with
14071281
* @ref BT_LE_ADV_OPT_USE_IDENTITY
14081282
*/
@@ -1685,10 +1559,6 @@ int bt_le_ext_adv_set_data(struct bt_le_ext_adv *adv,
16851559
* advertiser set is currently advertising. Stop the advertising set before
16861560
* calling this function.
16871561
*
1688-
* @note When changing the option @ref BT_LE_ADV_OPT_USE_NAME then
1689-
* @ref bt_le_ext_adv_set_data needs to be called in order to update the
1690-
* advertising data and scan response data.
1691-
*
16921562
* @param adv Advertising set object.
16931563
* @param param Advertising parameters.
16941564
*

0 commit comments

Comments
 (0)