lwfinger / rtw89-BT

Out-of-kernel driver for Realtek BT devices found in rtw89 devides.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kernel 5.15.0-92 - Make Compilation Error

tqthangdq opened this issue · comments

I could install the rtw86 driver for Wifi, however when I compiled the code for Bluetooth, it has shown up an implicit declaration error:

thangtran@homelaptop:~/rtw89-BT$ make
make -C /lib/modules/5.15.0-92-generic/build M=/home/thangtran/rtw89-BT modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-92-generic'
  CC [M]  /home/thangtran/rtw89-BT/btusb.o
/home/thangtran/rtw89-BT/btusb.c: In function ‘btusb_setup_csr’:
/home/thangtran/rtw89-BT/btusb.c:2342:14: error: implicit declaration of function ‘skb_pull_data’; did you mean ‘skb_put_data’? [-Werror=implicit-function-declaration]
 2342 |         rp = skb_pull_data(skb, sizeof(*rp));
      |              ^~~~~~~~~~~~~
      |              skb_put_data
/home/thangtran/rtw89-BT/btusb.c:2342:12: warning: assignment to ‘struct hci_rp_read_local_version *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2342 |         rp = skb_pull_data(skb, sizeof(*rp));
      |            ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:297: /home/thangtran/rtw89-BT/btusb.o] Error 1
make[1]: *** [Makefile:1909: /home/thangtran/rtw89-BT] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-92-generic'
make: *** [Makefile:34: all] Error 2

Thank you for your support.

I have found that the function skb_pull_data() is only included in kernel 6.7, not in kernel 5.15+ (only the function skb_pull() in skbuff.h). Therefore, just download the code in the commit point before the upgrade to kernel 6.7, they will work.

Thank you for your hard work.