lwfinger / rtw89-BT

Out-of-kernel driver for Realtek BT devices found in rtw89 devides.
67 stars 9 forks source link

build errors #16

Open Whaiy opened 1 year ago

Whaiy commented 1 year ago
whaiy@loader:/opt/repo/rtw89-BT$ uname -a
Linux loader 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
whaiy@loader:/opt/repo/rtw89-BT$ sudo make
make -C /lib/modules/5.10.0-21-amd64/build M=/opt/repo/rtw89-BT modules
make[1]: 进入目录“/usr/src/linux-headers-5.10.0-21-amd64”
  CC [M]  /opt/repo/rtw89-BT/btusb.o
In file included from /opt/repo/rtw89-BT/btusb.c:26:
/opt/repo/rtw89-BT/btusb.c: In function ‘btusb_recv_bulk_intel’:
/opt/repo/rtw89-BT/btintel.h:183:27: error: implicit declaration of function ‘hci_get_priv’; did you mean ‘hci_get_irk’? [-Werror=implicit-function-declaration]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |                           ^~~~~~~~~~~~
/opt/repo/rtw89-BT/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c:2190:6: note: in expansion of macro ‘btintel_test_flag’
 2190 |  if (btintel_test_flag(hdev, INTEL_BOOTLOADER))
      |      ^~~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btintel.h:183:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |    ^
/opt/repo/rtw89-BT/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c:2190:6: note: in expansion of macro ‘btintel_test_flag’
 2190 |  if (btintel_test_flag(hdev, INTEL_BOOTLOADER))
      |      ^~~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c: In function ‘btusb_recv_event_intel’:
/opt/repo/rtw89-BT/btintel.h:183:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |    ^
/opt/repo/rtw89-BT/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c:2198:6: note: in expansion of macro ‘btintel_test_flag’
 2198 |  if (btintel_test_flag(hdev, INTEL_BOOTLOADER)) {
      |      ^~~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c: In function ‘btusb_send_frame_intel’:
/opt/repo/rtw89-BT/btintel.h:183:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |    ^
/opt/repo/rtw89-BT/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c:2237:7: note: in expansion of macro ‘btintel_test_flag’
 2237 |   if (btintel_test_flag(hdev, INTEL_BOOTLOADER)) {
      |       ^~~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c: In function ‘btusb_mtk_setup’:
/opt/repo/rtw89-BT/btusb.c:2729:3: error: implicit declaration of function ‘hci_set_aosp_capable’; did you mean ‘lmp_transp_capable’? [-Werror=implicit-function-declaration]
 2729 |   hci_set_aosp_capable(hdev);
      |   ^~~~~~~~~~~~~~~~~~~~
      |   lmp_transp_capable
/opt/repo/rtw89-BT/btusb.c: In function ‘btusb_probe’:
/opt/repo/rtw89-BT/btusb.c:3738:9: error: implicit declaration of function ‘hci_alloc_dev_priv’; did you mean ‘hci_alloc_dev’? [-Werror=implicit-function-declaration]
 3738 |  hdev = hci_alloc_dev_priv(priv_size);
      |         ^~~~~~~~~~~~~~~~~~
      |         hci_alloc_dev
/opt/repo/rtw89-BT/btusb.c:3738:7: warning: assignment to ‘struct hci_dev *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 3738 |  hdev = hci_alloc_dev_priv(priv_size);
      |       ^
In file included from /opt/repo/rtw89-BT/btusb.c:26:
/opt/repo/rtw89-BT/btintel.h:166:32: warning: initialization of ‘struct btintel_data *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  166 |   struct btintel_data *intel = hci_get_priv((hdev)); \
      |                                ^~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c:3830:4: note: in expansion of macro ‘btintel_set_flag’
 3830 |    btintel_set_flag(hdev, INTEL_ROM_LEGACY_NO_WBS_SUPPORT);
      |    ^~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btintel.h:166:32: warning: initialization of ‘struct btintel_data *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  166 |   struct btintel_data *intel = hci_get_priv((hdev)); \
      |                                ^~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c:3833:4: note: in expansion of macro ‘btintel_set_flag’
 3833 |    btintel_set_flag(hdev, INTEL_BROKEN_INITIAL_NCMD);
      |    ^~~~~~~~~~~~~~~~
/opt/repo/rtw89-BT/btintel.h:166:32: warning: initialization of ‘struct btintel_data *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  166 |   struct btintel_data *intel = hci_get_priv((hdev)); \
      |                                ^~~~~~~~~~~~
/opt/repo/rtw89-BT/btusb.c:3836:4: note: in expansion of macro ‘btintel_set_flag’
 3836 |    btintel_set_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED);
      |    ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.10.0-21-common/scripts/Makefile.build:291:/opt/repo/rtw89-BT/btusb.o] 错误 1
make[2]: *** [/usr/src/linux-headers-5.10.0-21-common/Makefile:1861:/opt/repo/rtw89-BT] 错误 2
make[1]: *** [/usr/src/linux-headers-5.10.0-21-common/Makefile:185:__sub-make] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-5.10.0-21-amd64”
make: *** [Makefile:33:all] 错误 2