system/bt
Revision | c1df74fba72308d56cd3cb5817df0f01121f83d0 (tree) |
---|---|
Zeit | 2020-04-14 23:54:21 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Avoid annoying crashing on VMware
@@ -329,13 +329,11 @@ static uint8_t* get_local_supported_codecs(uint8_t* number_of_codecs) { | ||
329 | 329 | |
330 | 330 | static const bt_device_features_t* get_features_ble(void) { |
331 | 331 | CHECK(readable); |
332 | - CHECK(ble_supported); | |
333 | 332 | return &features_ble; |
334 | 333 | } |
335 | 334 | |
336 | 335 | static const uint8_t* get_ble_supported_states(void) { |
337 | 336 | CHECK(readable); |
338 | - CHECK(ble_supported); | |
339 | 337 | return ble_supported_states; |
340 | 338 | } |
341 | 339 |
@@ -396,50 +394,42 @@ static bool supports_ble(void) { | ||
396 | 394 | |
397 | 395 | static bool supports_ble_privacy(void) { |
398 | 396 | CHECK(readable); |
399 | - CHECK(ble_supported); | |
400 | 397 | return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array); |
401 | 398 | } |
402 | 399 | |
403 | 400 | static bool supports_ble_set_privacy_mode() { |
404 | 401 | CHECK(readable); |
405 | - CHECK(ble_supported); | |
406 | 402 | return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array) && |
407 | 403 | HCI_LE_SET_PRIVACY_MODE_SUPPORTED(supported_commands); |
408 | 404 | } |
409 | 405 | |
410 | 406 | static bool supports_ble_packet_extension(void) { |
411 | 407 | CHECK(readable); |
412 | - CHECK(ble_supported); | |
413 | 408 | return HCI_LE_DATA_LEN_EXT_SUPPORTED(features_ble.as_array); |
414 | 409 | } |
415 | 410 | |
416 | 411 | static bool supports_ble_connection_parameters_request(void) { |
417 | 412 | CHECK(readable); |
418 | - CHECK(ble_supported); | |
419 | 413 | return HCI_LE_CONN_PARAM_REQ_SUPPORTED(features_ble.as_array); |
420 | 414 | } |
421 | 415 | |
422 | 416 | static bool supports_ble_2m_phy(void) { |
423 | 417 | CHECK(readable); |
424 | - CHECK(ble_supported); | |
425 | 418 | return HCI_LE_2M_PHY_SUPPORTED(features_ble.as_array); |
426 | 419 | } |
427 | 420 | |
428 | 421 | static bool supports_ble_coded_phy(void) { |
429 | 422 | CHECK(readable); |
430 | - CHECK(ble_supported); | |
431 | 423 | return HCI_LE_CODED_PHY_SUPPORTED(features_ble.as_array); |
432 | 424 | } |
433 | 425 | |
434 | 426 | static bool supports_ble_extended_advertising(void) { |
435 | 427 | CHECK(readable); |
436 | - CHECK(ble_supported); | |
437 | 428 | return HCI_LE_EXTENDED_ADVERTISING_SUPPORTED(features_ble.as_array); |
438 | 429 | } |
439 | 430 | |
440 | 431 | static bool supports_ble_periodic_advertising(void) { |
441 | 432 | CHECK(readable); |
442 | - CHECK(ble_supported); | |
443 | 433 | return HCI_LE_PERIODIC_ADVERTISING_SUPPORTED(features_ble.as_array); |
444 | 434 | } |
445 | 435 |
@@ -450,7 +440,6 @@ static uint16_t get_acl_data_size_classic(void) { | ||
450 | 440 | |
451 | 441 | static uint16_t get_acl_data_size_ble(void) { |
452 | 442 | CHECK(readable); |
453 | - CHECK(ble_supported); | |
454 | 443 | return acl_data_size_ble; |
455 | 444 | } |
456 | 445 |
@@ -466,7 +455,6 @@ static uint16_t get_acl_packet_size_ble(void) { | ||
466 | 455 | |
467 | 456 | static uint16_t get_ble_suggested_default_data_length(void) { |
468 | 457 | CHECK(readable); |
469 | - CHECK(ble_supported); | |
470 | 458 | return ble_suggested_default_data_length; |
471 | 459 | } |
472 | 460 |
@@ -478,13 +466,11 @@ static uint16_t get_ble_maximum_tx_data_length(void) { | ||
478 | 466 | |
479 | 467 | static uint16_t get_ble_maxium_advertising_data_length(void) { |
480 | 468 | CHECK(readable); |
481 | - CHECK(ble_supported); | |
482 | 469 | return ble_maxium_advertising_data_length; |
483 | 470 | } |
484 | 471 | |
485 | 472 | static uint8_t get_ble_number_of_supported_advertising_sets(void) { |
486 | 473 | CHECK(readable); |
487 | - CHECK(ble_supported); | |
488 | 474 | return ble_number_of_supported_advertising_sets; |
489 | 475 | } |
490 | 476 |
@@ -495,19 +481,16 @@ static uint16_t get_acl_buffer_count_classic(void) { | ||
495 | 481 | |
496 | 482 | static uint8_t get_acl_buffer_count_ble(void) { |
497 | 483 | CHECK(readable); |
498 | - CHECK(ble_supported); | |
499 | 484 | return acl_buffer_count_ble; |
500 | 485 | } |
501 | 486 | |
502 | 487 | static uint8_t get_ble_white_list_size(void) { |
503 | 488 | CHECK(readable); |
504 | - CHECK(ble_supported); | |
505 | 489 | return ble_white_list_size; |
506 | 490 | } |
507 | 491 | |
508 | 492 | static uint8_t get_ble_resolving_list_max_size(void) { |
509 | 493 | CHECK(readable); |
510 | - CHECK(ble_supported); | |
511 | 494 | return ble_resolving_list_max_size; |
512 | 495 | } |
513 | 496 |
@@ -517,7 +500,6 @@ static void set_ble_resolving_list_max_size(int resolving_list_max_size) { | ||
517 | 500 | if (resolving_list_max_size != 0) { |
518 | 501 | CHECK(readable); |
519 | 502 | } |
520 | - CHECK(ble_supported); | |
521 | 503 | ble_resolving_list_max_size = resolving_list_max_size; |
522 | 504 | } |
523 | 505 |