btintel.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. *
  3. * Bluetooth support for Intel devices
  4. *
  5. * Copyright (C) 2015 Intel Corporation
  6. *
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. *
  22. */
  23. struct intel_version {
  24. u8 status;
  25. u8 hw_platform;
  26. u8 hw_variant;
  27. u8 hw_revision;
  28. u8 fw_variant;
  29. u8 fw_revision;
  30. u8 fw_build_num;
  31. u8 fw_build_ww;
  32. u8 fw_build_yy;
  33. u8 fw_patch_num;
  34. } __packed;
  35. struct intel_boot_params {
  36. __u8 status;
  37. __u8 otp_format;
  38. __u8 otp_content;
  39. __u8 otp_patch;
  40. __le16 dev_revid;
  41. __u8 secure_boot;
  42. __u8 key_from_hdr;
  43. __u8 key_type;
  44. __u8 otp_lock;
  45. __u8 api_lock;
  46. __u8 debug_lock;
  47. bdaddr_t otp_bdaddr;
  48. __u8 min_fw_build_nn;
  49. __u8 min_fw_build_cw;
  50. __u8 min_fw_build_yy;
  51. __u8 limited_cce;
  52. __u8 unlocked_state;
  53. } __packed;
  54. struct intel_bootup {
  55. __u8 zero;
  56. __u8 num_cmds;
  57. __u8 source;
  58. __u8 reset_type;
  59. __u8 reset_reason;
  60. __u8 ddc_status;
  61. } __packed;
  62. struct intel_secure_send_result {
  63. __u8 result;
  64. __le16 opcode;
  65. __u8 status;
  66. } __packed;
  67. #if IS_ENABLED(CONFIG_BT_INTEL)
  68. int btintel_check_bdaddr(struct hci_dev *hdev);
  69. int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
  70. #else
  71. static inline int btintel_check_bdaddr(struct hci_dev *hdev)
  72. {
  73. return -EOPNOTSUPP;
  74. }
  75. static inline int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
  76. {
  77. return -EOPNOTSUPP;
  78. }
  79. #endif