system/bt
Révision | 4276bf0242c5ec1022ae6c9e87f19554ab915b3f (tree) |
---|---|
l'heure | 2018-06-12 15:32:03 |
Auteur | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Avoid annoying crashing on VMware
@@ -307,13 +307,11 @@ static uint8_t* get_local_supported_codecs(uint8_t* number_of_codecs) { | ||
307 | 307 | |
308 | 308 | static const bt_device_features_t* get_features_ble(void) { |
309 | 309 | CHECK(readable); |
310 | - CHECK(ble_supported); | |
311 | 310 | return &features_ble; |
312 | 311 | } |
313 | 312 | |
314 | 313 | static const uint8_t* get_ble_supported_states(void) { |
315 | 314 | CHECK(readable); |
316 | - CHECK(ble_supported); | |
317 | 315 | return ble_supported_states; |
318 | 316 | } |
319 | 317 |
@@ -374,50 +372,42 @@ static bool supports_ble(void) { | ||
374 | 372 | |
375 | 373 | static bool supports_ble_privacy(void) { |
376 | 374 | CHECK(readable); |
377 | - CHECK(ble_supported); | |
378 | 375 | return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array); |
379 | 376 | } |
380 | 377 | |
381 | 378 | static bool supports_ble_set_privacy_mode() { |
382 | 379 | CHECK(readable); |
383 | - CHECK(ble_supported); | |
384 | 380 | return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array) && |
385 | 381 | HCI_LE_SET_PRIVACY_MODE_SUPPORTED(supported_commands); |
386 | 382 | } |
387 | 383 | |
388 | 384 | static bool supports_ble_packet_extension(void) { |
389 | 385 | CHECK(readable); |
390 | - CHECK(ble_supported); | |
391 | 386 | return HCI_LE_DATA_LEN_EXT_SUPPORTED(features_ble.as_array); |
392 | 387 | } |
393 | 388 | |
394 | 389 | static bool supports_ble_connection_parameters_request(void) { |
395 | 390 | CHECK(readable); |
396 | - CHECK(ble_supported); | |
397 | 391 | return HCI_LE_CONN_PARAM_REQ_SUPPORTED(features_ble.as_array); |
398 | 392 | } |
399 | 393 | |
400 | 394 | static bool supports_ble_2m_phy(void) { |
401 | 395 | CHECK(readable); |
402 | - CHECK(ble_supported); | |
403 | 396 | return HCI_LE_2M_PHY_SUPPORTED(features_ble.as_array); |
404 | 397 | } |
405 | 398 | |
406 | 399 | static bool supports_ble_coded_phy(void) { |
407 | 400 | CHECK(readable); |
408 | - CHECK(ble_supported); | |
409 | 401 | return HCI_LE_CODED_PHY_SUPPORTED(features_ble.as_array); |
410 | 402 | } |
411 | 403 | |
412 | 404 | static bool supports_ble_extended_advertising(void) { |
413 | 405 | CHECK(readable); |
414 | - CHECK(ble_supported); | |
415 | 406 | return HCI_LE_EXTENDED_ADVERTISING_SUPPORTED(features_ble.as_array); |
416 | 407 | } |
417 | 408 | |
418 | 409 | static bool supports_ble_periodic_advertising(void) { |
419 | 410 | CHECK(readable); |
420 | - CHECK(ble_supported); | |
421 | 411 | return HCI_LE_PERIODIC_ADVERTISING_SUPPORTED(features_ble.as_array); |
422 | 412 | } |
423 | 413 |
@@ -428,7 +418,6 @@ static uint16_t get_acl_data_size_classic(void) { | ||
428 | 418 | |
429 | 419 | static uint16_t get_acl_data_size_ble(void) { |
430 | 420 | CHECK(readable); |
431 | - CHECK(ble_supported); | |
432 | 421 | return acl_data_size_ble; |
433 | 422 | } |
434 | 423 |
@@ -444,19 +433,16 @@ static uint16_t get_acl_packet_size_ble(void) { | ||
444 | 433 | |
445 | 434 | static uint16_t get_ble_suggested_default_data_length(void) { |
446 | 435 | CHECK(readable); |
447 | - CHECK(ble_supported); | |
448 | 436 | return ble_suggested_default_data_length; |
449 | 437 | } |
450 | 438 | |
451 | 439 | static uint16_t get_ble_maxium_advertising_data_length(void) { |
452 | 440 | CHECK(readable); |
453 | - CHECK(ble_supported); | |
454 | 441 | return ble_maxium_advertising_data_length; |
455 | 442 | } |
456 | 443 | |
457 | 444 | static uint8_t get_ble_number_of_supported_advertising_sets(void) { |
458 | 445 | CHECK(readable); |
459 | - CHECK(ble_supported); | |
460 | 446 | return ble_number_of_supported_advertising_sets; |
461 | 447 | } |
462 | 448 |
@@ -467,19 +453,16 @@ static uint16_t get_acl_buffer_count_classic(void) { | ||
467 | 453 | |
468 | 454 | static uint8_t get_acl_buffer_count_ble(void) { |
469 | 455 | CHECK(readable); |
470 | - CHECK(ble_supported); | |
471 | 456 | return acl_buffer_count_ble; |
472 | 457 | } |
473 | 458 | |
474 | 459 | static uint8_t get_ble_white_list_size(void) { |
475 | 460 | CHECK(readable); |
476 | - CHECK(ble_supported); | |
477 | 461 | return ble_white_list_size; |
478 | 462 | } |
479 | 463 | |
480 | 464 | static uint8_t get_ble_resolving_list_max_size(void) { |
481 | 465 | CHECK(readable); |
482 | - CHECK(ble_supported); | |
483 | 466 | return ble_resolving_list_max_size; |
484 | 467 | } |
485 | 468 |
@@ -489,7 +472,6 @@ static void set_ble_resolving_list_max_size(int resolving_list_max_size) { | ||
489 | 472 | if (resolving_list_max_size != 0) { |
490 | 473 | CHECK(readable); |
491 | 474 | } |
492 | - CHECK(ble_supported); | |
493 | 475 | ble_resolving_list_max_size = resolving_list_max_size; |
494 | 476 | } |
495 | 477 |