Merge branch 'bugfix/btdm_fix_iphoneX_error_when_get_wifi_list' into 'master'

Component/bt: fix iPhoneX error when getting wifi list

See merge request idf/esp-idf!3303
This commit is contained in:
Jiang Jiang Jian 2018-09-20 10:54:43 +08:00
commit ffbe5b7ae5
2 changed files with 2 additions and 1 deletions

View File

@ -206,7 +206,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
break;
case BTA_GATTS_MTU_EVT:
BLUFI_TRACE_DEBUG("MTU size %d\n", p_data->req_data.p_data->mtu);
blufi_env.frag_size = p_data->req_data.p_data->mtu - BLUFI_MTU_RESERVED_SIZE;
blufi_env.frag_size = (p_data->req_data.p_data->mtu < BLUFI_MAX_DATA_LEN ? p_data->req_data.p_data->mtu : BLUFI_MAX_DATA_LEN) - BLUFI_MTU_RESERVED_SIZE;
break;
case BTA_GATTS_CONF_EVT:
BLUFI_TRACE_DEBUG("CONFIRM EVT\n");

View File

@ -72,6 +72,7 @@ typedef struct blufi_frag_hdr blufi_frag_hdr_t;
#define BLUFI_DATA_SEC_MODE_ENC_MASK 0x02
#define BLUFI_CTRL_SEC_MODE_CHECK_MASK 0x10
#define BLUFI_CTRL_SEC_MODE_ENC_MASK 0x20
#define BLUFI_MAX_DATA_LEN 255
// packet type
#define BLUFI_TYPE_MASK 0x03