component/bt: fixed the set static random address error.

This commit is contained in:
Yulong 2017-05-23 07:48:45 -04:00
parent 8ae0eb059e
commit 2567696cc3

View file

@ -640,7 +640,8 @@ static void btc_ble_set_rand_addr (BD_ADDR rand_addr)
param.set_rand_addr_cmpl.status = ESP_BT_STATUS_SUCCESS;
if (rand_addr != NULL) {
if(rand_addr[BD_ADDR_LEN - 1] & BT_STATIC_RAND_ADDR_MASK) {
if((rand_addr[BD_ADDR_LEN - 1] & BT_STATIC_RAND_ADDR_MASK)
== BT_STATIC_RAND_ADDR_MASK) {
BTA_DmSetRandAddress(rand_addr);
} else {
param.set_rand_addr_cmpl.status = ESP_BT_STATUS_INVALID_STATIC_RAND_ADDR;