mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-19 00:09:58 +00:00
Merge branch 'nimble/set_wl_packet_length' into 'nimble-1.3.0-idf'
NimBLE: Sync packet length API and whitelist API changes with upstream NimBLE See merge request espressif/esp-nimble!98
This commit is contained in:
@@ -1821,6 +1821,22 @@ int ble_gap_wl_tx_rmv(const ble_addr_t *addrs);
|
||||
int ble_gap_update_params(uint16_t conn_handle,
|
||||
const struct ble_gap_upd_params *params);
|
||||
|
||||
/**
|
||||
* Configure LE Data Length in controller (OGF = 0x08, OCF = 0x0022).
|
||||
*
|
||||
* @param conn_handle Connection handle.
|
||||
* @param tx_octets The preferred value of payload octets that the Controller
|
||||
* should use for a new connection (Range
|
||||
* 0x001B-0x00FB).
|
||||
* @param tx_time The preferred maximum number of microseconds that the local Controller
|
||||
* should use to transmit a single link layer packet
|
||||
* (Range 0x0148-0x4290).
|
||||
*
|
||||
* @return 0 on success,
|
||||
* other error code on failure.
|
||||
*/
|
||||
int ble_gap_set_data_len(uint16_t conn_handle, uint16_t tx_octets, uint16_t tx_time);
|
||||
|
||||
/**
|
||||
* Initiates the GAP security procedure.
|
||||
*
|
||||
|
||||
@@ -2246,11 +2246,6 @@ ble_gap_wl_set(const ble_addr_t *addrs, uint8_t white_list_count)
|
||||
|
||||
ble_hs_lock();
|
||||
|
||||
if (white_list_count == 0) {
|
||||
rc = BLE_HS_EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (i = 0; i < white_list_count; i++) {
|
||||
if (addrs[i].type != BLE_ADDR_PUBLIC &&
|
||||
addrs[i].type != BLE_ADDR_RANDOM) {
|
||||
@@ -5617,6 +5612,11 @@ done:
|
||||
#endif
|
||||
}
|
||||
|
||||
int ble_gap_set_data_len(uint16_t conn_handle, uint16_t tx_octets, uint16_t tx_time)
|
||||
{
|
||||
return ble_hs_hci_util_set_data_len(conn_handle, tx_octets, tx_time);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* $security *
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -449,9 +449,10 @@ TEST_CASE_SELF(ble_gap_test_case_wl_bad_args)
|
||||
|
||||
ble_gap_test_util_init();
|
||||
|
||||
/*** 0 white list entries. */
|
||||
/*** 0 white list entries. This is acceptable now with the wl_set API
|
||||
* change. */
|
||||
rc = ble_hs_test_util_wl_set(NULL, 0, 0, 0);
|
||||
TEST_ASSERT(rc == BLE_HS_EINVAL);
|
||||
TEST_ASSERT(rc == 0);
|
||||
|
||||
/*** Invalid address type. */
|
||||
rc = ble_hs_test_util_wl_set(
|
||||
|
||||
Reference in New Issue
Block a user