heesn / rtl8831

realtek 8851 8831 linux driver
7 stars 4 forks source link

[tks]It works on my RTL8851BU-base USB AP(Comfast AX900 CF-943F) #1

Closed OlafZhang closed 1 week ago

OlafZhang commented 3 months ago

GOAT🐐, all WiFi(including WiFi6) and BT functions are available, been looking for this linux driver for a long long long time ,tks🥰

heesn commented 3 months ago

Wow... good for you. I didnt know this will help somebody. Thanks.

2024년 6월 29일 (토) 오후 12:37, Olaf Zhang @.***>님이 작성:

GOAT🐐, all WiFi(including WiFi6) and BT functions are available, been looking for this linux driver for a long long long time ,tks🥰

— Reply to this email directly, view it on GitHub https://github.com/heesn/rtl8831/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKS7OA2AJ7ZOBL55WEWVMPDZJYTWTAVCNFSM6AAAAABKC2XA36VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DCNBUGA2DMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Lee-yannnn commented 1 month ago

哇...对你有好处。我不知道这会对某人有帮助。谢谢。 2024 年 6 月 29 日 12:37, Olaf 张 @.> 回复: GOAT🐐,所有 WiFi(包括 WiFi6)和 BT 功能均可用,找这个 Linux 驱动程序很久很久了,tks🥰 — 直接回复此电子邮件,在 GitHub 上查看 < #1 >,或取消订阅 < https://github.com/notifications/unsubscribe-auth/AKS7OA2AJ7ZOBL55WEWVMPDZJYTWTAVCNFSM6AAAAABKC2XA36VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DCNBUGA2DMOI >。您收到此消息是因为您订阅了此主题。消息 ID:@.>

I don't know much about linux system operation. I want to know how to use this driver. I hope you can tell me.

yuzvir commented 1 month ago

I can confirm. I also have CF-943F and it works in 6.6.44-1-MANJARO with your driver.

atherosxd commented 1 month ago

have the same but doesn't seem to work with PopOS 22.04 error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Werror=implicit-function-declaration] 518 | strlcpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name, | ^~~ | strncpy

OlafZhang commented 1 month ago

