修訂 | d03a9a91a0892b8affb3464a38c56ce9475c0892 (tree) |
---|---|
時間 | 2022-03-14 05:41:49 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Mauro Rossi |
Avoid annoying crashing on VMware
@@ -332,13 +332,11 @@ static uint8_t* get_local_supported_codecs(uint8_t* number_of_codecs) { | ||
332 | 332 | |
333 | 333 | static const bt_device_features_t* get_features_ble(void) { |
334 | 334 | CHECK(readable); |
335 | - CHECK(ble_supported); | |
336 | 335 | return &features_ble; |
337 | 336 | } |
338 | 337 | |
339 | 338 | static const uint8_t* get_ble_supported_states(void) { |
340 | 339 | CHECK(readable); |
341 | - CHECK(ble_supported); | |
342 | 340 | return ble_supported_states; |
343 | 341 | } |
344 | 342 |
@@ -399,50 +397,42 @@ static bool supports_ble(void) { | ||
399 | 397 | |
400 | 398 | static bool supports_ble_privacy(void) { |
401 | 399 | CHECK(readable); |
402 | - CHECK(ble_supported); | |
403 | 400 | return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array); |
404 | 401 | } |
405 | 402 | |
406 | 403 | static bool supports_ble_set_privacy_mode() { |
407 | 404 | CHECK(readable); |
408 | - CHECK(ble_supported); | |
409 | 405 | return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array) && |
410 | 406 | HCI_LE_SET_PRIVACY_MODE_SUPPORTED(supported_commands); |
411 | 407 | } |
412 | 408 | |
413 | 409 | static bool supports_ble_packet_extension(void) { |
414 | 410 | CHECK(readable); |
415 | - CHECK(ble_supported); | |
416 | 411 | return HCI_LE_DATA_LEN_EXT_SUPPORTED(features_ble.as_array); |
417 | 412 | } |
418 | 413 | |
419 | 414 | static bool supports_ble_connection_parameters_request(void) { |
420 | 415 | CHECK(readable); |
421 | - CHECK(ble_supported); | |
422 | 416 | return HCI_LE_CONN_PARAM_REQ_SUPPORTED(features_ble.as_array); |
423 | 417 | } |
424 | 418 | |
425 | 419 | static bool supports_ble_2m_phy(void) { |
426 | 420 | CHECK(readable); |
427 | - CHECK(ble_supported); | |
428 | 421 | return HCI_LE_2M_PHY_SUPPORTED(features_ble.as_array); |
429 | 422 | } |
430 | 423 | |
431 | 424 | static bool supports_ble_coded_phy(void) { |
432 | 425 | CHECK(readable); |
433 | - CHECK(ble_supported); | |
434 | 426 | return HCI_LE_CODED_PHY_SUPPORTED(features_ble.as_array); |
435 | 427 | } |
436 | 428 | |
437 | 429 | static bool supports_ble_extended_advertising(void) { |
438 | 430 | CHECK(readable); |
439 | - CHECK(ble_supported); | |
440 | 431 | return HCI_LE_EXTENDED_ADVERTISING_SUPPORTED(features_ble.as_array); |
441 | 432 | } |
442 | 433 | |
443 | 434 | static bool supports_ble_periodic_advertising(void) { |
444 | 435 | CHECK(readable); |
445 | - CHECK(ble_supported); | |
446 | 436 | return HCI_LE_PERIODIC_ADVERTISING_SUPPORTED(features_ble.as_array); |
447 | 437 | } |
448 | 438 |
@@ -453,7 +443,6 @@ static uint16_t get_acl_data_size_classic(void) { | ||
453 | 443 | |
454 | 444 | static uint16_t get_acl_data_size_ble(void) { |
455 | 445 | CHECK(readable); |
456 | - CHECK(ble_supported); | |
457 | 446 | return acl_data_size_ble; |
458 | 447 | } |
459 | 448 |
@@ -469,7 +458,6 @@ static uint16_t get_acl_packet_size_ble(void) { | ||
469 | 458 | |
470 | 459 | static uint16_t get_ble_suggested_default_data_length(void) { |
471 | 460 | CHECK(readable); |
472 | - CHECK(ble_supported); | |
473 | 461 | return ble_suggested_default_data_length; |
474 | 462 | } |
475 | 463 |
@@ -481,13 +469,11 @@ static uint16_t get_ble_maximum_tx_data_length(void) { | ||
481 | 469 | |
482 | 470 | static uint16_t get_ble_maxium_advertising_data_length(void) { |
483 | 471 | CHECK(readable); |
484 | - CHECK(ble_supported); | |
485 | 472 | return ble_maxium_advertising_data_length; |
486 | 473 | } |
487 | 474 | |
488 | 475 | static uint8_t get_ble_number_of_supported_advertising_sets(void) { |
489 | 476 | CHECK(readable); |
490 | - CHECK(ble_supported); | |
491 | 477 | return ble_number_of_supported_advertising_sets; |
492 | 478 | } |
493 | 479 |
@@ -498,19 +484,16 @@ static uint16_t get_acl_buffer_count_classic(void) { | ||
498 | 484 | |
499 | 485 | static uint8_t get_acl_buffer_count_ble(void) { |
500 | 486 | CHECK(readable); |
501 | - CHECK(ble_supported); | |
502 | 487 | return acl_buffer_count_ble; |
503 | 488 | } |
504 | 489 | |
505 | 490 | static uint8_t get_ble_white_list_size(void) { |
506 | 491 | CHECK(readable); |
507 | - CHECK(ble_supported); | |
508 | 492 | return ble_white_list_size; |
509 | 493 | } |
510 | 494 | |
511 | 495 | static uint8_t get_ble_resolving_list_max_size(void) { |
512 | 496 | CHECK(readable); |
513 | - CHECK(ble_supported); | |
514 | 497 | return ble_resolving_list_max_size; |
515 | 498 | } |
516 | 499 |
@@ -520,7 +503,6 @@ static void set_ble_resolving_list_max_size(int resolving_list_max_size) { | ||
520 | 503 | if (resolving_list_max_size != 0) { |
521 | 504 | CHECK(readable); |
522 | 505 | } |
523 | - CHECK(ble_supported); | |
524 | 506 | ble_resolving_list_max_size = resolving_list_max_size; |
525 | 507 | } |
526 | 508 |