btrtl.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Bluetooth support for Realtek devices
  3. *
  4. * Copyright (C) 2015 Endless Mobile, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #define RTL_FRAG_LEN 252
  18. struct rtl_download_cmd {
  19. __u8 index;
  20. __u8 data[RTL_FRAG_LEN];
  21. } __packed;
  22. struct rtl_download_response {
  23. __u8 status;
  24. __u8 index;
  25. } __packed;
  26. struct rtl_rom_version_evt {
  27. __u8 status;
  28. __u8 version;
  29. } __packed;
  30. struct rtl_epatch_header {
  31. __u8 signature[8];
  32. __le32 fw_version;
  33. __le16 num_patches;
  34. } __packed;
  35. #if IS_ENABLED(CONFIG_BT_RTL)
  36. int btrtl_setup_realtek(struct hci_dev *hdev);
  37. #else
  38. static inline int btrtl_setup_realtek(struct hci_dev *hdev)
  39. {
  40. return -EOPNOTSUPP;
  41. }
  42. #endif