Something wrong with you cpp or other thing, I solved this problem when installing this driver but i forgot how:(, anyway, run"uname -a" to check you kernel info first

OlafZhang commented 1 month ago

I will find this solution asap

atherosxd commented 1 month ago

hi, this is the result of uname -a Linux mainrigpop 6.9.3-76060903-generic #202405300957~1721174657~22.04~abb7c06 SMP PREEMPT_DYNAMIC Wed J x86_64 x86_64 x86_64 GNU/Linux

OlafZhang commented 1 month ago

been recalled, try install glibc by "apt install glibc" or upgrade it.btw, my os is deepin 20,also likes ubuntu(popos likes ubuntu),and try make.That's all i can help.

OlafZhang commented 1 month ago

one more thing, you can also try apt install linux-headers-$(uname -r) and apt install libbsd-dev, works on Kali Linux 2022.4

atherosxd commented 1 month ago

did that and it doesn't work what is your glibc version? using ldd --version. Pop OS 22.04 has outdated glibc that doesn't include strlcpy. I'll try to update that and let you know.

OlafZhang commented 1 month ago

run ldd --versionon my Kali Linux 2022 get ldd (Debian GLIBC 2.38-13) 2.38, good luck

solaris111 commented 3 weeks ago

GOAT🐐, all WiFi(including WiFi6) and BT functions are available, been looking for this linux driver for a long long long time ,tks🥰

Does this code contains BT driver?

solaris111 commented 3 weeks ago

By the way,I got another version of rtl8831 driver(v1.19.10-70),Which contains documents and it's very usefull.For example,Too many kernel logs flood log-buffer,while turning log-level to 2 may be helpful. Can anyone offer document of this version((v1.19.10-78)? 图片

awaism257 commented 2 weeks ago

have the same but doesn't seem to work with PopOS 22.04 error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Werror=implicit-function-declaration] 518 | strlcpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name, | ^~~ | strncpy

Hello, I am getting this error, this is the version I have:

Nobara Linux 40 (KDE Plasma) Linux awais-pc 6.10.7-200.fsync.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC TKG Wed Sep 4 04:41:43 UTC 2024 x86_64 GNU/Linux

ldd (GNU libc) 2.39

Does anyone know how to fix this please?

neatojones commented 2 weeks ago

Thank you so much for this work. I was able to get it to work with several changes to files. It seems that the pull for this is outdated and missing some file changes that were made to support kernel 6.8 and newer. I was able to trace down the commits that were made to the upstream package and it compiled successfully after that.

neatojones commented 2 weeks ago

for the strncopy problem, the issue is that Ubuntu and some other distro's maintaners don't like the strlcpy function. They use their own. I went into the file it referenced and changed the instances from strlcpy to strscpy which is what my version of Ubuntu uses. You should do the same thing with strncpy. There were like 7 instances of the use in mine that I replaced and it got around that error.

OlafZhang commented 2 weeks ago

for the strncopy problem, the issue is that Ubuntu and some other distro's maintaners don't like the strlcpy function. They use their own. I went into the file it referenced and changed the instances from strlcpy to strscpy which is what my version of Ubuntu uses. You should do the same thing with strncpy. There were like 7 instances of the use in mine that I replaced and it got around that error.

No wonder that Ubuntu did somethings to strlcpy, seem that the strlcpy problem was solved, I will close this issue later,thk.

awaism257 commented 2 weeks ago

@OlafZhang , could you possibly create a strscpy version for those less technical please?

neatojones commented 2 weeks ago

I created a fork that has the changes until they can be modified here.

awaism257 commented 2 weeks ago

Thank you.

awaism257 commented 2 weeks ago

Hello, sorry to disturb you again, I am getting the following two errors now after running the make command. Please could you kindly direct me to what I am doing wrong sorry?

/home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ch_switch_notify’: /home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c:249:17: error: too many arguments to function ‘cfg80211_ch_switch_started_notify’ 249 | cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, link_id, 0, false, punct_bitmap); | ^~~~~~~~~ In file included from /home/awais/Downloads/RTL8851bu-main/include/osdep_service_linux.h:104, from /home/awais/Downloads/RTL8851bu-main/include/osdep_service.h:47, from /home/awais/Downloads/RTL8851bu-main/include/drv_types.h:25, from /home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c:17: ./include/net/cfg80211.h:8962:6: note: declared here 8962 | void cfg80211_ch_switch_started_notify(struct net_device *dev, | ^~~~~~~~~ /home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c:272:9: error: too many arguments to function ‘cfg80211_ch_switch_notify’ 272 | cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, link_id, punct_bitmap); | ^~~~~~~~~ ./include/net/cfg80211.h:8946:6: note: declared here

neatojones commented 1 week ago

It looks like an error on my forked drivers. But, it is going to be common to both sets since I did not make any changes to that part of the coding. I am not sure where the problem is. But, looking online at similar issues on similar drivers, it seems that it is likely an upstream issue from wherever this set of drivers were obtained.

I don't know if there is a fix yet. You could try using kernel 6.8 or earlier if you have it available to install and see if that gets around the problem. Maybe @heesn has some better ideas.

heesn commented 1 week ago

I merged the @neatojones version. Thanks all.

neatojones commented 2 days ago

Hello, sorry to disturb you again, I am getting the following two errors now after running the make command. Please could you kindly direct me to what I am doing wrong sorry?

/home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ch_switch_notify’: /home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c:249:17: error: too many arguments to function ‘cfg80211_ch_switch_started_notify’ 249 | cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, link_id, 0, false, punct_bitmap); | ^~~~~~~~~ In file included from /home/awais/Downloads/RTL8851bu-main/include/osdep_service_linux.h:104, from /home/awais/Downloads/RTL8851bu-main/include/osdep_service.h:47, from /home/awais/Downloads/RTL8851bu-main/include/drv_types.h:25, from /home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c:17: ./include/net/cfg80211.h:8962:6: note: declared here 8962 | void cfg80211_ch_switch_started_notify(struct net_device *dev, | ^~~~~~~~~ /home/awais/Downloads/RTL8851bu-main/os_dep/linux/ioctl_cfg80211.c:272:9: error: too many arguments to function ‘cfg80211_ch_switch_notify’ 272 | cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, link_id, punct_bitmap); | ^~~~~~~~~ ./include/net/cfg80211.h:8946:6: note: declared here

This looks like a problem with kernels newer than 6.8. Please test the version I have on my fork. If it works for me and if it works for others I will put in a merge request.

awaism257 commented 1 day ago

Hello, I managed to install it successfully now and the WiFi speed is around 80-90MB so I am pleased, thank you very much for your work.